36 IMPORT_C virtual ~CShowEngine(); |
36 IMPORT_C virtual ~CShowEngine(); |
37 |
37 |
38 public: |
38 public: |
39 IMPORT_C void AddDownloadL(CShowInfo& info); |
39 IMPORT_C void AddDownloadL(CShowInfo& info); |
40 IMPORT_C TBool RemoveDownloadL(TUint aUid); |
40 IMPORT_C TBool RemoveDownloadL(TUint aUid); |
41 IMPORT_C void RemoveAllDownloads(); |
41 IMPORT_C void RemoveAllDownloadsL(); |
42 |
42 |
43 IMPORT_C void SuspendDownloads(); |
43 IMPORT_C void SuspendDownloads(); |
44 IMPORT_C void ResumeDownloadsL(); |
44 IMPORT_C void ResumeDownloadsL(); |
45 |
45 |
46 IMPORT_C TInt GetNumDownloadingShows(); |
46 IMPORT_C TInt GetNumDownloadingShows(); |
55 IMPORT_C void GetNewShowsL(RShowInfoArray &aArray); |
55 IMPORT_C void GetNewShowsL(RShowInfoArray &aArray); |
56 IMPORT_C void GetShowsDownloadingL(RShowInfoArray &aArray); |
56 IMPORT_C void GetShowsDownloadingL(RShowInfoArray &aArray); |
57 IMPORT_C CShowInfo* DBGetShowByFileNameL(TFileName aFileName); |
57 IMPORT_C CShowInfo* DBGetShowByFileNameL(TFileName aFileName); |
58 |
58 |
59 IMPORT_C TBool AddShowL(const CShowInfo& item); |
59 IMPORT_C TBool AddShowL(const CShowInfo& item); |
60 IMPORT_C void DeletePlayedShows(RShowInfoArray &aShowInfoArray); |
60 IMPORT_C void DeletePlayedShowsL(RShowInfoArray &aShowInfoArray); |
61 IMPORT_C void DeleteAllShowsByFeedL(TUint aFeedUid,TBool aDeleteFiles=ETrue); |
61 IMPORT_C void DeleteAllShowsByFeedL(TUint aFeedUid,TBool aDeleteFiles=ETrue); |
62 IMPORT_C void DeleteShowL(TUint aShowUid, TBool aRemoveFile=ETrue); |
62 IMPORT_C void DeleteShowL(TUint aShowUid, TBool aRemoveFile=ETrue); |
63 IMPORT_C void DeleteOldShowsByFeed(TUint aFeedUid); |
63 IMPORT_C void DeleteOldShowsByFeed(TUint aFeedUid); |
64 |
64 |
65 IMPORT_C void AddObserver(MShowEngineObserver *observer); |
65 IMPORT_C void AddObserver(MShowEngineObserver *observer); |
66 IMPORT_C void RemoveObserver(MShowEngineObserver *observer); |
66 IMPORT_C void RemoveObserver(MShowEngineObserver *observer); |
67 |
67 |
68 IMPORT_C void NotifyShowListUpdatedL(); |
68 IMPORT_C void NotifyShowListUpdatedL(); |
69 IMPORT_C void UpdateShow(CShowInfo& aInfo); |
69 IMPORT_C void UpdateShowL(CShowInfo& aInfo); |
70 |
70 |
71 IMPORT_C void GetMimeType(const TDesC& aFileName, TDes& aMimeType); |
71 IMPORT_C void GetMimeType(const TDesC& aFileName, TDes& aMimeType); |
72 |
72 |
73 IMPORT_C CMetaDataReader& MetaDataReader(); |
73 IMPORT_C CMetaDataReader& MetaDataReader(); |
74 |
74 |
79 void CompleteL(CHttpClient* aClient, TInt aError); |
79 void CompleteL(CHttpClient* aClient, TInt aError); |
80 void Progress(CHttpClient* aHttpClient, int aBytes, int aTotalBytes); |
80 void Progress(CHttpClient* aHttpClient, int aBytes, int aTotalBytes); |
81 void DownloadInfo(CHttpClient* aClient, int aSize); |
81 void DownloadInfo(CHttpClient* aClient, int aSize); |
82 void FileError(TUint aError); |
82 void FileError(TUint aError); |
83 // from MetaDataReaderObserver |
83 // from MetaDataReaderObserver |
84 void ReadMetaData(CShowInfo& aShowInfo); |
84 void ReadMetaDataL(CShowInfo& aShowInfo); |
85 void ReadMetaDataCompleteL(); |
85 void ReadMetaDataCompleteL(); |
86 |
86 |
87 private: |
87 private: |
88 CShowEngine(CPodcastModel& aPodcastModel); |
88 CShowEngine(CPodcastModel& aPodcastModel); |
89 void ConstructL(); |
89 void ConstructL(); |
104 |
104 |
105 private: |
105 private: |
106 // DB methods |
106 // DB methods |
107 CShowInfo* DBGetShowByUidL(TUint aUid); |
107 CShowInfo* DBGetShowByUidL(TUint aUid); |
108 void DBFillShowInfoFromStmtL(sqlite3_stmt *st, CShowInfo* showInfo); |
108 void DBFillShowInfoFromStmtL(sqlite3_stmt *st, CShowInfo* showInfo); |
109 TBool DBAddShow(const CShowInfo& aItem); |
109 TBool DBAddShowL(const CShowInfo& aItem); |
110 TBool DBUpdateShow(CShowInfo& aItem); |
110 TBool DBUpdateShowL(CShowInfo& aItem); |
111 void DBGetShowsByFeedL(RShowInfoArray& aShowArray, TUint aFeedUid); |
111 void DBGetShowsByFeedL(RShowInfoArray& aShowArray, TUint aFeedUid); |
112 void DBGetAllShowsL(RShowInfoArray& aShowArray); |
112 void DBGetAllShowsL(RShowInfoArray& aShowArray); |
113 void DBGetNewShowsL(RShowInfoArray& aShowArray); |
113 void DBGetNewShowsL(RShowInfoArray& aShowArray); |
114 void DBGetDownloadedShowsL(RShowInfoArray& aShowArray); |
114 void DBGetDownloadedShowsL(RShowInfoArray& aShowArray); |
115 TBool DBDeleteAllShowsByFeed(TUint aFeedUid); |
115 TBool DBDeleteAllShowsByFeed(TUint aFeedUid); |