diff options
author | Stef Walter <stefw@gnome.org> | 2014-01-17 12:54:42 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-03-14 13:42:17 +0100 |
commit | d9577dbd92555b0755881e37724019ef9c578404 (patch) | |
tree | 243d1ee45c7f8d0a7f30750bbb7cfd93983e6182 /src/sbus/sssd_dbus_private.h | |
parent | 5bad17538eab85ce69e0355cd25b52b4a473cc36 (diff) | |
download | sssd-d9577dbd92555b0755881e37724019ef9c578404.tar.gz sssd-d9577dbd92555b0755881e37724019ef9c578404.tar.xz sssd-d9577dbd92555b0755881e37724019ef9c578404.zip |
sbus: Add struct sbus_request to represent a DBus invocation
struct sbus_request represents a request from a dbus client
being handled by a dbus server implementation. The struct
contains the message, connection and method (and in the
future teh property) which is being requested.
In the future it will contain caller information as well.
sbus_request is a talloc memory context, and is a good place to
attach any allocations and memory specific to the request.
Each handler accepts an sbus_request. If a handler returns
EOK, it is assumed that the handler will finish the request.
Any of the sbus_request_*finish() methods can be used to
complete the request and send back a reply.
sbus_request_return_and_finish() uses the same argument
varargs syntax as dbus_message_append_args(), which isn't
a great syntax. Document it a bit, but don't try to redesign:
The marshalling work (will follow this patch set) will remove
the need to use varargs for most DBus implementation code.
This patch migrates the monitor and data provider dbus code
to use sbus_request, but does not try to rework the talloc
context's to use it.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/sbus/sssd_dbus_private.h')
-rw-r--r-- | src/sbus/sssd_dbus_private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus_private.h b/src/sbus/sssd_dbus_private.h index c62e0e3f6..eca5c8380 100644 --- a/src/sbus/sssd_dbus_private.h +++ b/src/sbus/sssd_dbus_private.h @@ -96,4 +96,10 @@ dbus_bool_t sbus_add_timeout(DBusTimeout *dbus_timeout, void *data); void sbus_toggle_timeout(DBusTimeout *dbus_timeout, void *data); void sbus_remove_timeout(DBusTimeout *dbus_timeout, void *data); +/* =Requests============================================================== */ + +struct sbus_request * +sbus_new_request(struct sbus_connection *conn, struct sbus_interface *intf, + DBusMessage *message); + #endif /* _SSSD_DBUS_PRIVATE_H_ */ |