tux-droid-svn Mailing List for Tux Droid CE (Page 8)
Status: Beta
Brought to you by:
ks156
You can subscribe to this list here.
2007 |
Jan
|
Feb
(32) |
Mar
(108) |
Apr
(71) |
May
(38) |
Jun
(128) |
Jul
(1) |
Aug
(14) |
Sep
(77) |
Oct
(104) |
Nov
(90) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(81) |
Feb
(18) |
Mar
(40) |
Apr
(102) |
May
(151) |
Jun
(74) |
Jul
(151) |
Aug
(257) |
Sep
(447) |
Oct
(379) |
Nov
(404) |
Dec
(430) |
2009 |
Jan
(173) |
Feb
(236) |
Mar
(519) |
Apr
(300) |
May
(112) |
Jun
(232) |
Jul
(314) |
Aug
(58) |
Sep
(203) |
Oct
(293) |
Nov
(26) |
Dec
(109) |
2010 |
Jan
(19) |
Feb
(25) |
Mar
(33) |
Apr
(1) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: jerome <c2m...@c2...> - 2009-12-04 10:07:11
|
Author: jerome Date: 2009-12-04 11:06:58 +0100 (Fri, 04 Dec 2009) New Revision: 5932 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py Log: * Fixed a bug with sleep function. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-04 10:03:01 UTC (rev 5931) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-04 10:06:58 UTC (rev 5932) @@ -95,7 +95,7 @@ self.connectionObj.getSkypeAPI().Settings.AudioOut = self.OUT self.connectionObj.getSkypeAPI().Settings.Ringer = self.RINGER - sleep(1) + time.sleep(1.0) #Checking if Tux Droid was successfully set as audio card. if self.isTuxDroidAudioCard(): return True @@ -512,7 +512,7 @@ ''' ''' if self.OnlineContactStatusChanged != None: - thread = threading.Thread(target=self.OnlineContactStatusChanged, args = [User.handle, Status]) + thread = threading.Thread(target=self.OnlineContactStatusChanged, args = [User.Handle, Status]) thread.start() |
From: jerome <c2m...@c2...> - 2009-12-04 10:03:18
|
Author: jerome Date: 2009-12-04 11:03:01 +0100 (Fri, 04 Dec 2009) New Revision: 5931 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py Log: * Added contacts status changes to the test. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py 2009-12-03 13:51:26 UTC (rev 5930) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py 2009-12-04 10:03:01 UTC (rev 5931) @@ -97,6 +97,11 @@ ''' print 'Your outgoing call with %s has just finished' % contactHandle + +def onContactChanged(User, Status): + ''' + ''' + print '%s has gone %s' % (User, Status) def start(): ''' @@ -118,6 +123,8 @@ asynchronious.OnOutgoingCall = onOutgoingCall asynchronious.OnOutgoingFinished = onOutgoingFinished + asynchronious.OnlineContactStatusChanged = onContactChanged + synchronious = SynchroniousCommands(SkypeConnection) |
From: jerome <c2m...@c2...> - 2009-12-03 14:15:14
|
Author: jerome Date: 2009-12-03 14:43:20 +0100 (Thu, 03 Dec 2009) New Revision: 5929 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/EmoticonsToAttitunes.py Log: * Added some Skype typical emoticons. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/EmoticonsToAttitunes.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/EmoticonsToAttitunes.py 2009-12-03 12:35:24 UTC (rev 5928) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/EmoticonsToAttitunes.py 2009-12-03 13:43:20 UTC (rev 5929) @@ -11,6 +11,7 @@ '=d' : "msn_laughing", 'lol' : "msn_laughing", 'mdr' : "msn_laughing_wild", + '(rofl)' : "msn_laughing_wild", ':(' : "msn_sad", ':-(' : "msn_sad", ':p' : "msn_sticking_out_tongue", @@ -23,6 +24,7 @@ '(h)' : "msn_yeah", 'b-)' : "msn_yeah", '8-)' : "msn_duh", + '(doh)' : "msn_duh", ':@' : "msn_angry", ':-@' : "msn_angry", 'x(' : "msn_angry", @@ -33,16 +35,22 @@ 'o.o' : "msn_confused", '^o)' : "msn_confused", ':$' : "msn_embarrassed", + '(blush)' : "msn_embarrassed", ':-$' : "msn_embarrassed", ":'(" : "msn_crying", + ";(" : "msn_crying", ":'-(" : "msn_crying", '(a)' : "msn_angel", + '(angel)' : "msn_angel", '8o|' : "msn_angry", '8-|' : "msn_nerd", ':-|' : "msn_disappointed", ':|' : "msn_disappointed", + ':-(' : "msn_disappointed", '+o(' : "msn_sick", + '(puke)' : "msn_sick", '<:o)' : "msn_party", + '(party)' : "msn_party", '|-)' : "msn_asleep", ':-#' : "msn_shh", ':#' : "msn_shh", @@ -50,6 +58,8 @@ ':^)' : "msn_dunno", '*-)' : "msn_dunno", '(l)' : "msn_kiss", + ':*' : "msn_kiss", + '(inlove)' : "msn_kiss", '(u)' : "msn_crying", '(@)' : "msn_cat", '(&)' : "msn_dog", @@ -61,7 +71,9 @@ '(k)' : "msn_kiss", '(6)' : "msn_laughing_evil", ':-[' : "msn_laughing_evil", + ']:)' : "msn_laughing_evil", ':[' : "msn_laughing_evil", + '(devil)' : "msn_laughing_evil", '(o)' : "msn_clock", '(f)' : "msn_kiss", '(ap)' : "msn_airplane", @@ -70,6 +82,7 @@ '(mo)' : "msn_money", '(~)' : "msn_filmstrip", '(b)' : "msn_beer", + '(beer)' : "msn_beer", '(d)' : "msn_martini", '(li)' : "msn_lightning", '(st)' : "msn_stormy", @@ -78,6 +91,7 @@ '(n)' : "msn_disappointed", '(y)' : "msn_yeah", '(c)' : "msn_coffee", + '(coffee)' : "msn_coffee", '(pl)' : "msn_eating", '(pi)' : "msn_eating", '(||)' : "msn_eating", |
From: jerome <c2m...@c2...> - 2009-12-03 13:51:38
|
Author: jerome Date: 2009-12-03 14:51:26 +0100 (Thu, 03 Dec 2009) New Revision: 5930 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py Log: * Emoticons detection only on received message. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-03 13:43:20 UTC (rev 5929) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-03 13:51:26 UTC (rev 5930) @@ -616,26 +616,10 @@ def __on_message_status__(self, Message, Status): ''' ''' - #Checking first for available emoticon, if one found, then do not - #trigger message event BUT emoticon event. - emoticon_available, type = self.__check_emoticons__(Message.Body) - if emoticon_available: - if self.OnAvailableEmoticon != None: - arg = [EMOTICONS_TO_ATTITUNES[type], ] - thread = threading.Thread(target = self.OnAvailableEmoticon, args = arg) - thread.start() - return - #Same as emoticons but with tts sentences. - tts_available, message = self.__check_tts_sentence__(Message.Body) - if tts_available: - if self.OnAvailableTTSSentence != None: - thread = threading.Thread(target = self.OnAvailableTTSSentence, args = [message, ]) - thread.start() - return - exclude_list = ['<partlist', '<part identity', '</name>', '<name>'] exclude_message = False if Status == 'RECEIVED': + #Checking if message body is not empty. #Handle empty lists api case. try: @@ -643,6 +627,24 @@ except: exclude_message = True + + #Checking first for available emoticon, if one found, then do not + #trigger message event BUT emoticon event. + emoticon_available, type = self.__check_emoticons__(Message.Body) + if emoticon_available: + if self.OnAvailableEmoticon != None: + arg = [EMOTICONS_TO_ATTITUNES[type], ] + thread = threading.Thread(target = self.OnAvailableEmoticon, args = arg) + thread.start() + return + #Same as emoticons but with tts sentences. + tts_available, message = self.__check_tts_sentence__(Message.Body) + if tts_available: + if self.OnAvailableTTSSentence != None: + thread = threading.Thread(target = self.OnAvailableTTSSentence, args = [message, ]) + thread.start() + return + #Excluding 'identity call' messages in case of most recent Skype clients. for excluded in exclude_list: |
From: jerome <c2m...@c2...> - 2009-12-03 13:05:04
|
Author: jerome Date: 2009-12-03 13:25:06 +0100 (Thu, 03 Dec 2009) New Revision: 5922 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py Log: * Incomming -> Incoming Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py 2009-12-02 11:35:46 UTC (rev 5921) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py 2009-12-03 12:25:06 UTC (rev 5922) @@ -106,13 +106,13 @@ global synchronious asynchronious = AsynchroniousCommands(SkypeConnection) - asynchronious.OnIncommingMessage = onChatMessage + asynchronious.OnIncomingMessage = onChatMessage asynchronious.OnAvailableEmoticon = onEmoticon asynchronious.OnAvailableTTSSentence = onTTS - asynchronious.OnIncommingCallRefused = onIncomingRefused - asynchronious.OnIncommingCall = onIncomingCall - asynchronious.OnIncommingFinished = onIncomingFinished + asynchronious.OnIncomingCallRefused = onIncomingRefused + asynchronious.OnIncomingCall = onIncomingCall + asynchronious.OnIncomingFinished = onIncomingFinished asynchronious.OnOutgoingCallRefused = onOutgoingRefused asynchronious.OnOutgoingCall = onOutgoingCall |
From: jerome <c2m...@c2...> - 2009-12-03 12:51:55
|
Author: jerome Date: 2009-12-03 13:30:16 +0100 (Thu, 03 Dec 2009) New Revision: 5925 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py Log: Datas -> Data Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-03 12:27:24 UTC (rev 5924) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-03 12:30:16 UTC (rev 5925) @@ -138,22 +138,22 @@ self.currentUser = self.connectionObj.getSkypeAPI().CurrentUser for user in self.connectionObj.getSkypeAPI().Friends: - uDatas = {} - uDatas['handle'] = tounicode(user.Handle) - uDatas['full_name'] = tounicode(user.FullName) - uDatas['display_name'] = tounicode(user.DisplayName) + uData = {} + uData['handle'] = tounicode(user.Handle) + uData['full_name'] = tounicode(user.FullName) + uData['display_name'] = tounicode(user.DisplayName) name = '' #Getting tts name to use. - if uDatas['display_name'] != u'': - name = StringUtils.toPrettyString(uDatas['display_name']) - elif uDatas['full_name'] != u'': - name = StringUtils.toPrettyString(uDatas['full_name']) + if uData['display_name'] != u'': + name = StringUtils.toPrettyString(uData['display_name']) + elif uData['full_name'] != u'': + name = StringUtils.toPrettyString(uData['full_name']) else: - name = StringUtils.toPrettyString(uDatas['handle']) + name = StringUtils.toPrettyString(uData['handle']) - uDatas['name'] = name.lower() - self.contacts.append(uDatas) + uData['name'] = name.lower() + self.contacts.append(uData) finally: self.connectionObj.releaseSkypeLock() return self.contacts @@ -255,22 +255,22 @@ try: #Getting user object. user = self.connectionObj.getSkypeAPI().User(handle) - uDatas = {} - uDatas['handle'] = tounicode(user.Handle) - uDatas['full_name'] = tounicode(user.FullName) - uDatas['display_name'] = tounicode(user.DisplayName) + uData = {} + uData['handle'] = tounicode(user.Handle) + uData['full_name'] = tounicode(user.FullName) + uData['display_name'] = tounicode(user.DisplayName) name = '' #Getting tts name to use. - if tounicode(uDatas['display_name']) != u'': - name = StringUtils.toPrettyString(uDatas['display_name']) - elif tounicode(uDatas['full_name']) != u'': - name = StringUtils.toPrettyString(uDatas['full_name']) + if uData['display_name'] != u'': + name = StringUtils.toPrettyString(uData['display_name']) + elif uData['full_name'] != u'': + name = StringUtils.toPrettyString(uData['full_name']) else: - name = StringUtils.toPrettyString(uDatas['handle']) + name = StringUtils.toPrettyString(uData['handle']) - uDatas['name'] = tounicode(name) - self.contacts.append(uDatas) + uData['name'] = tounicode(name) + self.contacts.append(uData) except: #User was not find raise UserNotFindException() |
From: jerome <c2m...@c2...> - 2009-12-03 12:51:55
|
Author: jerome Date: 2009-12-03 13:33:34 +0100 (Thu, 03 Dec 2009) New Revision: 5927 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml Log: * Updated plugin description. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml 2009-12-03 12:30:56 UTC (rev 5926) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml 2009-12-03 12:33:34 UTC (rev 5927) @@ -14,30 +14,26 @@ <platform>all</platform> </description> <parameters> - <parameter - category="Options" - name="quitGadget" - description="Quit the gadget after a call" - type="boolean" - defaultValue="true" - /> - <parameter - category="Options" - name="startupStatus" - description="Set your status" - type="enum(Keep my current status,Online,Busy,Do not disturb,Away,Skype me,Invisible)" - defaultValue="Keep my current status" - /> </parameters> <commands> - <commands + <command name="run" - description="Takes control of skype" + description="Start Skype notifier" daemon="true" - exclusive="true" - critical="true" - allUserButtons="true"/> + notifier="true" + expiration="1" /> </commands> <tasks> + <task + name="Activation" + description="Activate the Skype notifier" + command="run" + type="once delayed" + activated="false" + + delay="00:00:10" + delayMask="false,false,false" + delayVisible="false" + /> </tasks> </plugin> |
From: jerome <c2m...@c2...> - 2009-12-03 12:51:53
|
Author: jerome Date: 2009-12-03 13:30:56 +0100 (Thu, 03 Dec 2009) New Revision: 5926 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py Log: * Added base plugin. 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-03 12:30:16 UTC (rev 5925) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2009-12-03 12:30:56 UTC (rev 5926) @@ -21,24 +21,26 @@ *''' __author__ = "Conan Jerome" -__appname__ = "Python gadget skype" +__appname__ = "Python skype plugin" __version__ = "0.0.4" __date__ = "2009/06/16" __license__ = "GPL" - + +import os import sys sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) +import time import threading -import utils -import errors import connector -import communicator +from communicator import SynchroniousCommands, AsynchroniousCommands +from errors import EquipmentException, UnavailableContactException, UserNotFindException +from utils import StringUtils from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration from util.SimplePlugin.SimplePlugin import SimplePlugin - class SkypePluginConfiguration(SimplePluginConfiguration): +class SkypePluginConfiguration(SimplePluginConfiguration): ''' Skype plugin configuration. ''' @@ -74,8 +76,6 @@ Skype plugin base class. ''' - canRun = True - #Skype client - api objects. synchronious = None asynchronious = None @@ -113,61 +113,113 @@ ''' #Api ready and connected so creatin other commands objects. self.synchronious = SynchroniousCommands(self.connectorObj) + + #Setting Tux Droid as audio peripheral. + + if not self.synchronious.isTuxDroidAudioCard(): + if not self.synchronious.setAudioCards(): + self.throwNotification("start") + self.throwMessage('An error occured trying to set Tux Droid as audio card.') + self.throwNotification("stop") + + #Initializing contacts list. + #self.connectorObj.getContacts() + #Setting asynchronious obj. self.asynchronious = AsynchroniousCommands(self.connectorObj) #Setting events. - asynchronious.OnIncomingMessage = self.OnChatMessage - asynchronious.OnAvailableEmoticon = self.OnEmoticon - asynchronious.OnAvailableTTSSentence = self.OnTTS + self.asynchronious.OnIncomingMessage = self.OnChatMessage + self.asynchronious.OnAvailableEmoticon = self.OnEmoticon + self.asynchronious.OnAvailableTTSSentence = self.OnTTS - asynchronious.OnIncomingCallRefused = self.OnIncomingRefused - asynchronious.OnIncomingCall = self.OnIncomingCall - asynchronious.OnIncomingFinished = self.OnIncomingFinished + self.asynchronious.OnIncomingCallRefused = self.OnIncomingRefused + self.asynchronious.OnIncomingCall = self.OnIncomingCall + self.asynchronious.OnIncomingFinished = self.OnIncomingFinished - asynchronious.OnOutgoingCallRefused = self.OnOutgoingRefused - asynchronious.OnOutgoingCall = self.OnOutgoingCall - asynchronious.OnOutgoingFinished = self.OnOutgoingFinished + self.asynchronious.OnOutgoingCallRefused = self.OnOutgoingRefused + self.asynchronious.OnOutgoingCall = self.OnOutgoingCall + self.asynchronious.OnOutgoingFinished = self.OnOutgoingFinished + + def OnIncomingRefused(self, contactHandle): + ''' + ''' + pass + + def OnIncomingCall(self, contactHandle): + ''' + ''' + pass + + + def OnIncomingFinished(self, contactHandle): + ''' + ''' + pass + + + def OnOutgoingRefused(self, contactHandle): + ''' + ''' + pass + + + def OnOutgoingCall(self, contactHandle): + ''' + ''' + pass + + + def OnOutgoingFinished(self, contactHandle): + ''' + ''' + pass + + def OnChatMessage(self, contactHandle): ''' Event that notify of incoming chat message. ''' - pass + self.throwNotification("start") + #contactTTS = self.synchronious.getTTSName(contactHandle) + self.throwMessage('You have a message from {0}', contactHandle) + self.throwNotification("stop") def OnEmoticon(self, attName): ''' Event that notify of incoming emoticon. ''' - pass + self.throwNotification("start") + self.throwActuation("playAttitune", attName) + self.throwNotification("stop") def OnTTS(self, sentence): ''' Event that notify a tts sentence to be said by Tux Droid. ''' - pass + self.throwNotification("start") + self.throwMessage(sentence) + self.throwNotification("stop") - def OnincomingRefused - def mainloop(self): ''' Run main loop. ''' - while self.canRun: - sleep(2.0) + while 1: + time.sleep(2.0) def onPluginStop(self): ''' OnPluginStop event. ''' - self.canrun = False - if self.connectorObj is not None: + if self.connectorObj != None: self.connectorObj.stop() @@ -175,4 +227,4 @@ if __name__ == "__main__": plugin = SkypePlugin() plugin.boot(sys.argv[1:], SkypePluginConfiguration()) - \ No newline at end of file + |
From: jerome <c2m...@c2...> - 2009-12-03 12:35:44
|
Author: jerome Date: 2009-12-03 13:35:24 +0100 (Thu, 03 Dec 2009) New Revision: 5928 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/connector.py Log: * Forget to add a parameter. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/connector.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/connector.py 2009-12-03 12:33:34 UTC (rev 5927) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/connector.py 2009-12-03 12:35:24 UTC (rev 5928) @@ -164,7 +164,7 @@ - def __stop__(self): + def __stop__(self, KillClient=False): ''' Stop all connection and close Skyp application if needed. ''' @@ -192,7 +192,7 @@ ''' Stop connection. ''' - self.__stop__() + self.__stop__(KillClient) def startClient(self, OnStarted=None): |
From: jerome <c2m...@c2...> - 2009-12-03 12:28:39
|
Author: jerome Date: 2009-12-03 13:27:24 +0100 (Thu, 03 Dec 2009) New Revision: 5924 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py Log: * Changed the way to check emoticons and tts sentences. * Changed events order. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-03 12:25:41 UTC (rev 5923) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-12-03 12:27:24 UTC (rev 5924) @@ -97,9 +97,9 @@ sleep(1) #Checking if Tux Droid was successfully set as audio card. - if not self.isTuxDroidAudioCard(): - return False - return True + if self.isTuxDroidAudioCard(): + return True + return False except: #Return False, maybe Tux Droid is not connected. return False @@ -145,14 +145,14 @@ name = '' #Getting tts name to use. - if tounicode(uDatas['display_name']) != u'': + if uDatas['display_name'] != u'': name = StringUtils.toPrettyString(uDatas['display_name']) - elif tounicode(uDatas['full_name']) != u'': + elif uDatas['full_name'] != u'': name = StringUtils.toPrettyString(uDatas['full_name']) - else: + else: name = StringUtils.toPrettyString(uDatas['handle']) - uDatas['name'] = tounicode(name).lower() + uDatas['name'] = name.lower() self.contacts.append(uDatas) finally: self.connectionObj.releaseSkypeLock() @@ -464,14 +464,15 @@ OnIncomingCall = None OnIncomingFinished = None - - #@Params : ttsName, skype name otherwise. - OnIncomingMessage = None - + #incoming call was refused because a call is in progress. # Sending event with user handle that tries to call. OnIncomingCallRefused = None + + #@Params : ttsName, skype name otherwise. + OnIncomingMessage = None + #### Outgoing triggered events #### #@Params : ttsName, cut number otherwise. OnOutgoingCall = None @@ -615,11 +616,28 @@ def __on_message_status__(self, Message, Status): ''' ''' + #Checking first for available emoticon, if one found, then do not + #trigger message event BUT emoticon event. + emoticon_available, type = self.__check_emoticons__(Message.Body) + if emoticon_available: + if self.OnAvailableEmoticon != None: + arg = [EMOTICONS_TO_ATTITUNES[type], ] + thread = threading.Thread(target = self.OnAvailableEmoticon, args = arg) + thread.start() + return + #Same as emoticons but with tts sentences. + tts_available, message = self.__check_tts_sentence__(Message.Body) + if tts_available: + if self.OnAvailableTTSSentence != None: + thread = threading.Thread(target = self.OnAvailableTTSSentence, args = [message, ]) + thread.start() + return + exclude_list = ['<partlist', '<part identity', '</name>', '<name>'] exclude_message = False if Status == 'RECEIVED': - - #Checking if message body is not empty. + #Checking if message body is not empty. + #Handle empty lists api case. try: Message.Body.splitlines()[0] except: @@ -643,20 +661,11 @@ #Checking chat state and throwing only if this message #is in the 'missed chats' list. if chat.Name == Message.ChatName: - #throwing event. if self.OnIncomingMessage != None: thread = threading.Thread(target=self.OnIncomingMessage, args=[handle, ]) thread.start() - - #Checking for matching emoticons / attitunes. - emoticons = threading.Thread(target = self.__check_emoticons__(Message.Body)) - emoticons.start() - - #Checking for matching tts requests. - tts = threading.Thread(target = self.__check_tts_sentence__, args=[Message.Body]) - tts.start() - + @@ -667,11 +676,8 @@ # Search for emoticon for emoticon in EMOTICONS_TO_ATTITUNES.keys(): if message.lower().find(emoticon) != -1: - if self.OnAvailableEmoticon != None: - arg = [EMOTICONS_TO_ATTITUNES[emoticon], ] - thread = threading.Thread(target = self.OnAvailableEmoticon, args = arg) - thread.start() - return + return ( True, emoticon ) + return ( False, '' ) def __check_tts_sentence__(self, message): @@ -680,28 +686,15 @@ ''' # speak the text if begin is "tuxdroid>" if message.find('tuxdroid>') == 0: - self.__trigger_tts__(message[9:]) - return + return ( True, message[9:] ) # speak the text if begin is "tuxdroid" if message.find('tuxdroid') == 0: - self.__trigger_tts__(message[8:]) - return + return ( True, message[8:] ) # speak the text if begin is "tux>" if message.find('tux>') == 0: - self.__trigger_tts__(message[4:]) - return + return ( True, message[4:] ) # speak the text if begin is "tux" if message.find('tux') == 0: - self.__trigger_tts__(message[3:]) - return - - - def __trigger_tts__(self, message): - ''' - Trigger the 'tts sentence available' event. - ''' - if self.OnAvailableTTSSentence != None: - thread = threading.Thread(target = self.OnAvailableTTSSentence, args = [message, ]) - thread.start() - - \ No newline at end of file + return ( True, message[3:] ) + return ( False, '' ) + |
From: jerome <c2m...@c2...> - 2009-12-03 12:26:41
|
Author: jerome Date: 2009-12-03 13:25:41 +0100 (Thu, 03 Dec 2009) New Revision: 5923 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py Log: * patern - > pattern Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py 2009-12-03 12:25:06 UTC (rev 5922) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py 2009-12-03 12:25:41 UTC (rev 5923) @@ -294,9 +294,9 @@ ''' Return a string removing all 'not tts pretty' characters. ''' - patern = ['[', '^', '"', ']', '+', ')', '"', '>', '(', '[', '^', '>', ']', '+', '.', + pattern = ['[', '^', '"', ']', '+', ')', '"', '>', '(', '[', '^', '>', ']', '+', '.', ')', '<', '/', '>', '-', '_', '{', '}', '@', '!', '*', '=', ':', ';', ',', "'"] - for rep in patern: + for rep in pattern: myString = myString.replace(rep, ' ') return myString |
From: remi <c2m...@c2...> - 2009-12-02 11:35:57
|
Author: remi Date: 2009-12-02 12:35:46 +0100 (Wed, 02 Dec 2009) New Revision: 5921 Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-merry-tuxmas.py Removed: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py Modified: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/build.py Log: * Fixed plugin filename "Marry" -> "Merry" u_U Modified: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/build.py 2009-12-02 11:34:01 UTC (rev 5920) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/build.py 2009-12-02 11:35:46 UTC (rev 5921) @@ -8,4 +8,4 @@ from builder.PluginPackager import PluginPackager if __name__ == "__main__": - PluginPackager().createScp("plugin-marry-tuxmas.scp") + PluginPackager().createScp("plugin-merry-tuxmas.scp") Deleted: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py 2009-12-02 11:34:01 UTC (rev 5920) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py 2009-12-02 11:35:46 UTC (rev 5921) @@ -1,168 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (C) 2009 Kysoh Sa -# Remi Jocaille <rem...@c2...> -# Distributed under the terms of the GNU General Public License -# http://www.gnu.org/copyleft/gpl.html - -__author__ = "Kysoh" -__appname__ = "Merry Tuxmas" -__version__ = "0.0.1" -__date__ = "2009/12/02" -__license__ = "GPL" - -import os -import time -import sys -import threading -import random - -sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) - -from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration -from util.SimplePlugin.SimplePlugin import SimplePlugin - -ATTIUNE_NAMES_LIST = [ - "12_days", - "Jingle_Bells", - "Merry_Christmas_Song", - "Hohoho", - "Sleigh_bells", - "Hohoho2", - "God_Rest", - "Hark", - "O_Christmas_Tree", - "Deck_The_Halls", -] - -B_DELAY_RARELY = 2000 -B_DELAY_NORMAL = 500 -B_DELAY_OFTEN = 150 -B_DELAY_CRAZY = 30 - -class Configuration(SimplePluginConfiguration): - """This class make an access to the plugin parameters. - Parameters are automatically filled by the SimplePlugin class at plugin - starting. - """ - - def __init__(self): - """Initialization of the class. - It's necessary to initialize the values because the type of the python - variables is set by value assignation. If we don't initialize the - parameters the simple plugin class can't check and validate the values - passed by the plugins server through the os environment variables. - """ - # Call the super class - SimplePluginConfiguration.__init__(self) - # Initialize the parameters - self.__frequency = "" - - def getFrequency(self): - return self.__frequency - - def setFrequency(self, frequency): - self.__frequency = frequency - - -class MerryTuxmasPlugin(SimplePlugin): - """This class override the SimplePlugin class to make easy - the plugin coding. - """ - - def __init__(self): - """Initialization of the class. - """ - # Call the super class - SimplePlugin.__init__(self) - # Initialize some values ... - self.__daemonRun = False - self.__daemonRunMutex = threading.Lock() - self.__bDelay = B_DELAY_NORMAL - self.__iDelay = B_DELAY_NORMAL - self.__iTimeBegin = time.time() - self.__iDelayMutex = threading.Lock() - random.seed() - - def start(self): - """Plugin entry point. - This method should be used to dispatch commands. - """ - if self.getCommand() == "run": - self.run() - else: - self.run() - - def __getDaemonRun(self): - """ - """ - self.__daemonRunMutex.acquire() - result = self.__daemonRun - self.__daemonRunMutex.release() - return result - - def __setDaemonRun(self, daemonRun): - """ - """ - self.__daemonRunMutex.acquire() - self.__daemonRun = daemonRun - self.__daemonRunMutex.release() - - def __getIdleTimeBegin(self): - """ - """ - self.__iDelayMutex.acquire() - value = self.__iTimeBegin - self.__iDelayMutex.release() - return value - - def __resetIdleTimeBegin(self): - """ - """ - self.__iDelayMutex.acquire() - self.__iTimeBegin = time.time() - tmp = random.randint(-(self.__bDelay / 3), (self.__bDelay / 3)) - self.__iDelay = self.__bDelay + tmp - self.__iDelayMutex.release() - - def run(self): - """Plugin entry point for the "run" command. - """ - frequency = self.configuration().getFrequency() - if frequency == "Rarely": - self.__bDelay = B_DELAY_RARELY - elif frequency == "Normal": - self.__bDelay = B_DELAY_NORMAL - elif frequency == "Often": - self.__bDelay = B_DELAY_OFTEN - else: - self.__bDelay = B_DELAY_CRAZY - self.__resetIdleTimeBegin() - self.__setDaemonRun(True) - while self.__getDaemonRun(): - if (time.time() - self.__getIdleTimeBegin()) >= self.__iDelay: - self.__resetIdleTimeBegin() - idx = random.randint(0, len(ATTIUNE_NAMES_LIST) - 1) - self.throwNotification("start") - self.throwActuation("playAttitune", ATTIUNE_NAMES_LIST[idx]) - self.throwNotification("stop") - for i in range(10): - if not self.__getDaemonRun(): - break - time.sleep(0.25) - - def onPluginStop(self): - """Callback on plugin stop. - """ - self.__setDaemonRun(False) - - def onPluginEvent(self, eventName, eventValues): - """Callback on plugin event. - @param eventName: Event name. - @param eventValues: Event values. - """ - pass - -if __name__ == "__main__": - plugin = MerryTuxmasPlugin() - plugin.boot(sys.argv[1:], Configuration()) Copied: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-merry-tuxmas.py (from rev 5920, software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py) =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-merry-tuxmas.py (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-merry-tuxmas.py 2009-12-02 11:35:46 UTC (rev 5921) @@ -0,0 +1,168 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Kysoh Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +__author__ = "Kysoh" +__appname__ = "Merry Tuxmas" +__version__ = "0.0.1" +__date__ = "2009/12/02" +__license__ = "GPL" + +import os +import time +import sys +import threading +import random + +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + +from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration +from util.SimplePlugin.SimplePlugin import SimplePlugin + +ATTIUNE_NAMES_LIST = [ + "12_days", + "Jingle_Bells", + "Merry_Christmas_Song", + "Hohoho", + "Sleigh_bells", + "Hohoho2", + "God_Rest", + "Hark", + "O_Christmas_Tree", + "Deck_The_Halls", +] + +B_DELAY_RARELY = 2000 +B_DELAY_NORMAL = 500 +B_DELAY_OFTEN = 150 +B_DELAY_CRAZY = 30 + +class Configuration(SimplePluginConfiguration): + """This class make an access to the plugin parameters. + Parameters are automatically filled by the SimplePlugin class at plugin + starting. + """ + + def __init__(self): + """Initialization of the class. + It's necessary to initialize the values because the type of the python + variables is set by value assignation. If we don't initialize the + parameters the simple plugin class can't check and validate the values + passed by the plugins server through the os environment variables. + """ + # Call the super class + SimplePluginConfiguration.__init__(self) + # Initialize the parameters + self.__frequency = "" + + def getFrequency(self): + return self.__frequency + + def setFrequency(self, frequency): + self.__frequency = frequency + + +class MerryTuxmasPlugin(SimplePlugin): + """This class override the SimplePlugin class to make easy + the plugin coding. + """ + + def __init__(self): + """Initialization of the class. + """ + # Call the super class + SimplePlugin.__init__(self) + # Initialize some values ... + self.__daemonRun = False + self.__daemonRunMutex = threading.Lock() + self.__bDelay = B_DELAY_NORMAL + self.__iDelay = B_DELAY_NORMAL + self.__iTimeBegin = time.time() + self.__iDelayMutex = threading.Lock() + random.seed() + + def start(self): + """Plugin entry point. + This method should be used to dispatch commands. + """ + if self.getCommand() == "run": + self.run() + else: + self.run() + + def __getDaemonRun(self): + """ + """ + self.__daemonRunMutex.acquire() + result = self.__daemonRun + self.__daemonRunMutex.release() + return result + + def __setDaemonRun(self, daemonRun): + """ + """ + self.__daemonRunMutex.acquire() + self.__daemonRun = daemonRun + self.__daemonRunMutex.release() + + def __getIdleTimeBegin(self): + """ + """ + self.__iDelayMutex.acquire() + value = self.__iTimeBegin + self.__iDelayMutex.release() + return value + + def __resetIdleTimeBegin(self): + """ + """ + self.__iDelayMutex.acquire() + self.__iTimeBegin = time.time() + tmp = random.randint(-(self.__bDelay / 3), (self.__bDelay / 3)) + self.__iDelay = self.__bDelay + tmp + self.__iDelayMutex.release() + + def run(self): + """Plugin entry point for the "run" command. + """ + frequency = self.configuration().getFrequency() + if frequency == "Rarely": + self.__bDelay = B_DELAY_RARELY + elif frequency == "Normal": + self.__bDelay = B_DELAY_NORMAL + elif frequency == "Often": + self.__bDelay = B_DELAY_OFTEN + else: + self.__bDelay = B_DELAY_CRAZY + self.__resetIdleTimeBegin() + self.__setDaemonRun(True) + while self.__getDaemonRun(): + if (time.time() - self.__getIdleTimeBegin()) >= self.__iDelay: + self.__resetIdleTimeBegin() + idx = random.randint(0, len(ATTIUNE_NAMES_LIST) - 1) + self.throwNotification("start") + self.throwActuation("playAttitune", ATTIUNE_NAMES_LIST[idx]) + self.throwNotification("stop") + for i in range(10): + if not self.__getDaemonRun(): + break + time.sleep(0.25) + + def onPluginStop(self): + """Callback on plugin stop. + """ + self.__setDaemonRun(False) + + def onPluginEvent(self, eventName, eventValues): + """Callback on plugin event. + @param eventName: Event name. + @param eventValues: Event values. + """ + pass + +if __name__ == "__main__": + plugin = MerryTuxmasPlugin() + plugin.boot(sys.argv[1:], Configuration()) |
From: remi <c2m...@c2...> - 2009-12-02 11:34:14
|
Author: remi Date: 2009-12-02 12:34:01 +0100 (Wed, 02 Dec 2009) New Revision: 5920 Modified: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py Log: * Typo fixes "Marry" -> "Merry" u_U Modified: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py 2009-12-02 09:42:11 UTC (rev 5919) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py 2009-12-02 11:34:01 UTC (rev 5920) @@ -6,7 +6,7 @@ # http://www.gnu.org/copyleft/gpl.html __author__ = "Kysoh" -__appname__ = "Marry Tuxmas" +__appname__ = "Merry Tuxmas" __version__ = "0.0.1" __date__ = "2009/12/02" __license__ = "GPL" @@ -23,7 +23,7 @@ from util.SimplePlugin.SimplePlugin import SimplePlugin ATTIUNE_NAMES_LIST = [ - "12_days", + "12_days", "Jingle_Bells", "Merry_Christmas_Song", "Hohoho", @@ -65,7 +65,7 @@ self.__frequency = frequency -class MarryTuxmasPlugin(SimplePlugin): +class MerryTuxmasPlugin(SimplePlugin): """This class override the SimplePlugin class to make easy the plugin coding. """ @@ -164,5 +164,5 @@ pass if __name__ == "__main__": - plugin = MarryTuxmasPlugin() + plugin = MerryTuxmasPlugin() plugin.boot(sys.argv[1:], Configuration()) |
From: remi <c2m...@c2...> - 2009-12-02 09:42:30
|
Author: remi Date: 2009-12-02 10:42:11 +0100 (Wed, 02 Dec 2009) New Revision: 5919 Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/de.po software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/de.wiki software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/en.po software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/en.wiki software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/fr.po software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/fr.wiki software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.png software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.pot software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.xml software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/help.wiki software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/nl.po software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/nl.wiki Modified: software_suite_v3/software/gadget/default/trunk/build.py software_suite_v3/software/gadget/default/trunk/names_to_uuids_list.txt Log: * Added gadget "Marry Tuxmas" Modified: software_suite_v3/software/gadget/default/trunk/build.py =================================================================== --- software_suite_v3/software/gadget/default/trunk/build.py 2009-12-02 09:34:32 UTC (rev 5918) +++ software_suite_v3/software/gadget/default/trunk/build.py 2009-12-02 09:42:11 UTC (rev 5919) @@ -21,6 +21,7 @@ "gadget_84628d00-1e17-62dd-eaa4-7b11436f3211", "gadget_d71cec40-c44e-73d7-e63f-a152986354e0", "gadget_06d0b3ba-7781-4d2d-bd48-520cfa18e0c9", + "gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051", ] # ============================================================================== Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/de.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/de.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/de.po 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,8 @@ +msgid "Sense of humor" +msgstr "Merry Tuxmas" + +msgid "Sense of humor behavior for Tux Droid." +msgstr "Merry Tuxmas." + +msgid "This gadget will add funny ambient behavior to your Tux Droid." +msgstr "The Merry Tuxmas gadget will bring the Christmas spirit to your home!" Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/de.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/de.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/de.wiki 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,10 @@ += Description = +The Merry Tuxmas gadget will bring the Christmas spirit to your home! +Every now and then Tux Droid will play a Christmas style attitune to get you in the right Christmas mood. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Frequency :''' Specify the frequency to play Christmas attitunes. + += Alerts = +* '''Activate Merry Tuxmas :''' To activate or disactivate the gadget function. Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/en.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/en.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/en.po 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,8 @@ +msgid "Sense of humor" +msgstr "Merry Tuxmas" + +msgid "Sense of humor behavior for Tux Droid." +msgstr "Merry Tuxmas." + +msgid "This gadget will add funny ambient behavior to your Tux Droid." +msgstr "The Merry Tuxmas gadget will bring the Christmas spirit to your home!" \ No newline at end of file Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/en.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/en.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/en.wiki 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,10 @@ += Description = +The Merry Tuxmas gadget will bring the Christmas spirit to your home! +Every now and then Tux Droid will play a Christmas style attitune to get you in the right Christmas mood. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Frequency :''' Specify the frequency to play Christmas attitunes. + += Alerts = +* '''Activate Merry Tuxmas :''' To activate or disactivate the gadget function. \ No newline at end of file Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/fr.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/fr.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/fr.po 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,8 @@ +msgid "Sense of humor" +msgstr "Merry Tuxmas" + +msgid "Sense of humor behavior for Tux Droid." +msgstr "Merry Tuxmas." + +msgid "This gadget will add funny ambient behavior to your Tux Droid." +msgstr "Le gadget 'Merry Tuxmas' va faire entrer l'esprit de noël chez vous !" Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/fr.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/fr.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/fr.wiki 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,10 @@ += Description = +Le gadget 'Merry Tuxmas' va faire entrer l'esprit de Noël chez vous ! +De temps en temps, Tux Droid jouera une attitune Noël pour vous insuffler la bonne humeur de Noël. + += Configurations = +* '''Nom du gadget :''' Vous permet de modifier le nom du gadget. +* '''Fréquence :''' Spécifie la fréquence à laquelle les attitunes seront jouées. + += Alertes = +* '''Activer '''''''Merry Tuxmas''''''' :''' Pour activer ou désactiver le gadget. \ No newline at end of file Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.pot =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.pot (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.pot 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,8 @@ +msgid "Sense of humor" +msgstr "" + +msgid "Sense of humor behavior for Tux Droid." +msgstr "" + +msgid "This gadget will add funny ambient behavior to your Tux Droid." +msgstr "" Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.xml =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.xml (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/gadget.xml 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,43 @@ +<gadget> + <description> + <author>Kysoh</author> + <category>Misc</category> + <defaultLanguage>all</defaultLanguage> + <description>This gadget will add funny ambient behavior to your Tux Droid.</description> + <iconFile>gadget.png</iconFile> + <name>Sense of humor</name> + <onDemandIsAble>false</onDemandIsAble> + <platform>all</platform> + <ttsName>Sense of humor behavior for Tux Droid.</ttsName> + <uuid>4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051</uuid> + <version>0.0.2</version> + </description> + <parameters> + <param_00> + <defaultValue>Normal</defaultValue> + <name>frequency</name> + <visible>true</visible> + </param_00> + <param_01> + <defaultValue> </defaultValue> + <name>locutor</name> + <visible>false</visible> + </param_01> + </parameters> + <parentPlugin> + <url>http://ftp.kysoh.com/</url> + <uuid>110fb66f-d33e-4abf-a692-02659aa0a314</uuid> + <version>0.0.1</version> + </parentPlugin> + <tasks> + <task_00> + <activated>true</activated> + <date>0000/00/00</date> + <delay>00:00:10</delay> + <hoursBegin>00:00:00</hoursBegin> + <hoursEnd>23:59:59</hoursEnd> + <name>Activation</name> + <weekMask>true,true,true,true,true,true,true</weekMask> + </task_00> + </tasks> +</gadget> Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/help.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/help.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/help.wiki 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,10 @@ += Description = +The Merry Tuxmas gadget will bring the Christmas Spirit to your home! +Every now and then Tux Droid will play a Christmas style attitune to get you in the right Christmas mood. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Frequency :''' Specify the frequency to play Christmas attitunes. + += Alerts = +* '''Activate Merry Tuxmas :''' To activate or disactivate the gadget function. \ No newline at end of file Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/nl.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/nl.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/nl.po 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,8 @@ +msgid "Sense of humor" +msgstr "Merry Tuxmas" + +msgid "Sense of humor behavior for Tux Droid." +msgstr "Merry Tuxmas." + +msgid "This gadget will add funny ambient behavior to your Tux Droid." +msgstr "De Merry Tuxmas gadget brengt de kerstsfeer bij je thuis !" \ No newline at end of file Added: software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/nl.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/nl.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051/nl.wiki 2009-12-02 09:42:11 UTC (rev 5919) @@ -0,0 +1,10 @@ += Beschrijving = +De Merry Tuxmas gadget brengt de kerstsfeer bij je thuis ! +Af en toe zal Tux Droid een attitune in kerststijl afspelen om je in de juiste kerststemming te brengen. + += Configuratie = +* '''Gadget naam :''' Hier kan je de naam van de gadget wijzigen. +* '''Frequentie :''' Bepaal hoe vaak je een Kerstmis attitune wil afspelen. + += Alarmen = +* '''Activeer Merry Tuxmas :''' Activeer of desactiveer de gadget functie. \ No newline at end of file Modified: software_suite_v3/software/gadget/default/trunk/names_to_uuids_list.txt =================================================================== --- software_suite_v3/software/gadget/default/trunk/names_to_uuids_list.txt 2009-12-02 09:34:32 UTC (rev 5918) +++ software_suite_v3/software/gadget/default/trunk/names_to_uuids_list.txt 2009-12-02 09:42:11 UTC (rev 5919) @@ -8,4 +8,5 @@ Sense of humor : 710c4d99-9a26-b7c4-67e5-dabf78718462 E-Mail : 84628d00-1e17-62dd-eaa4-7b11436f3211 GMail : 06d0b3ba-7781-4d2d-bd48-520cfa18e0c9 -RSS : d71cec40-c44e-73d7-e63f-a152986354e0 \ No newline at end of file +RSS : d71cec40-c44e-73d7-e63f-a152986354e0 +Marry Tuxmas : 4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051 \ No newline at end of file |
From: remi <c2m...@c2...> - 2009-12-02 09:34:57
|
Author: remi Date: 2009-12-02 10:34:32 +0100 (Wed, 02 Dec 2009) New Revision: 5918 Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/ software_suite_v3/software/plugin/plugin-merry-tuxmas/branches/ software_suite_v3/software/plugin/plugin-merry-tuxmas/tags/ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/LICENSE software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/build.py software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/__init__.py software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/version.py software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/dos.bat software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/12_days.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Deck_The_Halls.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/God_Rest.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Hark.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Hohoho.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Hohoho2.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Jingle_Bells.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Merry_Christmas_Song.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/O_Christmas_Tree.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Sleigh_bells.att software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/de.po software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/de.wiki software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/en.po software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/en.wiki software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/fr.po software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/fr.wiki software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/help.wiki software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/icon.png software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/nl.po software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/nl.wiki software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/plugin.xml Log: * Added plugin "Marry Tuxmas" Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/LICENSE 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/build.py 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +# Copyleft (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +from builder.PluginPackager import PluginPackager + +if __name__ == "__main__": + PluginPackager().createScp("plugin-marry-tuxmas.scp") Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/PluginPackager.py 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyleft (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +import os +from zipfile import * + +from util.misc.DirectoriesAndFilesTools import * + +# ------------------------------------------------------------------------------ +# Class to create a SCP file from the main directory of a python plugin project. +# ------------------------------------------------------------------------------ +class PluginPackager(object): + """Class to create a SCP file from the main directory of a python plugin + project. + """ + + # -------------------------------------------------------------------------- + # Create a scp file. + # -------------------------------------------------------------------------- + def createScp(self, scpFileName): + """Create a scp file. + @param scpFileName: Smart-Core Plugin file name. + @return: The success of the file creation. + """ + self.__sourcePath = os.path.realpath("") + if not os.path.isdir(self.__sourcePath): + return False + if not os.path.isdir(os.path.join(self.__sourcePath, "executables")): + return False + if not os.path.isdir(os.path.join(self.__sourcePath, "resources")): + return False + # Get some paths + SRC_EXECUTABLES_PATH = os.path.join(self.__sourcePath, "executables") + SRC_RESOURCES_PATH = os.path.join(self.__sourcePath, "resources") + TMP_BUILD_PATH = os.path.join(self.__sourcePath, "tmp") + DEST_EXECUTABLES_PATH = os.path.join(TMP_BUILD_PATH, "executables") + DEST_RESOURCES_PATH = os.path.join(TMP_BUILD_PATH, "resources") + DEST_SCP_FILENAME = os.path.join(self.__sourcePath, scpFileName) + # Create the temporary build path + MKDirsF(TMP_BUILD_PATH) + # Copy "executables" directory + CPDir(SRC_EXECUTABLES_PATH, DEST_EXECUTABLES_PATH) + # Copy "resources" directory + CPDir(SRC_RESOURCES_PATH, DEST_RESOURCES_PATH) + # Filtering the content of temporary path + RMWithFilters(TMP_BUILD_PATH, filters = ['.svn', '.pyc']) + # Create a zip file + directory = TMP_BUILD_PATH + last_cwd = os.getcwd() + os.chdir(TMP_BUILD_PATH) + zf = ZipFile(DEST_SCP_FILENAME, 'w', compression = ZIP_DEFLATED) + def walker(zip, directory, files, root = directory): + for file in files: + file = os.path.join(directory, file) + name = file[len(TMP_BUILD_PATH) + 1:] + if os.path.isfile(file): + zip.write(file, name, ZIP_DEFLATED) + elif os.path.isdir(file): + file = os.path.join(file, "") + name = os.path.join(name, "") + zip.writestr(name, name) + os.path.walk(TMP_BUILD_PATH, walker, zf) + zf.close() + os.chdir(os.path.abspath(last_cwd)) + # Remove the temporary directory + RMDirs(TMP_BUILD_PATH) + return True Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/__init__.py =================================================================== Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/__init__.py =================================================================== Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyleft (C) 2008 Acness World +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +import os +import shutil + +if os.name == 'nt': + import win32con + import win32file + +# ============================================================================== +# Public functions +# ============================================================================== + +# ------------------------------------------------------------------------------ +# Force to create a directories tree if not exists. +# ------------------------------------------------------------------------------ +def MKDirs(path): + """Force to create a directories tree if not exists. + @param path: Directory path. + """ + if not os.path.isdir(path): + try: + os.makedirs(path) + except: + pass + +# ------------------------------------------------------------------------------ +# Force to create a directories tree after having deleted the old one. +# ------------------------------------------------------------------------------ +def MKDirsF(path): + """Force to create a directories tree after having deleted the old one. + @param path: Directory path. + """ + if os.path.isdir(path): + RMDirs(path) + os.makedirs(path) + +# ------------------------------------------------------------------------------ +# Remove directories and files recursively. +# ------------------------------------------------------------------------------ +def RMDirs(path): + """Remove directories and files recursively. + @param path: Path of the base directory. + """ + if not os.path.isdir(path): + return + for root, dirs, files in os.walk(path, topdown = False): + for d in dirs: + try: + os.removedirs(os.path.join(root, d)) + except: + pass + for f in files: + try: + if os.name == 'nt': + win32file.SetFileAttributesW(os.path.join(root, f), + win32con.FILE_ATTRIBUTE_NORMAL) + os.remove(os.path.join(root, f)) + except: + pass + if os.path.isdir(path): + try: + os.removedirs(path) + except: + pass + +# ------------------------------------------------------------------------------ +# Remove directories and files recursively with filters. +# ------------------------------------------------------------------------------ +def RMWithFilters(path, filters = ['.pyc', '.pyo']): + """Remove directories and files recursively with filters. + @param path: Path of the base directory. + @param filters: Filters as list. + """ + def checkFilter(name): + for filter in filters: + if name.lower().find(filter.lower()) == (len(name) - len(filter)): + return True + return False + + if not os.path.isdir(path): + return + + for root, dirs, files in os.walk(path, topdown = False): + for d in dirs: + if checkFilter(os.path.join(root, d)): + try: + RMDirs(os.path.join(root, d)) + except: + pass + for f in files: + if checkFilter(os.path.join(root, f)): + try: + if os.name == 'nt': + win32file.SetFileAttributesW(os.path.join(root, f), + win32con.FILE_ATTRIBUTE_NORMAL) + os.remove(os.path.join(root, f)) + except: + pass + +# ------------------------------------------------------------------------------ +# Remove a file. +# ------------------------------------------------------------------------------ +def RMFile(path): + """Remove a file. + @param path: File path. + """ + if os.path.isfile(path): + try: + if os.name == 'nt': + win32file.SetFileAttributesW(path, + win32con.FILE_ATTRIBUTE_NORMAL) + os.remove(path) + except: + pass + +# ------------------------------------------------------------------------------ +# Copy a directories tree to another directory. +# ------------------------------------------------------------------------------ +def CPDir(src, dest): + """Copy a directories tree to another directory. + @param src: Source path. + @param dest: Destination path. + """ + if not os.path.isdir(src): + return + if os.path.isdir(dest): + RMDirs(dest) + shutil.copytree(src, dest) + +# ------------------------------------------------------------------------------ +# Retrieve the OS temporary directory. +# ------------------------------------------------------------------------------ +def GetOSTMPDir(): + """Retrieve the OS temporary directory. + @return: The OS temporary directory. + """ + result = None + # On Windows + if os.name == 'nt': + result = os.environ.get('tmp') + if result == None: + result = os.environ.get('temp') + if result == None: + result = "c:\\windows\\temp" + # On linux + else: + result = "/tmp" + return result Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/__init__.py =================================================================== Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/util/misc/version.py 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +"""Version data for tuxisalive.lib.Util""" + +__author__ = "Remi Jocaille (rem...@c2...)" + +# Copyleft (C) 2008 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +name = 'util.misc' +version = '0.0.1' +author = "Remi Jocaille (rem...@c2...)" + +description = "Utilities libraries." + +licence = "GPL" +date = "December 2008" Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/builder/version.py 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,9 @@ +# Copyleft (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +version = '0.0.1' +author = "Remi Jocaille (rem...@c2...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/dos.bat =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/dos.bat (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/dos.bat 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1 @@ +python build.py \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/executables/plugin-marry-tuxmas.py 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,168 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Kysoh Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +__author__ = "Kysoh" +__appname__ = "Marry Tuxmas" +__version__ = "0.0.1" +__date__ = "2009/12/02" +__license__ = "GPL" + +import os +import time +import sys +import threading +import random + +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + +from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration +from util.SimplePlugin.SimplePlugin import SimplePlugin + +ATTIUNE_NAMES_LIST = [ + "12_days", + "Jingle_Bells", + "Merry_Christmas_Song", + "Hohoho", + "Sleigh_bells", + "Hohoho2", + "God_Rest", + "Hark", + "O_Christmas_Tree", + "Deck_The_Halls", +] + +B_DELAY_RARELY = 2000 +B_DELAY_NORMAL = 500 +B_DELAY_OFTEN = 150 +B_DELAY_CRAZY = 30 + +class Configuration(SimplePluginConfiguration): + """This class make an access to the plugin parameters. + Parameters are automatically filled by the SimplePlugin class at plugin + starting. + """ + + def __init__(self): + """Initialization of the class. + It's necessary to initialize the values because the type of the python + variables is set by value assignation. If we don't initialize the + parameters the simple plugin class can't check and validate the values + passed by the plugins server through the os environment variables. + """ + # Call the super class + SimplePluginConfiguration.__init__(self) + # Initialize the parameters + self.__frequency = "" + + def getFrequency(self): + return self.__frequency + + def setFrequency(self, frequency): + self.__frequency = frequency + + +class MarryTuxmasPlugin(SimplePlugin): + """This class override the SimplePlugin class to make easy + the plugin coding. + """ + + def __init__(self): + """Initialization of the class. + """ + # Call the super class + SimplePlugin.__init__(self) + # Initialize some values ... + self.__daemonRun = False + self.__daemonRunMutex = threading.Lock() + self.__bDelay = B_DELAY_NORMAL + self.__iDelay = B_DELAY_NORMAL + self.__iTimeBegin = time.time() + self.__iDelayMutex = threading.Lock() + random.seed() + + def start(self): + """Plugin entry point. + This method should be used to dispatch commands. + """ + if self.getCommand() == "run": + self.run() + else: + self.run() + + def __getDaemonRun(self): + """ + """ + self.__daemonRunMutex.acquire() + result = self.__daemonRun + self.__daemonRunMutex.release() + return result + + def __setDaemonRun(self, daemonRun): + """ + """ + self.__daemonRunMutex.acquire() + self.__daemonRun = daemonRun + self.__daemonRunMutex.release() + + def __getIdleTimeBegin(self): + """ + """ + self.__iDelayMutex.acquire() + value = self.__iTimeBegin + self.__iDelayMutex.release() + return value + + def __resetIdleTimeBegin(self): + """ + """ + self.__iDelayMutex.acquire() + self.__iTimeBegin = time.time() + tmp = random.randint(-(self.__bDelay / 3), (self.__bDelay / 3)) + self.__iDelay = self.__bDelay + tmp + self.__iDelayMutex.release() + + def run(self): + """Plugin entry point for the "run" command. + """ + frequency = self.configuration().getFrequency() + if frequency == "Rarely": + self.__bDelay = B_DELAY_RARELY + elif frequency == "Normal": + self.__bDelay = B_DELAY_NORMAL + elif frequency == "Often": + self.__bDelay = B_DELAY_OFTEN + else: + self.__bDelay = B_DELAY_CRAZY + self.__resetIdleTimeBegin() + self.__setDaemonRun(True) + while self.__getDaemonRun(): + if (time.time() - self.__getIdleTimeBegin()) >= self.__iDelay: + self.__resetIdleTimeBegin() + idx = random.randint(0, len(ATTIUNE_NAMES_LIST) - 1) + self.throwNotification("start") + self.throwActuation("playAttitune", ATTIUNE_NAMES_LIST[idx]) + self.throwNotification("stop") + for i in range(10): + if not self.__getDaemonRun(): + break + time.sleep(0.25) + + def onPluginStop(self): + """Callback on plugin stop. + """ + self.__setDaemonRun(False) + + def onPluginEvent(self, eventName, eventValues): + """Callback on plugin event. + @param eventName: Event name. + @param eventValues: Event values. + """ + pass + +if __name__ == "__main__": + plugin = MarryTuxmasPlugin() + plugin.boot(sys.argv[1:], Configuration()) Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/12_days.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/12_days.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Deck_The_Halls.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Deck_The_Halls.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/God_Rest.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/God_Rest.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Hark.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Hark.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Hohoho.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Hohoho.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Hohoho2.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Hohoho2.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Jingle_Bells.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Jingle_Bells.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Merry_Christmas_Song.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Merry_Christmas_Song.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/O_Christmas_Tree.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/O_Christmas_Tree.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Sleigh_bells.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/attitunes/Sleigh_bells.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/de.po =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/de.po (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/de.po 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,23 @@ +msgid "Plugin Sense of humor" +msgstr "Merry Tuxmas plugin" + +msgid "Plugin Sense of humor." +msgstr "Merry Tuxmas plugin." + +msgid "Sense of humor..." +msgstr "Merry Tuxmas..." + +msgid "Frequency" +msgstr "Frequency" + +msgid "Crazy,Often,Normal,Rarely" +msgstr "Crazy,Often,Normal,Rarely" + +msgid "Start the idle behavior" +msgstr "Activate Merry Tuxmas" + +msgid "Activation" +msgstr "Activation" + +msgid "Activate Sense of humor behavior" +msgstr "Activate Merry Tuxmas" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/de.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/de.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/de.wiki 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,3 @@ += Übersicht = +Dies ist das Plugin für die Funktionen von 'Sense of humor'. Die Funktion von 'Sense of humor' startet ihre Jingles in Zufallsintervallen. + Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/en.po (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/en.po 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,23 @@ +msgid "Plugin Sense of humor" +msgstr "Merry Tuxmas plugin" + +msgid "Plugin Sense of humor." +msgstr "Merry Tuxmas plugin." + +msgid "Sense of humor..." +msgstr "Merry Tuxmas..." + +msgid "Frequency" +msgstr "Frequency" + +msgid "Crazy,Often,Normal,Rarely" +msgstr "Crazy,Often,Normal,Rarely" + +msgid "Start the idle behavior" +msgstr "Activate Merry Tuxmas" + +msgid "Activation" +msgstr "Activation" + +msgid "Activate Sense of humor behavior" +msgstr "Activate Merry Tuxmas" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/en.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/en.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/en.wiki 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,2 @@ += Synopsis = +This is the plugin for the sense of humor function. The sense of humor function will start funny attitunes at a random interval. Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/fr.po (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/fr.po 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,23 @@ +msgid "Plugin Sense of humor" +msgstr "Plugin Merry Tuxmas" + +msgid "Plugin Sense of humor." +msgstr "Plugin Merry Tuxmas." + +msgid "Sense of humor..." +msgstr "Merry Tuxmas..." + +msgid "Frequency" +msgstr "Fréquence" + +msgid "Crazy,Often,Normal,Rarely" +msgstr "Fou,Souvent,Normal,Rarement" + +msgid "Start the idle behavior" +msgstr "Démarrer Merry Tuxmas" + +msgid "Activation" +msgstr "Activation" + +msgid "Activate Sense of humor behavior" +msgstr "Activer Merry Tuxmas" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/fr.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/fr.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/fr.wiki 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,2 @@ += Synopsis = +Ceci est le plugin pour la fonction "sens de l'humour". La fonction "sens de l'humour" démarre aléatoirement des attitunes. Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/help.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/help.wiki 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,2 @@ += Synopsis = +This is the plugin for the sense of humor function. The sense of humor function will start funny attitunes at a random interval. Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/icon.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/icon.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/nl.po (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/nl.po 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,23 @@ +msgid "Merry Tuxmas plugin" +msgstr "Merry Tuxmas" + +msgid "Plugin Sense of humor." +msgstr "Merry Tuxmas." + +msgid "Sense of humor..." +msgstr "Merry Tuxmas..." + +msgid "Frequency" +msgstr "Frequentie" + +msgid "Crazy,Often,Normal,Rarely" +msgstr "Overdreven,Vaak,Normaal,Zelden" + +msgid "Start the idle behavior" +msgstr "Activeer Merry Tuxmas" + +msgid "Activation" +msgstr "Activatie" + +msgid "Activate Sense of humor behavior" +msgstr "Activeer Merry Tuxmas" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/nl.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/nl.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/nl.wiki 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,2 @@ += Synopsis = +Dit is de plugin voor zin voor humor. De zin voor humor functie zal grappigge attitunes starten op random intervallen. Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/plugin.pot (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/plugin.pot 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,23 @@ +msgid "Plugin Sense of humor" +msgstr "" + +msgid "Plugin Sense of humor." +msgstr "" + +msgid "Sense of humor..." +msgstr "" + +msgid "Frequency" +msgstr "" + +msgid "Crazy,Often,Normal,Rarely" +msgstr "" + +msgid "Start the idle behavior" +msgstr "" + +msgid "Activation" +msgstr "" + +msgid "Activate Sense of humor behavior" +msgstr "" Added: software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/plugin.xml (rev 0) +++ software_suite_v3/software/plugin/plugin-merry-tuxmas/trunk/resources/plugin.xml 2009-12-02 09:34:32 UTC (rev 5918) @@ -0,0 +1,49 @@ +<plugin> + <interpreter + kind="python"> + <executable>executables/plugin-marry-tuxmas.py</executable> + </interpreter> + <description> + <name>Plugin Sense of humor</name> + <ttsName>Plugin Sense of humor.</ttsName> + <description>Sense of humor...</description> + <author>Kysoh</author> + <version>0.0.1</version> + <iconFile>resources/icon.png</iconFile> + <uuid>110fb66f-d33e-4abf-a692-02659aa0a314</uuid> + <platform>all</platform> + </description> + <parameters> + <parameter + name="frequency" + description="Frequency" + type="enum(Crazy,Often,Normal,Rarely)" + defaultValue="Normal" + platform="all"/> + </parameters> + <commands> + <command + name="run" + description="Start the idle behavior" + daemon="true" + notifier="true" + expiration="1"/> + </commands> + <tasks> + <task + name="Activation" + description="Activate Sense of humor behavior" + command="run" + type="once delayed" + activated="false" + + weekMask="true,true,true,true,true,true,true" + weekMaskType="weekpart" + weekMaskVisible="false" + + delay="00:00:10" + delayMask="false,false,false" + delayVisible="false" + /> + </tasks> +</plugin> |
From: jerome <c2m...@c2...> - 2009-11-27 11:11:55
|
Author: jerome Date: 2009-11-27 12:11:42 +0100 (Fri, 27 Nov 2009) New Revision: 5917 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 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/tests/AsyncTests.py Log: * Incomming ==> Incoming. * Started to add plugin events. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-11-27 10:53:59 UTC (rev 5916) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-11-27 11:11:42 UTC (rev 5917) @@ -431,7 +431,7 @@ def acceptCall(self, Call): ''' - Accept an incomming call. + Accept an incoming call. ''' self.__get_call__(Call) @@ -459,18 +459,18 @@ connectorObj = None call = None - ##### Incomming triggered events. #### + ##### incoming triggered events. #### #@Params : ttsName skype name otherwise. - OnIncommingCall = None + OnIncomingCall = None - OnIncommingFinished = None + OnIncomingFinished = None #@Params : ttsName, skype name otherwise. - OnIncommingMessage = None + OnIncomingMessage = None - #Incomming call was refused because a call is in progress. + #incoming call was refused because a call is in progress. # Sending event with user handle that tries to call. - OnIncommingCallRefused = None + OnIncomingCallRefused = None #### Outgoing triggered events #### #@Params : ttsName, cut number otherwise. @@ -517,20 +517,20 @@ def __on_call_status__(self, Call, Status): ''' - Event handler for skype client incomming / outgoing calls. + Event handler for skype client incoming / outgoing calls. ''' if Call.Type in [ Skype4Py.cltIncomingPSTN, Skype4Py.cltIncomingP2P]: - #Incomming call. - self.__on_incomming_call__(Call, Status) + #incoming call. + self.__on_incoming_call__(Call, Status) else: #Outgoing call. self.__on_outgoing_call__(Call, Status) - def __on_incomming_call__(self, Call, Status): + def __on_incoming_call__(self, Call, Status): ''' - Trigger incomming call events. + Trigger incoming call events. ''' if ( self.call is None ): self.call = Call @@ -540,15 +540,15 @@ partnerHandle = Call.PartnerHandle if Status == Skype4Py.clsRinging: - if self.OnIncommingCall != None: - thread = threading.Thread(target=self.OnIncommingCall, args = [partnerHandle, ]) + if self.OnIncomingCall != None: + thread = threading.Thread(target=self.OnIncomingCall, args = [partnerHandle, ]) thread.start() elif Status in [Skype4Py.clsFinished, Skype4Py.clsRefused, Skype4Py.clsMissed, Skype4Py.clsFailed]: - if self.OnIncommingFinished != None: + if self.OnIncomingFinished != None: self.call = None - thread = threading.Thread(target=self.OnIncommingFinished, args = [partnerHandle, ]) + thread = threading.Thread(target=self.OnIncomingFinished, args = [partnerHandle, ]) thread.start() else: @@ -562,8 +562,8 @@ pass finally: #Sending call refused event. - if ( self.OnIncommingCallRefused != None ) and ( Status == Skype4Py.clsRefused ): - thread = threading.Thread(target=self.OnIncommingCallRefused, args = [Call.PartnerHandle, ]) + if ( self.OnIncomingCallRefused != None ) and ( Status == Skype4Py.clsRefused ): + thread = threading.Thread(target=self.OnIncomingCallRefused, args = [Call.PartnerHandle, ]) thread.start() @@ -645,8 +645,8 @@ if chat.Name == Message.ChatName: #throwing event. - if self.OnIncommingMessage != None: - thread = threading.Thread(target=self.OnIncommingMessage, args=[handle, ]) + if self.OnIncomingMessage != None: + thread = threading.Thread(target=self.OnIncomingMessage, args=[handle, ]) thread.start() #Checking for matching emoticons / attitunes. 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-11-27 10:53:59 UTC (rev 5916) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2009-11-27 11:11:42 UTC (rev 5917) @@ -116,8 +116,44 @@ #Setting asynchronious obj. self.asynchronious = AsynchroniousCommands(self.connectorObj) + #Setting events. + asynchronious.OnIncomingMessage = self.OnChatMessage + asynchronious.OnAvailableEmoticon = self.OnEmoticon + asynchronious.OnAvailableTTSSentence = self.OnTTS + asynchronious.OnIncomingCallRefused = self.OnIncomingRefused + asynchronious.OnIncomingCall = self.OnIncomingCall + asynchronious.OnIncomingFinished = self.OnIncomingFinished + asynchronious.OnOutgoingCallRefused = self.OnOutgoingRefused + asynchronious.OnOutgoingCall = self.OnOutgoingCall + asynchronious.OnOutgoingFinished = self.OnOutgoingFinished + + + def OnChatMessage(self, contactHandle): + ''' + Event that notify of incoming chat message. + ''' + pass + + + def OnEmoticon(self, attName): + ''' + Event that notify of incoming emoticon. + ''' + pass + + + def OnTTS(self, sentence): + ''' + Event that notify a tts sentence to be said by Tux Droid. + ''' + pass + + + def OnincomingRefused + + def mainloop(self): ''' Run main loop. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py 2009-11-27 10:53:59 UTC (rev 5916) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py 2009-11-27 11:11:42 UTC (rev 5917) @@ -55,7 +55,7 @@ print 'Tux Droid TTS>>> %s' % message -def onIncommingRefused(contactHandle): +def onIncomingRefused(contactHandle): ''' Call refused event used to send a message to the remote caller. ''' @@ -63,14 +63,14 @@ synchronious.sendTextMessage(contactHandle, "Sorry, I'm on phone, try again later please.") -def onIncommingCall(contactHandle): +def onIncomingCall(contactHandle): ''' A contact try to call current user. ''' print '%s is calling you' % contactHandle -def onIncommingFinished(contactHandle): +def onIncomingFinished(contactHandle): ''' A call was just finished. ''' @@ -110,9 +110,9 @@ asynchronious.OnAvailableEmoticon = onEmoticon asynchronious.OnAvailableTTSSentence = onTTS - asynchronious.OnIncommingCallRefused = onIncommingRefused - asynchronious.OnIncommingCall = onIncommingCall - asynchronious.OnIncommingFinished = onIncommingFinished + asynchronious.OnIncommingCallRefused = onIncomingRefused + asynchronious.OnIncommingCall = onIncomingCall + asynchronious.OnIncommingFinished = onIncomingFinished asynchronious.OnOutgoingCallRefused = onOutgoingRefused asynchronious.OnOutgoingCall = onOutgoingCall |
From: jerome <c2m...@c2...> - 2009-11-27 10:54:13
|
Author: jerome Date: 2009-11-27 11:53:59 +0100 (Fri, 27 Nov 2009) New Revision: 5916 Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/EmoticonsToAttitunes.py software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/connector.py software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/errors.py software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/AsyncTests.py software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/ConnectionTests.py software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/tests/SyncTests.py software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py Log: * Added refactored project. Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/EmoticonsToAttitunes.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/EmoticonsToAttitunes.py (rev 0) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/EmoticonsToAttitunes.py 2009-11-27 10:53:59 UTC (rev 5916) @@ -0,0 +1,95 @@ +# Copyright (C) 2009 Kysoh Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +EMOTICONS_TO_ATTITUNES = { + ':)' : "msn_happy", + ':-)' : "msn_happy", + ':d' : "msn_laughing", + ':-d' : "msn_laughing", + '=d' : "msn_laughing", + 'lol' : "msn_laughing", + 'mdr' : "msn_laughing_wild", + ':(' : "msn_sad", + ':-(' : "msn_sad", + ':p' : "msn_sticking_out_tongue", + ':-p' : "msn_sticking_out_tongue", + '=p' : "msn_sticking_out_tongue", + ';)' : "msn_winky", + ';-)' : "msn_winky", + ':o' : "msn_gasp", + ':-o' : "msn_gasp", + '(h)' : "msn_yeah", + 'b-)' : "msn_yeah", + '8-)' : "msn_duh", + ':@' : "msn_angry", + ':-@' : "msn_angry", + 'x(' : "msn_angry", + 'x-(' : "msn_angry", + ':s' : "msn_confused", + ':-s' : "msn_confused", + 'o_o' : "msn_confused", + 'o.o' : "msn_confused", + '^o)' : "msn_confused", + ':$' : "msn_embarrassed", + ':-$' : "msn_embarrassed", + ":'(" : "msn_crying", + ":'-(" : "msn_crying", + '(a)' : "msn_angel", + '8o|' : "msn_angry", + '8-|' : "msn_nerd", + ':-|' : "msn_disappointed", + ':|' : "msn_disappointed", + '+o(' : "msn_sick", + '<:o)' : "msn_party", + '|-)' : "msn_asleep", + ':-#' : "msn_shh", + ':#' : "msn_shh", + ':-*' : "msn_secret", + ':^)' : "msn_dunno", + '*-)' : "msn_dunno", + '(l)' : "msn_kiss", + '(u)' : "msn_crying", + '(@)' : "msn_cat", + '(&)' : "msn_dog", + '(bah)' : "msn_sheep", + '(sn)' : "msn_disappointed", + '(s)' : "msn_asleep", + '(t)' : "msn_telephone", + '(mp)' : "msn_mobile", + '(k)' : "msn_kiss", + '(6)' : "msn_laughing_evil", + ':-[' : "msn_laughing_evil", + ':[' : "msn_laughing_evil", + '(o)' : "msn_clock", + '(f)' : "msn_kiss", + '(ap)' : "msn_airplane", + '(au)' : "msn_auto", + '(p)' : "msn_camera", + '(mo)' : "msn_money", + '(~)' : "msn_filmstrip", + '(b)' : "msn_beer", + '(d)' : "msn_martini", + '(li)' : "msn_lightning", + '(st)' : "msn_stormy", + '(um)' : "msn_stormy", + '(e)' : "msn_email", + '(n)' : "msn_disappointed", + '(y)' : "msn_yeah", + '(c)' : "msn_coffee", + '(pl)' : "msn_eating", + '(pi)' : "msn_eating", + '(||)' : "msn_eating", + '(i)' : "msn_idea", + '(^)' : "msn_birthday", + '({)' : "msn_hugging", + '(})' : "msn_hugging", + '(co)' : "msn_computer", + '(w)' : "msn_sad", + '(ip)' : "msn_island", + '(so)' : "msn_soccer", + '(*)' : "msn_star", + '(8)' : "msn_note", + '(g)' : "msn_gift", +} Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py (rev 0) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/communicator.py 2009-11-27 10:53:59 UTC (rev 5916) @@ -0,0 +1,707 @@ +'''This file is part of "TuxDroid plugin Skype". + * Copyright 2009, kysoh + * Author : Conan Jerome. + * eMail : jer...@ky... + * Site : http://www.kysoh.com/ + * + * "TuxDroid plugin Skype" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid plugin Skype" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid plugin Skype"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + *''' + +import os +import time +import connector +import Skype4Py +import threading +from Skype4Py.utils import tounicode +from utils import AudioUtils, StringUtils +from EmoticonsToAttitunes import EMOTICONS_TO_ATTITUNES +from errors import EquipmentException, UnavailableContactException, UserNotFindException + + +class SynchroniousCommands(object): + ''' + Handle skype synchronious commands. + ''' + + connectionObj = None + currentUser = None + + #Audio card values. + IN = 'default' + OUT = 'default' + RINGER = 'default' + + #Online status + ONLINE = 'ONLINE' + AWAY = 'AWAY' + NA = 'NA' + DND = 'DND' + SKYPEME = 'SKYPEME' + OFFLINE = 'OFFLINE' + INVISIBLE = 'INVISIBLE' + + #Contacts hash datas. + contacts = [] + + #List available online statuses. + contacts_ols = ['ONLINE', 'AWAY', 'NA', 'DND', 'SKYPEOUT', 'SKYPEME'] + + #List available offline statuses. + contacts_ofs = [u'UNKNOWN', u'OFFLINE', u'INVISIBLE'] + + + +################################################### +####### Private functions ############ + + def __init__(self, Connector): + ''' + Init procedure. + ''' + self.connectionObj = Connector + + #Updating audio cards values. + if os.name == 'nt': + self.IN = AudioUtils.getSoundDeviceNameTuxdroidMicro() + self.OUT = AudioUtils.getSoundDeviceNameTuxdroidAudio() + self.RINGER = self.OUT + + #Getting current user. + try: + self.currentUser = connectionObj.getSkypeAPI().CurrentUser + except: + self.currentUser = 'default' + + + def __set_tux_in_out__(self): + ''' + Set Tux Droid as audio card for Skype client. + ''' + try: + self.connectionObj.getSkypeAPI().Settings.AudioIn = self.IN + self.connectionObj.getSkypeAPI().Settings.AudioOut = self.OUT + self.connectionObj.getSkypeAPI().Settings.Ringer = self.RINGER + + sleep(1) + #Checking if Tux Droid was successfully set as audio card. + if not self.isTuxDroidAudioCard(): + return False + return True + except: + #Return False, maybe Tux Droid is not connected. + return False + + + def __is_tux_audio__(self): + ''' + Return true if Tux Droid is set as audio card. + ''' + if not ( self.connectionObj.getSkypeAPI().Settings.AudioIn == self.IN ): + return False + if not ( self.connectionObj.getSkypeAPI().Settings.AudioOut == self.OUT ): + return False + if not ( self.connectionObj.getSkypeAPI().Settings.Ringer == self.RINGER ): + return False + + return True + + + + def __fetch_contacts__(self): + ''' + Querry client api to fetch contact list. + ''' + if self.currentUser != self.connectionObj.getSkypeAPI().CurrentUser: + self.contacts = [] + + #Getting Skype connector lock before starting. + if self.connectionObj.isSkypeLocked(): + #Waiting until connector object is available. + time.sleep(0.2) + try: + #Request connector for the commands lock. + self.connectionObj.requestSkypeLock() + #Getting contacts. + self.currentUser = self.connectionObj.getSkypeAPI().CurrentUser + + for user in self.connectionObj.getSkypeAPI().Friends: + uDatas = {} + uDatas['handle'] = tounicode(user.Handle) + uDatas['full_name'] = tounicode(user.FullName) + uDatas['display_name'] = tounicode(user.DisplayName) + + name = '' + #Getting tts name to use. + if tounicode(uDatas['display_name']) != u'': + name = StringUtils.toPrettyString(uDatas['display_name']) + elif tounicode(uDatas['full_name']) != u'': + name = StringUtils.toPrettyString(uDatas['full_name']) + else: + name = StringUtils.toPrettyString(uDatas['handle']) + + uDatas['name'] = tounicode(name).lower() + self.contacts.append(uDatas) + finally: + self.connectionObj.releaseSkypeLock() + return self.contacts + + + def __get_user_tts__(self, handle): + ''' + Return the 'name' value of a user for tts use. + @Param : User skype name. + ''' + for user in self.contacts: + if tounicode(handle) == tounicode(user['handle']): + return user['name'] + return None + + + + def __get_user_handle__(self, ttsName): + ''' + Return the user handle for a tts name. + ''' + for user in self.contacts: + if tounicode(ttsName) == tounicode(user['ttsName']): + return user['handle'] + return None + + + + def __get_online_list__(self): + ''' + Return a tts name online list + ''' + online = [] + for user in self.contacts: + try: + #usr = skype api user objet. + usr = self.connectionObj.getSkypeAPI().User(user['handle']) + + if usr.OnlineStatus in self.contacts_ols: + #append tts name of this user. + online.append(user['name']) + except: + #do not add this contact in case of exception. + pass + + return sorted(online) + + + def __call_contact__(self, ttsName): + ''' + Proceed to call a contact. + Raise equipement error + Raise unavailable contact error + ''' + #Getting user handle to call first of all. + skypeCall = None + for user in self.contacts: + if user['name'] == ttsName: + skypeCall = user['handle'] + + if skypeCall == None: + #The wanted contact is not into the contacts list. + raise UnavailableContactException() + + skypeCall = self.connectionObj.getSkypeAPI().User(skypeCall) + if skypeCall.OnlineStatus in self.contacts_ofs: + raise UnavailableContactException() + + if skypeCall.HasCallEquipment: + #User has call equipment, proceeding call. + self.connectionObj.getSkypeAPI().PlaceCall(skypeCall.Handle) + else: + #User has no equipment, exiting. + raise EquipmentException() + + + def __finish_call__(self): + ''' + Finish inprogress call. + ''' + for aCall in self.connectionObj.getSkypeAPI().ActiveCalls: + aCall.Finish() + + + def __get_call__(self, Call): + ''' + Place a call in progress. + ''' + Call.Answer() + + + + def __user_add__(self, handle): + ''' + Add a user into the contacts list. + ''' + user = None + + try: + #Getting user object. + user = self.connectionObj.getSkypeAPI().User(handle) + uDatas = {} + uDatas['handle'] = tounicode(user.Handle) + uDatas['full_name'] = tounicode(user.FullName) + uDatas['display_name'] = tounicode(user.DisplayName) + + name = '' + #Getting tts name to use. + if tounicode(uDatas['display_name']) != u'': + name = StringUtils.toPrettyString(uDatas['display_name']) + elif tounicode(uDatas['full_name']) != u'': + name = StringUtils.toPrettyString(uDatas['full_name']) + else: + name = StringUtils.toPrettyString(uDatas['handle']) + + uDatas['name'] = tounicode(name) + self.contacts.append(uDatas) + except: + #User was not find + raise UserNotFindException() + + + + def __user_del__(self, handle): + ''' + remove a user from the contacts list. + ''' + user = None + + try: + user = self.connectionObj.getSkypeAPI().User(handle) + #Searching for user in the contacts list. + for user in self.contacts: + if tounicode(user['handle']) == tounicode(handle): + #User was find, then removing its entry. + self.contacts.remove( user ) + except Excetion, e: + raise UserNotFindException + + + + def __is_valid_contact__(self, ttsName): + ''' + Return true if tts username is in the contacts list. + ''' + try: + for user in self.contacts: + if tounicode(user['name']) == tounicode(ttsName): + return True + return False + except: + pass + + + def __set_online_status__(self, status): + ''' + Change the user status. + ''' + try: + if ( status in self.contacts_ols ) or ( status in self.contacts_ofs): + #if status allowed then updating. + self.connectionObj.getSkypeAPI().ChangeUserStatus(status) + except: + pass + + + def __send_message__(self, handle, text): + ''' + Send a message to the user handle. + Return true if success, false otherwise. + ''' + try: + if ( handle != None ) and ( len(text) > 0 ): + message = self.connectionObj.getSkypeAPI().CreateChatWith(handle) + message.SendMessage(tounicode(text)) + return True + return False + except: + return False + + + +################################################### +####### User functions ############ + + def getCurrentUser(self): + ''' + Return the current Skype user. + ''' + return self.currentUser + + + def getContacts(self): + ''' + Fetch user contact list. + ''' + return self.__fetch_contacts__() + + + def isTuxDroidAudioCard(self): + ''' + Return true if Tux Droid is set as audio card. + ''' + return self.__is_tux_audio__() + + + def setAudioCards(self): + ''' + Set Tux Droid as audio card for Skype client. + ''' + self.__set_tux_in_out__() + + + def getTTSName(self, user): + ''' + Return the tts name for this user handle. + ''' + return self.__get_user_tts__(user) + + + def getHandle(self, ttsName): + ''' + Return the handle os a user. + ''' + return self.__get_user_handle__(ttsName) + + + def getOnlineList(self): + ''' + Return a complete online / skypeout user list. + ''' + return self.__get_online_list__() + + + def call(self, ttsName): + ''' + Place a call. + Raise 'EquimentException' and 'UnavailableContactException' + ''' + self.__call_contact__(ttsName) + + + def adduser(self, userHandle): + ''' ( in case of add user skype event ) + ''' + self.__user_add__(userHandle) + + + def deluser(self, userHandle): + ''' ( in case of remove user skype event ) + ''' + self.__user_del__(userHandle) + + + def isUserInList(self, ttsName): + ''' + Check if a user is in the contact list. + ''' + return self.__is_valid_contact__(ttsName) + + + def finishCall(self): + ''' + Finish a call. + ''' + self.__finish_call__() + + + def rejectCall(self): + ''' + Reject a call + ''' + self.finishCall() + + + def acceptCall(self, Call): + ''' + Accept an incomming call. + ''' + self.__get_call__(Call) + + + def setOnlineStatus(self, status): + ''' + Change use status. + ''' + self.__set_online_status__(status) + + + def sendTextMessage(self, handle, message): + ''' + Send a message to the user handle. + ''' + self.__send_message__(handle, message) + + + +class AsynchroniousCommands(object): + ''' + Handle Asynchronious commands and skype events. + ''' + + connectorObj = None + call = None + + ##### Incomming triggered events. #### + #@Params : ttsName skype name otherwise. + OnIncommingCall = None + + OnIncommingFinished = None + + #@Params : ttsName, skype name otherwise. + OnIncommingMessage = None + + #Incomming call was refused because a call is in progress. + # Sending event with user handle that tries to call. + OnIncommingCallRefused = None + + #### Outgoing triggered events #### + #@Params : ttsName, cut number otherwise. + OnOutgoingCall = None + + OnOutgoingFinished = None + + #Outgoing call was refused because a call is in progress. + OnOutgoingCallRefused = None + + #### Misc events #### + #@Params : ttsName , newStatus + OnlineContactStatusChanged = None + + #@Params : AttituneName. + OnAvailableEmoticon = None + + #@Params : TTS sentence. + OnAvailableTTSSentence = None + + +################################################### +####### Private functions ############ + + def __init__(self, Connector): + ''' + Init procedure + ''' + self.connectorObj = Connector + #Initializing events. + self.connectorObj.getSkypeAPI().OnOnlineStatus = self.__on_online_contact__ + self.connectorObj.getSkypeAPI().OnMessageStatus = self.__on_message_status__ + self.connectorObj.getSkypeAPI().OnCallStatus = self.__on_call_status__ + + + + def __on_online_contact__(self, User, Status): + ''' + ''' + if self.OnlineContactStatusChanged != None: + thread = threading.Thread(target=self.OnlineContactStatusChanged, args = [User.handle, Status]) + thread.start() + + + def __on_call_status__(self, Call, Status): + ''' + Event handler for skype client incomming / outgoing calls. + ''' + if Call.Type in [ Skype4Py.cltIncomingPSTN, Skype4Py.cltIncomingP2P]: + #Incomming call. + self.__on_incomming_call__(Call, Status) + else: + #Outgoing call. + self.__on_outgoing_call__(Call, Status) + + + + def __on_incomming_call__(self, Call, Status): + ''' + Trigger incomming call events. + ''' + if ( self.call is None ): + self.call = Call + + if ( self.call.Id == Call.Id ) : + self.call = Call + partnerHandle = Call.PartnerHandle + + if Status == Skype4Py.clsRinging: + if self.OnIncommingCall != None: + thread = threading.Thread(target=self.OnIncommingCall, args = [partnerHandle, ]) + thread.start() + + elif Status in [Skype4Py.clsFinished, Skype4Py.clsRefused, + Skype4Py.clsMissed, Skype4Py.clsFailed]: + if self.OnIncommingFinished != None: + self.call = None + thread = threading.Thread(target=self.OnIncommingFinished, args = [partnerHandle, ]) + thread.start() + + else: + callerHandle = None + try: + callerHandle = Call.PartnerHandle + try: + if Status == Skype4Py.clsRinging: + Call.Finish() + except: + pass + finally: + #Sending call refused event. + if ( self.OnIncommingCallRefused != None ) and ( Status == Skype4Py.clsRefused ): + thread = threading.Thread(target=self.OnIncommingCallRefused, args = [Call.PartnerHandle, ]) + thread.start() + + + + + def __on_outgoing_call__(self, Call, Status): + ''' + Trigger outgoing call event. + ''' + if ( self.call is None ): + self.call = Call + + if ( self.call.Id == Call.Id ) : + self.call = Call + partnerHandle = Call.PartnerHandle + + if Status == Skype4Py.clsRouting: + if self.OnOutgoingCall != None: + thread = threading.Thread(target=self.OnOutgoingCall, args = [partnerHandle, ]) + thread.start() + + elif Status in [Skype4Py.clsFinished, Skype4Py.clsRefused, + Skype4Py.clsCancelled, Skype4Py.clsFailed]: + if self.OnOutgoingFinished != None: + self.call = None + thread = threading.Thread(target=self.OnOutgoingFinished, args = [partnerHandle, ]) + thread.start() + + else: + callerHandle = None + try: + callerHandle = Call.PartnerHandle + try: + if Status == Skype4Py.clsRinging: + Call.Finish() + except: + pass + finally: + #Sending call refused event. + if ( self.OnOutgoingCallRefused != None ) and ( Status == Skype4Py.clsCancelled ): + thread = threading.Thread(target=self.OnOutgoingCallRefused, args = [Call.PartnerHandle, ]) + thread.start() + #Resume last call. + if self.call != None: + self.call.Resume() + + + + def __on_message_status__(self, Message, Status): + ''' + ''' + exclude_list = ['<partlist', '<part identity', '</name>', '<name>'] + exclude_message = False + if Status == 'RECEIVED': + + #Checking if message body is not empty. + try: + Message.Body.splitlines()[0] + except: + exclude_message = True + + #Excluding 'identity call' messages in case of most recent Skype clients. + + for excluded in exclude_list: + for msgPart in Message.Body.splitlines() : + if msgPart.find(excluded) != -1 : + exclude_message = True + break + + + if not exclude_message: + #Getting message user handle. + handle = tounicode(Message.FromHandle) + + missed = self.connectorObj.getSkypeAPI().MissedChats + for chat in missed: + #Checking chat state and throwing only if this message + #is in the 'missed chats' list. + if chat.Name == Message.ChatName: + + #throwing event. + if self.OnIncommingMessage != None: + thread = threading.Thread(target=self.OnIncommingMessage, args=[handle, ]) + thread.start() + + #Checking for matching emoticons / attitunes. + emoticons = threading.Thread(target = self.__check_emoticons__(Message.Body)) + emoticons.start() + + #Checking for matching tts requests. + tts = threading.Thread(target = self.__check_tts_sentence__, args=[Message.Body]) + tts.start() + + + + + def __check_emoticons__(self, message): + ''' + Check message for matching emoticons. + ''' + # Search for emoticon + for emoticon in EMOTICONS_TO_ATTITUNES.keys(): + if message.lower().find(emoticon) != -1: + if self.OnAvailableEmoticon != None: + arg = [EMOTICONS_TO_ATTITUNES[emoticon], ] + thread = threading.Thread(target = self.OnAvailableEmoticon, args = arg) + thread.start() + return + + + def __check_tts_sentence__(self, message): + ''' + Check if the message contains 'tux'. + ''' + # speak the text if begin is "tuxdroid>" + if message.find('tuxdroid>') == 0: + self.__trigger_tts__(message[9:]) + return + # speak the text if begin is "tuxdroid" + if message.find('tuxdroid') == 0: + self.__trigger_tts__(message[8:]) + return + # speak the text if begin is "tux>" + if message.find('tux>') == 0: + self.__trigger_tts__(message[4:]) + return + # speak the text if begin is "tux" + if message.find('tux') == 0: + self.__trigger_tts__(message[3:]) + return + + + def __trigger_tts__(self, message): + ''' + Trigger the 'tts sentence available' event. + ''' + if self.OnAvailableTTSSentence != None: + thread = threading.Thread(target = self.OnAvailableTTSSentence, args = [message, ]) + thread.start() + + \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/connector.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/connector.py (rev 0) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/connector.py 2009-11-27 10:53:59 UTC (rev 5916) @@ -0,0 +1,258 @@ +'''This file is part of "TuxDroid plugin Skype". + * Copyright 2009, kysoh + * Author : Conan Jerome. + * eMail : jer...@ky... + * Site : http://www.kysoh.com/ + * + * "TuxDroid plugin Skype" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid plugin Skype" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid plugin Skype"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + *''' + +import os +import Skype4Py +import threading +from time import sleep +from threading import Thread +from utils import ExtendedThread, SkypeClient + +class Connector(object): + '''' + This class manage the skype client-api connection + ''' + #This boolean flag indicates if Skype client was started by the connector + #To force close when connector shuts down. + startedByConnector = False + #Event sent if Skype client was closed. + OnSkypeClosed = None + OnAPIReady = None + triggerSkypeClosed = True + + #Skype4Py API object. + skype = None + timeout = 60 + #Allow plugin to start commands or not. + lock = False + apiReady = False + + #Skype client object. + skypeClient = None + + #Skype client Loop thread. + __clientLoop__ = None + + +################################################### +####### Private functions ############ + + def __new_skype_status__(self, status): + ''' Skype api Event handler. + If Skype is closed and reopened, it informs us about it + so we can reattach. + ''' + + #If api is not attached, then setting 'api not ready' values + if status != Skype4Py.apiAttachSuccess: + self.apiReady = False + + #API attach is available, meaning api was disconnected. + if status == Skype4Py.apiAttachAvailable: + self.skype.OnAttachmentStatus = self.__new_skype_status__ + #Attaching api. + self.skype.Attach() + + #Skype api was attached successfully, initializing values. + if status == Skype4Py.apiAttachSuccess: + self.apiReady = True + self.triggerSkypeClosed = True + if self.OnAPIReady != None: + #Notify client. + thread = Thread(target=self.OnAPIReady) + thread.start() + + + + def __client_loop__(self): + ''' + Check for unexcpected client shutdown. + Used with 'ExtendedThread' object. + ''' + #Check if skype is closed. + if not self.skypeClient.isRunning(): + self.__onSkypeClosed__() + + + + def __onSkypeClosed__(self): + ''' + Handle the case where Skype was closed, crashed, ... + ''' + self.apiReady = False + + #Sending event only if it was not triggered for the same api instance.. + if self.triggerSkypeClosed: + if(self.OnSkypeClosed != None): + self.triggerSkypeClosed = False + self.OnSkypeClosed() + + + def __connect_api__(self): + ''' + Connect skype api. + ''' + sleep(2.0) + try: + self.skype.OnAttachmentStatus = self.__new_skype_status__ + self.skype.Attach() + + except Exception: + self.apiReady = False + + + + def __connect_all__(self): + ''' + SkypeStarted received, so , connect all. + ''' + #Initializing Skype4Py object. + if os.name == 'nt': + self.skype = Skype4Py.Skype() + else: + self.skype = Skype4Py.Skype(Transport='x11') + + #Starting skype client check. + self.__clientLoop__ = ExtendedThread(target=self.__client_loop__) + self.__clientLoop__.start() + + self.skype.OnAttachmentStatus = self.__new_skype_status__ + + self.apiReady = False + apiConnection = Thread(target= self.__connect_api__) + apiConnection.start() + + + + def __start__(self): + ''' + Start connection between client-application + ''' + #Creating skype client helper object. + if os.name != 'nt': + self.skypeClient = SkypeClient(SkypeClient.LINUX) + else: + self.skypeClient = SkypeClient(SkypeClient.WINDOWS) + + #If skype client is not running start it and wait started to connect api + if not self.skypeClient.isRunning(): + self.startedByConnector = True + self.skypeClient.OnSkypeStarted = self.__connect_all__ + self.skypeClient.start() + #Else, connecting now. + else: + self.__connect_all__() + + + + def __stop__(self): + ''' + Stop all connection and close Skyp application if needed. + ''' + self.skype.OnAttachmentStatus = None + if self.__clientLoop__ != None: + self.__clientLoop__.stop() + + if ( KillClient == True ) or self.startedByConnector: + #Quitting Skype client. + self.skypeClient.stop() + self.skype = None + + +################################################### +####### User functions ################ + + def start(self): + ''' + Start connection. + ''' + self.__start__() + + + def stop(self, KillClient=False): + ''' + Stop connection. + ''' + self.__stop__() + + + def startClient(self, OnStarted=None): + ''' + Start skype client. + ''' + if OnStarted != None: + self.skypeClient.OnSkypeStarted = OnStarted + self.skypeClient.start() + + + def stopClient(self): + ''' + stop skype client. + ''' + self.skypeClient.stop() + + + def isClientRunning(self): + ''' + Return true if client is running, false otherwise. + ''' + return self.skypeClient.isRunning() + + + def isAPIReady(self): + ''' + Return true if skype api is ready. + ''' + return self.apiReady + + + def getSkypeAPI(self): + ''' + Return the skype api object. + ''' + return self.skype + + + def isSkypeLocked(self): + ''' + Return True if 'lock' was requested. + ''' + return self.lock + + + def requestSkypeLock(self): + ''' + Get the lock ( lock will avoid to start commands ). + ''' + if(not self.lock): + self.lock = True + return self.lock + + + def releaseSkypeLock(self): + ''' + Release a requested lock. + ''' + if(self.lock): + self.lock = False + return not self.lock + Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/errors.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/errors.py (rev 0) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/errors.py 2009-11-27 10:53:59 UTC (rev 5916) @@ -0,0 +1,43 @@ +'''This file is part of "TuxDroid plugin Skype". + * Copyright 2009, kysoh + * Author : Conan Jerome. + * eMail : jer...@ky... + * Site : http://www.kysoh.com/ + * + * "TuxDroid plugin Skype" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid plugin Skype" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid plugin Skype"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + *''' + +class EquipmentException(Exception): + ''' + Handle Skype call equipment error. + ''' + pass + + +class UnavailableContactException(Exception): + ''' + Handle unavailable contact error. + ''' + pass + + +class UserNotFindException(Exception): + ''' + Handle 'not find' contact. + ''' + pass + + \ No newline at end of file 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-11-27 10:50:17 UTC (rev 5915) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2009-11-27 10:53:59 UTC (rev 5916) @@ -1,682 +1,142 @@ -# -*- coding: utf-8 -*- - -# Copyright (C) 2009 Kysoh Sa -# Conan Jerome <jer...@ky...> -# Distributed under the terms of the GNU General Public License -# http://www.gnu.org/copyleft/gpl.html - +'''This file is part of "TuxDroid plugin Skype". + * Copyright 2009, kysoh + * Author : Conan Jerome. + * eMail : jer...@ky... + * Site : http://www.kysoh.com/ + * + * "TuxDroid plugin Skype" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "TuxDroid plugin Skype" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "TuxDroid plugin Skype"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + *''' + __author__ = "Conan Jerome" __appname__ = "Python gadget skype" __version__ = "0.0.4" __date__ = "2009/06/16" __license__ = "GPL" - -import os -import time + import sys +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + import threading -import subprocess -import Skype4Py -import commands +import utils +import errors +import connector +import communicator -sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) - from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration from util.SimplePlugin.SimplePlugin import SimplePlugin -from util.system.TaskBar import refreshTaskBar -from util.system.Device import * -from Skype4Py.errors import SkypeAPIError - - -class Configuration(SimplePluginConfiguration): - """This class make an access to the plugin parameters. - Parameters are automatically filled by the SimpleGadget class at plugin - starting. - """ - + + class SkypePluginConfiguration(SimplePluginConfiguration): + ''' + Skype plugin configuration. + ''' + + throwEmoticons = True + + def __init__(self): - """Initialization of the class. - """ - # Call the super class + ''' + Configuration initialization. + ''' SimplePluginConfiguration.__init__(self) - # Initialize the parameters - self.__quitGadget = False - self.__startupStatus = "" - - def getQuitGadget(self): - return self.__quitGadget - - def setQuitGadget(self, quitGadget): - self.__quitGadget = quitGadget - - def getStartupStatus(self): - return self.__startupStatus - - def setStartupStatus(self, startupStatus): - self.__startupStatus = startupStatus - - + self.throwEmoticons = True + + + def getThrowEmoticons(): + ''' + Return true if emoticons will be thrown. + ''' + return self.throwEmoticons + + + def setThrowEmoticons(aThrowEmoticons): + ''' + Set the throwEmoticons parameter value. + ''' + self.throwEmoticons = aThrowEmoticons + + + class SkypePlugin(SimplePlugin): - """Skype plugin class. - """ - - def __init__(self): - """Initialization of the class. - """ - # Call the super class - SimplePlugin.__init__(self) - - # Initialize some values ... - self.__currentCall = None - self.__currentContactIndex = -1 - self.__contactsDict = {} - self.__contactsList = [] - self.__allowedStatus = { - "Online" : Skype4Py.olsOnline, - "Away" : Skype4Py.olsAway, - "Do not disturb" : Skype4Py.olsDoNotDisturb, - "Invisible" : Skype4Py.olsInvisible, - "Busy" : Skype4Py.olsNotAvailable, - "Skype me": Skype4Py.olsSkypeMe, - } - self.__mutexContacts = threading.Lock() - self.__mutexCall = threading.Lock() - self.__connectionMutex = threading.Lock() - # Skype api objects. - self.__skype = None - self.__apiAttachState = -1 - self.__activeMain = True - # Skype process - self.attemptTimeout = 0 - self.normalStart = False - self.quitSkypeClient = False - self.count = 1 - self.__skypeProcess = -1 - + ''' + Skype plugin base class. + ''' + + canRun = True + + #Skype client - api objects. + synchronious = None + asynchronious = None + connectorObj = None + def start(self): - """Plugin entry point. + ''' + Plugin entry point. This method should be used to dispatch commands. - """ - if os.name != 'nt': - self.__skype = Skype4Py.Skype(Transport='x11') - else: - self.__skype = Skype4Py.Skype() - + ''' if self.getCommand() == "run": self.run() else: self.run() - - def run(self): - """Plugin entry point for the "run" command. - """ - try: - self.__tuxBodyLedsBlink() - # Start Skype client if not started. - self.__startSkypeApp() - - if not self.__activeMain: - self.stop() - return - - # Connect to skype api. - - self.__connectSkypeAPI() - except SkypeAPIError: - pass - except: - self.throwMessage("I cannot get connected to your Skeyepe. Please, check if you are connected. And verify if I can access skype.") - self.stop() - - - def onPluginStop(self): - """Callback on plugin stop. - """ - def closeSkype(): - if self.__skype != None: - self.__activeMain = False - self.__skype._API.Close() - self.__skype = None - self.__apiAttachState = -1 - - if self.__skype.Client.IsRunning: - #Shutting down Skype application. - - if os.name != 'nt': - os.system("kill -15 `ps h --ppid " + str(self.__skypeProcess.pid ) + " | awk '{print $1}'` 2>/dev/null") - else: - self.__skype.Client.Shutdown() - refreshTaskBar() - try: - - #Sending 'Shutdown command' first to do not block the quit process that is quite long. - if self.quitSkypeClient: - if os.name != 'nt': - os.system("kill -15 `ps h --ppid " + str(self.__skypeProcess.pid ) + " | awk '{print $1}'` 2>/dev/null") - - else: - - self.__skype.Client.Shutdown() - - time.sleep(1.0) - - if self.__skype != None: - self.hangUp() - if self.__skype.Client.IsRunning: - closeSkype() - else: - self.__skype._API.Close() - self.__tuxBodyResetLeds() - self.__tuxBodyIdle() - except: - pass - - def onPluginEvent(self, eventName, eventValues): - """Callback on plugin event. - @param eventName: Event name. - @param eventValues: Event values. - """ - if self.__currentCall == None: - if eventName == "head": - if eventValues[0] == "True": - self.__userBtStartCall() - elif eventName == "left": - if eventValues[0] == "True": - self.__userBtNextContact() - elif eventName == "right": - if eventValues[0] == "True": - self.__userBtPreviousContact() - elif eventName == "remote": - if eventValues[0] == "K_OK": - self.__userBtStartCall() - elif eventValues[0] == "K_DOWN": - self.__userBtPreviousContact() - elif eventValues[0] == "K_UP": - self.__userBtNextContact() - elif eventValues[0] == "K_LEFT": - self.__userBtPreviousContact() - elif eventValues[0] == "K_RIGHT": - self.__userBtNextContact() - elif eventValues[0] == "K_RECEIVECALL": - self.__userBtStartCall() - else: - if eventName == "head": - if eventValues[0] == "True": - self.__userBtHangUp() - elif eventName == "remote": - if eventValues[0] == "K_OK": - self.__userBtHangUp() - elif eventValues[0] == "K_HANGUP": - self.__userBtHangUp() - - # ========================================================================== - # Skype API - # ========================================================================== - def __poolSkypeApplication(self): + + + def run(self): ''' - Pool Skype application to quit gadget in case of client not running. + Run plugin command. ''' + #Initialize skype client and api objects. + self.connectorObj = connector.Connector() + self.connectorObj.OnAPIReady = self.initialize + self.connectorObj.start() - while True: - time.sleep(0.2) - if ( not self.__skype.Client.IsRunning ): - self.stop() - - - - def __onOnlineStatus(self, User, Status): - ''' - Skype api online status received ( contact online status changed ). - ''' - #Refreshing contacts list. - if self.count <= 1: - self.__getContacts() - else: - self.__contact(User) - self.count = self.count + 1 + #Finally, starting daemon main loop + mainl = threading.Thread(target=self.mainloop) + mainl.start() - def __onSkypeAPIStatusReceived(self, value): - """Received api connection status. - """ - self.__apiAttachState = value + def initialize(self): + ''' + Initialize Skype objects and set events handlers. + ''' + #Api ready and connected so creatin other commands objects. + self.synchronious = SynchroniousCommands(self.connectorObj) + #Setting asynchronious obj. + self.asynchronious = AsynchroniousCommands(self.connectorObj) - if ( value in [Skype4Py.apiAttachAvailable, ] ): - self.__connectSkypeAPI() - - if ( value in [Skype4Py.apiAttachSuccess, ]) and (not (self.attemptTimeout == 8)): - # Set tux as audio card. - self.__selectTuxAsAudioCard() - time.sleep(0.2) - - # Get the contacts list. - if self.normalStart: - self.__getContacts() - - # Set the user status. - - status = self.configuration().getStartupStatus() - if self.__allowedStatus.has_key(status): - self.__skype.ChangeUserStatus(self.__allowedStatus[status]) - - #Start Pooling skype. - thread = threading.Thread(target = self.__poolSkypeApplication) - thread.start() - - - elif self.attemptTimeout == 8: - self.stop() - return - - - def __selectTuxAsAudioCard(self): - """Set tux as audio peripheral. - """ - if os.name == "nt": - audioIn = Device.getSoundDeviceNameTuxdroidMicro() - audioOut = Device.getSoundDeviceNameTuxdroidAudio() - if audioOut == None: - return - self.__sendCommandToSkype('SET AUDIO_IN %s' % audioIn) - self.__sendCommandToSkype('SET AUDIO_OUT %s' % audioOut) - self.__sendCommandToSkype('SET RINGER %s' % audioOut) - else: - self.__sendCommandToSkype('SET AUDIO_IN TuxDroid (plughw:TuxDroid,0)') - self.__sendCommandToSkype('SET AUDIO_OUT TuxDroid (plughw:TuxDroid,0)') - self.__sendCommandToSkype('SET RINGER TuxDroid (plughw:TuxDroid,0)') - - - def __sendCommandToSkype(self, command): - """Send a raw command to skype api. Return true if command was sent. - """ - if self.__skypeAPIIsConnected(): - try: - cmd_obj = self.__skype.Command(command, Block = True) - self.__skype.SendCommand(cmd_obj) - result = str((cmd_obj.Reply).encode('utf-8')) - return True - except: - return False - else: - return False - - def __connectSkypeAPI(self): - """Get connected to the Skype client. - """ - # Create and attach skype api - - self.__skype.OnOnlineStatus = self.__onOnlineStatus - self.__skype.OnAttachmentStatus = self.__onSkypeAPIStatusReceived - self.__skype.OnCallStatus = self.__onSkypeCall - - try: - self.__skype.Timeout = 10000 - self.__skype.Attach() - - except SkypeAPIError: - self.__skypeConnectionFailed() - - - def __skypeConnectionFailed(self): + def mainloop(self): ''' + Run main loop. ''' - while self.attemptTimeout != 6: - time.sleep(5) - try: - self.__skype.Attach() - except SkypeAPIError: - pass - else: - self.stop() - return - - - def __skypeAPIIsConnected(self): - """Return true if connected. - """ - return self.__apiAttachState in [0, ] - - - def __onOutgoingCall(self, Call, Status): - """Set outgoing calls functions. - """ - if Status == Skype4Py.clsRinging: - self.__tuxBodyLedsBlink() - if Status in [Skype4Py.clsFinished, Skype4Py.clsCancelled, - Skype4Py.clsRefused, Skype4Py.clsFailed, Skype4Py.clsBusy]: - self.__tuxBodyResetLeds() - self.__currentCall = None - self.__tuxBodyIdle() - if self.configuration().getQuitGadget(): - def async(): - time.sleep(2.0) - self.stop() - t = threading.Thread(target = async) - t.start() - return - elif Status in [Skype4Py.clsRinging, Skype4Py.clsEarlyMedia, - Skype4Py.clsRouting, Skype4Py.clsInProgress, Skype4Py.clsUnplaced]: - - if Status in [Skype4Py.clsInProgress, Skype4Py.clsUnplaced]: - self.__tuxBodyResetLeds() - self.__currentCall = Call - self.__tuxBodyOnCall() - - - def __onSkypeCall(self, Call, Status): - """Set calls callback. - """ - if (Call.Type == Skype4Py.cltOutgoingP2P) or \ - (Call.Type == Skype4Py.cltOutgoingPSTN): - self.__onOutgoingCall(Call, Status) - elif (Call.Type == Skype4Py.cltIncomingP2P) or \ - (Call.Type == Skype4Py.cltIncomingPSTN): - Call.Finish() - - def callCurrentContact(self, contact): - """Call a specified contact. - """ - try: - self.__mutexCall.acquire() - # Get skype name - callName = self.__contactsDict.get(contact) - # Place call - if (callName != None) and (self.__currentCall == None): - self.__currentCall = self.__skype.PlaceCall(callName) - self.__mutexCall.release() - except: - if self.__mutexCall.locked(): - self.__mutexCall.release() - return - - def hangUp(self): - """Finish all placed calls. - """ - try: - self.__mutexCall.acquire() - if self.__currentCall != None: - try: - self.__currentCall.Finish() - self.__currentCall = None - except: - self.__currentCall.Resume() - self.__currentCal = None - self.__mutexCall.release() - except: - if self.__mutexCall.locked(): - self.__mutexCall.release() - return - - # ========================================================================== - # Skype application control - # ========================================================================== - - def __getSkypeAppConnected(self): - """Check for skype connection - """ - if os.name != "nt": - return len(commands.getoutput("ps -A | grep skype")) > 0 - else: - cmd = ["tasklist", "/FI", "IMAGENAME eq skype.exe"] - process = subprocess.Popen(cmd, stdin = subprocess.PIPE, - stdout = subprocess.PIPE) - values = process.stdout.read().lower() - values = values.split() - return ("skype.exe" in values) - - def __startSkypeApp(self): - """This function starts skype. - """ - # Return if skype is already started. - if self.__getSkypeAppConnected(): - self.normalStart = True - return - self.quitSkypeClient = True - self.throwMessage("Please wait while I launch the skype application") - - if os.name == 'nt': - self.__skype.Client.Start(Minimized=False, Nosplash=True) - else: - self.__startSkypeAppLinux() + while self.canRun: + sleep(2.0) - def __startSkypeAppLinux(self): - """Start skype on linux ( thread needed to do not block the script ). - """ - # Searching for skype binary. - result = [] - found =False - - result = os.environ - - result = result['PATH'].split(':') - - for path in result: - cmd = 'ls ' + path + ' | grep skype' - res = commands.getoutput(cmd) - if res.find('skype') >= 0: - found = True - break - - if found: - #start skype - self.__skypeProcess = subprocess.Popen("skype", stdin = subprocess.PIPE, - stdout = subprocess.PIPE) - - while not self.__getSkypeAppConnected(): - time.sleep(1) - self.__activeMain = True - else: - self.throwMessage("Sorry, it looks like skype is not installed. Please go to the skype website to download the software.") - self.__activeMain = False - - - # ========================================================================== - # Tux Droid body - # ========================================================================== - - def __tuxBodyOnCall(self): - """ - """ - self.throwActuation("upFlippers") - self.throwActuation("openMouth") - - def __tuxBodyIdle(self): - """ - """ - self.throwActuation("downFlippers") - self.throwActuation("closeMouth") - - def __tuxBodyResetLeds(self): - """ - """ - self.throwActuation("ledsOff", "LED_BOTH") - self.throwActuation("ledsOn", "LED_BOTH", 1.0) - - def __tuxBodyLedsBlink(self): - """ - """ - self.throwActuation("ledsBlink", "LED_BOTH", 100, 0.5) - - # ========================================================================== - # Contacs list - # ========================================================================== - - def __contact(self, user): + def onPluginStop(self): ''' - Add a contacts from the contacts list. + OnPluginStop event. ''' - if user == self.__skype.CurrentUser: - return - - userFNEnc = user.FullName.encode("UTF-8").replace(" ", "_") - self.throwTrace(userFNEnc) - userDNEnc = user.DisplayName.encode("UTF-8").replace(" ", "_") - userHEnc = user.Handle.encode("UTF-8").replace(" ", "_") - - #Add contact. - if user.OnlineStatus not in [Skype4Py.olsUnknown, Skype4Py.olsOffline, Skype4Py.olsInvisible]: - - if not ( ( userHEnc, userDNEnc, userHEnc ) in self.__contactsList ): - - if len(userFNEnc) > 0: - self.__contactsDict[userFNEnc] = userHEnc - self.__contactsList.append(userFNEnc) - - elif len(userDNEnc) > 0: - self.__contactsDict[userDNEnc] = userHEnc - self.__contactsList.append(userDNEnc) - else: - self.__contactsDict[userHEnc] = userHEnc - self.__contactsList.append(userHEnc) - #Remove contact. - else: - - if userFNEnc in self.__contactsList: - self.__contactsList.remove(userFNEnc) - del self.__contactsDict[userFNEnc] - - elif userDNEnc in 0: - self.__contactsList.remove(userDNEnc) - del self.__contactsDict[userDNEnc] - - else: - self.__contactsList.remove(userHEnc) - del self.__contactsDict[userHEnc] - - - - - def __queryContacts(self): - ''' - Query for contacts. - ''' - try: - while (not ( self.__skype.AttachmentStatus in [Skype4Py.apiAttachSuccess, ])): - time.sleep(0.2) - - self.__contactsList = [] - self.__contactsDict = {} - - for user in self.__skype.Friends: - - if user.OnlineStatus not in [Skype4Py.olsUnknown, - Skype4Py.olsOffline, Skype4Py.olsInvisible]: - userFNEnc = user.FullName.encode("UTF-8").replace(" ", "_") - ... [truncated message content] |
From: jerome <c2m...@c2...> - 2009-11-27 10:50:32
|
Author: jerome Date: 2009-11-27 11:50:17 +0100 (Fri, 27 Nov 2009) New Revision: 5915 Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Airplane.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Angel.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Angry.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Asleep.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Auto.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Beer.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Birthday.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Camera.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Cat.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Clock.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Coffee.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Computer.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Confused.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Crying.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Disappointed.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Dog.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Duh.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Dunno.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Eating.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Email.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Embarrassed.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Filmstrip.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Gasp.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Gift.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Happy.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Heart.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Hugging.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Idea.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Island.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Kiss.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing2.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing_evil.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing_wild.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Lightning.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Martini.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Mobile.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Money.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Nerd.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Note.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Party.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sad.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Secret.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sheep.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Shh.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sick.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Soccer.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Star.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sticking_out_tongue.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Stormy.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Telephone.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Winky.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Yeah.att software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/breaking.att Log: * Added attitunes. Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Airplane.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Airplane.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Angel.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Angel.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Angry.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Angry.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Asleep.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Asleep.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Auto.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Auto.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Beer.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Beer.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Birthday.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Birthday.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Camera.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Camera.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Cat.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Cat.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Clock.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Clock.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Coffee.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Coffee.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Computer.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Computer.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Confused.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Confused.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Crying.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Crying.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Disappointed.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Disappointed.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Dog.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Dog.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Duh.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Duh.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Dunno.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Dunno.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Eating.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Eating.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Email.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Email.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Embarrassed.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Embarrassed.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Filmstrip.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Filmstrip.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Gasp.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Gasp.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Gift.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Gift.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Happy.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Happy.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Heart.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Heart.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Hugging.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Hugging.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Idea.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Idea.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Island.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Island.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Kiss.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Kiss.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing2.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing2.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing_evil.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing_evil.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing_wild.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Laughing_wild.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Lightning.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Lightning.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Martini.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Martini.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Mobile.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Mobile.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Money.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Money.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Nerd.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Nerd.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Note.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Note.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Party.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Party.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sad.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sad.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Secret.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Secret.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sheep.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sheep.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Shh.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Shh.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sick.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sick.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Soccer.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Soccer.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Star.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Star.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sticking_out_tongue.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Sticking_out_tongue.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Stormy.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Stormy.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Telephone.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Telephone.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Winky.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Winky.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Yeah.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/Yeah.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/breaking.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/attitunes/breaking.att ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: jerome <c2m...@c2...> - 2009-11-27 10:46:55
|
Author: jerome Date: 2009-11-27 11:46:45 +0100 (Fri, 27 Nov 2009) New Revision: 5914 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/resources/plugin.xml Log: * Bumped branch to 0.0.4 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-11-27 10:40:10 UTC (rev 5913) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2009-11-27 10:46:45 UTC (rev 5914) @@ -7,7 +7,7 @@ __author__ = "Conan Jerome" __appname__ = "Python gadget skype" -__version__ = "0.0.3" +__version__ = "0.0.4" __date__ = "2009/06/16" __license__ = "GPL" Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml 2009-11-27 10:40:10 UTC (rev 5913) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml 2009-11-27 10:46:45 UTC (rev 5914) @@ -8,7 +8,7 @@ <ttsName>Plugin skype.</ttsName> <description>This plugin controls skype application</description> <author>Jérôme Conan</author> - <version>0.0.3</version> + <version>0.0.4</version> <iconFile>resources/icon.png</iconFile> <uuid>8349ed52-572d-4c3f-a7b8-f6d4a5ae2c0</uuid> <platform>all</platform> |
From: jerome <c2m...@c2...> - 2009-11-27 10:40:23
|
Author: jerome Date: 2009-11-27 11:40:10 +0100 (Fri, 27 Nov 2009) New Revision: 5913 Modified: software_suite_v3/software/plugin/plugin-skype/trunk/executables/plugin-skype.py software_suite_v3/software/plugin/plugin-skype/trunk/resources/plugin.xml Log: * Bumped trunk to 0.0.4 Modified: software_suite_v3/software/plugin/plugin-skype/trunk/executables/plugin-skype.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/trunk/executables/plugin-skype.py 2009-11-27 10:38:57 UTC (rev 5912) +++ software_suite_v3/software/plugin/plugin-skype/trunk/executables/plugin-skype.py 2009-11-27 10:40:10 UTC (rev 5913) @@ -7,7 +7,7 @@ __author__ = "Conan Jerome" __appname__ = "Python gadget skype" -__version__ = "0.0.3" +__version__ = "0.0.4" __date__ = "2009/06/16" __license__ = "GPL" Modified: software_suite_v3/software/plugin/plugin-skype/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-skype/trunk/resources/plugin.xml 2009-11-27 10:38:57 UTC (rev 5912) +++ software_suite_v3/software/plugin/plugin-skype/trunk/resources/plugin.xml 2009-11-27 10:40:10 UTC (rev 5913) @@ -8,7 +8,7 @@ <ttsName>Plugin skype.</ttsName> <description>This plugin controls skype application</description> <author>Jérôme Conan</author> - <version>0.0.3</version> + <version>0.0.4</version> <iconFile>resources/icon.png</iconFile> <uuid>8349ed52-572d-4c3f-a7b8-f6d4a5ae2c0</uuid> <platform>all</platform> |
From: jerome <c2m...@c2...> - 2009-11-27 10:39:14
|
Author: jerome Date: 2009-11-27 11:38:57 +0100 (Fri, 27 Nov 2009) New Revision: 5912 Added: software_suite_v3/software/plugin/plugin-skype/tags/0.0.3/ Log: * Tagged version 0.0.3 Copied: software_suite_v3/software/plugin/plugin-skype/tags/0.0.3 (from rev 5837, software_suite_v3/software/plugin/plugin-skype/trunk) |
From: jerome <c2m...@c2...> - 2009-11-27 10:34:43
|
Author: jerome Date: 2009-11-27 11:34:33 +0100 (Fri, 27 Nov 2009) New Revision: 5911 Added: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/ Log: * Created a branch to implement in and out functionalities. Copied: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin (from rev 5837, software_suite_v3/software/plugin/plugin-skype/trunk) |
From: jerome <c2m...@c2...> - 2009-11-27 10:33:39
|
Author: jerome Date: 2009-11-27 11:33:21 +0100 (Fri, 27 Nov 2009) New Revision: 5910 Removed: software_suite_v3/software/plugin/plugin-skype/in_out_plugin/ Log: * Error branching |
From: jerome <c2m...@c2...> - 2009-11-27 10:32:00
|
Author: jerome Date: 2009-11-27 11:31:39 +0100 (Fri, 27 Nov 2009) New Revision: 5909 Added: software_suite_v3/software/plugin/plugin-skype/in_out_plugin/ Log: * Created a branch to implement in and out functionalities. Copied: software_suite_v3/software/plugin/plugin-skype/in_out_plugin (from rev 5837, software_suite_v3/software/plugin/plugin-skype/trunk) |
From: ks156 <c2m...@c2...> - 2009-11-24 06:34:34
|
Author: ks156 Date: 2009-11-24 07:34:22 +0100 (Tue, 24 Nov 2009) New Revision: 5908 Removed: software_suite_v3/software/post-commit-test Log: * End of post-commit test Deleted: software_suite_v3/software/post-commit-test =================================================================== |