core: - individual parameters managed through sqlite

- new asyncGetParamA method, which allow to get parameter for a not connected profile
	  	==> individual parameters are cached in memory when the profile is connected, but must be accessed
		    though sqlite else, and that must be done asynchronously
primitivus:
	  - profile manager updated to use asyncGetParamA

/!\ still broken, need more work before being able to run again
This commit is contained in:
Goffi 2011-11-01 20:39:22 +01:00
commit 554299aa91
2 changed files with 135 additions and 29 deletions

View file

@ -136,6 +136,12 @@ class DbusObject(dbus.service.Object):
def asyncConnect(self, profile_key="@DEFAULT@", callback=None, errback=None):
return self.cb["asyncConnect"](unicode(profile_key), callback, errback)
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='ssss', out_signature='s',
async_callbacks=('callback', 'errback'))
def asyncGetParamA(self, name, category, attribute="value", profile_key="@DEFAULT@", callback=None, errback=None):
return self.cb["asyncGetParamA"](unicode(name), unicode(category), unicode(attribute), unicode(profile_key), callback, errback)
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='ssss', out_signature='s',
async_callbacks=None)

View file

@ -360,6 +360,20 @@ sig_in=ssss
sig_out=s
param_2_default="value"
param_3_default="@DEFAULT@"
doc=Helper method to get a parameter's attribute *when profile is connected*
doc_param_0=name: as for [setParam]
doc_param_1=category: as for [setParam]
doc_param_2=attribute: Name of the attribute
doc_param_3=%(doc_profile_key)s
[asyncGetParamA]
async=
type=method
category=core
sig_in=ssss
sig_out=s
param_2_default="value"
param_3_default="@DEFAULT@"
doc=Helper method to get a parameter's attribute
doc_param_0=name: as for [setParam]
doc_param_1=category: as for [setParam]