core: added a getReady method which can be called by frontends to ensure that backend is fully initialised before doing anything + this ckeck is automatically done in asyncConnect
This commit is contained in:
parent
561cc93a04
commit
f0b2c7dea3
2 changed files with 103 additions and 83 deletions
|
|
@ -355,6 +355,12 @@ class DbusObject(dbus.service.Object):
|
|||
def getProgress(self, id, profile):
|
||||
return self._callback("getProgress", unicode(id), unicode(profile))
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='', out_signature='',
|
||||
async_callbacks=('callback', 'errback'))
|
||||
def getReady(self, callback=None, errback=None):
|
||||
return self._callback("getReady", callback=callback, errback=errback)
|
||||
|
||||
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
|
||||
in_signature='', out_signature='s',
|
||||
async_callbacks=None)
|
||||
|
|
|
|||
|
|
@ -156,6 +156,14 @@ doc_param_3=%(doc_profile)s
|
|||
|
||||
;methods
|
||||
|
||||
[getReady]
|
||||
async=
|
||||
type=method
|
||||
category=core
|
||||
sig_in=
|
||||
sig_out=
|
||||
doc=Return when backend is initialised
|
||||
|
||||
[getVersion]
|
||||
type=method
|
||||
category=core
|
||||
|
|
|
|||
Loading…
Reference in a new issue