equal
deleted
inserted
replaced
27 #include <e32cmn.h> |
27 #include <e32cmn.h> |
28 #include "Constants.h" |
28 #include "Constants.h" |
29 #include "FeedEngineObserver.h" |
29 #include "FeedEngineObserver.h" |
30 #include "FeedTimer.h" |
30 #include "FeedTimer.h" |
31 #include <sqlite3.h> |
31 #include <sqlite3.h> |
|
32 #include <centralrepository.h> |
32 |
33 |
33 class CPodcastModel; |
34 class CPodcastModel; |
34 class COpmlParser; |
35 class COpmlParser; |
35 |
36 |
36 _LIT(KOpmlFeed, " <outline title=\"%S\" description=\"%S\" xmlUrl=\"%S\" htmlUrl=\"%S\"/>"); |
37 _LIT(KOpmlFeed, " <outline title=\"%S\" description=\"%S\" xmlUrl=\"%S\" htmlUrl=\"%S\"/>"); |
51 EIdle, |
52 EIdle, |
52 EUpdatingFeed, |
53 EUpdatingFeed, |
53 EUpdatingImage, |
54 EUpdatingImage, |
54 ESearching |
55 ESearching |
55 }; |
56 }; |
|
57 |
56 |
58 |
57 class CFeedEngine : public CBase, public MHttpClientObserver, public MFeedParserObserver |
59 class CFeedEngine : public CBase, public MHttpClientObserver, public MFeedParserObserver |
58 { |
60 { |
59 public: |
61 public: |
60 static CFeedEngine* NewL(CPodcastModel& aPodcastModel); |
62 static CFeedEngine* NewL(CPodcastModel& aPodcastModel); |
93 IMPORT_C void AddSearchResultL(CFeedInfo *item); |
95 IMPORT_C void AddSearchResultL(CFeedInfo *item); |
94 IMPORT_C const RFeedInfoArray& GetSearchResults(); |
96 IMPORT_C const RFeedInfoArray& GetSearchResults(); |
95 |
97 |
96 IMPORT_C void OpmlParsingCompleteL(TInt aError, TUint aNumFeedsAdded); |
98 IMPORT_C void OpmlParsingCompleteL(TInt aError, TUint aNumFeedsAdded); |
97 void NotifyFeedUpdateComplete(TInt aFeedUid, TInt aError); |
99 void NotifyFeedUpdateComplete(TInt aFeedUid, TInt aError); |
|
100 |
98 protected: |
101 protected: |
99 |
102 |
100 static TInt CompareFeedsByTitle(const CFeedInfo &a, const CFeedInfo &b); |
103 static TInt CompareFeedsByTitle(const CFeedInfo &a, const CFeedInfo &b); |
101 |
104 |
102 private: |
105 private: |
153 |
156 |
154 // new feeds only add one show to download list when auto downloading |
157 // new feeds only add one show to download list when auto downloading |
155 TBool newFeed; |
158 TBool newFeed; |
156 TUint showsAdded; |
159 TUint showsAdded; |
157 |
160 |
|
161 // offline mode detection |
|
162 CRepository* iRepository; |
|
163 |
158 sqlite3& iDB; |
164 sqlite3& iDB; |
159 |
165 |
160 TBuf<KDefaultSQLDataBufferLength> iSqlBuffer; |
166 TBuf<KDefaultSQLDataBufferLength> iSqlBuffer; |
161 |
167 |
162 COpmlParser* iOpmlParser; |
168 COpmlParser* iOpmlParser; |