Merge from trunk
[plcapi.git] / trunk / PLC / Methods / system / listMethods.py
diff --git a/trunk/PLC/Methods/system/listMethods.py b/trunk/PLC/Methods/system/listMethods.py
new file mode 100644 (file)
index 0000000..c8cfa37
--- /dev/null
@@ -0,0 +1,20 @@
+from PLC.Method import Method
+from PLC.Parameter import Parameter
+import PLC.Methods
+
+class listMethods(Method):
+    """
+    This method lists all the methods that the XML-RPC server knows
+    how to dispatch.
+    """
+
+    roles = []
+    accepts = []
+    returns = Parameter(list, 'List of methods')
+
+    def __init__(self, api):
+        Method.__init__(self, api)
+        self.name = "system.listMethods"
+
+    def call(self):
+        return self.api.methods