Author: remi
Date: 2009-05-05 16:32:13 +0200 (Tue, 05 May 2009)
New Revision: 4642

Modified:
   
software_suite_v3/smart-core/smart-server/trunk/util/SimplePlugin/SimpleGadget.py
   
software_suite_v3/smart-core/smart-server/trunk/util/SimplePlugin/SimpleGadgetConfiguration.py
Log:
* fixed terminology "gadget" -> "plugin" in the classes

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/SimplePlugin/SimpleGadget.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/SimplePlugin/SimpleGadget.py
   2009-05-05 14:29:50 UTC (rev 4641)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/SimplePlugin/SimpleGadget.py
   2009-05-05 14:32:13 UTC (rev 4642)
@@ -26,10 +26,10 @@
 ENVIRONEMENT_PREFIX = "tgp_"
 
 # 
------------------------------------------------------------------------------
-# This class is the base class helper for builder python gadgets.
+# This class is the base class helper for builder python plugins.
 # 
------------------------------------------------------------------------------
-class SimpleGadget(object):
-    """This class is the base class helper for builder python gadgets.
+class SimplePlugin(object):
+    """This class is the base class helper for builder python plugins.
     """
 
     # 
--------------------------------------------------------------------------
@@ -45,24 +45,24 @@
         self.__stdInThread = None
 
     # 
--------------------------------------------------------------------------
-    # On gadget stop event. Must be overrided
+    # On plugin stop event. Must be overrided
     # 
--------------------------------------------------------------------------
-    def onGadgetStop(self):
-        """On gadget stop event. Must be overrided
+    def onPluginStop(self):
+        """On plugin stop event. Must be overrided
         """
         pass
 
     # 
--------------------------------------------------------------------------
-    # Stop the gadget.
+    # Stop the plugin.
     # 
--------------------------------------------------------------------------
     def stop(self):
-        """Stop the gadget.
+        """Stop the plugin.
         """
         if self.__stdInThread != None:
             if self.__stdInThread.isAlive():
                 self.__stdInThread._Thread__stop()
-        self.onGadgetStop()
-        self.throwNotification("gadget", "exit")
+        self.onPluginStop()
+        self.throwNotification("plugin", "exit")
 
     # 
--------------------------------------------------------------------------
     # Set the run flag value.
@@ -96,7 +96,7 @@
         while self.__getRun():
             line = sys.stdin.readline()
             if line.lower().find("stop") == 0:
-                self.onGadgetStop()
+                self.onPluginStop()
                 self.__setRun(False)
             time.sleep(0.1)
 
@@ -105,7 +105,7 @@
     # 
--------------------------------------------------------------------------
     def configuration(self):
         """Get the configuration object.
-        @return: A SimpleGadgetConfiguration object.
+        @return: A SimplePluginConfiguration object.
         """
         return self.__configuration
 
@@ -138,15 +138,15 @@
         return (platformName == "microsoft") or (platformName == "windows")
 
     # 
--------------------------------------------------------------------------
-    # Load the environement data to the gadget parameters.
+    # Load the environement data to the plugin parameters.
     # 
--------------------------------------------------------------------------
     def __loadEnvironementData(self):
-        """Load the environement data to the gadget parameters.
+        """Load the environement data to the plugin parameters.
         """
         if self.__configuration == None:
             return
         # Extract configuration object class names
-        baseConfClassName = "_SimpleGadgetConfiguration"
+        baseConfClassName = "_SimplePluginConfiguration"
         confClassName = str(self.__configuration.__class__)
         confClassName = confClassName.split("'")[1].split(".")[1]
         confClassName = "_" + confClassName
@@ -206,10 +206,10 @@
                         setattr(self.__configuration, paramName, environValue)
 
     # 
--------------------------------------------------------------------------
-    # Starting point of the gadget.
+    # Starting point of the plugin.
     # 
--------------------------------------------------------------------------
     def boot(self, arguments, configuration):
-        """Starting point of the gadget.
+        """Starting point of the plugin.
         @param arguments:
         """
         try:
@@ -224,25 +224,25 @@
                     self.__stdInThread.start()
                 self.start()
                 if not self.__configuration.isDaemon():
-                    self.onGadgetStop()
+                    self.onPluginStop()
         except:
-            self.throwError("Error on gadget boot", True)
+            self.throwError("Error on plugin boot", True)
 
     # 
--------------------------------------------------------------------------
-    # Start method of the gadget. Must be overrided.
+    # Start method of the plugin. Must be overrided.
     # 
--------------------------------------------------------------------------
     def start(self):
-        """Start method of the gadget. (Must be overrided)
+        """Start method of the plugin. (Must be overrided)
         """
         pass
 
     # 
--------------------------------------------------------------------------
     # Get the full path of a file located in the "state" directory of a 
deployed
-    # gadget.
+    # plugin.
     # 
--------------------------------------------------------------------------
     def __getStateFile(self, fileName):
         """Get the full path of a file located in the "state" directory of a
-        deployed gadget.
+        deployed plugin.
         @param fileName: Base file name.
         @return: A full file path.
         """
@@ -361,12 +361,12 @@
         self.throwNotification("check_result", resultValue)
 
     # 
--------------------------------------------------------------------------
-    # Throw an error message to the framework.
+    # Throw an error message to the plugins server.
     # 
--------------------------------------------------------------------------
     def throwError(self, message, force = False):
-        """Throw an error message to the framework.
-        @param message: Thowed message if the gadget don't want to be traced.
-            - if the gadget is traced, the traceback will be sent instead of 
the
+        """Throw an error message to the plugins server.
+        @param message: Thowed message if the plugin don't want to be traced.
+            - if the plugin is traced, the traceback will be sent instead of 
the
             message.
         @param force: For to send the traceback. Default False.
         """

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/SimplePlugin/SimpleGadgetConfiguration.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/SimplePlugin/SimpleGadgetConfiguration.py
      2009-05-05 14:29:50 UTC (rev 4641)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/SimplePlugin/SimpleGadgetConfiguration.py
      2009-05-05 14:32:13 UTC (rev 4642)
@@ -16,10 +16,10 @@
 #    "com.kysoh.tuxdroid.gadget.framework.gadget"
 
 # 
------------------------------------------------------------------------------
-# Class of the default gadget configuration.
+# Class of the default plugin configuration.
 # 
------------------------------------------------------------------------------
-class SimpleGadgetConfiguration(object):
-    """Class of the default gadget configuration.
+class SimplePluginConfiguration(object):
+    """Class of the default plugin configuration.
     """
 
     # 
--------------------------------------------------------------------------
@@ -108,28 +108,28 @@
         self.__locutor = locutor
 
     # 
--------------------------------------------------------------------------
-    # Get if the gadget is traced or not.
+    # Get if the plugin is traced or not.
     # 
--------------------------------------------------------------------------
     def isTraces(self):
-        """Get if the gadget is traced or not.
+        """Get if the plugin is traced or not.
         @return: A boolean.
         """
         return self.__traces
 
     # 
--------------------------------------------------------------------------
-    # Set if the gadget is traced or not.
+    # Set if the plugin is traced or not.
     # 
--------------------------------------------------------------------------
     def setTraces(self, traces):
-        """Set if the gadget is traced or not.
+        """Set if the plugin is traced or not.
         @param traces: Is traced or not.
         """
         self.__traces = traces
 
     # 
--------------------------------------------------------------------------
-    # Get if the gadget is a daemon or not.
+    # Get if the plugin is a daemon or not.
     # 
--------------------------------------------------------------------------
     def isDaemon(self):
-        """Get if the gadget is a daemon or not.
+        """Get if the plugin is a daemon or not.
         @return: A boolean.
         """
         return self.__daemon


------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to