/* Chrysalide - Outil d'analyse de fichiers binaires * comment.h - prototypes pour la gestion des commentaires dans du texte * * Copyright (C) 2014 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 . */ #ifndef _ANALYSIS_DB_ITEMS_COMMENT_H #define _ANALYSIS_DB_ITEMS_COMMENT_H #include #include #include #include "../../../arch/vmpa.h" /* Crée la table des commentaires dans une base de données. */ bool create_comment_db_table(sqlite3 *); #define G_TYPE_DB_COMMENT g_db_comment_get_type() #define G_DB_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), g_db_comment_get_type(), GDbComment)) #define G_IS_DB_COMMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), g_db_comment_get_type())) #define G_DB_COMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), G_TYPE_DB_COMMENT, GDbCommentClass)) #define G_IS_DB_COMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), G_TYPE_DB_COMMENT)) #define G_DB_COMMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), G_TYPE_DB_COMMENT, GDbCommentClass)) /* Commentaire à placer dans du texte quelconque (instance) */ typedef struct _GDbComment GDbComment; /* Commentaire à placer dans du texte quelconque (classe) */ typedef struct _GDbCommentClass GDbCommentClass; /* Indique le type défini pour un commentaire à l'intérieur d'une zone de texte. */ GType g_db_comment_get_type(void); /* Crée une définition de commentaire dans une zone de texte. */ GDbComment *g_db_comment_new(const vmpa2t *, const char *, bool); /* Fournit l'adresse associée à un commentaire. */ const vmpa2t *g_db_comment_get_address(GDbComment *); /* Fournit le commentaire associé à un commentaire. */ const char *g_db_comment_get_text(const GDbComment *); /* Définit le commentaire associé à un commentaire. */ void g_db_comment_set_text(GDbComment *, const char *); #endif /* _ANALYSIS_DB_ITEMS_COMMENT_H */