eServiceEvent: parse PDC descriptor
authorims <ims21@users.sourceforge.net>
Thu, 19 Mar 2015 17:59:04 +0000 (18:59 +0100)
committerpieterg <pieterg@users.sourceforge.net>
Thu, 19 Mar 2015 20:47:59 +0000 (21:47 +0100)
Signed-off-by: pieterg <pieterg@users.sourceforge.net>

lib/service/event.cpp
lib/service/event.h

index 660cefe..8f3335f 100644 (file)
@@ -11,6 +11,7 @@
 #include <dvbsi++/content_descriptor.h>
 #include <dvbsi++/parental_rating_descriptor.h>
 #include <dvbsi++/descriptor_tag.h>
+#include <dvbsi++/pdc_descriptor.h>
 
 #include <sys/types.h>
 #include <fcntl.h>
@@ -161,6 +162,12 @@ bool eServiceEvent::loadLanguage(Event *evt, const std::string &lang, int tsidon
                                        }
                                        break;
                                }
+                               case PDC_DESCRIPTOR:
+                               {
+                                       const PdcDescriptor *pdcd = (PdcDescriptor *)*desc;
+                                       m_pdc_pil = pdcd->getProgrammeIdentificationLabel();
+                                       break;
+                               }
                        }
                }
        }
index 73fe200..ca116f1 100644 (file)
@@ -81,6 +81,7 @@ class eServiceEvent: public iObject
        time_t m_begin;
        int m_duration;
        int m_event_id;
+       int m_pdc_pil;
        std::string m_event_name, m_short_description, m_extended_description;
        static std::string m_language, m_language_alternative;
        // .. additional info
@@ -94,6 +95,7 @@ public:
        time_t getBeginTime() const { return m_begin; }
        int getDuration() const { return m_duration; }
        int getEventId() const { return m_event_id; }
+       int getPdcPil() const { return m_pdc_pil; }
        std::string getEventName() const { return m_event_name; }
        std::string getShortDescription() const { return m_short_description; }
        std::string getExtendedDescription() const { return m_extended_description; }