From 748b45107f004f349af5ebe8047568d6a4a6a6dc Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 6 Sep 2013 23:04:59 +0000 Subject: Compat fixes for recent p2 updates --- p2pvr/scanner/dvbSiReaderHelper.cpp | 6 +++--- p2pvr/scanner/dvbSiReaderHelper.h | 2 +- p2pvr/scanner/epgRows.cpp | 6 +++--- p2pvr/scanner/epgRows.h | 4 ++-- p2pvr/scanner/serviceRows.cpp | 6 +++--- p2pvr/scanner/serviceRows.h | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/p2pvr/scanner/dvbSiReaderHelper.cpp b/p2pvr/scanner/dvbSiReaderHelper.cpp index 7a14cd4..88b025d 100644 --- a/p2pvr/scanner/dvbSiReaderHelper.cpp +++ b/p2pvr/scanner/dvbSiReaderHelper.cpp @@ -29,9 +29,9 @@ DvbSiReaderHelper::~DvbSiReaderHelper() } void -DvbSiReaderHelper::openInput() const +DvbSiReaderHelper::openInput(ExecContext * ec) const { - if ((fd_epg = open(demux(), O_RDWR)) < 0) { + if ((fd_epg = open(demux(ec), O_RDWR)) < 0) { throw DemuxOpenFailure(strerror(errno)); } filterInput(fd_epg); @@ -109,7 +109,7 @@ DvbSiReaderHelper::readTables(const InfoTableParser & parseInfoTable) const size_t n; int prtn = 0; time_t lastuseful = time(NULL); - while (((prtn = poll(&ufd, 1, timeout())) == 1) && (n = read(fd_epg, buf, sizeof(buf)))) { + while (((prtn = poll(&ufd, 1, timeout(NULL))) == 1) && (n = read(fd_epg, buf, sizeof(buf)))) { if (n < sizeof(struct si_tab)) throw ErrorReadingData("Smaller that si_tab"); struct si_tab *tab = (struct si_tab *)buf; diff --git a/p2pvr/scanner/dvbSiReaderHelper.h b/p2pvr/scanner/dvbSiReaderHelper.h index 66e1206..d0080f1 100644 --- a/p2pvr/scanner/dvbSiReaderHelper.h +++ b/p2pvr/scanner/dvbSiReaderHelper.h @@ -18,7 +18,7 @@ class DvbSiReaderHelper { const Variable timeout; protected: - void openInput() const; + void openInput(ExecContext *) const; virtual void filterInput(int fd) const = 0; void readTables(const InfoTableParser &) const; void closeInput() const; diff --git a/p2pvr/scanner/epgRows.cpp b/p2pvr/scanner/epgRows.cpp index 7cf8de6..e27769d 100644 --- a/p2pvr/scanner/epgRows.cpp +++ b/p2pvr/scanner/epgRows.cpp @@ -449,7 +449,7 @@ static bool validateDescription(const u_char *data, size_t len) { } /*}}}*/ bool -EpgRowState::parseInfoTable(const u_char *data, size_t len, const RowProcessor * rp) { +EpgRowState::parseInfoTable(const u_char *data, size_t len, const RowProcessorCallback & rp) { const struct eit *e = reinterpret_cast(data); len -= 4; //remove CRC @@ -518,10 +518,10 @@ EpgRows::filterInput(int fd) const } void -EpgRows::execute(const Glib::ustring &, const RowProcessor * rp) const +EpgRows::execute(const Glib::ustring &, const RowProcessorCallback & rp, ExecContext * ec) const { EpgRowState state; - openInput(); + openInput(ec); readTables(boost::bind(&EpgRowState::parseInfoTable, &state, _1, _2, rp)); closeInput(); } diff --git a/p2pvr/scanner/epgRows.h b/p2pvr/scanner/epgRows.h index 6f155e2..61c55ff 100644 --- a/p2pvr/scanner/epgRows.h +++ b/p2pvr/scanner/epgRows.h @@ -14,7 +14,7 @@ class EpgRows : public RowSet, DvbSiReaderHelper { EpgRows(const ScriptNodePtr p); ~EpgRows(); - void execute(const Glib::ustring &, const RowProcessor *) const; + void execute(const Glib::ustring &, const RowProcessorCallback &, ExecContext *) const; void loadComplete(const CommonObjects *); private: @@ -27,7 +27,7 @@ class EpgRowState : public RowState, DvbSiParserHelper { const Columns & getColumns() const; RowAttribute resolveAttr(const Glib::ustring & attrName) const; - bool parseInfoTable(const u_char *data, size_t len, const RowProcessor *); + bool parseInfoTable(const u_char *data, size_t len, const RowProcessorCallback &); private: void parseEventDescription(const u_char *data, EpgProgram * current) const; diff --git a/p2pvr/scanner/serviceRows.cpp b/p2pvr/scanner/serviceRows.cpp index 38b1459..e743858 100644 --- a/p2pvr/scanner/serviceRows.cpp +++ b/p2pvr/scanner/serviceRows.cpp @@ -88,16 +88,16 @@ ServiceRows::filterInput(int fd) const } void -ServiceRows::execute(const Glib::ustring &, const RowProcessor * rp) const +ServiceRows::execute(const Glib::ustring &, const RowProcessorCallback & rp, ExecContext * ec) const { ServiceRowState state; - openInput(); + openInput(ec); readTables(boost::bind(&ServiceRowState::parseInfoTable, &state, _1, _2, rp)); closeInput(); } bool -ServiceRowState::parseInfoTable(const u_char * data, size_t len, const RowProcessor * rp) { +ServiceRowState::parseInfoTable(const u_char * data, size_t len, const RowProcessorCallback & rp) { const struct sit *e = reinterpret_cast(data); assert(e->tableid == 0x42 || e->tableid == 0x46); len -= 4; //remove CRC diff --git a/p2pvr/scanner/serviceRows.h b/p2pvr/scanner/serviceRows.h index 83eb623..36cbee7 100644 --- a/p2pvr/scanner/serviceRows.h +++ b/p2pvr/scanner/serviceRows.h @@ -13,7 +13,7 @@ class ServiceRows : public RowSet, DvbSiReaderHelper { ServiceRows(const ScriptNodePtr p); ~ServiceRows(); - void execute(const Glib::ustring &, const RowProcessor *) const; + void execute(const Glib::ustring &, const RowProcessorCallback &, ExecContext *) const; void loadComplete(const CommonObjects *); private: @@ -25,7 +25,7 @@ class ServiceRowState : public RowState, DvbSiParserHelper { ServiceRowState(); const Columns & getColumns() const; RowAttribute resolveAttr(const Glib::ustring & attrName) const; - bool parseInfoTable(const u_char *data, size_t len, const RowProcessor *); + bool parseInfoTable(const u_char *data, size_t len, const RowProcessorCallback &); private: void parseServiceDescriptor(const u_char *data, size_t len, Service * current) const; -- cgit v1.2.3