| 59 | def _setup_tp(self, tp): |
| 60 | self._handles_buddies[tp] = {} |
| 61 | self._activities_by_handle[tp] = {} |
| 62 | |
| 63 | tp.connect('status', self._tp_status_cb) |
| 64 | tp.connect('contacts-online', self._contacts_online) |
| 65 | tp.connect('contacts-offline', self._contacts_offline) |
| 66 | tp.connect('activity-invitation', |
| 67 | self._activity_invitation) |
| 68 | tp.connect('private-invitation', |
| 69 | self._private_invitation) |
| 70 | tp.connect('want-to-connect', self._want_to_connect) |
| 71 | |
118 | | self._handles_buddies[tp] = {} |
119 | | self._activities_by_handle[tp] = {} |
120 | | |
121 | | tp.connect('status', self._tp_status_cb) |
122 | | tp.connect('contacts-online', self._contacts_online) |
123 | | tp.connect('contacts-offline', self._contacts_offline) |
124 | | tp.connect('activity-invitation', |
125 | | self._activity_invitation) |
126 | | tp.connect('private-invitation', |
127 | | self._private_invitation) |
128 | | tp.connect('want-to-connect', self._want_to_connect) |
| 131 | self._setup_tp(tp) |
| 277 | @dbus.service.method(PRESENCE_INTERFACE, in_signature="", |
| 278 | out_signature="") |
| 279 | def RetryConnections(self): |
| 280 | """Reload configuration and retry connections on all managers.""" |
| 281 | self._owner.reload_config() |
| 282 | if self._server_plugin is None: |
| 283 | server = self._owner.get_server() |
| 284 | if server and len(server): |
| 285 | tp = ServerPlugin(self._registry, self._owner) |
| 286 | self._setup_tp(tp) |
| 287 | self._server_plugin = tp |
| 288 | self._plugins.append(self._server_plugin) |
| 289 | |
| 290 | for tp in self._plugins: |
| 291 | tp.reload_account_info() |
| 292 | tp.start() |
| 293 | |