summaryrefslogtreecommitdiff
path: root/gio/src/dbusconnection.ccg
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2011-04-01 11:56:20 +0200
committerMurray Cumming <murrayc@murrayc.com>2011-04-01 11:56:20 +0200
commit55efa327a0c7a29ed2b4050dc9b081146d87ace3 (patch)
tree3b1f277df4eae8349c0f18ec0e2edea89986b89f /gio/src/dbusconnection.ccg
parent23d631cac63995ff83cb8e063988af981f1b5f70 (diff)
downloadglibmm-55efa327a0c7a29ed2b4050dc9b081146d87ace3.tar.gz
Gio::DBus: Minor API changes.
* gio/src/dbusconnection.[hg|ccg]: register_object(), register_subtree(): Take the VTable by reference, not pointer. register_object() can take a NULL but that needs documentation (see the bug mentioned) and a future method overload. * gio/src/dbusmethodinvocation.ccg: get_parameters(): Return a VariantContainerBase instead of taking a VariantBase output parameter, because this is always a tuple. Well, I think so: See the bug mentioned. * gio/src/dbusmethodinvocation.hg: return_value(): Take a VariantContainerBase instead of a VariantBase, because this is always a tuple. return_gerror(), return_error_literal(): Rename them both to return_error(). * glib/src/variant.hg: VariantContainerBase::create_tuple(): Add a method overload that takes a single VariantBase, for convenience, so that applications don't need to create a single-item vector. * examples/dbus/busserver.cc: Adapted. * examples/dbus/busserver.cc: Rename to server.cc and actually implement it, though I am currently confused about whether this server's object should be available on an existing bus. Maybe we should use Gio::DBus::own_name() instead of Gio::DBus::Server.
Diffstat (limited to 'gio/src/dbusconnection.ccg')
-rw-r--r--gio/src/dbusconnection.ccg10
1 files changed, 5 insertions, 5 deletions
diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg
index 273647f7..99e9d839 100644
--- a/gio/src/dbusconnection.ccg
+++ b/gio/src/dbusconnection.ccg
@@ -799,13 +799,13 @@ guint Connection::add_filter(const SlotMessageFilter& slot)
guint Connection::register_object(const Glib::ustring& object_path,
const Glib::RefPtr<InterfaceInfo>& interface_info,
- const InterfaceVTable* vtable)
+ const InterfaceVTable& vtable)
{
GError* gerror = 0;
const guint result = g_dbus_connection_register_object(gobj(),
object_path.c_str(), Glib::unwrap(interface_info),
- vtable->gobj(), const_cast<InterfaceVTable*>(vtable), 0, &gerror);
+ vtable.gobj(), const_cast<InterfaceVTable*>(&vtable), 0, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -814,14 +814,14 @@ guint Connection::register_object(const Glib::ustring& object_path,
}
guint Connection::register_subtree(const Glib::ustring& object_path,
- const SubtreeVTable* vtable, SubtreeFlags flags)
+ const SubtreeVTable& vtable, SubtreeFlags flags)
{
GError* gerror = 0;
const guint result = g_dbus_connection_register_subtree(gobj(),
object_path.c_str(),
- vtable->gobj(), static_cast<GDBusSubtreeFlags>(flags),
- const_cast<SubtreeVTable*>(vtable), 0, &gerror);
+ vtable.gobj(), static_cast<GDBusSubtreeFlags>(flags),
+ const_cast<SubtreeVTable*>(&vtable), 0, &gerror);
if(gerror)
::Glib::Error::throw_exception(gerror);