core: configuration file
SàT's main options can now be put in a configuration file which can be in different locations Bridge: new getConfig option
This commit is contained in:
parent
3926cd25c7
commit
1da78d1301
2 changed files with 84 additions and 5 deletions
|
|
@ -170,6 +170,12 @@ class DbusObject(dbus.service.Object):
|
|||
def disconnect(self, profile_key="@DEFAULT@"):
|
||||
return self.cb["disconnect"](unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_COMM_SUFFIX,
|
||||
in_signature='sss', out_signature='s',
|
||||
async_callbacks=None)
|
||||
def getConfig(self, section, name, profile_key='@DEFAULT@'):
|
||||
return self.cb["getConfig"](unicode(section), unicode(name), unicode(profile_key))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_COMM_SUFFIX,
|
||||
in_signature='s', out_signature='a(sa{ss}as)',
|
||||
async_callbacks=None)
|
||||
|
|
|
|||
|
|
@ -320,6 +320,17 @@ doc_param_0=sub_type: as for [subscribe]
|
|||
doc_param_1=entity: as for [subscribe]
|
||||
doc_param_2=%(doc_profile_key)s
|
||||
|
||||
[getConfig]
|
||||
type=method
|
||||
category=communication
|
||||
sig_in=sss
|
||||
sig_out=s
|
||||
param_2_default='@DEFAULT@'
|
||||
doc=get main configuration option
|
||||
doc_param_0=section: section of the configuration file (empty string for DEFAULT)
|
||||
doc_param_1=name: name of the option
|
||||
doc_param_2=%(doc_profile_key)s
|
||||
|
||||
[setParam]
|
||||
type=method
|
||||
category=communication
|
||||
|
|
|
|||
Loading…
Reference in a new issue