summaryrefslogtreecommitdiff
path: root/gio/src/dbusserver.ccg
diff options
context:
space:
mode:
authorJosé Alburquerque <jaalburqu@svn.gnome.org>2010-11-14 23:29:35 -0500
committerJosé Alburquerque <jaalburqu@svn.gnome.org>2010-11-14 23:30:54 -0500
commit14eaf3223fa42bab37fc70112030f76b5f49e46c (patch)
tree8be6bd2c38d7133ee7dc30218259554214dbef1c /gio/src/dbusserver.ccg
parent80a3a24529264df735b2eaf8414ffad072e0ad6f (diff)
downloadglibmm-14eaf3223fa42bab37fc70112030f76b5f49e46c.tar.gz
giomm: Provide non-cancellable overloads for newly added API.
* gio/src/application.hg: Completed a TODO. * gio/src/asyncinitable.hg (init_async): Refer to existing method docs in the non-cancellable version instead of duplicating docs. * gio/src/dbusconnection.{ccg,hg}: Add non-cancellable overloads of the constructors and create methods instead of having a default null Cancellable parameter. Renamed the synchronized create*() methods to create*_sync(). (get): Added a non-cancellable overload as above. * gio/src/dbusproxy.{ccg,hg}: Added non-cancellable overloads of the constructors and create methods. Renamed the create*() synchronized methods to create*_sync() as above. (call): Added a non-cancellable overload as above. * gio/src/dbusserver.{ccg,hg}: Add non-cancellable overloads of the constructor and create method. Renamed the create() synchronized method to create_sync() as above.
Diffstat (limited to 'gio/src/dbusserver.ccg')
-rw-r--r--gio/src/dbusserver.ccg36
1 files changed, 31 insertions, 5 deletions
diff --git a/gio/src/dbusserver.ccg b/gio/src/dbusserver.ccg
index aee3b399..9aa02a16 100644
--- a/gio/src/dbusserver.ccg
+++ b/gio/src/dbusserver.ccg
@@ -25,8 +25,10 @@ namespace Gio
{
DBusServer::DBusServer(const Glib::ustring& address,
- const Glib::ustring& guid, const Glib::RefPtr<DBusAuthObserver>& observer,
- const Glib::RefPtr<Cancellable>& cancellable, DBusServerFlags flags)
+ const Glib::ustring& guid,
+ const Glib::RefPtr<DBusAuthObserver>& observer,
+ const Glib::RefPtr<Cancellable>& cancellable,
+ DBusServerFlags flags)
: _CONSTRUCT("address",
(address.empty() ? static_cast<char*>(0) : address.c_str()),
"flags", static_cast<GDBusServerFlags>(flags),
@@ -36,12 +38,36 @@ DBusServer::DBusServer(const Glib::ustring& address,
init(cancellable);
}
-Glib::RefPtr<DBusServer> DBusServer::create(const Glib::ustring& address,
- const Glib::ustring& guid, const Glib::RefPtr<DBusAuthObserver>& observer,
- const Glib::RefPtr<Cancellable>& cancellable, DBusServerFlags flags)
+DBusServer::DBusServer(const Glib::ustring& address,
+ const Glib::ustring& guid,
+ const Glib::RefPtr<DBusAuthObserver>& observer,
+ DBusServerFlags flags)
+ : _CONSTRUCT("address",
+ (address.empty() ? static_cast<char*>(0) : address.c_str()),
+ "flags", static_cast<GDBusServerFlags>(flags),
+ "guid", (guid.empty() ? static_cast<char*>(0) : guid.c_str()),
+ "authentication-observer", Glib::unwrap(observer))
+{
+ init(Glib::RefPtr<Cancellable>());
+}
+
+Glib::RefPtr<DBusServer> DBusServer::create_sync(const Glib::ustring& address,
+ const Glib::ustring& guid,
+ const Glib::RefPtr<DBusAuthObserver>& observer,
+ const Glib::RefPtr<Cancellable>& cancellable,
+ DBusServerFlags flags)
{
return Glib::RefPtr<DBusServer>(new DBusServer(address, guid, observer,
cancellable, flags));
}
+Glib::RefPtr<DBusServer> DBusServer::create_sync(const Glib::ustring& address,
+ const Glib::ustring& guid,
+ const Glib::RefPtr<DBusAuthObserver>& observer,
+ DBusServerFlags flags)
+{
+ return Glib::RefPtr<DBusServer>(new DBusServer(address, guid, observer,
+ flags));
+}
+
} // namespace Gio