| 1 |
/* |
| 2 |
SPDX-License-Identifier: GPL-2.0-or-later AND LGPL-2.0-or-later AND MIT |
| 3 |
SPDX-FileCopyrightText: 2008 Johan Dahlin |
| 4 |
SPDX-FileCopyrightText: 2009 Andreas Rottmann <[email protected]> |
| 5 |
*/ |
| 6 |
|
| 7 |
#include "utility.h" |
| 8 |
|
| 9 |
G_DEFINE_TYPE (UtilityObject, utility_object, G_TYPE_OBJECT); |
| 10 |
|
| 11 |
/** |
| 12 |
* UtilityBuffer: |
| 13 |
* @data: (type gpointer): the data |
| 14 |
* |
| 15 |
**/ |
| 16 |
|
| 17 |
static void |
| 18 |
utility_object_finalize (GObject *gobj) |
| 19 |
{ |
| 20 |
UtilityObject *self = UTILITY_OBJECT(gobj); |
| 21 |
if (self->destroy_notify) |
| 22 |
self->destroy_notify(self->user_data); |
| 23 |
G_OBJECT_CLASS(utility_object_parent_class)->finalize(gobj); |
| 24 |
} |
| 25 |
|
| 26 |
static void |
| 27 |
utility_object_class_init (UtilityObjectClass *klass G_GNUC_UNUSED) |
| 28 |
{ |
| 29 |
G_OBJECT_CLASS(klass)->finalize = utility_object_finalize; |
| 30 |
} |
| 31 |
|
| 32 |
static void |
| 33 |
utility_object_init (UtilityObject *object G_GNUC_UNUSED) |
| 34 |
{ |
| 35 |
} |
| 36 |
|
| 37 |
/** |
| 38 |
* utility_object_watch_dir: |
| 39 |
* @object: |
| 40 |
* @path: |
| 41 |
* @func: (destroy destroy): |
| 42 |
* @user_data: |
| 43 |
* @destroy: |
| 44 |
*/ |
| 45 |
void |
| 46 |
utility_object_watch_dir (UtilityObject *object, |
| 47 |
const char *path G_GNUC_UNUSED, |
| 48 |
UtilityFileFunc func G_GNUC_UNUSED, |
| 49 |
gpointer user_data, |
| 50 |
GDestroyNotify destroy) |
| 51 |
{ |
| 52 |
object->user_data = user_data; |
| 53 |
object->destroy_notify = destroy; |
| 54 |
} |
| 55 |
|
| 56 |
/** |
| 57 |
* utility_dir_foreach: |
| 58 |
* @path: |
| 59 |
* @func: (scope call): |
| 60 |
* @user_data: |
| 61 |
* |
| 62 |
*/ |
| 63 |
void |
| 64 |
utility_dir_foreach (const char *path G_GNUC_UNUSED, |
| 65 |
UtilityFileFunc func G_GNUC_UNUSED, |
| 66 |
gpointer user_data G_GNUC_UNUSED) |
| 67 |
{ |
| 68 |
} |