diff frontends/src/bridge/DBus.py @ 1595:a3d0cfa5b7a6

core, bridge: added a profileSetDefault method
author Goffi <goffi@goffi.org>
date Sat, 14 Nov 2015 19:18:10 +0100
parents d6d655238a93
children 5b24d6bf5d15
line wrap: on
line diff
--- a/frontends/src/bridge/DBus.py	Sat Nov 14 19:18:10 2015 +0100
+++ b/frontends/src/bridge/DBus.py	Sat Nov 14 19:18:10 2015 +0100
@@ -557,6 +557,20 @@
             kwargs['error_handler'] = error_handler
         return self.db_core_iface.profileIsSessionStarted(profile_key, **kwargs)
 
+    def profileSetDefault(self, arg_0, callback=None, errback=None):
+        if callback is None:
+            error_handler = None
+        else:
+            if errback is None:
+                errback = log.error
+            error_handler = lambda err:errback(dbus_to_bridge_exception(err))
+        kwargs={}
+        if callback is not None:
+            kwargs['timeout'] = const_TIMEOUT
+            kwargs['reply_handler'] = callback
+            kwargs['error_handler'] = error_handler
+        return self.db_core_iface.profileSetDefault(arg_0, **kwargs)
+
     def profileStartSession(self, password='', profile_key="@DEFAULT@", callback=None, errback=None):
         if callback is None:
             error_handler = None