Mercurial > libervia-backend
comparison src/bridge/DBus.py @ 262:af3d4f11fe43
Added management of connection error
- core: connection_error signal is sent if it's impossible to connect
- bridge: added connection_error signal
- quick_frontend: an error_message is shown when a connection_error is received
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 22 Jan 2011 15:53:56 +0100 |
parents | c8406fe5e81e |
children | c4b84a2d2ad1 |
comparison
equal
deleted
inserted
replaced
261:0ecd9c33fa3a | 262:af3d4f11fe43 |
---|---|
50 | 50 |
51 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, | 51 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, |
52 signature='s') | 52 signature='s') |
53 def disconnected(self, profile): | 53 def disconnected(self, profile): |
54 debug("Disconnected signal") | 54 debug("Disconnected signal") |
55 | |
56 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, | |
57 signature='ss') | |
58 def connection_error(self, profile, error_type): | |
59 debug("Connection_error signal") | |
55 | 60 |
56 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, | 61 @dbus.service.signal(const_INT_PREFIX+const_COMM_SUFFIX, |
57 signature='sa{ss}ass') | 62 signature='sa{ss}ass') |
58 def newContact(self, contact, attributes, groups, profile): | 63 def newContact(self, contact, attributes, groups, profile): |
59 debug("new contact signal (%s) sended (profile: %s)", contact, profile) | 64 debug("new contact signal (%s) sended (profile: %s)", contact, profile) |
342 self.dbus_bridge.connected(profile) | 347 self.dbus_bridge.connected(profile) |
343 | 348 |
344 def disconnected(self, profile): | 349 def disconnected(self, profile): |
345 self.dbus_bridge.disconnected(profile) | 350 self.dbus_bridge.disconnected(profile) |
346 | 351 |
352 def connection_error(self, profile, error_type): | |
353 self.dbus_bridge.connection_error(profile, error_type) | |
354 | |
347 def newContact(self, contact, attributes, groups, profile): | 355 def newContact(self, contact, attributes, groups, profile): |
348 self.dbus_bridge.newContact(contact, attributes, groups, profile) | 356 self.dbus_bridge.newContact(contact, attributes, groups, profile) |
349 | 357 |
350 def newMessage(self, from_jid, msg, type='chat', to='', profile='@NONE@'): | 358 def newMessage(self, from_jid, msg, type='chat', to='', profile='@NONE@'): |
351 debug("sending message...") | 359 debug("sending message...") |