Thread: 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. |
From: <jU...@us...> - 2007-11-07 17:34:22
|
Revision: 55 http://fclient.svn.sourceforge.net/fclient/?rev=55&view=rev Author: jUrner Date: 2007-11-07 09:34:24 -0800 (Wed, 07 Nov 2007) Log Message: ----------- poll timer is single shot now to avoid troubles with reentrant timer 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-07 17:33:26 UTC (rev 54) +++ trunk/fclient/fclient_ui/fcp_client_manager.py 2007-11-07 17:34:24 UTC (rev 55) @@ -242,10 +242,11 @@ ) self.pollTimer = QtCore.QTimer() + self.pollTimer.setSingleShot(True) QtCore.QObject.connect( self.pollTimer, QtCore.SIGNAL('timeout()'), - self.fcpClient.next + self.handleFcpClientNext ) @@ -306,7 +307,14 @@ except StopIteration: return self.connectTimer.start(int(self.connectPriority)) + + def handleFcpClientNext(self): + """Handles reading next message from FcpClient""" + self.fcpClient.next() + self.pollTimer.start(int(self.pollPriority)) + + #****************************************************************************************** # #****************************************************************************************** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jU...@us...> - 2007-11-12 10:36:04
|
Revision: 69 http://fclient.svn.sourceforge.net/fclient/?rev=69&view=rev Author: jUrner Date: 2007-11-12 02:36:01 -0800 (Mon, 12 Nov 2007) Log Message: ----------- ... 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-12 10:35:40 UTC (rev 68) +++ trunk/fclient/fclient_ui/fcp_client_manager.py 2007-11-12 10:36:01 UTC (rev 69) @@ -142,7 +142,6 @@ from fclient_lib.fcp.fcp2_0 import FcpClient fcpClient = FcpClient( connectionName=name, - #verbosity=FcpClient.Verbosity.Debug, ) fcpClient.events.ClientConnected += eventConnectedHandler handler = FcpClientHandler( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jU...@us...> - 2007-11-13 20:57:36
|
Revision: 74 http://fclient.svn.sourceforge.net/fclient/?rev=74&view=rev Author: jUrner Date: 2007-11-13 12:57:40 -0800 (Tue, 13 Nov 2007) Log Message: ----------- some more docs 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-13 20:57:13 UTC (rev 73) +++ trunk/fclient/fclient_ui/fcp_client_manager.py 2007-11-13 20:57:40 UTC (rev 74) @@ -261,7 +261,9 @@ def stop(self): - """Stops polling the FcpClient""" + """stops trying to establish a connection to the node stops polling the FcpClient for new messages + @note: it is not guaranteed that connecting and / or polling is stopped emidiately + """ self.connectTimer.stop() self.pollTimer.stop() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |