1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00
vdr-plugin-iptv/source.h

70 lines
1.7 KiB
C
Raw Normal View History

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;
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,
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 ridM;
cChannel dataM;
cIptvTransponderParameters itpM;
const char *protocolsM[cIptvTransponderParameters::eProtocolCount];
2010-03-04 16:34:21 +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