org.freedesktop.DBus.ObjectManager in glibmm?
- From: Johannes Dohmen <johannes dohmen amano eu>
- To: gtkmm-list gnome org
- Subject: org.freedesktop.DBus.ObjectManager in glibmm?
- Date: Wed, 17 Aug 2016 09:15:15 +0200
Hi there.
I have a question regarding glibmm and its dbus implementation.
Does glibmm (directly) support an ObjectManager
(org.freedesktop.DBus.ObjectManager) like Gio (I think) does? If not is
there a different/better approach to answer a "GetManagedObjects" call I
receive through dbus?
At the moment I try to provided an answer through a allback given by
Gio::DBus::InterfaceVTable
However I cannot construct a valid answer and I am not sure if this is
the proper way of doing it.
Anyway, I tried the following:
typedef std::map<Glib::ustring, map<Glib::ustring,
std::map<Glib::ustring, Glib::VariantBase> > > managed_objects_t;
Glib::Variant<managed_objects_t> response =
Glib::Variant<managed_objects_t>::create(tmp);
invocation->return_value(Glib::Variant<managed_objects_t>::create_tuple(response));
But when the callback is executed I get:
(process:22695): GLib-GIO-WARNING **: Type of return value is incorrect:
expected '(a{oa{sa{sv}}})', got '(a{sa{sa{sv}}})''
I cannot change the first template argument of managed_objects_t to
Glib::VariantStringBase
which could hold an Object-path, but does not have operator< implemented
(needed for std::map).
Background information:
I think I need this because bluez seems to rely on the GetManagedObjects
method of the ObjectManager interface.
Thanks for your help
Johannes
(Re-send after joining the mailing list. Sorry for any inconvenience.)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]