diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-01-30 06:59:35 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-01-30 06:59:35 (GMT) |
commit | db3b204dd7a71b2f74a4e69b2159a96e3ab66614 (patch) | |
tree | 34174311b7ac504f03a10a889ada7f28db7a06c0 /src/analysis/scan/func.c | |
parent | 34ee1bfca78e8423cfa29329fdc756569d6b1960 (diff) |
Save an initial version of rost.
Diffstat (limited to 'src/analysis/scan/func.c')
-rw-r--r-- | src/analysis/scan/func.c | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/src/analysis/scan/func.c b/src/analysis/scan/func.c new file mode 100644 index 0000000..b839d1d --- /dev/null +++ b/src/analysis/scan/func.c @@ -0,0 +1,126 @@ + +/* Chrysalide - Outil d'analyse de fichiers binaires + * func.c - définition d'une fonction ciblant une propriété pendant un scan + * + * Copyright (C) 2022 Cyrille Bagard + * + * This file is part of Chrysalide. + * + * Chrysalide 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. + * + * Chrysalide 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/>. + */ + + +#include "func.h" + + +#include "func-int.h" + + + +/* Initialise la classe des fonctions de support pour scan. */ +static void g_scan_function_class_init(GScanFunctionClass *); + +/* Initialise une instance de fonction de support pour scan. */ +static void g_scan_function_init(GScanFunction *); + +/* Supprime toutes les références externes. */ +static void g_scan_function_dispose(GScanFunction *); + +/* Procède à la libération totale de la mémoire. */ +static void g_scan_function_finalize(GScanFunction *); + + + +/* Indique le type défini pour une définition de fonction de scan. */ +G_DEFINE_TYPE(GScanFunction, g_scan_function, G_TYPE_REGISTERED_ITEM); + + +/****************************************************************************** +* * +* Paramètres : klass = classe à initialiser. * +* * +* Description : Initialise la classe des fonctions de support pour scan. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_scan_function_class_init(GScanFunctionClass *klass) +{ + GObjectClass *object; /* Autre version de la classe */ + + object = G_OBJECT_CLASS(klass); + + object->dispose = (GObjectFinalizeFunc/* ! */)g_scan_function_dispose; + object->finalize = (GObjectFinalizeFunc)g_scan_function_finalize; + +} + + +/****************************************************************************** +* * +* Paramètres : func = instance à initialiser. * +* * +* Description : Initialise une instance de fonction de support pour scan. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_scan_function_init(GScanFunction *func) +{ + +} + + +/****************************************************************************** +* * +* Paramètres : func = instance d'objet GLib à traiter. * +* * +* Description : Supprime toutes les références externes. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_scan_function_dispose(GScanFunction *func) +{ + G_OBJECT_CLASS(g_scan_function_parent_class)->dispose(G_OBJECT(func)); + +} + + +/****************************************************************************** +* * +* Paramètres : func = instance d'objet GLib à traiter. * +* * +* Description : Procède à la libération totale de la mémoire. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_scan_function_finalize(GScanFunction *func) +{ + G_OBJECT_CLASS(g_scan_function_parent_class)->finalize(G_OBJECT(func)); + +} |