summaryrefslogtreecommitdiffstats
path: root/freeswitch-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2010-04-19 15:01:21 +0000
committerTed Trask <ttrask01@yahoo.com>2010-04-19 15:01:21 +0000
commit9a0f90972bf1fe723caa55fecb684788933679b9 (patch)
tree87d69432bcfc81dd87429993c1371a687b722802 /freeswitch-controller.lua
downloadacf-freeswitch-9a0f90972bf1fe723caa55fecb684788933679b9.tar.bz2
acf-freeswitch-9a0f90972bf1fe723caa55fecb684788933679b9.tar.xz
Initial cut at freeswitch ACF.v0.1.0
Diffstat (limited to 'freeswitch-controller.lua')
-rw-r--r--freeswitch-controller.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/freeswitch-controller.lua b/freeswitch-controller.lua
new file mode 100644
index 0000000..04d6ea7
--- /dev/null
+++ b/freeswitch-controller.lua
@@ -0,0 +1,21 @@
+module (..., package.seeall)
+
+require("controllerfunctions")
+
+default_action = "status"
+
+status = function( self )
+ return self.model.get_status()
+end
+
+startstop = function( self )
+ return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata)
+end
+
+listfiles = function( self )
+ return self.model.list_files()
+end
+
+edit = function( self )
+ return controllerfunctions.handle_form(self, function() return self.model.get_file(self.clientdata.filename) end, self.model.update_file, self.clientdata, "Save", "Edit File", "File Saved")
+end