diff frontends/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/frontends/src/bridge/DBus.py	Thu Nov 19 11:15:06 2015 +0100
+++ b/frontends/src/bridge/DBus.py	Thu Nov 19 18:13:26 2015 +0100
@@ -622,6 +622,20 @@
             kwargs['error_handler'] = error_handler
         return self.db_core_iface.progressGetAll(profile, **kwargs)
 
+    def progressGetAllMetadata(self, profile, callback=None, errback=None):
+        if callback is None:
+            error_handler = None
+        else:
+            if errback is None:
+                errback = log.error
+            error_handler = lambda err:errback(dbus_to_bridge_exception(err))
+        kwargs={}
+        if callback is not None:
+            kwargs['timeout'] = const_TIMEOUT
+            kwargs['reply_handler'] = callback
+            kwargs['error_handler'] = error_handler
+        return self.db_core_iface.progressGetAllMetadata(profile, **kwargs)
+
     def saveParamsTemplate(self, filename, callback=None, errback=None):
         if callback is None:
             error_handler = None