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

#ifndef __PVRUSB2_H
#define __PVRUSB2_H

#include "common.h"

static const char* VERSION        = "0.1.1";
static const char* DESCRIPTION    = "PVR USB2 Analog TV Driver Plugin";
//static const char* MAINMENUENTRY  = "PVR USB2";

class cPvrUsb2Plugin:
    public cPlugin
{
    private:
        static int debug;
        char* commandLineHelp;
        cRMDeviceList devices;
        cRMSetupMenu* setupMenu;

    protected:
        virtual bool SetupDevices(cRMSetup* _newSetup);

    public:
        cRMSetup setup;

        cPvrUsb2Plugin();
        virtual ~cPvrUsb2Plugin();
        virtual const char *Version() { return VERSION; }
        virtual const char *Description() { return tr(DESCRIPTION); }
        virtual const char *CommandLineHelp();
        virtual bool ProcessArgs(int _argc, char* _argv[]);
        virtual bool Initialize();
        virtual bool Start();
        virtual void Stop();
        virtual void Housekeeping();
        virtual const char* MainMenuEntry() { return NULL; }
        virtual cOsdObject* MainMenuAction();
        virtual cMenuSetupPage* SetupMenu();
        virtual bool SetupParse(const char* _name, const char* _value);

        virtual bool UpdateSetup(cRMSetup* _newSetup);

        virtual cRMDevice* FirstDevice();
        virtual cRMDevice* Device(int _index);

        virtual void DeviceDestroyed(cRMDevice* _device);
        virtual void SetupMenuDestroyed();

        static void LogError(const char* _format, ...);
        static void LogInfo(const char* _format, ...);
        static void LogDebug(const char* _format, ...);
};

extern cPvrUsb2Plugin* PvrUsb2;

#endif // __PVRUSB2_H
