/*
 * See the README file for copyright information and how to reach the author.
 *
 */

#ifndef __PVRUSB2_CHANNELMENU_H
#define __PVRUSB2_CHANNELMENU_H

#include "device.h"

#include "common.h"

class cRMMenuChannelItem;

class cRMMenuChannelList:
    public cList<cRMMenuChannelItem>
{
};

class cRMChannelMenu:
    public cOsdMenu,
    cRMScanChannelListener
{
    private:
        cRMMenuChannelList channelList;
        cMutex mutex;
        bool displayVdrChannels;
        bool keepAlive;
        bool scanActive;
        bool updateMenu;
        cRMChannel* tuningChannel;

    protected:
        virtual void SetHelpKeys();
        virtual void DisplayMenu();
        virtual void SelectFirstLine();
        virtual cRMMenuChannelItem* GetChannel(cOsdItem* _item);
        virtual void ReNumber();
        virtual bool HaveNewChannels();

        virtual bool StartChannelScan();
        virtual bool StopChannelScan();

    public:
        cRMChannelMenu();
        virtual ~cRMChannelMenu();

        virtual void Tune2CurrentChannel();
        virtual eOSState ProcessKey(eKeys _key);

        virtual void NewChannel(cRMChannelList* _list);
        virtual void ScanFinished();
};

#endif // __PVRUSB2_CHANNELMENU_H
