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

#include "mplayercluster.h"
#include "menu-mplayer.h"
#include "keys.h"
#include "setup.h"
#include "i18n.h"
#include "compatibility.h"

const char *cPluginMplayercluster::VERSION        = "0.0.1a-Urig7";
const char *cPluginMplayercluster::DESCRIPTION    = 
		"Recodes video files on another PC";
const char *cPluginMplayercluster::MAINMENUENTRY  = 
		"Remote MPlayer";

cPluginMplayercluster::cPluginMplayercluster(void) {
}

cPluginMplayercluster::~cPluginMplayercluster() {
}

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

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

bool cPluginMplayercluster::Start(void) {
	RegisterI18n(Phrases);

  MPlaySources.Load(AddDirectory(ConfigDirectory(),"mplayersources.conf"));
  if(MPlaySources.Count()<1) {
    esyslog("mplayercluster: you must have defined at least one source in mplayersources.conf");
    return false;
  } 
	
	ClusterKeys.Load(AddDirectory(ConfigDirectory(), "mplayerclusterkeys.conf"));

  return true;
}

void cPluginMplayercluster::Housekeeping(void) {
}

cOsdObject *cPluginMplayercluster::MainMenuAction(void) {
	return new cMenuMPlayBrowse;
}

cMenuSetupPage *cPluginMplayercluster::SetupMenu(void) {
  return new cClusterMenuSetupPage;
}

bool cPluginMplayercluster::SetupParse(const char *Name, const char *Value) {
	return ClusterSetup.SetupParse(Name, Value);
}

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