diff sat_frontends/bridge/pb.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 2cc2f65379f7
children 9d0df638c8b4
line wrap: on
line diff
--- a/sat_frontends/bridge/pb.py	Sat Jan 25 21:08:39 2020 +0100
+++ b/sat_frontends/bridge/pb.py	Sat Jan 25 21:08:40 2020 +0100
@@ -175,8 +175,8 @@
             errback = self._generic_errback
         d.addErrback(errback)
 
-    def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
-        d = self.root.callRemote("asyncGetParamsValuesFromCategory", category, security_limit, profile_key)
+    def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, app="", extra="", profile_key="@DEFAULT@", callback=None, errback=None):
+        d = self.root.callRemote("asyncGetParamsValuesFromCategory", category, security_limit, app, extra, profile_key)
         if callback is not None:
             d.addCallback(callback)
         if errback is None:
@@ -327,8 +327,8 @@
             errback = self._generic_errback
         d.addErrback(errback)
 
-    def getParamsUI(self, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None):
-        d = self.root.callRemote("getParamsUI", security_limit, app, profile_key)
+    def getParamsUI(self, security_limit=-1, app='', extra='', profile_key="@DEFAULT@", callback=None, errback=None):
+        d = self.root.callRemote("getParamsUI", security_limit, app, extra, profile_key)
         if callback is not None:
             d.addCallback(callback)
         if errback is None:
@@ -664,8 +664,8 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, profile_key="@DEFAULT@"):
-        d = self.root.callRemote("asyncGetParamsValuesFromCategory", category, security_limit, profile_key)
+    def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, app="", extra="", profile_key="@DEFAULT@"):
+        d = self.root.callRemote("asyncGetParamsValuesFromCategory", category, security_limit, app, extra, profile_key)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
@@ -759,8 +759,8 @@
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())
 
-    def getParamsUI(self, security_limit=-1, app='', profile_key="@DEFAULT@"):
-        d = self.root.callRemote("getParamsUI", security_limit, app, profile_key)
+    def getParamsUI(self, security_limit=-1, app='', extra='', profile_key="@DEFAULT@"):
+        d = self.root.callRemote("getParamsUI", security_limit, app, extra, profile_key)
         d.addErrback(self._errback)
         return d.asFuture(asyncio.get_event_loop())