equal
deleted
inserted
replaced
29 #include "FeedInfo.h" |
29 #include "FeedInfo.h" |
30 #include "ShowInfo.h" |
30 #include "ShowInfo.h" |
31 #include "debug.h" |
31 #include "debug.h" |
32 #include <sqlite3.h> |
32 #include <sqlite3.h> |
33 #include "ImageHandler.h" |
33 #include "ImageHandler.h" |
|
34 #include <aknserverapp.h> // MAknServerAppExitObserver |
|
35 #include <DocumentHandler.h> |
34 |
36 |
35 // SQLite leaks memory when sorting, so to test our own memory leaks we need to disable this |
37 // SQLite leaks memory when sorting, so to test our own memory leaks we need to disable this |
36 //#define DONT_SORT_SQL |
38 //#define DONT_SORT_SQL |
37 class RCmManager; |
39 class RCmManager; |
38 class CFeedEngine; |
40 class CFeedEngine; |
50 }; |
52 }; |
51 |
53 |
52 /** |
54 /** |
53 * This class handles application storage needs and ownership of audioplayer, resource lists etc. |
55 * This class handles application storage needs and ownership of audioplayer, resource lists etc. |
54 */ |
56 */ |
55 class CPodcastModel : public CBase, public MImageHandlerCallback |
57 class CPodcastModel : public CBase, public MImageHandlerCallback, public MAknServerAppExitObserver |
56 { |
58 { |
57 public: |
59 public: |
58 IMPORT_C static CPodcastModel* NewL(); |
60 IMPORT_C static CPodcastModel* NewL(); |
59 IMPORT_C ~CPodcastModel(); |
61 IMPORT_C ~CPodcastModel(); |
60 IMPORT_C CFeedEngine& FeedEngine(); |
62 IMPORT_C CFeedEngine& FeedEngine(); |
98 CPodcastModel(); |
100 CPodcastModel(); |
99 void ConstructL(); |
101 void ConstructL(); |
100 void ResetDB(); |
102 void ResetDB(); |
101 void OpenDBL(); |
103 void OpenDBL(); |
102 // From ImageHandler |
104 // From ImageHandler |
103 void ImageOperationCompleteL(TInt aError, TUint aHandle, CPodcastModel& aPodcastModel); |
105 void ImageOperationCompleteL(TInt aError, TUint aHandle, CPodcastModel& aPodcastModel); |
|
106 |
|
107 private: // Functions from base classes |
|
108 |
|
109 /** |
|
110 * From MAknServerAppExitObserver. |
|
111 * Handles the exit of a connected server application. |
|
112 */ |
|
113 void HandleServerAppExit(TInt aReason); |
|
114 |
|
115 private: // Private functions |
|
116 void LaunchFileEmbeddedL(const TDesC& aFilename); |
|
117 |
104 private: |
118 private: |
105 CShowInfo* iPlayingPodcast; |
119 CShowInfo* iPlayingPodcast; |
106 |
120 |
107 CFeedEngine* iFeedEngine; |
121 CFeedEngine* iFeedEngine; |
108 CShowEngine* iShowEngine; |
122 CShowEngine* iShowEngine; |
121 |
135 |
122 sqlite3* iDB; |
136 sqlite3* iDB; |
123 RCmManager iCmManager; |
137 RCmManager iCmManager; |
124 TBool iIsFirstStartup; |
138 TBool iIsFirstStartup; |
125 CImageHandler* iImageHandler; |
139 CImageHandler* iImageHandler; |
|
140 CDocumentHandler* iDocHandler; |
126 }; |
141 }; |
127 |
142 |
128 #endif // PODCASTMODEL_H |
143 #endif // PODCASTMODEL_H |