2000-02-19 13:36:48 +01:00
|
|
|
/*
|
|
|
|
* menu.h: The actual menu implementations
|
|
|
|
*
|
2000-04-24 09:46:05 +02:00
|
|
|
* See the main source file 'vdr.c' for copyright information and
|
2000-02-19 13:36:48 +01:00
|
|
|
* how to reach the author.
|
|
|
|
*
|
2004-01-04 12:30:00 +01:00
|
|
|
* $Id: menu.h 1.59 2004/01/04 11:01:13 kls Exp $
|
2000-02-19 13:36:48 +01:00
|
|
|
*/
|
|
|
|
|
2002-04-13 15:31:41 +02:00
|
|
|
#ifndef __MENU_H
|
|
|
|
#define __MENU_H
|
2000-02-19 13:36:48 +01:00
|
|
|
|
2003-01-06 14:44:27 +01:00
|
|
|
#include "ci.h"
|
2002-06-16 12:57:31 +02:00
|
|
|
#include "device.h"
|
2003-12-22 13:29:24 +01:00
|
|
|
#include "epg.h"
|
2000-02-19 13:36:48 +01:00
|
|
|
#include "osd.h"
|
2002-06-16 12:57:31 +02:00
|
|
|
#include "dvbplayer.h"
|
|
|
|
#include "recorder.h"
|
2000-10-08 15:08:26 +02:00
|
|
|
#include "recording.h"
|
2000-02-19 13:36:48 +01:00
|
|
|
|
|
|
|
class cMenuMain : public cOsdMenu {
|
2000-05-01 16:29:46 +02:00
|
|
|
private:
|
|
|
|
time_t lastActivity;
|
2002-03-08 16:11:34 +01:00
|
|
|
bool replaying;
|
2002-11-24 10:45:39 +01:00
|
|
|
static cOsdObject *pluginOsdObject;
|
2002-12-01 10:48:08 +01:00
|
|
|
void Set(const char *Plugin = NULL);
|
2000-02-19 13:36:48 +01:00
|
|
|
public:
|
2002-12-01 10:48:08 +01:00
|
|
|
cMenuMain(bool Replaying, eOSState State = osUnknown, const char *Plugin = NULL);
|
2000-03-11 11:22:37 +01:00
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
2002-11-24 10:45:39 +01:00
|
|
|
static cOsdObject *PluginOsdObject(void);
|
2000-02-19 13:36:48 +01:00
|
|
|
};
|
2001-08-03 14:18:08 +02:00
|
|
|
|
2002-05-18 12:41:18 +02:00
|
|
|
class cDisplayChannel : public cOsdObject {
|
2000-09-10 14:56:18 +02:00
|
|
|
private:
|
2001-09-08 14:39:09 +02:00
|
|
|
int group;
|
|
|
|
bool withInfo;
|
2000-11-01 15:41:33 +01:00
|
|
|
int lines;
|
2000-09-10 14:56:18 +02:00
|
|
|
int lastTime;
|
2002-09-29 13:40:45 +02:00
|
|
|
int number;
|
2003-12-22 13:29:24 +01:00
|
|
|
cChannel *channel;
|
|
|
|
void DisplayChannel(void);
|
2000-11-01 15:41:33 +01:00
|
|
|
void DisplayInfo(void);
|
2002-10-27 14:32:06 +01:00
|
|
|
void Refresh(void);
|
2000-09-10 14:56:18 +02:00
|
|
|
public:
|
2001-09-08 14:39:09 +02:00
|
|
|
cDisplayChannel(int Number, bool Switched);
|
2000-11-01 15:41:33 +01:00
|
|
|
cDisplayChannel(eKeys FirstKey);
|
|
|
|
virtual ~cDisplayChannel();
|
2000-09-10 14:56:18 +02:00
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
|
|
};
|
|
|
|
|
2002-05-18 12:41:18 +02:00
|
|
|
class cDisplayVolume : public cOsdObject {
|
2002-03-09 17:11:49 +01:00
|
|
|
private:
|
|
|
|
int timeout;
|
|
|
|
static cDisplayVolume *displayVolume;
|
2003-05-24 16:41:35 +02:00
|
|
|
virtual void Show(void);
|
2002-03-09 17:11:49 +01:00
|
|
|
cDisplayVolume(void);
|
|
|
|
public:
|
|
|
|
virtual ~cDisplayVolume();
|
|
|
|
static cDisplayVolume *Create(void);
|
|
|
|
static void Process(eKeys Key);
|
|
|
|
eOSState ProcessKey(eKeys Key);
|
|
|
|
};
|
|
|
|
|
2003-01-06 14:44:27 +01:00
|
|
|
class cMenuCam : public cOsdMenu {
|
|
|
|
private:
|
|
|
|
cCiMenu *ciMenu;
|
2003-08-03 09:54:18 +02:00
|
|
|
time_t lastActivity;
|
2003-01-06 14:44:27 +01:00
|
|
|
bool selected;
|
|
|
|
eOSState Select(void);
|
|
|
|
public:
|
|
|
|
cMenuCam(cCiMenu *CiMenu);
|
|
|
|
virtual ~cMenuCam();
|
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
|
|
};
|
|
|
|
|
|
|
|
class cMenuCamEnquiry : public cOsdMenu {
|
|
|
|
private:
|
|
|
|
cCiEnquiry *ciEnquiry;
|
2003-08-03 09:54:18 +02:00
|
|
|
time_t lastActivity;
|
2003-01-19 14:59:46 +01:00
|
|
|
char *input;
|
2003-01-06 14:44:27 +01:00
|
|
|
bool replied;
|
|
|
|
eOSState Reply(void);
|
|
|
|
public:
|
|
|
|
cMenuCamEnquiry(cCiEnquiry *CiEnquiry);
|
|
|
|
virtual ~cMenuCamEnquiry();
|
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
|
|
};
|
|
|
|
|
|
|
|
cOsdObject *CamControl(void);
|
|
|
|
|
2002-01-20 14:05:28 +01:00
|
|
|
class cMenuRecordingItem;
|
|
|
|
|
2000-10-08 15:08:26 +02:00
|
|
|
class cMenuRecordings : public cOsdMenu {
|
|
|
|
private:
|
2002-01-20 14:05:28 +01:00
|
|
|
static cRecordings Recordings;
|
|
|
|
char *base;
|
|
|
|
int level;
|
|
|
|
static int helpKeys;
|
|
|
|
void SetHelpKeys(void);
|
|
|
|
cRecording *GetRecording(cMenuRecordingItem *Item);
|
|
|
|
bool Open(bool OpenSubMenus = false);
|
2000-10-08 15:08:26 +02:00
|
|
|
eOSState Play(void);
|
2001-02-11 11:04:41 +01:00
|
|
|
eOSState Rewind(void);
|
2002-10-06 10:40:27 +02:00
|
|
|
eOSState Delete(void);
|
2000-10-08 15:08:26 +02:00
|
|
|
eOSState Summary(void);
|
2002-10-13 12:14:49 +02:00
|
|
|
eOSState Commands(eKeys Key = kNone);
|
2000-10-08 15:08:26 +02:00
|
|
|
public:
|
2002-01-20 14:05:28 +01:00
|
|
|
cMenuRecordings(const char *Base = NULL, int Level = 0, bool OpenSubMenus = false);
|
|
|
|
~cMenuRecordings();
|
2000-10-08 15:08:26 +02:00
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
|
|
};
|
|
|
|
|
2000-05-01 16:29:46 +02:00
|
|
|
class cRecordControl {
|
2000-04-30 10:22:13 +02:00
|
|
|
private:
|
2002-06-16 12:57:31 +02:00
|
|
|
cDevice *device;
|
2000-04-30 10:22:13 +02:00
|
|
|
cTimer *timer;
|
2002-06-16 12:57:31 +02:00
|
|
|
cRecorder *recorder;
|
2003-12-22 13:29:24 +01:00
|
|
|
const cEvent *event;
|
2000-05-01 16:29:46 +02:00
|
|
|
char *instantId;
|
2001-09-23 14:02:11 +02:00
|
|
|
char *fileName;
|
2003-12-22 13:29:24 +01:00
|
|
|
bool GetEvent(void);
|
2000-04-30 10:22:13 +02:00
|
|
|
public:
|
2003-05-11 14:10:00 +02:00
|
|
|
cRecordControl(cDevice *Device, cTimer *Timer = NULL, bool Pause = false);
|
2000-04-30 10:22:13 +02:00
|
|
|
virtual ~cRecordControl();
|
2001-09-01 15:04:14 +02:00
|
|
|
bool Process(time_t t);
|
2002-06-16 12:57:31 +02:00
|
|
|
bool Uses(cDevice *Device) { return Device == device; }
|
2000-04-30 11:15:16 +02:00
|
|
|
void Stop(bool KeepInstant = false);
|
2000-05-01 16:29:46 +02:00
|
|
|
bool IsInstant(void) { return instantId; }
|
|
|
|
const char *InstantId(void) { return instantId; }
|
2002-02-17 14:29:13 +01:00
|
|
|
const char *FileName(void) { return fileName; }
|
|
|
|
cTimer *Timer(void) { return timer; }
|
2000-05-01 16:29:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class cRecordControls {
|
|
|
|
private:
|
2002-06-16 12:57:31 +02:00
|
|
|
static cRecordControl *RecordControls[];
|
2000-05-01 16:29:46 +02:00
|
|
|
public:
|
2003-05-11 14:10:00 +02:00
|
|
|
static bool Start(cTimer *Timer = NULL, bool Pause = false);
|
2000-05-01 16:29:46 +02:00
|
|
|
static void Stop(const char *InstantId);
|
2002-06-16 12:57:31 +02:00
|
|
|
static void Stop(cDevice *Device);
|
2001-10-28 16:32:34 +01:00
|
|
|
static bool StopPrimary(bool DoIt = false);
|
2003-04-21 14:57:13 +02:00
|
|
|
static bool PauseLiveVideo(void);
|
2000-05-01 16:29:46 +02:00
|
|
|
static const char *GetInstantId(const char *LastInstantId);
|
2002-02-17 14:29:13 +01:00
|
|
|
static cRecordControl *GetRecordControl(const char *FileName);
|
2001-09-01 15:04:14 +02:00
|
|
|
static void Process(time_t t);
|
2004-01-04 12:30:00 +01:00
|
|
|
static void ChannelDataModified(cChannel *Channel);
|
2001-02-04 12:36:32 +01:00
|
|
|
static bool Active(void);
|
2002-06-16 12:57:31 +02:00
|
|
|
static void Shutdown(void);
|
2000-04-30 10:22:13 +02:00
|
|
|
};
|
|
|
|
|
2002-06-16 12:57:31 +02:00
|
|
|
class cReplayControl : public cDvbPlayerControl {
|
2000-04-24 15:32:11 +02:00
|
|
|
private:
|
2000-12-28 12:57:16 +01:00
|
|
|
cMarks marks;
|
2001-09-14 14:06:43 +02:00
|
|
|
bool visible, modeOnly, shown, displayFrames;
|
2001-07-28 13:16:23 +02:00
|
|
|
int lastCurrent, lastTotal;
|
2001-07-28 14:06:36 +02:00
|
|
|
time_t timeoutShow;
|
2003-12-22 13:29:24 +01:00
|
|
|
bool timeSearchActive, timeSearchHide;
|
2002-03-31 15:26:18 +02:00
|
|
|
int timeSearchTime, timeSearchPos;
|
2001-08-11 14:30:21 +02:00
|
|
|
void TimeSearchDisplay(void);
|
|
|
|
void TimeSearchProcess(eKeys Key);
|
|
|
|
void TimeSearch(void);
|
2003-05-24 16:41:35 +02:00
|
|
|
void ShowTimed(int Seconds = 0);
|
2000-04-29 15:57:42 +02:00
|
|
|
static char *fileName;
|
|
|
|
static char *title;
|
2001-09-14 15:10:12 +02:00
|
|
|
void DisplayAtBottom(const char *s = NULL);
|
|
|
|
void ShowMode(void);
|
2000-12-09 11:13:00 +01:00
|
|
|
bool ShowProgress(bool Initial);
|
2000-12-28 12:57:16 +01:00
|
|
|
void MarkToggle(void);
|
|
|
|
void MarkJump(bool Forward);
|
|
|
|
void MarkMove(bool Forward);
|
|
|
|
void EditCut(void);
|
|
|
|
void EditTest(void);
|
2000-04-23 15:38:16 +02:00
|
|
|
public:
|
2000-04-29 15:57:42 +02:00
|
|
|
cReplayControl(void);
|
|
|
|
virtual ~cReplayControl();
|
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
2003-05-24 16:41:35 +02:00
|
|
|
virtual void Show(void);
|
2002-06-23 09:44:00 +02:00
|
|
|
virtual void Hide(void);
|
2000-04-29 15:57:42 +02:00
|
|
|
bool Visible(void) { return visible; }
|
|
|
|
static void SetRecording(const char *FileName, const char *Title);
|
2000-10-08 15:08:26 +02:00
|
|
|
static const char *LastReplayed(void);
|
2000-10-08 15:41:30 +02:00
|
|
|
static void ClearLastReplayed(const char *FileName);
|
2000-04-23 15:38:16 +02:00
|
|
|
};
|
|
|
|
|
2002-04-13 15:31:41 +02:00
|
|
|
#endif //__MENU_H
|