23
23
#ifndef NM_OBJECT_PRIVATE_H
24
24
#define NM_OBJECT_PRIVATE_H
27
#include <glib-object.h>
28
27
#include "nm-object.h"
30
typedef gboolean (*PropChangedMarshalFunc) (NMObject *, GParamSpec *, GValue *, gpointer);
29
void _nm_object_ensure_inited (NMObject *object);
31
typedef gboolean (*PropertyMarshalFunc) (NMObject *, GParamSpec *, GValue *, gpointer);
31
33
typedef GObject * (*NMObjectCreatorFunc) (DBusGConnection *, const char *);
35
PropChangedMarshalFunc func;
37
} NMPropertiesChangedInfo;
40
void _nm_object_handle_properties_changed (NMObject *object,
42
const NMPropertiesChangedInfo *info);
44
void _nm_object_process_properties_changed (NMObject *self, GHashTable *properties);
46
gboolean _nm_object_demarshal_generic (NMObject *object, GParamSpec *pspec, GValue *value, gpointer field);
38
PropertyMarshalFunc func;
43
void _nm_object_register_properties (NMObject *object,
45
const NMPropertiesInfo *info);
47
gboolean _nm_object_reload_properties (NMObject *object, GError **error);
49
void _nm_object_reload_properties_async (NMObject *object,
50
GAsyncReadyCallback callback,
52
gboolean _nm_object_reload_properties_finish (NMObject *object,
56
typedef void (*NMPseudoPropertyChangedFunc) (NMObject *self, NMObject *changed);
57
void _nm_object_register_pseudo_property (NMObject *object,
62
NMPseudoPropertyChangedFunc added_func,
63
NMPseudoPropertyChangedFunc removed_func);
64
void _nm_object_reload_pseudo_property (NMObject *object,
48
67
void _nm_object_queue_notify (NMObject *object, const char *property);
69
void _nm_object_suppress_property_updates (NMObject *object, gboolean suppress);
50
71
/* DBus property accessors */
52
gboolean _nm_object_get_property (NMObject *object,
53
const char *interface,
54
const char *prop_name,
73
void _nm_object_reload_property (NMObject *object,
74
const char *interface,
75
const char *prop_name);
58
77
void _nm_object_set_property (NMObject *object,
59
78
const char *interface,
60
79
const char *prop_name,
63
char *_nm_object_get_string_property (NMObject *object,
64
const char *interface,
65
const char *prop_name,
68
char *_nm_object_get_object_path_property (NMObject *object,
69
const char *interface,
70
const char *prop_name,
73
gint32 _nm_object_get_int_property (NMObject *object,
74
const char *interface,
75
const char *prop_name,
78
guint32 _nm_object_get_uint_property (NMObject *object,
79
const char *interface,
80
const char *prop_name,
83
gboolean _nm_object_get_boolean_property (NMObject *object,
84
const char *interface,
85
const char *prop_name,
88
gint8 _nm_object_get_byte_property (NMObject *object,
89
const char *interface,
90
const char *prop_name,
93
gdouble _nm_object_get_double_property (NMObject *object,
94
const char *interface,
95
const char *prop_name,
98
GByteArray *_nm_object_get_byte_array_property (NMObject *object,
99
const char *interface,
100
const char *prop_name,
103
82
static inline const GPtrArray *
104
83
handle_ptr_array_return (GPtrArray *array)
91
/* object demarshalling support */
92
typedef GType (*NMObjectTypeFunc) (DBusGConnection *, const char *);
93
typedef void (*NMObjectTypeCallbackFunc) (GType, gpointer);
94
typedef void (*NMObjectTypeAsyncFunc) (DBusGConnection *, const char *, NMObjectTypeCallbackFunc, gpointer);
96
void _nm_object_register_type_func (GType base_type, NMObjectTypeFunc type_func,
97
NMObjectTypeAsyncFunc type_async_func);
112
99
#endif /* NM_OBJECT_PRIVATE_H */