summaryrefslogtreecommitdiff
path: root/src/global.h
blob: 5a44160dfb1fa1c686938c4a6c70b6cfa2082c83 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52

#include "config.h"

#include <dbus/dbus.h>
#include <ev.h>

/* Global dbus connection (defined in main.c) */
extern DBusConnection *dbuscon;



/* Interface structures */

#define ITFF_DEPRECATED  1 /* Methods, signals, properties */
#define ITFF_NOREPLY     2 /* Methods */
#define ITFF_READ        4 /* Properties */
#define ITFF_WRITE       8 /* Properties */
#define ITFF_READWRITE   (ITFF_READ|ITFF_WRITE)
#define ITFF_EMITNONE   16 /* Properties: EmitsChangedSignal = false */
#define ITFF_EMITCHANGE 32 /* Properties: EmitsChangedSignal = invalidates */


typedef struct {
	const char *name;
	char flags;  /* deprecated, noreply */
	char **in;
	char **out;
} itf_method_t;


typedef struct {
	const char *name;
	char flags;  /* deprecated */
	char **args;
} itf_signal_t;


typedef struct {
	const char *name;
	const char *type;
	char flags; /* read,write,deprecated,emitnone,emitchange */
} itf_property_t;


typedef struct {
	const char *name;
	int n_methods, n_signals, n_properties;
	itf_method_t *methods;
	itf_signal_t *signals;
	itf_property_t *properties;
} itf_t;