35 IMPORT_C static CShowEngine* NewL(CPodcastModel& aPodcastModel); |
35 IMPORT_C static CShowEngine* NewL(CPodcastModel& aPodcastModel); |
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 void RemoveDownloadL(TUint aUid); |
41 IMPORT_C void RemoveAllDownloadsL(); |
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 |
54 IMPORT_C void GetShowsDownloadedL(RShowInfoArray &aArray); |
54 IMPORT_C void GetShowsDownloadedL(RShowInfoArray &aArray); |
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 void AddShowL(const CShowInfo& item); |
60 IMPORT_C void DeletePlayedShowsL(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 DeleteOldShowsByFeedL(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(); |
86 |
86 |
87 private: |
87 private: |
88 CShowEngine(CPodcastModel& aPodcastModel); |
88 CShowEngine(CPodcastModel& aPodcastModel); |
89 void ConstructL(); |
89 void ConstructL(); |
90 |
90 |
91 TBool GetShowL(CShowInfo *info); |
91 void GetShowL(CShowInfo *info); |
92 |
92 |
93 void NotifyDownloadQueueUpdatedL(); |
93 void NotifyDownloadQueueUpdatedL(); |
94 void NotifyShowDownloadUpdatedL(TInt aBytesOfCurrentDownload, TInt aBytesTotal); |
94 void NotifyShowDownloadUpdatedL(TInt aBytesOfCurrentDownload, TInt aBytesTotal); |
95 void NotifyShowFinishedL(TInt aError); |
95 void NotifyShowFinishedL(TInt aError); |
96 void DownloadNextShowL(); |
96 void DownloadNextShowL(); |
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 DBAddShowL(const CShowInfo& aItem); |
109 void DBAddShowL(const CShowInfo& aItem); |
110 TBool DBUpdateShowL(CShowInfo& aItem); |
110 void 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 void DBDeleteAllShowsByFeedL(TUint aFeedUid); |
116 void DBDeleteOldShowsByFeed(TUint aFeedUid); |
116 void DBDeleteOldShowsByFeedL(TUint aFeedUid); |
117 TBool DBDeleteShow(TUint aUid); |
117 void DBDeleteShowL(TUint aUid); |
118 void DBRemoveAllDownloads(); |
118 void DBRemoveAllDownloadsL(); |
119 void DBRemoveDownload(TUint aUid); |
119 void DBRemoveDownloadL(TUint aUid); |
120 void DBGetAllDownloadsL(RShowInfoArray& aShowArray); |
120 void DBGetAllDownloadsL(RShowInfoArray& aShowArray); |
121 TUint DBGetDownloadsCount(); |
121 TUint DBGetDownloadsCountL(); |
122 void DBAddDownload(TUint aUid); |
122 void DBAddDownloadL(TUint aUid); |
123 CShowInfo* DBGetNextDownloadL(); |
123 CShowInfo* DBGetNextDownloadL(); |
124 |
124 |
125 private: |
125 private: |
126 CHttpClient* iShowClient; |
126 CHttpClient* iShowClient; |
127 |
127 |