diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-18 01:08:40 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-01-18 01:08:40 +0000 |
commit | 125780a23b51802aea47920c79ee8e368d11592f (patch) | |
tree | db761fa85a54bbed37b26ee5a364d10de38962e5 /common/dbus.h | |
parent | e3f0f970d9d2bbc0587a89b50acf88d757c12a07 (diff) |
Add generic method table handling
Diffstat (limited to 'common/dbus.h')
-rw-r--r-- | common/dbus.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/common/dbus.h b/common/dbus.h index 51049391..d050237d 100644 --- a/common/dbus.h +++ b/common/dbus.h @@ -28,6 +28,21 @@ DBusConnection *init_dbus(const char *name, void (*disconnect_cb)(void *), void *user_data); +typedef DBusHandlerResult (*message_func_t) (DBusConnection *conn, + DBusMessage *msg, void *user_data); + +struct message_table { + const char *interface; + const char *member; + const char *signature; + message_func_t handler; +}; + +extern DBusObjectPathVTable generic_object_path; + +DBusHandlerResult simple_introspect(DBusConnection *conn, + DBusMessage *msg, void *user_data); + typedef void (*name_cb_t)(const char *name, void *user_data); int name_listener_add(DBusConnection *connection, const char *name, @@ -38,8 +53,6 @@ int name_listener_remove(DBusConnection *connection, const char *name, dbus_bool_t dbus_bus_get_unix_process_id(DBusConnection *conn, const char *name, unsigned long *pid); -DBusHandlerResult simple_introspect(DBusConnection *conn, DBusMessage *msg, void *data); - static inline DBusHandlerResult send_message_and_unref(DBusConnection *conn, DBusMessage *msg) { if (msg) { |