summaryrefslogtreecommitdiff
path: root/src/analysis/contents
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/contents')
-rw-r--r--src/analysis/contents/encapsulated.h18
-rw-r--r--src/analysis/contents/file.h18
-rw-r--r--src/analysis/contents/memory.h18
-rw-r--r--src/analysis/contents/restricted.h18
4 files changed, 12 insertions, 60 deletions
diff --git a/src/analysis/contents/encapsulated.h b/src/analysis/contents/encapsulated.h
index 9b74eac..bfd17e7 100644
--- a/src/analysis/contents/encapsulated.h
+++ b/src/analysis/contents/encapsulated.h
@@ -29,26 +29,14 @@
#include "../content.h"
+#include "../../glibext/helpers.h"
-#define G_TYPE_ENCAPS_CONTENT (g_encaps_content_get_type())
-#define G_ENCAPS_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_ENCAPS_CONTENT, GEncapsContent))
-#define G_IS_ENCAPS_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_ENCAPS_CONTENT))
-#define G_ENCAPS_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_ENCAPS_CONTENT, GEncapsContentClass))
-#define G_IS_ENCAPS_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_ENCAPS_CONTENT))
-#define G_ENCAPS_CONTENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_ENCAPS_CONTENT, GEncapsContentClass))
+#define G_TYPE_ENCAPS_CONTENT (g_encaps_content_get_type())
+DECLARE_GTYPE(GEncapsContent, g_encaps_content, G, ENCAPS_CONTENT);
-/* Contenu de issu d'un contenu plus global (instance) */
-typedef struct _GEncapsContent GEncapsContent;
-
-/* Contenu de issu d'un contenu plus global (classe) */
-typedef struct _GEncapsContentClass GEncapsContentClass;
-
-
-/* Indique le type défini par la GLib pour les contenus encapsulés. */
-GType g_encaps_content_get_type(void);
/* Charge en mémoire un contenu binaire encapsulé. */
GBinContent *g_encaps_content_new(GBinContent *, const char *, GBinContent *);
diff --git a/src/analysis/contents/file.h b/src/analysis/contents/file.h
index 5039f81..c54d890 100644
--- a/src/analysis/contents/file.h
+++ b/src/analysis/contents/file.h
@@ -29,26 +29,14 @@
#include "../content.h"
+#include "../../glibext/helpers.h"
-#define G_TYPE_FILE_CONTENT (g_file_content_get_type())
-#define G_FILE_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_FILE_CONTENT, GFileContent))
-#define G_IS_FILE_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_FILE_CONTENT))
-#define G_FILE_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_FILE_CONTENT, GFileContentClass))
-#define G_IS_FILE_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_FILE_CONTENT))
-#define G_FILE_CONTENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_FILE_CONTENT, GFileContentClass))
+#define G_TYPE_FILE_CONTENT (g_file_content_get_type())
+DECLARE_GTYPE(GFileContent, g_file_content, G, FILE_CONTENT);
-/* Contenu de données binaires issues d'un fichier (instance) */
-typedef struct _GFileContent GFileContent;
-
-/* Contenu de données binaires issues d'un fichier (classe) */
-typedef struct _GFileContentClass GFileContentClass;
-
-
-/* Indique le type défini par la GLib pour les contenus de données. */
-GType g_file_content_get_type(void);
/* Charge en mémoire le contenu d'un fichier donné. */
GBinContent *g_file_content_new(const char *);
diff --git a/src/analysis/contents/memory.h b/src/analysis/contents/memory.h
index 1759e69..20e3d18 100644
--- a/src/analysis/contents/memory.h
+++ b/src/analysis/contents/memory.h
@@ -29,26 +29,14 @@
#include "../content.h"
+#include "../../glibext/helpers.h"
-#define G_TYPE_MEMORY_CONTENT (g_memory_content_get_type())
-#define G_MEMORY_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_MEMORY_CONTENT, GMemoryContent))
-#define G_IS_MEMORY_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_MEMORY_CONTENT))
-#define G_MEMORY_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_MEMORY_CONTENT, GMemoryContentClass))
-#define G_IS_MEMORY_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_MEMORY_CONTENT))
-#define G_MEMORY_CONTENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_MEMORY_CONTENT, GMemoryContentClass))
+#define G_TYPE_MEMORY_CONTENT (g_memory_content_get_type())
+DECLARE_GTYPE(GMemoryContent, g_memory_content, G, MEMORY_CONTENT);
-/* Contenu de données binaires résidant en mémoire (instance) */
-typedef struct _GMemoryContent GMemoryContent;
-
-/* Contenu de données binaires résidant en mémoire (classe) */
-typedef struct _GMemoryContentClass GMemoryContentClass;
-
-
-/* Indique le type défini par la GLib pour les contenus de données en mémoire. */
-GType g_memory_content_get_type(void);
/* Charge en mémoire le contenu de données brutes. */
GBinContent *g_memory_content_new(const bin_t *, phys_t);
diff --git a/src/analysis/contents/restricted.h b/src/analysis/contents/restricted.h
index 1cea390..3925233 100644
--- a/src/analysis/contents/restricted.h
+++ b/src/analysis/contents/restricted.h
@@ -29,26 +29,14 @@
#include "../content.h"
+#include "../../glibext/helpers.h"
-#define G_TYPE_RESTRICTED_CONTENT (g_restricted_content_get_type())
-#define G_RESTRICTED_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), G_TYPE_RESTRICTED_CONTENT, GRestrictedContent))
-#define G_IS_RESTRICTED_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), G_TYPE_RESTRICTED_CONTENT))
-#define G_RESTRICTED_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_RESTRICTED_CONTENT, GRestrictedContentClass))
-#define G_IS_RESTRICTED_CONTENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_RESTRICTED_CONTENT))
-#define G_RESTRICTED_CONTENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_RESTRICTED_CONTENT, GRestrictedContentClass))
+#define G_TYPE_RESTRICTED_CONTENT (g_restricted_content_get_type())
+DECLARE_GTYPE(GRestrictedContent, g_restricted_content, G, RESTRICTED_CONTENT);
-/* Contenu de données binaires issues d'un contenu restreint (instance) */
-typedef struct _GRestrictedContent GRestrictedContent;
-
-/* Contenu de données binaires issues d'un contenu restreint (classe) */
-typedef struct _GRestrictedContentClass GRestrictedContentClass;
-
-
-/* Indique le type défini par la GLib pour les contenus de données. */
-GType g_restricted_content_get_type(void);
/* Charge en mémoire le contenu d'un contenu restreint. */
GBinContent *g_restricted_content_new(GBinContent *, const mrange_t *);