summaryrefslogtreecommitdiff
path: root/src/project.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/project.h')
-rw-r--r--src/project.h79
1 files changed, 34 insertions, 45 deletions
diff --git a/src/project.h b/src/project.h
index fa0d01a..6fb0101 100644
--- a/src/project.h
+++ b/src/project.h
@@ -2,7 +2,7 @@
/* OpenIDA - Outil d'analyse de fichiers binaires
* project.h - prototypes pour la gestion d'un groupe de fichiers binaires
*
- * Copyright (C) 2008-2011 Cyrille Bagard
+ * Copyright (C) 2008-2012 Cyrille Bagard
*
* This file is part of OpenIDA.
*
@@ -29,12 +29,13 @@
#include "analysis/binary.h"
-#include "debug/debugger.h"
#include "gtkext/gtkviewpanel.h"
-#include "gtkext/gtkdockitem.h"
+/* ------------------------- DEFINITION D'UN PROJET INTERNE ------------------------- */
+
+
/* Type de représentations */
typedef enum _BinaryView
{
@@ -47,76 +48,64 @@ typedef enum _BinaryView
} BinaryView;
+#define G_TYPE_STUDY_PROJECT g_study_project_get_type()
+#define G_STUDY_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_study_project_get_type(), GStudyProject))
+#define G_IS_STUDY_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_study_project_get_type()))
+#define G_STUDY_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_STUDY_PROJECT, GStudyProjectClass))
+#define G_IS_STUDY_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_STUDY_PROJECT))
+#define G_STUDY_PROJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_STUDY_PROJECT, GStudyProjectClass))
-/* Propriétés d'un ensemble de fichiers ouverts */
-typedef struct openida_project openida_project;
+/* Projet d'étude regroupant les binaires analysés (instance) */
+typedef struct _GStudyProject GStudyProject;
+/* Projet d'étude regroupant les binaires analysés (classe) */
+typedef struct _GStudyProjectClass GStudyProjectClass;
-#define set_current_openida_project(prj) _get_current_openida_project(prj)
-#define get_current_openida_project() _get_current_openida_project(NULL)
+/* Indique le type défini pour un projet d'étude. */
+GType g_study_project_get_type(void);
-/* Fournit l'adresse du projet courant. */
-openida_project *_get_current_openida_project(openida_project *);
-
-/* Crée un projet vide. */
-openida_project *create_empty_openida_project(GObject *);
+/* Crée un nouveau projet vierge. */
+GStudyProject *g_study_project_new(void);
/* Crée un projet à partir du contenu XML d'un fichier. */
-openida_project *g_openida_project_new_from_xml(GObject *, const char *);
+GStudyProject *g_study_project_open(const char *);
/* Procède à l'enregistrement d'un projet donné. */
-bool g_openida_project_save(openida_project *, const char *);
-
-/* Ferme un projet et libère la mémoire associée. */
-void close_openida_project(openida_project *);
+bool g_study_project_save(GStudyProject *, const char *);
/* Indique le chemin du fichier destiné à la sauvegarde. */
-const char *g_openida_project_get_filename(const openida_project *);
-
-
-
+const char *g_study_project_get_filename(const GStudyProject *);
/* Attache un fichier donné à un projet donné. */
-size_t attach_binary_to_openida_project(openida_project *, GOpenidaBinary *);
+size_t g_study_project_attach_binary(GStudyProject *, GOpenidaBinary *);
/* Détache un fichier donné à un projet donné. */
-void detach_binary_to_openida_project(openida_project *, GOpenidaBinary *);
-
-/* Fournit le support d'affichage principal d'un binaire chargé. */
-GDockItem *gtk_dock_panel_get_item_from_binary(const openida_project *, GOpenidaBinary *);
+void g_study_project_detach_binary(GStudyProject *, GOpenidaBinary *);
/* Fournit un support d'affichage donné pour un binaire chargé. */
-GtkWidget *get_view_for_openida_project_binary(const openida_project *, const GOpenidaBinary *, BinaryView, GtkViewPanel **);
-
-/* Fournit l'ensemble des binaires associés à un projet. */
-const GOpenidaBinary **get_openida_project_binaries(const openida_project *, size_t *);
-
-
+GtkWidget *g_study_project_get_view_for_binary(const GStudyProject *, const GOpenidaBinary *, BinaryView, GtkViewPanel **);
+/* Met en place un projet à l'écran. */
+void g_study_project_display(const GStudyProject *);
-/* Fournit un module de débogage prêt à emploi. */
-GBinaryDebugger *get_main_debugger_for_binary(const openida_project *, const GOpenidaBinary *);
+/* ------------------------- GESTION GLOBALISEE DES PROJETS ------------------------- */
+/* Fournit l'adresse du projet courant. */
+GStudyProject *_get_current_study_project(GStudyProject *);
-/* ---------------------- PARTIE GRAPHIQUE DES [DE]CHARGEMENTS ---------------------- */
+#define set_current_project(prj) _get_current_study_project(prj)
+#define get_current_project() _get_current_study_project(NULL)
+/* Fournit le gestionnaire des projets connus. */
+GtkRecentManager *get_projects_manager(void);
/* Place un projet au sommet de la pile des projets récents. */
-void push_openida_project_into_recent_list(const openida_project *);
-
-/* Retire un projet de la pile des projets récents. */
-void pop_openida_project_from_recent_list(const openida_project *);
-
-/* Met en place les menus rechargeant les projets récents. */
-void load_recent_openida_projects_list(GObject *, GCallback);
-
-/* Met en place un projet à l'écran. */
-void display_openida_project(const openida_project *, GObject *);
+void push_project_into_recent_list(const GStudyProject *);