summaryrefslogtreecommitdiff
path: root/p2pvr/scanner/dvbSiReaderHelper.h
blob: 1efb461129502480ea27335def901a9204b830b3 (plain)
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
#ifndef DVBSIREADERHELPER_H
#define DVBSIREADERHELPER_H

#include "xmlObjectLoader.h"
#include "variables.h"

class RowProcessor;

class DvbSiReaderHelper {
	public:
		DvbSiReaderHelper(const xmlpp::Element * p);
		~DvbSiReaderHelper();

		const Variable demux;
		const Variable timeout;

	protected:
		void openInput() const;
		virtual void filterInput(int fd) const = 0;
		void readTables(const RowProcessor *) const;
		virtual bool parseInfoTable(const u_char *data, size_t len, const RowProcessor *) const = 0;
		void closeInput() const;

		static VariableType convert(const char * txt, size_t len);
		static const std::string ISO10646;
		static const std::string EitEncoding;
		static const std::string UTF8;

	private:
		mutable int fd_epg;
};

#endif