Mercurial > libervia-backend
diff sat @ 1:a06a151fc31f
Disconnect first draft
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 18 Oct 2009 23:20:45 +0200 |
parents | c4bc297b82f0 |
children |
line wrap: on
line diff
--- a/sat Sat Aug 29 13:34:59 2009 +0200 +++ b/sat Sun Oct 18 23:20:45 2009 +0200 @@ -63,6 +63,7 @@ self.bridge=DBusBridge() self.bridge.register("connect", self.connect) + self.bridge.register("disconnect", self.disconnect) self.bridge.register("getContacts", self.memory.getContacts) self.bridge.register("getPresenceStatus", self.memory.getPresenceStatus) self.bridge.register("sendMessage", self.sendMessage) @@ -96,6 +97,7 @@ self.plugins[plug_info['import_name']] = getattr(mod, plug_info['main'])(self) def connect(self): + print "Connect !" if (self.connected): info("already connected !") return @@ -108,6 +110,11 @@ self.connectionStatus="online" #TODO: check if connection is OK self.connected=True #TODO: use startedConnecting and clientConnectionLost of XMPPClientFactory + def disconnect(self): + if (not self.connected): + info("not connected !") + return + info("Disconnecting...") def run(self): debug("running app")