00001 #ifndef _ICONMAP_H_ 00002 #define _ICONMAP_H_ 00003 00004 #include <vector> 00005 using namespace std; 00006 00007 #include <QUrl> 00008 #include <QString> 00009 #include <QMap> 00010 00011 #include "mythhttppool.h" 00012 00013 class IconData : private MythHttpListener 00014 { 00015 public: 00016 IconData() {} 00017 ~IconData(); 00018 00019 void UpdateSourceIcons(uint sourceid); 00020 void ImportIconMap(const QString &filename); 00021 void ExportIconMap(const QString &filename); 00022 void ResetIconMap(bool reset_icons); 00023 00024 private: 00025 class FI { public: QString filename; uint chanid; }; 00026 typedef vector<FI> FIL; 00027 typedef QMap<QUrl,FIL> Url2FIL; 00028 00029 // Implements MythHttpListener 00030 virtual void Update(QHttp::Error error, 00031 const QString &error_str, 00032 const QUrl &url, 00033 uint http_status_id, 00034 const QString &http_status_str, 00035 const QByteArray &data); 00036 00037 bool Save(const FI &fi, const QByteArray &data); 00038 00039 QMutex m_u2fl_lock; 00040 Url2FIL m_u2fl; 00041 }; 00042 00043 #endif // _ICONMAP_H_
1.6.3