diff sat_frontends/bridge/dbus_bridge.py @ 2892:82b781c46841

core: added a rosterResync method to bridge: rosterResync do a full resynchronisation of roster with server. This should not be needed, but may be useful if user suspect a sync issue for whatever reason.
author Goffi <goffi@goffi.org>
date Sun, 07 Apr 2019 18:49:41 +0200
parents 003b8b4b56a7
children ab2696e34d29
line wrap: on
line diff
--- a/sat_frontends/bridge/dbus_bridge.py	Sun Apr 07 18:47:17 2019 +0200
+++ b/sat_frontends/bridge/dbus_bridge.py	Sun Apr 07 18:49:41 2019 +0200
@@ -726,6 +726,15 @@
             kwargs['error_handler'] = error_handler
         return self.db_core_iface.progressGetAllMetadata(profile, **kwargs)
 
+    def rosterResync(self, profile_key="@DEFAULT@", 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))
+        return self.db_core_iface.rosterResync(profile_key, timeout=const_TIMEOUT, reply_handler=callback, error_handler=error_handler)
+
     def saveParamsTemplate(self, filename, callback=None, errback=None):
         if callback is None:
             error_handler = None