2010-03-04 16:34:21 +01:00
|
|
|
/*
|
|
|
|
* 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:
|
2013-02-23 14:31:11 +01:00
|
|
|
int sidScanM;
|
|
|
|
int pidScanM;
|
|
|
|
int protocolM;
|
2013-03-11 16:59:59 +01:00
|
|
|
char addressM[NAME_MAX + 1];
|
2013-02-23 14:31:11 +01:00
|
|
|
int parameterM;
|
2010-03-04 16:34:21 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
enum {
|
|
|
|
eProtocolUDP,
|
2013-02-23 01:03:27 +01:00
|
|
|
eProtocolCURL,
|
2010-03-04 16:34:21 +01:00
|
|
|
eProtocolHTTP,
|
|
|
|
eProtocolFILE,
|
|
|
|
eProtocolEXT,
|
|
|
|
eProtocolCount
|
|
|
|
};
|
2013-02-23 14:31:11 +01:00
|
|
|
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);
|
2010-03-04 16:34:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
class cIptvSourceParam : public cSourceParam
|
|
|
|
{
|
|
|
|
private:
|
2013-02-23 14:31:11 +01:00
|
|
|
int paramM;
|
|
|
|
int nidM;
|
|
|
|
int tidM;
|
|
|
|
int ridM;
|
|
|
|
cChannel dataM;
|
|
|
|
cIptvTransponderParameters itpM;
|
|
|
|
const char *protocolsM[cIptvTransponderParameters::eProtocolCount];
|
2010-03-04 16:34:21 +01:00
|
|
|
|
2013-02-23 19:06:55 +01:00
|
|
|
private:
|
|
|
|
static const char *allowedProtocolCharsS;
|
|
|
|
|
2010-03-04 16:34:21 +01:00
|
|
|
public:
|
2013-02-23 14:31:11 +01:00
|
|
|
cIptvSourceParam(char sourceP, const char *descriptionP);
|
|
|
|
virtual void SetData(cChannel *channelP);
|
|
|
|
virtual void GetData(cChannel *channelP);
|
2010-03-04 16:34:21 +01:00
|
|
|
virtual cOsdItem *GetOsdItem(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __IPTV_SOURCE_H
|