core, plugins file, XEP-0234, bridge: progression api enhancement:

- progressStarted have a new metadata parameter, useful to know the kind of progression, direction, etc. Check bridge doc
    - progressGetAllMetadata can be used to retrieve this data and discover on currently running progressions
    - progressFinished also have a new metadata parameter, used to e.g. indicate that hash is checked
    - core: fixed progressGetAll
    - file, XEP-0234: implemented the API modifications,  hash is returned on progressFinished
    - file: SatFile.checkSize allows to check size independently of close (be sure that all the data have been transfered though)
This commit is contained in:
Goffi 2015-11-19 18:13:26 +01:00
commit 55c75bc304

View file

@ -196,13 +196,13 @@ class DbusObject(dbus.service.Object):
pass
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
signature='ss')
def progressFinished(self, id, profile):
signature='sa{ss}s')
def progressFinished(self, id, metadata, profile):
pass
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
signature='ss')
def progressStarted(self, id, profile):
signature='sa{ss}s')
def progressStarted(self, id, metadata, profile):
pass
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
@ -458,6 +458,12 @@ class DbusObject(dbus.service.Object):
def progressGetAll(self, profile):
return self._callback("progressGetAll", unicode(profile))
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='s', out_signature='a{sa{sa{ss}}}',
async_callbacks=None)
def progressGetAllMetadata(self, profile):
return self._callback("progressGetAllMetadata", unicode(profile))
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='s', out_signature='b',
async_callbacks=None)
@ -638,11 +644,11 @@ class DBusBridge(Bridge):
def progressError(self, error, profile, arg_2):
self.dbus_bridge.progressError(error, profile, arg_2)
def progressFinished(self, id, profile):
self.dbus_bridge.progressFinished(id, profile)
def progressFinished(self, id, metadata, profile):
self.dbus_bridge.progressFinished(id, metadata, profile)
def progressStarted(self, id, profile):
self.dbus_bridge.progressStarted(id, profile)
def progressStarted(self, id, metadata, profile):
self.dbus_bridge.progressStarted(id, metadata, profile)
def subscribe(self, sub_type, entity_jid, profile):
self.dbus_bridge.subscribe(sub_type, entity_jid, profile)