diff frontends/src/bridge/dbus_bridge.py @ 2146:1bb9bf1b4150

core, frontends: getProfilesList renamed to profilesGetList + behaviour change: - profilesGetList now handles clients and components boolean arguments, to filter profiles - jp: added --clients and --components options to profile/list - profilesGetList now returns sorted profiles
author Goffi <goffi@goffi.org>
date Sun, 12 Feb 2017 19:08:52 +0100
parents 1d3f73e065e1
children 91347fe95384
line wrap: on
line diff
--- a/frontends/src/bridge/dbus_bridge.py	Sun Feb 12 18:59:10 2017 +0100
+++ b/frontends/src/bridge/dbus_bridge.py	Sun Feb 12 19:08:52 2017 +0100
@@ -389,20 +389,6 @@
             kwargs['error_handler'] = error_handler
         return unicode(self.db_core_iface.getProfileName(profile_key, **kwargs))
 
-    def getProfilesList(self, 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.getProfilesList(**kwargs)
-
     def getReady(self, callback=None, errback=None):
         if callback is None:
             error_handler = None
@@ -592,6 +578,20 @@
             error_handler = lambda err:errback(dbus_to_bridge_exception(err))
         return self.db_core_iface.profileStartSession(password, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler)
 
+    def profilesListGet(self, clients=True, components=False, 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.profilesListGet(clients, components, **kwargs)
+
     def progressGet(self, id, profile, callback=None, errback=None):
         if callback is None:
             error_handler = None