/*
 * perl.c: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */

#include "process.h"
#include <vdr/plugin.h>

static const char *VERSION        = "0.0.1-pre6";

class cPluginPerl : public cPlugin {
private:
	cPerlProcess mProcess;

public:
	cPluginPerl(void);
	virtual ~cPluginPerl();
	virtual const char *Version(void) { return mProcess.Version(); }
	virtual const char *Description(void) { return mProcess.Description(); }
	virtual const char *CommandLineHelp(void);
	virtual bool ProcessArgs(int argc, char *argv[]);
	virtual bool Initialize(void);
	virtual bool Start(void);
	virtual void Stop(void);
	virtual void Housekeeping(void);
	virtual const char *MainMenuEntry(void) { return mProcess.MainMenuEntry(); }
	virtual cOsdObject *MainMenuAction(void);
	virtual cMenuSetupPage *SetupMenu(void);
	virtual bool SetupParse(const char *Name, const char *Value);
};

cPluginPerl::cPluginPerl(void)
{
}

cPluginPerl::~cPluginPerl()
{
}

const char *cPluginPerl::CommandLineHelp(void)
{
	return NULL;
}

bool cPluginPerl::ProcessArgs(int argc, char *argv[])
{
	mProcess.ProcessArgs(argc, argv);
	return true;
}

bool cPluginPerl::Initialize(void)
{
	mProcess.SetPath(ConfigDirectory(PLUGIN_NAME_I18N));
	mProcess.Start();
	return true;
}

bool cPluginPerl::Start(void)
{
	return true;
}

void cPluginPerl::Stop(void)
{
}

void cPluginPerl::Housekeeping(void)
{
}

cOsdObject *cPluginPerl::MainMenuAction(void)
{
	return mProcess.MainMenuAction();
}

cMenuSetupPage *cPluginPerl::SetupMenu(void)
{
	return NULL;
}

bool cPluginPerl::SetupParse(const char *Name, const char *Value)
{
	return false;
}

VDRPLUGINCREATOR(cPluginPerl); // Don't touch this!
