-
Notifications
You must be signed in to change notification settings - Fork 1
/
dbus.h
executable file
·39 lines (30 loc) · 1.25 KB
/
dbus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __DBUS_H
#define __DBUS_H
#ifdef __cplusplus
extern "C" {
#endif
struct UserData {
pthread_mutex_t mutex;
DBusConnection *connection;
char *json_str;
};
typedef int (*dbus_method_return_func_t)(DBusMessageIter *iter,
const char *error, void *user_data);
typedef void (*dbus_append_func_t)(DBusMessageIter *iter,
void *user_data);
int callfunipc_dbus_method_call(DBusConnection *connection,
const char *service, const char *path, const char *interface,
const char *method, dbus_method_return_func_t cb,
void * user_data, dbus_append_func_t append_fn,
void *append_data);
void callfunipc_dbus_deconnection(struct UserData* userdata);
int callfunipc_dbus_async(struct UserData* userdata);
struct UserData* callfunipc_dbus_connection(void);
int callfunipc_populate_get(DBusMessageIter *iter, const char *error, void *user_data);
int callfunipc_populate_set(DBusMessageIter *iter, const char *error, void *user_data);
void callfunipc_append_path(DBusMessageIter *iter, void *user_data);
void callfunipc_disable_loop(void);
#ifdef __cplusplus
}
#endif
#endif