summaryrefslogtreecommitdiff
path: root/src/lib/eldbus/eldbus_freedesktop.h
diff options
context:
space:
mode:
authorPierre Le Magourou <pierre.lemagourou@openwide.fr>2014-10-20 11:13:00 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-10-20 18:32:28 +0200
commit11b875b6ce43d8d2f95f040e7abe906f44a63cef (patch)
tree9acd2c0d397cb303d098b52a9ceabdc35338c138 /src/lib/eldbus/eldbus_freedesktop.h
parent163773ff9f3af5d57273943a50d19cec9c02ea0e (diff)
eldbus: update missing eldbus_freedesktop.h API documentation.
Diffstat (limited to 'src/lib/eldbus/eldbus_freedesktop.h')
-rw-r--r--src/lib/eldbus/eldbus_freedesktop.h183
1 files changed, 182 insertions, 1 deletions
diff --git a/src/lib/eldbus/eldbus_freedesktop.h b/src/lib/eldbus/eldbus_freedesktop.h
index 8a66b06..1b2901c 100644
--- a/src/lib/eldbus/eldbus_freedesktop.h
+++ b/src/lib/eldbus/eldbus_freedesktop.h
@@ -17,6 +17,16 @@
17#define ELDBUS_NAME_REQUEST_REPLY_EXISTS 3 /**< Service is already in the queue */ 17#define ELDBUS_NAME_REQUEST_REPLY_EXISTS 3 /**< Service is already in the queue */
18#define ELDBUS_NAME_REQUEST_REPLY_ALREADY_OWNER 4 /**< Service is already the primary owner */ 18#define ELDBUS_NAME_REQUEST_REPLY_ALREADY_OWNER 4 /**< Service is already the primary owner */
19 19
20/**
21 * Send a "RequestName" method call in proxy.
22 *
23 * @param conn Connection object.
24 * @param bus Name of the bus
25 * @param flags Parameter of the "RequestName" method.
26 * @param cb Callback to call when receiving answer.
27 * @param cb_data Data passed to callback.
28 * @return The Eldbus_Pending corresponding to the message sent.
29 */
20EAPI Eldbus_Pending *eldbus_name_request(Eldbus_Connection *conn, const char *bus, unsigned int flags, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1, 2); 30EAPI Eldbus_Pending *eldbus_name_request(Eldbus_Connection *conn, const char *bus, unsigned int flags, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1, 2);
21 31
22/* Replies to releasing a name */ 32/* Replies to releasing a name */
@@ -24,19 +34,90 @@ EAPI Eldbus_Pending *eldbus_name_request(Eldbus_Connection *conn, const char *bu
24#define ELDBUS_NAME_RELEASE_REPLY_NON_EXISTENT 2 /**< The given name does not exist on the bus */ 34#define ELDBUS_NAME_RELEASE_REPLY_NON_EXISTENT 2 /**< The given name does not exist on the bus */
25#define ELDBUS_NAME_RELEASE_REPLY_NOT_OWNER 3 /**< Service is not an owner of the given name */ 35#define ELDBUS_NAME_RELEASE_REPLY_NOT_OWNER 3 /**< Service is not an owner of the given name */
26 36
37/**
38 * Send a "ReleaseName" method call in proxy.
39 *
40 * @param conn Connection object.
41 * @param bus Name of the bus
42 * @param cb Callback to call when receiving answer.
43 * @param cb_data Data passed to callback.
44 * @return The Eldbus_Pending corresponding to the message sent.
45 */
27EAPI Eldbus_Pending *eldbus_name_release(Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1, 2); 46EAPI Eldbus_Pending *eldbus_name_release(Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1, 2);
47
48/**
49 * Send a "GetNameOwner" method call in proxy.
50 *
51 * @param conn Connection object.
52 * @param bus Name of the bus
53 * @param cb Callback to call when receiving answer.
54 * @param cb_data Data passed to callback.
55 * @return The Eldbus_Pending corresponding to the message sent.
56 */
28EAPI Eldbus_Pending *eldbus_name_owner_get(Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1, 2); 57EAPI Eldbus_Pending *eldbus_name_owner_get(Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1, 2);
58
59/**
60 * Send a "NameHasOwner" method call in proxy.
61 *
62 * @param conn Connection object.
63 * @param bus Name of the bus
64 * @param cb Callback to call when receiving answer.
65 * @param cb_data Data passed to callback.
66 * @return The Eldbus_Pending corresponding to the message sent.
67 */
29EAPI Eldbus_Pending *eldbus_name_owner_has(Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data); 68EAPI Eldbus_Pending *eldbus_name_owner_has(Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data);
69
70/**
71 * Send a "ListNames" method call in proxy.
72 *
73 * @param conn Connection object.
74 * @param cb Callback to call when receiving answer.
75 * @param cb_data Data passed to callback.
76 * @return The Eldbus_Pending corresponding to the message sent.
77 */
30EAPI Eldbus_Pending *eldbus_names_list(Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1); 78EAPI Eldbus_Pending *eldbus_names_list(Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1);
79
80/**
81 * Send a "ListActivatableNames" method call in proxy.
82 *
83 * @param conn Connection object.
84 * @param cb Callback to call when receiving answer.
85 * @param cb_data Data passed to callback.
86 * @return The Eldbus_Pending corresponding to the message sent.
87 */
31EAPI Eldbus_Pending *eldbus_names_activatable_list(Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1); 88EAPI Eldbus_Pending *eldbus_names_activatable_list(Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1);
89
90/**
91 * Send a "Hello" method call in proxy.
92 *
93 * @param conn Connection object.
94 * @param cb Callback to call when receiving answer.
95 * @param cb_data Data passed to callback.
96 * @return The Eldbus_Pending corresponding to the message sent.
97 */
32EAPI Eldbus_Pending *eldbus_hello(Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1); 98EAPI Eldbus_Pending *eldbus_hello(Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1);
33 99
34/* Replies to service starts */ 100/* Replies to service starts */
35#define ELDBUS_NAME_START_REPLY_SUCCESS 1 /**< Service was auto started */ 101#define ELDBUS_NAME_START_REPLY_SUCCESS 1 /**< Service was auto started */
36#define ELDBUS_NAME_START_REPLY_ALREADY_RUNNING 2 /**< Service was already running */ 102#define ELDBUS_NAME_START_REPLY_ALREADY_RUNNING 2 /**< Service was already running */
37 103
104/**
105 * Send a "StartServiceByName" method call in proxy.
106 *
107 * @param conn Connection object.
108 * @param bus Name of the bus.
109 * @param flags Parameter of the "StartServiceByName" method.
110 * @param cb Callback to call when receiving answer.
111 * @param cb_data Data passed to callback.
112 * @return The Eldbus_Pending corresponding to the message sent.
113 */
38EAPI Eldbus_Pending *eldbus_name_start(Eldbus_Connection *conn, const char *bus, unsigned int flags, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1, 2); 114EAPI Eldbus_Pending *eldbus_name_start(Eldbus_Connection *conn, const char *bus, unsigned int flags, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1, 2);
39 115
116/**
117 * @typedef Eldbus_Name_Owner_Changed_Cb
118 *
119 * Callback called when unique id of a bus name changed.
120 */
40typedef void (*Eldbus_Name_Owner_Changed_Cb)(void *data, const char *bus, const char *old_id, const char *new_id); 121typedef void (*Eldbus_Name_Owner_Changed_Cb)(void *data, const char *bus, const char *old_id, const char *new_id);
41 122
42/** 123/**
@@ -70,7 +151,25 @@ EAPI void eldbus_name_owner_changed_callback_del(Eldbus_Connect
70 * 151 *
71 * @{ 152 * @{
72 */ 153 */
154
155/**
156 * Call the method "Ping" on the eldbus object.
157 *
158 * @param obj Eldbus object.
159 * @param cb Callback called when receiving an answer.
160 * @param data Data passed to the callback.
161 * @return The Eldbus_Pending corresponding to the message sent.
162 */
73EAPI Eldbus_Pending *eldbus_object_peer_ping(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2); 163EAPI Eldbus_Pending *eldbus_object_peer_ping(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
164
165/**
166 * Call the method "GetMachineId" on the eldbus object.
167 *
168 * @param obj Eldbus object.
169 * @param cb Callback called when receiving an answer.
170 * @param data Data passed to the callback.
171 * @return The Eldbus_Pending corresponding to the message sent.
172 */
74EAPI Eldbus_Pending *eldbus_object_peer_machine_id_get(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2); 173EAPI Eldbus_Pending *eldbus_object_peer_machine_id_get(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
75 174
76/** 175/**
@@ -82,6 +181,15 @@ EAPI Eldbus_Pending *eldbus_object_peer_machine_id_get(Eldbus_Object *obj
82 * 181 *
83 * @{ 182 * @{
84 */ 183 */
184
185/**
186 * Call the method "Introspect" on the eldbus object.
187 *
188 * @param obj Eldbus object.
189 * @param cb Callback called when receiving an answer.
190 * @param data Data passed to the callback.
191 * @return The Eldbus_Pending corresponding to the message sent.
192 */
85EAPI Eldbus_Pending *eldbus_object_introspect(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2); 193EAPI Eldbus_Pending *eldbus_object_introspect(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
86/** 194/**
87 * @} 195 * @}
@@ -107,24 +215,72 @@ EAPI Eldbus_Pending *eldbus_object_introspect(Eldbus_Object *obj, Eldbus_
107 */ 215 */
108EAPI Eina_Bool eldbus_proxy_properties_monitor(Eldbus_Proxy *proxy, Eina_Bool enable) EINA_ARG_NONNULL(1); 216EAPI Eina_Bool eldbus_proxy_properties_monitor(Eldbus_Proxy *proxy, Eina_Bool enable) EINA_ARG_NONNULL(1);
109 217
218/**
219 * Get a property.
220 *
221 * @param proxy The proxy object on which to do the query.
222 * @param name The property name to get.
223 * @param cb The callback to be called when receiving an answer.
224 * @param data Data to be passed to the callback.
225 * @return Eldbus_Pending object corresponding to the message sent.
226 */
110EAPI Eldbus_Pending *eldbus_proxy_property_get(Eldbus_Proxy *proxy, const char *name, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2, 3); 227EAPI Eldbus_Pending *eldbus_proxy_property_get(Eldbus_Proxy *proxy, const char *name, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2, 3);
228
229/**
230 * Set a property.
231 *
232 * @param proxy The proxy object on which to do the query.
233 * @param name The property name to get.
234 * @param sig
235 * @param value The value to set.
236 * @param cb The callback to be called when receiving an answer.
237 * @param data Data to be passed to the callback.
238 * @return Eldbus_Pending object corresponding to the message sent.
239 */
111EAPI Eldbus_Pending *eldbus_proxy_property_set(Eldbus_Proxy *proxy, const char *name, const char *sig, const void *value, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2, 3, 4); 240EAPI Eldbus_Pending *eldbus_proxy_property_set(Eldbus_Proxy *proxy, const char *name, const char *sig, const void *value, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2, 3, 4);
241
242/**
243 * Get all properties.
244 *
245 * @param proxy The proxy object on which to do the query.
246 * @param cb The callback to be called when receiving an answer.
247 * @param data Data to be passed to the callback.
248 * @return Eldbus_Pending object corresponding to the message sent.
249 */
112EAPI Eldbus_Pending *eldbus_proxy_property_get_all(Eldbus_Proxy *proxy, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2); 250EAPI Eldbus_Pending *eldbus_proxy_property_get_all(Eldbus_Proxy *proxy, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
251
252/**
253 * Register a callback on "PropertiesChanged" signal.
254 *
255 * @param proxy The proxy object on which to register the callback.
256 * @param cb The callback to be called when receiving the signal.
257 * @param data Data to be passed to the callback.
258 * @return Eldbus_Signal_Handler object representing a listener for "PropertiesChanged" signal.
259 */
113EAPI Eldbus_Signal_Handler *eldbus_proxy_properties_changed_callback_add(Eldbus_Proxy *proxy, Eldbus_Signal_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2); 260EAPI Eldbus_Signal_Handler *eldbus_proxy_properties_changed_callback_add(Eldbus_Proxy *proxy, Eldbus_Signal_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
114 261
115/** 262/**
116 * Return the cached value of property. 263 * Return the cached value of property.
264 *
117 * This only work if you have enable eldbus_proxy_properties_monitor or 265 * This only work if you have enable eldbus_proxy_properties_monitor or
118 * if you have call eldbus_proxy_event_callback_add of type 266 * if you have call eldbus_proxy_event_callback_add of type
119 * ELDBUS_PROXY_EVENT_PROPERTY_CHANGED and the property you want had changed. 267 * ELDBUS_PROXY_EVENT_PROPERTY_CHANGED and the property you want had changed.
268 *
269 * @param proxy The proxy object on which to do the query.
270 * @param name The property name to get.
271 * @return Cached value of property.
120 */ 272 */
121EAPI Eina_Value *eldbus_proxy_property_local_get(Eldbus_Proxy *proxy, const char *name) EINA_ARG_NONNULL(1, 2); 273EAPI Eina_Value *eldbus_proxy_property_local_get(Eldbus_Proxy *proxy, const char *name) EINA_ARG_NONNULL(1, 2);
122 274
123/** 275/**
124 * Return a Eina_Hash with all cached properties. 276 * Get all cached properties.
277 *
125 * This only work if you have enable eldbus_proxy_properties_monitor or 278 * This only work if you have enable eldbus_proxy_properties_monitor or
126 * if you have call eldbus_proxy_event_callback_add of type 279 * if you have call eldbus_proxy_event_callback_add of type
127 * ELDBUS_PROXY_EVENT_PROPERTY_CHANGED. 280 * ELDBUS_PROXY_EVENT_PROPERTY_CHANGED.
281 *
282 * @param proxy The proxy object on which to do the query.
283 * @return A Eina_Hash with all cached properties
128 */ 284 */
129EAPI const Eina_Hash *eldbus_proxy_property_local_get_all(Eldbus_Proxy *proxy) EINA_ARG_NONNULL(1); 285EAPI const Eina_Hash *eldbus_proxy_property_local_get_all(Eldbus_Proxy *proxy) EINA_ARG_NONNULL(1);
130 286
@@ -137,10 +293,35 @@ EAPI const Eina_Hash *eldbus_proxy_property_local_get_all(Eldbus_Proxy *pro
137 * @{ 293 * @{
138 */ 294 */
139 295
296/**
297 * Call the method "GetManagedObjects" on the eldbus object.
298 *
299 * @param obj A Eldbus object.
300 * @param cb The callback to call when receiving an answer.
301 * @param data The data to pass to the callback.
302 *
303 * @return A Eldbus_Pending object corresponding to the message sent.
304 */
140EAPI Eldbus_Pending *eldbus_object_managed_objects_get(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2); 305EAPI Eldbus_Pending *eldbus_object_managed_objects_get(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
141 306
307/**
308 * Register a callback on "InterfacesAdded" signal.
309 *
310 * @param obj The Eldbus object on which to register the callback.
311 * @param cb The callback to be called when receiving the signal.
312 * @param cb_data Data to be passed to the callback.
313 * @return Eldbus_Signal_Handler object representing a listener for "InterfacesAdded" signal.
314 */
142EAPI Eldbus_Signal_Handler *eldbus_object_manager_interfaces_added(Eldbus_Object *obj, Eldbus_Signal_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1); 315EAPI Eldbus_Signal_Handler *eldbus_object_manager_interfaces_added(Eldbus_Object *obj, Eldbus_Signal_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1);
143 316
317/**
318 * Register a callback on "InterfacesRemoved" signal.
319 *
320 * @param obj The Eldbus object on which to register the callback.
321 * @param cb The callback to be called when receiving the signal.
322 * @param cb_data Data to be passed to the callback.
323 * @return Eldbus_Signal_Handler object representing a listener for "InterfacesRemoved" signal.
324 */
144EAPI Eldbus_Signal_Handler *eldbus_object_manager_interfaces_removed(Eldbus_Object *obj, Eldbus_Signal_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1); 325EAPI Eldbus_Signal_Handler *eldbus_object_manager_interfaces_removed(Eldbus_Object *obj, Eldbus_Signal_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1);
145 326
146/** 327/**