-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsource.h
69 lines (60 loc) · 1.74 KB
/
source.h
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
/*
* source.h: IPTV plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#ifndef __IPTV_SOURCE_H
#define __IPTV_SOURCE_H
#include <vdr/menuitems.h>
#include <vdr/sourceparams.h>
#include "common.h"
class cIptvTransponderParameters
{
friend class cIptvSourceParam;
private:
int sidScanM;
int pidScanM;
int protocolM;
char addressM[NAME_MAX + 1];
int parameterM;
public:
enum {
eProtocolUDP,
eProtocolCURL,
eProtocolHTTP,
eProtocolFILE,
eProtocolEXT,
eProtocolCount
};
cIptvTransponderParameters(const char *parametersP = NULL);
int SidScan(void) const { return sidScanM; }
int PidScan(void) const { return pidScanM; }
int Protocol(void) const { return protocolM; }
const char *Address(void) const { return addressM; }
int Parameter(void) const { return parameterM; }
void SetSidScan(int sidScanP) { sidScanM = sidScanP; }
void SetPidScan(int pidScanP) { pidScanM = pidScanP; }
void SetProtocol(int protocolP) { protocolM = protocolP; }
void SetAddress(const char *addressP) { strncpy(addressM, addressP, sizeof(addressM)); }
void SetParameter(int parameterP) { parameterM = parameterP; }
cString ToString(char typeP) const;
bool Parse(const char *strP);
};
class cIptvSourceParam : public cSourceParam
{
private:
int paramM;
int ridM;
cChannel dataM;
cIptvTransponderParameters itpM;
const char *protocolsM[cIptvTransponderParameters::eProtocolCount];
private:
static const char *allowedProtocolCharsS;
public:
cIptvSourceParam(char sourceP, const char *descriptionP);
virtual void SetData(cChannel *channelP);
virtual void GetData(cChannel *channelP);
virtual cOsdItem *GetOsdItem(void);
};
#endif // __IPTV_SOURCE_H