diff options
Diffstat (limited to 'src/global.h')
-rw-r--r-- | src/global.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/global.h b/src/global.h new file mode 100644 index 0000000..5a44160 --- /dev/null +++ b/src/global.h @@ -0,0 +1,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; + |