# HG changeset patch
# User tahirm@symbian.org
# Date 1248421562 -3600
# Node ID 0049171ecffb4422d7ddc80c138adce3328e4abc
initial release
diff -r 000000000000 -r 0049171ecffb .cproject
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.cproject Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,409 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r 0049171ecffb .project
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.project Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,19 @@
+
+
+ NPR
+
+
+
+
+
+ com.nokia.carbide.cdt.builder.carbideCPPBuilder
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ com.nokia.carbide.cdt.builder.carbideCPPBuilderNature
+
+
diff -r 000000000000 -r 0049171ecffb Releases/Series3thEdition/13_07_09/NPR.SIS
Binary file Releases/Series3thEdition/13_07_09/NPR.SIS has changed
diff -r 000000000000 -r 0049171ecffb Releases/Series3thEdition/13_07_09/NPR.SISX
Binary file Releases/Series3thEdition/13_07_09/NPR.SISX has changed
diff -r 000000000000 -r 0049171ecffb Releases/Series3thEdition/14_07_09/NPR.sis
Binary file Releases/Series3thEdition/14_07_09/NPR.sis has changed
diff -r 000000000000 -r 0049171ecffb Releases/Series3thEdition/14_07_09/npr.sisx
Binary file Releases/Series3thEdition/14_07_09/npr.sisx has changed
diff -r 000000000000 -r 0049171ecffb Releases/Series3thEdition/15_07_09/NPR__armv5.sis
Binary file Releases/Series3thEdition/15_07_09/NPR__armv5.sis has changed
diff -r 000000000000 -r 0049171ecffb Releases/Series3thEdition/15_07_09/NPR_armv5.sisx
Binary file Releases/Series3thEdition/15_07_09/NPR_armv5.sisx has changed
diff -r 000000000000 -r 0049171ecffb Releases/Series5thEdtion/15_07_09/npr.sis
Binary file Releases/Series5thEdtion/15_07_09/npr.sis has changed
diff -r 000000000000 -r 0049171ecffb Releases/Series5thEdtion/15_07_09/npr.sisx
Binary file Releases/Series5thEdtion/15_07_09/npr.sisx has changed
diff -r 000000000000 -r 0049171ecffb data/NPR.rls
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/NPR.rls Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,51 @@
+/*
+ ============================================================================
+ Name : NPR.rls
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : This is a localisation file for NPR A .rls file is the one and only place where the logical
+ strings to be localised are defined.
+ ============================================================================
+ */
+
+// LOCALISATION STRINGS
+
+// Caption string for app.
+#define qtn_caption_string "NPR"
+
+// First item in "Options" menu pane
+#define qtn_command1 "Message"
+
+// Second item in "Options" menu pane
+#define qnt_npr_channel "channel"
+
+#define qtn_help "Help"
+
+#define qtn_about "About"
+
+// Third item in "Options" menu pane
+#define qtn_exit "Exit"
+
+// When user requests ECommand1 event, text below is shown.
+#define qtn_command1_text "Hello World!"
+
+#define qtn_loc_resource_file_1 "\\resource\\apps\\NPR_0xEEB0E481"
+
+#define qtn_about_dialog_title "About"
+
+#define qtn_about_dialog_text "NPR Version 1.0.0\n\nAuthor: John Kern\n\nSupport: johnk@symbian.org\n\n(c) This component and the accompanying materials are made available under the terms of the License \"Eclipse Public License v1.0\" which accompanies this distribution, and is available at the URL \"http://www.eclipse.org/legal/epl-v10.html\"."
+
+// End of File
diff -r 000000000000 -r 0049171ecffb data/NPR.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/NPR.rss Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,636 @@
+/*
+ ============================================================================
+ Name : NPR.rss
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : This file contains all the resources for the NPR
+ ============================================================================
+ */
+
+/*
+============================================================================
+ Name : NPR.rss
+ Author : John Kern
+ Copyright : This component and the accompanying materials are made available under the terms of the License "Eclipse Public License v1.0" which accompanies this distribution, and is available at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ Description : This file contains all the resources for the NPR.
+============================================================================
+*/
+// RESOURCE IDENTIFIER
+NAME NPRX // 4 letter ID
+
+
+// INCLUDES
+#include
+#include
+#include
+#include
+#include "NPR.hrh"
+#include "NPR.rls"
+
+// RESOURCE DEFINITIONS
+// -----------------------------------------------------------------------------
+//
+// Define the resource file signature
+// This resource should be empty.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE
+ {
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Default Document Name
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_default_document_name
+ {
+ buf="NPRX";
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Define default menu and CBA key.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+ {
+ menubar = r_menubar;
+ cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_menubar
+// Main menubar
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_menubar
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_menu; }
+ };
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_menu
+// Menu for "Options"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_menu
+ {
+ items =
+ {
+ // added the new Options menu command here
+ MENU_ITEM
+ {
+ command = ERequestNprCmd;
+ txt = qnt_npr_channel;
+ },
+ MENU_ITEM
+ {
+ command = EAbout;
+ txt = qtn_about;
+ },
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// About dialog resource.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_about_query_dialog
+ {
+ flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+ buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
+ items=
+ {
+ DLG_LINE
+ {
+ type = EAknCtPopupHeadingPane;
+ id = EAknMessageQueryHeaderId;
+ itemflags = EEikDlgItemNonFocusing;
+ control = AVKON_HEADING
+ {
+ };
+ },
+ DLG_LINE
+ {
+ type = EAknCtMessageQuery;
+ id = EAknMessageQueryContentId;
+ control = AVKON_MESSAGE_QUERY
+ {
+ };
+ }
+ };
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// Resources for messages.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF32 r_caption_string { buf=qtn_caption_string; }
+RESOURCE TBUF32 r_about_dialog_title { buf=qtn_about_dialog_title; }
+RESOURCE TBUF r_about_dialog_text { buf=qtn_about_dialog_text; }
+RESOURCE TBUF r_command1_text { buf=qtn_command1_text; }
+
+
+// ----------------------------------------------------------------------------
+//
+// r_localisable_app_info
+//
+// ----------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+ {
+ short_caption = qtn_caption_string;
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = qtn_caption_string;
+
+ number_of_icons = 1;
+ icon_file = "\\resource\\apps\\NPR_0xEEB0E481.mif";
+ };
+ }
+
+
+/////////////////////////////////////////////////////////////////////
+//Main view
+RESOURCE AVKON_VIEW r_nprlist_box_nprlist_box_view
+ {
+ cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+ menubar = r_nprlist_box_options_menu;
+ toolbar = 0;
+ }
+RESOURCE MENU_BAR r_nprlist_box_options_menu
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_nprlist_box_menu; }
+ };
+ }
+
+RESOURCE MENU_PANE r_nprlist_box_menu
+ {
+ items =
+ {
+ // added the new Options menu command here
+ MENU_ITEM
+ {
+ command = ESelect;
+ txt = "Select";
+ }
+ };
+ }
+
+RESOURCE STATUS_PANE_APP_MODEL r_nprlist_box_status_pane
+ {
+ panes =
+ {
+ SPANE_PANE
+ {
+ id = EEikStatusPaneUidTitle;
+ type = EAknCtTitlePane;
+ resource = r_nprlist_box_title_resource;
+ }
+ };
+ }
+
+RESOURCE TITLE_PANE r_nprlist_box_title_resource
+ {
+ txt = "NPR";
+ }
+
+RESOURCE LISTBOX r_nprlist_box_list_box
+ {
+ flags = EAknListBoxSelectionList;
+ }
+
+RESOURCE ARRAY r_nprlist_box_listbox_item1
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "News";
+ }
+ };
+ }
+
+RESOURCE ARRAY r_nprlist_box_listbox_item2
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "Stations";
+ }
+ };
+ }
+
+RESOURCE ARRAY r_nprlist_box_listbox_item3
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "Programs";
+ }
+ };
+ }
+
+RESOURCE ARRAY r_nprlist_box_listbox_item4
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "Playlists";
+ }
+ };
+ }
+
+RESOURCE ARRAY r_nprlist_box_listbox_item5
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "Settings";
+ }
+ };
+ }
+
+/////////////////////////////////////////////////////////////////////
+//Story view
+RESOURCE AVKON_VIEW r_nprstory_list_box_nprstory_list_box_view
+ {
+ cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ menubar = r_nprstory_list_box_options_menu;
+ toolbar = 0;
+ }
+
+RESOURCE MENU_BAR r_nprstory_list_box_options_menu
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_nprstory_list_box_menu; }
+ };
+ }
+
+RESOURCE MENU_PANE r_nprstory_list_box_menu
+ {
+ items =
+ {
+ // added the new Options menu command here
+ MENU_ITEM
+ {
+ command = ESelect;
+ txt = "Select";
+ }
+ };
+ }
+
+RESOURCE STATUS_PANE_APP_MODEL r_nprstory_list_box_status_pane
+ {
+ panes =
+ {
+ SPANE_PANE
+ {
+ id = EEikStatusPaneUidTitle;
+ type = EAknCtTitlePane;
+ resource = r_nprstory_list_box_title_resource;
+ }
+ };
+ }
+
+RESOURCE TITLE_PANE r_nprstory_list_box_title_resource
+ {
+ txt = "News";
+ }
+
+RESOURCE LISTBOX r_nprstory_list_box_list_box
+ {
+ flags = EAknListBoxSelectionList;
+ }
+
+
+/////////////////////////////////////////////////////////////////////
+//Stations view
+RESOURCE AVKON_VIEW r_nprstation_list_box_nprstation_list_box_view
+ {
+ cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ menubar = r_nprstation_list_box_options_menu;
+ toolbar = 0;
+ }
+
+RESOURCE MENU_BAR r_nprstation_list_box_options_menu
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_nprlist_list_box_menu; }
+ };
+ }
+
+RESOURCE MENU_PANE r_nprlist_list_box_menu
+ {
+ items =
+ {
+ // added the new Options menu command here
+ MENU_ITEM
+ {
+ command = EListen;
+ txt = "Listen";
+ }
+ };
+ }
+
+RESOURCE STATUS_PANE_APP_MODEL r_nprstation_list_box_status_pane
+ {
+ panes =
+ {
+ SPANE_PANE
+ {
+ id = EEikStatusPaneUidTitle;
+ type = EAknCtTitlePane;
+ resource = r_nprstation_list_box_title_resource;
+ }
+ };
+ }
+RESOURCE TITLE_PANE r_nprstation_list_box_title_resource
+ {
+ txt = "STATIONS";
+ }
+
+RESOURCE LISTBOX r_nprstation_list_box_list_box
+ {
+ flags = EAknListBoxSelectionList;
+ }
+
+
+/////////////////////////////////////////////////////////////////////
+//Search stations view
+RESOURCE AVKON_VIEW r_nprsearch_station_list_box_nprsearch_station_list_box_view
+ {
+ cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ menubar = r_nprsearch_station_list_box_options_menu;
+ toolbar = 0;
+ }
+RESOURCE MENU_BAR r_nprsearch_station_list_box_options_menu
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_nprsearch_station_list_box_menu; }
+ };
+ }
+
+RESOURCE MENU_PANE r_nprsearch_station_list_box_menu
+ {
+ items =
+ {
+ // added the new Options menu command here
+ MENU_ITEM
+ {
+ command = ESelect;
+ txt = "Select";
+ }
+ };
+ }
+
+RESOURCE STATUS_PANE_APP_MODEL r_nprsearch_station_list_box_status_pane
+ {
+ panes =
+ {
+ SPANE_PANE
+ {
+ id = EEikStatusPaneUidTitle;
+ type = EAknCtTitlePane;
+ resource = r_nprsearch_station_list_box_title_resource;
+ }
+ };
+ }
+RESOURCE TITLE_PANE r_nprsearch_station_list_box_title_resource
+ {
+ txt = "Search station";
+ }
+RESOURCE LISTBOX r_nprsearch_station_list_box_list_box
+ {
+ flags = EAknListBoxSelectionList;
+ }
+
+RESOURCE ARRAY r_nprsearch_station_list_box_item1
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "Search by ZIP code";
+ }
+ };
+ }
+
+RESOURCE ARRAY r_nprsearch_station_list_box_item2
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "Current Location";
+ }
+ };
+ }
+
+RESOURCE ARRAY r_nprsearch_station_list_box_item3
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "Search City name";
+ }
+ };
+ }
+
+RESOURCE ARRAY r_nprsearch_station_list_box_item4
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "Show All";
+ }
+ };
+ }
+
+/////////////////////////////////////////////////////////////////////
+//Query dialog
+RESOURCE DIALOG R_ASK_NAME_DIALOG
+ {
+ flags = EGeneralQueryFlags;
+ buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
+ items=
+ {
+ DLG_LINE
+ {
+ type = EAknCtQuery;
+ id = EGeneralQuery;
+ control= AVKON_DATA_QUERY
+ {
+ layout = EDataLayout;
+ control = EDWIN
+ {
+ flags= EEikEdwinNoHorizScrolling | EEikEdwinResizable;
+ maxlength = 5;
+ width = 4;
+ lines = 1;
+ default_input_mode = EAknEditorNumericInputMode;
+ };
+ };
+ }
+ };
+ }
+
+////////////////////////////////////////////////////////////////////////
+//waiting dialog
+RESOURCE DIALOG r_singular_wait_note
+ {
+ flags = EAknWaitNoteFlags;
+ buttons = R_AVKON_SOFTKEYS_EMPTY;
+ items =
+ {
+ DLG_LINE
+ {
+ type = EAknCtNote;
+ id = 10;
+ control = AVKON_NOTE
+ {
+ layout = EWaitLayout;
+ singular_label = "";
+ plural_label = "";
+ animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+ };
+ }
+ };
+ }
+
+//////////////////////////////////////////////////////////////////////////
+//Browser view
+RESOURCE AVKON_VIEW r_akn_browser_view
+ {
+ cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ menubar = r_nprstation_list_box_options_menu;
+ toolbar = 0;
+ }
+
+////////////////////////////////////////////////////////////////
+//Story viewer
+RESOURCE AVKON_VIEW r_nprstory_viewer_container_nprstory_viewer_container_view
+ {
+ cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ menubar = r_nprstory_viewer_container_options_menu;
+ toolbar = 0;
+ }
+
+RESOURCE MENU_BAR r_nprstory_viewer_container_options_menu
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_nprstory_viewer_container_menu; }
+ };
+ }
+
+RESOURCE MENU_PANE r_nprstory_viewer_container_menu
+ {
+ items =
+ {
+ // added the new Options menu command here
+ MENU_ITEM
+ {
+ command = EListen;
+ txt = "Listen";
+ }
+ };
+ }
+
+RESOURCE STATUS_PANE_APP_MODEL r_nprstory_viewer_container_status_pane
+ {
+ panes =
+ {
+ SPANE_PANE
+ {
+ id = EEikStatusPaneUidTitle;
+ type = EAknCtTitlePane;
+ resource = r_nprstory_viewer_container_title_resource;
+ }
+ };
+ }
+
+RESOURCE TITLE_PANE r_nprstory_viewer_container_title_resource
+ {
+ txt = "News";
+ }
+
+RESOURCE RTXTED r_nprstory_viewer_container_rich_text1
+ {
+ numlines = 2;
+ default_case = EAknEditorTextCase;
+ allowed_case_modes = EAknEditorAllCaseModes;
+ numeric_keymap = EAknEditorStandardNumberModeKeymap;
+ default_input_mode = EAknEditorTextInputMode;
+ allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode | EAknEditorSecretAlphaInputMode | EAknEditorKatakanaInputMode | EAknEditorFullWidthTextInputMode | EAknEditorFullWidthNumericInputMode | EAknEditorFullWidthKatakanaInputMode | EAknEditorHiraganaKanjiInputMode | EAknEditorHalfWidthTextInputMode;
+ }
+
+RESOURCE TBUF r_nprstory_viewer_container_rich_text1_2
+ {
+ buf = "Title";
+ }
+
+RESOURCE RTXTED r_nprstory_viewer_container_rich_text2
+ {
+ numlines = 0;
+ default_case = EAknEditorTextCase;
+ allowed_case_modes = EAknEditorAllCaseModes;
+ numeric_keymap = EAknEditorStandardNumberModeKeymap;
+ default_input_mode = EAknEditorTextInputMode;
+ allowed_input_modes = EAknEditorTextInputMode | EAknEditorNumericInputMode | EAknEditorSecretAlphaInputMode | EAknEditorKatakanaInputMode | EAknEditorFullWidthTextInputMode | EAknEditorFullWidthNumericInputMode | EAknEditorFullWidthKatakanaInputMode | EAknEditorHiraganaKanjiInputMode | EAknEditorHalfWidthTextInputMode;
+ }
+
+RESOURCE TBUF r_nprstory_viewer_container_rich_text2_2
+ {
+ buf = "Body Text";
+ }
+
+// End of File
diff -r 000000000000 -r 0049171ecffb data/NPR_reg.rss
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/NPR_reg.rss Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,40 @@
+/*
+ ============================================================================
+ Name : NPR_reg.rss
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : This file contains the application registration resource
+ ============================================================================
+ */
+
+#include "NPR.hrh"
+#include "NPR.rls"
+#include
+#include
+
+UID2 KUidAppRegistrationResourceFile
+UID3 _UID3
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="NPR_0xEEB0E481";
+ localisable_resource_file = qtn_loc_resource_file_1;
+ localisable_resource_id = R_LOCALISABLE_APP_INFO;
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
diff -r 000000000000 -r 0049171ecffb data/npr_news_stream.rm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/npr_news_stream.rm Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,1 @@
+rtsp://real.npr.org:80/real.npr.na-central/news.db.rm
\ No newline at end of file
diff -r 000000000000 -r 0049171ecffb data/npr_station_stream.rm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/npr_station_stream.rm Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,1 @@
+rtsp://a944.l1651832740.c16518.n.lr.akamaistream.net/live/D/944/16518/v0001/reflector:32740
\ No newline at end of file
diff -r 000000000000 -r 0049171ecffb gfx/npr_symbian_generic.bmp
Binary file gfx/npr_symbian_generic.bmp has changed
diff -r 000000000000 -r 0049171ecffb gfx/npr_symbian_generic_mask.bmp
Binary file gfx/npr_symbian_generic_mask.bmp has changed
diff -r 000000000000 -r 0049171ecffb gfx/qgn_menu_NPR.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gfx/qgn_menu_NPR.svg Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,149 @@
+
+
+
diff -r 000000000000 -r 0049171ecffb group/Icons_scalable_dc.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/group/Icons_scalable_dc.mk Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,54 @@
+# ============================================================================
+# Name : Icons_scalable_dc.mk
+# Part of : NPR
+#
+# Description: This is file for creating .mif file (scalable icon)
+#
+# ============================================================================
+
+
+ifeq (WINS,$(findstring WINS, $(PLATFORM)))
+ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
+else
+ZDIR=$(EPOCROOT)epoc32\data\z
+endif
+
+TARGETDIR=$(ZDIR)\resource\apps
+ICONTARGETFILENAME=$(TARGETDIR)\NPR_0xEEB0E481.mif
+
+ICONDIR=..\gfx
+
+do_nothing :
+ @rem do_nothing
+
+MAKMAKE : do_nothing
+
+BLD : do_nothing
+
+CLEAN : do_nothing
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+# ----------------------------------------------------------------------------
+# NOTE: if you have JUSTINTIME enabled for your S60 3rd FP1 or newer SDK
+# and this command crashes, consider adding "/X" to the command line.
+# See
+# ----------------------------------------------------------------------------
+
+RESOURCE : $(ICONTARGETFILENAME)
+
+$(ICONTARGETFILENAME) : $(ICONDIR)\qgn_menu_NPR.svg
+ mifconv $(ICONTARGETFILENAME) \
+ /c32 $(ICONDIR)\qgn_menu_NPR.svg
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+ @echo $(ICONTARGETFILENAME)
+
+FINAL : do_nothing
+
diff -r 000000000000 -r 0049171ecffb group/NPR.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/group/NPR.mmp Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,113 @@
+/*
+ ============================================================================
+ Name : NPR.mmp
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : This is the project specification file for NPR
+ ============================================================================
+ */
+
+TARGET NPR_0xEEB0E481.exe
+TARGETTYPE exe
+UID 0x100039CE 0xEEB0E481
+
+EPOCHEAPSIZE 0x8000 0xFA000
+
+SOURCEPATH ..\src
+SOURCE NPR.cpp
+SOURCE NPRApplication.cpp
+SOURCE NPRAppView.cpp
+SOURCE NPRAppUi.cpp
+SOURCE NPRDocument.cpp
+SOURCE HttpClient.cpp
+SOURCE NPRStoryXmlParser.cpp
+SOURCE NPRStationXmlParser.cpp
+SOURCE NPRAppEngine.cpp
+SOURCE NPRStory.cpp
+SOURCE NPRStation.cpp
+SOURCE NPRListBox.cpp
+SOURCE NPRListBoxView.cpp
+SOURCE NPRStationListBox.cpp
+SOURCE NPRStationListBoxView.cpp
+SOURCE NPRSearchStationListBox.cpp
+SOURCE NPRSearchStationListBoxView.cpp
+SOURCE NPRStoryListBoxView.cpp
+SOURCE NPRStoryListBox.cpp
+SOURCE NPRBrowserAknView.cpp
+SOURCE NPRBrowserContainer.cpp
+SOURCE NPRHtmlCreator.cpp
+
+SOURCEPATH ..\data
+
+START RESOURCE NPR.rss
+HEADER
+TARGET NPR_0xEEB0E481
+TARGETPATH resource\apps
+END //RESOURCE
+
+START RESOURCE NPR_reg.rss
+TARGET NPR_0xEEB0E481_reg
+TARGETPATH \private\10003a3f\apps
+END //RESOURCE
+
+USERINCLUDE ..\inc
+USERINCLUDE ..\help ..\data
+SYSTEMINCLUDE \epoc32\include
+
+LIBRARY euser.lib
+LIBRARY apparc.lib
+LIBRARY cone.lib
+LIBRARY eikcore.lib
+LIBRARY avkon.lib
+LIBRARY commonengine.lib
+LIBRARY efsrv.lib
+LIBRARY estor.lib
+LIBRARY aknnotify.lib
+LIBRARY eikctl.lib
+LIBRARY eikcoctl.lib
+LIBRARY apgrfx.lib
+LIBRARY apmime.lib
+LIBRARY commonui.lib
+LIBRARY aknicon.lib
+LIBRARY egul.lib
+LIBRARY hlplch.lib
+LIBRARY inetprotutil.lib
+LIBRARY http.lib
+LIBRARY bafl.lib
+LIBRARY esock.lib
+LIBRARY xmlframework.lib
+LIBRARY etext.lib
+LIBRARY BrowserEngine.lib
+
+LANG SC
+
+VENDORID 0
+SECUREID 0xEEB0E481
+CAPABILITY NetworkServices ReadUserData WriteDeviceData SwEvent
+
+#ifdef ENABLE_ABIV2_MODE
+DEBUGGABLE_UDEBONLY
+#endif
+
+START BITMAP list_icons.mbm
+HEADER
+TARGETPATH \resource\apps
+SOURCEPATH ..\gfx
+SOURCE c24,1 npr_symbian_generic.bmp
+SOURCE c24,1 npr_symbian_generic_mask.bmp
+END
+
+// End of File
diff -r 000000000000 -r 0049171ecffb group/bld.inf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/group/bld.inf Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,41 @@
+/*
+ ===========================================================================================
+ Name : bld.inf
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : This file provides the information required for building the whole of a NPR.
+ ===========================================================================================
+ */
+
+PRJ_PLATFORMS
+WINSCW ARMV5 GCCE
+
+PRJ_EXPORTS
+../testdata/pic1.jpg c:/data/npr/pic1.jpg
+../testdata/pic2.jpg c:/data/npr/pic2.jpg
+../testdata/pic3.jpg c:/data/npr/pic3.jpg
+../testdata/pic4.jpg c:/data/npr/pic4.jpg
+../testdata/pic5.jpg c:/data/npr/pic5.jpg
+../testdata/pic6.jpg c:/data/npr/pic6.jpg
+
+PRJ_MMPFILES
+
+gnumakefile icons_scalable_dc.mk
+
+gnumakefile ..\help\build_help.mk
+
+NPR.mmp
+
diff -r 000000000000 -r 0049171ecffb help/Custom.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/help/Custom.xml Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r 0049171ecffb help/NPR.cshlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/help/NPR.cshlp Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,19 @@
+
+
+
+
+0xEEB0E481
+
+
+
+
+ temp\
+
+
+
+ NPR_0xEEB0E481.hlp
+ custom.xml
+
+
diff -r 000000000000 -r 0049171ecffb help/NPR.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/help/NPR.xml Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,13 @@
+
+
+
+
+
+NPRGeneral Information
+General Information
+
+General Information
+Insert your help here.
+
+
+
diff -r 000000000000 -r 0049171ecffb help/NPR_0xEEB0E481.hlp
Binary file help/NPR_0xEEB0E481.hlp has changed
diff -r 000000000000 -r 0049171ecffb help/NPR_0xEEB0E481.hlp.hrh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/help/NPR_0xEEB0E481.hlp.hrh Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,15 @@
+//
+// NPR_0xEEB0E481.hlp.hrh
+//
+
+//
+// File generated by cshlpcmp Version 011
+//
+
+#ifndef __NPR_0XEEB0E481_HLP_HRH__
+#define __NPR_0XEEB0E481_HLP_HRH__
+
+
+_LIT(KGeneral_Information,"General_Information");
+
+#endif
diff -r 000000000000 -r 0049171ecffb help/build_help.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/help/build_help.mk Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,46 @@
+# ============================================================================
+# Name : build_help.mk
+# Part of : NPR
+# ============================================================================
+# Name : build_help.mk
+# Part of : NPR
+#
+# Description: This make file will build the application help file (.hlp)
+#
+# ============================================================================
+
+do_nothing :
+ @rem do_nothing
+
+# build the help from the MAKMAKE step so the header file generated
+# will be found by cpp.exe when calculating the dependency information
+# in the mmp makefiles.
+
+MAKMAKE : NPR_0xEEB0E481.hlp
+NPR_0xEEB0E481.hlp : NPR.xml NPR.cshlp Custom.xml
+ cshlpcmp NPR.cshlp
+ifeq (WINSCW,$(findstring WINSCW, $(PLATFORM)))
+ md $(EPOCROOT)epoc32\$(PLATFORM)\c\resource\help
+ copy NPR_0xEEB0E481.hlp $(EPOCROOT)epoc32\$(PLATFORM)\c\resource\help
+endif
+
+BLD : do_nothing
+
+CLEAN :
+ del NPR_0xEEB0E481.hlp
+ del NPR_0xEEB0E481.hlp.hrh
+
+LIB : do_nothing
+
+CLEANLIB : do_nothing
+
+RESOURCE : do_nothing
+
+FREEZE : do_nothing
+
+SAVESPACE : do_nothing
+
+RELEASABLES :
+ @echo NPR_0xEEB0E481.hlp
+
+FINAL : do_nothing
diff -r 000000000000 -r 0049171ecffb help/temp/NPR_0xEEB0E481.cshlp.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/help/temp/NPR_0xEEB0E481.cshlp.xml Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+NPRGeneral Information
+General Information
+
+
+Insert your help here.
+
+
+
+
+General Information
+General Information
+
+
+
+
+
+
+
+
diff -r 000000000000 -r 0049171ecffb inc/HttpClient.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/HttpClient.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,87 @@
+/*
+ ============================================================================
+ Name : HttpClient.h
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : This file contains panic codes.
+ ============================================================================
+ */
+
+#ifndef __HTTP_CLIENT_H_
+#define __HTTP_CLIENT_H_
+
+#include
+#include
+#include
+#include
+#include
+
+#include "NPRStoryXmlParser.h"
+
+class MHTTPObserver
+ {
+ public:
+ virtual void ResponseStatusL(TInt aStatusCode, const TDesC& aStatusText) = 0;
+ virtual void ResponseReceivedL(const TDesC8& aResponseBuffer) = 0;
+ };
+
+/*
+ * This class implements the http request response sequence using RHTTPSession
+ * class. The IAP selection is not done silently and needs user input.
+ */
+
+class CHttpClient : public CBase,
+ public MHTTPTransactionCallback,
+ public MHTTPDataSupplier
+ {
+public:
+ static CHttpClient* NewL(MHTTPObserver& aObserver);
+ virtual ~CHttpClient();
+
+public:
+ void SendRequestL(const TDesC& aUri);
+
+ //From MHTTPTransactionCallback
+ void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent &aEvent);
+ TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent &aEvent);
+
+ //From MHTTPDataSupplier
+ TBool GetNextDataPart(TPtrC8& aDataPart);
+ void ReleaseData();
+ TInt OverallDataSize();
+ TInt Reset();
+
+private:
+ void AddHeaderL(RHTTPHeaders aHeaders, TInt aHeaderField, const TDesC8& aHeaderValue);
+ void AddHeaderL(RHTTPHeaders aHeaders, TInt aHeaderField, const TDesC8& aHeaderValue, TInt aExtensionField, const TDesC8& aExtensionValue);
+
+private:
+ CHttpClient(MHTTPObserver& aObserver);
+ void ConstructL();
+
+private:
+ RHTTPSession iHTTPSession;
+ MHTTPObserver& iObserver;
+ RSocketServ iSocketServ;
+ RConnection iConnection;
+ RHTTPTransaction iHttpTransaction;
+ RHTTPConnectionInfo iHttpConnInfo;
+ HBufC8* iResponseBuffer; // The buffers to hold the request and response bodies.
+ HBufC8* iUri;
+ TBool iTransactionActive;
+ };
+
+#endif /* __HTTP_CLIENT_H_ */
diff -r 000000000000 -r 0049171ecffb inc/NPR.hrh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPR.hrh Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,81 @@
+/*
+ ============================================================================
+ Name : NPR.hrh
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description:
+ ============================================================================
+ */
+
+#ifndef __NPR_HRH__
+#define __NPR_HRH__
+
+#define _UID3 0xEEB0E481
+
+// NPR enumerate AppUi commands code
+enum TNPRAppUiIds
+ {
+ EPlayCmd = 0x6001, // start value must not be 0
+ EPauseCmd,
+ ERequestNprCmd,
+ EListen,
+ ESelect,
+ EShare,
+ EHelp,
+ EAbout,
+ ELoadPage
+ };
+
+// NPR enumerate command codes
+enum TNPRCommands
+ {
+ ENewsCmd = 0x0,
+ EStationsCmd,
+ EPlayStationStream,
+ EPlayNewsStream,
+ EPlaylist,
+ ESettings
+ };
+
+// NPR enumerate topic codes
+enum TNPRTopics
+ {
+ ENews = 0x0,
+ EStations,
+ EPrograms
+ };
+
+// NPR enumerate search codes
+enum TNPRStationSearch
+ {
+ EZipCode = 0x0,
+ ECurrentLocation,
+ ECityName,
+ EShowAll
+ };
+
+// NPR enumerate aknview uid
+enum TNPRViewUids
+ {
+ ENPRListBoxViewId = 0x1,
+ ENPRStationListBoxViewId,
+ ENPRSearchStationListBoxViewId,
+ ENPRStoryListBoxViewId,
+ ENPRBrowserViewId,
+ ENPRStoryViewerContainerViewId
+ };
+
+#endif // __NPR_HRH__
diff -r 000000000000 -r 0049171ecffb inc/NPR.pan
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPR.pan Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,36 @@
+/*
+ ============================================================================
+ Name : NPR.pan
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ Symbian Foundation Ltd - initial contribution.
+
+ Contributors: John Kern
+ Description : This file contains panic codes.
+ ============================================================================
+ */
+
+#ifndef __NPR_PAN__
+#define __NPR_PAN__
+
+/** NPR application panic codes */
+enum TNPRPanics
+ {
+ ENPRUi = 1
+ // add further panics here
+ };
+
+inline void Panic(TNPRPanics aReason)
+ {
+ _LIT(applicationName, "NPR");
+ User::Panic(applicationName, aReason);
+ }
+
+#endif // __NPR_PAN__
diff -r 000000000000 -r 0049171ecffb inc/NPRAppEngine.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRAppEngine.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,75 @@
+/*
+ ============================================================================
+ Name : NPRAppEngine.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description:
+ ============================================================================
+ */
+
+#ifndef __NPR_APP_ENGINE_H__
+#define __NPR_APP_ENGINE_H__
+
+#include
+#include "HttpClient.h"
+#include "NPR.hrh"
+
+class CAknWaitDialog;
+class CDocumentHandler;
+class CNPRAppUi;
+class CNPRStation;
+class CNPRStories;
+
+
+class CNPRAppEngine : public CBase, public MHTTPObserver
+ {
+public:
+ static CNPRAppEngine* NewL(CNPRAppUi& aNPRAppUi);
+ virtual ~CNPRAppEngine();
+
+public:
+ void SendNPRCommandL(const TNPRCommands aCommand, const TDesC& aField);
+ const RPointerArray* Stations();
+ const RPointerArray* Stories();
+
+public:
+ //From MHTTPObserver
+ void ResponseStatusL(TInt aStatusCode, const TDesC& aStatusText);
+ void ResponseReceivedL(const TDesC8& aResponseBuffer) ;
+
+private:
+ void SearchStationsL(const TDesC& aField);
+ void SearchNewsL(const TDesC& aField);
+ void LaunchFileL(const TDesC& aFilename);
+ void RefreshDocumentFileL(const TUid& aUid, const TDesC& aFileName);
+ void ShowWaitingDialogL(const TDesC& aText);
+ void DismissWaitingDialogL();
+
+private:
+ CNPRAppEngine(CNPRAppUi& aNPRAppUi);
+ void ConstructL();
+
+private:
+ CNPRAppUi& iNPRAppUi;
+ CHttpClient* iHttp;
+ TNPRCommands iNPRCommand;
+ CDocumentHandler* iDocHandler;
+ RPointerArray iStationArray;
+ RPointerArray iStoryArray;
+ CAknWaitDialog* iWaitDialog;
+ };
+
+#endif // __NPR_APP_ENGINE_H__
+
diff -r 000000000000 -r 0049171ecffb inc/NPRAppUi.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRAppUi.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,116 @@
+/*
+ ============================================================================
+ Name : NPRAppUi.h
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+ - Symsource
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : Declares UI class for application.
+ ============================================================================
+ */
+
+/*
+ ============================================================================
+ Name : NPRAppUi.h
+ Author : John Kern
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ Symbian Foundation Ltd - initial contribution.
+
+ Contributors: John Kern
+ Description : Declares UI class for application.
+ ============================================================================
+ */
+
+#ifndef __NPR_APP_UI_h__
+#define __NPR_APP_UI_h__
+
+// INCLUDES
+#include
+
+// FORWARD DECLARATIONS
+class CNPRAppView;
+class CNPRAppEngine;
+
+// CLASS DECLARATION
+/**
+ * CNPRAppUi application UI class.
+ * Interacts with the user through the UI and request message processing
+ * from the handler class
+ */
+class CNPRAppUi : public CAknViewAppUi
+ {
+public:
+ // Constructors and destructor
+
+ /**
+ * ConstructL.
+ * 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * CNPRAppUi.
+ * C++ default constructor. This needs to be public due to
+ * the way the framework constructs the AppUi
+ */
+ CNPRAppUi();
+
+ /**
+ * ~CNPRAppUi.
+ * Virtual Destructor.
+ */
+ virtual ~CNPRAppUi();
+
+ CNPRAppEngine& Engine();
+ void ResponseStatusL(TInt aStatusCode, const TDesC& aStatusText);
+ void ResponseReceivedL(const TDesC8& aResponseBuffer) ;
+
+private:
+ // Functions from base classes
+
+ /**
+ * From CEikAppUi, HandleCommandL.
+ * Takes care of command handling.
+ * @param aCommand Command to be handled.
+ */
+ void HandleCommandL(TInt aCommand);
+
+ /**
+ * HandleStatusPaneSizeChange.
+ * Called by the framework when the application status pane
+ * size is changed.
+ */
+ void HandleStatusPaneSizeChange();
+
+ /**
+ * From CCoeAppUi, HelpContextL.
+ * Provides help context for the application.
+ * size is changed.
+ */
+ CArrayFix* HelpContextL() const;
+
+private:
+ // Data
+ CNPRAppEngine* iNPRAppEngine;
+ };
+
+#endif // __NPR_APP_UI_h__
+// End of File
diff -r 000000000000 -r 0049171ecffb inc/NPRAppView.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRAppView.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,102 @@
+/*
+ ============================================================================
+ Name : NPRAppView.h
+ Author : John Kern
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ Symbian Foundation Ltd - initial contribution.
+
+ Contributors: John Kern
+ Description : Declares view class for application.
+ ============================================================================
+ */
+
+#ifndef __NPRAPPVIEW_h__
+#define __NPRAPPVIEW_h__
+
+// INCLUDES
+#include
+
+// CLASS DECLARATION
+class CNPRAppView : public CCoeControl
+ {
+public:
+ // New methods
+
+ /**
+ * NewL.
+ * Two-phased constructor.
+ * Create a CNPRAppView object, which will draw itself to aRect.
+ * @param aRect The rectangle this view will be drawn to.
+ * @return a pointer to the created instance of CNPRAppView.
+ */
+ static CNPRAppView* NewL(const TRect& aRect);
+
+ /**
+ * NewLC.
+ * Two-phased constructor.
+ * Create a CNPRAppView object, which will draw itself
+ * to aRect.
+ * @param aRect Rectangle this view will be drawn to.
+ * @return A pointer to the created instance of CNPRAppView.
+ */
+ static CNPRAppView* NewLC(const TRect& aRect);
+
+ /**
+ * ~CNPRAppView
+ * Virtual Destructor.
+ */
+ virtual ~CNPRAppView();
+
+public:
+ // Functions from base classes
+
+ /**
+ * From CCoeControl, Draw
+ * Draw this CNPRAppView to the screen.
+ * @param aRect the rectangle of this view that needs updating
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CoeControl, SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ virtual void SizeChanged();
+
+ /**
+ * From CoeControl, HandlePointerEventL.
+ * Called by framework when a pointer touch event occurs.
+ * Note: although this method is compatible with earlier SDKs,
+ * it will not be called in SDKs without Touch support.
+ * @param aPointerEvent the information about this event
+ */
+ virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
+
+private:
+ // Constructors
+
+ /**
+ * ConstructL
+ * 2nd phase constructor.
+ * Perform the second phase construction of a
+ * CNPRAppView object.
+ * @param aRect The rectangle this view will be drawn to.
+ */
+ void ConstructL(const TRect& aRect);
+
+ /**
+ * CNPRAppView.
+ * C++ default constructor.
+ */
+ CNPRAppView();
+
+ };
+
+#endif // __NPRAPPVIEW_h__
+// End of File
diff -r 000000000000 -r 0049171ecffb inc/NPRApplication.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRApplication.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,69 @@
+/*
+ ============================================================================
+ Name : NPRApplication.h
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+
+ Description : Declares main application class.
+ ============================================================================
+ */
+
+
+#ifndef __NPR_APPLICATION_H__
+#define __NPR_APPLICATION_H__
+
+// INCLUDES
+#include
+#include "NPR.hrh"
+
+// UID for the application;
+// this should correspond to the uid defined in the mmp file
+const TUid KUidNPRApp =
+ {
+ _UID3
+ };
+
+// CLASS DECLARATION
+
+/**
+ * CNPRApplication application class.
+ * Provides factory to create concrete document object.
+ * An instance of CNPRApplication is the application part of the
+ * AVKON application framework for the NPR example application.
+ */
+class CNPRApplication : public CAknApplication
+ {
+public:
+ // Functions from base classes
+
+ /**
+ * From CApaApplication, AppDllUid.
+ * @return Application's UID (KUidNPRApp).
+ */
+ TUid AppDllUid() const;
+
+protected:
+ // Functions from base classes
+
+ /**
+ * From CApaApplication, CreateDocumentL.
+ * Creates CNPRDocument document object. The returned
+ * pointer in not owned by the CNPRApplication object.
+ * @return A pointer to the created document object.
+ */
+ CApaDocument* CreateDocumentL();
+ };
+
+#endif // __NPR_APPLICATION_H__
+// End of File
diff -r 000000000000 -r 0049171ecffb inc/NPRBrowserAknView.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRBrowserAknView.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,55 @@
+/*
+ ===============================================================================
+ Name : NPRBrowserAknView.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : AknView for containing Nokia browser control to show NPR's Story
+ ================================================================================
+ */
+
+#ifndef __NPR_BROWSER_AKN_VIEW_H__
+#define __NPR_BROWSER_AKN_VIEW_H__
+
+#include
+
+class CBrowserContainer;
+class CNPRAppEngine;
+
+class CBrowserAknView : public CAknView
+ {
+public:
+ static CBrowserAknView* NewL(CNPRAppEngine& aEngine);
+ virtual ~CBrowserAknView();
+
+public:
+ TUid Id() const;
+ void HandleCommandL(TInt aCommand);
+
+protected:
+ void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
+ void DoDeactivate();
+ void HandleStatusPaneSizeChange();
+
+private:
+ CBrowserAknView(CNPRAppEngine& aEngine);
+ void ConstructL();
+
+private:
+ CBrowserContainer* iContainer;
+ CNPRAppEngine& iEngine;
+ };
+
+#endif // __NPR_BROWSER_AKN_VIEW_H__
+
diff -r 000000000000 -r 0049171ecffb inc/NPRBrowserContainer.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRBrowserContainer.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,65 @@
+/*
+ ===============================================================================
+ Name : NPRBrowserConatiner.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : Container for Nokia browser control to show NPR's Story
+ ================================================================================
+ */
+
+#ifndef __NPR_BROWSER_H__
+#define __NPR_BROWSER_H__
+
+#include
+#include "BrCtlInterface.h"
+
+class CBrowserContainer : public CCoeControl,
+ public MCoeControlObserver,
+ public MBrCtlLoadEventObserver,
+ public MEikCommandObserver
+ {
+public:
+ void ConstructL(const TRect& aRect);
+ ~CBrowserContainer();
+
+public:
+ inline CBrCtlInterface* Browser() const {return iBrowser;}
+ void ProcessCommandL(TInt aCommandId);
+ void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
+ TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+
+ //From MBrCtlLoadEventObserver
+ void HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, TUint aSize, TUint16 aTransactionId);
+ void Listen();
+
+private:
+ void SizeChanged();
+ TInt CountComponentControls() const;
+ CCoeControl* ComponentControl(TInt aIndex) const;
+ void Draw(const TRect& aRect) const;
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+ void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
+ void HandleResourceChange(TInt aType);
+
+private:
+ CBrCtlInterface* iBrowser;
+ TUint iBrowserCaps;
+ TInt iCommandBase;
+ };
+
+#endif // __NPR_BROWSER_H__
+
+
+
diff -r 000000000000 -r 0049171ecffb inc/NPRDocument.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRDocument.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,106 @@
+/*
+ ============================================================================
+ Name : NPRDocument.h
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : Declares document class for application.
+ ============================================================================
+ */
+
+
+#ifndef __NPR_DOCUMENT_H__
+#define __NPR_DOCUMENT_H__
+
+// INCLUDES
+#include
+
+#include "NPRStory.h"
+
+// FORWARD DECLARATIONS
+class CNPRAppUi;
+class CEikApplication;
+
+// CLASS DECLARATION
+
+/**
+ * CNPRDocument application class.
+ * An instance of class CNPRDocument is the Document part of the
+ * AVKON application framework for the NPR example application.
+ */
+class CNPRDocument : public CAknDocument
+ {
+public:
+ // Constructors and destructor
+
+ /**
+ * NewL.
+ * Two-phased constructor.
+ * Construct a CNPRDocument for the AVKON application aApp
+ * using two phase construction, and return a pointer
+ * to the created object.
+ * @param aApp Application creating this document.
+ * @return A pointer to the created instance of CNPRDocument.
+ */
+ static CNPRDocument* NewL(CEikApplication& aApp);
+
+ /**
+ * NewLC.
+ * Two-phased constructor.
+ * Construct a CNPRDocument for the AVKON application aApp
+ * using two phase construction, and return a pointer
+ * to the created object.
+ * @param aApp Application creating this document.
+ * @return A pointer to the created instance of CNPRDocument.
+ */
+ static CNPRDocument* NewLC(CEikApplication& aApp);
+
+ /**
+ * ~CNPRDocument
+ * Virtual Destructor.
+ */
+ virtual ~CNPRDocument();
+
+public:
+ // Functions from base classes
+
+ /**
+ * CreateAppUiL
+ * From CEikDocument, CreateAppUiL.
+ * Create a CNPRAppUi object and return a pointer to it.
+ * The object returned is owned by the Uikon framework.
+ * @return Pointer to created instance of AppUi.
+ */
+ CEikAppUi* CreateAppUiL();
+
+private:
+ // Constructors
+
+ /**
+ * ConstructL
+ * 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * CNPRDocument.
+ * C++ default constructor.
+ * @param aApp Application creating this document.
+ */
+ CNPRDocument(CEikApplication& aApp);
+ };
+
+#endif // __NPR_DOCUMENT_H__
+// End of File
diff -r 000000000000 -r 0049171ecffb inc/NPRHtmlCreator.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRHtmlCreator.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,73 @@
+/*
+ ============================================================================
+ Name : NPRHtmlCreator.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - Symsource
+
+ Description : HTML composer
+ ============================================================================
+ */
+
+#ifndef _NPR_HTML_CREATOR_H
+#define _NPR_HTML_CREATOR_H
+
+// INCLUDES
+#include
+#include
+#include
+
+// CLASS DECLARATION
+class CNPRStory;
+
+/**
+ * CNPRHtmlCreator
+ *
+ */
+class CNPRHtmlCreator : public CBase
+ {
+public:
+ /**
+ * Two-phased constructor.
+ */
+ static CNPRHtmlCreator* NewL();
+
+ /**
+ * Two-phased constructor.
+ */
+ static CNPRHtmlCreator* NewLC();
+
+ /**
+ * Destructor.
+ */
+ ~CNPRHtmlCreator();
+
+public:
+ /**
+ * Create the HTML file in the c:/data/npr directory
+ */
+ void CreateHtmlFileL(CNPRStory* aStory);
+
+private:
+ /**
+ * EPOC default constructor for performing 2nd stage construction
+ */
+ void ConstructL();
+
+private:
+ //Member variables
+ RFs iFs;
+ static TInt iCurrentImage;
+ };
+
+#endif // _NPR_HTML_CREATOR_H
diff -r 000000000000 -r 0049171ecffb inc/NPRListBox.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRListBox.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,94 @@
+/*
+ ===============================================================================================
+ Name : NPRListBox.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : Container for Series60 single large style list box to show the NPR's main options
+ ===============================================================================================
+ */
+
+#ifndef NPR_LIST_BOX_H
+#define NPR_LIST_BOX_H
+
+#include
+#include
+#include
+
+class MEikCommandObserver;
+class CAknSingleLargeStyleListBox;
+class CEikTextListBox;
+
+
+class CNPRListBox : public CCoeControl
+ {
+public:
+ enum TControls
+ {
+ EListBox,
+ ELastControl
+ };
+ enum TListBoxImages
+ {
+ EListBoxNpr_0xeeb0e481Qgn_menu_nprIndex = 0,
+ EListBoxFirstUserImageIndex
+ };
+public:
+ static CNPRListBox* NewL(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver );
+ static CNPRListBox* NewLC(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver );
+ virtual ~CNPRListBox();
+
+public:
+ void SendNewsQueryL();
+ // from base class CCoeControl
+ TInt CountComponentControls() const;
+ CCoeControl* ComponentControl(TInt aIndex) const;
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+ void HandleResourceChange(TInt aType);
+
+protected:
+ // from base class CCoeControl
+ void SizeChanged();
+
+public:
+ TInt CurrentItemIndex();
+ static void AddListBoxItemL(CEikTextListBox* aListBox, const TDesC& aString);
+ static RArray< TInt >* GetSelectedListBoxItemsLC(CEikTextListBox* aListBox);
+ static void DeleteSelectedListBoxItemsL(CEikTextListBox* aListBox);
+ CAknSingleLargeStyleListBox* ListBox();
+ static void CreateListBoxItemL(TDes& aBuffer, TInt aIconIndex, const TDesC& aMainText);
+ void AddListBoxResourceArrayItemL(TInt aResourceId, TInt aIconIndex);
+ void SetupListBoxIconsL();
+ static CGulIcon* LoadAndScaleIconL(const TDesC& aFileName, TInt aBitmapId, TInt aMaskId, TSize* aSize, TScaleMode aScaleMode );
+ TBool HandleMarkableListCommandL( TInt aCommand );
+
+private:
+ void InitializeControlsL();
+ void LayoutControls();
+
+ // from base class CCoeControl
+ void Draw(const TRect& aRect) const;
+
+private:
+ // constructors
+ CNPRListBox();
+ void ConstructL(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+
+private:
+ CCoeControl* iFocusControl;
+ MEikCommandObserver* iCommandObserver;
+ CAknSingleLargeStyleListBox* iListBox;
+ };
+
+#endif // NPR_LIST_BOX_H
diff -r 000000000000 -r 0049171ecffb inc/NPRListBoxView.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRListBoxView.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,67 @@
+/*
+ ============================================================================
+ Name : NPRListBoxView.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : AknView for wrapping the container to show the NPR's main options
+ ============================================================================
+ */
+
+#ifndef __NPR_LIST_BOX_VIEW_H__
+#define __NPR_LIST_BOX_VIEW_H__
+
+#include
+
+class CNPRListBox;
+class CNPRAppEngine;
+
+/**
+ * Avkon view class for NPRListBoxView. It is register with the view server
+ * by the AppUi. It owns the container control.
+ * @class CNPRListBoxView NPRListBoxView.h
+ */
+
+class CNPRListBoxView : public CAknView
+ {
+
+public:
+ static CNPRListBoxView* NewL();
+ static CNPRListBoxView* NewLC();
+ virtual ~CNPRListBoxView();
+
+public:
+ // from base class CAknView
+ TUid Id() const;
+ void HandleCommandL( TInt aCommand );
+
+ CNPRListBox* CreateContainerL();
+protected:
+ // from base class CAknView
+ void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
+ void DoDeactivate();
+ void HandleStatusPaneSizeChange();
+
+private:
+ CNPRListBoxView();
+ void ConstructL();
+
+private:
+ void SetupStatusPaneL();
+ void CleanupStatusPane();
+private:
+ CNPRListBox* iNPRListBox;
+ };
+
+#endif // __NPR_LIST_BOX_VIEW_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRSearchStationListBox.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRSearchStationListBox.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,99 @@
+/*
+ ===================================================================================================
+ Name : NPRSearchStationListBox.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : Container for Series60 single style list box to show the NPR's station search options
+ ===================================================================================================
+ */
+
+#ifndef __NPR_SEARCH_STATION_LISTBOX_H__
+#define __NPR_SEARCH_STATION_LISTBOX_H__
+
+#include
+class MEikCommandObserver;
+class CAknSingleLargeStyleListBox;
+class CEikTextListBox;
+
+_LIT(KNPRZipQuery, "zip=%S");
+_LIT(KNPRCurrentLocationZip, "94102");//San Francisco ZIP codes
+
+
+/**
+ * Container class for NPRSearchStationListBox
+ *
+ * @class CNPRSearchStationListBox NPRSearchStationListBox.h
+ */
+class CNPRSearchStationListBox : public CCoeControl
+ {
+public:
+ enum TControls
+ {
+ EListBox,
+ ELastControl
+ };
+
+ enum TListBoxImages
+ {
+ EListBoxFirstUserImageIndex
+ };
+public:
+ static CNPRSearchStationListBox* NewL(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+ static CNPRSearchStationListBox* NewLC(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+ virtual ~CNPRSearchStationListBox();
+
+public:
+ TInt CurrentItemIndex();
+ void SendStationQueryL();
+
+ // from base class CCoeControl
+ TInt CountComponentControls() const;
+ CCoeControl* ComponentControl(TInt aIndex) const;
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+ void HandleResourceChange(TInt aType);
+
+ static void AddListBoxItemL(CEikTextListBox* aListBox, const TDesC& aString);
+ static RArray< TInt >* GetSelectedListBoxItemsLC(CEikTextListBox* aListBox);
+ static void DeleteSelectedListBoxItemsL(CEikTextListBox* aListBox);
+ CAknSingleStyleListBox* ListBox();
+ static void CreateListBoxItemL(TDes& aBuffer, TInt aIconIndex, const TDesC& aMainText);
+ void AddListBoxResourceArrayItemL(TInt aResourceId, TInt aIconIndex);
+ void SetupListBoxIconsL();
+ TBool HandleMarkableListCommandL(TInt aCommand);
+
+protected:
+ // from base class CCoeControl
+ void SizeChanged();
+
+private:
+ // from base class CCoeControl
+ void Draw(const TRect& aRect) const;
+
+private:
+ void InitializeControlsL();
+ void LayoutControls();
+
+private:
+ // constructors
+ CNPRSearchStationListBox();
+ void ConstructL(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+
+private:
+ CAknSingleStyleListBox* iListBox;
+ CCoeControl* iFocusControl;
+ MEikCommandObserver* iCommandObserver;
+ };
+
+#endif // __NPR_SEARCH_STATION_LISTBOX_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRSearchStationListBoxView.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRSearchStationListBoxView.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,66 @@
+/*
+ ===================================================================================================
+ Name : NPRSearchStationListBoxView.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : AknView for wrapping the container to show the NPR's station search options
+ ===================================================================================================
+ */
+
+#ifndef __NPR_SEARCH_STATION_LIST_BOX_VIEW_H__
+#define __NPR_SEARCH_STATION_LIST_BOX_VIEW_H__
+
+#include
+class CNPRSearchStationListBox;
+
+/**
+ * Avkon view class for NPRSearchStationListBoxView. It is register with the view server
+ * by the AppUi. It owns the container control.
+ * @class CNPRSearchStationListBoxView NPRSearchStationListBoxView.h
+ */
+
+class CNPRSearchStationListBoxView : public CAknView
+ {
+public:
+ static CNPRSearchStationListBoxView* NewL();
+ static CNPRSearchStationListBoxView* NewLC();
+ virtual ~CNPRSearchStationListBoxView();
+
+public:
+ // from base class CAknView
+ TUid Id() const;
+ void HandleCommandL( TInt aCommand );
+ CNPRSearchStationListBox* CreateContainerL();
+
+protected:
+ // from base class CAknView
+ void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
+ void DoDeactivate();
+ void HandleStatusPaneSizeChange();
+
+private:
+ void SetupStatusPaneL();
+ void CleanupStatusPane();
+
+private:
+ // constructors
+ CNPRSearchStationListBoxView();
+ void ConstructL();
+
+private:
+ CNPRSearchStationListBox* iNPRSearchStationListBox;
+ };
+
+#endif // __NPR_SEARCH_STATION_LIST_BOX_VIEW_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRStation.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRStation.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,80 @@
+/*
+ ============================================================================
+ Name : NPRStation.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : Class to wrap all the Station fields
+ ============================================================================
+ */
+
+#ifndef __NPR_STATION_H__
+#define __NPR_STATION_H__
+
+// INCLUDES
+#include
+#include
+
+
+// CLASS DECLARATION
+
+/**
+ * CNPRStation
+ *
+ */
+class CNPRStation : public CBase
+ {
+public:
+ /**
+ * Two-phased constructor.
+ */
+ static CNPRStation* NewL();
+
+ /**
+ * Two-phased constructor.
+ */
+ static CNPRStation* NewLC();
+
+ /**
+ * Destructor.
+ */
+ ~CNPRStation();
+
+public:
+ inline void SetStationId(TInt aId) {iStationId = aId;};
+ inline TInt StationId() {return iStationId;};
+
+ void SetNameL(const TDesC8& aName);
+ inline const TDesC& Name() {return iName;};
+
+ void SetFrequencyL(const TDesC8& aFrequency);
+ inline const TDesC& Frequency() {return iFrequency;};
+
+ void SetMarketCityL(const TDesC8& aMarketCity);
+ inline const TDesC& MarketCity() {return iMarketCity;};
+
+private:
+ /**
+ * EPOC default constructor for performing 2nd stage construction
+ */
+ void ConstructL();
+
+private:
+ TInt iStationId;
+ RBuf iName;
+ RBuf iFrequency;
+ RBuf iMarketCity;
+ };
+
+#endif // __NPR_STATION_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRStationListBox.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRStationListBox.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,92 @@
+/*
+ ============================================================================
+ Name : NPRStationListBox.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : Container for Series60 double style list box to show the NPR's station list
+ ============================================================================
+ */
+
+#ifndef __NPR_STATION_LIST_BOX_H__
+#define __NPR_STATION_LIST_BOX_H__
+
+#include
+
+class MEikCommandObserver;
+class CAknDoubleStyle2ListBox;
+class CEikTextListBox;
+class CNPRStation;
+
+/**
+ * Container class for NPRStationListBox
+ *
+ * @class CNPRStationListBox NPRStationListBox.h
+ */
+class CNPRStationListBox : public CCoeControl
+ {
+public:
+ enum TControls
+ {
+ EListBox,
+ ELastControl
+ };
+ enum TListBoxImages
+ {
+ EListBoxFirstUserImageIndex
+ };
+public:
+ static CNPRStationListBox* NewL(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+ static CNPRStationListBox* NewLC(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+ virtual ~CNPRStationListBox();
+
+public:
+ void Listen();
+ // from base class CCoeControl
+ TInt CountComponentControls() const;
+ CCoeControl* ComponentControl(TInt aIndex) const;
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+ void HandleResourceChange(TInt aType);
+ static void AddListBoxItemL(CEikTextListBox* aListBox, const TDesC& aString);
+ static RArray< TInt >* GetSelectedListBoxItemsLC( CEikTextListBox* aListBox);
+ static void DeleteSelectedListBoxItemsL(CEikTextListBox* aListBox);
+ CAknDoubleStyle2ListBox* ListBox();
+ static void CreateListBoxItemL(TDes& aBuffer, const TDesC& aMainText, const TDesC& aSecondaryText);
+ void AddListBoxResourceArrayItemL(TInt aResourceId);
+ void SetupListBoxIconsL();
+ TBool HandleMarkableListCommandL(TInt aCommand);
+
+protected:
+ // from base class CCoeControl
+ void SizeChanged();
+
+private:
+ void InitializeControlsL();
+ void LayoutControls();
+ // from base class CCoeControl
+ void Draw( const TRect& aRect ) const;
+
+private:
+ // constructors
+ CNPRStationListBox();
+ void ConstructL(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+
+private:
+ CAknDoubleStyle2ListBox* iListBox;
+ const RPointerArray* iStationArray;
+ CCoeControl* iFocusControl;
+ MEikCommandObserver* iCommandObserver;
+ };
+
+#endif // __NPR_STATION_LIST_BOX_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRStationListBoxView.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRStationListBoxView.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,66 @@
+/*
+ ==========================================================================================
+ Name : NPRStationListBoxView.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : AknView for wrapping the container to show the NPR's station list
+ ==========================================================================================
+ */
+
+#ifndef __NPR_STATION_LIST_BOX_VIEW_H__
+#define __NPR_STATION_LIST_BOX_VIEW_H__
+
+#include
+class CNPRStationListBox;
+
+/**
+ * Avkon view class for NPRStationListBoxView. It is register with the view server
+ * by the AppUi. It owns the container control.
+ * @class CNPRStationListBoxView NPRStationListBoxView.h
+ */
+
+class CNPRStationListBoxView : public CAknView
+ {
+public:
+ static CNPRStationListBoxView* NewL();
+ static CNPRStationListBoxView* NewLC();
+ virtual ~CNPRStationListBoxView();
+
+public:
+ // from base class CAknView
+ TUid Id() const;
+ void HandleCommandL( TInt aCommand );
+ CNPRStationListBox* CreateContainerL();
+
+protected:
+ // from base class CAknView
+ void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
+ void DoDeactivate();
+ void HandleStatusPaneSizeChange();
+
+private:
+ void SetupStatusPaneL();
+ void CleanupStatusPane();
+
+private:
+ // constructors
+ CNPRStationListBoxView();
+ void ConstructL();
+
+private:
+ CNPRStationListBox* iNPRStationListBox;
+ };
+
+#endif // __NPR_STATION_LIST_BOX_VIEW_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRStationXmlParser.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRStationXmlParser.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,86 @@
+/*
+ ============================================================================
+ Name : NPRStationXmlParser.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : Station xml parser
+ ============================================================================
+ */
+
+#ifndef __NPR_STATION_XML_PARSER_H__
+#define __NPR_STATION_XML_PARSER_H__
+
+// INCLUDES
+#include
+
+#include "NPRStation.h"
+
+using namespace Xml;
+// CLASS DECLARATION
+
+/**
+ * CNPRStationXmlParser
+ * The SAX parser will use this handler and associated enums to create story objects.
+ */
+
+// used by SAX parser. States of the XML response from NPR server.
+enum TNPRStationParserState
+ {
+ ENPRStationStateIdle = 0,
+ ENPRStationStateStation,
+ ENPRStationStateStationEnd,
+ ENPRStationStateName,
+ ENPRStationStateNameEnd,
+ ENPRStationStateFrequency,
+ ENPRStationStateFrequencyEnd,
+ ENPRStationStateMarketCity,
+ ENPRStationStateMarketCityEnd
+ };
+
+class CNPRStationXmlParser : public CBase, public MContentHandler
+ {
+public:
+ static CNPRStationXmlParser* NewL(RPointerArray* aStationArray);
+ static CNPRStationXmlParser* NewLC(RPointerArray* aStationArray);
+ ~CNPRStationXmlParser();
+
+public:
+ void OnStartDocumentL(const RDocumentParameters& aDocParam, TInt aErrorCode);
+ void OnEndDocumentL(TInt aErrorCode);
+ void OnStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes, TInt aErrorCode);
+ void OnEndElementL(const RTagInfo& aElement, TInt aErrorCode);
+ void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
+ void OnStartPrefixMappingL(const RString& aPrefix, const RString& aUri, TInt aErrorCode);
+ void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
+ void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
+ void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
+ void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, TInt aErrorCode);
+ void OnError(TInt aErrorCode);
+ TAny* GetExtendedInterface(const TInt32 aUid);
+
+private:
+ HBufC* Copy8To16LC(const TDesC8& aDes);
+
+private:
+ CNPRStationXmlParser(RPointerArray* aStationArray);
+ void ConstructL();
+
+private:
+ CNPRStation *iCurrentStation;
+ TNPRStationParserState iState;
+ RPointerArray* iStationArray; //it doesn't take ownership, do not delete
+ };
+
+#endif // __NPR_STATION_XML_PARSER_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRStory.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRStory.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,73 @@
+/*
+ ============================================================================
+ Name : NPRStory.h
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution.
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : NPR's xml story parser
+ ============================================================================
+ */
+
+#ifndef __NPR_STORY_H__
+#define __NPR_STORY_H__
+
+// INCLUDES
+#include
+
+/**
+ * CNPRStory
+ *
+ */
+class CNPRStory : public CBase
+ {
+public:
+ static CNPRStory* NewL();
+ static CNPRStory* NewLC();
+ ~CNPRStory();
+
+public:
+ void SetStoryId(TInt aStoryId) {iStoryId = aStoryId;}
+ inline TInt StoryId() {return iStoryId;}
+
+ void SetTitleL(const TDesC8& aTitle);
+ inline const TDesC& Title() {return iTitle;};
+
+ void SetTeaserL(const TDesC8& aTeaser);
+ inline const TDesC& Teaser() {return iTeaser;};
+
+ void SetTextL(const TDesC8& aText);
+ inline const TDesC& Text() {return iText;};
+
+ void SetMp3UrlL(const TDesC8& aMp3Url);
+ inline const TDesC& Mp3Url() {return iMp3Url;};
+
+ void SetThumbnailUrlL(const TDesC8& aThumbUrl);
+ inline const TDesC& ThumbnailUrl() {return iThumbnailUrl;};
+
+private:
+ //Constructors
+ CNPRStory();
+ void ConstructL();
+
+private:
+ TInt iStoryId;
+ RBuf iTitle;
+ RBuf iTeaser;
+ RBuf iText;
+ RBuf iMp3Url;
+ RBuf iThumbnailUrl;
+ };
+
+#endif // __NPR_STORY_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRStoryListBox.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRStoryListBox.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,100 @@
+/*
+ ============================================================================
+ Name : NPRStoryListBox.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : Container for Series60 double style list box to show the NPR's story list
+ ============================================================================
+ */
+
+#ifndef __NPR_STORY_LIST_BOX_H__
+#define __NPR_STORY_LIST_BOX_H__
+
+#include
+#include
+
+
+class MEikCommandObserver;
+class CAknDoubleLargeStyleListBox;
+class CEikTextListBox;
+class CNPRStory;
+class CNPRHtmlCreator;
+
+/**
+ * Container class for NPRStoryListBox
+ *
+ * @class CNPRStoryListBox NPRStoryListBox.h
+ */
+class CNPRStoryListBox : public CCoeControl
+ {
+public:
+ enum TControls
+ {
+ EListBox,
+ ELastControl
+ };
+ enum TListBoxImages
+ {
+ EListBoxFirstUserImageIndex
+ };
+
+public:
+ static CNPRStoryListBox* NewL(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+ static CNPRStoryListBox* NewLC(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+ virtual ~CNPRStoryListBox();
+
+public:
+ void ShowSelectedStoryL();
+ // from base class CCoeControl
+ TInt CountComponentControls() const;
+ CCoeControl* ComponentControl(TInt aIndex) const;
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+ void HandleResourceChange(TInt aType);
+ static void AddListBoxItemL(CEikTextListBox* aListBox, const TDesC& aString);
+ static RArray< TInt >* GetSelectedListBoxItemsLC(CEikTextListBox* aListBox);
+ static void DeleteSelectedListBoxItemsL(CEikTextListBox* aListBox);
+ CAknDoubleLargeStyleListBox* ListBox();
+ static void CreateListBoxItemL(TDes& aBuffer, TInt aIconIndex, const TDesC& aMainText, const TDesC& aSecondaryText);
+ void AddListBoxResourceArrayItemL(TInt aResourceId, TInt aIconIndex);
+ void SetupListBoxIconsL();
+ TBool HandleMarkableListCommandL(TInt aCommand);
+ static CGulIcon* LoadAndScaleIconL(const TDesC& aFileName, TInt aBitmapId, TInt aMaskId, TSize* aSize, TScaleMode aScaleMode);
+
+protected:
+ // from base class CCoeControl
+ void SizeChanged();
+
+private:
+ TInt CurrentItemIndex();
+ void InitializeControlsL();
+ void LayoutControls();
+
+ // from base class CCoeControl
+ void Draw( const TRect& aRect ) const;
+
+private:
+ // constructors
+ CNPRStoryListBox();
+ void ConstructL(const TRect& aRect, const CCoeControl* aParent, MEikCommandObserver* aCommandObserver);
+
+private:
+ CCoeControl* iFocusControl;
+ MEikCommandObserver* iCommandObserver;
+ CAknDoubleLargeStyleListBox* iListBox;
+ const RPointerArray* iStoryArray;
+ CNPRHtmlCreator* iHtmlCreator;
+ };
+
+#endif // __NPR_STORY_LIST_BOX_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRStoryListBoxView.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRStoryListBoxView.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,66 @@
+/*
+ ==========================================================================================
+ Name : NPRStoryListBoxView.h
+ Author : Symsource
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symsource
+
+ Contributors:
+ - Symsource
+
+ Description : AknView for wrapping the container to show the NPR's story list
+ ==========================================================================================
+ */
+
+#ifndef __NPR_STORY_LIST_BOX_VIEW_H__
+#define __NPR_STORY_LIST_BOX_VIEW_H__
+
+#include
+
+class CNPRStoryListBox;
+
+/**
+ * Avkon view class for NPRStoryListBoxView. It is register with the view server
+ * by the AppUi. It owns the container control.
+ * @class CNPRStoryListBoxView NPRStoryListBoxView.h
+ */
+class CNPRStoryListBoxView : public CAknView
+ {
+public:
+ static CNPRStoryListBoxView* NewL();
+ static CNPRStoryListBoxView* NewLC();
+ virtual ~CNPRStoryListBoxView();
+
+public:
+ // from base class CAknView
+ TUid Id() const;
+ void HandleCommandL(TInt aCommand);
+ CNPRStoryListBox* CreateContainerL();
+
+protected:
+ // from base class CAknView
+ void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
+ void DoDeactivate();
+ void HandleStatusPaneSizeChange();
+
+private:
+ void SetupStatusPaneL();
+ void CleanupStatusPane();
+
+private:
+ // constructors
+ CNPRStoryListBoxView();
+ void ConstructL();
+
+private:
+ CNPRStoryListBox* iNPRStoryListBox;
+ };
+
+#endif // __NPR_STORY_LIST_BOX_VIEW_H__
diff -r 000000000000 -r 0049171ecffb inc/NPRStoryXmlParser.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inc/NPRStoryXmlParser.h Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,95 @@
+/*
+ ============================================================================
+ Name : NPRStoryXmlParser.h
+ Author : John Kern
+
+ Copyright (c) 2009 Symbian Foundation Ltd
+ This component and the accompanying materials are made available
+ under the terms of the License "Eclipse Public License v1.0"
+ which accompanies this distribution, and is available
+ at the URL "http://www.eclipse.org/legal/epl-v10.html".
+
+ Initial Contributors:
+ - Symbian Foundation Ltd - initial contribution
+ - Symsource
+
+ Contributors:
+ - John Kern
+ - Symsource
+
+ Description : Story xml parser
+ ============================================================================
+ */
+
+#ifndef __NPR_STORY_XML_PARSER_H__
+#define __NPR_STORY_XML_PARSER_H__
+
+// INCLUDES
+#include
+#include
+
+#include "NPRStory.h"
+
+using namespace Xml;
+
+/**
+ * CNPRStoryXmlParser
+ * The SAX parser will use this handler and associated enums to create story objects.
+ */
+
+// used by SAX parser. States of the XML response from NPR server.
+enum TNPRNewsState
+ {
+ ENPRNewsStateIdle = 0,
+ ENPRNewsStateStory,
+ ENPRNewsStateTitle,
+ ENPRNewsStateTeaser,
+ ENPRNewsStateThumbnail,
+ ENPRNewsStateMedium,
+ ENPRNewsStateText,
+ ENPRNewsStateParagraph,
+ ENPRNewsStateDate,
+ ENPRNewsStateAudio,
+ ENPRNewsStateAudioMp3,
+ ENPRNewsStateAudioReal,
+ ENPRNewsStateAudioWM,
+ };
+
+class CNPRStoryXmlParser : public CBase, public MContentHandler
+ {
+public:
+ static CNPRStoryXmlParser* NewL(RPointerArray* aStoryArray);
+ static CNPRStoryXmlParser* NewLC(RPointerArray* aStoryArray);
+ ~CNPRStoryXmlParser();
+
+public:
+ void OnStartDocumentL(const RDocumentParameters& aDocParam, TInt aErrorCode);
+ void OnEndDocumentL(TInt aErrorCode);
+ void OnStartElementL(const RTagInfo& aElement, const RAttributeArray& aAttributes, TInt aErrorCode);
+ void OnEndElementL(const RTagInfo& aElement, TInt aErrorCode);
+ void OnContentL(const TDesC8& aBytes, TInt aErrorCode);
+ void OnStartPrefixMappingL(const RString& aPrefix, const RString& aUri, TInt aErrorCode);
+ void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
+ void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode);
+ void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
+ void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, TInt aErrorCode);
+ void OnError(TInt aErrorCode);
+ TAny* GetExtendedInterface(const TInt32 aUid) ;
+
+private:
+ // Constructors and destructor
+ HBufC* Copy8To16LC(const TDesC8& aDes);
+
+private:
+ CNPRStoryXmlParser(RPointerArray* aStoryArray);
+ void ConstructL();
+
+private:
+ CNPRStory* iCurrentStory;
+ TNPRNewsState iState;
+ RPointerArray* iStoryArray; //it doesn't take ownership, do not delete
+ HBufC8* iTagName;
+ TBool iStory;
+ };
+
+#endif // __NPR_STORY_XML_PARSER_H__
diff -r 000000000000 -r 0049171ecffb sis/NPR_S60_3_X_v_1_0_0.pkg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sis/NPR_S60_3_X_v_1_0_0.pkg Fri Jul 24 08:46:02 2009 +0100
@@ -0,0 +1,47 @@
+; Installation file for NPR application
+;
+; This is an auto-generated PKG file by Carbide.
+; This file uses variables specific to Carbide builds that will not work
+; on command-line builds. If you want to use this generated PKG file from the
+; command-line tools you will need to modify the variables with the appropriate
+; values: $(EPOCROOT), $(PLATFORM), $(TARGET)
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"NPR"},(0xEEB0E481),1,0,0
+
+;Localised Vendor name
+%{"Symbian Foundation"}
+
+;Unique Vendor name
+:"Symbian Foundation"
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Files to install
+;You should change the source paths to match that of your environment
+;