diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-08-29 00:18:47 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-09-09 18:26:36 +0200 |
commit | 8ef8135a2afdfd8de363a61d8a6ae6e1218a01ec (patch) | |
tree | 7406cfd64b2d28c39ef069f0cf33e5b83339bc56 /gdbus/gdbus.h | |
parent | 3bf4209813744e56d0260d3192bba41209934750 (diff) | |
download | ofono-8ef8135a2afdfd8de363a61d8a6ae6e1218a01ec.tar.bz2 |
Add support for GDBus security handlers
Diffstat (limited to 'gdbus/gdbus.h')
-rw-r--r-- | gdbus/gdbus.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h index c3e72528..42d4f739 100644 --- a/gdbus/gdbus.h +++ b/gdbus/gdbus.h @@ -55,6 +55,11 @@ typedef void (* GDBusDestroyFunction) (void *user_data); typedef DBusMessage * (* GDBusMethodFunction) (DBusConnection *connection, DBusMessage *message, void *user_data); +typedef guint32 GDBusPendingReply; + +typedef void (* GDBusSecurityFunction) (DBusConnection *connection, + DBusMessage *message, GDBusPendingReply pending); + typedef enum { G_DBUS_METHOD_FLAG_DEPRECATED = (1 << 0), G_DBUS_METHOD_FLAG_NOREPLY = (1 << 1), @@ -75,6 +80,7 @@ typedef struct { const char *reply; GDBusMethodFunction function; GDBusMethodFlags flags; + unsigned int privilege; } GDBusMethodTable; typedef struct { @@ -89,6 +95,11 @@ typedef struct { GDBusPropertyFlags flags; } GDBusPropertyTable; +typedef struct { + unsigned int privilege; + GDBusSecurityFunction function; +} GDBusSecurityTable; + gboolean g_dbus_register_interface(DBusConnection *connection, const char *path, const char *name, const GDBusMethodTable *methods, @@ -99,6 +110,14 @@ gboolean g_dbus_register_interface(DBusConnection *connection, gboolean g_dbus_unregister_interface(DBusConnection *connection, const char *path, const char *name); +gboolean g_dbus_register_security(const GDBusSecurityTable *security); +gboolean g_dbus_unregister_security(const GDBusSecurityTable *security); + +void g_dbus_pending_success(DBusConnection *connection, + GDBusPendingReply pending); +void g_dbus_pending_error(DBusConnection *connection, + GDBusPendingReply pending, DBusMessage *error); + DBusMessage *g_dbus_create_error(DBusMessage *message, const char *name, const char *format, ...) __attribute__((format(printf, 3, 4))); |