summaryrefslogtreecommitdiff
path: root/src/analysis/db/items/bookmark.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/bookmark.c
parent3a83a06db8ee27eafcd0219d1d26bf2af23737f5 (diff)
Removed useless features from DB collections.
Diffstat (limited to 'src/analysis/db/items/bookmark.c')
-rw-r--r--src/analysis/db/items/bookmark.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/analysis/db/items/bookmark.c b/src/analysis/db/items/bookmark.c
index 8c15e5a..0f985d6 100644
--- a/src/analysis/db/items/bookmark.c
+++ b/src/analysis/db/items/bookmark.c
@@ -141,9 +141,6 @@ static void g_bookmark_collection_finalize(GBookmarkCollection *);
/* Crée la table des signets dans une base de données. */
static bool g_bookmark_collection_create_db_table(const GBookmarkCollection *, sqlite3 *);
-/* Détermine si un élément est déjà présent ou non. */
-static GDbItem *g_bookmark_collection_has_key(GBookmarkCollection *, va_list);
-
/* ---------------------------------------------------------------------------------- */
@@ -788,7 +785,6 @@ static void g_bookmark_collection_class_init(GBookmarkCollectionClass *klass)
collec = G_DB_COLLECTION_CLASS(klass);
collec->create_table = (collec_create_db_table_fc)g_bookmark_collection_create_db_table;
- collec->has_key = (collec_has_key_fc)g_bookmark_collection_has_key;
}
@@ -920,52 +916,3 @@ static bool g_bookmark_collection_create_db_table(const GBookmarkCollection *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_bookmark_collection_has_key(GBookmarkCollection *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 */
- GDbBookmark *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_BOOKMARK(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;
-
-}