tux-droid-svn Mailing List for Tux Droid CE (Page 2)
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-03-08 11:11:10
      
     | 
| Author: jerome Date: 2010-03-08 12:10:56 +0100 (Mon, 08 Mar 2010) New Revision: 6082 Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/tags/0.1/ Log: * Tagged 0.1 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-08 11:10:59
      
     | 
| Author: jerome Date: 2010-03-08 12:10:20 +0100 (Mon, 08 Mar 2010) New Revision: 6081 Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/branches/ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/tags/ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/LICENSE software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/build.py software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/__init__.py software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/version.py software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/executables/ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/executables/bashHelloWorld.sh software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/executables/start.py software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/HelloWorld.png software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/help.wiki software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/plugin.xml Log: * Added bash Hello World. Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/LICENSE 2010-03-08 11:10:20 UTC (rev 6081) @@ -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/plugins-demo/bash-HelloWorld-plugin/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/build.py 2010-03-08 11:10:20 UTC (rev 6081) @@ -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-HelloWorld.scp") Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/PluginPackager.py 2010-03-08 11:10:20 UTC (rev 6081) @@ -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/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2010-03-08 11:10:20 UTC (rev 6081) @@ -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/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/util/misc/version.py 2010-03-08 11:10:20 UTC (rev 6081) @@ -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/plugins-demo/bash-HelloWorld-plugin/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/builder/version.py 2010-03-08 11:10:20 UTC (rev 6081) @@ -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.2' +author = "Remi Jocaille (rem...@c2...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/executables/bashHelloWorld.sh =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/executables/bashHelloWorld.sh (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/executables/bashHelloWorld.sh 2010-03-08 11:10:20 UTC (rev 6081) @@ -0,0 +1,43 @@ +#!/bin/bash + +# Plugin main entry point. +function start() +{ + + #Getting plugin command + if [[ $1 = "run" ]] + then + run + elif [[ $1 = "check" ]] + then + check + else + run + fi +} + + +# Plugin run command . +function run() +{ + while [[ $tgp_counter != 0 ]] + do + echo "message $tgp_message" + (( tgp_counter-- )) + done +} + +# Plugin check command. +function check() +{ + while [ $tgp_counter != 0 ] + do + echo "message $tgp_message in scheduler mode" + (( tgp_counter-- )) + done +} + +# Starting plugin. +start $1 +exit $? + Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/executables/start.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/executables/start.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/executables/start.py 2010-03-08 11:10:20 UTC (rev 6081) @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Kysoh Sa +# kysoh +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +__author__ = "Kysoh" +__appname__ = "Bash D" +__version__ = "0.1" +__date__ = "2010/03/04" +__license__ = "GPL" + +import os +import time +import sys +import threading + +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + +from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration +from util.SimplePlugin.SimplePlugin import SimplePlugin + +class HelloWorldPlugin(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) + + def start(self): + """Plugin entry point. + This method should be used to dispatch commands. + """ + #Setting execute rights + os.chmod("executables//bashHelloWorld.sh", 0775) + if self.getCommand() == "run": + self.run() + else: + self.check() + + def check(self): + """ + """ + if os.name != "nt": + os.system("perl executables//bashHelloWorld.sh check") + else: + self.throwMessage("No matching platform") + + def run(self): + """Plugin entry point for the "run" command. + """ + if os.name != "nt": + os.system("executables//bashHelloWorld.sh run") + else: + self.throwMessage("No matching platform") + + def onPluginStop(self): + """Callback on plugin stop. + """ + pass + + def onPluginEvent(self, eventName, eventValues): + """Callback on plugin event. + @param eventName: Event name. + @param eventValues: Event values. + """ + pass + +if __name__ == "__main__": + plugin = HelloWorldPlugin() + plugin.boot(sys.argv[1:], SimplePluginConfiguration()) Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/HelloWorld.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/HelloWorld.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/help.wiki (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/help.wiki 2010-03-08 11:10:20 UTC (rev 6081) @@ -0,0 +1,2 @@ +== Synopsis == +Bash simple "Hello World" plugin. Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/plugin.pot (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/plugin.pot 2010-03-08 11:10:20 UTC (rev 6081) @@ -0,0 +1,20 @@ +msgid "Hello World Bash Sample Plugin" +msgstr "" + +msgid "Hello world in scheduled mode" +msgstr "" + +msgid "Message sent when I'm saying hello" +msgstr "" + +msgid "Hello world in bash" +msgstr "" + +msgid "How many time the message will be throwed" +msgstr "" + +msgid "Run the plugin" +msgstr "" + +msgid "Start check command for scheduled Hello world." +msgstr "" Added: software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/plugin.xml (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/bash-HelloWorld-plugin/trunk/resources/plugin.xml 2010-03-08 11:10:20 UTC (rev 6081) @@ -0,0 +1,50 @@ +<plugin> + <interpreter + kind="python"> + <executable>executables/start.py</executable> + </interpreter> + <description> + <name>Hello World Bash Sample Plugin</name> + <description>This plugin throws a simple Hello World notification in bash</description> + <author>jerome conan</author> + <version>0.1</version> + <iconFile>resources/HelloWorld.png</iconFile> + <executionMode>command</executionMode> + <!-- Plugin uuid --> + <uuid>548f7a9a-567c-4b3e-a0dd-102ff68a1b8a</uuid> + </description> + <parameters> + <!-- String parameter example --> + <parameter + name="message" + description="Message sent when I'm saying hello" + type="string" + defaultValue="Hello world in bash" /> + <!-- Enumeration parameter example --> + <parameter + name="counter" + description="How many time the message will be throwed" + type="enum(1,2,3,4,5,6,7,8,9,10)" + defaultValue="1" /> + </parameters> + <commands> + <!-- Command used starting the plugin in run mode --> + <command name="run" description="Run the plugin"/> + <!-- Command used starting the plugin by scheduler --> + <command name="check" description="Start check command for scheduled Hello world."/> + </commands> + <tasks> + <!-- start check mode every minute --> + <task + name="My checker" + description="Start check function every minute" + command="check" + type="every x" + activated="false" + + delay="00:01:00" + delayMask="false,true,false" + delayVisible="true" + /> + </tasks> +</plugin> | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-05 14:35:13
      
     | 
| Author: jerome Date: 2010-03-05 15:35:06 +0100 (Fri, 05 Mar 2010) New Revision: 6080 Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/tags/0.1/ Log: * Tagged 0.1 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-05 14:34:57
      
     | 
| Author: jerome Date: 2010-03-05 15:34:38 +0100 (Fri, 05 Mar 2010) New Revision: 6079 Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/branches/ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/tags/ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/LICENSE software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/build.py software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/__init__.py software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/version.py software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/executables/ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/executables/perlHelloWorld.pl software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/executables/start.py software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/HelloWorld.png software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/help.wiki software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/plugin.xml Log: * Added perl hello world. Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/LICENSE 2010-03-05 14:34:38 UTC (rev 6079) @@ -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/plugins-demo/perl-HelloWorld-plugin/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/build.py 2010-03-05 14:34:38 UTC (rev 6079) @@ -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-HelloWorld.scp") Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/PluginPackager.py 2010-03-05 14:34:38 UTC (rev 6079) @@ -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/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2010-03-05 14:34:38 UTC (rev 6079) @@ -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/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/util/misc/version.py 2010-03-05 14:34:38 UTC (rev 6079) @@ -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/plugins-demo/perl-HelloWorld-plugin/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/builder/version.py 2010-03-05 14:34:38 UTC (rev 6079) @@ -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.2' +author = "Remi Jocaille (rem...@c2...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/executables/perlHelloWorld.pl =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/executables/perlHelloWorld.pl (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/executables/perlHelloWorld.pl 2010-03-05 14:34:38 UTC (rev 6079) @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Kysoh Sa +# kysoh +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +package HelloWorld; + + #Initializing vars + + sub start; + sub run; + sub check; + sub getMessage; + sub getCounter; + sub getCommand; + + # Plugin initialisation + sub new{ + + my $self = { + _firstName => undef, + _lastName => undef, + _ssn => undef, + _address => undef + }; + + bless $self, 'HelloWorld'; + return $self; + } + + # Plugin main entry point + sub start{ + if(&getCommand() eq 'run') + { + &run(); + } + elsif(&getCommand() eq 'check') + { + &check(); + } + else + { + &run(); + } + } + + # Return the 'counter' parameter value + sub getCounter{ + return $counter = int($ENV{"tgp_counter"}); + } + + # Return the 'message' parameter value + sub getMessage{ + return $message = $ENV{"tgp_message"}; + } + + # Return the plugin command ( run or check in our case + sub getCommand{ + return $ARGV[0] + } + + # Plugin run command + sub run{ + $count = &getCounter(); + while($count > 0) + { + print("message '" . &getMessage() . "'\n"); + $count--; + } + } + + # Plugin check command + sub check{ + $count = &getCounter(); + while($count > 0) + { + print("message '" . &getMessage() . " from scheduler'\n"); + $count--; + } + } + +package main; + $Hello = HelloWorld->new(); + $Hello->start(); + Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/executables/start.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/executables/start.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/executables/start.py 2010-03-05 14:34:38 UTC (rev 6079) @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Kysoh Sa +# kysoh +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +__author__ = "Kysoh" +__appname__ = "Ruby D" +__version__ = "0.1" +__date__ = "2010/03/04" +__license__ = "GPL" + +import os +import time +import sys +import threading + +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + +from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration +from util.SimplePlugin.SimplePlugin import SimplePlugin + +class HelloWorldPlugin(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) + + def start(self): + """Plugin entry point. + This method should be used to dispatch commands. + """ + if self.getCommand() == "run": + self.run() + else: + self.check() + + def check(self): + """ + """ + if os.name == "nt": + os.system("perl.exe executables\\perlHelloWorld.pl check") + else: + os.system("perl executables//perlHelloWorld.pl check") + + def run(self): + """Plugin entry point for the "run" command. + """ + if os.name == "nt": + os.system("perl.exe executables\\perlHelloWorld.pl run") + else: + os.system("perl executables//perlHelloWorld.pl run") + + def onPluginStop(self): + """Callback on plugin stop. + """ + pass + + def onPluginEvent(self, eventName, eventValues): + """Callback on plugin event. + @param eventName: Event name. + @param eventValues: Event values. + """ + pass + +if __name__ == "__main__": + plugin = HelloWorldPlugin() + plugin.boot(sys.argv[1:], SimplePluginConfiguration()) Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/HelloWorld.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/HelloWorld.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/help.wiki (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/help.wiki 2010-03-05 14:34:38 UTC (rev 6079) @@ -0,0 +1,2 @@ +== Synopsis == +Perl simple "Hello World" plugin. Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/plugin.pot (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/plugin.pot 2010-03-05 14:34:38 UTC (rev 6079) @@ -0,0 +1,20 @@ +msgid "Hello World Perl Sample Plugin" +msgstr "" + +msgid "Hello world in scheduled mode" +msgstr "" + +msgid "Message sent when I'm saying hello" +msgstr "" + +msgid "Hello world in perl" +msgstr "" + +msgid "How many time the message will be throwed" +msgstr "" + +msgid "Run the plugin" +msgstr "" + +msgid "Start check command for scheduled Hello world." +msgstr "" \ No newline at end of file Added: software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/plugin.xml (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/perl-HelloWorld-plugin/trunk/resources/plugin.xml 2010-03-05 14:34:38 UTC (rev 6079) @@ -0,0 +1,50 @@ +<plugin> + <interpreter + kind="python"> + <executable>executables/start.py</executable> + </interpreter> + <description> + <name>Hello World Perl Sample Plugin</name> + <description>This plugin throws a simple Hello World notification in perl</description> + <author>jerome conan</author> + <version>0.1</version> + <iconFile>resources/HelloWorld.png</iconFile> + <executionMode>command</executionMode> + <!-- Plugin uuid --> + <uuid>548f7a9a-567c-423e-a0fd-102aa58a1b88</uuid> + </description> + <parameters> + <!-- String parameter example --> + <parameter + name="message" + description="Message sent when I'm saying hello" + type="string" + defaultValue="Hello world in perl" /> + <!-- Enumeration parameter example --> + <parameter + name="counter" + description="How many time the message will be throwed" + type="enum(1,2,3,4,5,6,7,8,9,10)" + defaultValue="1" /> + </parameters> + <commands> + <!-- Command used starting the plugin in run mode --> + <command name="run" description="Run the plugin"/> + <!-- Command used starting the plugin by scheduler --> + <command name="check" description="Start check command for scheduled Hello world."/> + </commands> + <tasks> + <!-- start check mode every minute --> + <task + name="My checker" + description="Start check function every minute" + command="check" + type="every x" + activated="false" + + delay="00:01:00" + delayMask="false,true,false" + delayVisible="true" + /> + </tasks> +</plugin> | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-05 12:49:54
      
     | 
| Author: jerome Date: 2010-03-05 13:49:45 +0100 (Fri, 05 Mar 2010) New Revision: 6078 Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/tags/0.1/ Log: Tagged 0.1 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-05 12:49:40
      
     | 
| Author: jerome Date: 2010-03-05 13:49:21 +0100 (Fri, 05 Mar 2010) New Revision: 6077 Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/branches/ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/tags/ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/LICENSE software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/build.py software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/__init__.py software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/version.py software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/executables/ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/executables/rubyHelloWorld.rb software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/executables/start.py software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/HelloWorld.png software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/help.wiki software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/plugin.xml Log: * Added ruby Hello World. Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/LICENSE 2010-03-05 12:49:21 UTC (rev 6077) @@ -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/plugins-demo/ruby-HelloWorld-plugin/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/build.py 2010-03-05 12:49:21 UTC (rev 6077) @@ -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-HelloWorld.scp") Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/PluginPackager.py 2010-03-05 12:49:21 UTC (rev 6077) @@ -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/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2010-03-05 12:49:21 UTC (rev 6077) @@ -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/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/util/misc/version.py 2010-03-05 12:49:21 UTC (rev 6077) @@ -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/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/builder/version.py 2010-03-05 12:49:21 UTC (rev 6077) @@ -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.2' +author = "Remi Jocaille (rem...@c2...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/executables/rubyHelloWorld.rb =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/executables/rubyHelloWorld.rb (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/executables/rubyHelloWorld.rb 2010-03-05 12:49:21 UTC (rev 6077) @@ -0,0 +1,88 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Kysoh Sa +# kysoh <info@__kysoh__.com> ( remove __ ) +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + + +class HelloWorld + + #Counter parameter + $counter = 1 + #Message parameter + $message = 'Hello world in ruby' + + '''Class initialization. + ''' + def initialize + $counter = ENV['tgp_counter'].to_i + $message = ENV['tgp_message'] + end + + + def getCommand + '''This function return the plugin command ( run or check in our case ) + ''' + return ARGV[0] + end + + + def start + '''This procedure starts the plugin. + ''' + if getCommand() == 'run' + run() + elsif getCommand() == 'check' + check() + else + run() + end + end + + + def run + '''Plugin run command + ''' + count = getCounter() + while count > 0 + puts "message '" + getMessage() + "'" + count -= 1 + end + end + + + def check + '''Plugin check command + ''' + count = getCounter() + while count > 0 + puts "message '" + getMessage() + "from scheduler'" + count -= 1 + end + end + + + def getMessage + '''This function return the message parameter value + ''' + return $message + end + + + def getCounter + '''This function return the counter parameter value + ''' + return $counter + end + +end + +''' +Plugin main entry point. +''' +if __FILE__ == $0 + Hello = HelloWorld.new() + Hello.start +end + Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/executables/start.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/executables/start.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/executables/start.py 2010-03-05 12:49:21 UTC (rev 6077) @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Kysoh Sa +# kysoh +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +__author__ = "Kysoh" +__appname__ = "Ruby D" +__version__ = "0.1" +__date__ = "2010/03/04" +__license__ = "GPL" + +import os +import time +import sys +import threading + +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + +from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration +from util.SimplePlugin.SimplePlugin import SimplePlugin + +class HelloWorldPlugin(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) + + def start(self): + """Plugin entry point. + This method should be used to dispatch commands. + """ + if self.getCommand() == "run": + self.run() + else: + self.check() + + def check(self): + """ + """ + if os.name == "nt": + os.system("ruby.exe executables\\rubyHelloWorld.rb check") + else: + os.system("ruby executables\\rubyHelloWorld.rb check") + + def run(self): + """Plugin entry point for the "run" command. + """ + if os.name == "nt": + os.system("ruby.exe executables\\rubyHelloWorld.rb run") + else: + os.system("ruby executables\\rubyHelloWorld.rb run") + + def onPluginStop(self): + """Callback on plugin stop. + """ + pass + + def onPluginEvent(self, eventName, eventValues): + """Callback on plugin event. + @param eventName: Event name. + @param eventValues: Event values. + """ + pass + +if __name__ == "__main__": + plugin = HelloWorldPlugin() + plugin.boot(sys.argv[1:], SimplePluginConfiguration()) Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/HelloWorld.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/HelloWorld.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/help.wiki (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/help.wiki 2010-03-05 12:49:21 UTC (rev 6077) @@ -0,0 +1,2 @@ +== Synopsis == +Ruby simple "Hello World" plugin. Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/plugin.pot (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/plugin.pot 2010-03-05 12:49:21 UTC (rev 6077) @@ -0,0 +1,20 @@ +msgid "Hello World Ruby Sample Plugin" +msgstr "" + +msgid "Hello world in scheduled mode" +msgstr "" + +msgid "Message sent when I'm saying hello" +msgstr "" + +msgid "Hello world in ruby" +msgstr "" + +msgid "How many time the message will be throwed" +msgstr "" + +msgid "Run the plugin" +msgstr "" + +msgid "Start check command for scheduled Hello world." +msgstr "" \ No newline at end of file Added: software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/plugin.xml (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/ruby-HelloWorld-plugin/trunk/resources/plugin.xml 2010-03-05 12:49:21 UTC (rev 6077) @@ -0,0 +1,50 @@ +<plugin> + <interpreter + kind="python"> + <executable>executables/start.py</executable> + </interpreter> + <description> + <name>Hello World Ruby Sample Plugin</name> + <description>This plugin throws a simple Hello World notification in ruby</description> + <author>jerome conan</author> + <version>0.1</version> + <iconFile>resources/HelloWorld.png</iconFile> + <executionMode>command</executionMode> + <!-- Plugin uuid --> + <uuid>548f7a9a-567c-423e-a0dd-102aa58a1b88</uuid> + </description> + <parameters> + <!-- String parameter example --> + <parameter + name="message" + description="Message sent when I'm saying hello" + type="string" + defaultValue="Hello world in ruby" /> + <!-- Enumeration parameter example --> + <parameter + name="counter" + description="How many time the message will be throwed" + type="enum(1,2,3,4,5,6,7,8,9,10)" + defaultValue="1" /> + </parameters> + <commands> + <!-- Command used starting the plugin in run mode --> + <command name="run" description="Run the plugin"/> + <!-- Command used starting the plugin by scheduler --> + <command name="check" description="Start check command for scheduled Hello world."/> + </commands> + <tasks> + <!-- start check mode every minute --> + <task + name="My checker" + description="Start check function every minute" + command="check" + type="every x" + activated="false" + + delay="00:01:00" + delayMask="false,true,false" + delayVisible="true" + /> + </tasks> +</plugin> | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-05 09:47:58
      
     | 
| Author: jerome Date: 2010-03-05 10:47:48 +0100 (Fri, 05 Mar 2010) New Revision: 6076 Added: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/tags/0.1/ Log: * Tagged 0.1 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-05 09:47:41
      
     | 
| Author: jerome Date: 2010-03-05 10:47:18 +0100 (Fri, 05 Mar 2010) New Revision: 6075 Added: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/branches/ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/tags/ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/LICENSE software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/README software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/pom.xml software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/HelloWorld.png software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/attitunes/ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/help.wiki software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/plugin.xml software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/src/ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/src/HelloWorld.java Log: * Added java SSV3 demo plugin. Added: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/LICENSE 2010-03-05 09:47:18 UTC (rev 6075) @@ -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/plugins-demo/java-HelloWorld-plugin/trunk/README =================================================================== --- software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/README (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/README 2010-03-05 09:47:18 UTC (rev 6075) @@ -0,0 +1,8 @@ +Eclipse or other IDE: +---------------------- +* Add files located into Program Files\\Kysoh\\Tux Droid\\softwares\\smart-server\\util\\applicationserver\\plugin\\interpreters\\javacommonjar firectory + in order to compile. + +* Maven is needed to package scp file ( download at: http://maven.apache.org/ ). + +* Run mvn eclipse:eclipse to create this plugin eclipse project. \ No newline at end of file Added: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/pom.xml =================================================================== --- software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/pom.xml (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/pom.xml 2010-03-05 09:47:18 UTC (rev 6075) @@ -0,0 +1,113 @@ +<project> + <!--General project informations--> + <modelVersion>4.0.0</modelVersion> + <groupId>com.kysoh</groupId> + <artifactId>HelloWorld</artifactId> + <packaging>jar</packaging> + <version>0.1</version> + <name>Hello World plugin for Tux Droid</name> + <url>http://www.tuxisalive.com</url> + + <!--Dependency list--> + <dependencies> + <dependency> + <groupId>com.kysoh</groupId> + <artifactId>tuxdroid-plugin-java-kit</artifactId> + <version>0.0.3</version> + </dependency> + </dependencies> + + <!--Repository list--> + <repositories> + <repository> + <id>kysoh</id> + <name>Kysoh Repository</name> + <layout>default</layout> + <url>http://ftp.kysoh.com/maven2</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + + <!--Build process--> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + + <!--This section copy the dependencies into ./libraries--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-dependencies</id> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>./libraries</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + + <!--This plugin run small ant scripts to pack and clean the plugin --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.3</version> + <executions> + + <!--This section create the .scp file during the package lifecycle--> + <execution> + <phase>package</phase> + <id>package</id> + <configuration> + <tasks> + <mkdir dir="./libraries"/> + <copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar" + todir="./libraries" /> + <zip destfile="./${project.artifactId}.scp"> + <zipfileset dir="." includes="resources/*" /> + <zipfileset dir="." includes="libraries/*" > + <exclude name="libraries/tuxdroid-plugin-java-kit*" /> + </zipfileset> + <zipfileset dir="." includes="executables/*" /> + </zip> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + + <!--This section clean the ./libraries and the SCP file during the 'clean' lifecycle--> + <execution> + <phase>clean</phase> + <configuration> + <tasks> + <delete dir="./libraries"/> + <delete file="./${project.artifactId}.scp"/> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + + <!--This plugin compile the project--> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.6</source> + <target>1.6</target> + </configuration> + </plugin> + </plugins> + </build> +</project> Added: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/HelloWorld.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/HelloWorld.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/help.wiki (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/help.wiki 2010-03-05 09:47:18 UTC (rev 6075) @@ -0,0 +1,2 @@ +== Synopsis == +Java simple "Hello World" plugin. Added: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/plugin.pot (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/plugin.pot 2010-03-05 09:47:18 UTC (rev 6075) @@ -0,0 +1,23 @@ +msgid "Hello World Java Sample Plugin" +msgstr "" + +msgid "Hello world in scheduled mode" +msgstr "" + +msgid "Message sent when I'm saying hello" +msgstr "" + +msgid "Hello world in java" +msgstr "" + +msgid "How many time the message will be throwed" +msgstr "" + +msgid "Run the plugin" +msgstr "" + +msgid "Start check command for scheduled Hello world." +msgstr "" + +msgid "This plugin throws a simple Hello World notification in java" +msgstr "" Added: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/plugin.xml (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/resources/plugin.xml 2010-03-05 09:47:18 UTC (rev 6075) @@ -0,0 +1,50 @@ +<plugin> + <interpreter + kind="java"> + <executable>HelloWorld</executable> + </interpreter> + <description> + <name>Hello World Java Sample Plugin</name> + <description>This plugin throws a simple Hello World notification in java</description> + <author>jerome conan</author> + <version>0.1</version> + <iconFile>resources/HelloWorld.png</iconFile> + <executionMode>command</executionMode> + <!-- Plugin uuid --> + <uuid>548f7a9a-567c-423e-a0dd-102ff68a1b87</uuid> + </description> + <parameters> + <!-- String parameter example --> + <parameter + name="message" + description="Message sent when I'm saying hello" + type="string" + defaultValue="Hello world in java" /> + <!-- Enumeration parameter example --> + <parameter + name="counter" + description="How many time the message will be throwed" + type="enum(1,2,3,4,5,6,7,8,9,10)" + defaultValue="1" /> + </parameters> + <commands> + <!-- Command used starting the plugin in run mode --> + <command name="run" description="Run the plugin"/> + <!-- Command used starting the plugin by scheduler --> + <command name="check" description="Start check command for scheduled Hello world."/> + </commands> + <tasks> + <!-- start check mode every minute --> + <task + name="My checker" + description="Start check function every minute" + command="check" + type="every x" + activated="false" + + delay="00:01:00" + delayMask="false,true,false" + delayVisible="true" + /> + </tasks> +</plugin> Added: software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/src/HelloWorld.java =================================================================== --- software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/src/HelloWorld.java (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/java-HelloWorld-plugin/trunk/src/HelloWorld.java 2010-03-05 09:47:18 UTC (rev 6075) @@ -0,0 +1,130 @@ +import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePlugin; +import com.kysoh.tuxdroid.plugin.framework.plugin.SimplePluginConfiguration; + + /** + * @author Kysoh ( 2010 SSV3 ). + * @version 0.1 + * @category Demo + * Add all jar located into in order to get sample working. + * Program Files\\Kysoh\\Tux Droid\\softwares\\smart-server\\util\\applicationserver\\plugin\\interpreters\\javacommonjar + **/ + +public class HelloWorld extends SimplePlugin<HelloWorld.HelloWorldConfiguration>{ + + public static class HelloWorldConfiguration extends SimplePluginConfiguration{ + + private String message = "Hello world in java"; + private int counter = 1; + + /** + * Set the 'message' parameter value. + * @param message + */ + public void setMessage(String message) + { + this.message = message; + } + + /** + * Return the 'message' parameter value. + * @return + */ + public String getMessage() + { + return this.message; + } + + /** + * Set the 'counter' parameter value. + * @param counter + */ + public void setCounter(int counter) + { + this.counter = counter; + } + + /** + * Return the 'counter' parameter value. + * @return + */ + public int getCounter() + { + return this.counter; + } + + } + + /** + * Plugin main entry point. + */ + @Override + protected void start() throws Throwable { + // Plugin main entry point. + if (this.getCommand().equalsIgnoreCase("run")) + { + this.run(); + } + else if (this.getCommand().equalsIgnoreCase("check")) + { + this.check(); + } + else + { + this.run(); + } + } + + /** + * Function started in case of HalloWorld run command. + */ + public void run(){ + + int counter = this.configuration().getCounter(); + while (counter != 0) + { + this.throwMessage(this.configuration().getMessage()); + counter --; + } + } + + /** + * Function started in case of HelloWorld check command ( scheduler usually ). + */ + public void check(){ + int counter = this.configuration().getCounter(); + while (counter != 0) + { + this.throwMessage(this.configuration().getMessage() + " into scheduler"); + counter --; + } + } + + /** + * Plugin event Callback ( ex: remoet button pushed, ... ) + */ + @Override + protected void onPluginEvent(String arg0, String[] arg1) throws Throwable { + // Do something on Robot event. + + } + + /** + * OnPlugin Stop Callback. + */ + @Override + protected void onPluginStop() throws Throwable { + // Do something when plugin stops. + + } + + + /** + * Plugin main entry point. + * @param args + */ + public static void main(String[] args) + { + new HelloWorld().boot(args, new HelloWorldConfiguration()); + } + +} | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-04 13:22:32
      
     | 
| Author: jerome Date: 2010-03-04 14:22:23 +0100 (Thu, 04 Mar 2010) New Revision: 6074 Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/tags/0.1/ Log: * Tagged 0.1 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-04 13:22:08
      
     | 
| Author: jerome Date: 2010-03-04 14:21:45 +0100 (Thu, 04 Mar 2010) New Revision: 6073 Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/branches/ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/tags/ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/LICENSE software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/build.py software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/__init__.py software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/version.py software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/pascalHelloWorld.exe software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/project1.lpi software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/project1.lpr software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/start.py software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/help.wiki software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.png software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.xml Log: * Added SSV3 free pascal hello world. Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/LICENSE 2010-03-04 13:21:45 UTC (rev 6073) @@ -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/plugins-demo/pascal-HelloWorld-plugin/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/build.py 2010-03-04 13:21:45 UTC (rev 6073) @@ -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("pascal-hello-world.scp") Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/PluginPackager.py 2010-03-04 13:21:45 UTC (rev 6073) @@ -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/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2010-03-04 13:21:45 UTC (rev 6073) @@ -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/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/util/misc/version.py 2010-03-04 13:21:45 UTC (rev 6073) @@ -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/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/builder/version.py 2010-03-04 13:21:45 UTC (rev 6073) @@ -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.2' +author = "Remi Jocaille (rem...@c2...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/pascalHelloWorld.exe =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/pascalHelloWorld.exe ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/project1.lpi =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/project1.lpi (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/project1.lpi 2010-03-04 13:21:45 UTC (rev 6073) @@ -0,0 +1,83 @@ +<?xml version="1.0"?> +<CONFIG> + <ProjectOptions> + <PathDelim Value="\"/> + <Version Value="7"/> + <General> + <Flags> + <LRSInOutputDirectory Value="False"/> + </Flags> + <MainUnit Value="0"/> + <TargetFileExt Value=".exe"/> + <ActiveEditorIndexAtStart Value="0"/> + </General> + <VersionInfo> + <ProjectVersion Value=""/> + <Language Value=""/> + <CharSet Value=""/> + </VersionInfo> + <PublishOptions> + <Version Value="2"/> + <IgnoreBinaries Value="False"/> + <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> + <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/> + </PublishOptions> + <RunParams> + <local> + <FormatVersion Value="1"/> + <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> + </local> + </RunParams> + <Units Count="1"> + <Unit0> + <Filename Value="project1.lpr"/> + <IsPartOfProject Value="True"/> + <UnitName Value="project1"/> + <CursorPos X="32" Y="31"/> + <TopLine Value="70"/> + <EditorIndex Value="0"/> + <UsageCount Value="34"/> + <Loaded Value="True"/> + </Unit0> + </Units> + <JumpHistory Count="5" HistoryIndex="4"> + <Position1> + <Filename Value="project1.lpr"/> + <Caret Line="41" Column="34" TopLine="26"/> + </Position1> + <Position2> + <Filename Value="project1.lpr"/> + <Caret Line="46" Column="35" TopLine="25"/> + </Position2> + <Position3> + <Filename Value="project1.lpr"/> + <Caret Line="59" Column="33" TopLine="42"/> + </Position3> + <Position4> + <Filename Value="project1.lpr"/> + <Caret Line="74" Column="31" TopLine="60"/> + </Position4> + <Position5> + <Filename Value="project1.lpr"/> + <Caret Line="42" Column="23" TopLine="20"/> + </Position5> + </JumpHistory> + </ProjectOptions> + <CompilerOptions> + <Version Value="8"/> + <PathDelim Value="\"/> + <Other> + <CompilerPath Value="$(CompPath)"/> + </Other> + </CompilerOptions> + <Debugging> + <Exceptions Count="2"> + <Item1> + <Name Value="ECodetoolError"/> + </Item1> + <Item2> + <Name Value="EFOpenError"/> + </Item2> + </Exceptions> + </Debugging> +</CONFIG> Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/project1.lpr =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/project1.lpr (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/project1.lpr 2010-03-04 13:21:45 UTC (rev 6073) @@ -0,0 +1,131 @@ +program project1; + +{$mode objfpc}{$H+} + +uses + {$IFDEF UNIX}{$IFDEF UseCThreads} + cthreads, + {$ENDIF}{$ENDIF} + Classes, SysUtils, CustApp, dos + { you can add units after this }; + +type + + { TMyApplication } + + TMyApplication = class(TCustomApplication) + protected + procedure DoRun; override; + function GetCommand():String; + function GetCounter():Integer; + function GetMessage():String; + + public + constructor Create(TheOwner: TComponent); override; + destructor Destroy; override; + procedure RunCommand(); + procedure CheckCommand(); + end; + +{ TMyApplication } + +{========== Plugin main entry point ==========} +procedure TMyApplication.DoRun; +var + messages: String; + counter : Integer; +begin + //Getting command and start right command. + if self.GetCommand() = 'run' then + self.RunCommand() + else if self.GetCommand() = 'check' then + self.CheckCommand(); + + // Stop program loop + Terminate; +end; + +{========== Constructor ==========} +constructor TMyApplication.Create(TheOwner: TComponent); +begin + inherited Create(TheOwner); + StopOnException:=False; +end; + +{========== Destructor ==========} +destructor TMyApplication.Destroy; +begin + inherited Destroy; +end; + +{========== Getting plugin command ==========} +function TMyApplication.GetCommand():String; +var + i : Integer; +begin + //Plugin commands are passed as exe parameter + if (ParamCount > 0) then + result := ParamStr(1) + else + //'run' by default. + result := 'run'; +end; + +{========== Getting 'counter' parameter value ==========} +function TMyApplication.GetCounter():Integer; +begin + if GetEnv('tgp_counter') <> '' then + result := strtoint(GetEnv('tgp_counter')) + else + result := 1; +end; + +{========== Return 'message' parameter value ==========} +function TMyApplication.GetMessage():String; +begin + //Get VE value + if GetEnv('tgp_message') <> '' then + result := GetEnv('tgp_message') + else + result := 'Hello world in pascal'; +end; + +{========== Run plugin function ==========} +procedure TMyApplication.RunCommand(); +var + count : Integer; +begin + //Gettin counter value. + count := GetCounter(); + while(count <> 0) do + begin + //Printing Hello World Message. + writeln('message ''' + GetMessage() + ''''); + count := count - 1; + end; +end; + +{========== Check plugin function ==========} +procedure TMyApplication.CheckCommand; +var + count : Integer; +begin + count := GetCounter(); + while(count <> 0) do + begin + //Printing Hello World Message. + writeln('message ''scheduler >' + GetMessage() + ''''); + count := count -1; + end; +end; + +{---------- Starting plugin ----------} +var + Application: TMyApplication; +begin + Application:=TMyApplication.Create(nil); + Application.Title:='HelloWorld'; + Application.Run; + Application.Free; +end. + Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/start.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/start.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/executables/start.py 2010-03-04 13:21:45 UTC (rev 6073) @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- + +# Copyright (C) 2009 Kysoh Sa +# kysoh +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +__author__ = "Kysoh" +__appname__ = "Pascal D" +__version__ = "0.1" +__date__ = "2010/03/04" +__license__ = "GPL" + +import os +import time +import sys +import threading + +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) + +from util.SimplePlugin.SimplePluginConfiguration import SimplePluginConfiguration +from util.SimplePlugin.SimplePlugin import SimplePlugin + +class HelloWorldPlugin(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) + + def start(self): + """Plugin entry point. + This method should be used to dispatch commands. + """ + if self.getCommand() == "run": + self.run() + else: + self.check() + + def check(self): + """ + """ + os.system("executables\\pascalHelloWorld.exe check") + + def run(self): + """Plugin entry point for the "run" command. + """ + os.system("executables\\pascalHelloWorld.exe run") + + def onPluginStop(self): + """Callback on plugin stop. + """ + pass + + def onPluginEvent(self, eventName, eventValues): + """Callback on plugin event. + @param eventName: Event name. + @param eventValues: Event values. + """ + pass + +if __name__ == "__main__": + plugin = HelloWorldPlugin() + plugin.boot(sys.argv[1:], SimplePluginConfiguration()) Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/help.wiki (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/help.wiki 2010-03-04 13:21:45 UTC (rev 6073) @@ -0,0 +1,2 @@ +== Synopsis == +Simple Hello World pascal d. \ No newline at end of file Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.pot (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.pot 2010-03-04 13:21:45 UTC (rev 6073) @@ -0,0 +1,20 @@ +msgid "Hello World Pascal Sample Plugin" +msgstr "" + +msgid "Hello world in scheduled mode" +msgstr "" + +msgid "Message sent when I'm saying hello" +msgstr "" + +msgid "Hello world in pascal" +msgstr "" + +msgid "How many time the message will be throwed" +msgstr "" + +msgid "Run the plugin" +msgstr "" + +msgid "Start check command for scheduled Hello world." +msgstr "" \ No newline at end of file Added: software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.xml (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/pascal-HelloWorld-plugin/trunk/resources/plugin.xml 2010-03-04 13:21:45 UTC (rev 6073) @@ -0,0 +1,50 @@ +<plugin> + <interpreter + kind="python"> + <executable>executables/start.py</executable> + </interpreter> + <description> + <name>Hello World free pascal Sample Plugin</name> + <description>This plugin throws a simple Hello World notification in pascal</description> + <author>jerome conan</author> + <version>0.1</version> + <iconFile>resources/plugin.png</iconFile> + <executionMode>command</executionMode> + <uuid>548f7a9a-567c-423e-a0dd-102ff68a3333</uuid> + </description> + <parameters> + <!-- String parameter example --> + <parameter + name="message" + description="Message sent when I'm saying hello" + type="string" + defaultValue="Hello world in pascal" /> + <!-- Enumeration parameter example --> + <parameter + name="counter" + description="How many time the message will be throwed" + type="enum(1,2,3,4,5,6,7,8,9,10)" + defaultValue="1" /> + </parameters> + <commands> + <!-- Command used starting the plugin in run mode --> + <command name="run" description="Run the plugin"/> + <!-- Command used starting the plugin by scheduler --> + <command name="check" description="Start check command for scheduled Hello world."/> + </commands> + <tasks> + <!-- start check mode every minute --> + <task + name="My checker" + description="Start check function every minute" + command="check" + type="every x" + activated="false" + + delay="00:01:00" + delayMask="false,true,false" + delayVisible="true" + /> + </tasks> +</plugin> + | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-03-02 14:30:48
      
     | 
| Author: jerome Date: 2010-03-02 14:51:18 +0100 (Tue, 02 Mar 2010) New Revision: 6072 Added: software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/tags/0.1/ Log: * Tagged version 0.1 | 
| Author: jerome Date: 2010-03-02 14:28:31 +0100 (Tue, 02 Mar 2010) New Revision: 6071 Added: software_suite_v3/software/plugin/plugins-demo/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/branches/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/tags/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/LICENSE software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/build.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/PluginPackager.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/__init__.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/__init__.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/__init__.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/version.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/version.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/LICENSE software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/SimpleGadget.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/SimpleGadgetConfiguration.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/__init__.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/version.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/pluginHelloWorld.py software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/resources/ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/resources/HelloWorld.png software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/resources/help.wiki software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/resources/plugin.pot software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/resources/plugin.xml Log: * Added simple hello world plugin. Added: software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/LICENSE 2010-03-02 13:28:31 UTC (rev 6071) @@ -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/plugins-demo/python-HelloWorld-plugin/trunk/build.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/build.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/build.py 2010-03-02 13:28:31 UTC (rev 6071) @@ -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-HelloWorld.scp") Added: software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/PluginPackager.py 2010-03-02 13:28:31 UTC (rev 6071) @@ -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/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2010-03-02 13:28:31 UTC (rev 6071) @@ -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/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/util/misc/version.py 2010-03-02 13:28:31 UTC (rev 6071) @@ -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/plugins-demo/python-HelloWorld-plugin/trunk/builder/version.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/builder/version.py 2010-03-02 13:28:31 UTC (rev 6071) @@ -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.2' +author = "Remi Jocaille (rem...@c2...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/LICENSE =================================================================== --- software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/LICENSE (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/LICENSE 2010-03-02 13:28:31 UTC (rev 6071) @@ -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/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/SimpleGadget.py =================================================================== --- software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/SimpleGadget.py (rev 0) +++ software_suite_v3/software/plugin/plugins-demo/python-HelloWorld-plugin/trunk/executables/SimpleGadget/SimpleGadget.py 2010-03-02 13:28:31 UTC (rev 6071) @@ -0,0 +1,313 @@ +# -*- coding: latin1 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# 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 +# +# This module is a portage of the java package write by "Yoran Brault" +# "com.kysoh.tuxdroid.gadget.framework.gadget" + +import os +import sys +import traceback +import random +import platform + +ENVIRONEMENT_PREFIX = "tgp_" + +# ------------------------------------------------------------------------------ +# This class is the base class helper for builder python gadgets. +# ------------------------------------------------------------------------------ +class SimpleGadget(object): + """This class is the base class helper for builder python gadgets. + """ + + # -------------------------------------------------------------------------- + # Constructor of the class. + # -------------------------------------------------------------------------- + def __init__(self): + """Constructor of the class. + """ + self.__configuration = None + self.__command = None + + # -------------------------------------------------------------------------- + # Get the configuration object. + # -------------------------------------------------------------------------- + def configuration(self): + """Get the configuration object. + @return: A SimpleGadgetConfiguration object. + """ + return self.__configuration + + # -------------------------------------------------------------------------- + # Get the command of the gagdet. + # -------------------------------------------------------------------------- + def getCommand(self): + """Get the command of the gagdet. + @return: A string. + """ + return self.__command + + # -------------------------------------------------------------------------- + # Set the command of the gagdet. + # -------------------------------------------------------------------------- + def setCommand(self, command): + """Set the command of the gagdet. + @param command: The command of the gagdet. + """ + self.__command = command + + # -------------------------------------------------------------------------- + # Get if the platform is Windows or not. + # -------------------------------------------------------------------------- + def isWindows(self): + """Get if the platform is Windows or not. + @return: A boolean. + """ + platformName = platform.system().lower() + return (platformName == "microsoft") or (platformName == "windows") + + # -------------------------------------------------------------------------- + # Load the environement data to the gadget parameters. + # -------------------------------------------------------------------------- + def __loadEnvironementData(self): + """Load the environement data to the gadget parameters. + """ + if self.__configuration == None: + return + # Extract configuration object class names + baseConfClassName = "_SimpleGadgetConfiguration" + confClassName = str(self.__configuration.__class__) + confClassName = confClassName.split("'")[1].split(".")[1] + confClassName = "_" + confClassName + # Filtering the fields of the configuration object + confFields = dir(self.__configuration) + filteredFileds = [] + for field in confFields: + if field.find(baseConfClassName) == 0: + filteredFileds.append([field[len(baseConfClassName):].lower(), + field]) + if field.find(confClassName) == 0: + filteredFileds.append([field[len(confClassName):].lower(), + field]) + # Fill the configuration parameters with the environement values + self.throwTrace("Loading environement") + for key in os.environ: + fKey = key.lower() + if fKey.find(ENVIRONEMENT_PREFIX) == 0: + environName = fKey[len(ENVIRONEMENT_PREFIX):] + for field in filteredFileds: + if field[0][2:] == environName: + # Get the value in the configuration object + paramName = field[1] + paramValue = getattr(self.__configuration, paramName) + paramType = str(type(paramValue)) + paramType = paramType.split("'")[1] + # Get the value in the os environ + environValue = os.environ[key] + self.throwTrace(" " + field[0][2:] + ":" + environValue); + # Check parameters type + if paramType == 'str': + pass + elif paramType == 'int': + try: + environValue = int(environValue) + except: + # Environ value type not match with the parameter + self.throwError("", True) + continue + elif paramType == 'float': + try: + environValue = float(environValue) + except: + # Environ value type not match with the parameter + self.throwError("", True) + continue + elif paramType == 'bool': + if environValue == "true": + environValue = "True" + else: + environValue = "False" + else: + # Unknow parameter type + self.throwError("Unknow parameter type (%s)" % paramType) + continue + # Set the environment value to the parameter + setattr(self.__configuration, paramName, environValue) + + # -------------------------------------------------------------------------- + # Starting point of the gadget. + # -------------------------------------------------------------------------- + def boot(self, arguments, configuration): + """Starting point of the gadget. + @param arguments: + """ + try: + if len(arguments) > 0: + self.__command = arguments[0] + self.__configuration = configuration + self.__loadEnvironementData() + self.start() + except: + self.throwError("Error on gadget boot", True) + ... [truncated message content] | 
| Author: jerome
Date: 2010-02-26 15:04:00 +0100 (Fri, 26 Feb 2010)
New Revision: 6070
Modified:
   software_suite_v3/software/plugin/plugin-facebook/branches/new_login/pom.xml
   software_suite_v3/software/plugin/plugin-facebook/branches/new_login/resources/plugin.xml
   software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookConnection.java
   software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookFunctions.java
   software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookPlugin.java
   software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/configuration/FacebookDatasStruct.java
   software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/configuration/PluginFacebookConfiguration.java
   software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/connection/FacebookSessionUtils.java
Log:
* Fixed login stuff ( still need some tests ).
Modified: software_suite_v3/software/plugin/plugin-facebook/branches/new_login/pom.xml
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/branches/new_login/pom.xml	2010-02-22 12:31:57 UTC (rev 6069)
+++ software_suite_v3/software/plugin/plugin-facebook/branches/new_login/pom.xml	2010-02-26 14:04:00 UTC (rev 6070)
@@ -56,11 +56,36 @@
       <artifactId>facebook-java-api-schema</artifactId>
       <version>2.1.1</version>
     </dependency>
-    <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-      <version>3.1</version>
+	<dependency>
+      <groupId>org.lobobrowser</groupId>
+      <artifactId>lobo</artifactId>
+      <version>0.9.8</version>
     </dependency>
+	<dependency>
+      <groupId>org.lobobrowser</groupId>
+      <artifactId>lobo-pub</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+	<dependency>
+      <groupId>org.lobobrowser.cobra</groupId>
+      <artifactId>cobra</artifactId>
+      <version>0.98.4</version>
+    </dependency>
+	<dependency>
+      <groupId>org.lobobrowser.cobra</groupId>
+      <artifactId>cobra-no-commons</artifactId>
+      <version>0.98.4</version>
+    </dependency>
+	<dependency>
+      <groupId>org.lobobrowser</groupId>
+      <artifactId>lobo-js</artifactId>
+      <version>0.0.1</version>
+    </dependency>
+	<dependency>
+      <groupId>org.lobobrowser</groupId>
+      <artifactId>lobo-primary</artifactId>
+      <version>0.0.1</version>
+    </dependency>
 		
     </dependencies>
     
@@ -96,7 +121,8 @@
 		<groupId>org.apache.maven.plugins</groupId>
 		<artifactId>maven-dependency-plugin</artifactId>
 		<executions>
-		    <execution>
+		    
+			<execution>
 			<id>copy-dependencies</id>
 			<phase>package</phase>
 			<goals>
@@ -106,6 +132,41 @@
 			    <outputDirectory>./libraries</outputDirectory>
 			</configuration>
 		    </execution>
+			
+			<execution>
+            <id>copy-dependency</id>
+            <phase>package</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+                <artifactItems>
+                  <artifactItem>
+                     <groupId>org.lobobrowser.cobra</groupId>
+                     <artifactId>cobra</artifactId>
+                     <version>0.98.4</version>
+                  </artifactItem>
+				  <artifactItem>
+                     <groupId>org.lobobrowser.cobra</groupId>
+                     <artifactId>cobra-no-commons</artifactId>
+                     <version>0.98.4</version>
+                  </artifactItem>
+				  <artifactItem>
+                     <groupId>org.lobobrowser</groupId>
+                     <artifactId>lobo-js</artifactId>
+                     <version>0.0.1</version>
+                  </artifactItem>
+				  <artifactItem>
+                     <groupId>org.lobobrowser</groupId>
+                     <artifactId>lobo-primary</artifactId>
+                     <version>0.0.1</version>
+                  </artifactItem>
+                 </artifactItems>
+               <outputDirectory>./libraries/ext</outputDirectory>
+            </configuration>
+          </execution>
+
+			
 		</executions>
 	    </plugin>
 
@@ -133,8 +194,12 @@
                         <exclude name="libraries/tuxdroid-plugin-java-kit*" />
                         <exclude name="libraries/karmalab-commons*" />
                         <exclude name="libraries/tuxdroid-java-api*" />
+						<exclude name="libraries/lobo-js*" />
+						<exclude name="libraries/lobo-primary*" />
+						<exclude name="libraries/cobra*" />
                     </zipfileset>
 				    <zipfileset dir="." includes="executables/*" />
+					<zipfileset dir="." includes="libraries/ext/*" />
 				</zip>
 			    </tasks>
 			</configuration>
Modified: software_suite_v3/software/plugin/plugin-facebook/branches/new_login/resources/plugin.xml
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/branches/new_login/resources/plugin.xml	2010-02-22 12:31:57 UTC (rev 6069)
+++ software_suite_v3/software/plugin/plugin-facebook/branches/new_login/resources/plugin.xml	2010-02-26 14:04:00 UTC (rev 6070)
@@ -21,12 +21,6 @@
 			description="Login"
 			type="string"
 			defaultValue="your login" />
-        <parameter
-			category="Gadget parameters"
-			name="password"
-			description="Password"
-			type="password"
-			defaultValue="your password" />
 		<parameter
 			category="Gadget parameters"
 			name="notifyEmail"
@@ -70,7 +64,8 @@
 			description="Run to check your Facebook account" />
         <command
 			name="check"
-			description="Check your Facebook account" />
+			description="Check your Facebook account"
+		/>
         <command
 			name="configure"
 			description="Configure Tux Droid Facebook permissions" />
Modified: software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookConnection.java
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookConnection.java	2010-02-22 12:31:57 UTC (rev 6069)
+++ software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookConnection.java	2010-02-26 14:04:00 UTC (rev 6070)
@@ -38,7 +38,7 @@
 	/**
 	 * Try to get connected to fb with the old registered session.
 	 */
-	private boolean connectOldSession(String username, String password)
+	private boolean connectOldSession(String username)
 	{
 		try 
 		{
@@ -47,11 +47,7 @@
 			//Checking username.
 			if(! username.equalsIgnoreCase(FacebookSessionUtils.getMail()))
 			{
-				if(! password.equalsIgnoreCase(FacebookSessionUtils.getPass()))
-				{
-					//then a new user has logged in.
-					return false;
-				}
+				return false;
 			}
 			
 			String sessionKey = FacebookSessionUtils.getSessionKey();
@@ -75,32 +71,37 @@
 	
 	
 	
-	public boolean Connect(String username, String password) throws FacebookLoginException
+	public boolean Connect(String username) throws FacebookLoginException
 	{
+		//Checking for unique Facebook login process stuff.
+		if(! FacebookSessionUtils.isSingletonProgram("FacebookConnectFrame"))
+		{
+			return false;
+		}
+		
 		FacebookSessionUtils.setMail(username);
-		FacebookSessionUtils.setPass(password);
 		
 		//Facebook connection stuff.
 		
 		try 
 		{
 			//Returning if old session was still valid.
-			if(this.connectOldSession(username, password))
+			if(this.connectOldSession(username))
 			{
 				return true;
 			}
 			
 			FacebookSessionUtils.loadSession();
 			String sessionKey = FacebookSessionUtils.getValidSessionID( true );
-			FacebookSessionUtils.registerSessionKey(sessionKey);
+			FacebookSessionUtils.registerSessionKey();
 			
 			//Generate session secret, ready to pass to desktop app client
-			String sessionSecret = FacebookSessionUtils.lastClientUsed.getCacheSessionSecret();
-			FacebookSessionUtils.registerSessionSecret(sessionSecret);
+			String sessionSecret = FacebookSessionUtils.getSessionSecret();
+			FacebookSessionUtils.registerSessionSecret();
 			
 			client =  new FacebookJsonRestClient(FacebookSessionUtils.api_key, sessionSecret, sessionKey);
 			
-			if((sessionSecret == null) || (client == null))
+			if((sessionSecret.equals("0")) || (client.equals(null)))
 			{
 				return false;
 			}
@@ -111,6 +112,7 @@
 		} 
 		catch (FacebookException e) 
 		{
+			e.printStackTrace();
 			if(e.getMessage().equalsIgnoreCase("invalid parameter"))
 			{
 				throw new FacebookLoginException();
@@ -118,7 +120,7 @@
 		} 
 		catch (IOException e) 
 		{
-			//e.printStackTrace();
+			;
 		}
 		
 		return false;
Modified: software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookFunctions.java
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookFunctions.java	2010-02-22 12:31:57 UTC (rev 6069)
+++ software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookFunctions.java	2010-02-26 14:04:00 UTC (rev 6070)
@@ -100,7 +100,7 @@
 			JSONObject messages = (JSONObject) notifications.get("messages");
 			return messages.getInt("unread");
 		} 
-		catch (JSONException e) 
+		catch (Exception e) 
 		{
 			;
 		}
Modified: software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookPlugin.java
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookPlugin.java	2010-02-22 12:31:57 UTC (rev 6069)
+++ software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/FacebookPlugin.java	2010-02-26 14:04:00 UTC (rev 6070)
@@ -42,6 +42,8 @@
 	private FacebookFunctions functions;
 	private FacebookDatasStruct facebookHistory;
 	
+	private String type = null;
+	
 	/**
 	 * Throws the result in case of Check mode.
 	 */
@@ -67,7 +69,7 @@
 		if (this.getCommand().equalsIgnoreCase("configure"))
 		{
 			FacebookConnection facebook = new FacebookConnection();
-			if ( facebook.Connect(this.configuration().getLogin(), this.configuration().getPassword()) )
+			if ( facebook.Connect(this.configuration().getLogin()) )
 			{
 				functions = new FacebookFunctions(facebook.getClient());
 				this.doConfigure(functions);
@@ -99,12 +101,12 @@
 	public void RunOrCheck()
 	{
 		FacebookConnection facebook = new FacebookConnection();
-		
+		type = this.getCommand().toUpperCase();
 		boolean connected = false;
 		
 		try 
 		{
-			connected = facebook.Connect(this.configuration().getLogin(), this.configuration().getPassword());
+			connected = facebook.Connect(this.configuration().getLogin());
 		} 
 		catch (FacebookLoginException e) 
 		{
@@ -274,10 +276,18 @@
 		    for(String request : f_requests)
 			{
 		    	String fid = functions.getFriendRequestID(request);
-		    	if(! facebookHistory.isRegistered(FacebookDatasStruct.FRIENDS_QUERIES, fid))
+		    	if(! facebookHistory.isRegistered(FacebookDatasStruct.FRIENDS_QUERIES, fid, type))
 		    	{
 		    		throwRes();
-		    		this.facebookHistory.addFriendRequest(fid);
+		    		if(this.getCommand().equalsIgnoreCase("check"))
+		        	{
+		    			this.facebookHistory.addFriendRequest(fid, "CHECK");
+		        	}
+		    		else
+		    		{
+		    			this.facebookHistory.addFriendRequest(fid, "CHECK");
+		    			this.facebookHistory.addFriendRequest(fid, "RUN");
+		    		}
 		    		//Only throwing in the second cycle of check command or run.
 		    		if(this.getCommand().equalsIgnoreCase("run") || secondCycle)
 					{
@@ -319,10 +329,18 @@
 		    for(String group : g_invites)
 			{
 		    	String gid = functions.getGroupID(group);
-		    	if(! facebookHistory.isRegistered(FacebookDatasStruct.GROUP_INVITES, gid))
+		    	if(! facebookHistory.isRegistered(FacebookDatasStruct.GROUP_INVITES, gid, type))
 				{
 		    	    throwRes();
-		    	    this.facebookHistory.addGroupInvite(gid);
+		    	    if(this.getCommand().equalsIgnoreCase("check"))
+		        	{
+		    	    	this.facebookHistory.addGroupInvite(gid, "CHECK");
+		        	}
+		    	    else
+		    	    {
+		    	    	this.facebookHistory.addGroupInvite(gid, "CHECK");
+		    	    	this.facebookHistory.addGroupInvite(gid, "RUN");
+		    	    }
 		    	    //Only throwing in the second cycle of check command or run.
 		    		if(this.getCommand().equalsIgnoreCase("run") || secondCycle)
 					{
@@ -363,10 +381,18 @@
 		    for(String event : e_invites)
 			{
 		    	String eid = functions.getEventID( event );
-		    	if(! facebookHistory.isRegistered(FacebookDatasStruct.EVENT_INVITE, eid))
+		    	if(! facebookHistory.isRegistered(FacebookDatasStruct.EVENT_INVITE, eid, type))
 				{
 		    		throwRes();
-		    	    this.facebookHistory.addEventInvite(functions.getEventID(event));
+		    		if(this.getCommand().equalsIgnoreCase("check"))
+		        	{
+		    			this.facebookHistory.addEventInvite(functions.getEventID(event), "CHECK");
+		        	}
+		    		else
+		    		{
+		    			this.facebookHistory.addEventInvite(functions.getEventID(event), "CHECK");
+		    			this.facebookHistory.addEventInvite(functions.getEventID(event), "RUN");
+		    		}
 		    	    //Only throwing in the second cycle of check command or run.
 		    		if(this.getCommand().equalsIgnoreCase("run") || secondCycle)
 					{
Modified: software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/configuration/FacebookDatasStruct.java
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/configuration/FacebookDatasStruct.java	2010-02-22 12:31:57 UTC (rev 6069)
+++ software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/configuration/FacebookDatasStruct.java	2010-02-26 14:04:00 UTC (rev 6070)
@@ -148,27 +148,27 @@
 	/**
 	 * Add a reply to the reply hash table.
 	 */
-	public void addEventInvite(String event_id)
+	public void addEventInvite(String event_id, String type)
 	{
-		this.vktStruct.add(new String("eid:" + event_id));
+		this.vktStruct.add(new String("eid:" + event_id + "_" + type));
 	}
 	
 	
 	/**
 	 * Add a status for selected friend.
 	 */
-	public void addFriendRequest(String request_id)
+	public void addFriendRequest(String request_id, String type)
 	{
-		this.vktStruct.add(new String("fid:" + request_id));
+		this.vktStruct.add(new String("fid:" + request_id + "_" + type));
 	}
 	
 	
 	/**
 	 * Add a status for selected friend.
 	 */
-	public void addGroupInvite(String group_id)
+	public void addGroupInvite(String group_id, String type)
 	{
-		this.vktStruct.add(new String("gid:" + group_id));
+		this.vktStruct.add(new String("gid:" + group_id + "_" + type));
 	}
 	
 	
@@ -187,22 +187,46 @@
 	 * @param uuid.
 	 * @return
 	 */
-	public boolean isRegistered(byte list, String id)
+	public boolean isRegistered(byte list, String id, String type)
 	{
 		
 		switch(list)
 		{
 			case FacebookDatasStruct.FRIENDS_QUERIES:
-				return vktStruct.contains("fid:" + id);
+				if (type == "CHECK")
+				{
+					return ( vktStruct.contains("fid:" + id + "_" + "CHECK") ||
+							 vktStruct.contains("fid:" + id + "_" + "RUN"));
+				}
+				else
+				{
+					return vktStruct.contains("fid:" + id + "_" + type);
+				}
 			
 			case FacebookDatasStruct.MESSAGES:
 			    return vktStruct.contains("mes:" + id);
 				
 			case FacebookDatasStruct.GROUP_INVITES:
-			    return vktStruct.contains("gid:" + id);
+				if (type == "CHECK")
+				{
+					return (vktStruct.contains("gid:" + id+ "_" + "CHECK") ||
+					        vktStruct.contains("gid:" + id+ "_" + "RUN"));
+				}
+				else
+				{
+					return vktStruct.contains("gid:" + id+ "_" + type);
+				}
 			
 			case FacebookDatasStruct.EVENT_INVITE:
-			    return vktStruct.contains("eid:" + id);
+				if (type == "CHECK")
+				{
+					return (vktStruct.contains("eid:" + id+ "_" + "CHECK") ||
+							vktStruct.contains("eid:" + id+ "_" + "RUN"));
+				}
+				else
+				{
+					return vktStruct.contains("eid:" + id+ "_" + type);
+				}
 			
 			default:
 				return false;
Modified: software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/configuration/PluginFacebookConfiguration.java
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/configuration/PluginFacebookConfiguration.java	2010-02-22 12:31:57 UTC (rev 6069)
+++ software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/configuration/PluginFacebookConfiguration.java	2010-02-26 14:04:00 UTC (rev 6070)
@@ -27,7 +27,6 @@
 public class PluginFacebookConfiguration extends SimplePluginConfiguration{
 		
 	private String login = "";
-	private String password = "";
 	
 	private boolean showFriendRequests = true;
 	private boolean showGroupsInvites = true;
@@ -99,26 +98,6 @@
 	
 	
 	/**
-	 * Return tthe user password.
-	 * @return
-	 */
-	public String getPassword()
-	{
-		return this.password;
-	}
-	
-	
-	/**
-	 * Set the user password.
-	 * @param aPassword
-	 */
-	public void setPassword(String aPassword)
-	{
-		this.password = aPassword;
-	}
-	
-	
-	/**
 	 * Return true if user want to hear his email notifications.
 	 * @return
 	 */
Modified: software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/connection/FacebookSessionUtils.java
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/connection/FacebookSessionUtils.java	2010-02-22 12:31:57 UTC (rev 6069)
+++ software_suite_v3/software/plugin/plugin-facebook/branches/new_login/src/com/kysoh/plugins/facebook/connection/FacebookSessionUtils.java	2010-02-26 14:04:00 UTC (rev 6070)
@@ -22,7 +22,7 @@
 
 package com.kysoh.plugins.facebook.connection;
 
-
+import java.awt.event.WindowEvent;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -30,16 +30,22 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
 import java.util.Vector;
 
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpState;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
 
+import org.lobobrowser.gui.FramePanel;
+import org.lobobrowser.main.PlatformInit;
+import org.lobobrowser.ua.NavigationEvent;
+import org.lobobrowser.ua.NavigationListener;
+import org.lobobrowser.ua.NavigationVetoException;
+
 import com.google.code.facebookapi.FacebookException;
 import com.google.code.facebookapi.FacebookXmlRestClient;
+import com.kysoh.plugins.facebook.FacebookPlugin;
 
 public class FacebookSessionUtils {
 	
@@ -47,21 +53,26 @@
 	public static String s_key   = "0314c8569f89d0411e5a4823372ae27a";
 	
 	protected static String mail = "";
-	protected static String pass = "";
 	
 	public static String lastTokenUsed;
 	public static FacebookXmlRestClient lastClientUsed;
 	
 	
 	private static SerializedVector sessionUtils = new SerializedVector();
+	
+	static boolean loggedIn = false;
+	static String session_key = null;
+	static String session_secret = null;
+	static JFrame frame;
+	static boolean waitFor = true;
 
+	private static File lockFile = null; 
 	
 	static
 	{
 		sessionUtils.add("0");
 		sessionUtils.add("1");
 		sessionUtils.add(mail);
-		sessionUtils.add(pass);
 	}
 	
 	public static void setMail(String eMail)
@@ -71,42 +82,155 @@
 	}
 	
 	
-	public static void setPass(String aPass)
-	{
-		pass = aPass;
-		sessionUtils.add(aPass);
-	}
-	
-	
 	public static String getValidSessionID( boolean generateSessionSecret) 
 	              throws IOException, FacebookException {
 		
 		
 		FacebookXmlRestClient client = new FacebookXmlRestClient( api_key, s_key );
 		String token = client.auth_createToken();
-
-		HttpClient http = new HttpClient();
-        http.setState(new HttpState());
-
-        final String LOGIN = "http://www.facebook.com/login.php";
         
-        GetMethod get = new GetMethod(LOGIN + "?api_key=" + api_key + "&v=1.0&auth_token=" + token );
-        
-        http.executeMethod(get);
+		String url = "http://www.facebook.com/login.php?api_key="+ api_key + "&connect_display=popup&v=1.0"+
+        "&next=http://www.facebook.com/connect/login_success.html" +
+        "&cancel_url=http://www.facebook.com/connect/login_failure.html&"+
+        "fbconnect=true&return_session=true&session_key_only=true&email=" + mail;
 
-        PostMethod post = new PostMethod(LOGIN);
-        post.addParameter(new NameValuePair("api_key", api_key));
-        post.addParameter(new NameValuePair("v", "1.0"));
-        post.addParameter(new NameValuePair("auth_token", token));
-        post.addParameter(new NameValuePair("email", mail));
-        post.addParameter(new NameValuePair("pass", pass));
 
-        http.executeMethod(post);
+		//Creating lobo browser panel.
+		try 
+		{
+		    PlatformInit.getInstance().initLogging(false);
+		    PlatformInit.getInstance().init(false, false);
+		} 
+		catch (Exception e2) {
+		;
+		}
+		
+		frame = new JFrame();
+		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+		frame.setSize(600, 400);
+		frame.setLocationRelativeTo(null);
+		
+		frame.setTitle("Facebook Connect ( Tux Droid )");
+		
+		FramePanel browser = new FramePanel();
+		
+		frame.getContentPane().add(browser);
+		
+		frame.setVisible(true);
+		frame.setAlwaysOnTop( true );
+		String loc = FacebookPlugin.class.getProtectionDomain().getCodeSource().getLocation().getPath();
+		loc = loc.substring(0, loc.lastIndexOf("/"));
+		File f = new File(loc + "/../resources/plugin.png");
+		ImageIcon img = new ImageIcon(f.getAbsolutePath());
+		frame.setIconImage(img.getImage());
+		
+		try 
+		{
+		browser.navigate(url);
+		} 
+		catch (MalformedURLException e1) 
+		{
+		;
+		}
+		
+		// Add a navigation listener.
+		browser.addNavigationListener(new NavigationListener()
+		{
+		
+		@Override
+		public void beforeLocalNavigate(NavigationEvent arg0) throws NavigationVetoException 
+		{
+			//login success ( login fail in all other cases ).
+			if(arg0.getURL().toString().contains("login_success.html"))
+			{
+				//System.out.println(arg0.getURL().toString());
+				//Getting session key.
+				if(arg0.getURL().toString().contains("session_key"))
+				{
+					loggedIn = true;
+					int bIdx = arg0.getURL().toString().indexOf("session_key");
+					session_key = arg0.getURL().toString().substring(bIdx);
+					
+					try 
+					{
+						//Re-encoding url.
+						session_key = java.net.URLDecoder.decode(session_key, "UTF-8");
+					} 
+					catch (UnsupportedEncodingException e) 
+					{
+						loggedIn = false;
+					}
+					String[] params = session_key.split(",");
+					
+					for (String str : params )
+					{
+						if (str.contains("session_key"))
+						{
+							session_key = str.substring("session_key".length() + 3);
+							session_key = session_key.substring(0, session_key.length() - 1);
+						}
+						
+						if(str.contains("secret"))
+						{
+							session_secret = str.substring("secret".length() + 4);
+							session_secret = session_secret.substring(0, session_secret.length() - 1);
+							frame.dispose();
+							waitFor = false;
+						}
+					} 
+				}
+				else
+				{
+					loggedIn = false;
+				}
+			}
+		}
+		
+		@Override
+		public void beforeNavigate(NavigationEvent arg0) throws NavigationVetoException {
+			;
+		}
+		
+		@Override
+		public void beforeWindowOpen(NavigationEvent arg0) throws NavigationVetoException {
+			;
+		}
+		
+		});
+		
+		
+		frame.addWindowListener(new java.awt.event.WindowAdapter() 
+		{
+		public void windowClosing(WindowEvent e)
+		{
+			waitFor = false;
+		}
+		});
+		
+		//Wait for navigator.
+		while(waitFor)
+		{
+		try 
+		{
+			Thread.sleep(1000);
+		} 
+		catch (InterruptedException e) 
+		{
+			;
+		}
+		}
 
-		String sessionID = client.auth_getSession( token, generateSessionSecret );
 		lastTokenUsed = token;
 		lastClientUsed = client;
-		return sessionID;
+		registerSessionSecret();
+		registerSessionKey();
+		
+		if(FacebookSessionUtils.lockFile.exists())
+		{
+			FacebookSessionUtils.lockFile.delete();
+		}
+		
+		return session_key;
 	}
 	
 	
@@ -114,9 +238,9 @@
 	 * Register the last known session secret.
 	 * @param aSessionSecret
 	 */
-	public static void registerSessionSecret(String aSessionSecret)
+	public static void registerSessionSecret()
 	{
-		sessionUtils.set(0, new String(aSessionSecret));
+		sessionUtils.set(0, new String(session_secret));
 	}
 	
 	
@@ -142,22 +266,12 @@
 	
 	
 	/**
-	 * Return last used pass.
-	 * @return
-	 */
-	public static String getPass()
-	{
-		return (String) sessionUtils.get( 3 );
-	}
-	
-	
-	/**
 	 * Register the last known session key.
 	 * @param aSessionKey
 	 */
-	public static void registerSessionKey(String aSessionKey)
+	public static void registerSessionKey()
 	{
-		sessionUtils.set(1, new String(aSessionKey));
+		sessionUtils.set(1, new String(session_key));
 	}
 	
 	
@@ -167,6 +281,11 @@
 	 */
 	public static String getSessionKey()
 	{
+		if (sessionUtils.get(1) != null)
+		{
+			session_key = sessionUtils.get(1);
+		}
+		
 		return (String) sessionUtils.get( 1 );
 	}
 	
@@ -175,16 +294,15 @@
 	/**
 	 * Load the serialized vector containing old session datas.
 	 */
-	public static void loadSession()
+	public static boolean loadSession()
 	{
 		try 
 		{   
-			File path = new File("");
-		    File session = new File( path.getAbsolutePath() + File.separator + "session_" + mail);
+		    File session = new File( getCachePath() );
 		    
 		    if(session.isFile())
 		    {
-		    	FileInputStream fichier = new FileInputStream("session_" + mail);  
+		    	FileInputStream fichier = new FileInputStream(session.getAbsolutePath());  
 		    	ObjectInputStream ois = new ObjectInputStream(fichier);
 		    	sessionUtils = (SerializedVector) ois.readObject();  
 		    }
@@ -194,7 +312,7 @@
 		    	sessionUtils.add("0");
 		    	sessionUtils.add("0");
 		    	sessionUtils.add(mail);
-		    	sessionUtils.add(pass);
+		    	return false;
 		    }
 		 }   
 		 catch (java.io.IOException e) 
@@ -205,6 +323,7 @@
 		 {  
 		      e.printStackTrace();  
 		 }  
+		 return true;
 	}
 	
 	
@@ -221,8 +340,7 @@
 		
 		try 
 		{  
-			File path = new File("");
-		    File session = new File( path.getAbsolutePath() + File.separator + "session_" + mail);
+		    File session = new File( getCachePath() );
 		    FileOutputStream file = new FileOutputStream(session.getAbsolutePath());  
 		    ObjectOutputStream oos = new ObjectOutputStream(file);  
 		    oos.writeObject(sessionUtils);  
@@ -235,6 +353,13 @@
 		 }  
 	}
 	
+	
+	public static String getCachePath()
+	{
+		File f = new File(System.getProperty("java.io.tmpdir") + "/session_" + mail);
+		return f.getAbsolutePath();
+	}
+	
 	/**
 	 * Handle a serialized vector of vector<String>
 	 */
@@ -249,4 +374,29 @@
 		}
 		
 	}
+	
+	
+	public static synchronized Boolean isSingletonProgram(String name)
+	{
+        Boolean statut = true;
+        String tmpdir = System.getProperty("java.io.tmpdir");
+        
+        File temporaryFile = new File(tmpdir + "/" + name +".tmp");
+        statut = !temporaryFile.exists();
+        
+        if(statut){
+            try 
+            {
+				temporaryFile.createNewFile();
+				temporaryFile.deleteOnExit();
+				FacebookSessionUtils.lockFile = temporaryFile;
+			} catch (IOException e) 
+			{
+				statut = true;
+			}
+        }
+        
+        return statut;
+    }
+
 }
 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-02-22 15:00:50
      
     | 
| Author: jerome
Date: 2010-02-22 13:31:57 +0100 (Mon, 22 Feb 2010)
New Revision: 6069
Modified:
   software_suite_v3/software/plugin/plugin-facebook/trunk/pom.xml
Log:
* Added new dependencies.
Modified: software_suite_v3/software/plugin/plugin-facebook/trunk/pom.xml
===================================================================
--- software_suite_v3/software/plugin/plugin-facebook/trunk/pom.xml	2010-02-19 12:14:54 UTC (rev 6068)
+++ software_suite_v3/software/plugin/plugin-facebook/trunk/pom.xml	2010-02-22 12:31:57 UTC (rev 6069)
@@ -56,11 +56,36 @@
       <artifactId>facebook-java-api-schema</artifactId>
       <version>2.1.1</version>
     </dependency>
-    <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-      <version>3.1</version>
+	<dependency>
+      <groupId>org.lobobrowser</groupId>
+      <artifactId>lobo</artifactId>
+      <version>0.9.8</version>
     </dependency>
+	<dependency>
+      <groupId>org.lobobrowser</groupId>
+      <artifactId>lobo-pub</artifactId>
+      <version>0.9.8</version>
+    </dependency>
+	<dependency>
+      <groupId>org.lobobrowser.cobra</groupId>
+      <artifactId>cobra</artifactId>
+      <version>0.98.4</version>
+    </dependency>
+	<dependency>
+      <groupId>org.lobobrowser.cobra</groupId>
+      <artifactId>cobra-no-commons</artifactId>
+      <version>0.98.4</version>
+    </dependency>
+	<dependency>
+      <groupId>org.lobobrowser</groupId>
+      <artifactId>lobo-js</artifactId>
+      <version>0.0.1</version>
+    </dependency>
+	<dependency>
+      <groupId>org.lobobrowser</groupId>
+      <artifactId>lobo-primary</artifactId>
+      <version>0.0.1</version>
+    </dependency>
 		
     </dependencies>
     
@@ -96,7 +121,8 @@
 		<groupId>org.apache.maven.plugins</groupId>
 		<artifactId>maven-dependency-plugin</artifactId>
 		<executions>
-		    <execution>
+		    
+			<execution>
 			<id>copy-dependencies</id>
 			<phase>package</phase>
 			<goals>
@@ -106,6 +132,41 @@
 			    <outputDirectory>./libraries</outputDirectory>
 			</configuration>
 		    </execution>
+			
+			<execution>
+            <id>copy-dependency</id>
+            <phase>package</phase>
+            <goals>
+              <goal>copy</goal>
+            </goals>
+            <configuration>
+                <artifactItems>
+                  <artifactItem>
+                     <groupId>org.lobobrowser.cobra</groupId>
+                     <artifactId>cobra</artifactId>
+                     <version>0.98.4</version>
+                  </artifactItem>
+				  <artifactItem>
+                     <groupId>org.lobobrowser.cobra</groupId>
+                     <artifactId>cobra-no-commons</artifactId>
+                     <version>0.98.4</version>
+                  </artifactItem>
+				  <artifactItem>
+                     <groupId>org.lobobrowser</groupId>
+                     <artifactId>lobo-js</artifactId>
+                     <version>0.0.1</version>
+                  </artifactItem>
+				  <artifactItem>
+                     <groupId>org.lobobrowser</groupId>
+                     <artifactId>lobo-primary</artifactId>
+                     <version>0.0.1</version>
+                  </artifactItem>
+                 </artifactItems>
+               <outputDirectory>./libraries/ext</outputDirectory>
+            </configuration>
+          </execution>
+
+			
 		</executions>
 	    </plugin>
 
@@ -133,8 +194,12 @@
                         <exclude name="libraries/tuxdroid-plugin-java-kit*" />
                         <exclude name="libraries/karmalab-commons*" />
                         <exclude name="libraries/tuxdroid-java-api*" />
+						<exclude name="libraries/lobo-js*" />
+						<exclude name="libraries/lobo-primary*" />
+						<exclude name="libraries/cobra*" />
                     </zipfileset>
 				    <zipfileset dir="." includes="executables/*" />
+					<zipfileset dir="." includes="libraries/ext/*" />
 				</zip>
 			    </tasks>
 			</configuration>
 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-02-19 14:40:45
      
     | 
| Author: jerome Date: 2010-02-19 13:14:54 +0100 (Fri, 19 Feb 2010) New Revision: 6068 Modified: software_suite_v3/software/plugin/plugin-facebook/trunk/src/com/kysoh/plugins/facebook/connection/FacebookSessionUtils.java Log: * Removed old login stuff. Modified: software_suite_v3/software/plugin/plugin-facebook/trunk/src/com/kysoh/plugins/facebook/connection/FacebookSessionUtils.java =================================================================== --- software_suite_v3/software/plugin/plugin-facebook/trunk/src/com/kysoh/plugins/facebook/connection/FacebookSessionUtils.java 2010-02-19 12:11:33 UTC (rev 6067) +++ software_suite_v3/software/plugin/plugin-facebook/trunk/src/com/kysoh/plugins/facebook/connection/FacebookSessionUtils.java 2010-02-19 12:14:54 UTC (rev 6068) @@ -32,12 +32,6 @@ import java.io.Serializable; import java.util.Vector; -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.HttpState; -import org.apache.commons.httpclient.NameValuePair; -import org.apache.commons.httpclient.methods.GetMethod; -import org.apache.commons.httpclient.methods.PostMethod; - import com.google.code.facebookapi.FacebookException; import com.google.code.facebookapi.FacebookXmlRestClient; @@ -84,29 +78,12 @@ FacebookXmlRestClient client = new FacebookXmlRestClient( api_key, s_key ); String token = client.auth_createToken(); - - HttpClient http = new HttpClient(); - http.setState(new HttpState()); - - final String LOGIN = "http://www.facebook.com/login.php"; - GetMethod get = new GetMethod(LOGIN + "?api_key=" + api_key + "&v=1.0&auth_token=" + token ); - http.executeMethod(get); - PostMethod post = new PostMethod(LOGIN); - post.addParameter(new NameValuePair("api_key", api_key)); - post.addParameter(new NameValuePair("v", "1.0")); - post.addParameter(new NameValuePair("auth_token", token)); - post.addParameter(new NameValuePair("email", mail)); - post.addParameter(new NameValuePair("pass", pass)); - - http.executeMethod(post); - - String sessionID = client.auth_getSession( token, generateSessionSecret ); lastTokenUsed = token; lastClientUsed = client; - return sessionID; + return ""; } | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-02-19 12:11:45
      
     | 
| Author: jerome Date: 2010-02-19 13:11:33 +0100 (Fri, 19 Feb 2010) New Revision: 6067 Added: software_suite_v3/software/plugin/plugin-facebook/tags/3.0/ Log: * Tagged version 3.0 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-02-19 12:10:34
      
     | 
| Author: jerome Date: 2010-02-19 13:10:19 +0100 (Fri, 19 Feb 2010) New Revision: 6066 Added: software_suite_v3/software/plugin/plugin-facebook/branches/new_login/ Log: * Created a new branch to change login procedure. | 
| 
      
      
      From: remi <c2m...@c2...> - 2010-02-15 15:11:44
      
     | 
| Author: remi
Date: 2010-02-15 16:10:50 +0100 (Mon, 15 Feb 2010)
New Revision: 6065
Modified:
   software_suite_v3/smart-core/smart-api/python/trunk/tuxisalive/api/tuxdroid/SoundFlash.py
Log:
*Forgot an argument in this method
Modified: software_suite_v3/smart-core/smart-api/python/trunk/tuxisalive/api/tuxdroid/SoundFlash.py
===================================================================
--- software_suite_v3/smart-core/smart-api/python/trunk/tuxisalive/api/tuxdroid/SoundFlash.py	2010-02-11 15:48:19 UTC (rev 6064)
+++ software_suite_v3/smart-core/smart-api/python/trunk/tuxisalive/api/tuxdroid/SoundFlash.py	2010-02-15 15:10:50 UTC (rev 6065)
@@ -88,7 +88,7 @@
             return SOUND_REFLASH_ERROR_PARAMETERS
         tracks = ""
         for wav in wavList:
-            if not self._checkObjectType(wav, "str"):
+            if not self._checkObjectType('wav', wav, "str"):
                 return SOUND_REFLASH_ERROR_PARAMETERS
             tracks = "%s%s|" % (tracks, wav)
         tracks = tracks[:-1]
 | 
| 
      
      
      From: remi <c2m...@c2...> - 2010-02-11 15:48:37
      
     | 
| Author: remi Date: 2010-02-11 16:48:19 +0100 (Thu, 11 Feb 2010) New Revision: 6064 Modified: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/de.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/default.pot software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/en.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/fr.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/nl.po Log: * Fixed yahoo tts_fixes Modified: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/de.po =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/de.po 2010-02-11 14:01:33 UTC (rev 6063) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/de.po 2010-02-11 15:48:19 UTC (rev 6064) @@ -1,2 +1,2 @@ -msgid "Yahoo" +msgid "Yahoo!" msgstr "yachou" Modified: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/default.pot =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/default.pot 2010-02-11 14:01:33 UTC (rev 6063) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/default.pot 2010-02-11 15:48:19 UTC (rev 6064) @@ -1,2 +1,2 @@ -msgid "Yahoo" +msgid "Yahoo!" msgstr "" Modified: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/en.po 2010-02-11 14:01:33 UTC (rev 6063) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/en.po 2010-02-11 15:48:19 UTC (rev 6064) @@ -1,2 +1,2 @@ -msgid "Yahoo" +msgid "Yahoo!" msgstr "yahou" Modified: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/fr.po 2010-02-11 14:01:33 UTC (rev 6063) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/fr.po 2010-02-11 15:48:19 UTC (rev 6064) @@ -1,2 +1,2 @@ -msgid "Yahoo" +msgid "Yahoo!" msgstr "yahou" \ No newline at end of file Modified: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/nl.po 2010-02-11 14:01:33 UTC (rev 6063) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/nl.po 2010-02-11 15:48:19 UTC (rev 6064) @@ -1,2 +1,2 @@ -msgid "Yahoo" +msgid "Yahoo!" msgstr "yahoe" | 
| 
      
      
      From: remi <c2m...@c2...> - 2010-02-11 14:01:45
      
     | 
| Author: remi Date: 2010-02-11 15:01:33 +0100 (Thu, 11 Feb 2010) New Revision: 6063 Added: software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/ software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.png software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.pot software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.xml software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/help.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/de.po software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/de.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/en.po software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/en.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/fr.po software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/fr.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.png software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.pot software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.xml software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/help.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/nl.po software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/nl.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/de.po software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/de.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/en.po software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/en.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/fr.po software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/fr.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.png software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.pot software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.xml software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/help.wiki software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/nl.po software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/nl.wiki Modified: software_suite_v3/software/gadget/default/trunk/names_to_uuids_list.txt software_suite_v3/software/gadget/online_only/trunk/names_to_uuids_list.txt Log: * Added Hotmail, Yahoo and Valentine gadgets Added: software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.pot =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.pot (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.pot 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Tux Valentine" +msgstr "" + +msgid "Tux Valentine" +msgstr "" + +msgid "Happy Valentux..." +msgstr "" Added: software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.xml =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.xml (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/gadget.xml 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,43 @@ +<gadget> + <description> + <author>Kysoh</author> + <category>Misc</category> + <defaultLanguage>all</defaultLanguage> + <description>Happy Valentux...</description> + <iconFile>gadget.png</iconFile> + <name>Tux Valentine</name> + <onDemandIsAble>false</onDemandIsAble> + <platform>all</platform> + <ttsName>Tux Valentine</ttsName> + <uuid>25ad17f4-45d5-bfce-5670-f7e856dd0080</uuid> + <version>0.0.1</version> + </description> + <parameters> + <param_00> + <defaultValue>Normal</defaultValue> + <name>frequency</name> + <visible>true</visible> + </param_00> + <param_01> + <defaultValue> </defaultValue> + <name>locutor</name> + <visible>false</visible> + </param_01> + </parameters> + <parentPlugin> + <url>http://ftp.kysoh.com/</url> + <uuid>110fb66b-d43e-4fbf-a692-02659aa0a622</uuid> + <version>0.0.1</version> + </parentPlugin> + <tasks> + <task_00> + <activated>true</activated> + <date>0000/00/00</date> + <delay>00:00:10</delay> + <hoursBegin>00:00:00</hoursBegin> + <hoursEnd>23:59:59</hoursEnd> + <name>Activation</name> + <weekMask>true,true,true,true,true,true,true</weekMask> + </task_00> + </tasks> +</gadget> Added: software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/help.wiki =================================================================== --- software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/help.wiki (rev 0) +++ software_suite_v3/software/gadget/default/trunk/gadget_25ad17f4-45d5-bfce-5670-f7e856dd0080/help.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,2 @@ +=Description= +Happy Valentux... 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-02-11 13:49:43 UTC (rev 6062) +++ software_suite_v3/software/gadget/default/trunk/names_to_uuids_list.txt 2010-02-11 14:01:33 UTC (rev 6063) @@ -10,3 +10,4 @@ E-Mail : 84628d00-1e17-62dd-eaa4-7b11436f3211 GMail : 06d0b3ba-7781-4d2d-bd48-520cfa18e0c9 RSS : d71cec40-c44e-73d7-e63f-a152986354e0 +Valentine : 25ad17f4-45d5-bfce-5670-f7e856dd0080 Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/de.po =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/de.po (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/de.po 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Hotmail" +msgstr "Hotmail" + +msgid "Hotmail" +msgstr "Hotmail" + +msgid "Hotmail Plugin" +msgstr "Mit der Hotmail-Funktion kann Tux Droid Ihre E-Mails prüfen." Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/de.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/de.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/de.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,13 @@ += Beschreibung = +Mit der Hotmail-Funktion kann Tux Droid Ihre E-Mails prüfen. + += Funktionseinstellungen = +* '''Funktionsname :''' Damit können Sie die Gadget-Namen zu ändern. +* '''Benutzername :''' Login Ihres Hotmail-Kontos. +* '''Kennwort :''' Kennwort Ihres Hotmail-Kontos. +* '''Diese Gadget wird in die Favoritenliste aufgenommen :''' Diese Option aktivieren, um die Funktion in Ihrer Favoriten- +Liste hinzufügen. + += Hinweise = +* '''Prüfen Sie mein Hotmail-Konto automatisch :''' Geben Sie an, dass Ihre Mailbox automatisch geprüft werden soll. +* '''Ankündigungsmeldungen :''' Geben sie einen Attitune für die automatische Hotmail-Prüfung durch Ihren Tux Droid an. \ No newline at end of file Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/en.po =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/en.po (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/en.po 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Hotmail" +msgstr "Hotmail" + +msgid "Hotmail" +msgstr "Hotmail" + +msgid "Hotmail Plugin" +msgstr "With the Hotmail gadget Tux Droid can check your E-mails." Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/en.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/en.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/en.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,12 @@ += Description = +This gadget makes Tux Droid read the sender and the subject of your incoming E-mail. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Username :''' Enter your Hotmail account login. +* '''Password :''' Enter your Hotmail account password. +* '''Add this gadget to My Favorites list :''' To make the gadget accessible with the remote control and Tux Droid. + += Alerts = +* '''Check my Hotmail account automatically :''' Tux Droid will check for new E-mail by himself. +* '''Introduction attitune :''' Specify an introduction attitune for when the gadget is started automatically. \ No newline at end of file Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/fr.po =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/fr.po (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/fr.po 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Hotmail" +msgstr "Hotmail" + +msgid "Hotmail" +msgstr "Hotmail" + +msgid "Hotmail Plugin" +msgstr "Avec le gadget Hotmail Tux Droid peut vérifier vos E-mails." Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/fr.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/fr.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/fr.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,12 @@ += Description = +Ce gadget permet à Tux droid de lire l'expéditeur et le sujet de votre courrier entrant. + += Paramètres = +* '''Nom du gadget :''' Modifier le nom du gadget. +* '''Nom de l´utilisateur :''' Entrer votre login de connexion. +* '''Mot de passe :''' Entrer votre mot de passe de connexion. +* '''Ce gadget sera placé dans la liste des favoris :''' Pour rendre le gadget accessible avec la télécommande et Tux Droid. + += Alertes = +* '''M´avertir des nouveux messages en temps réel :''' Tux Droid va vérifier l'arrivé de vos nouveaux messages. +* '''Introdution des alertes :''' Spécifie une attitune en introduction des messages d'alerte du gadget. \ No newline at end of file Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.pot =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.pot (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.pot 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Hotmail" +msgstr "" + +msgid "Hotmail" +msgstr "" + +msgid "Hotmail Plugin" +msgstr "" Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.xml =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.xml (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/gadget.xml 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,58 @@ +<gadget> + <description> + <author>Jerome Conan</author> + <category>Misc</category> + <defaultLanguage>all</defaultLanguage> + <description>Hotmail Plugin</description> + <iconFile>gadget.png</iconFile> + <name>Hotmail</name> + <onDemandIsAble>true</onDemandIsAble> + <platform>all</platform> + <ttsName>Hotmail</ttsName> + <uuid>41ff6889-26cc-16f1-fc79-bf0aa38624c9</uuid> + <version>1.0</version> + </description> + <parameters> + <param_00> + <defaultValue> </defaultValue> + <name>locutor</name> + <visible>false</visible> + </param_00> + <param_01> + <defaultValue>_secret_</defaultValue> + <name>password</name> + <visible>true</visible> + </param_01> + <param_02> + <defaultValue>true</defaultValue> + <name>readSubject</name> + <visible>false</visible> + </param_02> + <param_03> + <defaultValue>your_user</defaultValue> + <name>user</name> + <visible>true</visible> + </param_03> + <param_04> + <defaultValue>true</defaultValue> + <name>readSender</name> + <visible>false</visible> + </param_04> + </parameters> + <parentPlugin> + <url>http://ftp.kysoh.com/</url> + <uuid>f63af23e-1fe0-4389-b89b-bc5c8185a6b2</uuid> + <version>1.0</version> + </parentPlugin> + <tasks> + <task_00> + <activated>false</activated> + <date>0000/00/00</date> + <delay>00:05:00</delay> + <hoursBegin>00:00:00</hoursBegin> + <hoursEnd>23:59:59</hoursEnd> + <name>Start every x</name> + <weekMask>true,true,true,true,true,true,true</weekMask> + </task_00> + </tasks> +</gadget> Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/help.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/help.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/help.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,12 @@ += Description = +This gadget makes Tux Droid read the sender and the subject of your incoming E-mail. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Username :''' Enter your Hotmail account login. +* '''Password :''' Enter your Hotmail account password. +* '''Add this gadget to My Favorites list :''' To make the gadget accessible with the remote control and Tux Droid. + += Alerts = +* '''Check my Hotmail account automatically :''' Tux Droid will check for new E-mail by himself. +* '''Introduction attitune :''' Specify an introduction attitune for when the gadget is started automatically. \ No newline at end of file Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/nl.po =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/nl.po (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/nl.po 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Hotmail" +msgstr "Hotmail" + +msgid "Hotmail" +msgstr "Hotmail" + +msgid "Hotmail Plugin" +msgstr "Met de Hotmail gadget zal Tux Droid je E-mails checken." Added: software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/nl.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/nl.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_41ff6889-26cc-16f1-fc79-bf0aa38624c9/nl.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,12 @@ += Beschrijving = +Met deze gadget kan Tux Droid de afzender en het onderwerp van je E-mails lezen. + += Configuratie = +* '''Gadget naam :''' Hier kan je de naam van de gadget wijzigen. +* '''Gebruikersnaam :''' Geef je Hotmail account login in. +* '''Wachtwoord :''' Geef je Hotmail account wachtwoord in. +* '''Plaats deze gadget in mijn Favorieten :''' Om de gadget met de afstandsbediening of via Tux Droid te starten. + += Alarmen = +* '''Check mijn Hotmail account automatisch :''' Tux Droid zal je E-mail automatisch te checken. +* '''Introductie attitune :''' Selecteer een introductie attitune voor wanneer de gadget automatisch gestart wordt. \ No newline at end of file Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/de.po =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/de.po (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/de.po 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Yahoo" +msgstr "Yahoo! Mail" + +msgid "Yahoo" +msgstr "Yahoo! Mail" + +msgid "Yahoo Plugin" +msgstr "Mit der Yahoo! Mail-Funktion kann Tux Droid Ihre E-Mails prüfen." Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/de.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/de.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/de.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,13 @@ += Beschreibung = +Mit der Yahoo! Mail-Funktion kann Tux Droid Ihre E-Mails prüfen. + += Funktionseinstellungen = +* '''Funktionsname :''' Damit können Sie die Gadget-Namen zu ändern. +* '''Benutzername :''' Login Ihres Yahoo! Mail-Kontos. +* '''Kennwort :''' Kennwort Ihres Yahoo! Mail-Kontos. +* '''Diese Gadget wird in die Favoritenliste aufgenommen :''' Diese Option aktivieren, um die Funktion in Ihrer Favoriten- +Liste hinzufügen. + += Hinweise = +* '''Prüfen Sie mein Yahoo! Mail-Konto automatisch :''' Geben Sie an, dass Ihre Mailbox automatisch geprüft werden soll. +* '''Ankündigungsmeldungen :''' Geben sie einen Attitune für die automatische Yahoo! Mail-Prüfung durch Ihren Tux Droid an. \ No newline at end of file Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/en.po =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/en.po (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/en.po 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Yahoo" +msgstr "Yahoo! Mail" + +msgid "Yahoo" +msgstr "Yahoo! Mail" + +msgid "Yahoo Plugin" +msgstr "With the Yahoo! Mail gadget Tux Droid can check your E-mails." Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/en.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/en.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/en.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,12 @@ += Description = +This gadget makes Tux Droid read the sender and the subject of your incoming E-mail. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Username :''' Enter your Yahoo! Mail account login. +* '''Password :''' Enter your Yahoo! Mail account password. +* '''Add this gadget to My Favorites list :''' To make the gadget accessible with the remote control and Tux Droid. + += Alerts = +* '''Check my Yahoo! Mail account automatically :''' Tux Droid will check for new E-mail by himself. +* '''Introduction attitune :''' Specify an introduction attitune for when the gadget is started automatically. \ No newline at end of file Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/fr.po =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/fr.po (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/fr.po 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Yahoo" +msgstr "Yahoo! Mail" + +msgid "Yahoo" +msgstr "Yahoo! Mail" + +msgid "Yahoo Plugin" +msgstr "Avec le gadget Yahoo! Mail Tux Droid peut vérifier vos E-mails." Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/fr.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/fr.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/fr.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,12 @@ += Description = +Ce gadget permet à Tux droid de lire l'expéditeur et le sujet de votre courrier entrant. + += Paramètres = +* '''Nom du gadget :''' Modifier le nom du gadget. +* '''Nom de l´utilisateur :''' Entrer votre login de connexion. +* '''Mot de passe :''' Entrer votre mot de passe de connexion. +* '''Ce gadget sera placé dans la liste des favoris :''' Pour rendre le gadget accessible avec la télécommande et Tux Droid. + += Alertes = +* '''M´avertir des nouveux messages en temps réel :''' Tux Droid va vérifier l'arrivé de vos nouveaux messages. +* '''Introdution des alertes :''' Spécifie une attitune en introduction des messages d'alerte du gadget. \ No newline at end of file Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.pot =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.pot (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.pot 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Yahoo" +msgstr "" + +msgid "Yahoo" +msgstr "" + +msgid "Yahoo Plugin" +msgstr "" Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.xml =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.xml (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/gadget.xml 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,58 @@ +<gadget> + <description> + <author>Jerome Conan</author> + <category>Misc</category> + <defaultLanguage>all</defaultLanguage> + <description>Yahoo Plugin</description> + <iconFile>gadget.png</iconFile> + <name>Yahoo</name> + <onDemandIsAble>true</onDemandIsAble> + <platform>all</platform> + <ttsName>Yahoo</ttsName> + <uuid>84a7480e-35a9-e948-f346-d40a61d27c06</uuid> + <version>1.0</version> + </description> + <parameters> + <param_00> + <defaultValue> </defaultValue> + <name>locutor</name> + <visible>false</visible> + </param_00> + <param_01> + <defaultValue>_secret_</defaultValue> + <name>password</name> + <visible>true</visible> + </param_01> + <param_02> + <defaultValue>true</defaultValue> + <name>readSubject</name> + <visible>false</visible> + </param_02> + <param_03> + <defaultValue>your_user</defaultValue> + <name>user</name> + <visible>true</visible> + </param_03> + <param_04> + <defaultValue>true</defaultValue> + <name>readSender</name> + <visible>false</visible> + </param_04> + </parameters> + <parentPlugin> + <url>http://ftp.kysoh.com/</url> + <uuid>f63af23e-1fe0-4389-b89b-acdc8115a6c6</uuid> + <version>1.0</version> + </parentPlugin> + <tasks> + <task_00> + <activated>false</activated> + <date>0000/00/00</date> + <delay>00:03:00</delay> + <hoursBegin>00:00:00</hoursBegin> + <hoursEnd>23:59:59</hoursEnd> + <name>Start every x</name> + <weekMask>true,true,true,true,true,true,true</weekMask> + </task_00> + </tasks> +</gadget> Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/help.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/help.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/help.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,12 @@ += Description = +This gadget makes Tux Droid read the sender and the subject of your incoming E-mail. + += Settings = +* '''Gadget name :''' Let's you modify the gadget name. +* '''Username :''' Enter your Yahoo! Mail account login. +* '''Password :''' Enter your Yahoo! Mail account password. +* '''Add this gadget to My Favorites list :''' To make the gadget accessible with the remote control and Tux Droid. + += Alerts = +* '''Check my Yahoo! Mail account automatically :''' Tux Droid will check for new E-mail by himself. +* '''Introduction attitune :''' Specify an introduction attitune for when the gadget is started automatically. \ No newline at end of file Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/nl.po =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/nl.po (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/nl.po 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,8 @@ +msgid "Yahoo" +msgstr "Yahoo! Mail" + +msgid "Yahoo" +msgstr "Yahoo! Mail" + +msgid "Yahoo Plugin" +msgstr "Met de Yahoo! Mail gadget zal Tux Droid je E-mails checken." Added: software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/nl.wiki =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/nl.wiki (rev 0) +++ software_suite_v3/software/gadget/online_only/trunk/gadget_84a7480e-35a9-e948-f346-d40a61d27c06/nl.wiki 2010-02-11 14:01:33 UTC (rev 6063) @@ -0,0 +1,12 @@ += Beschrijving = +Met deze gadget kan Tux Droid de afzender en het onderwerp van je E-mails lezen. + += Configuratie = +* '''Gadget naam :''' Hier kan je de naam van de gadget wijzigen. +* '''Gebruikersnaam :''' Geef je Yahoo! Mail account login in. +* '''Wachtwoord :''' Geef je Yahoo! Mail account wachtwoord in. +* '''Plaats deze gadget in mijn Favorieten :''' Om de gadget met de afstandsbediening of via Tux Droid te starten. + += Alarmen = +* '''Check mijn Yahoo! Mail account automatisch :''' Tux Droid zal je E-mail automatisch te checken. +* '''Introductie attitune :''' Selecteer een introductie attitune voor wanneer de gadget automatisch gestart wordt. \ No newline at end of file Modified: software_suite_v3/software/gadget/online_only/trunk/names_to_uuids_list.txt =================================================================== --- software_suite_v3/software/gadget/online_only/trunk/names_to_uuids_list.txt 2010-02-11 13:49:43 UTC (rev 6062) +++ software_suite_v3/software/gadget/online_only/trunk/names_to_uuids_list.txt 2010-02-11 14:01:33 UTC (rev 6063) @@ -5,3 +5,5 @@ WMP : ee51da83-f96e-e265-e432-d009b927e5bd Webradio (de) : 8dfa526b-b6e6-42b5-a913-634dbf04e19a Merry Tuxmas : 4d6ec4f1-9fd7-4092-a3d6-dd0c6e578051 +Yahoo! Mail : 84a7480e-35a9-e948-f346-d40a61d27c06 +Hotmail : 41ff6889-26cc-16f1-fc79-bf0aa38624c9 | 
| 
      
      
      From: remi <c2m...@c2...> - 2010-02-11 14:00:23
      
     | 
| Author: remi Date: 2010-02-11 14:44:03 +0100 (Thu, 11 Feb 2010) New Revision: 6061 Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/de.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/default.pot software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/en.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/fr.po software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/nl.po Log: * Added tts_fixes for "Yahoo" Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/de.po =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/de.po (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/de.po 2010-02-11 13:44:03 UTC (rev 6061) @@ -0,0 +1,2 @@ +msgid "Yahoo" +msgstr "yachou" Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/default.pot =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/default.pot (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/default.pot 2010-02-11 13:44:03 UTC (rev 6061) @@ -0,0 +1,2 @@ +msgid "Yahoo" +msgstr "" Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/en.po (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/en.po 2010-02-11 13:44:03 UTC (rev 6061) @@ -0,0 +1,2 @@ +msgid "Yahoo" +msgstr "yahou" Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/fr.po (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/fr.po 2010-02-11 13:44:03 UTC (rev 6061) @@ -0,0 +1,2 @@ +msgid "Yahoo" +msgstr "yahou" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/nl.po (rev 0) +++ software_suite_v3/software/plugin/plugin-yahoo/trunk/resources/tts_fixes/nl.po 2010-02-11 13:44:03 UTC (rev 6061) @@ -0,0 +1,2 @@ +msgid "Yahoo" +msgstr "yahoe" | 
| 
      
      
      From: remi <c2m...@c2...> - 2010-02-11 13:55:03
      
     | 
| Author: remi Date: 2010-02-11 14:49:43 +0100 (Thu, 11 Feb 2010) New Revision: 6062 Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/de.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/default.pot software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/en.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/fr.po software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/nl.po Log: * Added tts_fixes for "Hotmail" Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/de.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/de.po (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/de.po 2010-02-11 13:49:43 UTC (rev 6062) @@ -0,0 +1,2 @@ +msgid "Hotmail" +msgstr "hot mail" Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/default.pot =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/default.pot (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/default.pot 2010-02-11 13:49:43 UTC (rev 6062) @@ -0,0 +1,2 @@ +msgid "Hotmail" +msgstr "" Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/en.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/en.po (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/en.po 2010-02-11 13:49:43 UTC (rev 6062) @@ -0,0 +1,2 @@ +msgid "Hotmail" +msgstr "hot mail" Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/fr.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/fr.po (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/fr.po 2010-02-11 13:49:43 UTC (rev 6062) @@ -0,0 +1,2 @@ +msgid "Hotmail" +msgstr "hot mail" \ No newline at end of file Added: software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/nl.po =================================================================== --- software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/nl.po (rev 0) +++ software_suite_v3/software/plugin/plugin-hotmail/trunk/resources/tts_fixes/nl.po 2010-02-11 13:49:43 UTC (rev 6062) @@ -0,0 +1,2 @@ +msgid "Hotmail" +msgstr "hot mail" | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-02-10 14:00:03
      
     | 
| Author: jerome
Date: 2010-02-10 14:42:14 +0100 (Wed, 10 Feb 2010)
New Revision: 6059
Modified:
   software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/TuxDroidYahoo.exe
   software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.dfm
   software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.pas
Log:
* Fixed a bug closing Windblows.
Modified: software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/TuxDroidYahoo.exe
===================================================================
(Binary files differ)
Modified: software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.dfm
===================================================================
--- software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.dfm	2010-02-09 11:29:59 UTC (rev 6058)
+++ software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.dfm	2010-02-10 13:42:14 UTC (rev 6059)
@@ -15,7 +15,6 @@
   Font.Style = []
   OldCreateOrder = False
   Position = poDefault
-  OnCloseQuery = FormCloseQuery
   OnCreate = FormCreate
   PixelsPerInch = 96
   TextHeight = 13
@@ -25,6 +24,7 @@
     Width = 921
     Height = 285
     TabOrder = 0
+    Silent = False
     RegisterAsBrowser = True
     OnDocumentComplete = EmbeddedWB1DocumentComplete
     DisableCtrlShortcuts = 'N'
Modified: software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.pas
===================================================================
--- software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.pas	2010-02-09 11:29:59 UTC (rev 6058)
+++ software_suite_v3/software/plugin/plugin-yahoo/trunk/executables/fetchingMails/YahooMail.pas	2010-02-10 13:42:14 UTC (rev 6059)
@@ -45,7 +45,6 @@
     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);
 
@@ -471,11 +470,4 @@
    result := chain;
 end;
 
-
-{========== Disabling close feature ==========}
-procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
-begin
-  CanClose := False;
-end;
-
 end.
 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-02-10 13:55:07
      
     | 
| Author: jerome
Date: 2010-02-10 14:46:48 +0100 (Wed, 10 Feb 2010)
New Revision: 6060
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 bug closing Windblows.
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-10 13:42:14 UTC (rev 6059)
+++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.dfm	2010-02-10 13:46:48 UTC (rev 6060)
@@ -15,7 +15,6 @@
   Font.Style = []
   OldCreateOrder = False
   Position = poDefault
-  OnCloseQuery = FormCloseQuery
   OnCreate = FormCreate
   PixelsPerInch = 96
   TextHeight = 13
@@ -25,7 +24,6 @@
     Width = 137
     Height = 5
     TabOrder = 0
-    Silent = False
     RegisterAsBrowser = True
     OnDocumentComplete = EmbeddedWB1DocumentComplete
     DisableCtrlShortcuts = 'N'
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-10 13:42:14 UTC (rev 6059)
+++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/fetchingMails/WindowsLiveMail.pas	2010-02-10 13:46:48 UTC (rev 6060)
@@ -43,7 +43,6 @@
     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);
 
@@ -488,11 +487,4 @@
    result := chain;
 end;
 
-
-{========== Disabling close feature ==========}
-procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
-begin
-  CanClose := False;
-end;
-
 end.
 | 
| 
      
      
      From: jerome <c2m...@c2...> - 2010-02-09 11:30:06
      
     | 
| Author: jerome
Date: 2010-02-09 12:29:59 +0100 (Tue, 09 Feb 2010)
New Revision: 6058
Modified:
   software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.xml
Log:
* Activated by default.
Modified: software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.xml
===================================================================
--- software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.xml	2010-02-09 11:17:38 UTC (rev 6057)
+++ software_suite_v3/software/plugin/plugin-tux-valentine/trunk/resources/plugin.xml	2010-02-09 11:29:59 UTC (rev 6058)
@@ -35,7 +35,7 @@
             description="Activate Sense of humor behavior"
             command="run"
             type="once delayed"
-            activated="false"
+            activated="true"
 
             weekMask="true,true,true,true,true,true,true"
             weekMaskType="weekpart"
 |