diff sat/bridge/dbus_bridge.py @ 3123:130f9cb6e0ab

core (memory/params): added `extra` argument to filter out params notably in `getParamsUI`: In some case, it may be desirable for a frontend to not expose some parameters to user (e.g. it is the case on Android with the `autoconnect_backend` parameter). An new `extra` parameter has been added to a couple of parameters method for that: it can contain the `ignore` key with a list of [category, name] of parameters to skip.
author Goffi <goffi@goffi.org>
date Sat, 25 Jan 2020 21:08:40 +0100
parents 7574f795bd1e
children 9d0df638c8b4
line wrap: on
line diff
--- a/sat/bridge/dbus_bridge.py	Sat Jan 25 21:08:39 2020 +0100
+++ b/sat/bridge/dbus_bridge.py	Sat Jan 25 21:08:40 2020 +0100
@@ -235,10 +235,10 @@
         return self._callback("asyncGetParamA", str(name), str(category), str(attribute), security_limit, str(profile_key), callback=callback, errback=errback)
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
-                         in_signature='sis', out_signature='a{ss}',
+                         in_signature='sisss', out_signature='a{ss}',
                          async_callbacks=('callback', 'errback'))
-    def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
-        return self._callback("asyncGetParamsValuesFromCategory", str(category), security_limit, str(profile_key), callback=callback, errback=errback)
+    def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, app="", extra="", profile_key="@DEFAULT@", callback=None, errback=None):
+        return self._callback("asyncGetParamsValuesFromCategory", str(category), security_limit, str(app), str(extra), str(profile_key), callback=callback, errback=errback)
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='ssa{ss}', out_signature='b',
@@ -349,10 +349,10 @@
         return self._callback("getParamsCategories", )
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
-                         in_signature='iss', out_signature='s',
+                         in_signature='isss', out_signature='s',
                          async_callbacks=('callback', 'errback'))
-    def getParamsUI(self, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None):
-        return self._callback("getParamsUI", security_limit, str(app), str(profile_key), callback=callback, errback=errback)
+    def getParamsUI(self, security_limit=-1, app='', extra='', profile_key="@DEFAULT@", callback=None, errback=None):
+        return self._callback("getParamsUI", security_limit, str(app), str(extra), str(profile_key), callback=callback, errback=errback)
 
     @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
                          in_signature='s', out_signature='a{sa{s(sia{ss})}}',