Added new experimental feature to show only new and downloaded shows; Updated SIS files
--- a/application/data/PodcastClient_english.rls Tue May 25 00:31:01 2010 +0100
+++ b/application/data/PodcastClient_english.rls Tue May 25 00:33:50 2010 +0100
@@ -132,7 +132,11 @@
rls_string STRING_r_view_download_show_cmd "Get"
rls_string STRING_r_view_delete_show_cmd "Delete"
rls_string STRING_r_view_show_info_cmd "Info"
-
+rls_string STRING_r_view_filter_shows_cmd "Show"
+rls_string STRING_r_view_filter_all_shows_cmd "All shows"
+rls_string STRING_r_view_filter_new_shows_cmd "Show new"
+rls_string STRING_r_view_filter_downloaded_shows_cmd "Show downloaded"
+rls_string STRING_r_view_filter_downloaded_new_shows_cmd "New and downloaded"
// Download queue operations
rls_string STRING_r_suspend_download_cmd "Suspend"
rls_string STRING_r_view_resume_short_dls_cmd "Resume"
@@ -149,3 +153,4 @@
rls_string STRING_r_error_general "Error: General error %d"
rls_string STRING_r_error_http "Error: HTTP error %d"
rls_string STRING_r_error_disk_full "Error: Disk full"
+
--- a/application/data/PodcastShowsView.ra Tue May 25 00:31:01 2010 +0100
+++ b/application/data/PodcastShowsView.ra Tue May 25 00:33:50 2010 +0100
@@ -42,6 +42,12 @@
},
MENU_ITEM
{
+ command = EPodcastFilterShows;
+ txt = STRING_r_view_filter_shows_cmd;
+ cascade = r_filtershows_menu;
+ },
+ MENU_ITEM
+ {
command = EPodcastAbout;
txt = STRING_r_view_about_cmd;
},
@@ -58,6 +64,32 @@
};
}
+RESOURCE MENU_PANE r_filtershows_menu
+ {
+ items = {
+ MENU_ITEM
+ {
+ command = EPodcastFilterShowsAll;
+ txt = STRING_r_view_filter_all_shows_cmd;
+ },
+/* MENU_ITEM
+ {
+ command = EPodcastFilterShowsNew;
+ txt = STRING_r_view_filter_new_shows_cmd;
+ },
+ MENU_ITEM
+ {
+ command = EPodcastFilterShowsDownloaded;
+ txt = STRING_r_view_filter_downloaded_shows_cmd;
+ },*/
+ MENU_ITEM
+ {
+ command = EPodcastFilterShowsNewAndDownloaded;
+ txt = STRING_r_view_filter_downloaded_new_shows_cmd;
+ }
+ };
+ }
+
RESOURCE AVKON_TOOLBAR r_showsview_toolbar
{
flags = KAknToolbarFixed;
--- a/application/inc/Podcast.hrh Tue May 25 00:31:01 2010 +0100
+++ b/application/inc/Podcast.hrh Tue May 25 00:33:50 2010 +0100
@@ -60,8 +60,13 @@
EPodcastHelp,
EPodcastSearch,
EPodcastAddSearchResult,
- EPodcastResetDb
-};
+ EPodcastResetDb,
+ EPodcastFilterShows,
+ EPodcastFilterShowsAll,
+ EPodcastFilterShowsNew,
+ EPodcastFilterShowsDownloaded,
+ EPodcastFilterShowsNewAndDownloaded
+ };
enum TPodcastControl
{
--- a/application/inc/buildno.h Tue May 25 00:31:01 2010 +0100
+++ b/application/inc/buildno.h Tue May 25 00:33:50 2010 +0100
@@ -1,2 +1,2 @@
// Build number generated by increment_buildno.py, do not edit manually
-#define BUILD_NO 23
\ No newline at end of file
+#define BUILD_NO 24
\ No newline at end of file
--- a/application/sis/buildno.txt Tue May 25 00:31:01 2010 +0100
+++ b/application/sis/buildno.txt Tue May 25 00:33:50 2010 +0100
@@ -1,1 +1,1 @@
-23
\ No newline at end of file
+24
\ No newline at end of file
--- a/application/sis/podcatcher_udeb.pkg Tue May 25 00:31:01 2010 +0100
+++ b/application/sis/podcatcher_udeb.pkg Tue May 25 00:33:50 2010 +0100
@@ -1,7 +1,7 @@
&EN
:"Symbian Foundation"
%{"Podcatcher"}
-#{"Podcatcher"},(0xA0009D00), 1, 00, 23, TYPE=SA
+#{"Podcatcher"},(0xA0009D00), 1, 00, 24, TYPE=SA
;Supports S60 3rd edition
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
Binary file application/sis/podcatcher_udeb.sis has changed
Binary file application/sis/podcatcher_udeb_signed.sis has changed
--- a/application/sis/podcatcher_urel.pkg Tue May 25 00:31:01 2010 +0100
+++ b/application/sis/podcatcher_urel.pkg Tue May 25 00:33:50 2010 +0100
@@ -1,7 +1,7 @@
&EN
:"Symbian Foundation"
%{"Podcatcher"}
-#{"Podcatcher"},(0xA0009D00), 1, 00, 23, TYPE=SA
+#{"Podcatcher"},(0xA0009D00), 1, 00, 24, TYPE=SA
;Supports S60 3rd edition
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
--- a/application/src/PodcastShowsView.cpp Tue May 25 00:31:01 2010 +0100
+++ b/application/src/PodcastShowsView.cpp Tue May 25 00:33:50 2010 +0100
@@ -573,9 +573,11 @@
{
case EPodcastMarkAsPlayed:
HandleSetShowPlayedL(ETrue);
+ UpdateListboxItemsL();
break;
case EPodcastMarkAsUnplayed:
HandleSetShowPlayedL(EFalse);
+ UpdateListboxItemsL();
break;
case EPodcastMarkAllPlayed:
iPodcastModel.MarkSelectionPlayedL();
@@ -583,6 +585,7 @@
break;
case EPodcastDeleteShow:
HandleDeleteShowL();
+ UpdateListboxItemsL();
break;
case EPodcastDownloadShow:
{
@@ -619,6 +622,22 @@
{
DisplayShowInfoDialogL();
}break;
+ case EPodcastFilterShowsAll:
+ iPodcastModel.ShowEngine().SetShowFilter(EAllShows);
+ UpdateListboxItemsL();
+ break;
+ case EPodcastFilterShowsDownloaded:
+ iPodcastModel.ShowEngine().SetShowFilter(EDownloadedShows);
+ UpdateListboxItemsL();
+ break;
+ case EPodcastFilterShowsNew:
+ iPodcastModel.ShowEngine().SetShowFilter(ENewShows);
+ UpdateListboxItemsL();
+ break;
+ case EPodcastFilterShowsNewAndDownloaded:
+ iPodcastModel.ShowEngine().SetShowFilter(ENewAndDownloadedShows);
+ UpdateListboxItemsL();
+ break;
default:
CPodcastListView::HandleCommandL(aCommand);
break;
--- a/engine/inc/ShowEngine.h Tue May 25 00:31:01 2010 +0100
+++ b/engine/inc/ShowEngine.h Tue May 25 00:33:50 2010 +0100
@@ -29,6 +29,14 @@
#include "MetaDataReader.h"
#include <sqlite3.h>
+typedef enum TShowFilter
+ {
+ EAllShows,
+ ENewShows,
+ EDownloadedShows,
+ ENewAndDownloadedShows
+ };
+
class CShowEngine : public CBase, public MHttpClientObserver, public MMetaDataReaderObserver
{
public:
@@ -72,7 +80,7 @@
IMPORT_C void CheckForDeletedShows(TUint aFeedUid);
IMPORT_C CMetaDataReader& MetaDataReader();
-
+ IMPORT_C void SetShowFilter(TShowFilter aFilter);
private:
// from HttpClientObserver, dont have to be public
void Connected(CHttpClient* aClient);
@@ -142,6 +150,7 @@
sqlite3& iDB;
TBuf<KDefaultSQLDataBufferLength> iSqlBuffer;
+ TShowFilter iShowFilter;
};
#endif /*SHOWENGINE_H_*/
--- a/engine/src/FeedEngine.cpp Tue May 25 00:31:01 2010 +0100
+++ b/engine/src/FeedEngine.cpp Tue May 25 00:33:50 2010 +0100
@@ -136,6 +136,7 @@
if (interval != 0)
{
+ DP1("Running feed timer with interval %d", interval);
iFeedTimer.SetPeriod(interval);
iFeedTimer.RunPeriodically();
}
--- a/engine/src/ShowEngine.cpp Tue May 25 00:31:01 2010 +0100
+++ b/engine/src/ShowEngine.cpp Tue May 25 00:33:50 2010 +0100
@@ -540,6 +540,23 @@
_LIT(KSqlStatement, "select url, title, description, filename, position, playtime, playstate, downloadstate, feeduid, uid, showsize, trackno, pubdate, showtype, lasterror from shows where feeduid=%u");
iSqlBuffer.Format(KSqlStatement, aFeedUid);
+ if (iShowFilter == ENewShows)
+ {
+ _LIT(KSqlStatementNewShows, " and playstate = 0"); // ENeverPlayed
+ iSqlBuffer.Append(KSqlStatementNewShows);
+ }
+ else if (iShowFilter == EDownloadedShows)
+ {
+ _LIT(KSqlStatementDownloadedShows, " and downloadstate = 4"); // EDownloaded
+ iSqlBuffer.Append(KSqlStatementDownloadedShows);
+ }
+ else if (iShowFilter == ENewAndDownloadedShows)
+ {
+ _LIT(KSqlStatementDownloadedAndNewShows, " and (downloadstate = 4 or playstate = 0)"); // EDownloaded or ENeverPlayed
+ iSqlBuffer.Append(KSqlStatementDownloadedAndNewShows);
+
+ }
+
#ifndef DONT_SORT_SQL
_LIT(KSqlOrderByDate, " order by pubdate desc");
iSqlBuffer.Append(KSqlOrderByDate);
@@ -1387,3 +1404,7 @@
}
}
+EXPORT_C void CShowEngine::SetShowFilter(TShowFilter aFilter)
+ {
+ iShowFilter = aFilter;
+ }