[tuxdroid-svn] r5950 - software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/execut
Status: Beta
Brought to you by:
ks156
From: jerome <c2m...@c2...> - 2009-12-08 11:01:04
|
Author: jerome Date: 2009-12-08 12:00:52 +0100 (Tue, 08 Dec 2009) New Revision: 5950 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py Log: * Command typo. * Removed unused event. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2009-12-08 10:59:49 UTC (rev 5949) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2009-12-08 11:00:52 UTC (rev 5950) @@ -86,28 +86,29 @@ Plugin entry point. This method should be used to dispatch commands. ''' - if self.getCommand() == "run": - self.run() + if self.getCommand() == "runDaemon": + self.runDaemon() else: - self.run() + self.runDaemon() - def run(self): + def runDaemon(self): ''' Run plugin command. ''' #Initialize skype client and api objects. self.connectorObj = connector.Connector() - self.connectorObj.OnAPIReady = self.initialize - self.connectorObj.start() + self.connectorObj.OnAPIReady = self.initializeDaemon + #Daemon mode, so we don't start skype automatically. + self.connectorObj.start(StartSkype=False) #Finally, starting daemon main loop mainl = threading.Thread(target=self.mainloop) mainl.start() - def initialize(self): + def initializeDaemon(self): ''' Initialize Skype objects and set events handlers. ''' @@ -205,14 +206,8 @@ ''' Event that notify a contact status changed. ''' - #Moved 'INVISIBLE to OFFLINE' in case of contact become ivisible. - if Status == 'INVISIBLE': - Status = 'OFFLINE' - #Getting tts user name. - contactTTS = self.synchronious.getTTSName(UserHandle) - self.throwNotification("start") - self.throwMessage('{0} is now {1}', contactTTS, Status) - self.throwNotification("stop") + #Nothing for this plugin version, maybe later on. + pass @@ -232,8 +227,7 @@ ''' OnPluginStop event. ''' - if self.connectorObj != None: - self.connectorObj.stop() + self.connectorObj.stop() |