diff options
Diffstat (limited to 'p2pvr/scanner/epgRows.h')
-rw-r--r-- | p2pvr/scanner/epgRows.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/p2pvr/scanner/epgRows.h b/p2pvr/scanner/epgRows.h new file mode 100644 index 0000000..6f155e2 --- /dev/null +++ b/p2pvr/scanner/epgRows.h @@ -0,0 +1,52 @@ +#ifndef EPGROWS_H +#define EPGROWS_H + +#include "scripts.h" +#include "rowSet.h" +#include "variables.h" +#include "dvbSiReaderHelper.h" +#include <boost/tuple/tuple.hpp> + +class EpgProgram; + +class EpgRows : public RowSet, DvbSiReaderHelper { + public: + EpgRows(const ScriptNodePtr p); + ~EpgRows(); + + void execute(const Glib::ustring &, const RowProcessor *) const; + void loadComplete(const CommonObjects *); + + private: + void filterInput(int fd) const; +}; + +class EpgRowState : public RowState, DvbSiParserHelper { + public: + EpgRowState(); + const Columns & getColumns() const; + RowAttribute resolveAttr(const Glib::ustring & attrName) const; + + bool parseInfoTable(const u_char *data, size_t len, const RowProcessor *); + + private: + void parseEventDescription(const u_char *data, EpgProgram * current) const; + void parseLongEventDescription(const u_char *data, EpgProgram * current) const; + void parseComponentDescription(const u_char *data, EpgProgram * current) const; + void parseContentDescription(const u_char *data, EpgProgram * current) const; + void parseRatingDescription(const u_char *data, EpgProgram * current) const; + void parseContentIdentifierDescription(const u_char *data, EpgProgram * current) const; + void parseDescription(const u_char * data, size_t len, EpgProgram * current) const; + + typedef boost::tuple<int, int> SeenProgram; + typedef std::set<SeenProgram> SeenPrograms; + SeenPrograms seenPrograms; + + Columns columns; + friend class EpgRows; + mutable EpgProgram * current; +}; + + +#endif + |