core, bridge: new method paramsRegisterApp to register frontend's specific parameters
This commit is contained in:
parent
fc003ecf77
commit
4a0d8be8ec
3 changed files with 175 additions and 59 deletions
|
|
@ -300,10 +300,10 @@ class DbusObject(dbus.service.Object):
|
|||
return self._callback("getParamA", unicode(name), unicode(category), unicode(attribute), unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='is', out_signature='s',
|
||||
in_signature='iss', out_signature='s',
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def getParams(self, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("getParams", security_limit, unicode(profile_key), callback=callback, errback=errback)
|
||||
def getParams(self, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("getParams", security_limit, unicode(app), unicode(profile_key), callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='', out_signature='as',
|
||||
|
|
@ -312,16 +312,16 @@ class DbusObject(dbus.service.Object):
|
|||
return self._callback("getParamsCategories", )
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='sis', out_signature='s',
|
||||
in_signature='siss', out_signature='s',
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def getParamsForCategory(self, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("getParamsForCategory", unicode(category), security_limit, unicode(profile_key), callback=callback, errback=errback)
|
||||
def getParamsForCategory(self, category, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("getParamsForCategory", unicode(category), security_limit, unicode(app), unicode(profile_key), callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='is', out_signature='s',
|
||||
in_signature='iss', out_signature='s',
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def getParamsUI(self, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("getParamsUI", security_limit, unicode(profile_key), callback=callback, errback=errback)
|
||||
def getParamsUI(self, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("getParamsUI", security_limit, unicode(app), unicode(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})}}',
|
||||
|
|
@ -377,6 +377,12 @@ class DbusObject(dbus.service.Object):
|
|||
def launchAction(self, callback_id, data, profile_key="@DEFAULT@", callback=None, errback=None):
|
||||
return self._callback("launchAction", unicode(callback_id), data, unicode(profile_key), callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='sis', out_signature='',
|
||||
async_callbacks=None)
|
||||
def paramsRegisterApp(self, xml, security_limit=-1, app=''):
|
||||
return self._callback("paramsRegisterApp", unicode(xml), security_limit, unicode(app))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='ssssi', out_signature='s',
|
||||
async_callbacks=None)
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class Bridge(object):
|
|||
def getParam(self, name, namespace):
|
||||
raise NotImplementedError
|
||||
|
||||
def getParams(self, security_limit, namespace):
|
||||
def getParams(self, security_limit, app, namespace):
|
||||
raise NotImplementedError
|
||||
|
||||
def getHistory(self, from_jid, to_jid, size):
|
||||
|
|
|
|||
|
|
@ -447,38 +447,44 @@ doc_param_4=%(doc_profile_key)s
|
|||
async=
|
||||
type=method
|
||||
category=core
|
||||
sig_in=is
|
||||
sig_in=iss
|
||||
sig_out=s
|
||||
param_0_default=-1
|
||||
param_1_default="@DEFAULT@"
|
||||
doc=Return a SàT XMLUI for parameters
|
||||
param_1_default=''
|
||||
param_2_default="@DEFAULT@"
|
||||
doc=Return a SàT XMLUI for parameters, eventually restrict the result to the parameters concerning a given frontend
|
||||
doc_param_0=%(doc_security_limit)s
|
||||
doc_param_1=%(doc_profile_key)s
|
||||
doc_param_1=app: name of the frontend requesting the parameters, or '' to get all parameters
|
||||
doc_param_2=%(doc_profile_key)s
|
||||
|
||||
[getParams]
|
||||
async=
|
||||
type=method
|
||||
category=core
|
||||
sig_in=is
|
||||
sig_in=iss
|
||||
sig_out=s
|
||||
param_0_default=-1
|
||||
param_1_default="@DEFAULT@"
|
||||
doc=Return XML of parameters
|
||||
param_1_default=''
|
||||
param_2_default="@DEFAULT@"
|
||||
doc=Return XML of parameters, eventually restrict the result to the parameters concerning a given frontend
|
||||
doc_param_0=%(doc_security_limit)s
|
||||
doc_param_1=%(doc_profile_key)s
|
||||
doc_param_1=app: name of the frontend requesting the parameters, or '' to get all parameters
|
||||
doc_param_2=%(doc_profile_key)s
|
||||
|
||||
[getParamsForCategory]
|
||||
async=
|
||||
type=method
|
||||
category=core
|
||||
sig_in=sis
|
||||
sig_in=siss
|
||||
sig_out=s
|
||||
param_1_default=-1
|
||||
param_2_default="@DEFAULT@"
|
||||
doc=Return a xml of all params in a category
|
||||
param_2_default=''
|
||||
param_3_default="@DEFAULT@"
|
||||
doc=Return a xml of all params in a category, eventually restrict the result to the parameters concerning a given frontend
|
||||
doc_param_0=category: Category to get
|
||||
doc_param_1=%(doc_security_limit)s
|
||||
doc_param_2=%(doc_profile_key)s
|
||||
doc_param_2=app: name of the frontend requesting the parameters, or '' to get all parameters
|
||||
doc_param_3=%(doc_profile_key)s
|
||||
|
||||
[getParamsCategories]
|
||||
type=method
|
||||
|
|
@ -488,6 +494,18 @@ sig_out=as
|
|||
doc=Get all categories currently existing in parameters
|
||||
doc_return=list of categories
|
||||
|
||||
[paramsRegisterApp]
|
||||
type=method
|
||||
category=core
|
||||
sig_in=sis
|
||||
sig_out=
|
||||
param_1_default=-1
|
||||
param_2_default=''
|
||||
doc=Register frontend's specific parameters
|
||||
doc_param_0=xml: XML definition of the parameters to be added
|
||||
doc_param_1=%(doc_security_limit)s
|
||||
doc_param_2=app: name of the frontend registering the parameters
|
||||
|
||||
[getHistory]
|
||||
async=
|
||||
type=method
|
||||
|
|
|
|||
Loading…
Reference in a new issue