summaryrefslogtreecommitdiffstats
path: root/vlc-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'vlc-controller.lua')
-rw-r--r--vlc-controller.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/vlc-controller.lua b/vlc-controller.lua
new file mode 100644
index 0000000..8199735
--- /dev/null
+++ b/vlc-controller.lua
@@ -0,0 +1,28 @@
+module(..., package.seeall)
+
+-- Load libraries
+require("controllerfunctions")
+
+mvc = {}
+mvc.on_load = function(self, parent)
+ self.model.set_processname(string.match(self.conf.prefix, "[^/]+"))
+end
+
+default_action = "status"
+
+function status(self)
+ return self.model.getstatus()
+end
+
+function startstop(self)
+ return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata)
+end
+
+function expert(self)
+ return controllerfunctions.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Config File", "Configuration File Set")
+end
+
+function logfile(self)
+ return self.model.get_filedetails(self.clientdata.name or "", self.clientdata.grep)
+
+end