diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-06-21 22:26:13 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-06-21 22:26:13 (GMT) |
commit | d49b837c891e0490167b51c4a9811cb2e8276588 (patch) | |
tree | 9bc499f2d7077a0e715b88c8c71dca1691b6c1df /src/glibext/work-int.h | |
parent | fde070b3d2392333fffec6ac6eff3647dacd8b80 (diff) |
Restore and improve work queues.
Diffstat (limited to 'src/glibext/work-int.h')
-rw-r--r-- | src/glibext/work-int.h | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/src/glibext/work-int.h b/src/glibext/work-int.h index 4f84e86..58293e5 100644 --- a/src/glibext/work-int.h +++ b/src/glibext/work-int.h @@ -1,8 +1,8 @@ /* Chrysalide - Outil d'analyse de fichiers binaires - * delayed-int.h - définitions internes pour la gestion des travaux différés + * work-int.h - définitions internes pour la gestion des travaux différés * - * Copyright (C) 2009-2018 Cyrille Bagard + * Copyright (C) 2009-2024 Cyrille Bagard * * This file is part of Chrysalide. * @@ -21,27 +21,26 @@ */ -#ifndef _GLIBEXT_DELAYED_INT_H -#define _GLIBEXT_DELAYED_INT_H +#ifndef _GLIBEXT_WORK_INT_H +#define _GLIBEXT_WORK_INT_H -#include "delayed.h" +#include "work.h" -#include "notifier.h" -#include "../common/dllist.h" +#include <stdbool.h> +#include "../common/dllist.h" -/* -------------------------- TACHE DIFFEREE DANS LE TEMPS -------------------------- */ /* Traite un travail programmé. */ -typedef void (* run_task_fc) (GDelayedWork *, GtkStatusStack *); +typedef void (* run_work_fc) (GGenericWork *); /* Travail différé (instance) */ -struct _GDelayedWork +struct _GGenericWork { GObject parent; /* A laisser en premier */ @@ -54,22 +53,18 @@ struct _GDelayedWork }; /* Travail différé (classe) */ -struct _GDelayedWorkClass +struct _GGenericWorkClass { GObjectClass parent; /* A laisser en premier */ - run_task_fc run; /* Traitement externalisé */ + run_work_fc run; /* Traitement externalisé */ /* Signaux */ - void (* work_completed) (GDelayedWork *); + void (* work_completed) (GGenericWork *); }; -#define delayed_work_list_add_tail(new, head) dl_list_add_tail(new, head, GDelayedWork, link) -#define delayed_work_list_del(item, head) dl_list_del(item, head, GDelayedWork, link) - - -#endif /* _GLIBEXT_DELAYED_INT_H */ +#endif /* _GLIBEXT_WORK_INT_H */ |