tux-droid-svn Mailing List for Tux Droid CE (Page 3)
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...> - 2010-02-09 11:17:49
|
Author: jerome Date: 2010-02-09 12:17:38 +0100 (Tue, 09 Feb 2010) New Revision: 6057 Modified: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.wiki software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.wiki software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.wiki software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/help.wiki Log: * Updated plugin description. Modified: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.wiki 2010-02-09 11:07:45 UTC (rev 6056) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.wiki 2010-02-09 11:17:38 UTC (rev 6057) @@ -1,3 +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. +Happy Valentux Modified: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.wiki 2010-02-09 11:07:45 UTC (rev 6056) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.wiki 2010-02-09 11:17:38 UTC (rev 6057) @@ -1,2 +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. +Happy Valentux Modified: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.wiki 2010-02-09 11:07:45 UTC (rev 6056) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.wiki 2010-02-09 11:17:38 UTC (rev 6057) @@ -1,2 +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. +Happy Valentux Modified: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/help.wiki 2010-02-09 11:07:45 UTC (rev 6056) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/help.wiki 2010-02-09 11:17:38 UTC (rev 6057) @@ -1,2 +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. +Happy Valentux... |
From: jerome <c2m...@c2...> - 2010-02-09 11:07:58
|
Author: jerome Date: 2010-02-09 12:07:45 +0100 (Tue, 09 Feb 2010) New Revision: 6056 Added: software_suite_v3/software/plugin/plugin-tux-valentine/ software_suite_v3/software/plugin/plugin-tux-valentine/branches/ software_suite_v3/software/plugin/plugin-tux-valentine/tags/ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/LICENSE software_suite_v3/software/plugin/plugin-tux-valentine/trunk/build.py software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/__init__.py software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/version.py software_suite_v3/software/plugin/plugin-tux-valentine/trunk/executables/ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/executables/plugin-valentines-day.py software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine1.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine10.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine2.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine3.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine4.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine5.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine6.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine7.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine8.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine9.att software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.po software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.wiki software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.po software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.wiki software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.po software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.wiki software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/help.wiki software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/icon.png software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/nl.po software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/nl.wiki software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.xml Log: * Added Tux valentine plugin. Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/LICENSE 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/build.py 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine.scp") Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/PluginPackager.py 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/util/misc/version.py 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/builder/version.py 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/executables/plugin-valentines-day.py =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/executables/plugin-valentines-day.py (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/executables/plugin-valentines-day.py 2010-02-09 11:07:45 UTC (rev 6056) @@ -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 = [ + "Valentine1", + "Valentine2", + "Valentine3", + "Valentine4", + "Valentine5", + "Valentine6", + "Valentine7", + "Valentine8", + "Valentine9", + "Valentine10", +] + +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()) Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine1.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine1.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine10.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine10.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine2.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine2.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine3.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine3.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine4.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine4.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine5.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine5.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine6.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine6.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine7.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine7.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine8.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine8.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine9.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/attitunes/Valentine9.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.po =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.po (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.po 2010-02-09 11:07:45 UTC (rev 6056) @@ -0,0 +1,23 @@ +msgid "Plugin Sense of humor" +msgstr "Tux Valentine" + +msgid "Plugin Sense of humor." +msgstr "Tux Valentine" + +msgid "Sense of humor..." +msgstr "Happy Valentux..." + +msgid "Frequency" +msgstr "Frequency" + +msgid "Crazy,Often,Normal,Rarely" +msgstr "Crazy,Often,Normal,Rarely" + +msgid "Start the idle behavior" +msgstr "Tux Valentine aktivieren" + +msgid "Activation" +msgstr "Activation" + +msgid "Activate Sense of humor behavior" +msgstr "Tux Valentine aktivieren" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/de.wiki 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/resources/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.po (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.po 2010-02-09 11:07:45 UTC (rev 6056) @@ -0,0 +1,23 @@ +msgid "Plugin Sense of humor" +msgstr "Tux Valentine" + +msgid "Plugin Sense of humor." +msgstr "Tux Valentine" + +msgid "Sense of humor..." +msgstr "Happy Valentux..." + +msgid "Frequency" +msgstr "Frequency" + +msgid "Crazy,Often,Normal,Rarely" +msgstr "Crazy,Often,Normal,Rarely" + +msgid "Start the idle behavior" +msgstr "Activate Tux Valentine" + +msgid "Activation" +msgstr "Activation" + +msgid "Activate Sense of humor behavior" +msgstr "Activate Tux Valentine" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/en.wiki 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/resources/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.po (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.po 2010-02-09 11:07:45 UTC (rev 6056) @@ -0,0 +1,23 @@ +msgid "Plugin Sense of humor" +msgstr "Tux Valentine" + +msgid "Plugin Sense of humor." +msgstr "Tux Valentine" + +msgid "Sense of humor..." +msgstr "Happy Valentux..." + +msgid "Frequency" +msgstr "Fréquence" + +msgid "Crazy,Often,Normal,Rarely" +msgstr "Fou,Souvent,Normal,Rarement" + +msgid "Start the idle behavior" +msgstr "Activer Tux Valentine" + +msgid "Activation" +msgstr "Activation" + +msgid "Activate Sense of humor behavior" +msgstr "Activer Tux Valentine" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/fr.wiki 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/help.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/help.wiki 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/resources/icon.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/icon.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/nl.po (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/nl.po 2010-02-09 11:07:45 UTC (rev 6056) @@ -0,0 +1,23 @@ +msgid "Merry Tuxmas plugin" +msgstr "Tux Valentine" + +msgid "Plugin Sense of humor." +msgstr "Tux Valentine" + +msgid "Sense of humor..." +msgstr "Happy Valentux..." + +msgid "Frequency" +msgstr "Frequentie" + +msgid "Crazy,Often,Normal,Rarely" +msgstr "Overdreven,Vaak,Normaal,Zelden" + +msgid "Start the idle behavior" +msgstr "Activeer Tux Valentine" + +msgid "Activation" +msgstr "Activatie" + +msgid "Activate Sense of humor behavior" +msgstr "Activeer Tux Valentine" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/nl.wiki =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/nl.wiki (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/nl.wiki 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.pot (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.pot 2010-02-09 11:07:45 UTC (rev 6056) @@ -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-tux-valentine/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.xml (rev 0) +++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.xml 2010-02-09 11:07:45 UTC (rev 6056) @@ -0,0 +1,49 @@ +<plugin> + <interpreter + kind="python"> + <executable>executables/plugin-valentines-day.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>110fb66b-d43e-4fbf-a692-02659aa0a622</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...> - 2010-02-09 10:20:03
|
Author: jerome Date: 2010-02-09 11:19:43 +0100 (Tue, 09 Feb 2010) New Revision: 6055 Added: software_suite_v3/software/plugin/plugin-yahoo/ software_suite_v3/software/plugin/plugin-yahoo/branches/ software_suite_v3/software/plugin/plugin-yahoo/tags/ software_suite_v3/software/plugin/plugin-yahoo/trunk/ software_suite_v3/software/plugin/plugin-yahoo/trunk/LICENSE software_suite_v3/software/plugin/plugin-yahoo/trunk/build.py software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/ software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/__init__.py software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/ software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/version.py software_suite_v3/software/plugin/plugin-yahoo/trunk/dependencies/ software_suite_v3/software/plugin/plugin-yahoo/trunk/dependencies/Delphi/ software_suite_v3/software/plugin/plugin-yahoo/trunk/dependencies/Delphi/EmbeddedWB.zip software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/ software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/TuxDroidYahoo.exe software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/ software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/Project2.dpr software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.dfm software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.pas software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/plugin-yahoo.py software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/attitunes/ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/attitunes/yahoomail1.att software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/attitunes/yahoomail2.att software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/attitunes/yahoomail3.att software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/attitunes/yahoomail4.att software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/de.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/de.wiki software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/en.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/en.wiki software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/fr.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/fr.wiki software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/help.wiki software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/nl.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/nl.wiki software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/plugin.png software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/plugin.xml Log: * Added yahoo mail plugin project. Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/LICENSE 2010-02-09 10:19:43 UTC (rev 6055) @@ -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-yahoo/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/build.py 2010-02-09 10:19:43 UTC (rev 6055) @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +# Copyright (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-yahoo.scp") Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/PluginPackager.py 2010-02-09 10:19:43 UTC (rev 6055) @@ -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-yahoo/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2010-02-09 10:19:43 UTC (rev 6055) @@ -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-yahoo/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/util/misc/version.py 2010-02-09 10:19:43 UTC (rev 6055) @@ -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-yahoo/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/builder/version.py 2010-02-09 10:19:43 UTC (rev 6055) @@ -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 = '1.0' +author = "Jerome Conan (jer...@ky...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/dependencies/Delphi/EmbeddedWB.zip =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-yahoo/trunk/dependencies/Delphi/EmbeddedWB.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/TuxDroidYahoo.exe =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/TuxDroidYahoo.exe ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/Project2.dpr =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/Project2.dpr (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/Project2.dpr 2010-02-09 10:19:43 UTC (rev 6055) @@ -0,0 +1,15 @@ +program Project2; + +uses + Forms, + windows, + YahooMail in 'YahooMail.pas' {Form1}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + ShowWindow(Form1.Handle, SW_SHOWNOACTIVATE); + Application.run; +end. Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.dfm =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.dfm (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.dfm 2010-02-09 10:19:43 UTC (rev 6055) @@ -0,0 +1,83 @@ +object Form1: TForm1 + Left = 283 + Top = 101 + Width = 940 + Height = 758 + AlphaBlend = True + AlphaBlendValue = 0 + Caption = 'Form1' + Color = clBtnFace + Enabled = False + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + Position = poDefault + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object EmbeddedWB1: TEmbeddedWB + Left = 8 + Top = 12 + Width = 921 + Height = 285 + TabOrder = 0 + RegisterAsBrowser = True + OnDocumentComplete = EmbeddedWB1DocumentComplete + DisableCtrlShortcuts = 'N' + UserInterfaceOptions = [EnablesFormsAutoComplete, EnableThemes] + About = ' EmbeddedWB http://bsalsa.com/' + PrintOptions.HTMLHeader.Strings = ( + '<HTML></HTML>') + PrintOptions.Orientation = poPortrait + ControlData = { + 4C000000617100008E4500000000000000000000000000000000000000000000 + 000000004C000000000000000000000001000000E0D057007335CF11AE690800 + 2B2E126208000000000000004C0000000114020000000000C000000000000046 + 8000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000100000000000000000000000000000000000000} + end + object Memo1: TMemo + Left = 16 + Top = 312 + Width = 905 + Height = 145 + Lines.Strings = ( + 'Memo1') + ScrollBars = ssBoth + TabOrder = 1 + end + object Memo2: TMemo + Left = 16 + Top = 472 + Width = 905 + Height = 169 + Lines.Strings = ( + 'Memo2') + ScrollBars = ssBoth + TabOrder = 2 + end + object Timer1: TTimer + OnTimer = Timer1Timer + Left = 280 + end + object Timer2: TTimer + Enabled = False + OnTimer = Timer2Timer + Left = 312 + end + object Timer3: TTimer + OnTimer = Timer3Timer + Left = 24 + Top = 32 + end + object DifferedStart: TTimer + Interval = 1500 + OnTimer = DifferedStartTimer + Left = 80 + Top = 40 + end +end Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.pas =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.pas (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.pas 2010-02-09 10:19:43 UTC (rev 6055) @@ -0,0 +1,481 @@ +{* This file is part of "Tux Droid Yahoo plugin". + * Copyright 2009, kysoh + * Author : Conan Jerome. + * eMail : jer...@ky... + * Site : http://www.kysoh.com/ + * + * "Tux Droid Yahoo plugin" 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. + * + * "Tux Droid Yahoo plugin" 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 "Tux Droid Yahoo plugin"; 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. + *} + +unit YahooMail; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, OleCtrls, SHDocVw_EWB, EwbCore, EmbeddedWB, MSHTML_TLB, + IdBaseComponent, IdAntiFreezeBase, IdAntiFreeze, ExtCtrls, StdCtrls, + OleServer, MSXML2_TLB; + + +type + TForm1 = class(TForm) + EmbeddedWB1: TEmbeddedWB; + Timer1: TTimer; + Timer2: TTimer; + Timer3: TTimer; + Memo1: TMemo; + Memo2: TMemo; + DifferedStart: TTimer; + + procedure FormCreate(Sender: TObject); + procedure EmbeddedWB1DocumentComplete(ASender: TObject;const pDisp: IDispatch; var URL: OleVariant); + procedure Timer1Timer(Sender: TObject); + procedure Timer2Timer(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure Timer3Timer(Sender: TObject); + procedure DifferedStartTimer(Sender: TObject); + + private + { Darations priv } + procedure change(id : string ; value : string); + procedure send(id : String); + function getHTMLInbox(): String; + procedure getEmails(raw : String); + function SplitStrings(const str: string; const separator: string; Strings: TStrings): TStrings; + function initXml(): IXMLDOMNode; + procedure writeXmlEmail(Parent: IXMLDOMNode ;id : String; Sender : String; Subject : String); + procedure writeXmlBadLogin(); + function ascFilter(chain : String):String; + public + { Darations publiques } + end; + +var + Form1: TForm1; + pass_login : boolean; + pass_inbox : boolean; + raw_inbox : String; + + //User parameters + login : String; + password : String; + timeout : Integer; + + XmlDoc: IXMLDOMDocument2; + +implementation + +{$R *.dfm} + +{========== Form Create function ==========} +procedure TForm1.FormCreate(Sender: TObject); +begin + //Hidding plugin Task bar. + SetWindowLong(Application.Handle, + GWL_EXSTYLE, + GetWindowLong(Application.Handle,GWL_EXSTYLE) + or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW + ); + ShowWindow(Form1.Handle, SW_SHOWNOACTIVATE); + ShowWindow(EmbeddedWB1.Handle, SW_SHOWNOACTIVATE); +end; + + +procedure TForm1.DifferedStartTimer(Sender: TObject); +begin + DifferedStart.Enabled := False; + //Getting login and assword informations. + if ParamCount < 2 then + begin + writeXmlBadLogin(); + Application.Terminate; + end + else + begin + //Setting login values. + login := ParamStr(1); + password := ParamStr(2); + //timeout in seconds. + timeout := strtoint(ParamStr(3)); + end; + + Form1.Height := 50; + Form1.Width := 30; + + raw_inbox := ''; + //Login stuff. + pass_login := false; + pass_inbox := false; + self.EmbeddedWB1.DisableNavSound(true); + EmbeddedWB1.NavigateWait('https://login.yahoo.com/'); +end; + + +{########### Yahoo login functions ################## + ---------------------------------------------------------} + +{========== Webbrowser document loaded ==========} +procedure TForm1.EmbeddedWB1DocumentComplete(ASender: TObject; const pDisp: IDispatch; var URL: OleVariant); +const + login_url = 'login.yahoo.com'; + inbox_url = 'mail.yahoo.com'; +begin + //Handle login errors. + if Pos('https://login.yahoo.com/config/login', String(URL)) <> 0 then + begin + writeXmlBadLogin(); + Application.Terminate; + end + + //Start browsing and loging + else if ( Pos(login_url, String(URL)) <> 0 ) and ( not pass_login ) then + pass_login := true + + //User logged in, so getting inbox. + else if Pos ('.mail.yahoo.com/dc/launch?.gx=', String(URL)) <> 0 then + begin + pass_inbox := True; + raw_inbox := getHTMLInbox(); + getEmails(raw_inbox); + + Application.Terminate; + end; +end; + + +{========== This function browse html code and targeted input values ==========} +procedure TForm1.change(id : string ; value : string); +var + HtmlElement: IHTMLElement; + AllHidden: IHTMLElementCollection; + i:integer; +begin + try + //Getting all html input fields. + AllHidden := self.EmbeddedWB1.GetDocument.all.tags('input') as IHTMLElementCollection; + for i:=0 to AllHidden.length-1 do + begin + //For each input getting text and password fields ( not hidden ones ). + HtmlElement := AllHidden.item(I, '') as IHTMLElement; + if (lowercase(HtmlElement.getAttribute('type', 0)) = 'password') or (lowercase(HtmlElement.getAttribute('type', 0)) = 'text') then + begin + //And set the given value. + if HtmlElement.getAttribute('name', 0) = id then + begin + HtmlElement.setAttribute('value', value, 0); + exit; + end; + end; + Application.ProcessMessages; + end; + except + end; + +end; + + +{========== Do click on the specified form button ==========} +procedure TForm1.send(id : String); +var + HtmlElement: IHTMLElement; + AllHidden: IHTMLElementCollection; + i:integer; +begin + try + //Getting all input fields. + AllHidden := self.EmbeddedWB1.GetDocument.all.tags('input') as IHTMLElementCollection; + for i:=0 to AllHidden.length-1 do + begin + //Searching for submit button. + HtmlElement := AllHidden.item(I, '') as IHTMLElement; + if lowercase(HtmlElement.getAttribute('type', 0)) = 'submit' then + begin + if HtmlElement.getAttribute('name', 0) = id then + begin + //And click. + HtmlElement.click; + exit; + end; + end; + Application.ProcessMessages; + end; + except + end; + + +end; + + +{========== Timer that get user logged in to his yahoo mail account ====} +procedure TForm1.Timer1Timer(Sender: TObject); +begin + if pass_login then + begin + Timer1.Enabled := false; + change('login', login); + change('passwd', password); + send('.save'); + sleep(1000); + Timer2.Enabled := true; + end; + Application.ProcessMessages; +end; + + +{========== Timer 2 that change current login page to mail.live.com =========} +procedure TForm1.Timer2Timer(Sender: TObject); +begin + Timer2.Enabled := false; + //Go to the mailbox. + EmbeddedWB1.Go('http://mail.yahoo.com/'); + while not pass_inbox do + begin + Application.ProcessMessages; + sleep(1000); + end; +end; + + +{========= Handle a connection timeout ==========} +procedure TForm1.Timer3Timer(Sender: TObject); +begin + if timeout = 1 then + Application.Terminate; + Dec(timeout, 1); +end; + + + +{========= Search for 'per user' HTML inbox ==========} +function TForm1.getHTMLInbox(): String; +var + pos1 : Integer; +begin + pos1 := Pos('<BODY class=', EmbeddedWB1.DocumentSource); + result := Copy(EmbeddedWB1.DocumentSource, Pos1, length(EmbeddedWB1.DocumentSource) - pos1); + pos1 := Pos('<STYLE>', result); + result := Copy(result, 0, length(result) - length(Copy(result, pos1, length(result) - pos1))); + + //Gettin raw messages. + pos1 := Pos('<messages>', result); + + result := Copy(result, pos1, length(result) - pos1); + pos1 := Pos('</messages>', result); + result := Copy(result, 0, length(result) - length(Copy(result, pos1 , length(result) - pos1))); + result := Copy(result, length('<messages>') + 1, length(result) - length('messages')); +end; + + +{========== Retrieve and sort raw inbox ==========} +procedure TForm1.getEmails(raw : String); +var + mails : TStringList; + i, start, stop : Integer; + id, subject, sender: String; + baseNode : IXMLDOMNode; +begin + try + mails := TStringList.Create; + SplitStrings(raw, '<messageInfo', mails); + + baseNode := initXml(); + + for i:=1 to mails.Count - 1 do + begin + + //Getting mail id. + start := Pos('mid="', mails[i]); + id := Copy(mails[i], start + length('mid="'), length(mails[i]) - start); + stop := Pos('"', id); + id := Copy(id, 0, length(id) - length(Copy(id, stop, length(id) - stop)) - 1); + memo2.Lines.Add(id); + + //getting mail subject. + start := Pos('subject="', mails[i]); + subject := Copy(mails[i], start + length('subject="'), length(mails[i]) - start); + stop := Pos(' mimeType="', subject); + subject := Copy(subject, 0, length(subject) - length(Copy(subject, stop, length(subject) - stop)) - 2); + memo2.Lines.Add(subject); + + //Getting mail sender. + start := Pos('<from><name>', mails[i]); + sender := Copy(mails[i], start + length('<from><name>'), length(mails[i]) - start); + stop := Pos('</name>', sender); + sender := Copy(sender, 0, length(sender) - length(Copy(sender, stop, length(sender) - stop)) - 1); + memo2.Lines.Add(sender); + + if sender = '' then + begin + //Sender name is empty, so getting email address. + start := Pos('</name><email>', mails[i]); + sender := Copy(mails[i], start + length('</name><email>'), length(mails[i]) - start); + stop := Pos('</email>', sender); + sender := Copy(sender, 0, length(sender) - length(Copy(sender, stop, length(sender) - stop)) - 1); + memo2.Lines.Add(sender); + end; + subject := ascFilter(StringReplace(subject, '‏', '', [rfReplaceAll])); + sender := ascFilter(sender); + writeXmlEmail(baseNode, id, sender, subject); + Application.ProcessMessages; + end; + XmlDoc.save(ExtractFilePath(Application.ExeName) + '\mails.xml'); + + FreeAndNil(mails); + except + showmessage('exception'); + writeXmlBadLogin(); + Application.Terminate; + end; + +end; + + +{========== Initialize Xml document ==========} +function TForm1.initXml(): IXMLDOMNode; +var + xmlf : String; + node : IXMLDOMNode; +begin + //init xml file. + //Deleting last result if exists. + xmlf := ExtractFilePath(Application.ExeName) + '\mails.xml'; + if FileExists(xmlf) then + DeleteFile(xmlf); + //Creating xml struct. + XmlDoc := CoDOMDocument.Create; + node:= XmlDoc.createNode('element', 'root', ''); + XmlDoc.appendChild(node); + result := node; +end; + + + +{========== Write an XML Email element into the xml base node ==========} +procedure TForm1.writeXmlEmail(Parent: IXMLDOMNode ;id : String; Sender : String; Subject : String); +var + mail : IXMLDOMElement; +begin + //write an xml tag + + mail := XmlDoc.createElement('mail'); + mail.setAttribute('uuid', id); + mail.setAttribute('sender', sender); + mail.setAttribute('subject', subject); + + //And finally appending mail datas into XML mails list. } + Parent.appendChild(mail); + +end; + + +{========== Base login xml result =========} +procedure TForm1.writeXmlBadLogin(); +var + node : IXMLDOMNode; +begin + if not Assigned(XmlDoc) then + node := initXml(); + node.appendChild(XmlDoc.createTextNode('login error')); + XmlDoc.save(ExtractFilePath(Application.ExeName) + '\mails.xml'); +end; + + +{========== Fills a string list with the parts of "str" separated by str ==========} +function TForm1.SplitStrings(const str: string; const separator: string; Strings: TStrings): TStrings; +var + n: integer; + p, q, s: PChar; + item: string; + begin + if Strings = nil then + result := TStringList.Create + else + Result := Strings; + try + p := PChar(str); + s := PChar(separator); + n := Length(separator); + repeat + q := StrPos(p, s); + if q = nil then q := StrScan(p, #0); + SetString(item, p, q - p); + result.Add(item); + p := q + n; + until q^ = #0; + except + item := ''; + if Strings = nil then result.Free; + raise; + end; + end; + + + +{========== Changing html ascii codes ==========} +function TForm1.ascFilter(chain:String):String; +begin + chain := StringReplace(chain, ':', ':', [rfReplaceAll]); + chain := StringReplace(chain, '!', '!', [rfReplaceAll]); + chain := StringReplace(chain, '?', '?', [rfReplaceAll]); + chain := StringReplace(chain, ''', '''', [rfReplaceAll]); + chain := StringReplace(chain, '*', '*', [rfReplaceAll]); + chain := StringReplace(chain, '|', ';', [rfReplaceAll]); + chain := StringReplace(chain, '&', ';', [rfReplaceAll]); + chain := StringReplace(chain, '[', '[', [rfReplaceAll]); + chain := StringReplace(chain, ']', ']', [rfReplaceAll]); + chain := StringReplace(chain, '@', '@', [rfReplaceAll]); + chain := StringReplace(chain, ' ', '', [rfReplaceAll]); + chain := StringReplace(chain, ' ', ' ', [rfReplaceAll]); + chain := StringReplace(chain, '"', '"', [rfReplaceAll]); + chain := StringReplace(chain, '#', '#', [rfReplaceAll]); + chain := StringReplace(chain, '$', '$', [rfReplaceAll]); + chain := StringReplace(chain, '%', '%', [rfReplaceAll]); + chain := StringReplace(chain, '(', '(', [rfReplaceAll]); + chain := StringReplace(chain, ')', ')', [rfReplaceAll]); + chain := StringReplace(chain, '+', '+', [rfReplaceAll]); + chain := StringReplace(chain, ',', ',', [rfReplaceAll]); + chain := StringReplace(chain, '-', '-', [rfReplaceAll]); + chain := StringReplace(chain, '/', '/', [rfReplaceAll]); + chain := StringReplace(chain, ';', ';', [rfReplaceAll]); + chain := StringReplace(chain, '<', '<', [rfReplaceAll]); + chain := StringReplace(chain, '=', '=', [rfReplaceAll]); + chain := StringReplace(chain, '>', '>', [rfReplaceAll]); + chain := StringReplace(chain, '\', '\', [rfReplaceAll]); + chain := StringReplace(chain, '^', '^', [rfReplaceAll]); + chain := StringReplace(chain, '_', '_', [rfReplaceAll]); + chain := StringReplace(chain, '{', '{', [rfReplaceAll]); + chain := StringReplace(chain, '}', '}', [rfReplaceAll]); + chain := StringReplace(chain, '~', '~', [rfReplaceAll]); + + chain := StringReplace(chain, 'à', ' [rfReplaceAll]); + chain := StringReplace(chain, 'è', ' [rfReplaceAll]); + chain := StringReplace(chain, 'é', ' [rfReplaceAll]); + chain := StringReplace(chain, 'ê', ' [rfReplaceAll]); + chain := StringReplace(chain, 'ó', ' [rfReplaceAll]); + chain := StringReplace(chain, 'ó', ' [rfReplaceAll]); + + result := chain; +end; + + +{========== Disabling close feature ==========} +procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); +begin + CanClose := False; +end; + +end. Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/plugin-yahoo.py =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/plugin-yahoo.py (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/plugin-yahoo.py 2010-02-09 10:19:43 UTC (rev 6055) @@ -0,0 +1,453 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2010 Kysoh Sa +# Jérôme Conan <jerome.conan AT kysoh.com> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +__author__ = "Jerome Conan" +__appname__ = "Python plugin Yahoo" +__version__ = "1.0" +__date__ = "2010/01/21" +__license__ = "GPL" + +import os +import sys +import time +import pickle +import random +import threading +import subprocess + +from string import find, rfind + +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + +from util.xml.XmlSerializer import XmlSerializer +from util.SimplePlugin.SimplePlugin import SimplePlugin +from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration + + +# ============================================================================== +# Declaration of the "YahooPluginConfiguration" object. +# ============================================================================== +class YahooConfiguration(SimplePluginConfiguration): + '''Access to the plugin parameters. + ''' + + # -------------------------------------------------------------------------- + # Configuration initialization. + # -------------------------------------------------------------------------- + def __init__(self): + '''Initialization of the class. + ''' + # Call the super class + SimplePluginConfiguration.__init__(self) + # Initialize the parameters + self.__user = "" + self.__password = "" + self.__readSubject = True + self.__readSender = True + + # -------------------------------------------------------------------------- + # Return the user parameter value. + # -------------------------------------------------------------------------- + def getUser(self): + '''Return the user parameter value. + ''' + #Verify email validity. + if ( self.__user.find('@') == -1) or ( self.__user[self.__user.find('@'):].find('.') == -1 ): + return "" + + if not self.isValidAddress(self.__user): + return "" + + return self.__user + + # -------------------------------------------------------------------------- + # Return True if given address is 'Yahoo' friendly. + # -------------------------------------------------------------------------- + def isValidAddress(self, address): + '''Return True if given address is 'Yahoo' friendly. + ''' + #Checking first for forbidden chars. + pattern = ['[', '^', '"', ']', '+', ')', '"', '>', '(', '[', '^', '>', ']', '+', + ')', '<', '/', '>', '{', '}', '!', '*', '=', ':', ';', ',', "'"] + for forbidden in pattern: + if find(address, forbidden) != -1: + return False + + #Now checking that user address starts with a letter. + if not address[0].isalpha(): + return False + + return True + + # -------------------------------------------------------------------------- + # Set the user parameter value. + # -------------------------------------------------------------------------- + def setUser(self, user): + '''Set the user parameter value. + ''' + self.__user = user + + # -------------------------------------------------------------------------- + # Return the password parameter value. + # -------------------------------------------------------------------------- + def getPassword(self): + '''Return the password parameter value. + ''' + return self.__password + + # -------------------------------------------------------------------------- + # Set the password parameter value. + # -------------------------------------------------------------------------- + def setPassword(self, password): + '''Set the password parameter value. + ''' + self.__password = password + + # -------------------------------------------------------------------------- + # Return read sender user parameter. + # -------------------------------------------------------------------------- + def getReadSender(self): + '''Return read sender user parameter. + ''' + return self.__readSender + + # -------------------------------------------------------------------------- + # Set the read sender user parameter. + # -------------------------------------------------------------------------- + def setReadSender(self, readSender): + '''Set the read sender user parameter. + ''' + self.__readSender = readSender + + # -------------------------------------------------------------------------- + # Return read subject user parameter. + # -------------------------------------------------------------------------- + def getReadSubject(self): + '''Return read subject user parameter + ''' + return self.__readSubject + + # -------------------------------------------------------------------------- + # Set the read subject user parameter. + # -------------------------------------------------------------------------- + def setReadSubject(self, readSubject): + '''Set the read subject user parameter. + ''' + self.__readSubject = readSubject + + +# ============================================================================== +# Declaration of the "YahooPlugin" object. +# ============================================================================== +class YahooPlugin(SimplePlugin): + + # -------------------------------------------------------------------------- + # Dynamic sentences lists. + # -------------------------------------------------------------------------- + NEW_MAIL = ['You have a new mail.', 'A new mail has arrived !', + 'It appears you have received a new email.', + 'A new email ? I wonder who could be thinking about you.', + 'It would appear you have receiv... [truncated message content] |
From: jerome <c2m...@c2...> - 2010-02-05 10:55:15
|
Author: jerome Date: 2010-02-05 11:54:58 +0100 (Fri, 05 Feb 2010) New Revision: 6054 Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/TuxDroidHotmail.exe software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.dfm software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.pas Log: * Fixed a focus inconsistency. Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/TuxDroidHotmail.exe =================================================================== (Binary files differ) Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.dfm =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.dfm 2010-02-04 14:30:17 UTC (rev 6053) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.dfm 2010-02-05 10:54:58 UTC (rev 6054) @@ -7,6 +7,7 @@ AlphaBlendValue = 0 Caption = 'Form1' Color = clBtnFace + Enabled = False Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 @@ -54,4 +55,10 @@ Left = 24 Top = 32 end + object DifferedStart: TTimer + Interval = 1500 + OnTimer = DifferedStartTimer + Left = 64 + Top = 32 + end end Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.pas =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.pas 2010-02-04 14:30:17 UTC (rev 6053) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.pas 2010-02-05 10:54:58 UTC (rev 6054) @@ -37,6 +37,7 @@ Timer1: TTimer; Timer2: TTimer; Timer3: TTimer; + DifferedStart: TTimer; procedure FormCreate(Sender: TObject); procedure EmbeddedWB1DocumentComplete(ASender: TObject;const pDisp: IDispatch; var URL: OleVariant); @@ -44,7 +45,9 @@ procedure Timer2Timer(Sender: TObject); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure Timer3Timer(Sender: TObject); + procedure DifferedStartTimer(Sender: TObject); + private { Darations priv } procedure change(id : string ; value : string); @@ -71,6 +74,8 @@ password : String; timeout : Integer; + hWindow : HWND; + XmlDoc: IXMLDOMDocument2; implementation @@ -79,7 +84,26 @@ {========== Form Create function ==========} procedure TForm1.FormCreate(Sender: TObject); +var + ClassName, ControlText : String; begin + //GetFocusedControl(hWindow, ClassName, ControlText); + //Hidding plugin Task bar. + SetWindowLong(Application.Handle, + GWL_EXSTYLE, + GetWindowLong(Application.Handle,GWL_EXSTYLE) + or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW + ); + ShowWindow(Form1.Handle, SW_SHOWNOACTIVATE); + ShowWindow(EmbeddedWB1.Handle, SW_SHOWNOACTIVATE); + +end; + + +{========== Differed app start. ==========} +procedure TForm1.DifferedStartTimer(Sender: TObject); +begin + DifferedStart.Enabled := False; //Getting login and assword informations. if ParamCount < 2 then begin @@ -95,13 +119,6 @@ timeout := strtoint(ParamStr(3)); end; - //Hidding plugin Task bar. - SetWindowLong(Application.Handle, - GWL_EXSTYLE, - GetWindowLong(Application.Handle,GWL_EXSTYLE) - or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW - ); - Form1.Height := 50; Form1.Width := 30; @@ -123,6 +140,7 @@ login_url = 'login.live.com'; inbox_url = 'mail.live.com'; begin + //Handle login errors. if Pos('https://login.live.com/ppsecure/post.srf?bk=', String(URL)) <> 0 then begin @@ -208,7 +226,6 @@ except end; - end; @@ -248,6 +265,7 @@ if timeout = 1 then Application.Terminate; Dec(timeout, 1); + end; |
From: jerome <c2m...@c2...> - 2010-02-04 14:30:55
|
Author: jerome Date: 2010-02-04 15:30:17 +0100 (Thu, 04 Feb 2010) New Revision: 6053 Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail1.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail2.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail3.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail4.att Removed: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail1.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail2.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail3.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail4.att Log: * Updated attitunes names. Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail1.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail1.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail2.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail2.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail3.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail3.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail4.att =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/livemail4.att ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail1.att =================================================================== (Binary files differ) Deleted: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail2.att =================================================================== (Binary files differ) Deleted: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail3.att =================================================================== (Binary files differ) Deleted: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail4.att =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2010-02-04 14:11:13
|
Author: jerome Date: 2010-02-04 15:10:52 +0100 (Thu, 04 Feb 2010) New Revision: 6052 Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml Log: * Updated plugin to match with the eMail plugin. Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py 2010-02-03 14:25:35 UTC (rev 6051) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py 2010-02-04 14:10:52 UTC (rev 6052) @@ -56,7 +56,7 @@ '''Return the user parameter value. ''' #Verify email validity. - if ( find( self.__user, '@' ) == -1) and ( rfind( self.__user, '.' ) == -1 ): + if ( self.__user.find('@') == -1) or ( self.__user[self.__user.find('@'):].find('.') == -1 ): return "" if not self.isValidAddress(self.__user): @@ -148,13 +148,12 @@ # -------------------------------------------------------------------------- # Dynamic sentences lists. # -------------------------------------------------------------------------- - SINGLE_MAIL = ['You have a new mail.', 'A new mail has arrived !', + NEW_MAIL = ['You have a new mail.', 'A new mail has arrived !', 'It appears you have received a new email.', - 'A new email ? I wonder who could be thinking about you.' + 'A new email ? I wonder who could be thinking about you.', + 'It would appear you have received new mails.' ] - MULTIPLE_MAIL = ['You have {0} new emails', 'It would appear you have received new mails.'] - NO_NEW_MAIL = ['No new mail.', 'I\'m sorry, nobody sent you any email.', 'No mails. Nobody seems to be thinking about you.', 'Your mailbox is empty.' @@ -200,6 +199,8 @@ if ( self.configuration().getUser() == "" ) or ( self.configuration().getPassword() == "" ): if self.getCommand() == "run": self.throwMessage(self.pickSentence(self.BAD_LOGIN)) + elif self.getCommand() == "check": + self.throwResult(False) self.stop() #Username is hotmail friendly, so trying to get connected. else: @@ -224,7 +225,6 @@ #No internet connection, so exiting. if self.getCommand() == "run": self.throwMessage(self.pickSentence(self.BAD_INTERNET)) - self.stop() # -------------------------------------------------------------------------- # Plugin entry point for the "run" command. @@ -232,32 +232,28 @@ def run(self): '''Plugin entry point for the "run" command. ''' + thrown = False if not self.isWindows(): self.stop() #Else there have at least one new email. - else: - #Checking how many email were already said. - count = 0 + else: + #Getting sender and subject. for mail in self.mails.keys(): - if not self.isRegistered(mail): - count += 1 - if count > 1: - self.throwMessage(self.pickSentence(self.MULTIPLE_MAIL), count) - elif count == 1: - self.throwMessage(self.pickSentence(self.SINGLE_MAIL)) - elif ( count == 0 ) and self.login : - self.throwMessage(self.pickSentence(self.NO_NEW_MAIL)) - - #Getting sender and subject now. - for mail in self.mails.keys(): - if not self.isRegistered(mail): + if not self.isRegistered(mail,"RUN"): + if not thrown: + thrown = True if self.configuration().getReadSender(): self.throwMessage(self.pickSentence(self.FROM), self.mails[mail]['sender']) if self.configuration().getReadSubject(): self.throwMessage(self.pickSentence(self.SUBJECT), self.mails[mail]['subject']) #Finally registering this new mail into history. - self.registerMail(mail) + self.registerMail(mail,"RUN") + self.registerMail(mail, "CHECK") + #No new mail + if not thrown: + self.throwMessage(self.pickSentence(self.NO_NEW_MAIL)) + self.stop() # -------------------------------------------------------------------------- @@ -267,32 +263,31 @@ '''Plugin entry point for the "check" command. ''' if not self.isWindows(): - self.throwResult('false') + self.throwResult(False) self.stop() if not ( len(self.mails) == 0 ): - count = 0 + newMail = False #Checking how many email were already said. for mail in self.mails.keys(): - if not self.isRegistered(mail): - count += 1 + if not self.isRegistered(mail,"CHECK"): + newMail = True #Registering as readed into history. - self.registerMail(mail) + self.registerMail(mail,"CHECK") + self.registerHistory() + if self.__firstCycle: + self.throwResult(False) self.stop() - + #Throwing the result. - if count > 1: - self.throwNotification('start') - self.throwMessage(self.pickSentence(self.MULTIPLE_MAIL), count) - self.throwNotification('stop') - elif count == 1: - self.throwNotification("start") - self.throwMessage(self.pickSentence(self.SINGLE_MAIL)) - self.throwNotification('stop') - - self.stop() + if newMail: + self.throwResult(True) + self.throwMessage(self.pickSentence(self.NEW_MAIL)) + else: + self.throwResult(False) + # -------------------------------------------------------------------------- # Ping for internet connection. @@ -360,18 +355,20 @@ # -------------------------------------------------------------------------- # Return True if an email is registered into history list. # -------------------------------------------------------------------------- - def isRegistered(self, mailID): + def isRegistered(self, mailID, type): '''Return True if an email is registered into history list. ''' + mailID += type return ( mailID in self.__history ) # -------------------------------------------------------------------------- # Register an eMail to the history list. # -------------------------------------------------------------------------- - def registerMail(self, mailID): + def registerMail(self, mailID, type): '''Register an eMail to the history list. + @Param type = RUN or CHECK ''' - self.__history.append(mailID) + self.__history.append(mailID + type) # -------------------------------------------------------------------------- # Load pickle history object. @@ -426,7 +423,7 @@ '''Callback on plugin stop. ''' #Registering pickle struct. - if len(self.__history) > 0: + if ( self.getCommand() == "run" ) and ( len(self.__history) > 0 ): self.registerHistory() #Rest leds if not already done. if self.getCommand() == "run": Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml 2010-02-03 14:25:35 UTC (rev 6051) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml 2010-02-04 14:10:52 UTC (rev 6052) @@ -42,9 +42,7 @@ <command name="check" description="Check if there is any new mail" - daemon="true" - expiration="1" - notifier="true"/> + /> <command name="run" description="Read your new mails" |
From: jerome <c2m...@c2...> - 2010-02-03 14:25:43
|
Author: jerome Date: 2010-02-03 15:25:35 +0100 (Wed, 03 Feb 2010) New Revision: 6051 Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.pot Log: * Fixed po file. Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.po 2010-02-03 14:08:25 UTC (rev 6050) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.po 2010-02-03 14:25:35 UTC (rev 6051) @@ -95,5 +95,5 @@ msgid "Start me every x (From full hour)" msgstr "Prüfen Sie meine Mailbox häufig" -msgid "You have {0} emails" +msgid "You have {0} new emails" msgstr "Sie haben {0} Nachrichten" Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.po 2010-02-03 14:08:25 UTC (rev 6050) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.po 2010-02-03 14:25:35 UTC (rev 6051) @@ -95,5 +95,5 @@ msgid "Start me every x (From full hour)" msgstr "Check my mail box frequently" -msgid "You have {0} emails" -msgstr "You have {0} messages" +msgid "You have {0} new emails" +msgstr "You have {0} new messages" Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.po 2010-02-03 14:08:25 UTC (rev 6050) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.po 2010-02-03 14:25:35 UTC (rev 6051) @@ -95,5 +95,5 @@ msgid "Start me every x (From full hour)" msgstr "Me faire un rapport régulièrement" -msgid "You have {0} emails" +msgid "You have {0} new emails" msgstr "Vous avez {0} nouveaux messages" Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.po 2010-02-03 14:08:25 UTC (rev 6050) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.po 2010-02-03 14:25:35 UTC (rev 6051) @@ -98,5 +98,5 @@ msgid "Start me every x (From full hour)" msgstr "Check mijn E-mail op regelmatige tijdstippen" -msgid "You have {0} emails" +msgid "You have {0} new emails" msgstr "Je hebt {0} berichten" Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.pot 2010-02-03 14:08:25 UTC (rev 6050) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.pot 2010-02-03 14:25:35 UTC (rev 6051) @@ -92,6 +92,6 @@ msgid "Start me every x (From full hour)" msgstr "" -msgid "You have {0} emails" +msgid "You have {0} new emails" msgstr "" |
From: jerome <c2m...@c2...> - 2010-02-03 14:08:36
|
Author: jerome Date: 2010-02-03 15:08:25 +0100 (Wed, 03 Feb 2010) New Revision: 6050 Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.pot Log: * Fixed forgiven sentence. Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.po 2010-02-03 12:53:36 UTC (rev 6049) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.po 2010-02-03 14:08:25 UTC (rev 6050) @@ -94,3 +94,6 @@ msgid "Start me every x (From full hour)" msgstr "Prüfen Sie meine Mailbox häufig" + +msgid "You have {0} emails" +msgstr "Sie haben {0} Nachrichten" Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.po 2010-02-03 12:53:36 UTC (rev 6049) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.po 2010-02-03 14:08:25 UTC (rev 6050) @@ -94,3 +94,6 @@ msgid "Start me every x (From full hour)" msgstr "Check my mail box frequently" + +msgid "You have {0} emails" +msgstr "You have {0} messages" Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.po 2010-02-03 12:53:36 UTC (rev 6049) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.po 2010-02-03 14:08:25 UTC (rev 6050) @@ -94,3 +94,6 @@ msgid "Start me every x (From full hour)" msgstr "Me faire un rapport régulièrement" + +msgid "You have {0} emails" +msgstr "Vous avez {0} nouveaux messages" Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.po 2010-02-03 12:53:36 UTC (rev 6049) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.po 2010-02-03 14:08:25 UTC (rev 6050) @@ -97,3 +97,6 @@ msgid "Start me every x (From full hour)" msgstr "Check mijn E-mail op regelmatige tijdstippen" + +msgid "You have {0} emails" +msgstr "Je hebt {0} berichten" Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.pot 2010-02-03 12:53:36 UTC (rev 6049) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.pot 2010-02-03 14:08:25 UTC (rev 6050) @@ -91,3 +91,7 @@ msgid "Start me every x (From full hour)" msgstr "" + +msgid "You have {0} emails" +msgstr "" + |
From: jerome <c2m...@c2...> - 2010-02-03 14:03:13
|
Author: jerome Date: 2010-02-03 13:53:36 +0100 (Wed, 03 Feb 2010) New Revision: 6049 Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py Log: * Removed a debug var. Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py 2010-02-03 12:51:20 UTC (rev 6048) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py 2010-02-03 12:53:36 UTC (rev 6049) @@ -305,7 +305,7 @@ url = 'http://www.google.com' try: response = urllib.urlopen(url) - the_page = response.read() + response.read() return True except: return False |
From: jerome <c2m...@c2...> - 2010-02-03 12:51:41
|
Author: jerome Date: 2010-02-03 13:51:20 +0100 (Wed, 03 Feb 2010) New Revision: 6048 Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py Log: * Fixed a bug with internet connection check on xp. Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py 2010-02-03 10:25:26 UTC (rev 6047) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py 2010-02-03 12:51:20 UTC (rev 6048) @@ -300,9 +300,15 @@ def isInternetAvailable(self): '''Ping for internet connection. ''' - if not os.system('ping www.google.com -n 1'): + import urllib + + url = 'http://www.google.com' + try: + response = urllib.urlopen(url) + the_page = response.read() return True - return False + except: + return False # -------------------------------------------------------------------------- # Excecute the exe file that compiles a xml containing emails. |
From: jerome <c2m...@c2...> - 2010-02-03 10:25:43
|
Author: jerome Date: 2010-02-03 11:25:26 +0100 (Wed, 03 Feb 2010) New Revision: 6047 Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py Log: * Implemented 'first cycle' silent mode. Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py 2010-02-03 10:24:15 UTC (rev 6046) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py 2010-02-03 10:25:26 UTC (rev 6047) @@ -185,7 +185,7 @@ self.login = True #Private list. self.__history = [] - self.__firstCycle = False + self.__firstCycle = True self.__fcMutex = threading.Lock() # -------------------------------------------------------------------------- @@ -195,7 +195,7 @@ '''Plugin entry point. ''' #Checking first if internet connection is available. - if self.isInternetAvailable(): + if self.isInternetAvailable(): #Checking username is 'Hotmail friendly'. if ( self.configuration().getUser() == "" ) or ( self.configuration().getPassword() == "" ): if self.getCommand() == "run": @@ -206,9 +206,14 @@ #Getting Xml emails file. self.getXmlEmailFile() self.toXmlDict() - + + #Getting first cycle state. + mPath, mFile = os.path.split(__file__) + file = os.path.join(mPath, 'data.pkl') + self.__firstCycle = not os.path.exists(file) + #Loading history. - self.__firstCycle = self.loadHistory() + self.loadHistory() #Getting right action. if self.getCommand() == "run": @@ -262,7 +267,9 @@ '''Plugin entry point for the "check" command. ''' if not self.isWindows(): + self.throwResult('false') self.stop() + if not ( len(self.mails) == 0 ): count = 0 #Checking how many email were already said. @@ -271,15 +278,21 @@ count += 1 #Registering as readed into history. self.registerMail(mail) - #and throwing the result. + + if self.__firstCycle: + self.stop() + + #Throwing the result. if count > 1: - self.throwNotification("start") + self.throwNotification('start') self.throwMessage(self.pickSentence(self.MULTIPLE_MAIL), count) - self.throwNotification("stop") + self.throwNotification('stop') elif count == 1: self.throwNotification("start") self.throwMessage(self.pickSentence(self.SINGLE_MAIL)) - self.throwNotification("stop") + self.throwNotification('stop') + + self.stop() # -------------------------------------------------------------------------- # Ping for internet connection. @@ -362,16 +375,16 @@ ''' self.__fcMutex.acquire() try: - pkl_file = open('data.pkl', 'rb') + mPath, mFile = os.path.split(__file__) + f = os.path.join(mPath, 'data.pkl') + pkl_file = open(f, 'rb') self.__history = pickle.load(pkl_file) pkl_file.close() self.__fcMutex.release() - return True except IOError: self.__fcMutex.release() #Pickle file does not exists. self.__history = [] - return True # -------------------------------------------------------------------------- # Register pickle struct history file. @@ -380,7 +393,9 @@ '''Register pickle struct history file. ''' try: - output = open('data.pkl', 'wb') + mPath, mFile = os.path.split(__file__) + f = os.path.join(mPath, 'data.pkl') + output = open(f, 'wb') pickle.dump(self.__history, output) output.close() except: |
From: jerome <c2m...@c2...> - 2010-02-03 10:24:31
|
Author: jerome Date: 2010-02-03 11:24:15 +0100 (Wed, 03 Feb 2010) New Revision: 6046 Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml Log: * Fixed plugin.xml file. Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml 2010-01-27 14:52:46 UTC (rev 6045) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml 2010-02-03 10:24:15 UTC (rev 6046) @@ -42,7 +42,9 @@ <command name="check" description="Check if there is any new mail" - daemon="true"/> + daemon="true" + expiration="1" + notifier="true"/> <command name="run" description="Read your new mails" @@ -57,7 +59,7 @@ type="every x" activated="false" - delay="00:04:00" + delay="00:03:00" delayMask="true,true,true" delayVisible="false" /> |
From: jerome <c2m...@c2...> - 2010-01-27 14:53:04
|
Author: jerome Date: 2010-01-27 15:52:46 +0100 (Wed, 27 Jan 2010) New Revision: 6045 Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml Log: * Fixed xml file. Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml 2010-01-26 15:16:17 UTC (rev 6044) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml 2010-01-27 14:52:46 UTC (rev 6045) @@ -42,8 +42,7 @@ <command name="check" description="Check if there is any new mail" - daemon="true" - exclusive="true"/> + daemon="true"/> <command name="run" description="Read your new mails" @@ -58,7 +57,7 @@ type="every x" activated="false" - delay="00:01:00" + delay="00:04:00" delayMask="true,true,true" delayVisible="false" /> |
Author: jerome Date: 2010-01-26 16:16:17 +0100 (Tue, 26 Jan 2010) New Revision: 6044 Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/LICENSE software_suite_v3/software/plugin/plugin-hotmail/trunk/build.py software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/ software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/__init__.py software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/ software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/version.py software_suite_v3/software/plugin/plugin-hotmail/trunk/dependencies/ software_suite_v3/software/plugin/plugin-hotmail/trunk/dependencies/Delphi/ software_suite_v3/software/plugin/plugin-hotmail/trunk/dependencies/Delphi/EmbeddedWB.zip software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/TuxDroidHotmail.exe software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/Project2.dpr software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.dfm software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.pas software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail1.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail2.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail3.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/attitunes/mail4.att software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/de.wiki software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/en.wiki software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/fr.wiki software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/help.wiki software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/nl.wiki software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.png software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/plugin.xml Log: * Added plugin-hotmail project. Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/LICENSE 2010-01-26 15:16:17 UTC (rev 6044) @@ -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-hotmail/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/build.py 2010-01-26 15:16:17 UTC (rev 6044) @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +# Copyright (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-hotmail.scp") Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/PluginPackager.py 2010-01-26 15:16:17 UTC (rev 6044) @@ -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-hotmail/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2010-01-26 15:16:17 UTC (rev 6044) @@ -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-hotmail/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/util/misc/version.py 2010-01-26 15:16:17 UTC (rev 6044) @@ -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-hotmail/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/builder/version.py 2010-01-26 15:16:17 UTC (rev 6044) @@ -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 = '2.0' +author = "Jerome Conan (jer...@ky...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/dependencies/Delphi/EmbeddedWB.zip =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-hotmail/trunk/dependencies/Delphi/EmbeddedWB.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/TuxDroidHotmail.exe =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/TuxDroidHotmail.exe ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/Project2.dpr =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/Project2.dpr (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/Project2.dpr 2010-01-26 15:16:17 UTC (rev 6044) @@ -0,0 +1,13 @@ +program Project2; + +uses + Forms, + WindowsLiveMail in 'WindowsLiveMail.pas' {Form1}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.dfm =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.dfm (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.dfm 2010-01-26 15:16:17 UTC (rev 6044) @@ -0,0 +1,57 @@ +object Form1: TForm1 + Left = 390 + Top = 240 + Width = 112 + Height = 114 + AlphaBlend = True + AlphaBlendValue = 0 + Caption = 'Form1' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + Position = poDefault + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object EmbeddedWB1: TEmbeddedWB + Left = 8 + Top = 12 + Width = 137 + Height = 5 + TabOrder = 0 + Silent = False + RegisterAsBrowser = True + OnDocumentComplete = EmbeddedWB1DocumentComplete + DisableCtrlShortcuts = 'N' + UserInterfaceOptions = [EnablesFormsAutoComplete, EnableThemes] + About = ' EmbeddedWB http://bsalsa.com/' + PrintOptions.HTMLHeader.Strings = ( + '<HTML></HTML>') + PrintOptions.Orientation = poPortrait + ControlData = { + 4C000000617100008E4500000000000000000000000000000000000000000000 + 000000004C000000000000000000000001000000E0D057007335CF11AE690800 + 2B2E126208000000000000004C0000000114020000000000C000000000000046 + 8000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000100000000000000000000000000000000000000} + end + object Timer1: TTimer + OnTimer = Timer1Timer + Left = 280 + end + object Timer2: TTimer + Enabled = False + OnTimer = Timer2Timer + Left = 312 + end + object Timer3: TTimer + OnTimer = Timer3Timer + Left = 24 + Top = 32 + end +end Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.pas =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.pas (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.pas 2010-01-26 15:16:17 UTC (rev 6044) @@ -0,0 +1,480 @@ +{* This file is part of "Tux Droid Hotmail - Live Mail plugin". + * Copyright 2009, kysoh + * Author : Conan Jerome. + * eMail : jer...@ky... + * Site : http://www.kysoh.com/ + * + * "Tux Droid Hotmail - Live Mail plugin" 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. + * + * "Tux Droid Hotmail - Live Mail plugin" 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 "Tux Droid Hotmail - Live Mail plugin"; 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. + *} + +unit WindowsLiveMail; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, OleCtrls, SHDocVw_EWB, EwbCore, EmbeddedWB, MSHTML_TLB, + IdBaseComponent, IdAntiFreezeBase, IdAntiFreeze, ExtCtrls, StdCtrls, + OleServer, MSXML2_TLB; + + +type + TForm1 = class(TForm) + EmbeddedWB1: TEmbeddedWB; + Timer1: TTimer; + Timer2: TTimer; + Timer3: TTimer; + + procedure FormCreate(Sender: TObject); + procedure EmbeddedWB1DocumentComplete(ASender: TObject;const pDisp: IDispatch; var URL: OleVariant); + procedure Timer1Timer(Sender: TObject); + procedure Timer2Timer(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure Timer3Timer(Sender: TObject); + + private + { Darations priv } + procedure change(id : string ; value : string); + procedure send(id : String); + function getHTMLInbox(): String; + procedure getEmails(raw : String); + function SplitStrings(const str: string; const separator: string; Strings: TStrings): TStrings; + function initXml(): IXMLDOMNode; + procedure writeXmlEmail(Parent: IXMLDOMNode ;id : String; Sender : String; Subject : String); + procedure writeXmlBadLogin(); + function ascFilter(chain : String):String; + public + { Darations publiques } + end; + +var + Form1: TForm1; + pass_login : boolean; + pass_inbox : boolean; + raw_inbox : String; + + //User parameters + login : String; + password : String; + timeout : Integer; + + XmlDoc: IXMLDOMDocument2; + +implementation + +{$R *.dfm} + +{========== Form Create function ==========} +procedure TForm1.FormCreate(Sender: TObject); +begin + //Getting login and assword informations. + if ParamCount < 2 then + begin + writeXmlBadLogin(); + Application.Terminate; + end + else + begin + //Setting login values. + login := ParamStr(1); + password := ParamStr(2); + //timeout in seconds. + timeout := strtoint(ParamStr(3)); + end; + + //Hidding plugin Task bar. + SetWindowLong(Application.Handle, + GWL_EXSTYLE, + GetWindowLong(Application.Handle,GWL_EXSTYLE) + or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW + ); + + Form1.Height := 50; + Form1.Width := 30; + + raw_inbox := ''; + //Login stuff. + pass_login := false; + pass_inbox := false; + self.EmbeddedWB1.DisableNavSound(true); + EmbeddedWB1.NavigateWait('https://login.live.com/pp700/'); +end; + + +{########### Live mail login functions ################## + ---------------------------------------------------------} + +{========== Webbrowser document loaded ==========} +procedure TForm1.EmbeddedWB1DocumentComplete(ASender: TObject; const pDisp: IDispatch; var URL: OleVariant); +const + login_url = 'login.live.com'; + inbox_url = 'mail.live.com'; +begin + //Handle login errors. + if Pos('https://login.live.com/ppsecure/post.srf?bk=', String(URL)) <> 0 then + begin + writeXmlBadLogin(); + Application.Terminate; + end + + //Start browsing and loging + else if ( Pos(login_url, String(URL)) <> 0 ) and ( not pass_login ) then + pass_login := true + + //User logged in, so getting inbox. + else if Pos ('mail.live.com/mail/InboxLight.aspx?n=', String(URL)) <> 0 then + if pass_inbox then + begin + pass_inbox := false; + raw_inbox := getHTMLInbox(); + getEmails(raw_inbox); + Application.Terminate; + end + //Inbox stuff ready ( inbox html page loaded ). + else if POS(inbox_url, String(URL)) <> 0 then + pass_inbox := true; +end; + + +{========== This function browse html code and targeted input values ==========} +procedure TForm1.change(id : string ; value : string); +var + HtmlElement: IHTMLElement; + AllHidden: IHTMLElementCollection; + i:integer; +begin + try + //Getting all html input fields. + AllHidden := self.EmbeddedWB1.GetDocument.all.tags('input') as IHTMLElementCollection; + for i:=0 to AllHidden.length-1 do + begin + //For each input getting text and password fields ( not hidden ones ). + HtmlElement := AllHidden.item(I, '') as IHTMLElement; + if (lowercase(HtmlElement.getAttribute('type', 0)) = 'password') or (lowercase(HtmlElement.getAttribute('type', 0)) = 'text') then + begin + //And set the given value. + if HtmlElement.getAttribute('name', 0) = id then + begin + HtmlElement.setAttribute('value', value, 0); + exit; + end; + end; + Application.ProcessMessages; + end; + except + end; + +end; + + +{========== Do click on the specified form button ==========} +procedure TForm1.send(id : String); +var + HtmlElement: IHTMLElement; + AllHidden: IHTMLElementCollection; + i:integer; +begin + try + //Getting all input fields. + AllHidden := self.EmbeddedWB1.GetDocument.all.tags('input') as IHTMLElementCollection; + for i:=0 to AllHidden.length-1 do + begin + //Searching for submit button. + HtmlElement := AllHidden.item(I, '') as IHTMLElement; + if lowercase(HtmlElement.getAttribute('type', 0)) = 'submit' then + begin + if HtmlElement.getAttribute('name', 0) = id then + begin + //And click. + HtmlElement.click; + exit; + end; + end; + Application.ProcessMessages; + end; + except + end; + + +end; + + +{========== Timer that get user logged in to his live mail account ====} +procedure TForm1.Timer1Timer(Sender: TObject); +begin + if pass_login then + begin + Timer1.Enabled := false; + change('login', login); + change('passwd', password); + send('SI'); + sleep(1000); + Timer2.Enabled := true; + end; + Application.ProcessMessages; +end; + + +{========== Timer 2 that change current login page to mail.live.com =========} +procedure TForm1.Timer2Timer(Sender: TObject); +begin + Timer2.Enabled := false; + //Go to the mailbox. + EmbeddedWB1.Go('http://mail.live.com/?rru=inbox'); + while not pass_inbox do + begin + Application.ProcessMessages; + sleep(1000); + end; +end; + + +{========= Handle a connection timeout ==========} +procedure TForm1.Timer3Timer(Sender: TObject); +begin + if timeout = 1 then + Application.Terminate; + Dec(timeout, 1); +end; + + + +{========= Search for 'per user' HTML inbox ==========} +function TForm1.getHTMLInbox(): String; +var + values : TStringList; + i : Integer; + position : Integer; +begin + result := ''; + values := TStringList.Create; + //Getting inbox frame. + EmbeddedWB1.SaveFrameToStrings(0, values); + //Gettin complete html table. + for i:=0 to values.Count -1 do + begin + if Pos('InboxTable', values[i]) <> 0 then + begin + result := values[i]; + break; + end; + end; + //Removing uneeded tags. + position := Pos('<tr', result); + result := Copy(result, position, length(result)); + position := Pos('</tbody>', result); + result := Copy(result, 0, position - 1); + FreeAndNil(values); +end; + + +{========== Retrieve and sort raw inbox ==========} +procedure TForm1.getEmails(raw : String); +var + mails : TStringList; + mailDetail : TStringList; + i, start, stop : Integer; + id, subject, sender, temp : String; + baseNode : IXMLDOMNode; +begin + try + mails := TStringList.Create; + mailDetail := TStringList.Create; + SplitStrings(raw, '<tr', mails); + + baseNode := initXml(); + + for i:=1 to mails.Count - 1 do + begin + mailDetail.Clear; + if Pos('InboxContentItemUnread', mails[i]) <> 0 then //unreaded message.Self + begin + mails[i] := Copy(mails[i], Pos('id=', mails[i]), length(mails[i]) - Pos('id=', mails[i])); + SplitStrings(mails[i], '<td', mailDetail); + //Getting mail id. + mailDetail[0] := StringReplace(mailDetail[0], ' ', '', [rfReplaceAll]); + start := length('id="'); + stop := Pos('"msg="msg"', mailDetail[0]); + id := Copy(mailDetail[0], start + 1, length(mailDetail[0]) - stop -2); + + //Getting mail sender. + start := Pos('<a>', mailDetail[3]); + sender := Copy(mailDetail[3], start, length(mailDetail[3]) -9); //9 = length of last balises. + sender := StringReplace(sender, '<a>', '', [rfReplaceAll]); + sender := StringReplace(sender, '</a>', '', [rfReplaceAll]); + sender := ascFilter(StringReplace(sender, '</td>', '', [rfReplaceAll])); + + //Getting mail subject. + start := Pos('<a href="#">', mailDetail[6]); + subject := Copy(mailDetail[6], start, length(mailDetail[6]) -9); //9 = length of last balises. + subject := StringReplace(subject, '<a href="#">', '', [rfReplaceAll]); + subject := StringReplace(subject, '</a>', '', [rfReplaceAll]); + subject := StringReplace(subject, '</td>', '', [rfReplaceAll]); + + if Pos('class="Sbj"><a href="javascript:;">', subject) <> 0 then + subject := StringReplace(subject, 'class="Sbj"><a href="javascript:;">', '', [rfReplaceAll]); + + subject := ascFilter(StringReplace(subject, '‏', '', [rfReplaceAll])); + + writeXmlEmail(baseNode, id, sender, subject); + end; + Application.ProcessMessages; + end; + XmlDoc.save(ExtractFilePath(Application.ExeName) + '\mails.xml'); + except + writeXmlBadLogin(); + Application.Terminate; + end; + +end; + + +{========== Initialize Xml document ==========} +function TForm1.initXml(): IXMLDOMNode; +var + xmlf : String; + node : IXMLDOMNode; +begin + //init xml file. + //Deleting last result if exists. + xmlf := ExtractFilePath(Application.ExeName) + '\mails.xml'; + if FileExists(xmlf) then + DeleteFile(xmlf); + //Creating xml struct. + XmlDoc := CoDOMDocument.Create; + node:= XmlDoc.createNode('element', 'root', ''); + XmlDoc.appendChild(node); + result := node; +end; + + + +{========== Write an XML Email element into the xml base node ==========} +procedure TForm1.writeXmlEmail(Parent: IXMLDOMNode ;id : String; Sender : String; Subject : String); +var + idNode, senderNode, subjectNode : IXMLDOMNode; + mail : IXMLDOMElement; +begin + //write an xml tag + + mail := XmlDoc.createElement('mail'); + mail.setAttribute('uuid', id); + mail.setAttribute('sender', sender); + mail.setAttribute('subject', subject); + + //And finally appending mail datas into XML mails list. } + Parent.appendChild(mail); + +end; + + +{========== Base login xml result =========} +procedure TForm1.writeXmlBadLogin(); +var + node : IXMLDOMNode; +begin + if not Assigned(XmlDoc) then + node := initXml(); + node.appendChild(XmlDoc.createTextNode('login error')); + XmlDoc.save(ExtractFilePath(Application.ExeName) + '\mails.xml'); +end; + + +{========== Fills a string list with the parts of "str" separated by str ==========} +function TForm1.SplitStrings(const str: string; const separator: string; Strings: TStrings): TStrings; +var + n: integer; + p, q, s: PChar; + item: string; + begin + if Strings = nil then + result := TStringList.Create + else + Result := Strings; + try + p := PChar(str); + s := PChar(separator); + n := Length(separator); + repeat + q := StrPos(p, s); + if q = nil then q := StrScan(p, #0); + SetString(item, p, q - p); + result.Add(item); + p := q + n; + until q^ = #0; + except + item := ''; + if Strings = nil then result.Free; + raise; + end; + end; + + + +{========== Changing html ascii codes ==========} +function TForm1.ascFilter(chain:String):String; +begin + chain := StringReplace(chain, ':', ':', [rfReplaceAll]); + chain := StringReplace(chain, '!', '!', [rfReplaceAll]); + chain := StringReplace(chain, '?', '?', [rfReplaceAll]); + chain := StringReplace(chain, ''', '''', [rfReplaceAll]); + chain := StringReplace(chain, '*', '*', [rfReplaceAll]); + chain := StringReplace(chain, '|', ';', [rfReplaceAll]); + chain := StringReplace(chain, '&', ';', [rfReplaceAll]); + chain := StringReplace(chain, '[', '[', [rfReplaceAll]); + chain := StringReplace(chain, ']', ']', [rfReplaceAll]); + chain := StringReplace(chain, '@', '@', [rfReplaceAll]); + chain := StringReplace(chain, ' ', '', [rfReplaceAll]); + chain := StringReplace(chain, ' ', ' ', [rfReplaceAll]); + chain := StringReplace(chain, '"', '"', [rfReplaceAll]); + chain := StringReplace(chain, '#', '#', [rfReplaceAll]); + chain := StringReplace(chain, '$', '$', [rfReplaceAll]); + chain := StringReplace(chain, '%', '%', [rfReplaceAll]); + chain := StringReplace(chain, '(', '(', [rfReplaceAll]); + chain := StringReplace(chain, ')', ')', [rfReplaceAll]); + chain := StringReplace(chain, '+', '+', [rfReplaceAll]); + chain := StringReplace(chain, ',', ',', [rfReplaceAll]); + chain := StringReplace(chain, '-', '-', [rfReplaceAll]); + chain := StringReplace(chain, '/', '/', [rfReplaceAll]); + chain := StringReplace(chain, ';', ';', [rfReplaceAll]); + chain := StringReplace(chain, '<', '<', [rfReplaceAll]); + chain := StringReplace(chain, '=', '=', [rfReplaceAll]); + chain := StringReplace(chain, '>', '>', [rfReplaceAll]); + chain := StringReplace(chain, '\', '\', [rfReplaceAll]); + chain := StringReplace(chain, '^', '^', [rfReplaceAll]); + chain := StringReplace(chain, '_', '_', [rfReplaceAll]); + chain := StringReplace(chain, '{', '{', [rfReplaceAll]); + chain := StringReplace(chain, '}', '}', [rfReplaceAll]); + chain := StringReplace(chain, '~', '~', [rfReplaceAll]); + + chain := StringReplace(chain, 'à', ' [rfReplaceAll]); + chain := StringReplace(chain, 'è', ' [rfReplaceAll]); + chain := StringReplace(chain, 'é', ' [rfReplaceAll]); + chain := StringReplace(chain, 'ê', ' [rfReplaceAll]); + chain := StringReplace(chain, 'ó', ' [rfReplaceAll]); + chain := StringReplace(chain, 'ó', ' [rfReplaceAll]); + + result := chain; +end; + + +{========== Disabling close feature ==========} +procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); +begin + CanClose := False; +end; + +end. Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py 2010-01-26 15:16:17 UTC (rev 6044) @@ -0,0 +1,435 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2010 Kysoh Sa +# Jérôme Conan <jerome.conan AT kysoh.com> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +__author__ = "Jerome Conan" +__appname__ = "Python plugin Hotmail" +__version__ = "1.0" +__date__ = "2010/01/21" +__license__ = "GPL" + +import os +import sys +import time +import pickle +import random +import threading +import subprocess + +from string import find, rfind + +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + +from util.xml.XmlSerializer import XmlSerializer +from util.SimplePlugin.SimplePlugin import SimplePlugin +from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration + + +# ============================================================================== +# Declaration of the "HotmailPluginConfiguration" object. +# ============================================================================== +class HotmailConfiguration(SimplePluginConfiguration): + '''Access to the plugin parameters. + ''' + + # -------------------------------------------------------------------------- + # Configuration initialization. + # -------------------------------------------------------------------------- + def __init__(self): + '''Initialization of the class. + ''' + # Call the super class + SimplePluginConfiguration.__init__(self) + # Initialize the parameters + self.__user = "" + self.__password = "" + self.__readSubject = True + self.__readSender = True + + # -------------------------------------------------------------------------- + # Return the user parameter value. + # -------------------------------------------------------------------------- + def getUser(self): + '''Return the user parameter value. + ''' + #Verify email validity. + if ( find( self.__user, '@' ) == -1) and ( rfind( self.__user, '.' ) == -1 ): + return "" + + if not self.isValidAddress(self.__user): + return "" + + return self.__user + + # -------------------------------------------------------------------------- + # Return True if given address is 'hotmail' friendly. + # -------------------------------------------------------------------------- + def isValidAddress(self, address): + '''Return True if given address is 'hotmail' friendly. + ''' + #Checking first for forbidden chars. + pattern = ['[', '^', '"', ']', '+', ')', '"', '>', '(', '[', '^', '>', ']', '+', + ')', '<', '/', '>', '{', '}', '!', '*', '=', ':', ';', ',', "'"] + for forbidden in pattern: + if find(address, forbidden) != -1: + return False + + #Now checking that user address starts with a letter. + if not address[0].isalpha(): + return False + + return True + + # -------------------------------------------------------------------------- + # Set the user parameter value. + # -------------------------------------------------------------------------- + def setUser(self, user): + '''Set the user parameter value. + ''' + self.__user = user + + # -------------------------------------------------------------------------- + # Return the password parameter value. + # -------------------------------------------------------------------------- + def getPassword(self): + '''Return the password parameter value. + ''' + return self.__password + + # -------------------------------------------------------------------------- + # Set the password parameter value. + # -------------------------------------------------------------------------- + def setPassword(self, password): + '''Set the password parameter value. + ''' + self.__password = password + + # -------------------------------------------------------------------------- + # Return read sender user parameter. + # -------------------------------------------------------------------------- + def getReadSender(self): + '''Return read sender user parameter. + ''' + return self.__readSender + + # -------------------------------------------------------------------------- + # Set the read sender user parameter. + # -------------------------------------------------------------------------- + def setReadSender(self, readSender): + '''Set the read sender user parameter. + ''' + self.__readSender = readSender + + # -------------------------------------------------------------------------- + # Return read subject user parameter. + # -------------------------------------------------------------------------- + def getReadSubject(self): + '''Return read subject user parameter + ''' + return self.__readSubject + + # -------------------------------------------------------------------------- + # Set the read subject user parameter. + # -------------------------------------------------------------------------- + def setReadSubject(self, readSubject): + '''Set the read subject user parameter. + ''' + self.__readSubject = readSubject + + +# ============================================================================== +# Declaration of the "HotmailPlugin" object. +# ============================================================================== +class HotmailPlugin(SimplePlugin): + + # -------------------------------------------------------------------------- + # Dynamic sentences lists. + # -------------------------------------------------------------------------- + SINGLE_MAIL = ['You have a new mail.', 'A new mail has arrived !', + 'It appears you have received a new email.', + 'A new email ? I wonder who could be thinking about you.' + ] + + MULTIPLE_MAIL = ['You have {0} new emails', 'It would appear you have received new mails.'] + + NO_NEW_MAIL = ['No new mail.', 'I\'m sorry, nobody sent you any email.', + 'No mails. Nobody seems to be thinking about you.', + 'Your mailbox is empty.' + ] + + BAD_LOGIN = ['Sorry, there was an error when connecting to the mail server. Please check your email configuration.', ] + + BAD_INTERNET = ['S... [truncated message content] |
From: jerome <c2m...@c2...> - 2010-01-25 13:55:07
|
Author: jerome Date: 2010-01-25 14:38:17 +0100 (Mon, 25 Jan 2010) New Revision: 6043 Added: software_suite_v3/software/plugin/plugin-hotmail/ software_suite_v3/software/plugin/plugin-hotmail/branches/ software_suite_v3/software/plugin/plugin-hotmail/tags/ software_suite_v3/software/plugin/plugin-hotmail/trunk/ Log: * Added plugin-hotmail project directories. |
From: JDM <c2m...@c2...> - 2010-01-10 21:11:54
|
Author: JDM Date: 2010-01-10 22:11:43 +0100 (Sun, 10 Jan 2010) New Revision: 6042 Removed: software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo.suo Log: * - omitted to delete suo file with my precedent commit Deleted: software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo.suo =================================================================== (Binary files differ) |
From: JDM <c2m...@c2...> - 2010-01-10 21:07:46
|
Author: JDM Date: 2010-01-10 22:07:17 +0100 (Sun, 10 Jan 2010) New Revision: 6041 Modified: software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.Designer.cs software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.cs software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/TuxAPI.cs Log: - Fixed some small bugs in ControlTuxDroid - Fixed locutor problem with ControlTuxDroid - Renamed all buttons for better name in ControlTuxDroid Modified: software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.Designer.cs =================================================================== --- software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.Designer.cs 2010-01-08 11:04:20 UTC (rev 6040) +++ software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.Designer.cs 2010-01-10 21:07:17 UTC (rev 6041) @@ -29,404 +29,404 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.button3 = new System.Windows.Forms.Button(); - this.button4 = new System.Windows.Forms.Button(); - this.button5 = new System.Windows.Forms.Button(); - this.button6 = new System.Windows.Forms.Button(); - this.button7 = new System.Windows.Forms.Button(); - this.button8 = new System.Windows.Forms.Button(); - this.button9 = new System.Windows.Forms.Button(); - this.button10 = new System.Windows.Forms.Button(); - this.button11 = new System.Windows.Forms.Button(); - this.button12 = new System.Windows.Forms.Button(); - this.button13 = new System.Windows.Forms.Button(); - this.button14 = new System.Windows.Forms.Button(); - this.button15 = new System.Windows.Forms.Button(); - this.button17 = new System.Windows.Forms.Button(); - this.button18 = new System.Windows.Forms.Button(); - this.button19 = new System.Windows.Forms.Button(); - this.button20 = new System.Windows.Forms.Button(); - this.button16 = new System.Windows.Forms.Button(); - this.button21 = new System.Windows.Forms.Button(); - this.button22 = new System.Windows.Forms.Button(); - this.button23 = new System.Windows.Forms.Button(); - this.button24 = new System.Windows.Forms.Button(); - this.button25 = new System.Windows.Forms.Button(); - this.button26 = new System.Windows.Forms.Button(); - this.button27 = new System.Windows.Forms.Button(); - this.button28 = new System.Windows.Forms.Button(); - this.button29 = new System.Windows.Forms.Button(); - this.button30 = new System.Windows.Forms.Button(); - this.button31 = new System.Windows.Forms.Button(); - this.button32 = new System.Windows.Forms.Button(); - this.button33 = new System.Windows.Forms.Button(); - this.button34 = new System.Windows.Forms.Button(); - this.button35 = new System.Windows.Forms.Button(); + this.btn_CloseEyes = new System.Windows.Forms.Button(); + this.btn_OpenEyes = new System.Windows.Forms.Button(); + this.btn_FlippersUp = new System.Windows.Forms.Button(); + this.btn_FlippersDown = new System.Windows.Forms.Button(); + this.btn_SayHello = new System.Windows.Forms.Button(); + this.btn_OpenMouth = new System.Windows.Forms.Button(); + this.btn_CloseMouth = new System.Windows.Forms.Button(); + this.btn_LeftRotate = new System.Windows.Forms.Button(); + this.btn_RightRotation = new System.Windows.Forms.Button(); + this.btn_EyesLedsOff = new System.Windows.Forms.Button(); + this.btn_EyesLedsOn = new System.Windows.Forms.Button(); + this.btn_LeftEyeLedOn = new System.Windows.Forms.Button(); + this.btn_RightEyeLedOn = new System.Windows.Forms.Button(); + this.btn_RightEyeLedOff = new System.Windows.Forms.Button(); + this.btn_LeftEyeLedOff = new System.Windows.Forms.Button(); + this.btn_PlayAttituneTest = new System.Windows.Forms.Button(); + this.btn_StopAttitune = new System.Windows.Forms.Button(); + this.btn_StopSound = new System.Windows.Forms.Button(); + this.btn_PlaySoundTest = new System.Windows.Forms.Button(); + this.btn_EyesMotorStatus = new System.Windows.Forms.Button(); + this.btn_LightLevel = new System.Windows.Forms.Button(); + this.btn_LeftLedStatus = new System.Windows.Forms.Button(); + this.btn_RightLedStatus = new System.Windows.Forms.Button(); + this.btn_FlippersStatus = new System.Windows.Forms.Button(); + this.btn_MouthStatus = new System.Windows.Forms.Button(); + this.btn_LeftSpinStatus = new System.Windows.Forms.Button(); + this.btn_RightSpinStatus = new System.Windows.Forms.Button(); + this.btn_EyesPosition = new System.Windows.Forms.Button(); + this.btn_FlippersPosition = new System.Windows.Forms.Button(); + this.btn_MouthPosition = new System.Windows.Forms.Button(); + this.btn_SpinPosition = new System.Windows.Forms.Button(); + this.btn_BatteryStatus = new System.Windows.Forms.Button(); + this.btn_BatteryLevel = new System.Windows.Forms.Button(); + this.btn_ChargerState = new System.Windows.Forms.Button(); + this.btn_SearchLightGadget = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); - this.button41 = new System.Windows.Forms.Button(); - this.button40 = new System.Windows.Forms.Button(); - this.button39 = new System.Windows.Forms.Button(); + this.btn_BlinkRightLed = new System.Windows.Forms.Button(); + this.btn_BlinkLeftLed = new System.Windows.Forms.Button(); + this.btn_BlinkEyes = new System.Windows.Forms.Button(); this.tabPage2 = new System.Windows.Forms.TabPage(); - this.button38 = new System.Windows.Forms.Button(); - this.button37 = new System.Windows.Forms.Button(); - this.button36 = new System.Windows.Forms.Button(); + this.btn_WheaterGadget = new System.Windows.Forms.Button(); + this.btn_WhatDayGadget = new System.Windows.Forms.Button(); + this.btn_WhatTimeGadget = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.SuspendLayout(); // - // button1 + // btn_CloseEyes // - this.button1.Location = new System.Drawing.Point(141, 6); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(129, 23); - this.button1.TabIndex = 900; - this.button1.Text = "Close eyes"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); + this.btn_CloseEyes.Location = new System.Drawing.Point(141, 6); + this.btn_CloseEyes.Name = "btn_CloseEyes"; + this.btn_CloseEyes.Size = new System.Drawing.Size(129, 23); + this.btn_CloseEyes.TabIndex = 900; + this.btn_CloseEyes.Text = "Close eyes"; + this.btn_CloseEyes.UseVisualStyleBackColor = true; + this.btn_CloseEyes.Click += new System.EventHandler(this.btn_CloseEyes_Click); // - // button2 + // btn_OpenEyes // - this.button2.Location = new System.Drawing.Point(6, 6); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(129, 23); - this.button2.TabIndex = 1; - this.button2.Text = "Open eyes"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); + this.btn_OpenEyes.Location = new System.Drawing.Point(6, 6); + this.btn_OpenEyes.Name = "btn_OpenEyes"; + this.btn_OpenEyes.Size = new System.Drawing.Size(129, 23); + this.btn_OpenEyes.TabIndex = 1; + this.btn_OpenEyes.Text = "Open eyes"; + this.btn_OpenEyes.UseVisualStyleBackColor = true; + this.btn_OpenEyes.Click += new System.EventHandler(this.btn_OpenEyes_Click); // - // button3 + // btn_FlippersUp // - this.button3.Location = new System.Drawing.Point(6, 122); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(129, 23); - this.button3.TabIndex = 2; - this.button3.Text = "Wing up"; - this.button3.UseVisualStyleBackColor = true; - this.button3.Click += new System.EventHandler(this.button3_Click); + this.btn_FlippersUp.Location = new System.Drawing.Point(6, 122); + this.btn_FlippersUp.Name = "btn_FlippersUp"; + this.btn_FlippersUp.Size = new System.Drawing.Size(129, 23); + this.btn_FlippersUp.TabIndex = 2; + this.btn_FlippersUp.Text = "Wing up"; + this.btn_FlippersUp.UseVisualStyleBackColor = true; + this.btn_FlippersUp.Click += new System.EventHandler(this.btn_FlippersUp_Click); // - // button4 + // btn_FlippersDown // - this.button4.Location = new System.Drawing.Point(141, 122); - this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(129, 23); - this.button4.TabIndex = 3; - this.button4.Text = "Wing down"; - this.button4.UseVisualStyleBackColor = true; - this.button4.Click += new System.EventHandler(this.button4_Click); + this.btn_FlippersDown.Location = new System.Drawing.Point(141, 122); + this.btn_FlippersDown.Name = "btn_FlippersDown"; + this.btn_FlippersDown.Size = new System.Drawing.Size(129, 23); + this.btn_FlippersDown.TabIndex = 3; + this.btn_FlippersDown.Text = "Wing down"; + this.btn_FlippersDown.UseVisualStyleBackColor = true; + this.btn_FlippersDown.Click += new System.EventHandler(this.btn_FlippersDown_Click); // - // button5 + // btn_SayHello // - this.button5.Location = new System.Drawing.Point(276, 232); - this.button5.Name = "button5"; - this.button5.Size = new System.Drawing.Size(131, 23); - this.button5.TabIndex = 4; - this.button5.Text = "Say \"Hello !\""; - this.button5.UseVisualStyleBackColor = true; - this.button5.Click += new System.EventHandler(this.button5_Click); + this.btn_SayHello.Location = new System.Drawing.Point(276, 232); + this.btn_SayHello.Name = "btn_SayHello"; + this.btn_SayHello.Size = new System.Drawing.Size(131, 23); + this.btn_SayHello.TabIndex = 4; + this.btn_SayHello.Text = "Say \"Hello !\""; + this.btn_SayHello.UseVisualStyleBackColor = true; + this.btn_SayHello.Click += new System.EventHandler(this.btn_SayHello_Click); // - // button6 + // btn_OpenMouth // - this.button6.Location = new System.Drawing.Point(6, 151); - this.button6.Name = "button6"; - this.button6.Size = new System.Drawing.Size(129, 23); - this.button6.TabIndex = 5; - this.button6.Text = "Open mouth"; - this.button6.UseVisualStyleBackColor = true; - this.button6.Click += new System.EventHandler(this.button6_Click); + this.btn_OpenMouth.Location = new System.Drawing.Point(6, 151); + this.btn_OpenMouth.Name = "btn_OpenMouth"; + this.btn_OpenMouth.Size = new System.Drawing.Size(129, 23); + this.btn_OpenMouth.TabIndex = 5; + this.btn_OpenMouth.Text = "Open mouth"; + this.btn_OpenMouth.UseVisualStyleBackColor = true; + this.btn_OpenMouth.Click += new System.EventHandler(this.btn_OpenMouth_Click); // - // button7 + // btn_CloseMouth // - this.button7.Location = new System.Drawing.Point(141, 151); - this.button7.Name = "button7"; - this.button7.Size = new System.Drawing.Size(129, 23); - this.button7.TabIndex = 6; - this.button7.Text = "Close mouth"; - this.button7.UseVisualStyleBackColor = true; - this.button7.Click += new System.EventHandler(this.button7_Click); + this.btn_CloseMouth.Location = new System.Drawing.Point(141, 151); + this.btn_CloseMouth.Name = "btn_CloseMouth"; + this.btn_CloseMouth.Size = new System.Drawing.Size(129, 23); + this.btn_CloseMouth.TabIndex = 6; + this.btn_CloseMouth.Text = "Close mouth"; + this.btn_CloseMouth.UseVisualStyleBackColor = true; + this.btn_CloseMouth.Click += new System.EventHandler(this.btn_CloseMouth_Click); // - // button8 + // btn_LeftRotate // - this.button8.Location = new System.Drawing.Point(6, 180); - this.button8.Name = "button8"; - this.button8.Size = new System.Drawing.Size(129, 23); - this.button8.TabIndex = 7; - this.button8.Text = "5 left rotations"; - this.button8.UseVisualStyleBackColor = true; - this.button8.Click += new System.EventHandler(this.button8_Click); + this.btn_LeftRotate.Location = new System.Drawing.Point(6, 180); + this.btn_LeftRotate.Name = "btn_LeftRotation"; + this.btn_LeftRotate.Size = new System.Drawing.Size(129, 23); + this.btn_LeftRotate.TabIndex = 7; + this.btn_LeftRotate.Text = "5 left rotations"; + this.btn_LeftRotate.UseVisualStyleBackColor = true; + this.btn_LeftRotate.Click += new System.EventHandler(this.btn_LeftRotation_Click); // - // button9 + // btn_RightRotation // - this.button9.Location = new System.Drawing.Point(141, 180); - this.button9.Name = "button9"; - this.button9.Size = new System.Drawing.Size(129, 23); - this.button9.TabIndex = 8; - this.button9.Text = "5 right rotations"; - this.button9.UseVisualStyleBackColor = true; - this.button9.Click += new System.EventHandler(this.button9_Click); + this.btn_RightRotation.Location = new System.Drawing.Point(141, 180); + this.btn_RightRotation.Name = "btn_RightRotation"; + this.btn_RightRotation.Size = new System.Drawing.Size(129, 23); + this.btn_RightRotation.TabIndex = 8; + this.btn_RightRotation.Text = "5 right rotations"; + this.btn_RightRotation.UseVisualStyleBackColor = true; + this.btn_RightRotation.Click += new System.EventHandler(this.btn_RightRotation_Click); // - // button10 + // btn_EyesLedsOff // - this.button10.Location = new System.Drawing.Point(141, 35); - this.button10.Name = "button10"; - this.button10.Size = new System.Drawing.Size(129, 23); - this.button10.TabIndex = 10; - this.button10.Text = "Eyes\'s leds off"; - this.button10.UseVisualStyleBackColor = true; - this.button10.Click += new System.EventHandler(this.button10_Click); + this.btn_EyesLedsOff.Location = new System.Drawing.Point(141, 35); + this.btn_EyesLedsOff.Name = "btn_EyesLedsOff"; + this.btn_EyesLedsOff.Size = new System.Drawing.Size(129, 23); + this.btn_EyesLedsOff.TabIndex = 10; + this.btn_EyesLedsOff.Text = "Eyes\'s leds off"; + this.btn_EyesLedsOff.UseVisualStyleBackColor = true; + this.btn_EyesLedsOff.Click += new System.EventHandler(this.btn_EyesLedsOff_Click); // - // button11 + // btn_EyesLedsOn // - this.button11.Location = new System.Drawing.Point(6, 35); - this.button11.Name = "button11"; - this.button11.Size = new System.Drawing.Size(129, 23); - this.button11.TabIndex = 9; - this.button11.Text = "Eyes\'s leds on"; - this.button11.UseVisualStyleBackColor = true; - this.button11.Click += new System.EventHandler(this.button11_Click); + this.btn_EyesLedsOn.Location = new System.Drawing.Point(6, 35); + this.btn_EyesLedsOn.Name = "btn_EyesLedsOn"; + this.btn_EyesLedsOn.Size = new System.Drawing.Size(129, 23); + this.btn_EyesLedsOn.TabIndex = 9; + this.btn_EyesLedsOn.Text = "Eyes\'s leds on"; + this.btn_EyesLedsOn.UseVisualStyleBackColor = true; + this.btn_EyesLedsOn.Click += new System.EventHandler(this.btn_EyesLedsOn_Click); // - // button12 + // btn_LeftEyeLedOn // - this.button12.Location = new System.Drawing.Point(6, 64); - this.button12.Name = "button12"; - this.button12.Size = new System.Drawing.Size(129, 23); - this.button12.TabIndex = 11; - this.button12.Text = "Left eye led on"; - this.button12.UseVisualStyleBackColor = true; - this.button12.Click += new System.EventHandler(this.button12_Click); + this.btn_LeftEyeLedOn.Location = new System.Drawing.Point(6, 64); + this.btn_LeftEyeLedOn.Name = "btn_LeftEyeLedOn"; + this.btn_LeftEyeLedOn.Size = new System.Drawing.Size(129, 23); + this.btn_LeftEyeLedOn.TabIndex = 11; + this.btn_LeftEyeLedOn.Text = "Left eye led on"; + this.btn_LeftEyeLedOn.UseVisualStyleBackColor = true; + this.btn_LeftEyeLedOn.Click += new System.EventHandler(this.btn_LeftEyeLedOn_Click); // - // button13 + // btn_RightEyeLedOn // - this.button13.Location = new System.Drawing.Point(6, 93); - this.button13.Name = "button13"; - this.button13.Size = new System.Drawing.Size(129, 23); - this.button13.TabIndex = 12; - this.button13.Text = "Right eye led on"; - this.button13.UseVisualStyleBackColor = true; - this.button13.Click += new System.EventHandler(this.button13_Click); + this.btn_RightEyeLedOn.Location = new System.Drawing.Point(6, 93); + this.btn_RightEyeLedOn.Name = "btn_RightEyeLedOn"; + this.btn_RightEyeLedOn.Size = new System.Drawing.Size(129, 23); + this.btn_RightEyeLedOn.TabIndex = 12; + this.btn_RightEyeLedOn.Text = "Right eye led on"; + this.btn_RightEyeLedOn.UseVisualStyleBackColor = true; + this.btn_RightEyeLedOn.Click += new System.EventHandler(this.btn_RightEyeLedOn_Click); // - // button14 + // btn_RightEyeLedOff // - this.button14.Location = new System.Drawing.Point(141, 93); - this.button14.Name = "button14"; - this.button14.Size = new System.Drawing.Size(129, 23); - this.button14.TabIndex = 14; - this.button14.Text = "Right eye led off"; - this.button14.UseVisualStyleBackColor = true; - this.button14.Click += new System.EventHandler(this.button14_Click); + this.btn_RightEyeLedOff.Location = new System.Drawing.Point(141, 93); + this.btn_RightEyeLedOff.Name = "btn_RightEyeLedOff"; + this.btn_RightEyeLedOff.Size = new System.Drawing.Size(129, 23); + this.btn_RightEyeLedOff.TabIndex = 14; + this.btn_RightEyeLedOff.Text = "Right eye led off"; + this.btn_RightEyeLedOff.UseVisualStyleBackColor = true; + this.btn_RightEyeLedOff.Click += new System.EventHandler(this.btn_RightEyeLedOff_Click); // - // button15 + // btn_LeftEyeLedOff // - this.button15.Location = new System.Drawing.Point(141, 64); - this.button15.Name = "button15"; - this.button15.Size = new System.Drawing.Size(129, 23); - this.button15.TabIndex = 13; - this.button15.Text = "Left eye led off"; - this.button15.UseVisualStyleBackColor = true; - this.button15.Click += new System.EventHandler(this.button15_Click); + this.btn_LeftEyeLedOff.Location = new System.Drawing.Point(141, 64); + this.btn_LeftEyeLedOff.Name = "btn_LeftEyeLedOff"; + this.btn_LeftEyeLedOff.Size = new System.Drawing.Size(129, 23); + this.btn_LeftEyeLedOff.TabIndex = 13; + this.btn_LeftEyeLedOff.Text = "Left eye led off"; + this.btn_LeftEyeLedOff.UseVisualStyleBackColor = true; + this.btn_LeftEyeLedOff.Click += new System.EventHandler(this.btn_LeftEyeLedOff_Click); // - // button17 + // btn_PlayAttituneTest // - this.button17.Location = new System.Drawing.Point(6, 232); - this.button17.Name = "button17"; - this.button17.Size = new System.Drawing.Size(129, 23); - this.button17.TabIndex = 16; - this.button17.Text = "Play test attitune"; - this.button17.UseVisualStyleBackColor = true; - this.button17.Click += new System.EventHandler(this.button17_Click); + this.btn_PlayAttituneTest.Location = new System.Drawing.Point(6, 232); + this.btn_PlayAttituneTest.Name = "btn_PlayAttituneTest"; + this.btn_PlayAttituneTest.Size = new System.Drawing.Size(129, 23); + this.btn_PlayAttituneTest.TabIndex = 16; + this.btn_PlayAttituneTest.Text = "Play test attitune"; + this.btn_PlayAttituneTest.UseVisualStyleBackColor = true; + this.btn_PlayAttituneTest.Click += new System.EventHandler(this.btn_PlayAttituneTest_Click); // - // button18 + // btn_StopAttitune // - this.button18.Location = new System.Drawing.Point(6, 261); - this.button18.Name = "button18"; - this.button18.Size = new System.Drawing.Size(129, 23); - this.button18.TabIndex = 17; - this.button18.Text = "Stop attitune"; - this.button18.UseVisualStyleBackColor = true; - this.button18.Click += new System.EventHandler(this.button18_Click); + this.btn_StopAttitune.Location = new System.Drawing.Point(6, 261); + this.btn_StopAttitune.Name = "btn_StopAttitune"; + this.btn_StopAttitune.Size = new System.Drawing.Size(129, 23); + this.btn_StopAttitune.TabIndex = 17; + this.btn_StopAttitune.Text = "Stop attitune"; + this.btn_StopAttitune.UseVisualStyleBackColor = true; + this.btn_StopAttitune.Click += new System.EventHandler(this.btn_StopAttitune_Click); // - // button19 + // btn_StopSound // - this.button19.Location = new System.Drawing.Point(141, 261); - this.button19.Name = "button19"; - this.button19.Size = new System.Drawing.Size(129, 23); - this.button19.TabIndex = 19; - this.button19.Text = "Stop playing sound"; - this.button19.UseVisualStyleBackColor = true; - this.button19.Click += new System.EventHandler(this.button19_Click); + this.btn_StopSound.Location = new System.Drawing.Point(141, 261); + this.btn_StopSound.Name = "btn_StopSound"; + this.btn_StopSound.Size = new System.Drawing.Size(129, 23); + this.btn_StopSound.TabIndex = 19; + this.btn_StopSound.Text = "Stop playing sound"; + this.btn_StopSound.UseVisualStyleBackColor = true; + this.btn_StopSound.Click += new System.EventHandler(this.btn_StopSound_Click); // - // button20 + // btn_PlaySoundTest // - this.button20.Location = new System.Drawing.Point(141, 232); - this.button20.Name = "button20"; - this.button20.Size = new System.Drawing.Size(129, 23); - this.button20.TabIndex = 18; - this.button20.Text = "Play test sound"; - this.button20.UseVisualStyleBackColor = true; - this.button20.Click += new System.EventHandler(this.button20_Click); + this.btn_PlaySoundTest.Location = new System.Drawing.Point(141, 232); + this.btn_PlaySoundTest.Name = "btn_PlaySoundTest"; + this.btn_PlaySoundTest.Size = new System.Drawing.Size(129, 23); + this.btn_PlaySoundTest.TabIndex = 18; + this.btn_PlaySoundTest.Text = "Play test sound"; + this.btn_PlaySoundTest.UseVisualStyleBackColor = true; + this.btn_PlaySoundTest.Click += new System.EventHandler(this.btn_PlaySoundTest_Click); // - // button16 + // btn_EyesMotorStatus // - this.button16.Location = new System.Drawing.Point(276, 6); - this.button16.Name = "button16"; - this.button16.Size = new System.Drawing.Size(161, 23); - this.button16.TabIndex = 20; - this.button16.Text = "Eyes motors in action ?"; - this.button16.UseVisualStyleBackColor = true; - this.button16.Click += new System.EventHandler(this.button16_Click); + this.btn_EyesMotorStatus.Location = new System.Drawing.Point(276, 6); + this.btn_EyesMotorStatus.Name = "btn_EyesMotorStatus"; + this.btn_EyesMotorStatus.Size = new System.Drawing.Size(161, 23); + this.btn_EyesMotorStatus.TabIndex = 20; + this.btn_EyesMotorStatus.Text = "Eyes motors in action ?"; + this.btn_EyesMotorStatus.UseVisualStyleBackColor = true; + this.btn_EyesMotorStatus.Click += new System.EventHandler(this.btn_EyesMotorStatus_Click); // - // button21 + // btn_LightLevel // - this.button21.Location = new System.Drawing.Point(610, 35); - this.button21.Name = "button21"; - this.button21.Size = new System.Drawing.Size(161, 23); - this.button21.TabIndex = 21; - this.button21.Text = "Light level"; - this.button21.UseVisualStyleBackColor = true; - this.button21.Click += new System.EventHandler(this.button21_Click); + this.btn_LightLevel.Location = new System.Drawing.Point(610, 35); + this.btn_LightLevel.Name = "btn_LightLevel"; + this.btn_LightLevel.Size = new System.Drawing.Size(161, 23); + this.btn_LightLevel.TabIndex = 21; + this.btn_LightLevel.Text = "Light level"; + this.btn_LightLevel.UseVisualStyleBackColor = true; + this.btn_LightLevel.Click += new System.EventHandler(this.btn_LightLevel_Click); // - // button22 + // btn_LeftLedStatus // - this.button22.Location = new System.Drawing.Point(276, 64); - this.button22.Name = "button22"; - this.button22.Size = new System.Drawing.Size(161, 23); - this.button22.TabIndex = 22; - this.button22.Text = "Left led status"; - this.button22.UseVisualStyleBackColor = true; - this.button22.Click += new System.EventHandler(this.button22_Click); + this.btn_LeftLedStatus.Location = new System.Drawing.Point(276, 64); + this.btn_LeftLedStatus.Name = "btn_LeftLedStatus"; + this.btn_LeftLedStatus.Size = new System.Drawing.Size(161, 23); + this.btn_LeftLedStatus.TabIndex = 22; + this.btn_LeftLedStatus.Text = "Left led status"; + this.btn_LeftLedStatus.UseVisualStyleBackColor = true; + this.btn_LeftLedStatus.Click += new System.EventHandler(this.btn_LeftLedStatus_Click); // - // button23 + // btn_RightLedStatus // - this.button23.Location = new System.Drawing.Point(276, 93); - this.button23.Name = "button23"; - this.button23.Size = new System.Drawing.Size(161, 23); - this.button23.TabIndex = 23; - this.button23.Text = "Right led status"; - this.button23.UseVisualStyleBackColor = true; - this.button23.Click += new System.EventHandler(this.button23_Click); + this.btn_RightLedStatus.Location = new System.Drawing.Point(276, 93); + this.btn_RightLedStatus.Name = "btn_RightLedStatus"; + this.btn_RightLedStatus.Size = new System.Drawing.Size(161, 23); + this.btn_RightLedStatus.TabIndex = 23; + this.btn_RightLedStatus.Text = "Right led status"; + this.btn_RightLedStatus.UseVisualStyleBackColor = true; + this.btn_RightLedStatus.Click += new System.EventHandler(this.btn_RightLedStatus_Click); // - // button24 + // btn_FlippersStatus // - this.button24.Location = new System.Drawing.Point(276, 122); - this.button24.Name = "button24"; - this.button24.Size = new System.Drawing.Size(161, 23); - this.button24.TabIndex = 24; - this.button24.Text = "Wing motors in action ?"; - this.button24.UseVisualStyleBackColor = true; - this.button24.Click += new System.EventHandler(this.button24_Click); + this.btn_FlippersStatus.Location = new System.Drawing.Point(276, 122); + this.btn_FlippersStatus.Name = "btn_FlippersStatus"; + this.btn_FlippersStatus.Size = new System.Drawing.Size(161, 23); + this.btn_FlippersStatus.TabIndex = 24; + this.btn_FlippersStatus.Text = "Wing motors in action ?"; + this.btn_FlippersStatus.UseVisualStyleBackColor = true; + this.btn_FlippersStatus.Click += new System.EventHandler(this.btn_FlippersStatus_Click); // - // button25 + // btn_MouthStatus // - this.button25.Location = new System.Drawing.Point(276, 151); - this.button25.Name = "button25"; - this.button25.Size = new System.Drawing.Size(161, 23); - this.button25.TabIndex = 25; - this.button25.Text = "Mouth motor in action ?"; - this.button25.UseVisualStyleBackColor = true; - this.button25.Click += new System.EventHandler(this.button25_Click); + this.btn_MouthStatus.Location = new System.Drawing.Point(276, 151); + this.btn_MouthStatus.Name = "btn_MouthStatus"; + this.btn_MouthStatus.Size = new System.Drawing.Size(161, 23); + this.btn_MouthStatus.TabIndex = 25; + this.btn_MouthStatus.Text = "Mouth motor in action ?"; + this.btn_MouthStatus.UseVisualStyleBackColor = true; + this.btn_MouthStatus.Click += new System.EventHandler(this.btn_MouthStatus_Click); // - // button26 + // btn_LeftSpinStatus // - this.button26.Location = new System.Drawing.Point(276, 180); - this.button26.Name = "button26"; - this.button26.Size = new System.Drawing.Size(161, 23); - this.button26.TabIndex = 26; - this.button26.Text = "Status \"spin\" left (motor)"; - this.button26.UseVisualStyleBackColor = true; - this.button26.Click += new System.EventHandler(this.button26_Click); + this.btn_LeftSpinStatus.Location = new System.Drawing.Point(276, 180); + this.btn_LeftSpinStatus.Name = "btn_LeftSpinStatus"; + this.btn_LeftSpinStatus.Size = new System.Drawing.Size(161, 23); + this.btn_LeftSpinStatus.TabIndex = 26; + this.btn_LeftSpinStatus.Text = "Status \"spin\" left (motor)"; + this.btn_LeftSpinStatus.UseVisualStyleBackColor = true; + this.btn_LeftSpinStatus.Click += new System.EventHandler(this.btn_LeftSpinStatus_Click); // - // button27 + // btn_RightSpinStatus // - this.button27.Location = new System.Drawing.Point(443, 180); - this.button27.Name = "button27"; - this.button27.Size = new System.Drawing.Size(161, 23); - this.button27.TabIndex = 27; - this.button27.Text = "Status \"spin\" right (motor)"; - this.button27.UseVisualStyleBackColor = true; - this.button27.Click += new System.EventHandler(this.button27_Click); + this.btn_RightSpinStatus.Location = new System.Drawing.Point(443, 180); + this.btn_RightSpinStatus.Name = "btn_RightSpinStatus"; + this.btn_RightSpinStatus.Size = new System.Drawing.Size(161, 23); + this.btn_RightSpinStatus.TabIndex = 27; + this.btn_RightSpinStatus.Text = "Status \"spin\" right (motor)"; + this.btn_RightSpinStatus.UseVisualStyleBackColor = true; + this.btn_RightSpinStatus.Click += new System.EventHandler(this.btn_RightSpinStatus_Click); // - // button28 + // btn_EyesPosition // - this.button28.Location = new System.Drawing.Point(443, 6); - this.button28.Name = "button28"; - this.button28.Size = new System.Drawing.Size(161, 23); - this.button28.TabIndex = 28; - this.button28.Text = "Eyes\'s position"; - this.button28.UseVisualStyleBackColor = true; - this.button28.Click += new System.EventHandler(this.button28_Click); + this.btn_EyesPosition.Location = new System.Drawing.Point(443, 6); + this.btn_EyesPosition.Name = "btn_EyesPosition"; + this.btn_EyesPosition.Size = new System.Drawing.Size(161, 23); + this.btn_EyesPosition.TabIndex = 28; + this.btn_EyesPosition.Text = "Eyes\'s position"; + this.btn_EyesPosition.UseVisualStyleBackColor = true; + this.btn_EyesPosition.Click += new System.EventHandler(this.btn_EyesPosition_Click); // - // button29 + // btn_FlippersPosition // - this.button29.Location = new System.Drawing.Point(443, 122); - this.button29.Name = "button29"; - this.button29.Size = new System.Drawing.Size(161, 23); - this.button29.TabIndex = 29; - this.button29.Text = "Wings\'s position"; - this.button29.UseVisualStyleBackColor = true; - this.button29.Click += new System.EventHandler(this.button29_Click); + this.btn_FlippersPosition.Location = new System.Drawing.Point(443, 122); + this.btn_FlippersPosition.Name = "btn_FlippersPosition"; + this.btn_FlippersPosition.Size = new System.Drawing.Size(161, 23); + this.btn_FlippersPosition.TabIndex = 29; + this.btn_FlippersPosition.Text = "Wings\'s position"; + this.btn_FlippersPosition.UseVisualStyleBackColor = true; + this.btn_FlippersPosition.Click += new System.EventHandler(this.btn_FlippersPosition_Click); // - // button30 + // btn_MouthPosition // - this.button30.Location = new System.Drawing.Point(443, 151); - this.button30.Name = "button30"; - this.button30.Size = new System.Drawing.Size(161, 23); - this.button30.TabIndex = 30; - this.button30.Text = "Position de la bouche"; - this.button30.UseVisualStyleBackColor = true; - this.button30.Click += new System.EventHandler(this.button30_Click); + this.btn_MouthPosition.Location = new System.Drawing.Point(443, 151); + this.btn_MouthPosition.Name = "btn_MouthPosition"; + this.btn_MouthPosition.Size = new System.Drawing.Size(161, 23); + this.btn_MouthPosition.TabIndex = 30; + this.btn_MouthPosition.Text = "Mouth\'s position"; + this.btn_MouthPosition.UseVisualStyleBackColor = true; + this.btn_MouthPosition.Click += new System.EventHandler(this.btn_MouthPosition_Click); // - // button31 + // btn_SpinPosition // - this.button31.Location = new System.Drawing.Point(610, 180); - this.button31.Name = "button31"; - this.button31.Size = new System.Drawing.Size(161, 23); - this.button31.TabIndex = 31; - this.button31.Text = "Spin position"; - this.button31.UseVisualStyleBackColor = true; - this.button31.Click += new System.EventHandler(this.button31_Click); + this.btn_SpinPosition.Location = new System.Drawing.Point(610, 180); + this.btn_SpinPosition.Name = "btn_SpinPosition"; + this.btn_SpinPosition.Size = new System.Drawing.Size(161, 23); + this.btn_SpinPosition.TabIndex = 31; + this.btn_SpinPosition.Text = "Spin position"; + this.btn_SpinPosition.UseVisualStyleBackColor = true; + this.btn_SpinPosition.Click += new System.EventHandler(this.btn_SpinPosition_Click); // - // button32 + // btn_BatteryStatus // - this.button32.Location = new System.Drawing.Point(443, 232); - this.button32.Name = "button32"; - this.button32.Size = new System.Drawing.Size(161, 23); - this.button32.TabIndex = 901; - this.button32.Text = "Battery status"; - this.button32.UseVisualStyleBackColor = true; - this.button32.Click += new System.EventHandler(this.button32_Click); + this.btn_BatteryStatus.Location = new System.Drawing.Point(443, 232); + this.btn_BatteryStatus.Name = "btn_BatteryStatus"; + this.btn_BatteryStatus.Size = new System.Drawing.Size(161, 23); + this.btn_BatteryStatus.TabIndex = 901; + this.btn_BatteryStatus.Text = "Battery status"; + this.btn_BatteryStatus.UseVisualStyleBackColor = true; + this.btn_BatteryStatus.Click += new System.EventHandler(this.btn_BatteryStatus_Click); // - // button33 + // btn_BatteryLevel // - this.button33.Location = new System.Drawing.Point(443, 261); - this.button33.Name = "button33"; - this.button33.Size = new System.Drawing.Size(161, 23); - this.button33.TabIndex = 902; - this.button33.Text = "Battery level"; - this.button33.UseVisualStyleBackColor = true; - this.button33.Click += new System.EventHandler(this.button33_Click); + this.btn_BatteryLevel.Location = new System.Drawing.Point(443, 261); + this.btn_BatteryLevel.Name = "btn_BatteryLevel"; + this.btn_BatteryLevel.Size = new System.Drawing.Size(161, 23); + this.btn_BatteryLevel.TabIndex = 902; + this.btn_BatteryLevel.Text = "Battery level"; + this.btn_BatteryLevel.UseVisualStyleBackColor = true; + this.btn_BatteryLevel.Click += new System.EventHandler(this.btn_BatteryLevel_Click); // - // button34 + // btn_ChargerState // - this.button34.Location = new System.Drawing.Point(610, 232); - this.button34.Name = "button34"; - this.button34.Size = new System.Drawing.Size(161, 23); - this.button34.TabIndex = 903; - this.button34.Text = "Charger state"; - this.button34.UseVisualStyleBackColor = true; - this.button34.Click += new System.EventHandler(this.button34_Click); + this.btn_ChargerState.Location = new System.Drawing.Point(610, 232); + this.btn_ChargerState.Name = "btn_ChargerState"; + this.btn_ChargerState.Size = new System.Drawing.Size(161, 23); + this.btn_ChargerState.TabIndex = 903; + this.btn_ChargerState.Text = "Charger state"; + this.btn_ChargerState.UseVisualStyleBackColor = true; + this.btn_ChargerState.Click += new System.EventHandler(this.btn_ChargerState_Click); // - // button35 + // btn_SearchLightGadget // - this.button35.Location = new System.Drawing.Point(3, 6); - this.button35.Name = "button35"; - this.button35.Size = new System.Drawing.Size(172, 23); - this.button35.TabIndex = 904; - this.button35.Text = "Search the light"; - this.button35.UseVisualStyleBackColor = true; - this.button35.Click += new System.EventHandler(this.button35_Click); + this.btn_SearchLightGadget.Location = new System.Drawing.Point(3, 6); + this.btn_SearchLightGadget.Name = "btn_SearchLightGadget"; + this.btn_SearchLightGadget.Size = new System.Drawing.Size(172, 23); + this.btn_SearchLightGadget.TabIndex = 904; + this.btn_SearchLightGadget.Text = "Search the light"; + this.btn_SearchLightGadget.UseVisualStyleBackColor = true; + this.btn_SearchLightGadget.Click += new System.EventHandler(this.btn_SearchLightGadget_Click); // // tabControl1 // @@ -440,43 +440,43 @@ // // tabPage1 // - this.tabPage1.Controls.Add(this.button41); - this.tabPage1.Controls.Add(this.button40); - this.tabPage1.Controls.Add(this.button39); - this.tabPage1.Controls.Add(this.button2); - this.tabPage1.Controls.Add(this.button1); - this.tabPage1.Controls.Add(this.button34); - this.tabPage1.Controls.Add(this.button3); - this.tabPage1.Controls.Add(this.button33); - this.tabPage1.Controls.Add(this.button4); - this.tabPage1.Controls.Add(this.button32); - this.tabPage1.Controls.Add(this.button5); - this.tabPage1.Controls.Add(this.button31); - this.tabPage1.Controls.Add(this.button6); - this.tabPage1.Controls.Add(this.button30); - this.tabPage1.Controls.Add(this.button7); - this.tabPage1.Controls.Add(this.button29); - this.tabPage1.Controls.Add(this.button8); - this.tabPage1.Controls.Add(this.button28); - this.tabPage1.Controls.Add(this.button9); - this.tabPage1.Controls.Add(this.button27); - this.tabPage1.Controls.Add(this.button11); - this.tabPage1.Controls.Add(this.button26); - this.tabPage1.Controls.Add(this.button10); - this.tabPage1.Controls.Add(this.button25); - this.tabPage1.Controls.Add(this.button12); - this.tabPage1.Controls.Add(this.button24); - this.tabPage1.Controls.Add(this.button13); - this.tabPage1.Controls.Add(this.button23); - this.tabPage1.Controls.Add(this.button15); - this.tabPage1.Controls.Add(this.button22); - this.tabPage1.Controls.Add(this.button14); - this.tabPage1.Controls.Add(this.button21); - this.tabPage1.Controls.Add(this.button17); - this.tabPage1.Controls.Add(this.button16); - this.tabPage1.Controls.Add(this.button18); - this.tabPage1.Controls.Add(this.button19); - this.tabPage1.Controls.Add(this.button20); + this.tabPage1.Controls.Add(this.btn_BlinkRightLed); + this.tabPage1.Controls.Add(this.btn_BlinkLeftLed); + this.tabPage1.Controls.Add(this.btn_BlinkEyes); + this.tabPage1.Controls.Add(this.btn_OpenEyes); + this.tabPage1.Controls.Add(this.btn_CloseEyes); + this.tabPage1.Controls.Add(this.btn_ChargerState); + this.tabPage1.Controls.Add(this.btn_FlippersUp); + this.tabPage1.Controls.Add(this.btn_BatteryLevel); + this.tabPage1.Controls.Add(this.btn_FlippersDown); + this.tabPage1.Controls.Add(this.btn_BatteryStatus); + this.tabPage1.Controls.Add(this.btn_SayHello); + this.tabPage1.Controls.Add(this.btn_SpinPosition); + this.tabPage1.Controls.Add(this.btn_OpenMouth); + this.tabPage1.Controls.Add(this.btn_MouthPosition); + this.tabPage1.Controls.Add(this.btn_CloseMouth); + this.tabPage1.Controls.Add(this.btn_FlippersPosition); + this.tabPage1.Controls.Add(this.btn_LeftRotate); + this.tabPage1.Controls.Add(this.btn_EyesPosition); + this.tabPage1.Controls.Add(this.btn_RightRotation); + this.tabPage1.Controls.Add(this.btn_RightSpinStatus); + this.tabPage1.Controls.Add(this.btn_EyesLedsOn); + this.tabPage1.Controls.Add(this.btn_LeftSpinStatus); + this.tabPage1.Controls.Add(this.btn_EyesLedsOff); + this.tabPage1.Controls.Add(this.btn_MouthStatus); + this.tabPage1.Controls.Add(this.btn_LeftEyeLedOn); + this.tabPage1.Controls.Add(this.btn_FlippersStatus); + this.tabPage1.Controls.Add(this.btn_RightEyeLedOn); + this.tabPage1.Controls.Add(this.btn_RightLedStatus); + this.tabPage1.Controls.Add(this.btn_LeftEyeLedOff); + this.tabPage1.Controls.Add(this.btn_LeftLedStatus); + this.tabPage1.Controls.Add(this.btn_RightEyeLedOff); + this.tabPage1.Controls.Add(this.btn_LightLevel); + this.tabPage1.Controls.Add(this.btn_PlayAttituneTest); + this.tabPage1.Controls.Add(this.btn_EyesMotorStatus); + this.tabPage1.Controls.Add(this.btn_StopAttitune); + this.tabPage1.Controls.Add(this.btn_StopSound); + this.tabPage1.Controls.Add(this.btn_PlaySoundTest); this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); @@ -485,42 +485,42 @@ this.tabPage1.Text = "Control Tux Droid"; this.tabPage1.UseVisualStyleBackColor = true; // - // button41 + // btn_BlinkRightLed // - this.button41.Location = new System.Drawing.Point(443, 93); - this.button41.Name = "button41"; - this.button41.Size = new System.Drawing.Size(161, 23); - this.button41.TabIndex = 906; - this.button41.Text = "Blink right led"; - this.button41.UseVisualStyleBackColor = true; - this.button41.Click += new System.EventHandler(this.button41_Click); + this.btn_BlinkRightLed.Location = new System.Drawing.Point(443, 93); + this.btn_BlinkRightLed.Name = "btn_BlinkRightLed"; + this.btn_BlinkRightLed.Size = new System.Drawing.Size(161, 23); + this.btn_BlinkRightLed.TabIndex = 906; + this.btn_BlinkRightLed.Text = "Blink right led"; + this.btn_BlinkRightLed.UseVisualStyleBackColor = true; + this.btn_BlinkRightLed.Click += new System.EventHandler(this.btn_BlinkRightLed_Click); // - // button40 + // btn_BlinkLeftLed // - this.button40.Location = new System.Drawing.Point(443, 64); - this.button40.Name = "button40"; - this.button40.Size = new System.Drawing.Size(161, 23); - this.button40.TabIndex = 905; - this.button40.Text = "Blink left led"; - this.button40.UseVisualStyleBackColor = true; - this.button40.Click += new System.EventHandler(this.button40_Click); + this.btn_BlinkLeftLed.Location = new System.Drawing.Point(443, 64); + this.btn_BlinkLeftLed.Name = "btn_BlinkLeftLed"; + this.btn_BlinkLeftLed.Size = new System.Drawing.Size(161, 23); + this.btn_BlinkLeftLed.TabIndex = 905; + this.btn_BlinkLeftLed.Text = "Blink left led"; + this.btn_BlinkLeftLed.UseVisualStyleBackColor = true; + this.btn_BlinkLeftLed.Click += new System.EventHandler(this.btn_BlinkLeftLed_Click); // - // button39 + // btn_BlinkEyes // - this.button39.Location = new System.Drawing.Point(276, 35); - this.button39.Name = "button39"; - this.button39.Size = new System.Drawing.Size(161, 23); - this.button39.TabIndex = 904; - this.button39.Text = "Blink the eyes"; - this.button39.UseVisualStyleBackColor = true; - this.button39.Click += new System.EventHandler(this.button39_Click); + this.btn_BlinkEyes.Location = new System.Drawing.Point(276, 35); + this.btn_BlinkEyes.Name = "btn_BlinkEyes"; + this.btn_BlinkEyes.Size = new System.Drawing.Size(161, 23); + this.btn_BlinkEyes.TabIndex = 904; + this.btn_BlinkEyes.Text = "Blink the eyes"; + this.btn_BlinkEyes.UseVisualStyleBackColor = true; + this.btn_BlinkEyes.Click += new System.EventHandler(this.btn_BlinkEyes_Click); // // tabPage2 // - this.tabPage2.Controls.Add(this.button38); - this.tabPage2.Controls.Add(this.button37); - this.tabPage2.Controls.Add(this.button36); - this.tabPage2.Controls.Add(this.button35); + this.tabPage2.Controls.Add(this.btn_WheaterGadget); + this.tabPage2.Controls.Add(this.btn_WhatDayGadget); + this.tabPage2.Controls.Add(this.btn_WhatTimeGadget); + this.tabPage2.Controls.Add(this.btn_SearchLightGadget); this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); @@ -529,35 +529,35 @@ this.tabPage2.Text = "Gadget like"; this.tabPage2.UseVisualStyleBackColor = true; // - // button38 + // btn_WheaterGadget // - this.button38.Location = new System.Drawing.Point(352, 52); - this.button38.Name = "button38"; - this.button38.Size = new System.Drawing.Size(172, 23); - this.button38.TabIndex = 907; - this.button38.Text = "Meteo"; - this.button38.UseVisualStyleBackColor = true; - this.button38.Click += new System.EventHandler(this.button38_Click); + this.btn_WheaterGadget.Location = new System.Drawing.Point(352, 52); + this.btn_WheaterGadget.Name = "btn_WheaterGadget"; + this.btn_WheaterGadget.Size = new System.Drawing.Size(172, 23); + this.btn_WheaterGadget.TabIndex = 907; + this.btn_WheaterGadget.Text = "Weather"; + this.btn_WheaterGadget.UseVisualStyleBackColor = true; + this.btn_WheaterGadget.Click += new System.EventHandler(this.btn_WeatherGadget_Click); // - // button37 + // btn_WhatDayGadget // - this.button37.Location = new System.Drawing.Point(3, 52); - this.button37.Name = "button37"; - this.button37.Size = new System.Drawing.Size(172, 23); - this.button37.TabIndex = 906; - this.button37.Text = "What day are we ?"; - this.button37.UseVisualStyleBackColor = true; - this.button37.Click += new System.EventHandler(this.button37_Click); + this.btn_WhatDayGadget.Location = new System.Drawing.Point(3, 52); + this.btn_WhatDayGadget.Name = "btn_WhatDayGadget"; + this.btn_WhatDayGadget.Size = new System.Drawing.Size(172, 23); + this.btn_WhatDayGadget.TabIndex = 906; + this.btn_WhatDayGadget.Text = "What day are we ?"; + this.btn_WhatDayGadget.UseVisualStyleBackColor = true; + this.btn_WhatDayGadget.Click += new System.EventHandler(this.btn_WhatDayGadget_Click); // - // button36 + // btn_WhatTimeGadget // - this.button36.Location = new System.Drawing.Point(181, 52); - this.button36.Name = "button36"; - this.button36.Size = new System.Drawing.Size(165, 23); - this.button36.TabIndex = 905; - this.button36.Text = "What time is it ?"; - this.button36.UseVisualStyleBackColor = true; - this.button36.Click += new System.EventHandler(this.button36_Click); + this.btn_WhatTimeGadget.Location = new System.Drawing.Point(181, 52); + this.btn_WhatTimeGadget.Name = "btn_WhatTimeGadget"; + this.btn_WhatTimeGadget.Size = new System.Drawing.Size(165, 23); + this.btn_WhatTimeGadget.TabIndex = 905; + this.btn_WhatTimeGadget.Text = "What time is it ?"; + this.btn_WhatTimeGadget.UseVisualStyleBackColor = true; + this.btn_WhatTimeGadget.Click += new System.EventHandler(this.btn_WhatTimeGadget_Click); // // Form1 // @@ -578,50 +578,50 @@ #endregion - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Button button3; - private System.Windows.Forms.Button button4; - private System.Windows.Forms.Button button5; - private System.Windows.Forms.Button button6; - private System.Windows.Forms.Button button7; - private System.Windows.Forms.Button button8; - private System.Windows.Forms.Button button9; - private System.Windows.Forms.Button button10; - private System.Windows.Forms.Button button11; - private System.Windows.Forms.Button button12; - private System.Windows.Forms.Button button13; - private System.Windows.Forms.Button button14; - private System.Windows.Forms.Button button15; - private System.Windows.Forms.Button button17; - private System.Windows.Forms.Button button18; - private System.Windows.Forms.Button button19; - private System.Windows.Forms.Button button20; - private System.Windows.Forms.Button button16; - private System.Windows.Forms.Button button21; - private System.Windows.Forms.Button button22; - private System.Windows.Forms.Button button23; - private System.Windows.Forms.Button button24; - private System.Windows.Forms.Button button25; - private System.Windows.Forms.Button button26; - private System.Windows.Forms.Button button27; - private System.Windows.Forms.Button button28; - private System.Windows.Forms.Button button29; - private System.Windows.Forms.Button button30; - private System.Windows.Forms.Button button31; - private System.Windows.Forms.Button button32; - private System.Windows.Forms.Button button33; - private System.Windows.Forms.Button button34; - private System.Windows.Forms.Button button35; + private System.Windows.Forms.Button btn_CloseEyes; + private System.Windows.Forms.Button btn_OpenEyes; + private System.Windows.Forms.Button btn_FlippersUp; + private System.Windows.Forms.Button btn_FlippersDown; + private System.Windows.Forms.Button btn_SayHello; + private System.Windows.Forms.Button btn_OpenMouth; + private System.Windows.Forms.Button btn_CloseMouth; + private System.Windows.Forms.Button btn_LeftRotate; + private System.Windows.Forms.Button btn_RightRotation; + private System.Windows.Forms.Button btn_EyesLedsOff; + private System.Windows.Forms.Button btn_EyesLedsOn; + private System.Windows.Forms.Button btn_LeftEyeLedOn; + private System.Windows.Forms.Button btn_RightEyeLedOn; + private System.Windows.Forms.Button btn_RightEyeLedOff; + private System.Windows.Forms.Button btn_LeftEyeLedOff; + private System.Windows.Forms.Button btn_PlayAttituneTest; + private System.Windows.Forms.Button btn_StopAttitune; + private System.Windows.Forms.Button btn_StopSound; + private System.Windows.Forms.Button btn_PlaySoundTest; + private System.Windows.Forms.Button btn_EyesMotorStatus; + private System.Windows.Forms.Button btn_LightLevel; + private System.Windows.Forms.Button btn_LeftLedStatus; + private System.Windows.Forms.Button btn_RightLedStatus; + private System.Windows.Forms.Button btn_FlippersStatus; + private System.Windows.Forms.Button btn_MouthStatus; + private System.Windows.Forms.Button btn_LeftSpinStatus; + private System.Windows.Forms.Button btn_RightSpinStatus; + private System.Windows.Forms.Button btn_EyesPosition; + private System.Windows.Forms.Button btn_FlippersPosition; + private System.Windows.Forms.Button btn_MouthPosition; + private System.Windows.Forms.Button btn_SpinPosition; + private System.Windows.Forms.Button btn_BatteryStatus; + private System.Windows.Forms.Button btn_BatteryLevel; + private System.Windows.Forms.Button btn_ChargerState; + private System.Windows.Forms.Button btn_SearchLightGadget; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; - private System.Windows.Forms.Button button36; - private System.Windows.Forms.Button button37; - private System.Windows.Forms.Button button38; - private System.Windows.Forms.Button button41; - private System.Windows.Forms.Button button40; - private System.Windows.Forms.Button button39; + private System.Windows.Forms.Button btn_WhatTimeGadget; + private System.Windows.Forms.Button btn_WhatDayGadget; + private System.Windows.Forms.Button btn_WheaterGadget; + private System.Windows.Forms.Button btn_BlinkRightLed; + private System.Windows.Forms.Button btn_BlinkLeftLed; + private System.Windows.Forms.Button btn_BlinkEyes; } } Modified: software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.cs =================================================================== --- software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.cs 2010-01-08 11:04:20 UTC (rev 6040) +++ software_suite_v3/smart-core/smart-api/csharp/trunk/ControlTuxDroid/TuxAPIDemo/Form1.cs 2010-01-10 21:07:17 UTC (rev 6041) @@ -6,7 +6,6 @@ using System.Threading; //sleep using System.IO; // using System.Xml; -using System.Xml.Linq; using System.Net; namespace TuxAPIDemo @@ -71,193 +70,196 @@ } - private void button1_Click(object sender, EventArgs e) + private void btn_CloseEyes_Click(object sender, EventArgs e) { TuxAPI.Eyes_Close(); } - private void button2_Click(object sender, EventArgs e) + private void btn_OpenEyes_Click(object sender, EventArgs e) { TuxAPI.Eyes_Open(); } - private void button3_Click(object sender, EventArgs e) + private void btn_FlippersUp_Click(object sender, EventArgs e) { TuxAPI.Flippers_Up(); } - private void button4_Click(object sender, EventArgs e) + pri... [truncated message content] |
From: remi <c2m...@c2...> - 2010-01-08 11:04:36
|
Author: remi Date: 2010-01-08 12:04:20 +0100 (Fri, 08 Jan 2010) New Revision: 6040 Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/de.po software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/de.wiki software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/en.po software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/en.wiki software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/fr.po software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/fr.wiki software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.png software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.pot software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.xml software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/help.wiki software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/nl.po software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/nl.wiki software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/de.po software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/de.wiki software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/en.po software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/fr.po software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/fr.wiki software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.png software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.pot software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.xml software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/help.wiki software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/nl.po software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/nl.wiki Removed: software_suite_v3/software/gadget/default/trunk/gadget_4e139371-e72a-5df7-c272-17d22f1fc258/ Modified: software_suite_v3/software/gadget/default/trunk/names_to_uuids_list.txt Log: * Replaced skype gadgets in the default gadgets Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/de.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/de.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/de.po 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype" +msgstr "Skype" + +msgid "Skype." +msgstr "Skype." + +msgid "This plugin controls the Skype application" +msgstr "Mit dieser Funktion können Sie Tux Droid als Skype-Telefon verwenden." Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/de.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/de.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/de.wiki 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,23 @@ += Description = +Use Tux Droid to make Skype calls with the Skype gadget. Please note you can only make calls and not receive any with this gadget. To receive incoming Skype calls you will need the Skype Notifier gadget installed and activated. + +If you are not familiar with Skype, you can find the software and information here: http://www.skype.com + +When you see a popup window with "Python.exe wants to use Skype" just click "Allow access". Also ensure that "TuxDroid-Audio" is configured for all audio devices in your Skype client configuration. + +The Skype gadget will only work if you have the Skype client already running and are logged in. + += To make a call using the remote control = +* '''Left/righ arrow button :''' Go to the next/previous contact in the Skype contactslist. +* '''Ok button or green phone button :''' To call the currently selected contact. +* '''Ok button again or red phone button while calling :''' To end the call. +* '''Select "Quit gadget" from your Skype contacts list :''' To quit the Skype gadget. + += To make a call using Tux Droid = +* '''Left/right wing :''' Go to the next/previous contact in the Skype contacts list. +* '''Head button :''' To call the currently selected contact. +* '''Head button while calling :''' To end the call. +* '''Select "Quit gadget" from your Skype contacts list :''' To quit the Skype gadget. + += Note = +The Skype gadget cannot be stopped from the TuxBox graphical interface. Quiting the gadget can be done with the head button on Tux or by using the "power off" button on the remote control. Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/en.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/en.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/en.po 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype" +msgstr "Skype" + +msgid "Skype." +msgstr "Skype." + +msgid "This plugin controls the Skype application" +msgstr "With this gadget you can use Tux Droid as a Skype phone." Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/en.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/en.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/en.wiki 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,23 @@ += Description = +Use Tux Droid to make Skype calls with the Skype gadget. Please note you can only make calls and not receive any with this gadget. To receive incoming Skype calls you will need the Skype Notifier gadget installed and activated. + +If you are not familiar with Skype, you can find the software and information here: http://www.skype.com + +When you see a popup window with "Python.exe wants to use Skype" just click "Allow access". Also ensure that "TuxDroid-Audio" is configured for all audio devices in your Skype client configuration. + +The Skype gadget will only work if you have the Skype client already running and are logged in. + += To make a call using the remote control = +* '''Left/righ arrow button :''' Go to the next/previous contact in the Skype contactslist. +* '''Ok button or green phone button :''' To call the currently selected contact. +* '''Ok button again or red phone button while calling :''' To end the call. +* '''Select "Quit gadget" from your Skype contacts list :''' To quit the Skype gadget. + += To make a call using Tux Droid = +* '''Left/right wing :''' Go to the next/previous contact in the Skype contacts list. +* '''Head button :''' To call the currently selected contact. +* '''Head button while calling :''' To end the call. +* '''Select "Quit gadget" from your Skype contacts list :''' To quit the Skype gadget. + += Note = +The Skype gadget cannot be stopped from the TuxBox graphical interface. Quiting the gadget can be done with the head button on Tux or by using the "power off" button on the remote control. Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/fr.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/fr.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/fr.po 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype" +msgstr "Skype" + +msgid "Skype." +msgstr "Skype." + +msgid "This plugin controls the Skype application" +msgstr "Avec ce gadget vous pouvez utiliser Tux Droid en tant que téléphone Skype." Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/fr.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/fr.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/fr.wiki 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,24 @@ += Description = +Utilisez Tux Droid pour effectuer des appels Skype. S'il vous plait, notez qu'avec ce gadget vous ne pourrez que passer des appels et non en reçevoir. +Pour reçevoir les appels entrants de Skype, vous aurez besoin du gadget Skype notifeur installé et activé. + +Si vous n'êtes pas familier avec Skype, vous pourrez trouver le logiciel et des informations ici: http://www.skype.com + +Quand vous verrez un popup avec "Python.exe veut utiliser Skype" Cliquez sur "Autoriser l'accès". Assurez vous que "TuxDroid-Audio" est configuré pour tous les périphériques audio dans la configuration de votre client Skype. + +Le gadget Skype ne fonctionnera que si le client Skype est lançé et que vous êtes connecté. + += Pour effectuer des appels en utilisant la télécommande = +* '''Flèche gauche/droite :''' Aller au contact suivant/précédant dans la liste des contacts. +* '''Bouton Ok ou téléphone vert :''' Appeler le contact sélectionné. +* '''Bouton Ok à nouveau ou téléphone rouge :''' Terminer l'appel. +* '''Selectionner "Quitter le gadget" dans votre liste de contacts:''' Quittera le gadget. + += Pour effectuer un appel en utilisant Tux Droid = +* '''Aile gauche/droite:''' Aller au contact suivant/précédant dans la liste des contacts. +* '''Bouton de tête :''' Appeler le contact sélectionné. +* '''Bouton de tête à nouveau :''' Terminer l'appel. +* '''Selectionner "Quitter le gadget" dans votre liste de contacts:''' Quittera le gadget. + += Note = +Le gadget Skype ne peut être stoppé en utilisant TuxBox. Quitter le gadget peut être réalisé avec le bouton de tête de Tux Droid ou en utilisant le bouton 'éteindre'. Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.pot =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.pot (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.pot 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype" +msgstr "" + +msgid "Skype." +msgstr "" + +msgid "This plugin controls the Skype application" +msgstr "" Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.xml =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.xml (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/gadget.xml 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,39 @@ +<gadget> + <description> + <author>Jérôme Conan</author> + <category>Misc</category> + <defaultLanguage>all</defaultLanguage> + <description>This plugin controls the Skype application</description> + <iconFile>gadget.png</iconFile> + <name>Skype</name> + <onDemandIsAble>true</onDemandIsAble> + <platform>all</platform> + <ttsName>Skype.</ttsName> + <uuid>69848cab-41c2-c81a-e018-84cf0adb25d3</uuid> + <version>0.0.5</version> + </description> + <parameters> + <param_00> + <defaultValue>false</defaultValue> + <name>throwTTS</name> + <visible>false</visible> + </param_00> + <param_01> + <defaultValue>false</defaultValue> + <name>throwEmoticons</name> + <visible>false</visible> + </param_01> + <param_02> + <defaultValue> </defaultValue> + <name>locutor</name> + <visible>false</visible> + </param_02> + </parameters> + <parentPlugin> + <url>http://ftp.kysoh.com/</url> + <uuid>8349ed52-572d-4c3f-a7b8-f6d4a5ae2c0</uuid> + <version>0.0.5</version> + </parentPlugin> + <tasks> + </tasks> +</gadget> Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/help.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/help.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/help.wiki 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,23 @@ += Description = +Use Tux Droid to make Skype calls with the Skype gadget. Please note you can only make calls and not receive any with this gadget. To receive incoming Skype calls you will need the Skype Notifier gadget installed and activated. + +If you are not familiar with Skype, you can find the software and information here: http://www.skype.com + +When you see a popup window with "Python.exe wants to use Skype" just click "Allow access". Also ensure that "TuxDroid-Audio" is configured for all audio devices in your Skype client configuration. + +The Skype gadget will only work if you have the Skype client already running and are logged in. + += To make a call using the remote control = +* '''Left/righ arrow button :''' Go to the next/previous contact in the Skype contactslist. +* '''Ok button or green phone button :''' To call the currently selected contact. +* '''Ok button again or red phone button while calling :''' To end the call. +* '''Select "Quit gadget" from your Skype contacts list :''' To quit the Skype gadget. + += To make a call using Tux Droid = +* '''Left/right wing :''' Go to the next/previous contact in the Skype contacts list. +* '''Head button :''' To call the currently selected contact. +* '''Head button while calling :''' To end the call. +* '''Select "Quit gadget" from your Skype contacts list :''' To quit the Skype gadget. + += Note = +The Skype gadget cannot be stopped from the TuxBox graphical interface. Quiting the gadget can be done with the head button on Tux or by using the "power off" button on the remote control. Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/nl.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/nl.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/nl.po 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype" +msgstr "Skype" + +msgid "Skype." +msgstr "Skype." + +msgid "This plugin controls the Skype application" +msgstr "Met deze gadget kan je Tux Droid gebruiken als een Skype telefoon." Added: software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/nl.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/nl.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_69848cab-41c2-c81a-e018-84cf0adb25d3/nl.wiki 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,23 @@ += Beschrijving = +Met deze gadget kan je Tux Droid gebruiken als een Skype telefoon. Merk op dat je enkel gesprekken kunt starten en geen ontvangen met de deze gadget. Om inkomende Skype gesprekken te ontvangen moet de Skype Notificaties gadget geïnstalleerd en geactiverd zijn. + +Indien je nog nooit gehoord hebt van Skype dan kan je de software en meer info hier vinden: www.skype.com. Controleer ook of "TuxDroid-Audio" is geselecteerd voor alle geluidsapparaten in de Skype client instellingen. + +Als je een popup venster ziet met "Python.exe will Skype gebruiken", klik dan op "Toegang toestaan". + +De Skype gadget zal enkel werken als de Skype software gestart is en je ingelogd bent. + += Om te bellen met de afstandsbediening = +* '''Pijl links/rechts knop :''' Ga naar het volgende/vorige contact in de Skype contactlijst. +* '''Ok knop of knop met de groene telefoon :''' Bel de huidige geslecteerde contactpersoon op. +* '''Ok knop opnieuw of de knop met de rode telefoon tijdens een gesprek :''' Om het Skype gesprek te beëindigen. +* '''Selecteer "Gadget afsluiten" in de contactlijst :''' Om de Skype gadget af te sluiten. + += Om te bellen met Tux Droid = +* '''Linker/rechter vleugel :''' Ga naar het volgende/vorige contact in de Skype contactlijst. +* '''Hoofd knop :''' Bel de huidige geslecteerde contactpersoon op. +* '''Hoofd knop tijdens het gesprek :''' Beëindigt het gesprek. +* '''Selecteer "Gadget afsluiten" in de Skype contactlijst :''' Om de Skype gadget af te sluiten. + += Merk op = +De Skype gadget kan niet gestopt worden via de grafische interface van TuxBox. Om de gadget af te sluiten kan je op de hoofdknop van tux duwen of op de "Power off" op de afstandsbediening. \ No newline at end of file Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/de.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/de.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/de.po 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype Notifier" +msgstr "Skype Notifier" + +msgid "Skype Notifier" +msgstr "Skype Notifier" + +msgid "This plugin controls the Skype application" +msgstr "This gadget controls incoming Skype events." \ No newline at end of file Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/de.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/de.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/de.wiki 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,28 @@ += Description = +The Skype Notifier gadget will make Tux Droid react to incoming Skype events : +* It allows to use Tux Droid to answer incoming Skype calls. +* Tux Droid will react to incoming emoticons in Skype chat. +* If a Skype contact uses "tux>" in Skype chat, followed by his message : Tux Droid will read the message using Text-To-Speech. + +If you are not familiar with Skype, you can find the software and information here: http://www.skype.com + +When you see a popup window with "Python.exe wants to use Skype" just click "Allow access". Also ensure that "TuxDroid-Audio" is configured for all audio devices in your Skype client configuration. + +The Skype Notifier gadget will only work if you have the Skype client already running and are logged in. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Activate the Skype Notifier :''' Enable to make Tux Droid control incoming Skype events. + += Using the remote control for incoming Skype calls = +* '''Ok button or green phone button :''' To answer the incoming call. +* '''Red phone button :''' To reject the incoming call. +* '''Ok button again or red phone button while calling :''' To end the ongoing call. + += Using Tux Droid for incoming Skype calls = +* '''Head button :''' To answer the incoming call. +* '''Left/right wing :''' To reject the incoming call. +* '''Head button again while calling :''' To end the ongoing call. + += Note = +The Skype Notifier gadget cannot be stopped from the TuxBox graphical interface. Quiting the gadget can be done with the head button on Tux or by using the "power off" button on the remote control. Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/en.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/en.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/en.po 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype Notifier" +msgstr "Skype Notifier" + +msgid "Skype Notifier" +msgstr "Skype Notifier" + +msgid "This plugin controls the Skype application" +msgstr "This gadget controls incoming Skype events." \ No newline at end of file Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/fr.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/fr.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/fr.po 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype" +msgstr "Skype" + +msgid "Skype." +msgstr "Skype." + +msgid "This plugin controls the Skype application" +msgstr "Avec ce gadget vous pouvez utiliser Tux Droid en tant que téléphone Skype." Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/fr.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/fr.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/fr.wiki 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,25 @@ += Description = +Le gadget Skype notifieur permet à Tux Droid de réagir aux évènements entrants de Skype : +* Il vous permet d'utiliser Tux Droid pour répondre aux appels entrants de Skype. +* Tux Droid réagira aux émoticones dans le chat Skype. +* Si un contact Skype utilise "tux>" dans un chat, suivi de son message : Tux Droid lira le message grâce au Text-To-Speech. + +Si vous n'êtes pas familier avec Skype, vous pourrez trouver le logiciel et des informations ici: http://www.skype.com + +Quand vous verrez un popup avec "Python.exe veut utiliser Skype" Cliquez sur "Autoriser l'accès". Assurez vous que "TuxDroid-Audio" est configuré pour tous les périphériques audio dans la configuration de votre client Skype. + +Le gadget Skype ne fonctionnera que si le client Skype est lançé et que vous êtes connecté. + += Configuration = +* '''Nom du gadget :''' Vous permet de modifier le nom du gadget. +* '''Activer le notifieur Skype :''' Active l'écoute des évènement entrants de Skype. + += Utiliser la télécommande pour les appels entrants de Skype = +* '''Bouton Ok ou téléphone vert :''' Répondre à l'appel. +* '''Téléphone rouge :''' Pour rejeter l'appel. +* '''Bouton Ok à nouveau ou téléphone rouge :''' Terminer l'appel. + += Utiliser Tux Droid pour les appels entrants de Skype = +* '''Bouton de tête :''' Pour répondre à l'appel. +* '''Aile gauche / droite :''' Pour rejeter l'appel. +* '''Bouton de tête à nouveau :''' Terminer l'appel. Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.pot =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.pot (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.pot 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype Notifier" +msgstr "" + +msgid "Skype Notifier" +msgstr "" + +msgid "This plugin controls the Skype application" +msgstr "" Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.xml =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.xml (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/gadget.xml 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,48 @@ +<gadget> + <description> + <author>Jérôme Conan</author> + <category>Misc</category> + <defaultLanguage>all</defaultLanguage> + <description>This plugin controls the Skype application</description> + <iconFile>gadget.png</iconFile> + <name>Skype Notifier</name> + <onDemandIsAble>false</onDemandIsAble> + <platform>all</platform> + <ttsName>Skype Notifier</ttsName> + <uuid>8d692b92-6de4-1ddf-c42f-b1068569d9d4</uuid> + <version>0.0.5</version> + </description> + <parameters> + <param_00> + <defaultValue>true</defaultValue> + <name>throwTTS</name> + <visible>false</visible> + </param_00> + <param_01> + <defaultValue>true</defaultValue> + <name>throwEmoticons</name> + <visible>false</visible> + </param_01> + <param_02> + <defaultValue> </defaultValue> + <name>locutor</name> + <visible>false</visible> + </param_02> + </parameters> + <parentPlugin> + <url>http://ftp.kysoh.com/</url> + <uuid>8349ed52-572d-4c3f-a7b8-f6d4a5ae2c0</uuid> + <version>0.0.5</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_8d692b92-6de4-1ddf-c42f-b1068569d9d4/help.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/help.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/help.wiki 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,28 @@ += Description = +The Skype Notifier gadget will make Tux Droid react to incoming Skype events : +* It allows to use Tux Droid to answer incoming Skype calls. +* Tux Droid will react to incoming emoticons in Skype chat. +* If a Skype contact uses "tux>" in Skype chat, followed by his message : Tux Droid will read the message using Text-To-Speech. + +If you are not familiar with Skype, you can find the software and information here: http://www.skype.com + +When you see a popup window with "Python.exe wants to use Skype" just click "Allow access". Also ensure that "TuxDroid-Audio" is configured for all audio devices in your Skype client configuration. + +The Skype Notifier gadget will only work if you have the Skype client already running and are logged in. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Activate the Skype Notifier :''' Enable to make Tux Droid control incoming Skype events. + += Using the remote control for incoming Skype calls = +* '''Ok button or green phone button :''' To answer the incoming call. +* '''Red phone button :''' To reject the incoming call. +* '''Ok button again or red phone button while calling :''' To end the ongoing call. + += Using Tux Droid for incoming Skype calls = +* '''Head button :''' To answer the incoming call. +* '''Left/right wing :''' To reject the incoming call. +* '''Head button again while calling :''' To end the ongoing call. + += Note = +The Skype Notifier gadget cannot be stopped from the TuxBox graphical interface. Quiting the gadget can be done with the head button on Tux or by using the "power off" button on the remote control. Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/nl.po =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/nl.po (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/nl.po 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,8 @@ +msgid "Skype Notifier" +msgstr "Skype Notificatie" + +msgid "Skype Notifier" +msgstr "Skype Notificatie" + +msgid "This plugin controls the Skype application" +msgstr "Deze gadget verwittigt je over binnenkomende Skype events." \ No newline at end of file Added: software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/nl.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/nl.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_8d692b92-6de4-1ddf-c42f-b1068569d9d4/nl.wiki 2010-01-08 11:04:20 UTC (rev 6040) @@ -0,0 +1,25 @@ += Beschrijving = +De Skype Notificatie gadget zal Tux Droid doen reageren op binnenkomende Skype events : +* Hiermee kan je Tux Droid gerbuiken bij binnenkomende Skype gesprekken. +* Tux Droid zal reageren op binnenkomende emoticons in je Skype chat. +* Als een Skype contact "tux>" gebruikt in Skype chat, gevolgd door zijn bericht : Tux Droid zal het bericht lezen via de spraaksynthese. + +Indien je nog nooit gehoord hebt van Skype dan kan je de software en meer info hier vinden: www.skype.com. Controleer ook of "TuxDroid-Audio" is geselecteerd voor alle geluidsapparaten in de Skype client instellingen. + +Als je een popup venster ziet met "Python.exe will Skype gebruiken", klik dan op "Toegang toestaan". + +De Skype gadget zal enkel werken als de Skype software gestart is en je ingelogd bent. + += Configuratie = +* '''Gadget naam :''' Hier kan je de naam van de gadget wijzigen. +* '''Activeer Skype Notificatie :''' Zet deze optie aan zodat Tux Droid binnenkomende Skype events kan controleren. + += Afstandsbediening gebruiken bij binnenkomende Skype gesprekken = +* '''Ok knop of knop met de groene telefoon :''' Om een binnenkomend Skype gesprek op te nemen. +* '''Knop met de rode telefoon :''' Om een binnenkomend Skype gesprek te weigeren. +* '''Ok knop opnieuw of de knop met de rode telefoon tijdens een gesprek :''' Om het Skype gesprek te beëindigen. + += Tux Droid gebruiken bij binnenkomende Skype gesprekken = +* '''Hoofd knop :''' Om een binnenkomend Skype gesprek op te nemen. +* '''Linker/rechter vleugel :''' Om een binnenkomend Skype gesprek te weigeren. +* '''Hoofd knop opnieuw tijdens een gesprek :''' Om het Skype gesprek te beëindigen. \ 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 2010-01-07 14:12:58 UTC (rev 6039) +++ software_suite_v3/software/gadget/default/trunk/names_to_uuids_list.txt 2010-01-08 11:04:20 UTC (rev 6040) @@ -1,6 +1,7 @@ Clock : 0a58d901-309a-dd6a-e6e7-be691858f9f0 Facebook : 2ba0fe92-c73f-61b5-50c5-d8de0aee9194 -Skype : 4e139371-e72a-5df7-c272-17d22f1fc258 +Skype : 8d692b92-6de4-1ddf-c42f-b1068569d9d4 +Skype : 69848cab-41c2-c81a-e018-84cf0adb25d3 Webradio : 5c5e7e0d-89c5-8799-3175-df2bddf5653c Twitter : 33b14aea-907e-9d9d-7e64-c40c3bbf56fb MSN : 56cdb050-3bba-d814-32c5-df4b90fee8c3 |
From: jerome <c2m...@c2...> - 2010-01-07 14:13:23
|
Author: jerome Date: 2010-01-07 15:12:58 +0100 (Thu, 07 Jan 2010) New Revision: 6039 Modified: software_suite_v3/software/plugin/plugin-skype/trunk/resources/en.po software_suite_v3/software/plugin/plugin-skype/trunk/resources/nl.po Log: * Fixed en and nl po files. Modified: software_suite_v3/software/plugin/plugin-skype/trunk/resources/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-skype/trunk/resources/en.po 2010-01-06 10:05:48 UTC (rev 6038) +++ software_suite_v3/software/plugin/plugin-skype/trunk/resources/en.po 2010-01-07 14:12:58 UTC (rev 6039) @@ -35,8 +35,8 @@ msgstr "Quit gadget" msgid "Please, login to your Skype account." -msgstr "Please, make sure Skype is running and you are logged in." +msgstr "Please, check if your Skype client is running and you are logged in." msgid "There had a problem with Skype Client, please, try later again." -msgstr "There had a problem with Skype Client, please, try later again." +msgstr "There was a problem with the Skype client. Please, try later again." Modified: software_suite_v3/software/plugin/plugin-skype/trunk/resources/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-skype/trunk/resources/nl.po 2010-01-06 10:05:48 UTC (rev 6038) +++ software_suite_v3/software/plugin/plugin-skype/trunk/resources/nl.po 2010-01-07 14:12:58 UTC (rev 6039) @@ -11,10 +11,10 @@ msgstr "Meld inkomende TTS berichten" msgid "Start Skype notifier" -msgstr "Start Skype verwittigingen" +msgstr "Start Skype notificatie" msgid "Activate the Skype notifier" -msgstr "Activeer Skype verwittigingen" +msgstr "Activeer Skype notificatie" msgid "I am currently in a conversation, please call me back later" msgstr "Ik ben op het ogenblik in gesprek, probeer later opnieuw" @@ -35,7 +35,7 @@ msgstr "Gadget afsluiten" msgid "Please, login to your Skype account." -msgstr "Gelieve te controleren of Skype gestart is en of je ingelogd bent." +msgstr "Gelieve Skype te starten en in te loggen. Probeer daarna opnieuw." msgid "There had a problem with Skype Client, please, try later again." -msgstr "Er is een probleem met je Skype software. Probeer later opnieuw" +msgstr "Er is een probleem met je Skype applicatie, probeer later opnieuw." |
From: jerome <c2m...@c2...> - 2010-01-06 10:06:08
|
Author: jerome Date: 2010-01-06 11:05:48 +0100 (Wed, 06 Jan 2010) New Revision: 6038 Added: software_suite_v3/software/plugin/plugin-skype/trunk/executables/EmoticonsToAttitunes.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/ software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNClient.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNServer.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNSimpleTest.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNStressTest.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/__init__.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/version.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPNCommands.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/communicator.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/connector.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/errors.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/tests/ software_suite_v3/software/plugin/plugin-skype/trunk/executables/tests/AsyncTests.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/tests/ConnectionTests.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/tests/SyncTests.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/utils.py software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Airplane.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Angel.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Angry.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Asleep.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Auto.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Beer.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Birthday.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Camera.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Cat.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Clock.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Coffee.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Computer.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Confused.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Crying.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Disappointed.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Dog.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Duh.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Dunno.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Eating.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Email.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Embarrassed.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Filmstrip.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Gasp.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Gift.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Happy.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Heart.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Hugging.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Idea.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Island.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Kiss.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Laughing.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Laughing2.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Laughing_evil.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Laughing_wild.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Lightning.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Martini.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Mobile.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Money.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Nerd.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Note.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Party.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Sad.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Secret.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Sheep.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Shh.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Sick.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Soccer.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Star.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Sticking_out_tongue.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Stormy.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Telephone.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Winky.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/Yeah.att software_suite_v3/software/plugin/plugin-skype/trunk/resources/attitunes/breaking.att Removed: software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNClient.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNServer.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNSimpleTest.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNStressTest.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/__init__.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/version.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/tests/AsyncTests.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/tests/ConnectionTests.py software_suite_v3/software/plugin/plugin-skype/trunk/executables/tests/SyncTests.py Modified: software_suite_v3/software/plugin/plugin-skype/trunk/ software_suite_v3/software/plugin/plugin-skype/trunk/executables/plugin-skype.py software_suite_v3/software/plugin/plugin-skype/trunk/resources/de.po software_suite_v3/software/plugin/plugin-skype/trunk/resources/en.po software_suite_v3/software/plugin/plugin-skype/trunk/resources/fr.po software_suite_v3/software/plugin/plugin-skype/trunk/resources/help.wiki software_suite_v3/software/plugin/plugin-skype/trunk/resources/nl.po software_suite_v3/software/plugin/plugin-skype/trunk/resources/nl.wiki software_suite_v3/software/plugin/plugin-skype/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugin-skype/trunk/resources/plugin.xml Log: * Merged trunk with in_out_plugin branch ( from rev 5915 to HEAD ). Property changes on: software_suite_v3/software/plugin/plugin-skype/trunk ___________________________________________________________________ Added: svn:mergeinfo + /software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin:5915-6037 Copied: software_suite_v3/software/plugin/plugin-skype/trunk/executables/EmoticonsToAttitunes.py (from rev 6037, software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/EmoticonsToAttitunes.py) =================================================================== --- software_suite_v3/software/plugin/plugin-skype/trunk/executables/EmoticonsToAttitunes.py (rev 0) +++ software_suite_v3/software/plugin/plugin-skype/trunk/executables/EmoticonsToAttitunes.py 2010-01-06 10:05:48 UTC (rev 6038) @@ -0,0 +1,109 @@ +# 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", + '(rofl)' : "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", + '(doh)' : "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", + '(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", + ':-*' : "msn_secret", + ':^)' : "msn_dunno", + '*-)' : "msn_dunno", + '(l)' : "msn_kiss", + ':*' : "msn_kiss", + '(inlove)' : "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", + ':[' : "msn_laughing_evil", + '(devil)' : "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", + '(beer)' : "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", + '(coffee)' : "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", +} Deleted: software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNClient.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/IPN/IPNClient.py 2010-01-06 09:56:29 UTC (rev 6037) +++ software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNClient.py 2010-01-06 10:05:48 UTC (rev 6038) @@ -1,357 +0,0 @@ -# -*- coding: utf-8 -*- - -import version -__author__ = version.author -__date__ = version.date -__version__ = version.version -__licence__ = version.licence -del version - -# Copyright (C) 2009 Kysoh Sa -# Remi Jocaille <rem...@ky...> -# Distributed under the terms of the GNU General Public License -# http://www.gnu.org/copyleft/gpl.html - -import socket -import threading -import time - -# ============================================================================== -# Public class -# ============================================================================== - -# ------------------------------------------------------------------------------ -# Interprocess Notifier Client Class. -# ------------------------------------------------------------------------------ -class IPNClient(object): - """Interprocess Notifier Client Class. - """ - - # -------------------------------------------------------------------------- - # Constructor. - # -------------------------------------------------------------------------- - def __init__(self, host = '127.0.0.1', port = 271): - """Constructor. - @param host: Host address of the server. - @param port: Host port of the server. - """ - self.__host = host - self.__port = port - self.__socket = None - self.__run = False - self.__runThread = None - self.__runMutex = threading.Lock() - self.__onNotification = None - self.__onConnected = None - self.__onDisconnected = None - self.__notifyThreadsList = [] - self.__ntlMutex = threading.Lock() - self.__id = "0" - self.__msgStack = IPNClientStack() - - # -------------------------------------------------------------------------- - # Get the indentifier of the client. - # -------------------------------------------------------------------------- - def getId(self): - """Get the indentifier of the client. - @return: The identifier if connected ortherwise '0' as string. - """ - return self.__id - - # -------------------------------------------------------------------------- - # Register a callback function to the "On notification" event. - # -------------------------------------------------------------------------- - def registerOnNotificationCallBack(self, funct): - """Register a callback function to the "On notification" event. - @param funct: Function pointer. The function must accept one parameter. - Example : - def onNotification(message): - print message - """ - self.__onNotification = funct - - # -------------------------------------------------------------------------- - # Register a callback function to the "On connected" event. - # -------------------------------------------------------------------------- - def registerOnConnectedCallBack(self, funct): - """Register a callback function to the "On connected" event. - @param funct: Function pointer. The function must accept one parameter. - Example : - def onConnected(identifier): - print "Client connected with identifier :", identifier - """ - self.__onConnected = funct - - # -------------------------------------------------------------------------- - # - # -------------------------------------------------------------------------- - def registerOnDisconnectedCallBack(self, funct): - """Register a callback function to the "On disconnected" event. - @param funct: Function pointer. - Example : - def onDisconnected(): - print "Client disconnected" - """ - self.__onDisconnected = funct - - # -------------------------------------------------------------------------- - # Start the client. - # -------------------------------------------------------------------------- - def start(self): - """Start the client. - @return: The success of the client start. - """ - # Exit the function if the client is already started - if self.__getRun(): - return True - # Create the client socket - self.__socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - # Set the socket to blocking mode before to connect it to the server - self.__socket.setblocking(1) - try: - # Connect the client to the server - self.__socket.connect((self.__host, self.__port)) - # Read my client identifier - self.__id = self.__socket.recv(128).split('\n')[0] - except socket.timeout: - self.__setRun(False) - self.__socket.setblocking(0) - # Failed to connect the client to the server - return False - except socket.error: - self.__setRun(False) - self.__socket.setblocking(0) - # Failed to connect the client to the server - return False - # Set the socket to unblocking mode - self.__socket.setblocking(0) - # Set the socket timeout to 100 msec - self.__socket.settimeout(0.1) - # Call the "On connected" event - if self.__onConnected != None: - self.__onConnected(self.__id) - # Start the message listening loop - self.__runThread = threading.Thread(target = self.__runLoop) - self.__runThread.start() - time.sleep(0.1) - # The client is successfuly connected to the server - return True - - # -------------------------------------------------------------------------- - # Stop the client. - # -------------------------------------------------------------------------- - def stop(self): - """Stop the client. - """ - # Exit the function is the client is not started - if not self.__getRun(): - return - # Stop the message listening loop - self.__setRun(False) - # Ensure that the thread of the message listening loop has been closed - if self.__runThread.isAlive(): - if not self.__runThread.join(5.0): - self.__runThread._Thread__stop() - # Ensure that the notifications thread has been closed. - self.__stopNotifyThreadList() - - # -------------------------------------------------------------------------- - # Notify a message to the server. - # -------------------------------------------------------------------------- - def notify(self, message): - """Notify a message to the server. - """ - # Exit the function is the client is not started - if not self.__getRun(): - return - # Regularize the message length (0 > correct size < 124) - if len(message) > 123: - message = message[:122] - self.__msgStack.push(message) - - # -------------------------------------------------------------------------- - # Add thread in the threaded messages list. - # -------------------------------------------------------------------------- - def __addNotifyThread(self, thread): - """Add thread in the threaded messages list. - @param thread: Thread to be added. - """ - self.__ntlMutex.acquire() - self.__notifyThreadsList.append(thread) - self.__ntlMutex.release() - - # -------------------------------------------------------------------------- - # Wait that the client has stopped. - # -------------------------------------------------------------------------- - def waitStop(self): - """Wait that the client has stopped. - """ - while self.__getRun(): - time.sleep(0.5) - time.sleep(0.5) - - # -------------------------------------------------------------------------- - # Clean the closed thread from the threaded messages list. - # -------------------------------------------------------------------------- - def __cleanNotifyThreadList(self): - """Clean the closed thread from the threaded messages list in order to - avoiding a memory leak issue. - """ - self.__ntlMutex.acquire() - newLst = [] - for t in self.__notifyThreadsList: - if t.isAlive(): - newLst.append(t) - self.__notifyThreadsList = newLst - self.__ntlMutex.release() - - # -------------------------------------------------------------------------- - # Stop all threads from the threaded messages list. - # -------------------------------------------------------------------------- - def __stopNotifyThreadList(self): - """Stop all threads from the threaded messages list. - """ - self.__ntlMutex.acquire() - for t in self.__notifyThreadsList: - if t.isAlive(): - # Wait for a hypothetical self closing of the thread - try: - if not t.join(0.1): - # Otherwise, kill it - t._Thread__stop() - except ( AssertionError, RuntimeError ): - t._Thread__stop() - self.__ntlMutex.release() - - # -------------------------------------------------------------------------- - # Get the connection state of the client. - # -------------------------------------------------------------------------- - def __getRun(self): - """Get the connection state of the client. - @return: True or False. - """ - self.__runMutex.acquire() - result = self.__run - self.__runMutex.release() - return result - - # -------------------------------------------------------------------------- - # Set the connection state of the client. - # -------------------------------------------------------------------------- - def __setRun(self, value = True): - """Set the connection state of the client. - @param value: New value (True or False) - """ - self.__runMutex.acquire() - self.__run = value - self.__runMutex.release() - - # -------------------------------------------------------------------------- - # Loop listening message. - # -------------------------------------------------------------------------- - def __runLoop(self): - """Loop listening message. - """ - self.__setRun(True) - while self.__getRun(): - # Remove the closed threads from the threads list (garbage cleaning) - self.__cleanNotifyThreadList() - try: - # Wait a message from the server. (timeout at 100msec, defined - # in the function "start()") - data = self.__socket.recv(128) - # Extract the message from the frame - data = data.split('\n')[0] - # If the message is valid - if len(data) != 0: - # It's a PING - if data == "PING": - # Responding to the server - self.__socket.send("PONG") - time.sleep(0.01) - continue - # It's a notification request message - elif data == "GETNOTIFICATION": - # Responding to the server - message = self.__msgStack.pop() - if message == None: - self.__socket.send("PONG") - else: - self.__socket.send("RET:%s" % message) - time.sleep(0.01) - continue - # It's a notification message - else: - if self.__onNotification != None: - # Call the "On notification" event through a thread - # Store the thread in the threads list in order to - # stop all threads at the client closure - t = threading.Thread(target = self.__onNotification, - args = (data,)) - self.__addNotifyThread(t) - t.start() - time.sleep(0.01) - continue - except socket.timeout: - time.sleep(0.01) - # No message from the server ... - continue - except socket.error: - time.sleep(0.01) - # Server connection was broken, exit the loop ! - break - except: - time.sleep(0.01) - # Unexpected error, should never happen ... - continue - # The client must be disconnected - try: - self.__socket.close() - except: - pass - # Call the "On disconnected" event and reset the client identifier - if self.__id != "0": - if self.__onDisconnected != None: - self.__onDisconnected() - self.__id = "0" - -# ------------------------------------------------------------------------------ -# Interprocess Notifier Client Stack Class. -# ------------------------------------------------------------------------------ -class IPNClientStack(object): - """Interprocess Notifier Client Stack Class. - """ - - # -------------------------------------------------------------------------- - # Constructor. - # -------------------------------------------------------------------------- - def __init__(self): - """Constructor. - """ - self.__stack = [] - self.__mutex = threading.Lock() - - # -------------------------------------------------------------------------- - # Push a message to the stack. - # -------------------------------------------------------------------------- - def push(self, message): - """Push a message to the stack. - @param message: Message to push. - """ - self.__mutex.acquire() - self.__stack.insert(len(self.__stack), message) - self.__mutex.release() - - # -------------------------------------------------------------------------- - # Pop a message from the stack. - # -------------------------------------------------------------------------- - def pop(self): - """Pop a message from the stack. - @return: A message or None. - """ - result = None - self.__mutex.acquire() - if len(self.__stack) > 0: - result = self.__stack.pop(0) - self.__mutex.release() - return result Copied: software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNClient.py (from rev 6037, software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/IPN/IPNClient.py) =================================================================== --- software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNClient.py (rev 0) +++ software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNClient.py 2010-01-06 10:05:48 UTC (rev 6038) @@ -0,0 +1,357 @@ +# -*- coding: utf-8 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyright (C) 2009 Kysoh Sa +# Remi Jocaille <rem...@ky...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +import socket +import threading +import time + +# ============================================================================== +# Public class +# ============================================================================== + +# ------------------------------------------------------------------------------ +# Interprocess Notifier Client Class. +# ------------------------------------------------------------------------------ +class IPNClient(object): + """Interprocess Notifier Client Class. + """ + + # -------------------------------------------------------------------------- + # Constructor. + # -------------------------------------------------------------------------- + def __init__(self, host = '127.0.0.1', port = 271): + """Constructor. + @param host: Host address of the server. + @param port: Host port of the server. + """ + self.__host = host + self.__port = port + self.__socket = None + self.__run = False + self.__runThread = None + self.__runMutex = threading.Lock() + self.__onNotification = None + self.__onConnected = None + self.__onDisconnected = None + self.__notifyThreadsList = [] + self.__ntlMutex = threading.Lock() + self.__id = "0" + self.__msgStack = IPNClientStack() + + # -------------------------------------------------------------------------- + # Get the indentifier of the client. + # -------------------------------------------------------------------------- + def getId(self): + """Get the indentifier of the client. + @return: The identifier if connected ortherwise '0' as string. + """ + return self.__id + + # -------------------------------------------------------------------------- + # Register a callback function to the "On notification" event. + # -------------------------------------------------------------------------- + def registerOnNotificationCallBack(self, funct): + """Register a callback function to the "On notification" event. + @param funct: Function pointer. The function must accept one parameter. + Example : + def onNotification(message): + print message + """ + self.__onNotification = funct + + # -------------------------------------------------------------------------- + # Register a callback function to the "On connected" event. + # -------------------------------------------------------------------------- + def registerOnConnectedCallBack(self, funct): + """Register a callback function to the "On connected" event. + @param funct: Function pointer. The function must accept one parameter. + Example : + def onConnected(identifier): + print "Client connected with identifier :", identifier + """ + self.__onConnected = funct + + # -------------------------------------------------------------------------- + # + # -------------------------------------------------------------------------- + def registerOnDisconnectedCallBack(self, funct): + """Register a callback function to the "On disconnected" event. + @param funct: Function pointer. + Example : + def onDisconnected(): + print "Client disconnected" + """ + self.__onDisconnected = funct + + # -------------------------------------------------------------------------- + # Start the client. + # -------------------------------------------------------------------------- + def start(self): + """Start the client. + @return: The success of the client start. + """ + # Exit the function if the client is already started + if self.__getRun(): + return True + # Create the client socket + self.__socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + # Set the socket to blocking mode before to connect it to the server + self.__socket.setblocking(1) + try: + # Connect the client to the server + self.__socket.connect((self.__host, self.__port)) + # Read my client identifier + self.__id = self.__socket.recv(128).split('\n')[0] + except socket.timeout: + self.__setRun(False) + self.__socket.setblocking(0) + # Failed to connect the client to the server + return False + except socket.error: + self.__setRun(False) + self.__socket.setblocking(0) + # Failed to connect the client to the server + return False + # Set the socket to unblocking mode + self.__socket.setblocking(0) + # Set the socket timeout to 100 msec + self.__socket.settimeout(0.1) + # Call the "On connected" event + if self.__onConnected != None: + self.__onConnected(self.__id) + # Start the message listening loop + self.__runThread = threading.Thread(target = self.__runLoop) + self.__runThread.start() + time.sleep(0.1) + # The client is successfuly connected to the server + return True + + # -------------------------------------------------------------------------- + # Stop the client. + # -------------------------------------------------------------------------- + def stop(self): + """Stop the client. + """ + # Exit the function is the client is not started + if not self.__getRun(): + return + # Stop the message listening loop + self.__setRun(False) + # Ensure that the thread of the message listening loop has been closed + if self.__runThread.isAlive(): + if not self.__runThread.join(5.0): + self.__runThread._Thread__stop() + # Ensure that the notifications thread has been closed. + self.__stopNotifyThreadList() + + # -------------------------------------------------------------------------- + # Notify a message to the server. + # -------------------------------------------------------------------------- + def notify(self, message): + """Notify a message to the server. + """ + # Exit the function is the client is not started + if not self.__getRun(): + return + # Regularize the message length (0 > correct size < 124) + if len(message) > 123: + message = message[:122] + self.__msgStack.push(message) + + # -------------------------------------------------------------------------- + # Add thread in the threaded messages list. + # -------------------------------------------------------------------------- + def __addNotifyThread(self, thread): + """Add thread in the threaded messages list. + @param thread: Thread to be added. + """ + self.__ntlMutex.acquire() + self.__notifyThreadsList.append(thread) + self.__ntlMutex.release() + + # -------------------------------------------------------------------------- + # Wait that the client has stopped. + # -------------------------------------------------------------------------- + def waitStop(self): + """Wait that the client has stopped. + """ + while self.__getRun(): + time.sleep(0.5) + time.sleep(0.5) + + # -------------------------------------------------------------------------- + # Clean the closed thread from the threaded messages list. + # -------------------------------------------------------------------------- + def __cleanNotifyThreadList(self): + """Clean the closed thread from the threaded messages list in order to + avoiding a memory leak issue. + """ + self.__ntlMutex.acquire() + newLst = [] + for t in self.__notifyThreadsList: + if t.isAlive(): + newLst.append(t) + self.__notifyThreadsList = newLst + self.__ntlMutex.release() + + # -------------------------------------------------------------------------- + # Stop all threads from the threaded messages list. + # -------------------------------------------------------------------------- + def __stopNotifyThreadList(self): + """Stop all threads from the threaded messages list. + """ + self.__ntlMutex.acquire() + for t in self.__notifyThreadsList: + if t.isAlive(): + # Wait for a hypothetical self closing of the thread + try: + if not t.join(0.1): + # Otherwise, kill it + t._Thread__stop() + except ( AssertionError, RuntimeError ): + t._Thread__stop() + self.__ntlMutex.release() + + # -------------------------------------------------------------------------- + # Get the connection state of the client. + # -------------------------------------------------------------------------- + def __getRun(self): + """Get the connection state of the client. + @return: True or False. + """ + self.__runMutex.acquire() + result = self.__run + self.__runMutex.release() + return result + + # -------------------------------------------------------------------------- + # Set the connection state of the client. + # -------------------------------------------------------------------------- + def __setRun(self, value = True): + """Set the connection state of the client. + @param value: New value (True or False) + """ + self.__runMutex.acquire() + self.__run = value + self.__runMutex.release() + + # -------------------------------------------------------------------------- + # Loop listening message. + # -------------------------------------------------------------------------- + def __runLoop(self): + """Loop listening message. + """ + self.__setRun(True) + while self.__getRun(): + # Remove the closed threads from the threads list (garbage cleaning) + self.__cleanNotifyThreadList() + try: + # Wait a message from the server. (timeout at 100msec, defined + # in the function "start()") + data = self.__socket.recv(128) + # Extract the message from the frame + data = data.split('\n')[0] + # If the message is valid + if len(data) != 0: + # It's a PING + if data == "PING": + # Responding to the server + self.__socket.send("PONG") + time.sleep(0.01) + continue + # It's a notification request message + elif data == "GETNOTIFICATION": + # Responding to the server + message = self.__msgStack.pop() + if message == None: + self.__socket.send("PONG") + else: + self.__socket.send("RET:%s" % message) + time.sleep(0.01) + continue + # It's a notification message + else: + if self.__onNotification != None: + # Call the "On notification" event through a thread + # Store the thread in the threads list in order to + # stop all threads at the client closure + t = threading.Thread(target = self.__onNotification, + args = (data,)) + self.__addNotifyThread(t) + t.start() + time.sleep(0.01) + continue + except socket.timeout: + time.sleep(0.01) + # No message from the server ... + continue + except socket.error: + time.sleep(0.01) + # Server connection was broken, exit the loop ! + break + except: + time.sleep(0.01) + # Unexpected error, should never happen ... + continue + # The client must be disconnected + try: + self.__socket.close() + except: + pass + # Call the "On disconnected" event and reset the client identifier + if self.__id != "0": + if self.__onDisconnected != None: + self.__onDisconnected() + self.__id = "0" + +# ------------------------------------------------------------------------------ +# Interprocess Notifier Client Stack Class. +# ------------------------------------------------------------------------------ +class IPNClientStack(object): + """Interprocess Notifier Client Stack Class. + """ + + # -------------------------------------------------------------------------- + # Constructor. + # -------------------------------------------------------------------------- + def __init__(self): + """Constructor. + """ + self.__stack = [] + self.__mutex = threading.Lock() + + # -------------------------------------------------------------------------- + # Push a message to the stack. + # -------------------------------------------------------------------------- + def push(self, message): + """Push a message to the stack. + @param message: Message to push. + """ + self.__mutex.acquire() + self.__stack.insert(len(self.__stack), message) + self.__mutex.release() + + # -------------------------------------------------------------------------- + # Pop a message from the stack. + # -------------------------------------------------------------------------- + def pop(self): + """Pop a message from the stack. + @return: A message or None. + """ + result = None + self.__mutex.acquire() + if len(self.__stack) > 0: + result = self.__stack.pop(0) + self.__mutex.release() + return result Deleted: software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNServer.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/IPN/IPNServer.py 2010-01-06 09:56:29 UTC (rev 6037) +++ software_suite_v3/software/plugin/plugin-skype/trunk/executables/IPN/IPNServer.py 2010-01-06 10:05:48 UTC (rev 6038) @@ -1,490 +0,0 @@ -# -*- coding: utf-8 -*- - -import version -__author__ = version.author -__date__ = version.date -__version__ = version.version -__licence__ = version.licence -del version - -# Copyright (C) 2009 Kysoh Sa -# Remi Jocaille <rem...@ky...> -# Distributed under the terms of the GNU General Public License -# http://www.gnu.org/copyleft/gpl.html - -import socket -import threading -import time - -try: - from hashlib import md5 -except: - from md5 import md5 - -#from tuxisalive.lib.logger import * - -# Formated PING command -_PING_CMD = "PING\n" + "".join(" " * 123) -# Formated GETNOTIFICATION command -_GETNOTIFICATION_CMD = "GETNOTIFICATION\n" + "".join(" " * 112) - -# ============================================================================== -# Public class -# ============================================================================== - -# ------------------------------------------------------------------------------ -# Interprocess Notifier Server Class. -# ------------------------------------------------------------------------------ -class IPNServer(object): - """Interprocess Notifier Server Class. - """ - - # -------------------------------------------------------------------------- - # Constructor. - # -------------------------------------------------------------------------- - def __init__(self, host = '127.0.0.1', port = 271): - """Constructor. - @param host: Host IP to listen. - Example : '127.0.0.1' for local loop only. - Example : '192.168.0.1' for local network only. - Example : '' for internet access. - @param port: TCP port to listen. - """ - self.__cliLst = [] - self.__cliMutex = threading.Lock() - self.__socket = None - self.__host = host - self.__port = port - self.__runLst = False - self.__runLstThread = None - self.__runLstMutex = threading.Lock() - self.__runPing = False - self.__runPingThread = None - self.__runPingMutex = threading.Lock() - self.__notifyThreadsList = [] - self.__ntlMutex = threading.Lock() - self.__onClientAdded = None - self.__onClientRemoved = None - self.__onClientNotification = None - - # -------------------------------------------------------------------------- - # Register a callback function to the "On client added" event. - # -------------------------------------------------------------------------- - def registerOnClientAddedCallBack(self, funct): - """Register a callback function to the "On client added" event. - @param funct: Function pointer. The function must accept one parameter. - Example : - def onClientAdded(idClient): - print idClient - """ - self.__onClientAdded = funct - - # -------------------------------------------------------------------------- - # Register a callback function to the "On client removed" event. - # -------------------------------------------------------------------------- - def registerOnClientRemovedCallBack(self, funct): - """Register a callback function to the "On client removed" event. - @param funct: Function pointer. The function must accept one parameter. - Example : - def onClientRemoved(idClient): - print idClient - """ - self.__onClientRemoved = funct - - # -------------------------------------------------------------------------- - # Register a callback function to the "On client notification" event. - # -------------------------------------------------------------------------- - def registerOnClientNotificationCallBack(self, funct): - """Register a callback function to the "On client notification" event. - @param funct: Function pointer. The function must accept one parameter. - Example : - def onClientNotification(idClient, message): - print idClient - """ - self.__onClientNotification = funct - - # -------------------------------------------------------------------------- - # Check if a client exists. - # -------------------------------------------------------------------------- - def clientExists(self, id): - """Check if a client exists. - @param id: Id client. - @return: True or False. - """ - self.__cliMutex.acquire() - result = False - for cli in self.__cliLst: - if cli['id'] == id: - result = True - break - self.__cliMutex.release() - return result - - # -------------------------------------------------------------------------- - # Check if there have at least one connected client. - # -------------------------------------------------------------------------- - def hasClient(self): - '''Check if there have at least one connected client. - ''' - self.__cliMutex.acquire() - hasClient = 0 - try: - hasClient = len(self.__cliLst) > 0 - except: - pass - self.__cliMutex.release() - return hasClient - - # -------------------------------------------------------------------------- - # Start the server. - # -------------------------------------------------------------------------- - def start(self): - """Start the server. - @return: The success of the server start. True or False. - """ - # Exit the function if the server is already started - if self.__getRunLst(): - return True - # Create the server socket - self.__socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - try: - # Bind the socket - self.__socket.bind((self.__host, self.__port)) - # Set the socket to listen mode - self.__socket.listen(50) - #Run the listen loop and the ping loop - self.__runLstThread = threading.Thread(target = self.__listenLoop) - self.__runLstThread.start() - self.__runPingThread = threading.Thread(target = self.__pingLoop) - self.__runPingThread.start() - time.sleep(0.1) - # Server successfuly started - return True - except socket.timeout: - self.__setRunLst(False) - # Failed to start the server - return False - except socket.error: - self.__setRunLst(False) - # Failed to start the server - return False - except: - self.__setRunLst(False) - # Failed to start the server - return False - - # -------------------------------------------------------------------------- - # Stop the server. - # -------------------------------------------------------------------------- - def stop(self): - """Stop the server. - """ - # If the server don't runs then exit the function - if not self.__getRunLst(): - return - # Stop the listen loop - self.__setRunLst(False) - # Stop the ping loop - self.__setRunPing(False) - # Close the server socket - self.__socket.close() - time.sleep(0.1) - # Ensure that the threads have been stopped - if self.__runLstThread.isAlive(): - self.__runLstThread._Thread__stop() - if self.__runPingThread.isAlive(): - self.__runPingThread.join() - self.__stopNotifyThreadList() - # Clear the clients list - self.__clearClients() - - # -------------------------------------------------------------------------- - # Wait that the server has stopped. - # -------------------------------------------------------------------------- - def waitStop(self): - """Wait that the server has stopped. - """ - while self.__getRunLst(): - time.sleep(0.5) - time.sleep(0.5) - - # -------------------------------------------------------------------------- - # Add thread in the threaded messages list. - # -------------------------------------------------------------------------- - def __addNotifyThread(self, thread): - """Add thread in the threaded messages list. - @param thread: Thread to be added. - """ - self.__ntlMutex.acquire() - self.__notifyThreadsList.append(thread) - self.__ntlMutex.release() - - # -------------------------------------------------------------------------- - # Clean the closed thread from the threaded messages list. - # -------------------------------------------------------------------------- - def __cleanNotifyThreadList(self): - """Clean the closed thread from the threaded messages list in order to - avoiding a memory leak issue. - """ - self.__ntlMutex.acquire() - newLst = [] - for t in self.__notifyThreadsList: - if t.isAlive(): - newLst.append(t) - self.__notifyThreadsList = newLst - self.__ntlMutex.release() - - # -------------------------------------------------------------------------- - # Stop all threads from the threaded messages list. - # -------------------------------------------------------------------------- - def __stopNotifyThreadList(self): - """Stop all threads from the threaded messages list. - """ - self.__ntlMutex.acquire() - for t in self.__notifyThreadsList: - if t.isAlive(): - # Wait for a hypothetical self closing of the thread - if not t.join(0.1): - # Otherwise, kill it - t._Thread__stop() - self.__ntlMutex.release() - - # -------------------------------------------------------------------------- - # Get the state of the listening loop. - # -------------------------------------------------------------------------- - def __getRunLst(self): - """Get the state of the listening loop. - @return: True or False. - """ - self.__runLstMutex.acquire() - result = self.__runLst - self.__runLstMutex.release() - return result - - # -------------------------------------------------------------------------- - # Set the state of the listening loop. - # -------------------------------------------------------------------------- - def __setRunLst(self, value = True): - """Set the state of the listening loop. - @param value: New value (True or False) - """ - self.__runLstMutex.acquire() - self.__runLst = value - self.__runLstMutex.release() - - # -------------------------------------------------------------------------- - # Get the state of the ping loop. - # -------------------------------------------------------------------------- - def __getRunPing(self): - """Get the state of the ping loop. - @return: True or False. - """ - self.__runPingMutex.acquire() - result = self.__runPing - self.__runPingMutex.release() - return result - - # -------------------------------------------------------------------------- - # Set the state of the ping loop. - # -------------------------------------------------------------------------- - def __setRunPing(self, value = True): - """Set the state of the ping loop. - @param value: New value (True or False) - """ - self.__runPingMutex.acquire() - self.__runPing = value - self.__runPingMutex.release() - - # -------------------------------------------------------------------------- - # Add a new client in the clients list. - # -------------------------------------------------------------------------- - def __addClient(self, connection, address): - """Add a new client in the clients list. - @param connection: Client socket. - @param address: Client address. - """ - self.__cliMutex.acquire() - # Create a md5 hash of the socket address in order to make an unique - # identifier for the client. - md5H = md5() - md5H.update(str(address[0]) + str(address[1])) - id = md5H.hexdigest() - # Create a dictionary for the client configuration - cliConf = { - 'connection' : connection, - 'address' : address, - 'id' : id, - } - # Add the client to the list - self.__cliLst.append(cliConf) - # Create a 128 bytes length string with the id client. - idToSend = id + "\n" + "".join(" " * (127 - len(id))) - try: - # Send the identifer to the client - connection.send(idToSend) - except: - pass - self.__cliMutex.release() - # Call the "On client added" event - if self.__onClientAdded != None: - self.__onClientAdded(id) - - # -------------------------------------------------------------------------- - # Remove a client from the clients list. - # -------------------------------------------------------------------------- - def __removeClient(self, address): - """Remove a client from the clients list. - @param address: Client address. - """ - self.__cliMutex.acquire() - removedId = None - # Search the client address in the registered clients - for cli in self.__cliLst: - if cli['address'] == address: - cli['connection'].close() - self.__cliLst.remove(cli) - removedId = cli['id'] - break - self.__cliMutex.release() - # If the client has been removed then call the "On client removed" event - if removedId != None: - if self.__onClientRemoved != None: - self.__onClientRemoved(removedId) - - # -------------------------------------------------------------------------- - # Clear the clients list. - # -------------------------------------------------------------------------- - def __clearClients(self): - """Clear the clients list. - """ - self.__cliMutex.acquire() - self.__cliLst = [] - self.__cliMutex.release() - - # -------------------------------------------------------------------------- - # Socket listening loop. - # -------------------------------------------------------------------------- - def __listenLoop(self): - """Socket listening loop. - """ - self.__setRunLst(True) - while self.__getRunLst(): - try: - # Wait for a new client connection. This function is blocking - # the loop. The parent loop must be killed. - connection, address = self.__socket.accept() - # If the client socket is valid then add it to the clients list - if (connection != None) and (address != None): - self.__addClient(connection, address) - except: - pass - - # -------------------------------------------------------------------------- - # Ping loop. - # -------------------------------------------------------------------------- - def __pingLoop(self): - """Ping loop. - """ - self.__setRunPing(True) - while self.__getRunPing(): - aClientHasRemoved = False - self.__cliMutex.acquire() - # Ping all clients - for cli in self.__cliLst: - try: - # Send the PING command - cli['connection'].send(_PING_CMD) - # Read the client response - data = cli['connection'].recv(128) - except: - self.__cliMutex.release() - # If an error occuring during the client ping then remove it - # from the clients list - self.__removeClient(cli['address']) - aClientHasRemoved = True - self.__cliMutex.acquire() - break - if data != "PONG": - self.__cliMutex.release() - # If the client response is invalid then remove it from the - # clients list - self.__removeClient(cli['address']) - aClientHasRemoved = True - self.__cliMutex.acquire() - break - self.__cliMutex.release() - if aClientHasRemoved: - continue - # Read clients notifications (20x). - for i in range(20): - if not self.__getRunPing(): - break - # Remove the closed threads from the threads list - # (garbage cleaning) - self.__cleanNotifyThreadList() - self.__cliMutex.acquire() - for cli in self.__cliLst: - try: - # Send the GETNOTIFICATION command - cli['connection'].send(_GETNOTIFICATION_CMD) - # Read the client response - data = cli['connection'].recv(128) - except: - self.__cliMutex.release() - # If an error occuring during the client ping then remove it - # from the clients list - self.__removeClient(cli['addr... [truncated message content] |
From: jerome <c2m...@c2...> - 2010-01-06 09:56:42
|
Author: jerome Date: 2010-01-06 10:56:29 +0100 (Wed, 06 Jan 2010) New Revision: 6037 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 0.0.4 to 0.0.5 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 2010-01-06 09:48:33 UTC (rev 6036) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2010-01-06 09:56:29 UTC (rev 6037) @@ -22,7 +22,7 @@ __author__ = "Conan Jerome" __appname__ = "Python skype plugin" -__version__ = "0.0.4" +__version__ = "0.0.5" __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 2010-01-06 09:48:33 UTC (rev 6036) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml 2010-01-06 09:56:29 UTC (rev 6037) @@ -8,7 +8,7 @@ <ttsName>Plugin skype</ttsName> <description>This plugin controls skype application</description> <author>Jérôme Conan</author> - <version>0.0.4</version> + <version>0.0.5</version> <iconFile>resources/icon.png</iconFile> <uuid>8349ed52-572d-4c3f-a7b8-f6d4a5ae2c0</uuid> <platform>all</platform> |
From: jerome <c2m...@c2...> - 2010-01-06 09:48:46
|
Author: jerome Date: 2010-01-06 10:48:33 +0100 (Wed, 06 Jan 2010) New Revision: 6036 Added: software_suite_v3/software/plugin/plugin-skype/tags/0.0.4/ Log: * Tagged 0.0.4 version. |
From: jerome <c2m...@c2...> - 2010-01-05 14:22:33
|
Author: jerome Date: 2010-01-05 15:22:06 +0100 (Tue, 05 Jan 2010) New Revision: 6035 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/en.po software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/fr.po software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/nl.po Log: * Latest po fix. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/en.po 2010-01-05 12:24:59 UTC (rev 6034) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/en.po 2010-01-05 14:22:06 UTC (rev 6035) @@ -35,7 +35,7 @@ msgstr "Quit gadget" msgid "Please, login to your Skype account." -msgstr "Please, login to your Skype account." +msgstr "Please, make sure Skype is running and you are logged in." msgid "There had a problem with Skype Client, please, try later again." msgstr "There had a problem with Skype Client, please, try later again." Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/fr.po 2010-01-05 12:24:59 UTC (rev 6034) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/fr.po 2010-01-05 14:22:06 UTC (rev 6035) @@ -35,7 +35,7 @@ msgstr "Quitter le gadget" msgid "Please, login to your Skype account." -msgstr "S'il vous plait, connectez vous à votre compte Skype." +msgstr "S'il vous plait, assurez vous que Skype est démarré et que vous êtes connecté." msgid "There had a problem with Skype Client, please, try later again." msgstr "Il y a eu un problème avec le client Skype, s'il vous plait, essayez plus tard." Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/nl.po 2010-01-05 12:24:59 UTC (rev 6034) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/nl.po 2010-01-05 14:22:06 UTC (rev 6035) @@ -35,7 +35,7 @@ msgstr "Gadget afsluiten" msgid "Please, login to your Skype account." -msgstr "" +msgstr "Gelieve te controleren of Skype gestart is en of je ingelogd bent." msgid "There had a problem with Skype Client, please, try later again." -msgstr "" +msgstr "Er is een probleem met je Skype software. Probeer later opnieuw" |
From: jerome <c2m...@c2...> - 2010-01-05 12:45:02
|
Author: jerome Date: 2010-01-05 13:24:59 +0100 (Tue, 05 Jan 2010) New Revision: 6034 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/de.po software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/en.po software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/fr.po software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/nl.po software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.pot software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml Log: * Fixed po files. * Start the daemon if notifier gadget is not in alerts list and user make use of skype outgoing. 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 2010-01-05 10:02:36 UTC (rev 6033) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/plugin-skype.py 2010-01-05 12:24:59 UTC (rev 6034) @@ -168,6 +168,7 @@ if self.getCommand() == 'check': self.serv.stop() if self.getCommand() == 'run': + self.throwNotification("start") self.throwActuation("downFlippers") self.throwActuation("closeMouth") @@ -187,9 +188,21 @@ ''' self.client = IPNClient('127.0.0.1', 48536) self.client.registerOnNotificationCallBack(self.ClientOnNotification) - self.client.start() + connected = self.client.start() + + if not connected: + #IPN server not started, so the daemon plugin is not started. + request = '/plugins_server/start_plugin?command=check&uuid='+ self.uuid +'¶meters=' + thread = threading.Thread(target=TuxDroidServerUtils.sendRequest, args=("127.0.0.1", self.port, request)) + thread.start() + time.sleep(1.0) + + while 1: + if self.client.start(): + break + time.sleep(1.0) + - def stopTTS(self): '''Stop the tts. ''' @@ -553,6 +566,7 @@ ''' Server IPN callback when IPN client is added. ''' + self.throwTrace("client added") #First action, sending command to the plugin client. if self.isIncoming: #Then it's an incoming call. @@ -564,9 +578,14 @@ #Wait tts ends. time.sleep(5.0) self.serv.notify(END) - if self.initialized: - #Then interface outgoing call. - self.serv.notify(COMMAND_OUTGOING_USER) + + #Waiting for daemon initialization. + if not self.initialized: + while not self.initialized: + time.sleep(1.0) + + #Then interface outgoing call. + self.serv.notify(COMMAND_OUTGOING_USER) else: #Then user uses TuxBox to make a call. Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/de.po =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/de.po 2010-01-05 10:02:36 UTC (rev 6033) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/de.po 2010-01-05 12:24:59 UTC (rev 6034) @@ -33,7 +33,8 @@ msgid "Quit gadget" msgstr "Beenden die Kadchet." -msgid "Please, login to your Skype account or push my head button to quit gadget" + +msgid "Please, login to your Skype account." msgstr "" msgid "There had a problem with Skype Client, please, try later again." Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/en.po 2010-01-05 10:02:36 UTC (rev 6033) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/en.po 2010-01-05 12:24:59 UTC (rev 6034) @@ -34,8 +34,8 @@ msgid "Quit gadget" msgstr "Quit gadget" -msgid "Please, login to your Skype account or push my head button to quit gadget" -msgstr "Please, login to your Skype account or push my head button to quit gadget" +msgid "Please, login to your Skype account." +msgstr "Please, login to your Skype account." msgid "There had a problem with Skype Client, please, try later again." msgstr "There had a problem with Skype Client, please, try later again." Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/fr.po 2010-01-05 10:02:36 UTC (rev 6033) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/fr.po 2010-01-05 12:24:59 UTC (rev 6034) @@ -34,8 +34,8 @@ msgid "Quit gadget" msgstr "Quitter le gadget" -msgid "Please, login to your Skype account or push my head button to quit gadget" -msgstr "S'il vou plait, connectez vous à votre compte Skype ou appyez sur mon bouton de tête pour quitter le gadget" +msgid "Please, login to your Skype account." +msgstr "S'il vous plait, connectez vous à votre compte Skype." msgid "There had a problem with Skype Client, please, try later again." msgstr "Il y a eu un problème avec le client Skype, s'il vous plait, essayez plus tard." Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/nl.po 2010-01-05 10:02:36 UTC (rev 6033) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/nl.po 2010-01-05 12:24:59 UTC (rev 6034) @@ -34,7 +34,7 @@ msgid "Quit gadget" msgstr "Gadget afsluiten" -msgid "Please, login to your Skype account or push my head button to quit gadget" +msgid "Please, login to your Skype account." msgstr "" msgid "There had a problem with Skype Client, please, try later again." Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.pot 2010-01-05 10:02:36 UTC (rev 6033) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.pot 2010-01-05 12:24:59 UTC (rev 6034) @@ -34,7 +34,7 @@ msgid "Quit gadget" msgstr "" -msgid "Please, login to your Skype account or push my head button to quit gadget" +msgid "Please, login to your Skype account." msgstr "" msgid "There had a problem with Skype Client, please, try later again." 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 2010-01-05 10:02:36 UTC (rev 6033) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/resources/plugin.xml 2010-01-05 12:24:59 UTC (rev 6034) @@ -19,12 +19,12 @@ name="throwEmoticons" description="Notify incoming Emoticons" type="boolean" - defaultValue="true" /> + defaultValue="false" /> <parameter name="throwTTS" description="Notify incoming TTS messages" type="boolean" - defaultValue="true" /> + defaultValue="false" /> </parameters> <commands> <command |
From: jerome <c2m...@c2...> - 2010-01-05 10:02:45
|
Author: jerome Date: 2010-01-05 11:02:36 +0100 (Tue, 05 Jan 2010) New Revision: 6033 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py Log: * Fixed a dummy bug. 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 2010-01-05 09:35:47 UTC (rev 6032) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py 2010-01-05 10:02:36 UTC (rev 6033) @@ -24,7 +24,8 @@ import threading import commands import subprocess -from ctypes import windll +if os.name == 'nt': + from ctypes import windll from string import find from time import sleep from threading import Thread |