summaryrefslogtreecommitdiff
path: root/src/lib/eldbus/eldbus_freedesktop.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2013-04-23 11:40:05 -0300
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2013-04-23 12:36:29 -0300
commit4e3804041f8e865e007b2a6a0d45a05f39500c3b (patch)
treea493b9c8f8a610d2667651f3ba81819ed16fbe8c /src/lib/eldbus/eldbus_freedesktop.h
parent4cf68bf728b5a858ce1c0efac25ded1a49ba8d9d (diff)
Rename edbus->eldbus
git grep -l edbus2 | while read f; do sed -i 's/edbus2/eldbus/g' "$f"; done find . -name '*edbus2*' -exec rename edbus2 eldbus {} \; git grep -l "EDBUS" | while read f; do sed -i 's/EDBUS/ELDBUS/g' "$f"; done git grep -l "EDBus" | while read f; do sed -i 's/EDBus/Eldbus/g' "$f"; done git grep -l "edbus (v2)" | while read f; do sed -i 's/edbus (v2)/eldbus/g' "$f"; done git grep -l "Edbus" | while read f; do sed -i 's/Edbus/Eldbus/g' "$f"; done git grep -l "edbus" | while read f; do sed -i 's/edbus/eldbus/g' "$f"; done find . -name '*edbus*' -exec rename edbus eldbus {} \; find . -name '*EDBus*' -exec rename EDBus Eldbus {} \;
Diffstat (limited to 'src/lib/eldbus/eldbus_freedesktop.h')
-rw-r--r--src/lib/eldbus/eldbus_freedesktop.h143
1 files changed, 143 insertions, 0 deletions
diff --git a/src/lib/eldbus/eldbus_freedesktop.h b/src/lib/eldbus/eldbus_freedesktop.h
new file mode 100644
index 0000000..e3903ef
--- /dev/null
+++ b/src/lib/eldbus/eldbus_freedesktop.h
@@ -0,0 +1,143 @@
1#ifndef ELDBUS_FREEDESKTOP_H
2#define ELDBUS_FREEDESKTOP_H 1
3
4/**
5 * @defgroup Eldbus_Basic Basic FreeDesktop.Org Methods
6 * @ingroup Eldbus
7 *
8 * @{
9 */
10#define ELDBUS_NAME_REQUEST_FLAG_ALLOW_REPLACEMENT 0x1 /**< Allow another service to become the primary owner if requested */
11#define ELDBUS_NAME_REQUEST_FLAG_REPLACE_EXISTING 0x2 /**< Request to replace the current primary owner */
12#define ELDBUS_NAME_REQUEST_FLAG_DO_NOT_QUEUE 0x4 /**< If we can not become the primary owner do not place us in the queue */
13
14/* Replies to request for a name */
15#define ELDBUS_NAME_REQUEST_REPLY_PRIMARY_OWNER 1 /**< Service has become the primary owner of the requested name */
16#define ELDBUS_NAME_REQUEST_REPLY_IN_QUEUE 2 /**< Service could not become the primary owner and has been placed 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 */
19
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);
21
22/* Replies to releasing a name */
23#define ELDBUS_NAME_RELEASE_REPLY_RELEASED 1 /**< Service was released from the given name */
24#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 */
26
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);
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);
29EAPI Eldbus_Pending *eldbus_name_owner_has(Eldbus_Connection *conn, const char *bus, Eldbus_Message_Cb cb, const void *cb_data);
30EAPI Eldbus_Pending *eldbus_names_list(Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1);
31EAPI Eldbus_Pending *eldbus_names_activatable_list(Eldbus_Connection *conn, Eldbus_Message_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1);
32
33/* Replies to service starts */
34#define ELDBUS_NAME_START_REPLY_SUCCESS 1 /**< Service was auto started */
35#define ELDBUS_NAME_START_REPLY_ALREADY_RUNNING 2 /**< Service was already running */
36
37EAPI 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);
38
39typedef void (*Eldbus_Name_Owner_Changed_Cb)(void *data, const char *bus, const char *old_id, const char *new_id);
40
41/**
42 * Add a callback to be called when unique id of a bus name changed.
43 *
44 * This function implicitly calls eldbus_name_owner_get() in order to be able to
45 * monitor the name. If the only interest is to receive notifications when the
46 * name in fact changes, pass EINA_FALSE to @param allow_initial_call so your
47 * callback will not be called on first retrieval of name owner. If the
48 * initial state is important, pass EINA_TRUE to this parameter.
49 *
50 * @param conn connection
51 * @param bus name of bus
52 * @param cb callback
53 * @param cb_data context data
54 * @param allow_initial_call allow call callback with actual id of the bus
55 */
56EAPI void eldbus_name_owner_changed_callback_add(Eldbus_Connection *conn, const char *bus, Eldbus_Name_Owner_Changed_Cb cb, const void *cb_data, Eina_Bool allow_initial_call) EINA_ARG_NONNULL(1, 2, 3);
57/**
58 * Remove callback added with eldbus_name_owner_changed_callback_add().
59 *
60 * @param conn connection
61 * @param bus name of bus
62 * @param cb callback
63 * @param cb_data context data
64 */
65EAPI void eldbus_name_owner_changed_callback_del(Eldbus_Connection *conn, const char *bus, Eldbus_Name_Owner_Changed_Cb cb, const void *cb_data) EINA_ARG_NONNULL(1, 2, 3);
66
67/**
68 * @defgroup Eldbus_FDO_Peer org.freedesktop.DBus.Peer
69 *
70 * @{
71 */
72EAPI Eldbus_Pending *eldbus_object_peer_ping(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
73EAPI Eldbus_Pending *eldbus_object_peer_machine_id_get(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
74
75/**
76 * @}
77 */
78
79/**
80 * @defgroup Eldbus_FDO_Introspectable org.freedesktop.DBus.Introspectable
81 *
82 * @{
83 */
84EAPI Eldbus_Pending *eldbus_object_introspect(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
85/**
86 * @}
87 */
88
89/**
90 * @defgroup Eldbus_FDO_Properties org.freedesktop.DBus.Properties
91 * @{
92 */
93
94/**
95 * Enable or disable local cache of properties.
96 *
97 * After enable you can call eldbus_proxy_property_local_get() or
98 * eldbus_proxy_property_local_get_all() to get cached properties.
99 *
100 * @note After enable, it will asynchrony get the properties values.
101 */
102EAPI void eldbus_proxy_properties_monitor(Eldbus_Proxy *proxy, Eina_Bool enable) EINA_ARG_NONNULL(1);
103
104EAPI 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);
105EAPI 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);
106EAPI Eldbus_Pending *eldbus_proxy_property_get_all(Eldbus_Proxy *proxy, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
107EAPI Eldbus_Signal_Handler *eldbus_proxy_properties_changed_callback_add(Eldbus_Proxy *proxy, Eldbus_Signal_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
108
109/**
110 * Return the cached value of property.
111 * This only work if you have enable eldbus_proxy_properties_monitor or
112 * if you have call eldbus_proxy_event_callback_add of type
113 * ELDBUS_PROXY_EVENT_PROPERTY_CHANGED and the property you want had changed.
114 */
115EAPI Eina_Value *eldbus_proxy_property_local_get(Eldbus_Proxy *proxy, const char *name) EINA_ARG_NONNULL(1, 2);
116
117/**
118 * Return a Eina_Hash with all cached properties.
119 * This only work if you have enable eldbus_proxy_properties_monitor or
120 * if you have call eldbus_proxy_event_callback_add of type
121 * ELDBUS_PROXY_EVENT_PROPERTY_CHANGED.
122 */
123EAPI const Eina_Hash *eldbus_proxy_property_local_get_all(Eldbus_Proxy *proxy) EINA_ARG_NONNULL(1);
124
125/**
126 * @}
127 */
128
129/**
130 * @defgroup Eldbus_FDO_ObjectManager org.freedesktop.DBus.ObjectManager *
131 * @{
132 */
133
134EAPI Eldbus_Pending *eldbus_object_managed_objects_get(Eldbus_Object *obj, Eldbus_Message_Cb cb, const void *data) EINA_ARG_NONNULL(1, 2);
135
136/**
137 * @}
138 */
139
140/**
141 * @}
142 */
143#endif