Imported Upstream version 1.7.1
[platform/upstream/edbus.git] / src / lib / dbus / e_dbus_private.h
1 #ifndef E_DBUS_PRIVATE_H
2 #define E_DBUS_PRIVATE_H
3
4 #include <Ecore.h>
5
6 #include "E_DBus.h"
7
8 #ifndef E_DBUS_COLOR_DEFAULT
9 #define E_DBUS_COLOR_DEFAULT EINA_COLOR_CYAN
10 #endif
11 EAPI extern int _e_dbus_log_dom;
12 #define DBG(...)   EINA_LOG_DOM_DBG(_e_dbus_log_dom, __VA_ARGS__)
13 #define INFO(...)    EINA_LOG_DOM_INFO(_e_dbus_log_dom, __VA_ARGS__)
14 #define WARN(...) EINA_LOG_DOM_WARN(_e_dbus_log_dom, __VA_ARGS__)
15 #define ERR(...)   EINA_LOG_DOM_ERR(_e_dbus_log_dom, __VA_ARGS__)
16
17
18 struct E_DBus_Connection
19 {
20   DBusBusType shared_type;
21   DBusConnection *conn;
22   char *conn_name;
23
24   Eina_List *fd_handlers;
25   Eina_List *timeouts;
26   Eina_List *signal_handlers;
27   void (*signal_dispatcher)(E_DBus_Connection *conn, DBusMessage *msg);
28
29   Ecore_Idler *idler;
30
31   int refcount;
32 };
33
34 struct E_DBus_Callback
35 {
36   E_DBus_Callback_Func cb_func;
37   E_DBus_Unmarshal_Func unmarshal_func;
38   E_DBus_Free_Func free_func;
39   void *user_data;
40 };
41
42 int  e_dbus_object_init(void);
43 void e_dbus_object_shutdown(void);
44
45 extern int e_dbus_idler_active;
46 void e_dbus_signal_handlers_clean(E_DBus_Connection *conn);
47 void e_dbus_signal_handlers_free_all(E_DBus_Connection *conn);
48
49
50 const char *e_dbus_basic_type_as_string(int type);
51
52   
53 #endif