File: utility.c

package info (click to toggle)
gobject-introspection 1.84.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 72,336 kB
  • sloc: ansic: 562,269; python: 23,692; xml: 16,240; yacc: 1,711; perl: 1,624; sh: 1,139; lex: 510; cpp: 487; makefile: 182; javascript: 15; lisp: 1
file content (68 lines) | stat: -rw-r--r-- 1,515 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
SPDX-License-Identifier: GPL-2.0-or-later AND LGPL-2.0-or-later AND MIT
SPDX-FileCopyrightText: 2008 Johan Dahlin
SPDX-FileCopyrightText: 2009 Andreas Rottmann <a.rottmann@gmx.at>
*/

#include "utility.h"

G_DEFINE_TYPE (UtilityObject, utility_object, G_TYPE_OBJECT);

/**
 * UtilityBuffer:
 * @data: (type gpointer): the data
 *
 **/

static void
utility_object_finalize (GObject *gobj)
{
  UtilityObject *self = UTILITY_OBJECT(gobj);
  if (self->destroy_notify)
    self->destroy_notify(self->user_data);
  G_OBJECT_CLASS(utility_object_parent_class)->finalize(gobj);
}

static void
utility_object_class_init (UtilityObjectClass *klass G_GNUC_UNUSED)
{
  G_OBJECT_CLASS(klass)->finalize = utility_object_finalize;
}

static void
utility_object_init (UtilityObject *object G_GNUC_UNUSED)
{
}

/**
 * utility_object_watch_dir:
 * @object:
 * @path:
 * @func: (destroy destroy):
 * @user_data:
 * @destroy:
 */
void
utility_object_watch_dir (UtilityObject *object,
                          const char *path G_GNUC_UNUSED,
                          UtilityFileFunc func G_GNUC_UNUSED,
                          gpointer user_data,
                          GDestroyNotify destroy)
{
  object->user_data = user_data;
  object->destroy_notify = destroy;
}

/**
 * utility_dir_foreach:
 * @path:
 * @func: (scope call):
 * @user_data:
 *
 */
void
utility_dir_foreach (const char *path G_GNUC_UNUSED,
                     UtilityFileFunc func G_GNUC_UNUSED,
                     gpointer user_data G_GNUC_UNUSED)
{
}