2007-10-15 22:06:38 +02:00
|
|
|
/*
|
|
|
|
* protocolext.h: IPTV plugin for the Video Disk Recorder
|
|
|
|
*
|
|
|
|
* See the README file for copyright information and how to reach the author.
|
|
|
|
*
|
2007-10-20 00:18:55 +02:00
|
|
|
* $Id: protocolext.h,v 1.5 2007/10/19 22:18:55 rahrenbe Exp $
|
2007-10-15 22:06:38 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __IPTV_PROTOCOLEXT_H
|
|
|
|
#define __IPTV_PROTOCOLEXT_H
|
|
|
|
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include "protocolif.h"
|
|
|
|
|
|
|
|
class cIptvProtocolExt : public cIptvProtocolIf {
|
|
|
|
private:
|
2007-10-18 21:33:15 +02:00
|
|
|
int pid;
|
2007-10-15 22:06:38 +02:00
|
|
|
char* listenAddr;
|
|
|
|
int listenPort;
|
2007-10-19 23:36:27 +02:00
|
|
|
char* scriptFile;
|
|
|
|
int scriptParameter;
|
2007-10-15 22:06:38 +02:00
|
|
|
int socketDesc;
|
|
|
|
unsigned char* readBuffer;
|
|
|
|
unsigned int readBufferLen;
|
|
|
|
struct sockaddr_in sockAddr;
|
|
|
|
bool isActive;
|
|
|
|
|
|
|
|
private:
|
2007-10-17 00:13:44 +02:00
|
|
|
bool OpenSocket(void);
|
2007-10-15 22:06:38 +02:00
|
|
|
void CloseSocket(void);
|
2007-10-18 21:33:15 +02:00
|
|
|
void TerminateCommand(void);
|
|
|
|
void ExecuteCommand(void);
|
2007-10-15 22:06:38 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
cIptvProtocolExt();
|
|
|
|
virtual ~cIptvProtocolExt();
|
|
|
|
virtual int Read(unsigned char* *BufferAddr);
|
2007-10-20 00:18:55 +02:00
|
|
|
virtual bool Set(const char* Location, const int Parameter, const int Index);
|
2007-10-15 22:06:38 +02:00
|
|
|
virtual bool Open(void);
|
|
|
|
virtual bool Close(void);
|
|
|
|
virtual cString GetInformation(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __IPTV_PROTOCOLEXT_H
|
|
|
|
|