[tuxdroid-svn] r5953 - 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 12:35:10
|
Author: jerome Date: 2009-12-08 13:13:17 +0100 (Tue, 08 Dec 2009) New Revision: 5953 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py Log: * Handling refused calls. 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 12:12:15 UTC (rev 5952) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2009-12-08 12:13:17 UTC (rev 5953) @@ -139,10 +139,25 @@ def OnIncomingRefused(self, contactHandle): ''' + Incomming call refused because a call is already in progress ''' - pass + #Sending a message to the call partner. + message = "Sorry, I'm already in call, please try again later" + self.synchronious.sendTextMessage(contactHandle, message) + def OnOutgoingRefused(self, contactHandle): + ''' + Outgoing call refused event. + ''' + #Notifying user that his call was refused. + contactTTS = self.synchronious.getTTSName(contactHandle) + self.throwNotification('start') + self.throwMessage('Your call with {0} has been terminated because you are already in call', contactTTS) + self.throwNotification('stop') + + + def OnIncomingCall(self, contactHandle): ''' ''' @@ -154,11 +169,6 @@ ''' pass - - def OnOutgoingRefused(self, contactHandle): - ''' - ''' - pass def OnOutgoingCall(self, contactHandle): @@ -218,8 +228,12 @@ while 1: time.sleep(2.0) #Setting Tux Droid as audio peripheral. - if ( self.synchronious != None ) and ( not self.synchronious.isTuxDroidAudioCard() ): - self.synchronious.setAudioCards() + try: + #in try statement to take calls in care. + if ( self.synchronious != None ) and ( not self.synchronious.isTuxDroidAudioCard() ): + self.synchronious.setAudioCards() + except: + pass |