summaryrefslogtreecommitdiff
path: root/process.h
blob: 9a5d88f02dab4686dc88c2f2b2eb2f2953fbbb15 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*
 * process.h: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */

#ifndef __process_h_
#define __process_h_

#include "global.h"

// --- cInfosatevent
class cInfosatevent
{
#define EVCONTENTMASK_MOVIEDRAMA               0x10
#define EVCONTENTMASK_NEWSCURRENTAFFAIRS       0x20
#define EVCONTENTMASK_SHOW                     0x30
#define EVCONTENTMASK_SPORTS                   0x40
#define EVCONTENTMASK_CHILDRENYOUTH            0x50
#define EVCONTENTMASK_MUSICBALLETDANCE         0x60
#define EVCONTENTMASK_ARTSCULTURE              0x70
#define EVCONTENTMASK_SOCIALPOLITICALECONOMICS 0x80
#define EVCONTENTMASK_EDUCATIONALSCIENCE       0x90
#define EVCONTENTMASK_LEISUREHOBBIES           0xA0
#define EVCONTENTMASK_SPECIAL                  0xB0
#define EVCONTENTMASK_USERDEFINED              0xF0

private:
  int duration;
  time_t startTime;
  char *title;
  char *shorttext;
  char *description;
  char *announcement;
  char *country;
  char *genre;
  char *original;
  char *episode;
  char *category;
  char *extepg;
  char *addition;
  char *rating;
  int content;
  int fsk;
  int year;
  int usage;
  int days;
  tEventID eventID;
public:
  cInfosatevent();
  ~cInfosatevent();
  void SetTitle(const char *Title);
  void SetShortText(const char *ShortText);
  void SetDescription(const char *Description);
  void SetStartTime(time_t StartTime) { startTime=StartTime; }
  void SetDuration(int Duration) { duration=Duration; }
  void SetEventUsage(int Usage) { usage=Usage; }
  void SetEventDays(int Days) { days=Days; }
  void SetYear(int Year) { year=Year; }
  void SetEventID(tEventID EventID) { eventID=EventID; }
  void SetContentDescriptor(int Content) { content=Content; }
  void SetFSK(int FSK) { fsk=FSK; }
  void SetRating(const char *Rating);
  void SetAnnouncement(const char *Announcement);
  void SetCountry(const char *Country);
  void SetCategory(const char *Category);
  void SetCategoryByID(int i);
  void SetGenre(const char *Genre);
  void SetGenreByID(int i);
  void SetOriginal(const char *Original);
  void SetEpisode(const char *Episode);
  void SetAddition(const char *Addition);
  const char *Description(void) const { return description; }
  const char *Title(void) const { return title; }
  const char *ShortText(void) const { return shorttext; }
  const char *Announcement(void) const { return announcement; }
  const char *Category(void) const { return category; }
  const char *Genre(void) const { return genre; }
  const char *Country(void) const { return country; }
  const char *Original(void) const { return original; }
  const char *Episode(void) const { return episode; }
  const char *Addition(void) const { return addition; }
  const char *Rating(void) const { return rating; }
  int Content(void) const { return content; }
  int Year(void) const { return year; }
  int Duration(void) const { return duration; }
  int FSK(void) const { return fsk; }
  time_t StartTime(void) const { return startTime; }
  int Usage() { return usage; }
  int Days() { return days; }
  tEventID EventID(void) const { return eventID; }
  const char *ExtEPG(void);
};

// --- cProcessInfosatepg
class cProcessInfosatepg //: public cThread
{
private:
  cGlobalInfosatepg *global;
  bool AddInfosatEvent(cChannel *channel, cInfosatevent *iEvent);
  bool CheckOriginal_and_Episode(char **s,cInfosatevent *iEvent,cCharSetConv *conv);
  bool CheckAnnouncement(char *s,cInfosatevent *iEvent);
  bool ParseInfosatepg(FILE *f,time_t *firststarttime);
  cChannel *GetVDRChannel(int frequency, int sid);
  u_long DoSum(u_long sum, const char *buf, int nBytes);
  cEvent *SearchEvent(cSchedule* Schedule, cInfosatevent *iEvent);
public:
  //virtual void Action(); //(int Mac, cGlobalInfosatepg *Global);
  cProcessInfosatepg(int Mac, cGlobalInfosatepg *Global);
};

#endif