00001 #ifndef _PROGRAMDATA_H_ 00002 #define _PROGRAMDATA_H_ 00003 00004 // Qt headers 00005 #include <qstring.h> 00006 #include <qdatetime.h> 00007 #include <qvaluelist.h> 00008 #include <qmap.h> 00009 00010 // MythTV headers 00011 #include "mythexp.h" 00012 00013 struct ProgRating 00014 { 00015 QString system; 00016 QString rating; 00017 }; 00018 00019 struct ProgCredit 00020 { 00021 QString role; 00022 QString name; 00023 }; 00024 00025 class ProgInfo 00026 { 00027 public: 00028 ProgInfo() { } 00029 ProgInfo(const ProgInfo &other) { channel = other.channel; 00030 startts = other.startts; 00031 endts = other.endts; 00032 start = other.start; 00033 end = other.end; 00034 title = other.title; 00035 subtitle = other.subtitle; 00036 desc = other.desc; 00037 category = other.category; 00038 catType = other.catType; 00039 airdate = other.airdate; 00040 stars = other.stars; 00041 previouslyshown = other.previouslyshown; 00042 title_pronounce = other.title_pronounce; 00043 audioproperties = other.audioproperties; 00044 videoproperties = other.videoproperties; 00045 subtitletype = other.subtitletype; 00046 partnumber = other.partnumber; 00047 parttotal = other.parttotal; 00048 seriesid = other.seriesid; 00049 originalairdate = other.originalairdate; 00050 showtype = other.showtype; 00051 colorcode = other.colorcode; 00052 syndicatedepisodenumber = other.syndicatedepisodenumber; 00053 programid = other.programid; 00054 00055 clumpidx = other.clumpidx; 00056 clumpmax = other.clumpmax; 00057 ratings = other.ratings; 00058 credits = other.credits; 00059 content = other.content; 00060 } 00061 00062 00063 QString channel; 00064 QString startts; 00065 QString endts; 00066 QDateTime start; 00067 QDateTime end; 00068 QString title; 00069 QString subtitle; 00070 QString desc; 00071 QString category; 00072 QString catType; 00073 QString airdate; 00074 QString stars; 00075 bool previouslyshown; 00076 QString title_pronounce; 00077 int audioproperties; 00078 int videoproperties; 00079 int subtitletype; 00080 QString partnumber; 00081 QString parttotal; 00082 QString seriesid; 00083 QString originalairdate; 00084 QString showtype; 00085 QString colorcode; 00086 QString syndicatedepisodenumber; 00087 QString programid; 00088 00089 QString clumpidx; 00090 QString clumpmax; 00091 QValueList<ProgRating> ratings; 00092 QValueList<ProgCredit> credits; 00093 QString content; 00094 }; 00095 00096 class MPUBLIC ProgramData 00097 { 00098 public: 00099 ProgramData() : listing_wrap_offset(0) {} 00100 00101 void handlePrograms(int id, 00102 QMap<QString, QValueList<ProgInfo> > *proglist); 00103 00104 static int fix_end_times(void); 00105 static void clearDataByChannel(int chanid, QDateTime from, QDateTime to); 00106 static void clearDataBySource(int sourceid, QDateTime from, QDateTime to); 00107 00108 private: 00109 void fixProgramList(QValueList<ProgInfo> *fixlist); 00110 00111 public: 00112 int listing_wrap_offset; 00113 }; 00114 00115 #endif // _PROGRAMDATA_H_
1.5.5