comparison frontends/src/bridge/DBus.py @ 1595:a3d0cfa5b7a6

core, bridge: added a profileSetDefault method
author Goffi <goffi@goffi.org>
date Sat, 14 Nov 2015 19:18:10 +0100
parents d6d655238a93
children 5b24d6bf5d15
comparison
equal deleted inserted replaced
1594:313f2bb7841b 1595:a3d0cfa5b7a6
555 kwargs['timeout'] = const_TIMEOUT 555 kwargs['timeout'] = const_TIMEOUT
556 kwargs['reply_handler'] = callback 556 kwargs['reply_handler'] = callback
557 kwargs['error_handler'] = error_handler 557 kwargs['error_handler'] = error_handler
558 return self.db_core_iface.profileIsSessionStarted(profile_key, **kwargs) 558 return self.db_core_iface.profileIsSessionStarted(profile_key, **kwargs)
559 559
560 def profileSetDefault(self, arg_0, callback=None, errback=None):
561 if callback is None:
562 error_handler = None
563 else:
564 if errback is None:
565 errback = log.error
566 error_handler = lambda err:errback(dbus_to_bridge_exception(err))
567 kwargs={}
568 if callback is not None:
569 kwargs['timeout'] = const_TIMEOUT
570 kwargs['reply_handler'] = callback
571 kwargs['error_handler'] = error_handler
572 return self.db_core_iface.profileSetDefault(arg_0, **kwargs)
573
560 def profileStartSession(self, password='', profile_key="@DEFAULT@", callback=None, errback=None): 574 def profileStartSession(self, password='', profile_key="@DEFAULT@", callback=None, errback=None):
561 if callback is None: 575 if callback is None:
562 error_handler = None 576 error_handler = None
563 else: 577 else:
564 if errback is None: 578 if errback is None: