diff frontends/src/bridge/DBus.py @ 1587:698d6755d62a

core, bridge (params): added asyncGetParamsValuesFromCategory (yes that's a long name!) method to retrive params names and values for a given category
author Goffi <goffi@goffi.org>
date Sat, 14 Nov 2015 19:18:10 +0100
parents 42285d993e68
children d6d655238a93
line wrap: on
line diff
--- a/frontends/src/bridge/DBus.py	Sat Nov 14 19:18:07 2015 +0100
+++ b/frontends/src/bridge/DBus.py	Sat Nov 14 19:18:10 2015 +0100
@@ -173,6 +173,15 @@
             error_handler = lambda err:errback(dbus_to_bridge_exception(err))
         return unicode(self.db_core_iface.asyncGetParamA(name, category, attribute, security_limit, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler))
 
+    def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, profile_key="@DEFAULT@", 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.asyncGetParamsValuesFromCategory(category, security_limit, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler)
+
     def confirmationAnswer(self, id, accepted, data, profile, callback=None, errback=None):
         if callback is None:
             error_handler = None