summaryrefslogtreecommitdiff
path: root/myreplaycontrol.c
blob: 53057465dc6efb32d1286ae6d6b4220aa8f6b059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * See the README file for copyright information and how to reach the author.
 */

#include <vdr/interface.h>
#include <vdr/status.h>
#include <vdr/menu.h>
#include "myreplaycontrol.h"
#include "mymenusetup.h"

using namespace std;

char *myReplayControl::Cut=NULL;
char *myReplayControl::Cutted=NULL;

myReplayControl::~myReplayControl()
{
  if(mysetup.ReturnToPlugin)
    cRemote::CallPlugin("extrecmenu");
}

eOSState myReplayControl::ProcessKey(eKeys Key)
{
  if(Key==kBack)
   return osEnd;

  if(Key==kEditCut)
  {
    free(Cut);
    Cut=strdup(LastReplayed());

    cRecording recording(LastReplayed());
    free(Cutted);
    Cutted=strdup(recording.PrefixFileName('%'));
  }
 
  return cReplayControl::ProcessKey(Key);
}