d9577db sbus: Add struct sbus_request to represent a DBus invocation

16 files Authored by Stef Walter 10 years ago, Committed by jhrozek 10 years ago,
    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>
    
        
file modified
+1 -0
file modified
+14 -40
file modified
+4 -22
file modified
+182 -330
file modified
+15 -35
file modified
+77 -1
file modified
+26 -20
file modified
+6 -0