Re: EggDBus



David Zeuthen wrote:
> Yeah. I think XML-RPC types can largely be considered a subset of the
> D-Bus types. For the datetime we could add an extra ISO8601 data type or
> something (don't think GTimeVal is enough; need to preserve the TZ I
> think).

Nope, XML-RPC dateTimes are (unfortunately) zoneless.

> I think "a{sv}" (a struct type in XML-RPC) can easily be mapped to
> EggDBusStructure (or a subclass) the same way we already do.

I think it's pretty common in XML-RPC to have "struct"s with
optional/variable fields. So at least some times, you'd want them to be
EggDBusHashMaps. Maybe even most of the time.

> Right. The way I work around that is by generating code in the
> GInterface. It's not ideal, I really want method and signal dispatching
> to be generic. I think libffi might help here.

I was excited for a while about the libffi/generic signal marshaller
bug, but I'm not sure it's really the right thing here; it's nice to
have actual generated code, so that you can get compile-time type-checking.

> We'd also want to rename EggDBusVariant to
> EggIpcVariant and EggDBusStructure to EggIpcStructure (ditto for
> ArraySeq and HashMap but ideally these go into GLib proper).

EggDBusVariant isn't really IPC-specific either. (Whatever happened to
GVariant?)

> but normally people don't need that (and if they do, we can make it
> transparent via e.g. PolicyKit); for desktop apps (XML-RPC probably
> isn't interesting for system services; too dangerous etc.) people
> normally set up security on a more coarse-grained granularity.

I don't have a use case for someone wanting to use the *same* API via
both D-Bus and XML-RPC. I was just thinking that an app might use D-Bus
for some things, and then also use XML-RPC for something completely
unrelated, and it would be nice (both for developers and for bindings)
if the APIs were similar.

(OTOH, it's possible that an app would want to expose both XML-RPC and
*JSON* implementations of a service, which API-wise would be exactly the
same as your D-Bus and XML-RPC example)

-- Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]