summaryrefslogtreecommitdiff
path: root/src/analysis/db/collection.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-02-09 22:07:42 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-02-09 22:07:42 (GMT)
commit1d79469f69bba33a2280d4bd531652b71148029f (patch)
treee81c094d6e829fb1a79d4c413c1cd162e14868a3 /src/analysis/db/collection.h
parent8d326041a0379b87e54be44506d544367567e89b (diff)
Created a dialog box to create new bookmarks.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@468 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/analysis/db/collection.h')
-rw-r--r--src/analysis/db/collection.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/analysis/db/collection.h b/src/analysis/db/collection.h
index b400820..268c2be 100644
--- a/src/analysis/db/collection.h
+++ b/src/analysis/db/collection.h
@@ -39,10 +39,14 @@
#define G_TYPE_DB_COLLECTION g_db_collection_get_type()
#define G_DB_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_db_collection_get_type(), GDbCollection))
#define G_IS_DB_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_db_collection_get_type()))
-#define G_DB_COLLECTION_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE((inst), g_db_collection_get_type(), GDbCollectionIface))
+#define G_DB_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_DB_COLLECTION, GDbCollectionClass))
+#define G_IS_DB_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_DB_COLLECTION))
#define G_DB_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_DB_COLLECTION, GDbCollectionClass))
+
+
+
/* Collection générique d'éléments (instance) */
typedef struct _GDbCollection GDbCollection;
@@ -70,7 +74,8 @@ bool g_db_collection_recv(GDbCollection *, int, sqlite3 *);
/* Envoie pour traitement une requête réseau pour collection. */
bool g_db_collection_send(GDbCollection *, int, DBAction, GDbItem *);
-
+/* Envoie pour mise à jour tous les éléments courants. */
+bool g_db_collection_send_all_updates(GDbCollection *, int);
@@ -89,15 +94,28 @@ void g_db_collection_lock_unlock(GDbCollection *, bool, bool);
/* Renvoie la liste des éléments rassemblés. */
GList *g_db_collection_list_items(const GDbCollection *);
+/* Détermine si un élément est déjà présent ou non. */
+GDbItem *g_db_collection_has_key(GDbCollection *, ...);
-
+/* Détermine si un élément est déjà présent ou non. */
+bool g_db_collection_has_item(GDbCollection *, GDbItem *);
/* Procède à l'ajout d'un nouvel élément dans la collection. */
-bool g_db_collection_add_item(GDbCollection *, GDbItem *);
+bool _g_db_collection_add_item(GDbCollection *, GDbItem *, bool);
/* Procède à la modification d'un élément dans la collection. */
-bool g_db_collection_modify_item(GDbCollection *, GDbItem *);
+bool _g_db_collection_modify_item(GDbCollection *, GDbItem *, bool);
+
+#define g_db_collection_add_item(c, i) _g_db_collection_add_item(c, i, true)
+#define g_db_collection_modify_item(c, i) _g_db_collection_modify_item(c, i, true)
+
+
+
+/* --------------------- MANIPULATIONS AVEC UNE BASE DE DONNEES --------------------- */
+
+/* Charge un ensemble d'éléments à partir d'une base de données. */
+bool g_db_collection_load_all_items(GDbCollection *, sqlite3 *);