forked from rofafor/vdr-plugin-iptv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotocolhttp.h
36 lines (30 loc) · 901 Bytes
/
protocolhttp.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
/*
* protocolhttp.h: IPTV plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#pragma once
#include <arpa/inet.h>
#include "protocolif.h"
#include "socket.h"
class cIptvProtocolHttp : public cIptvTcpSocket, public cIptvProtocolIf {
private:
char *streamAddrM;
char *streamPathM;
int streamPortM;
private:
bool Connect();
bool Disconnect();
bool GetHeaderLine(char *destP, unsigned int destLenP, unsigned int &recvLenP);
bool ProcessHeaders();
public:
cIptvProtocolHttp();
~cIptvProtocolHttp() override;
int Read(unsigned char *bufferAddrP, unsigned int bufferLenP) override;
bool SetSource(SourceParameter parameter) override;
bool SetPid(int pidP, int typeP, bool onP) override;
bool Open() override;
bool Close() override;
cString GetInformation() override;
};