comparison 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
comparison
equal deleted inserted replaced
1625:8b8b1af5905f 1626:63cef4dbf2a4
620 kwargs['timeout'] = const_TIMEOUT 620 kwargs['timeout'] = const_TIMEOUT
621 kwargs['reply_handler'] = callback 621 kwargs['reply_handler'] = callback
622 kwargs['error_handler'] = error_handler 622 kwargs['error_handler'] = error_handler
623 return self.db_core_iface.progressGetAll(profile, **kwargs) 623 return self.db_core_iface.progressGetAll(profile, **kwargs)
624 624
625 def progressGetAllMetadata(self, profile, callback=None, errback=None):
626 if callback is None:
627 error_handler = None
628 else:
629 if errback is None:
630 errback = log.error
631 error_handler = lambda err:errback(dbus_to_bridge_exception(err))
632 kwargs={}
633 if callback is not None:
634 kwargs['timeout'] = const_TIMEOUT
635 kwargs['reply_handler'] = callback
636 kwargs['error_handler'] = error_handler
637 return self.db_core_iface.progressGetAllMetadata(profile, **kwargs)
638
625 def saveParamsTemplate(self, filename, callback=None, errback=None): 639 def saveParamsTemplate(self, filename, callback=None, errback=None):
626 if callback is None: 640 if callback is None:
627 error_handler = None 641 error_handler = None
628 else: 642 else:
629 if errback is None: 643 if errback is None: