summaryrefslogtreecommitdiff
path: root/src/analysis/db/collection-int.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-int.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-int.h')
-rw-r--r--src/analysis/db/collection-int.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/analysis/db/collection-int.h b/src/analysis/db/collection-int.h
new file mode 100644
index 0000000..6ca9ab4
--- /dev/null
+++ b/src/analysis/db/collection-int.h
@@ -0,0 +1,78 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * collection-int.h - prototypes et définitions internes pour les collections d'éléments
+ *
+ * Copyright (C) 2015 Cyrille Bagard
+ *
+ * This file is part of Chrysalide.
+ *
+ * OpenIDA is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * OpenIDA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _ANALYSIS_DB_COLLECTION_INT_H
+#define _ANALYSIS_DB_COLLECTION_INT_H
+
+
+#include "collection.h"
+
+
+#include <stdarg.h>
+
+
+
+/* Décrit les colonnes utiles à un chargement de données. */
+typedef bool (* collec_setup_load_fc) (GDbCollection *, bound_value **, size_t *);
+
+/* Charge les valeurs utiles pour une localisation. */
+typedef bool (* collec_load_item) (GDbCollection *, const bound_value *, size_t);
+
+/* Détermine si un élément est déjà présent ou non. */
+typedef GDbItem * (* collec_has_key_fc) (GDbCollection *, va_list *);
+
+
+
+/* Collection générique d'éléments (instance) */
+struct _GDbCollection
+{
+ GObject parent; /* A laisser en premier */
+
+ uint32_t featuring; /* Fonctionnalité représentée */
+ GType type; /* Identifiant GLib équivalent */
+ const char *name; /* Nom en base de données */
+
+ GList *items; /* Eléments rassemblés */
+ GList *sorted; /* Eléments triés */
+ GRWLock params_access; /* Verrou de protection */
+
+};
+
+/* Collection générique d'éléments (classe) */
+struct _GDbCollectionClass
+{
+ GObjectClass parent; /* A laisser en premier */
+
+ collec_setup_load_fc setup_load; /* Prépare le chargement */
+ collec_load_item load_item; /* Charge un élément */
+ collec_has_key_fc has_key; /* Recherche de présence */
+
+ /* Signaux */
+
+ void (* content_changed) (GDbCollection *, DBAction, GDbItem *);
+
+};
+
+
+
+#endif /* _ANALYSIS_DB_COLLECTION_INT_H */