2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include <vdr/plugin.h>
24 #include "mvpserver.h"
26 static const char *VERSION = "0.2.3";
27 static const char *DESCRIPTION = "VDR on MVP plugin by Chris Tallon";
29 class cPluginVompserver : public cPlugin
32 cPluginVompserver(void);
33 virtual ~cPluginVompserver();
34 virtual const char *Version(void) { return VERSION; }
35 virtual const char *Description(void) { return DESCRIPTION; }
36 virtual const char *CommandLineHelp(void);
37 virtual bool ProcessArgs(int argc, char *argv[]);
38 virtual bool Initialize(void);
39 virtual bool Start(void);
40 virtual bool SetupParse(const char *Name, const char *Value);
48 cPluginVompserver::cPluginVompserver(void)
50 // Initialize any member variables here.
51 // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
52 // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
57 bool cPluginVompserver::Start(void)
59 // Start any background activities the plugin shall perform.
60 int success = mvpserver.run(configDir);
61 if (success) return true;
65 cPluginVompserver::~cPluginVompserver()
67 // Clean up after yourself!
71 const char *cPluginVompserver::CommandLineHelp(void)
73 // Return a string that describes all known command line options.
75 return " -c dir config path relative to VDR plugins config path\n";
78 bool cPluginVompserver::ProcessArgs(int argc, char *argv[])
80 // Implement command line argument processing here if applicable.
83 while ((c = getopt(argc, argv, "c:")) != -1)
98 bool cPluginVompserver::Initialize(void)
100 // Initialize any background activities the plugin shall perform.
104 bool cPluginVompserver::SetupParse(const char *Name, const char *Value)
106 // Parse your own setup parameters and store their values.
110 VDRPLUGINCREATOR(cPluginVompserver); // Don't touch this!