From 9a0f90972bf1fe723caa55fecb684788933679b9 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 19 Apr 2010 15:01:21 +0000 Subject: Initial cut at freeswitch ACF. --- freeswitch-controller.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 freeswitch-controller.lua (limited to 'freeswitch-controller.lua') 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 -- cgit v1.2.3