Mercurial > pidgin
comparison src/dbus-server.h @ 14035:8bda65b88e49
[gaim-migrate @ 16638]
A bunch of small changes. Mostly remove "if not null" checks before
calling g_free, g_list_free, g_slist_free and g_strdup. Also use
g_list_foreach() to call g_free to free strings in an array. And
some whitespace changes here and there.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 05 Aug 2006 08:27:39 +0000 |
parents | f61428cc4019 |
children |
comparison
equal
deleted
inserted
replaced
14034:0839a7b71325 | 14035:8bda65b88e49 |
---|---|
30 #include "value.h" | 30 #include "value.h" |
31 | 31 |
32 | 32 |
33 G_BEGIN_DECLS | 33 G_BEGIN_DECLS |
34 | 34 |
35 /** | 35 /** |
36 Types of pointers are identified by the ADDRESS of a GaimDbusType | 36 Types of pointers are identified by the ADDRESS of a GaimDbusType |
37 object. This way, plugins can easily access types defined in gaim | 37 object. This way, plugins can easily access types defined in gaim |
38 proper as well as introduce their own types that will not conflict | 38 proper as well as introduce their own types that will not conflict |
39 with those introduced by other plugins. | 39 with those introduced by other plugins. |
40 | 40 |
41 The structure GaimDbusType has only one element (GaimDBusType::parent), a | 41 The structure GaimDbusType has only one element (GaimDBusType::parent), a |
42 contains a pointer to the parent type, or @c NULL if the type has no | 42 contains a pointer to the parent type, or @c NULL if the type has no |
43 parent. Parent means the same as the base class in object oriented | 43 parent. Parent means the same as the base class in object oriented |
44 programming. | 44 programming. |
45 */ | 45 */ |
46 | 46 |
47 typedef struct _GaimDBusType GaimDBusType; | 47 typedef struct _GaimDBusType GaimDBusType; |
48 | 48 |
49 struct _GaimDBusType { | 49 struct _GaimDBusType { |
96 back. | 96 back. |
97 | 97 |
98 In order for an object to participate in the scheme, it must | 98 In order for an object to participate in the scheme, it must |
99 register itself and its type with the engine. This registration | 99 register itself and its type with the engine. This registration |
100 allocates an integer id which can be resolved to the pointer and | 100 allocates an integer id which can be resolved to the pointer and |
101 back. | 101 back. |
102 | 102 |
103 Handles are not persistent. They are reissued every time gaim is | 103 Handles are not persistent. They are reissued every time gaim is |
104 started. This is not good; external applications that use gaim | 104 started. This is not good; external applications that use gaim |
105 should work even whether gaim was restarted in the middle of the | 105 should work even whether gaim was restarted in the middle of the |
106 interaction. | 106 interaction. |
107 | 107 |
108 Pointer registration is only a temporary solution. When GaimBuddy | 108 Pointer registration is only a temporary solution. When GaimBuddy |
109 and similar structures have been converted into gobjects, this | 109 and similar structures have been converted into gobjects, this |
110 registration will be done automatically by objects themselves. | 110 registration will be done automatically by objects themselves. |
111 | 111 |
112 By the way, this kind of object-handle translation should be so | 112 By the way, this kind of object-handle translation should be so |
113 common that there must be a library (maybe even glib) that | 113 common that there must be a library (maybe even glib) that |
114 implements it. I feel a bit like reinventing the wheel here. | 114 implements it. I feel a bit like reinventing the wheel here. |
115 */ | 115 */ |
116 void gaim_dbus_init_ids(void); | 116 void gaim_dbus_init_ids(void); |
117 | 117 |
118 /** | 118 /** |
119 Registers a typed pointer. | 119 Registers a typed pointer. |
120 | 120 |
121 @param node The pointer to register. | 121 @param node The pointer to register. |
122 @param type Type of that pointer. | 122 @param type Type of that pointer. |
123 */ | 123 */ |
124 void gaim_dbus_register_pointer(gpointer node, GaimDBusType *type); | 124 void gaim_dbus_register_pointer(gpointer node, GaimDBusType *type); |
125 | 125 |
126 /** | 126 /** |
127 Unregisters a pointer previously registered with | 127 Unregisters a pointer previously registered with |
128 gaim_dbus_register_pointer. | 128 gaim_dbus_register_pointer. |
129 | 129 |
130 @param node The pointer to register. | 130 @param node The pointer to register. |
131 */ | 131 */ |
140 @param num_values The number of parameters. | 140 @param num_values The number of parameters. |
141 @param values Array of pointers to #GaimValue objects representing | 141 @param values Array of pointers to #GaimValue objects representing |
142 the types of the parameters. | 142 the types of the parameters. |
143 @param vargs A va_list containing the actual parameters. | 143 @param vargs A va_list containing the actual parameters. |
144 */ | 144 */ |
145 void gaim_dbus_signal_emit_gaim(const char *name, int num_values, | 145 void gaim_dbus_signal_emit_gaim(const char *name, int num_values, |
146 GaimValue **values, va_list vargs); | 146 GaimValue **values, va_list vargs); |
147 | 147 |
148 /** | 148 /** |
149 * Returns whether Gaim's D-BUS subsystem is up and running. If it's | 149 * Returns whether Gaim's D-BUS subsystem is up and running. If it's |
150 * NOT running then gaim_dbus_dispatch_init() failed for some reason, | 150 * NOT running then gaim_dbus_dispatch_init() failed for some reason, |
189 | 189 |
190 */ | 190 */ |
191 | 191 |
192 #define DBUS_EXPORT | 192 #define DBUS_EXPORT |
193 | 193 |
194 /* | 194 /* |
195 Here we include the list of #GAIM_DBUS_DECLARE_TYPE statements for | 195 Here we include the list of #GAIM_DBUS_DECLARE_TYPE statements for |
196 all structs defined in gaim. This file has been generated by the | 196 all structs defined in gaim. This file has been generated by the |
197 #dbus-analize-types.py script. | 197 #dbus-analize-types.py script. |
198 */ | 198 */ |
199 | 199 |