diff options
author | Murray Cumming <murrayc@murrayc.com> | 2010-07-15 09:58:54 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2010-07-15 09:58:54 +0200 |
commit | 384e0318413f8be5621b46d0156b74dd29616fcc (patch) | |
tree | 8d67a00975de44ed2970fb172ebed3664afa78d5 /gio/src/dbusconnection.ccg | |
parent | 13b1f1435f969875d871afb87692dfe37a01d75b (diff) | |
download | glibmm-384e0318413f8be5621b46d0156b74dd29616fcc.tar.gz |
Fix the build for a GDBusConnection API change.
* gio/src/gio_methods.defs:
* gio/src/gio_unix_functions.defs:
* glib/src/glib_functions.defs:
* glib/src/gobject_functions.defs: Regenerate.
* glib/src/gdbusconnection.[hg|ccg]: Made close() async, adding close_finish()
and close_sync().
Added flush(), flush_finish() and flush_sync().
Diffstat (limited to 'gio/src/dbusconnection.ccg')
-rw-r--r-- | gio/src/dbusconnection.ccg | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg index 99338f5d..5893ffde 100644 --- a/gio/src/dbusconnection.ccg +++ b/gio/src/dbusconnection.ccg @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- -/* Copyright (C) 2007 The giomm Development Team +/* Copyright (C) 2010 The giomm Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,4 +23,69 @@ namespace Gio { +void DBusConnection::close() +{ + g_dbus_connection_close(gobj(), 0, 0, 0); +} + +void DBusConnection::close(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) +{ + SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + + g_dbus_connection_close(gobj(), + Glib::unwrap(cancellable), + &SignalProxy_async_callback, + slot_copy); +} + +void DBusConnection::close(const SlotAsyncReady& slot) +{ + SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + + g_dbus_connection_close(gobj(), + 0, + &SignalProxy_async_callback, + slot_copy); +} + +void DBusConnection::close_sync() +{ + GError* gerror = 0; + g_dbus_connection_close_sync(gobj(), 0, &(gerror)); + if(gerror) + ::Glib::Error::throw_exception(gerror); +} + +void DBusConnection::flush() +{ + g_dbus_connection_flush(gobj(), 0, 0, 0); +} + +void DBusConnection::flush(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) +{ + SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + + g_dbus_connection_flush(gobj(), + Glib::unwrap(cancellable), + &SignalProxy_async_callback, + slot_copy); +} + +void DBusConnection::flush(const SlotAsyncReady& slot) +{ + SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); + + g_dbus_connection_flush(gobj(), + 0, + &SignalProxy_async_callback, + slot_copy); +} + +void DBusConnection::flush_sync() +{ + GError* gerror = 0; + g_dbus_connection_flush_sync(gobj(), 0, &(gerror)); + if(gerror) + ::Glib::Error::throw_exception(gerror); +} } // namespace Gio |