summaryrefslogtreecommitdiffstats
path: root/src/sbus/sssd_dbus_introspect.c
Commit message (Collapse)AuthorAgeFilesLines
* SBUS: Add org.freedesktop.DBus.Properties.GetAll to IntrospectionJakub Hrozek2014-05-271-0/+4
| | | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* SBUS: Include config.h for enabling function in stdio.hLukas Slebodnik2014-05-261-0/+3
| | | | | | | | | | | | | | | | | Older versions of glibc requires extra feature macros for function open_memstream. fmemopen(), open_memstream(), open_wmemstream(): Since glibc 2.10: _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L Before glibc 2.10: _GNU_SOURCE src/sbus/sssd_dbus_introspect.c: In function 'introspect_begin': src/sbus/sssd_dbus_introspect.c:82: error: implicit declaration of function 'open_memstream' src/sbus/sssd_dbus_introspect.c:82: warning: assignment makes pointer from integer without a cast Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* SBUS: Add org.freedesktop.DBus.Properties.Get to IntrospectionJakub Hrozek2014-05-221-0/+11
| | | | | Reviewed-by: Stef Walter <stefw@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* IFP: Close memstream handle in introspect destructorJakub Hrozek2014-05-061-0/+4
| | | | | | | There was a resource leak in the introspection code. This patch fixes the leak. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* sbus: Add type-safe DBus method handlers and finish functionsStef Walter2014-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type safe method handlers allow methods not to have to do tedious unwrapping and wrapping of DBus method call messages or replies. Arguments of the following DBus types are supported in type-safe method handlers. In addition arrays of these are supported. y: uint8_t b: bool (but no arrays, yet) n: int16_t q: uint16_t i: int32_t u: uint32_t x: int64_t t: uint64_t d: double s: char * (utf8 string) o: char * (object path) As an exception, arrays of booleans are not supported, but could be added later. Other more complex types could be added later if desired. If a method has other argument types, then it must be marked as having a raw handler (see below). Internally each method can have a type specific invoker function which unpacks the incoming arguments and invokes the method handler with the correct arguments. Each method also has a finish which accepts the type-safe out arguments (ie: return values) and builds the reply message. Like other request 'finish' functions, these free the request talloc context, and are to be used in place of sbus_request_finish() or friends. Raw method handlers parse their own method arguments, and prepare their own reply (ideally using sbus_request_finish() helpers). They can also do strange things like have variable arguments. To mark a DBus method as having a raw method handler use the following annotation: <annotation name="org.freedesktop.sssd.RawHandler" value="true"/> Raw methods do not have invokers or finish functions. I've left all of the internal peer to peer communication using raw method handlers. No code changes here.
* SBUS: Create an sbus_method_meta instance for IntrospectionJakub Hrozek2014-04-191-0/+8
| | | | | Also fixes a warning about uninitialized 'method' as the 'method' variable was unused and not set previously when introspecting.
* SBUS: Generate introspection from the interface meta structureJakub Hrozek2014-04-151-0/+330
https://fedorahosted.org/sssd/ticket/2234 This patch generates the introspection data from the sbus interface meta structure. The generated XML conforms to http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format The XML description of the interface also always includes the org.freedesktop.DBus.Introspectable interface, which this patch also allows in the policy settings.