comparison 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
comparison
equal deleted inserted replaced
3122:4486d72658b9 3123:130f9cb6e0ab
233 async_callbacks=('callback', 'errback')) 233 async_callbacks=('callback', 'errback'))
234 def asyncGetParamA(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None): 234 def asyncGetParamA(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
235 return self._callback("asyncGetParamA", str(name), str(category), str(attribute), security_limit, str(profile_key), callback=callback, errback=errback) 235 return self._callback("asyncGetParamA", str(name), str(category), str(attribute), security_limit, str(profile_key), callback=callback, errback=errback)
236 236
237 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 237 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
238 in_signature='sis', out_signature='a{ss}', 238 in_signature='sisss', out_signature='a{ss}',
239 async_callbacks=('callback', 'errback')) 239 async_callbacks=('callback', 'errback'))
240 def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None): 240 def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, app="", extra="", profile_key="@DEFAULT@", callback=None, errback=None):
241 return self._callback("asyncGetParamsValuesFromCategory", str(category), security_limit, str(profile_key), callback=callback, errback=errback) 241 return self._callback("asyncGetParamsValuesFromCategory", str(category), security_limit, str(app), str(extra), str(profile_key), callback=callback, errback=errback)
242 242
243 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 243 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
244 in_signature='ssa{ss}', out_signature='b', 244 in_signature='ssa{ss}', out_signature='b',
245 async_callbacks=('callback', 'errback')) 245 async_callbacks=('callback', 'errback'))
246 def connect(self, profile_key="@DEFAULT@", password='', options={}, callback=None, errback=None): 246 def connect(self, profile_key="@DEFAULT@", password='', options={}, callback=None, errback=None):
347 async_callbacks=None) 347 async_callbacks=None)
348 def getParamsCategories(self, ): 348 def getParamsCategories(self, ):
349 return self._callback("getParamsCategories", ) 349 return self._callback("getParamsCategories", )
350 350
351 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 351 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
352 in_signature='iss', out_signature='s', 352 in_signature='isss', out_signature='s',
353 async_callbacks=('callback', 'errback')) 353 async_callbacks=('callback', 'errback'))
354 def getParamsUI(self, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None): 354 def getParamsUI(self, security_limit=-1, app='', extra='', profile_key="@DEFAULT@", callback=None, errback=None):
355 return self._callback("getParamsUI", security_limit, str(app), str(profile_key), callback=callback, errback=errback) 355 return self._callback("getParamsUI", security_limit, str(app), str(extra), str(profile_key), callback=callback, errback=errback)
356 356
357 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX, 357 @dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
358 in_signature='s', out_signature='a{sa{s(sia{ss})}}', 358 in_signature='s', out_signature='a{sa{s(sia{ss})}}',
359 async_callbacks=None) 359 async_callbacks=None)
360 def getPresenceStatuses(self, profile_key="@DEFAULT@"): 360 def getPresenceStatuses(self, profile_key="@DEFAULT@"):