summaryrefslogtreecommitdiff
path: root/p2pvr/scanner/serviceRows.h
blob: 0fbd1195f60f980a419c5f4d77b69caf972bda94 (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
35
36
37
38
39
40
41
42
#ifndef SERVICEROWS_H
#define SERVICEROWS_H

#include "scripts.h"
#include "rowSet.h"
#include "variables.h"
#include "dvbSiReaderHelper.h"

class Service;

class ServiceRows : public RowSet, DvbSiReaderHelper {
	public:
		ServiceRows(const ScriptNodePtr p);
		~ServiceRows();

		void execute(const Glib::ustring &, const RowProcessor *) const;
		void loadComplete(const CommonObjects *);

	private:
		typedef std::set<int> SeenServices;
		mutable SeenServices seenServices;

		void filterInput(int fd) const;
		bool parseInfoTable(const u_char *data, size_t len, const RowProcessor *) const;
		void parseServiceDescriptor(const u_char *data, size_t len, Service * current) const;
		void parseServiceAuthDescriptor(const u_char *data, size_t len, Service * current) const;
};

class ServiceRowState : public RowState {
	public:
		ServiceRowState();
		const Columns & getColumns() const;
		RowAttribute resolveAttr(const Glib::ustring & attrName) const;

	private:
		Columns columns;
		friend class ServiceRows;
		mutable Service * current;
};

#endif