Mercurial > libervia-backend
comparison frontends/src/bridge/dbus_bridge.py @ 2146:1bb9bf1b4150
core, frontends: getProfilesList renamed to profilesGetList + behaviour change:
- profilesGetList now handles clients and components boolean arguments, to filter profiles
- jp: added --clients and --components options to profile/list
- profilesGetList now returns sorted profiles
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 12 Feb 2017 19:08:52 +0100 |
parents | 1d3f73e065e1 |
children | 91347fe95384 |
comparison
equal
deleted
inserted
replaced
2145:33c8c4973743 | 2146:1bb9bf1b4150 |
---|---|
387 kwargs['timeout'] = const_TIMEOUT | 387 kwargs['timeout'] = const_TIMEOUT |
388 kwargs['reply_handler'] = callback | 388 kwargs['reply_handler'] = callback |
389 kwargs['error_handler'] = error_handler | 389 kwargs['error_handler'] = error_handler |
390 return unicode(self.db_core_iface.getProfileName(profile_key, **kwargs)) | 390 return unicode(self.db_core_iface.getProfileName(profile_key, **kwargs)) |
391 | 391 |
392 def getProfilesList(self, callback=None, errback=None): | |
393 if callback is None: | |
394 error_handler = None | |
395 else: | |
396 if errback is None: | |
397 errback = log.error | |
398 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | |
399 kwargs={} | |
400 if callback is not None: | |
401 kwargs['timeout'] = const_TIMEOUT | |
402 kwargs['reply_handler'] = callback | |
403 kwargs['error_handler'] = error_handler | |
404 return self.db_core_iface.getProfilesList(**kwargs) | |
405 | |
406 def getReady(self, callback=None, errback=None): | 392 def getReady(self, callback=None, errback=None): |
407 if callback is None: | 393 if callback is None: |
408 error_handler = None | 394 error_handler = None |
409 else: | 395 else: |
410 if errback is None: | 396 if errback is None: |
590 if errback is None: | 576 if errback is None: |
591 errback = log.error | 577 errback = log.error |
592 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | 578 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) |
593 return self.db_core_iface.profileStartSession(password, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) | 579 return self.db_core_iface.profileStartSession(password, profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler) |
594 | 580 |
581 def profilesListGet(self, clients=True, components=False, callback=None, errback=None): | |
582 if callback is None: | |
583 error_handler = None | |
584 else: | |
585 if errback is None: | |
586 errback = log.error | |
587 error_handler = lambda err:errback(dbus_to_bridge_exception(err)) | |
588 kwargs={} | |
589 if callback is not None: | |
590 kwargs['timeout'] = const_TIMEOUT | |
591 kwargs['reply_handler'] = callback | |
592 kwargs['error_handler'] = error_handler | |
593 return self.db_core_iface.profilesListGet(clients, components, **kwargs) | |
594 | |
595 def progressGet(self, id, profile, callback=None, errback=None): | 595 def progressGet(self, id, profile, callback=None, errback=None): |
596 if callback is None: | 596 if callback is None: |
597 error_handler = None | 597 error_handler = None |
598 else: | 598 else: |
599 if errback is None: | 599 if errback is None: |