Author: remi
Date: 2009-03-28 10:42:55 +0100 (Sat, 28 Mar 2009)
New Revision: 4230

Modified:
   
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/attitunes/AttitunesContainer.py
   
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/gadgets/GadgetsContainer.py
Log:
* added api methods to insert an remove gadgets and attitunes files in the 
containers

Modified: 
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/attitunes/AttitunesContainer.py
===================================================================
--- 
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/attitunes/AttitunesContainer.py
    2009-03-28 09:20:08 UTC (rev 4229)
+++ 
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/attitunes/AttitunesContainer.py
    2009-03-28 09:42:55 UTC (rev 4230)
@@ -106,3 +106,32 @@
         """
         cmd = "attitune_manager/stop_attitune?"
         return self._sendCommandBooleanResult(cmd)
+
+    # 
--------------------------------------------------------------------------
+    # Insert an attitune in the container.
+    # 
--------------------------------------------------------------------------
+    def insertAttitune(self, attituneFileName):
+        """Insert an attitune in the container.
+        @param attituneFileName: Attitune file name. Can be a local or a 
distant
+            file.
+        @return: The success of the command.
+        """
+        argsToSend = {
+            'path' : attituneFileName,
+        }
+        cmd = "attitune_manager/insert_attitune?"
+        return self._sendCommandBooleanResult(cmd, argsToSend)
+
+    # 
--------------------------------------------------------------------------
+    # Remove an attitune from the container.
+    # 
--------------------------------------------------------------------------
+    def removeAttitune(self, attituneName):
+        """Remove an attitune from the container.
+        @param attituneName: The name of the attitune.
+        @return: The success of the command.
+        """
+        argsToSend = {
+            'name' : attituneName,
+        }
+        cmd = "attitune_manager/remove_attitune?"
+        return self._sendCommandBooleanResult(cmd, argsToSend)

Modified: 
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/gadgets/GadgetsContainer.py
===================================================================
--- 
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/gadgets/GadgetsContainer.py
        2009-03-28 09:20:08 UTC (rev 4229)
+++ 
software_suite_v2/tuxware/pytuxisalive/branches/0.3.0/src/tuxisalive/api/gadgets/GadgetsContainer.py
        2009-03-28 09:42:55 UTC (rev 4230)
@@ -206,3 +206,32 @@
         """
         cmd = "gadget_framework/stop_all_gadgets?"
         return self._sendCommandBooleanResult(cmd)
+
+    # 
--------------------------------------------------------------------------
+    # Insert a gadget in the container.
+    # 
--------------------------------------------------------------------------
+    def insertGadget(self, gadgetFileName):
+        """Insert a gadget in the container.
+        @param gadgetFileName: Gadget file name. Can be a local or a distant
+            file.
+        @return: The success of the command.
+        """
+        argsToSend = {
+            'path' : gadgetFileName,
+        }
+        cmd = "gadget_framework/insert_gadget?"
+        return self._sendCommandBooleanResult(cmd, argsToSend)
+
+    # 
--------------------------------------------------------------------------
+    # Remove a gadget from the container.
+    # 
--------------------------------------------------------------------------
+    def removeGadget(self, gadgetUuid):
+        """Remove a gadget from the container.
+        @param gadgetUuid: The uuid of the gadget.
+        @return: The success of the command.
+        """
+        argsToSend = {
+            'uuid' : gadgetUuid,
+        }
+        cmd = "gadget_framework/remove_gadget?"
+        return self._sendCommandBooleanResult(cmd, argsToSend)


------------------------------------------------------------------------------
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to