Author: jerome
Date: 2009-12-30 19:32:30 +0100 (Wed, 30 Dec 2009)
New Revision: 6025

Modified:
   
software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py
Log:
* Forget to add remote control buttons.

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-30 13:39:30 UTC (rev 6024)
+++ 
software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py
   2009-12-30 18:32:30 UTC (rev 6025)
@@ -191,11 +191,12 @@
     def onPluginEvent(self, eventName, eventValues):
         '''Callback on plugin event.
         '''
+        self.throwTrace(eventValues[0])
         #Start the adequate function for each plugin command.
         if not self.getCommand() == 'run':
             return
         
-        if eventName == 'head':
+        if ( eventName == 'head' ) or ( eventValues[0] in ["K_OK", 
"K_RECEIVECALL", "K_HANGUP"] ):
             #If no commands defined, then quit plugin.
             
             if self.command == "":
@@ -203,23 +204,26 @@
                 
             #Incoming call head button
             if self.command == COMMAND_INCOMING:
-                self.client.notify(ACCEPT_INCOMING)
-                self.command = WAIT_END_CALL
-                self.stopTTS()
+                if ( eventName == 'head' ) or ( eventValues[0] in ["K_OK", 
"K_RECEIVECALL"] ):
+                    self.client.notify(ACCEPT_INCOMING)
+                    self.command = WAIT_END_CALL
+                    self.stopTTS()
             elif self.command == WAIT_END_CALL:
-                self.client.notify(CLOSE_CALL)
+                if ( eventName == 'head' ) or ( eventValues[0] in ["K_OK", 
"K_HANGUP"] ):
+                    self.client.notify(CLOSE_CALL)
             
             #Outgoing call head button
             elif self.command == COMMAND_OUTGOING_USER:
-                self.client.notify(CALL_CONTACT)
-                self.command = WAIT_END_CALL
-                self.stopTTS()
-                self.throwNotification("start")
-                self.throwActuation("openMouth")
-                self.throwActuation("upFlippers")
-                self.throwNotification("stop")
+                if eventValues[0] != "K_HANGUP":
+                    self.client.notify(CALL_CONTACT)
+                    self.command = WAIT_END_CALL
+                    self.stopTTS()
+                    self.throwNotification("start")
+                    self.throwActuation("openMouth")
+                    self.throwActuation("upFlippers")
+                    self.throwNotification("stop")
                 
-        elif eventName == 'left':
+        elif ( eventName == 'left' ) or ( eventValues[0] == "K_LEFT" ):
             #Incoming call left flipper
             if self.command == COMMAND_INCOMING:
                 self.client.notify(REJECT_INCOMING)
@@ -228,7 +232,7 @@
             elif self.command == COMMAND_OUTGOING_USER:
                 self.client.notify(NEXT_CONTACT)
                 
-        elif eventName == 'right':
+        elif ( eventName == 'right' ) or ( eventValues[0] == "K_RIGHT" ):
             #Incoming call right fliper
             if self.command == COMMAND_INCOMING:
                 self.client.notify(REJECT_INCOMING)


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to