SF.net SVN: fclient: [52] trunk/fclient/fclient_ui/fcp_client_manager.py
Status: Pre-Alpha
Brought to you by:
jurner
From: <jU...@us...> - 2007-11-06 12:40:00
|
Revision: 52 http://fclient.svn.sourceforge.net/fclient/?rev=52&view=rev Author: jUrner Date: 2007-11-06 04:40:00 -0800 (Tue, 06 Nov 2007) Log Message: ----------- added a few methods Modified Paths: -------------- trunk/fclient/fclient_ui/fcp_client_manager.py Modified: trunk/fclient/fclient_ui/fcp_client_manager.py =================================================================== --- trunk/fclient/fclient_ui/fcp_client_manager.py 2007-11-06 12:39:13 UTC (rev 51) +++ trunk/fclient/fclient_ui/fcp_client_manager.py 2007-11-06 12:40:00 UTC (rev 52) @@ -109,15 +109,16 @@ self.priorities = Priorities(self) - def stopClient(self, name): #TODO: name of client or client??? - """Stops a FcpClient - @name: (str) connection name of the client to stop - @note: the client is not closed in the call. To close the connection call FcpClient.close() + def closeClient(self, name): + """Closes a FcpClient + @name: (str) connection name of the client to close + @note: the client is unregisatered and closed in the call. """ handler = self.fcpClients.pop(name) handler.stop() + handler.fcpClient.close() - + def newClient(self, name, eventConnectedHandler, @@ -168,8 +169,24 @@ handler.setPollPriority(pollPriority) + def startClient(self, name): + """Starts a FcpClient + @name: (str) connection name of the client to start + """ + handler = self.fcpClients[name] + handler.start() + + + def stopClient(self, name): + """Stops a FcpClient + @name: (str) connection name of the client to stop + """ + handler = self.fcpClients[name] + handler.stop() + + def handleFcpClientDisconnected(self, handler, params): - """Handles FcpClient.EventDisconnect""" + """Global handler for all clients to handle FcpClient.EventDisconnect""" disconnectReason = params['DisconnectReason'] fcpClient = handler.fcpClient This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |