Mercurial > libervia-backend
diff src/bridge/DBus.py @ 1626:63cef4dbf2a4
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)
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 19 Nov 2015 18:13:26 +0100 |
parents | 5b24d6bf5d15 |
children | d17772b0fe22 |
line wrap: on
line diff
--- a/src/bridge/DBus.py Thu Nov 19 11:15:06 2015 +0100 +++ b/src/bridge/DBus.py Thu Nov 19 18:13:26 2015 +0100 @@ -196,13 +196,13 @@ 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, @@ -459,6 +459,12 @@ 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) def saveParamsTemplate(self, filename): @@ -638,11 +644,11 @@ 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)