diff frontends/src/bridge/dbus_bridge.py @ 2113:9c861d07b5b6

core: added sessionGetInfos bridge method to retrieve various data on current profile session + client.started keep start time
author Goffi <goffi@goffi.org>
date Thu, 05 Jan 2017 22:22:13 +0100
parents f413bfc24458
children 2f264f3df280
line wrap: on
line diff
--- a/frontends/src/bridge/dbus_bridge.py	Thu Jan 05 20:37:01 2017 +0100
+++ b/frontends/src/bridge/dbus_bridge.py	Thu Jan 05 22:22:13 2017 +0100
@@ -644,6 +644,15 @@
             kwargs['error_handler'] = error_handler
         return self.db_core_iface.saveParamsTemplate(filename, **kwargs)
 
+    def sessionInfosGet(self, profile_key, 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))
+        return self.db_core_iface.sessionInfosGet(profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler)
+
     def setParam(self, name, value, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
         if callback is None:
             error_handler = None