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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
#ifndef NM_OBJECT_H
#define NM_OBJECT_H
#include <glib/gtypes.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
G_BEGIN_DECLS
#define NM_TYPE_OBJECT (nm_object_get_type ())
#define NM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_OBJECT, NMObject))
#define NM_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_OBJECT, NMObjectClass))
#define NM_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_OBJECT))
#define NM_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_OBJECT))
#define NM_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_OBJECT, NMObjectClass))
#define NM_OBJECT_CONNECTION "connection"
#define NM_OBJECT_PATH "path"
typedef struct {
GObject parent;
} NMObject;
typedef struct {
GObjectClass parent;
} NMObjectClass;
GType nm_object_get_type (void);
DBusGConnection *nm_object_get_connection (NMObject *object);
const char *nm_object_get_path (NMObject *object);
void nm_object_handle_properties_changed (NMObject *object,
DBusGProxy *proxy);
/* DBus property accessors */
gboolean nm_object_get_property (NMObject *object,
const char *interface,
const char *prop_name,
GValue *value);
void nm_object_set_property (NMObject *object,
const char *interface,
const char *prop_name,
GValue *value);
char *nm_object_get_string_property (NMObject *object,
const char *interface,
const char *prop_name);
char *nm_object_get_object_path_property (NMObject *object,
const char *interface,
const char *prop_name);
gint32 nm_object_get_int_property (NMObject *object,
const char *interface,
const char *prop_name);
guint32 nm_object_get_uint_property (NMObject *object,
const char *interface,
const char *prop_name);
gboolean nm_object_get_boolean_property (NMObject *object,
const char *interface,
const char *prop_name);
gint8 nm_object_get_byte_property (NMObject *object,
const char *interface,
const char *prop_name);
gdouble nm_object_get_double_property (NMObject *object,
const char *interface,
const char *prop_name);
GByteArray *nm_object_get_byte_array_property (NMObject *object,
const char *interface,
const char *prop_name);
G_END_DECLS
#endif /* NM_OBJECT_H */
|