summaryrefslogtreecommitdiff
path: root/src/analysis/db/items/switcher.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-09-29 21:57:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-09-29 21:57:42 (GMT)
commitc434b8ccaae01810903e098ad8e66f8ead3141eb (patch)
tree9d0938011c37af7e297183e65b653360bcfaf315 /src/analysis/db/items/switcher.c
parent3a83a06db8ee27eafcd0219d1d26bf2af23737f5 (diff)
Removed useless features from DB collections.
Diffstat (limited to 'src/analysis/db/items/switcher.c')
-rw-r--r--src/analysis/db/items/switcher.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/analysis/db/items/switcher.c b/src/analysis/db/items/switcher.c
index 2a3aa42..e9305d8 100644
--- a/src/analysis/db/items/switcher.c
+++ b/src/analysis/db/items/switcher.c
@@ -136,9 +136,6 @@ static void g_switcher_collection_finalize(GSwitcherCollection *);
/* Crée la table des basculements dans une base de données. */
static bool g_switcher_collection_create_db_table(const GSwitcherCollection *, sqlite3 *);
-/* Détermine si un élément est déjà présent ou non. */
-static GDbItem *g_switcher_collection_has_key(GSwitcherCollection *, va_list);
-
/* ---------------------------------------------------------------------------------- */
@@ -783,7 +780,6 @@ static void g_switcher_collection_class_init(GSwitcherCollectionClass *klass)
collec = G_DB_COLLECTION_CLASS(klass);
collec->create_table = (collec_create_db_table_fc)g_switcher_collection_create_db_table;
- collec->has_key = (collec_has_key_fc)g_switcher_collection_has_key;
}
@@ -916,52 +912,3 @@ static bool g_switcher_collection_create_db_table(const GSwitcherCollection *col
return (ret == SQLITE_OK);
}
-
-
-/******************************************************************************
-* *
-* Paramètres : collec = ensemble d'éléments à consulter. *
-* ap = clef identifiant de manière unique un élément. *
-* *
-* Description : Détermine si un élément est déjà présent ou non. *
-* *
-* Retour : Elément trouvé ou NULL si aucun. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static GDbItem *g_switcher_collection_has_key(GSwitcherCollection *collec, va_list ap)
-{
- GDbItem *result; /* Bilan à retourner */
- vmpa2t *ref; /* Adresse de référence */
- GList *items; /* Eléments déjà en place */
- GList *iter; /* Boucle de parcours */
- GDbSwitcher *bm; /* Signet à consulter */
-
- result = NULL;
-
- ref = va_arg(ap, vmpa2t *);
-
-#if 0
- items = g_db_collection_get_items(G_DB_COLLECTION(collec));
-
- for (iter = g_list_first(items); iter != NULL && result == NULL; iter = g_list_next(iter))
- {
- bm = G_DB_SWITCHER(iter->data);
-
- if (cmp_vmpa(&bm->addr, ref) != 0)
-
- /**
- * Un verrou est sensé être posé, donc il n'y a pas besoin
- * de toucher au décompte des références car l'élément trouvé
- * ne peut pas être supprimé.
- */
- result = G_DB_ITEM(bm);
-
- }
-#endif
-
- return result;
-
-}