diff --git a/aif/Smscaif.rss b/aif/Smscaif.rss new file mode 100644 index 0000000..5cc8cec --- /dev/null +++ b/aif/Smscaif.rss @@ -0,0 +1,23 @@ +/* +* ============================================================================ +* Name : Smscaif.rss +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* RSS for creating the aif file for Smsc. +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +#include + +RESOURCE AIF_DATA + { + app_uid=0x0C253ABB; // please request a UID from Symbian + num_icons=2; + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + } + +// End of File diff --git a/aif/context_pane_icon.bmp b/aif/context_pane_icon.bmp new file mode 100644 index 0000000..626f22d Binary files /dev/null and b/aif/context_pane_icon.bmp differ diff --git a/aif/context_pane_icon_mask.bmp b/aif/context_pane_icon_mask.bmp new file mode 100644 index 0000000..e530252 Binary files /dev/null and b/aif/context_pane_icon_mask.bmp differ diff --git a/aif/list_icon.bmp b/aif/list_icon.bmp new file mode 100644 index 0000000..84b12ba Binary files /dev/null and b/aif/list_icon.bmp differ diff --git a/aif/list_icon_mask.bmp b/aif/list_icon_mask.bmp new file mode 100644 index 0000000..117fe43 Binary files /dev/null and b/aif/list_icon_mask.bmp differ diff --git a/data/Smsc.rss b/data/Smsc.rss new file mode 100644 index 0000000..86d08c9 --- /dev/null +++ b/data/Smsc.rss @@ -0,0 +1,284 @@ +/* +* ============================================================================ +* Name : Smsc.rss +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* This file contains all the resources for the Smsc. +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// RESOURCE IDENTIFIER +NAME AWIZ // 4 letter ID + +CHARACTER_SET UTF8 + +// INCLUDES + +#include +#include "smsc.hrh" +#include "smsc.loc" +#include +#include +#include + + +// CONSTANTS +//#define ?constant ?value + + +// MACROS +//#define ?macro + + +// RESOURCE DEFINITIONS + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf="Smsc"; } + +RESOURCE EIK_APP_INFO + { + status_pane = r_smsc_status_pane; + } + + +RESOURCE TBUF r_no_messages_selected + { + buf=qtn_no_messages_selected; + } + +RESOURCE TBUF r_details_title + { + buf=qtn_details_title; + } +RESOURCE TBUF r_details_from + { + buf=qtn_details_from; + } +RESOURCE TBUF r_details_telno + { + buf=qtn_details_telno; + } +RESOURCE TBUF r_details_smsc + { + buf=qtn_details_smsc; + } +RESOURCE TBUF r_details_subject + { + buf=qtn_details_subject; + } +RESOURCE TBUF r_details_date + { + buf=qtn_details_date; + } +RESOURCE TBUF r_details_time + { + buf=qtn_details_time; + } +RESOURCE TBUF r_no_messages + { + buf=qtn_no_messages; + } + + +RESOURCE TBUF r_smsc_help + { + buf=qtn_help_about; + } + +//---------------------------------------------------- +// +// r_smsc_hotkeys +// ?description +// +//---------------------------------------------------- +// +RESOURCE HOTKEYS r_smsc_hotkeys + { + control= + { + HOTKEY { command=EAknCmdExit; key='e'; } + }; + } + +//---------------------------------------------------- +// +// r_smsc_view1 +// ?description +// +//---------------------------------------------------- +// +RESOURCE AVKON_VIEW r_smsc_view1 + { + hotkeys=r_smsc_hotkeys; + menubar=r_smsc_menubar_view1; + cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT; + } + +//---------------------------------------------------- +// +// r_smsc_menubar_view1 +// ?description +// +//---------------------------------------------------- +// +RESOURCE MENU_BAR r_smsc_menubar_view1 + { + titles= + { + MENU_TITLE { menu_pane=r_smsc_app_menu; txt="App"; }, + MENU_TITLE { menu_pane=r_smsc_view1_menu; txt="View"; } + }; + } + +//---------------------------------------------------- +// +// r_smsc_view1_menu +// ?description +// +//---------------------------------------------------- +// +RESOURCE MENU_PANE r_smsc_view1_menu + { + items= + { + /*MENU_ITEM { command=RefreshGrid; txt = "Refresh"; },*/ + /*MENU_ITEM { command=ClearGrid; txt = "Clear"; },*/ + MENU_ITEM { command=ShowDetails; txt = qtn_show_details; }, + MENU_ITEM { command=DisplayHelp; txt = qtn_display_help; } + }; + } + +//---------------------------------------------------- +// +// r_smsc_view2 +// ?description +// +//---------------------------------------------------- +// +RESOURCE AVKON_VIEW r_smsc_view2 + { + hotkeys=r_smsc_hotkeys; + menubar=r_smsc_menubar_view2; + cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT; + } + +//---------------------------------------------------- +// +// r_smsc_menubar_view2 +// ?description +// +//---------------------------------------------------- +// +RESOURCE MENU_BAR r_smsc_menubar_view2 + { + titles= + { + MENU_TITLE { menu_pane=r_smsc_app_menu; txt="App"; }, + MENU_TITLE { menu_pane=r_smsc_view2_menu; txt="View"; } + }; + } + +//---------------------------------------------------- +// +// r_smsc_view2_menu +// ?description +// +//---------------------------------------------------- +// +RESOURCE MENU_PANE r_smsc_view2_menu + { + items= + { + MENU_ITEM { command=ReturnToMain; txt = qtn_return_to_main; } + }; + } + +//---------------------------------------------------- +// +// r_smsc_app_menu +// ?description +// +//---------------------------------------------------- +// +RESOURCE MENU_PANE r_smsc_app_menu + { + items= + { + MENU_ITEM { command=EAknSoftkeyExit; txt=qtn_exit; } + }; + } + +RESOURCE STATUS_PANE_APP_MODEL r_smsc_status_pane + { + panes= + { + SPANE_PANE + { + id = EEikStatusPaneUidNavi; + type = EAknCtNaviPane; + resource = r_smsc_navi_decorator; + } + }; + } + +//---------------------------------------------------- +// +// r_smsc_navi_decorator +// ?description +// +//---------------------------------------------------- +// +RESOURCE NAVI_DECORATOR r_smsc_navi_decorator + { + type = ENaviDecoratorControlTabGroup; + control = TAB_GROUP + { + tab_width = EAknTabWidthWithTwoTabs; // two tabs + active = 0; + tabs = { + TAB + { + id = ESmscView1Tab; // from application hrh + txt = qtn_view1_tab; + }, + TAB + { + id = ESmscView2Tab; + txt = qtn_view2_tab; + } + }; + }; + } + +RESOURCE DIALOG r_message_query + { + flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow; + buttons = R_AVKON_SOFTKEYS_OK_EMPTY; + items= + { + DLG_LINE + { + type = EAknCtPopupHeadingPane; + id = EAknMessageQueryHeaderId; + control = AVKON_HEADING + { + }; + }, + DLG_LINE + { + type = EAknCtMessageQuery; + id = EAknMessageQueryContentId; + control = AVKON_MESSAGE_QUERY + { + }; + } + }; + } + + + +// End of File diff --git a/data/Smsc_caption.rss b/data/Smsc_caption.rss new file mode 100644 index 0000000..e3c1153 --- /dev/null +++ b/data/Smsc_caption.rss @@ -0,0 +1,22 @@ +/* +* ============================================================================ +* Name : Smsc_caption.rss +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* Caption file for Smsc. +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +CHARACTER_SET UTF8 + +#include "smsc.loc" +#include + +RESOURCE CAPTION_DATA +{ + caption=qtn_app_caption_string; + shortcaption=qtn_app_short_caption_string; +} diff --git a/doc/SMSC Viewer documentation (greek).pdf b/doc/SMSC Viewer documentation (greek).pdf new file mode 100644 index 0000000..2a5f610 Binary files /dev/null and b/doc/SMSC Viewer documentation (greek).pdf differ diff --git a/group/s60v1/Smsc.mmp b/group/s60v1/Smsc.mmp new file mode 100644 index 0000000..9736f2c --- /dev/null +++ b/group/s60v1/Smsc.mmp @@ -0,0 +1,68 @@ +/* +* ============================================================================ +* Name : Smsc.mmp +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* This is the project specification file for Smsc. +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +TARGET Smsc.app +TARGETTYPE app +UID 0x100039CE 0x0C253ABB // please request a UID from Symbian +TARGETPATH \system\apps\Smsc +LANG 01 54 + +MACRO SERIES_60_V1 + +SOURCEPATH ..\..\src +SOURCE SmscApp.cpp +SOURCE SmscAppUi.cpp +SOURCE SmscDocument.cpp +SOURCE SmscContainer.cpp +SOURCE SmscView.cpp +SOURCE SmscView2.cpp +SOURCE SmscContainer2.cpp + +RESOURCE ..\data\Smsc.rss +RESOURCE ..\data\Smsc_caption.rss + +USERINCLUDE . ..\..\inc + +SYSTEMINCLUDE . \epoc32\include + +LIBRARY euser.lib +LIBRARY apparc.lib +LIBRARY cone.lib +LIBRARY eikcore.lib +LIBRARY eikcoctl.lib +LIBRARY avkon.lib +LIBRARY commonengine.lib +LIBRARY msgs.lib +LIBRARY bafl.lib +LIBRARY gsmu.lib // for Service Center address + +START WINS +// ?wins_specific_information +END + +START MARM +// ?marm_specific_information +END + +// Other possible keywords: +/* +START BITMAP ?target +TARGETPATH ?emulated_path_on_target_machine +HEADER +SOURCEPATH ?source_path +SOURCE ?color_depth ?source_bitmap_list +END +*/ +// DEFFILE ?filename + +AIF Smsc.aif ..\..\aif Smscaif.rss c8 context_pane_icon.bmp context_pane_icon_mask.bmp list_icon.bmp list_icon_mask.bmp + diff --git a/group/s60v1/bld.inf b/group/s60v1/bld.inf new file mode 100644 index 0000000..45547e6 --- /dev/null +++ b/group/s60v1/bld.inf @@ -0,0 +1,63 @@ +/* +* ============================================================================ +* Name : bld.inf +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* This file provides the information required for building the +* whole of a Smsc. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + + +PRJ_PLATFORMS +// specify the platforms your component needs to be built for here +// defaults to WINS ARMI ARM4 THUMB so you can ignore this if you just build these + +PRJ_EXPORTS +// Specify the source file followed by its destination here +// copy will be used to copy the source file to its destination +// If there's no destination then the source file will be copied +// to the same name in \epoc32\include +// Example: +/* +\agnmodel\inc\AGMCOMON.H +*/ + +PRJ_MMPFILES +// Specify the .mmp files required for building the important component +// releasables. Note that you should specify any .mmp files for test +// programs further down the file. +// +// Specify "tidy" if the component you need to build doesn't need to be +// released to the rest of the company +// specify "ignore" if the MMP file exists but should be +// ignored. +// Example: +/* +\agnmodel\group\agnmodel.mmp +#if defined(MARM) +\agnmodel\group\agsvexe.mmp +#endif +*/ + +\SYMBIAN\PROJECTS\Smsc\group\s60v1\Smsc.mmp + +PRJ_TESTMMPFILES +// specify the .mmp files required for building any test programs here +// +// You can specify "manual" to denote that a test should be listed in a +// generated batch file for running a group of tests +// which require user input during testing. +// You can specify "support" to denote that a file is a test support file +// and shouldn't be listed in a batch file for running a group of tests +// By default, each test will be listed in a batch file for running a group +// of tests which can be left to run without requiring watching over +// by the person running the tests, i.e. tests where no user +// input is required. The default will apply if neither "manual" +// or "support" is specified. +// Example: +/* +\agnmodel\agtest\T_ATTEND.MMP manual +*/ diff --git a/group/s60v2/Smsc.mmp b/group/s60v2/Smsc.mmp new file mode 100644 index 0000000..dc0660d --- /dev/null +++ b/group/s60v2/Smsc.mmp @@ -0,0 +1,68 @@ +/* +* ============================================================================ +* Name : Smsc.mmp +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* This is the project specification file for Smsc. +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +TARGET Smsc.app +TARGETTYPE app +UID 0x100039CE 0x0C253ABB // please request a UID from Symbian +TARGETPATH \system\apps\Smsc +LANG 01 54 + +MACRO SERIES_60_V2 + +SOURCEPATH ..\..\src +SOURCE SmscApp.cpp +SOURCE SmscAppUi.cpp +SOURCE SmscDocument.cpp +SOURCE SmscContainer.cpp +SOURCE SmscView.cpp +SOURCE SmscView2.cpp +SOURCE SmscContainer2.cpp + +RESOURCE ..\data\Smsc.rss +RESOURCE ..\data\Smsc_caption.rss + +USERINCLUDE . ..\..\inc + +SYSTEMINCLUDE . \epoc32\include + +LIBRARY euser.lib +LIBRARY apparc.lib +LIBRARY cone.lib +LIBRARY eikcore.lib +LIBRARY eikcoctl.lib +LIBRARY avkon.lib +LIBRARY commonengine.lib +LIBRARY msgs.lib +LIBRARY bafl.lib +LIBRARY gsmu.lib // for Service Center address + +START WINS +// ?wins_specific_information +END + +START MARM +// ?marm_specific_information +END + +// Other possible keywords: +/* +START BITMAP ?target +TARGETPATH ?emulated_path_on_target_machine +HEADER +SOURCEPATH ?source_path +SOURCE ?color_depth ?source_bitmap_list +END +*/ +// DEFFILE ?filename + +AIF Smsc.aif ..\..\aif Smscaif.rss c8 context_pane_icon.bmp context_pane_icon_mask.bmp list_icon.bmp list_icon_mask.bmp + diff --git a/group/s60v2/bld.inf b/group/s60v2/bld.inf new file mode 100644 index 0000000..dc74c45 --- /dev/null +++ b/group/s60v2/bld.inf @@ -0,0 +1,63 @@ +/* +* ============================================================================ +* Name : bld.inf +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* This file provides the information required for building the +* whole of a Smsc. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + + +PRJ_PLATFORMS +// specify the platforms your component needs to be built for here +// defaults to WINS ARMI ARM4 THUMB so you can ignore this if you just build these + +PRJ_EXPORTS +// Specify the source file followed by its destination here +// copy will be used to copy the source file to its destination +// If there's no destination then the source file will be copied +// to the same name in \epoc32\include +// Example: +/* +\agnmodel\inc\AGMCOMON.H +*/ + +PRJ_MMPFILES +// Specify the .mmp files required for building the important component +// releasables. Note that you should specify any .mmp files for test +// programs further down the file. +// +// Specify "tidy" if the component you need to build doesn't need to be +// released to the rest of the company +// specify "ignore" if the MMP file exists but should be +// ignored. +// Example: +/* +\agnmodel\group\agnmodel.mmp +#if defined(MARM) +\agnmodel\group\agsvexe.mmp +#endif +*/ + +\SYMBIAN\PROJECTS\Smsc\group\s60v2\Smsc.mmp + +PRJ_TESTMMPFILES +// specify the .mmp files required for building any test programs here +// +// You can specify "manual" to denote that a test should be listed in a +// generated batch file for running a group of tests +// which require user input during testing. +// You can specify "support" to denote that a file is a test support file +// and shouldn't be listed in a batch file for running a group of tests +// By default, each test will be listed in a batch file for running a group +// of tests which can be left to run without requiring watching over +// by the person running the tests, i.e. tests where no user +// input is required. The default will apply if neither "manual" +// or "support" is specified. +// Example: +/* +\agnmodel\agtest\T_ATTEND.MMP manual +*/ diff --git a/inc/SmscApp.h b/inc/SmscApp.h new file mode 100644 index 0000000..e1dfe63 --- /dev/null +++ b/inc/SmscApp.h @@ -0,0 +1,51 @@ +/* +* ============================================================================ +* Name : CSmscApp from SmscApp.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* Declares main application class. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +#ifndef SMSCAPP_H +#define SMSCAPP_H + +// INCLUDES +#include + +// CONSTANTS +// UID of the application +const TUid KUidSmsc = { 0x0C253ABB }; // please request a UID from Symbian + +// CLASS DECLARATION + +/** +* CSmscApp application class. +* Provides factory to create concrete document object. +* +*/ +class CSmscApp : public CAknApplication + { + + public: // Functions from base classes + private: + + /** + * From CApaApplication, creates CSmscDocument document object. + * @return A pointer to the created document object. + */ + CApaDocument* CreateDocumentL(); + + /** + * From CApaApplication, returns application's UID (KUidSmsc). + * @return The value of KUidSmsc. + */ + TUid AppDllUid() const; + }; + +#endif + +// End of File + diff --git a/inc/SmscAppUi.h b/inc/SmscAppUi.h new file mode 100644 index 0000000..b9a6c1c --- /dev/null +++ b/inc/SmscAppUi.h @@ -0,0 +1,88 @@ +/* +* ============================================================================ +* Name : CSmscAppUi from SmscAppUi.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* Declares UI class for application. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +#ifndef SMSCAPPUI_H +#define SMSCAPPUI_H + +// INCLUDES +#include +#include +#include +#include +#include +#include +#include + +// FORWARD DECLARATIONS +class CSmscContainer; + + +// CONSTANTS +//const ?type ?constant_var = ?constant; + + +// CLASS DECLARATION + +/** +* Application UI class. +* Provides support for the following features: +* - EIKON control architecture +* - view architecture +* - status pane +* +*/ +class CSmscAppUi : public CAknViewAppUi + { + public: // // Constructors and destructor + + /** + * EPOC default constructor. + */ + void ConstructL(); + + /** + * Destructor. + */ + ~CSmscAppUi(); + + public: // New functions + + public: // Functions from base classes + + private: + // From MEikMenuObserver + void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); + + private: + /** + * From CEikAppUi, takes care of command handling. + * @param aCommand command to be handled + */ + void HandleCommandL(TInt aCommand); + + /** + * From CEikAppUi, handles key events. + * @param aKeyEvent Event to handled. + * @param aType Type of the key event. + * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). + */ + virtual TKeyResponse HandleKeyEventL( + const TKeyEvent& aKeyEvent,TEventCode aType); + + private: //Data + CAknNavigationControlContainer* iNaviPane; + CAknTabGroup* iTabGroup; + CAknNavigationDecorator* iDecoratedTabGroup; + }; + +#endif + +// End of File diff --git a/inc/SmscContainer.h b/inc/SmscContainer.h new file mode 100644 index 0000000..375e933 --- /dev/null +++ b/inc/SmscContainer.h @@ -0,0 +1,129 @@ +/* +* ============================================================================ +* Name : CSmscContainer from SmscContainer.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* Declares container control for application. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +#ifndef SMSCCONTAINER_H +#define SMSCCONTAINER_H + +// INCLUDES +#include "SmscView.h" +#include "Smsc.hrh" +#include // for the listbox + +// SMS manupilation +#include +#include +#include +#include +#include + + +// CLASS DECLARATION + +/** +* CSmscContainer container control class. +* +*/ +class CSmscContainer : public CCoeControl, + MCoeControlObserver, + public MEikListBoxObserver, + MMsvSessionObserver + { + public: // Constructors and destructor + + CSmscContainer ( CSmscView* aView); + + /** + * EPOC default constructor. + * @param aRect Frame rectangle for container. + */ + void ConstructL(const TRect& aRect); + + /** + * Destructor. + */ + ~CSmscContainer(); + + public: // New functions + + public: // Functions from base classes + + /** + * From CoeControl, OfferKeyEventL. + * Handles the key-events. + * @return If key-event is consumed, EKeyWasConsumed. Else + * EKeyWasNotConsumed. + * @param aKeyEvent Key event. + * @param aType Type of key event(EEventKey, EEventKeyUp or + * EEventKeyDown). + */ + TKeyResponse OfferKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ); + + void RefreshListL(TBool aRedrawOnceOnly = EFalse); + + void ClearListL(TBool aRedraw = ETrue); + + void ShowDetailsL(); + + private: // Functions from base classes + + /** + * From CoeControl,SizeChanged. + */ + void SizeChanged(); + + /** + * From CoeControl,CountComponentControls. + */ + TInt CountComponentControls() const; + + /** + * From CCoeControl,ComponentControl. + */ + CCoeControl* ComponentControl(TInt aIndex) const; + + /** + * From CCoeControl,Draw. + */ + void Draw(const TRect& aRect) const; + + /** + * From ?base_class ?member_description + */ + // event handling section + // e.g Listbox events + void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); + + void HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent /*aEventType*/){}; + + private: //data + CAknDoubleStyleListBox* iListBox; + CSmscView* iView; + CDesCArray* iTextArray; + CArrayFixSeg* iMsvidArray; + + CMsvSession* iMsvSession; // Client session on the message server + CSmsClientMtm* iSmsMtm; // Message Type Module (MMS) + CClientMtmRegistry* iMtmReg; // Mtm client registry for creating new mtms + protected: + virtual void HandleSessionEventL + (TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); + + // [ Obsolete ] + virtual void HandleSessionEvent + (TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) + {} + }; + +#endif + +// End of File diff --git a/inc/SmscContainer2.h b/inc/SmscContainer2.h new file mode 100644 index 0000000..c72f613 --- /dev/null +++ b/inc/SmscContainer2.h @@ -0,0 +1,91 @@ +/* +* ============================================================================ +* Name : CSmscContainer2 from SmscContainer2.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* Declares container control for application. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +#ifndef SMSCCONTAINER2_H +#define SMSCCONTAINER2_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class CEikEdwin; + +// CLASS DECLARATION + +/** +* CSmscContainer2 container control class. +* +*/ +class CSmscContainer2 : public CCoeControl, MCoeControlObserver + { + public: // Constructors and destructor + + /** + * EPOC default constructor. + * @param aRect Frame rectangle for container. + */ + void ConstructL(const TRect& aRect); + + /** + * Destructor. + */ + ~CSmscContainer2(); + + public: // New functions + + public: // Functions from base classes + + private: // Functions from base classes + + /** + * From CoeControl,SizeChanged. + */ + void SizeChanged(); + + /** + * From CoeControl,CountComponentControls. + */ + TInt CountComponentControls() const; + + /** + * From CCoeControl,ComponentControl. + */ + CCoeControl* ComponentControl(TInt aIndex) const; + + /** + * From CCoeControl,Draw. + */ + void Draw(const TRect& aRect) const; + + /** + * From CCoeControl, Handles key event. + * @param aKeyEvent The key event. + * @param aType The type of the event. + * @return Indicates whether or not the key event was + * used by this control. + */ + TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, + TEventCode aType); + + /** + * From ?base_class ?member_description + */ + // event handling section + // e.g Listbox events + void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); + + private: //data + CEikEdwin* iEdwin; + }; + +#endif + +// End of File diff --git a/inc/SmscDocument.h b/inc/SmscDocument.h new file mode 100644 index 0000000..ac9393f --- /dev/null +++ b/inc/SmscDocument.h @@ -0,0 +1,66 @@ +/* +* ============================================================================ +* Name : CSmscDocument from SmscDocument.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* Declares document for application (just a placeholder). +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +#ifndef SMSCDOCUMENT_H +#define SMSCDOCUMENT_H + +// INCLUDES +#include + +// CONSTANTS + +// FORWARD DECLARATIONS +class CEikAppUi; + +// CLASS DECLARATION + +/** +* CSmscDocument application class. +*/ +class CSmscDocument : public CAknDocument + { + public: // Constructors and destructor + /** + * Two-phased constructor. + */ + static CSmscDocument* NewL(CEikApplication& aApp); + + /** + * Destructor. + */ + virtual ~CSmscDocument(); + + public: // New functions + + protected: // New functions + + protected: // Functions from base classes + + private: + + /** + * EPOC default constructor. + */ + CSmscDocument(CEikApplication& aApp); + void ConstructL(); + + private: + + /** + * From CEikDocument, create CSmscAppUi "App UI" object. + */ + CEikAppUi* CreateAppUiL(); + }; + +#endif + +// End of File + diff --git a/inc/SmscView.h b/inc/SmscView.h new file mode 100644 index 0000000..9dd670a --- /dev/null +++ b/inc/SmscView.h @@ -0,0 +1,82 @@ +/* +* ============================================================================ +* Name : CSmscView from SmscView.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* Declares view for application. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +#ifndef SMSCVIEW_H +#define SMSCVIEW_H + +// INCLUDES +#include + + +// CONSTANTS +// UID of view +const TUid KViewId = {1}; + +// FORWARD DECLARATIONS +class CSmscContainer; + +// CLASS DECLARATION + +/** +* CSmscView view class. +* +*/ +class CSmscView : public CAknView + { + public: // Constructors and destructor + + /** + * EPOC default constructor. + */ + void ConstructL(); + + /** + * Destructor. + */ + ~CSmscView(); + + public: // Functions from base classes + + /** + * From ?base_class ?member_description + */ + TUid Id() const; + + /** + * From ?base_class ?member_description + */ + void HandleCommandL(TInt aCommand); + + /** + * From ?base_class ?member_description + */ + void HandleClientRectChange(); + + private: + + /** + * From AknView, ?member_description + */ + void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, + const TDesC8& aCustomMessage); + + /** + * From AknView, ?member_description + */ + void DoDeactivate(); + + private: // Data + CSmscContainer* iContainer; + }; + +#endif + +// End of File diff --git a/inc/SmscView2.h b/inc/SmscView2.h new file mode 100644 index 0000000..5612846 --- /dev/null +++ b/inc/SmscView2.h @@ -0,0 +1,82 @@ +/* +* ============================================================================ +* Name : CSmscView2 from SmscView2.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* Declares view for application. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +#ifndef SMSCVIEW2_H +#define SMSCVIEW2_H + +// INCLUDES +#include + + +// CONSTANTS +// UID of view +const TUid KView2Id = {2}; + +// FORWARD DECLARATIONS +class CSmscContainer2; + +// CLASS DECLARATION + +/** +* CSmscView2 view class. +* +*/ +class CSmscView2 : public CAknView + { + public: // Constructors and destructor + + /** + * EPOC default constructor. + */ + void ConstructL(); + + /** + * Destructor. + */ + ~CSmscView2(); + + public: // Functions from base classes + + /** + * From ?base_class ?member_description + */ + TUid Id() const; + + /** + * From ?base_class ?member_description + */ + void HandleCommandL(TInt aCommand); + + /** + * From ?base_class ?member_description + */ + void HandleClientRectChange(); + + private: + + /** + * From AknView, ?member_description + */ + void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, + const TDesC8& aCustomMessage); + + /** + * From AknView, ?member_description + */ + void DoDeactivate(); + + private: // Data + CSmscContainer2* iContainer; + }; + +#endif + +// End of File diff --git a/inc/smsc.hrh b/inc/smsc.hrh new file mode 100644 index 0000000..289e0ef --- /dev/null +++ b/inc/smsc.hrh @@ -0,0 +1,35 @@ +/* +* ============================================================================ +* Name : Smsc resource header file smsc.hrh +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* This file contains declarations for constants of Smsc. +* The file can be included in C++ or resource file. +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +#ifndef SMSC_HRH +#define SMSC_HRH + +enum TSmscCommandIds + { + ReturnToMain = 1, + DisplayHelp, + ShowDetails, + RefreshGrid, + ClearGrid + }; + +enum TSmscTabViewId + { + ESmscView1Tab= 1, + ESmscView2Tab + }; + + + + +#endif // SMSC_HRH diff --git a/inc/smsc.l01 b/inc/smsc.l01 new file mode 100644 index 0000000..033e68a --- /dev/null +++ b/inc/smsc.l01 @@ -0,0 +1,46 @@ +/* +* ============================================================================ +* Name : smsc.l01 +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* This is a localisation file for Smsc (language: English) +* A .loc file is the one and only place where the logical strings +* to be localised are defined. +* Initial content was generated by Series 60 AppWizard. +* ------------------------------------------------------------------- +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// LOCALISATION STRINGS + +#define qtn_help_about "SMSC Viewer% Makidis Michael 2003-2005%venus.cslab.aueb.gr/~mikem%%Original idea by eLeKtriK EyE. Special thanks to all myPhone.gr members.%BRIEF DESCRIPTION%This application displays the sender number, SMS service center number and received time and date for all Inbox SMSs.% " +#define qtn_exit "Exit" +#define qtn_display_help "About" +#define qtn_return_to_main "Return to SMSCs" +#define qtn_show_details "Message details" + +#define qtn_no_messages_selected "No messages are selected" + +#define qtn_please_wait "Please wait..." +#define qtn_loading_mesages "Retrieving messages..." +#define qtn_no_messages "(no messages)" + +#define qtn_details_title "Message Details" +#define qtn_details_from "From" +#define qtn_details_telno "Tel No" +#define qtn_details_smsc "SMSC" +#define qtn_details_subject "Subject" +#define qtn_details_date "Date" +#define qtn_details_time "Time rcv" + +#define qtn_view1_tab "SMSCs" +#define qtn_view2_tab "About" + +#define qtn_app_caption_string "SMSC Viewer" + +#define qtn_app_short_caption_string "SMSCs" + + +// End of File diff --git a/inc/smsc.l54 b/inc/smsc.l54 new file mode 100644 index 0000000..f99544e --- /dev/null +++ b/inc/smsc.l54 @@ -0,0 +1,47 @@ +// +/* +* ============================================================================ +* Name : smsc.l54 +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Description: +* This is a localisation file for Smsc (language: Greek) +* A .loc file is the one and only place where the logical strings +* to be localised are defined. +* Initial content was generated by Series 60 AppWizard. +* ------------------------------------------------------------------- +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// LOCALISATION STRINGS + +#define qtn_help_about "SMSC Viewer%© Μακίδης Μιχάλης 2003-05%venus.cslab.aueb.gr/~mikem%%Αρχική ιδέα από τον eLeKtriK EyE. Ευχαριστίες σε όλα τα μέλη του myPhone.gr.%ΣΥΝΟΠΤΙΚΗ ΠΕΡΙΓΡΑΦΗ%Η εφαρμογή αυτή εμφανίζει τον αποστολέα, το κέντρο μηνυμάτων και την ημ/νία και ώρα παραλαβής των εισερχόμενων μηνυμάτων SMS." +#define qtn_exit "Έξοδος" +#define qtn_display_help "Περί" +#define qtn_return_to_main "Επιστροφή στα SMSCs" +#define qtn_show_details "Στοιχεία μηνύματος" + +#define qtn_no_messages_selected "Κανένα μήνυμα δεν είναι επιλεγμένο" + +#define qtn_please_wait "Παρακαλώ περιμένετε..." +#define qtn_loading_mesages "Ανάκτηση μηνυμάτων..." +#define qtn_no_messages "(κανένα μήνυμα)" + +#define qtn_details_title "Στοιχεία μηνύματος" +#define qtn_details_from "Από" +#define qtn_details_telno "Τηλ. Αρ." +#define qtn_details_smsc "Κέντρο" +#define qtn_details_subject "Θέμα" +#define qtn_details_date "Ημ/νία" +#define qtn_details_time "Ώρα ληψ." + +#define qtn_view1_tab "SMSCs" +#define qtn_view2_tab "Περί" + +#define qtn_app_caption_string "Κέντρα SMS" + +#define qtn_app_short_caption_string "SMSCs" + + +// End of File diff --git a/inc/smsc.loc b/inc/smsc.loc new file mode 100644 index 0000000..80cd04c --- /dev/null +++ b/inc/smsc.loc @@ -0,0 +1,6 @@ +#ifdef LANGUAGE_01 +#include "Smsc.l01" +#endif +#ifdef LANGUAGE_54 +#include "Smsc.l54" +#endif \ No newline at end of file diff --git a/install/Smsc.pkg b/install/Smsc.pkg new file mode 100644 index 0000000..b348531 --- /dev/null +++ b/install/Smsc.pkg @@ -0,0 +1,33 @@ +; +; Installation file for Smsc application +; +;Languages +&EN,EL +; +; UID is the app's UID +; Please request a UID from Symbian +; +#{"SMSC Viewer","Εμφάν. Κέντρων SMS"},(0x0C253ABB),1,00,0 +; +;Supports Series 60 v 0.9 +;This line indicates that this installation is for the Series 60 platform v0.9 +;This line must appear _exactly_ as shown below in the sis file +;If this line is missing or incorrect, the sis file will not be able +;to be installed on Series 60 v0.9 platforms +(0x101F6F88), 0, 0, 0, {"Series60ProductID","Series60ProductID"} +; +; License file +; +{ +"license.txt" +"licensegr.txt" +}-"",FT,TA +; +; Files to install +; +"\Symbian\6.1\Series60\Epoc32\release\armi\urel\Smsc.r01" -"!:\system\apps\Smsc\Smsc.r01" +"\Symbian\6.1\Series60\Epoc32\release\armi\urel\Smsc.r54" -"!:\system\apps\Smsc\Smsc.r54" +"\Symbian\6.1\Series60\Epoc32\release\armi\urel\Smsc_caption.r01" -"!:\system\apps\Smsc\Smsc_caption.r01" +"\Symbian\6.1\Series60\Epoc32\release\armi\urel\Smsc_caption.r54" -"!:\system\apps\Smsc\Smsc_caption.r54" +"\Symbian\6.1\Series60\Epoc32\release\armi\urel\Smsc.aif" -"!:\system\apps\Smsc\Smsc.aif" +"\Symbian\6.1\Series60\Epoc32\release\armi\urel\Smsc.app" -"!:\system\apps\Smsc\Smsc.app" diff --git a/install/Smsc_S60V2.pkg b/install/Smsc_S60V2.pkg new file mode 100644 index 0000000..aded8d3 --- /dev/null +++ b/install/Smsc_S60V2.pkg @@ -0,0 +1,33 @@ +; +; Installation file for Smsc application +; +;Languages +&EN,EL +; +; UID is the app's UID +; Please request a UID from Symbian +; +#{"SMSC Viewer","Εμφάν. Κέντρων SMS"},(0x0C253ABB),1,00,0 +; +;Supports Series 60 v 2.0 +;This line indicates that this installation is for the Series 60 platform v2.0 +;This line must appear _exactly_ as shown below in the sis file +;If this line is missing or incorrect, the sis file will not be able +;to be installed on Series 60 v2.0 platforms +(0x101F7960), 0, 0, 0, {"Series60ProductID","Series60ProductID"} +; +; License file +; +{ +"license.txt" +"licensegr.txt" +}-"",FT,TA +; +; Files to install +; +"\Symbian\7.0s\Series60_v20\Epoc32\data\z\system\apps\Smsc\Smsc.r01" -"!:\system\apps\Smsc\Smsc.r01" +"\Symbian\7.0s\Series60_v20\Epoc32\data\z\system\apps\Smsc\Smsc.r54" -"!:\system\apps\Smsc\Smsc.r54" +"\Symbian\7.0s\Series60_v20\Epoc32\data\z\system\apps\Smsc\Smsc_caption.r01" -"!:\system\apps\Smsc\Smsc_caption.r01" +"\Symbian\7.0s\Series60_v20\Epoc32\data\z\system\apps\Smsc\Smsc_caption.r54" -"!:\system\apps\Smsc\Smsc_caption.r54" +"\Symbian\7.0s\Series60_v20\Epoc32\data\z\system\apps\Smsc\Smsc.aif" -"!:\system\apps\Smsc\Smsc.aif" +"\Symbian\7.0s\Series60_v20\Epoc32\release\armi\urel\Smsc.app" -"!:\system\apps\Smsc\Smsc.app" diff --git a/install/license.txt b/install/license.txt new file mode 100644 index 0000000..35eb7c1 --- /dev/null +++ b/install/license.txt @@ -0,0 +1,11 @@ +In order to install and use this application you must accept the following license agreement: +----- +SMSC Viewer +Copyright (C) Makidis Michael 2003-2005 +venus.cslab.aueb.gr/~mikem + +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \ No newline at end of file diff --git a/install/licensegr.txt b/install/licensegr.txt new file mode 100644 index 0000000..b6906bd --- /dev/null +++ b/install/licensegr.txt @@ -0,0 +1,11 @@ +Για να εγκαταστήσετε και να χρησιμοποιήσετε αυτή την εφαρμογή πρέπει να αποδεχθείτε την ακόλουθη άδεια χρήσης: +----- +SMSC Viewer +Πνευματικά δικαιώματα (C) Μακίδης Μιχάλης 2003-2005 +venus.cslab.aueb.gr/~mikem + +Το πρόγραμμα αυτό είναι ελεύθερο λογισμικό. Μπορείτε να το αναδιανέμετε και/ή να το τροποποιήσετε σύμφωνα με τους όρους της άδειας χρήσης "GNU General Public License" όπως αυτή εκδίδεται από το Free Software Foundation (Ίδρυμα Ελεύθερου Λογισμικού), είτε της έκδοσης 2 της άδειας χρήσης, ή (κατά την αρέσκειά σας) οποιασδήποτε μεταγενέστερης έκδοσης. + +Το πρόγραμμα αυτό διανέμεται με την ελπίδα ότι θα είναι χρήσιμο, αλλά ΧΩΡΙΣ ΚΑΜΙΑ ΕΓΓΥΗΣΗ, ούτε καν την υποδηλωμένη εγγύηση της ΕΜΠΟΡΕΥΣΙΜΟΤΗΤΑΣ ή ΔΥΝΑΤΟΤΗΤΑΣ ΧΡΗΣΗΣ ΓΙΑ ΚΑΠΟΙΟ ΣΥΓΚΕΚΡΙΜΕΝΟ ΣΚΟΠΟ. Δείτε την άδεια χρήσης "GNU General Public License" για περισσότερες λεπτομέρειες. + +Πρέπει να λάβατε ένα αντίτυπο της άδειας χρήσης "GNU General Public License" μαζί με αυτό το πρόγραμμα. Αν δεν το λάβατε, γράψτε στο: Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/src/SmscApp.cpp b/src/SmscApp.cpp new file mode 100644 index 0000000..5055768 --- /dev/null +++ b/src/SmscApp.cpp @@ -0,0 +1,64 @@ +/* +* ============================================================================ +* Name : CSmscApp from SmscApp.cpp +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Implementation notes: +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// INCLUDE FILES +#include "SmscApp.h" +#include "SmscDocument.h" + +// ================= MEMBER FUNCTIONS ======================= + +// --------------------------------------------------------- +// CSmscApp::AppDllUid() +// Returns application UID +// --------------------------------------------------------- +// +TUid CSmscApp::AppDllUid() const + { + return KUidSmsc; + } + + +// --------------------------------------------------------- +// CSmscApp::CreateDocumentL() +// Creates CSmscDocument object +// --------------------------------------------------------- +// +CApaDocument* CSmscApp::CreateDocumentL() + { + return CSmscDocument::NewL( *this ); + } + +// ================= OTHER EXPORTED FUNCTIONS ============== +// +// --------------------------------------------------------- +// NewApplication() +// Constructs CSmscApp +// Returns: created application object +// --------------------------------------------------------- +// +EXPORT_C CApaApplication* NewApplication() + { + return new CSmscApp; + } + +// --------------------------------------------------------- +// E32Dll(TDllReason) +// Entry point function for EPOC Apps +// Returns: KErrNone: No error +// --------------------------------------------------------- +// +GLDEF_C TInt E32Dll( TDllReason ) + { + return KErrNone; + } + +// End of File + diff --git a/src/SmscAppUi.cpp b/src/SmscAppUi.cpp new file mode 100644 index 0000000..3f2966c --- /dev/null +++ b/src/SmscAppUi.cpp @@ -0,0 +1,173 @@ +/* +* ============================================================================ +* Name : CSmscAppUi from SmscAppUi.cpp +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Implementation notes: +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// INCLUDE FILES +#include // for StringLoader +#include +#include +#include "smsc.hrh" +#include "SmscAppUi.h" +#include "SmscView.h" +#include "SmscView2.h" + +// ================= MEMBER FUNCTIONS ======================= +// +// ---------------------------------------------------------- +// CSmscAppUi::ConstructL() +// ?implementation_description +// ---------------------------------------------------------- +// +void CSmscAppUi::ConstructL() + { + BaseConstructL( +#ifdef SERIES_60_V2 + EAknEnableSkin +#endif + ); + + // Show tabs for main views from resources + CEikStatusPane* sp = StatusPane(); + + // Fetch pointer to the default navi pane control + iNaviPane = (CAknNavigationControlContainer*)sp->ControlL( + TUid::Uid(EEikStatusPaneUidNavi)); + + // Tabgroup has been read from resource and it were pushed to the navi pane. + // Get pointer to the navigation decorator with the ResourceDecorator() function. + // Application owns the decorator and it has responsibility to delete the object. + iDecoratedTabGroup = iNaviPane->ResourceDecorator(); + if (iDecoratedTabGroup) + { + iTabGroup = (CAknTabGroup*) iDecoratedTabGroup->DecoratedControl(); + } + + CSmscView* view1 = new (ELeave) CSmscView; + + CleanupStack::PushL( view1 ); + view1->ConstructL(); + AddViewL( view1 ); // transfer ownership to CAknViewAppUi + CleanupStack::Pop(); // view1 + + CSmscView2* view2 = new (ELeave) CSmscView2; + + CleanupStack::PushL( view2 ); + view2->ConstructL(); + AddViewL( view2 ); // transfer ownership to CAknViewAppUi + CleanupStack::Pop(); // view2 + + SetDefaultViewL(*view1); + + } + +// ---------------------------------------------------- +// CSmscAppUi::~CSmscAppUi() +// Destructor +// Frees reserved resources +// ---------------------------------------------------- +// +CSmscAppUi::~CSmscAppUi() + { + delete iDecoratedTabGroup; + } + +// ------------------------------------------------------------------------------ +// CSmscAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) +// This function is called by the EIKON framework just before it displays +// a menu pane. Its default implementation is empty, and by overriding it, +// the application can set the state of menu items dynamically according +// to the state of application data. +// ------------------------------------------------------------------------------ +// +void CSmscAppUi::DynInitMenuPaneL( + TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/) + { + } + +// ---------------------------------------------------- +// CSmscAppUi::HandleKeyEventL( +// const TKeyEvent& aKeyEvent,TEventCode /*aType*/) +// ?implementation_description +// ---------------------------------------------------- +// +TKeyResponse CSmscAppUi::HandleKeyEventL( + const TKeyEvent& aKeyEvent,TEventCode /*aType*/) + { + if ( iTabGroup == NULL ) + { + return EKeyWasNotConsumed; + } + + TInt active = iTabGroup->ActiveTabIndex(); + TInt count = iTabGroup->TabCount(); + + switch ( aKeyEvent.iCode ) + { + case EKeyLeftArrow: + if ( active > 0 ) + { + // activate the previous tab + active--; + iTabGroup->SetActiveTabByIndex( active ); + ActivateLocalViewL(TUid::Uid(iTabGroup->TabIdFromIndex(active))); + } + break; + case EKeyRightArrow: + if( (active + 1) < count ) + { + // activate the next tab + active++; + iTabGroup->SetActiveTabByIndex( active ); + ActivateLocalViewL(TUid::Uid(iTabGroup->TabIdFromIndex(active))); + } + break; + default: + return EKeyWasNotConsumed; + break; + } + + return EKeyWasConsumed; + } + +// ---------------------------------------------------- +// CSmscAppUi::HandleCommandL(TInt aCommand) +// ?implementation_description +// ---------------------------------------------------- +// +void CSmscAppUi::HandleCommandL(TInt aCommand) + { + switch ( aCommand ) + { + case EAknSoftkeyExit: + case EAknCmdExit: + { + Exit(); + break; + } + case ReturnToMain: + { + // activate the first tab + iTabGroup->SetActiveTabByIndex( 0 ); + ActivateLocalViewL(TUid::Uid(iTabGroup->TabIdFromIndex(0))); + break; + } + case DisplayHelp: + { + // activate the second tab + iTabGroup->SetActiveTabByIndex( 1 ); + ActivateLocalViewL(TUid::Uid(iTabGroup->TabIdFromIndex(1))); + break; + } + default: + break; + } + } + +// End of File diff --git a/src/SmscContainer.cpp b/src/SmscContainer.cpp new file mode 100644 index 0000000..9a56a12 --- /dev/null +++ b/src/SmscContainer.cpp @@ -0,0 +1,435 @@ +/* +* ============================================================================ +* Name : CSmscContainer from SmscContainer.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Implementation notes: +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// INCLUDE FILES +#include "SmscContainer.h" +#include // for note +#include +#include // for popup list +#include // for StringLoader + +// ================= MEMBER FUNCTIONS ======================= + +CSmscContainer::CSmscContainer ( CSmscView* aView):iListBox(NULL), + iView(aView), iTextArray(NULL) +{}; + +// --------------------------------------------------------- +// CSmscContainer::ConstructL(const TRect& aRect) +// EPOC two phased constructor +// --------------------------------------------------------- +// +void CSmscContainer::ConstructL(const TRect& aRect) + { + CreateWindowL(); + SetRect(aRect); + + // Delete listbox object. + if ( iListBox ) + { + delete iListBox; + iListBox = NULL; + } + + // Create a new listbox + iListBox = new ( ELeave ) CAknDoubleStyleListBox(); + iListBox->SetContainerWindowL( *this ); + + // Construct listbox. + if ( iListBox ) + iListBox->ConstructL( this, EAknListBoxSelectionList); + + // Set the model... + iTextArray = new(ELeave) CDesCArraySeg(5); + if ( iTextArray && iListBox ) + { + // Sets list items + iListBox->Model()->SetItemTextArray( iTextArray ); + iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray ); + } + + // Create scrollbar. + if ( iListBox ) + { + // Creates scrollbar. + iListBox->CreateScrollBarFrameL( ETrue ); + iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( + CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto ); + } + + // Empty listbox message + HBufC* textResource = StringLoader::LoadLC(R_NO_MESSAGES); + iListBox->View()->SetListEmptyTextL(*textResource); + iListBox->DrawNow(); + CleanupStack::PopAndDestroy(textResource); + + // Display listbox + iListBox->SetListBoxObserver( this ); + SizeChanged(); + iListBox->ActivateL(); + + // update scroll bar + if (iListBox) + { + TInt pos(iListBox->View()->CurrentItemIndex()); + if (iListBox->ScrollBarFrame()) + { + iListBox->ScrollBarFrame()->MoveVertThumbTo(pos); + } + } + + ActivateL(); + + // Open the channel to the messages services + iMsvSession = CMsvSession::OpenSyncL(*this); + iMtmReg = CClientMtmRegistry::NewL(*iMsvSession); + iSmsMtm = (CSmsClientMtm*) iMtmReg->NewMtmL( KUidMsgTypeSMS ); + + iMsvidArray = new(ELeave)CArrayFixSeg(4); + + // Populate the list + RefreshListL(); + } + +// Destructor +CSmscContainer::~CSmscContainer() + { + delete iListBox; // Deletes listbox object. + delete iTextArray; + delete iMsvidArray; + + delete iSmsMtm; + delete iMtmReg; + delete iMsvSession; // session must be deleted last (and constructed first) + } + +void CSmscContainer::RefreshListL(TBool aRedrawOnceOnly) +{ + ClearListL(!aRedrawOnceOnly); + + // select the Inbox index to start the search + CMsvEntry* currentEntry = iMsvSession->GetEntryL(KMsvGlobalInBoxIndexEntryId); + + CleanupStack::PushL(currentEntry); + + // sort the entries + currentEntry->SetSortTypeL(TMsvSelectionOrdering + (KMsvGroupByType, EMsvSortByDateReverse, EFalse)); + + const TInt count = currentEntry->Count(); + TInt Smss = 0; + + TBuf<200> text; + TBuf<30> dateString; + + for(TInt i = 0; i < count; i++) + { + const TMsvEntry& child = (*currentEntry)[i]; + // is it an sms? + if(child.iMtm == KUidMsgTypeSMS) + { + Smss++; + + // Store the id + iMsvidArray->AppendL(child.Id()); + + // Load the message + iSmsMtm->SwitchCurrentEntryL(child.Id()); + iSmsMtm->LoadMessageL(); + + // First txt position of the item (empty) + text.Append(_L(" \t")); + + // Second position (sender) + text.Append(child.iDetails); + + // Third Position + // SMSC + text.Append(_L("\tC:")); + text.Append(iSmsMtm->SmsHeader().ServiceCenterAddress()); + // Date & Time + text.Append(_L("@")); + child.iDate.FormatL(dateString, _L("%M%Y%/0%4%/1%5%/3")); + text.Append(dateString); + text.Append(_L(" ")); + child.iDate.FormatL(dateString, _L("%-B%:0%J%:1%T%:3%+B")); + text.Append(dateString); + + // Done - append the item + iTextArray->AppendL(text); + + // Redraw + if(!aRedrawOnceOnly) + { + iListBox->HandleItemAdditionL(); // will redraw if necessery + if(Smss == 3) iListBox->DrawNow(); // always draw the first 3 ;) + } + + // Clear the txt + text = _L(""); + } + } + + iListBox->ScrollToMakeItemVisible(iListBox->CurrentItemIndex()); + if(aRedrawOnceOnly && iListBox->Model()->NumberOfItems() != 0) + iListBox->HandleItemAdditionL(); + + CleanupStack::PopAndDestroy(currentEntry); +} + +// --------------------------------------------------------- +// CSmscContainer::SizeChanged() +// Called by framework when the view size is changed +// --------------------------------------------------------- +// +void CSmscContainer::SizeChanged() + { + if ( iListBox ) + { + iListBox->SetRect( Rect() ); // Sets rectangle of lstbox. + } + } + +// --------------------------------------------------------- +// CSmscContainer::CountComponentControls() const +// --------------------------------------------------------- +// +TInt CSmscContainer::CountComponentControls() const + { + if(iListBox) return 1; // return nbr of controls inside this container + else return 0; + } + +// --------------------------------------------------------- +// CSmscContainer::ComponentControl(TInt aIndex) const +// --------------------------------------------------------- +// +CCoeControl* CSmscContainer::ComponentControl(TInt /*aIndex*/) const + { + if(iListBox) return iListBox; // return nbr of controls inside this container + else return 0; + } + +// --------------------------------------------------------- +// CSmscContainer::Draw(const TRect& aRect) const +// --------------------------------------------------------- +// +void CSmscContainer::Draw(const TRect& /*aRect*/) const + { + // Nothing to draw - we display a listbox only + + /*CWindowGc& gc = SystemGc(); + gc.SetPenStyle(CGraphicsContext::ENullPen); + gc.SetBrushColor(KRgbGray); + gc.SetBrushStyle(CGraphicsContext::ESolidBrush); + gc.DrawRect(aRect);*/ + } + +// ---------------------------------------------------------------------------- +// TKeyResponse CSmscContainer::OfferKeyEventL( const TKeyEvent&, +// TEventCode ) +// Handles the key events. +// ---------------------------------------------------------------------------- +// +TKeyResponse CSmscContainer::OfferKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ) + { + if ( aType != EEventKey ) // Is not key event? + { + return EKeyWasNotConsumed; + } + + switch ( aKeyEvent.iCode ) // The code of key event is... + { + case EKeyLeftArrow: // Left key. + case EKeyRightArrow: // Right Key. + return EKeyWasNotConsumed; + break; + case EKeyEnter: + case EKeyOK: + ShowDetailsL(); + return EKeyWasConsumed; + break; + default: + if ( iListBox ) + return iListBox->OfferKeyEventL( aKeyEvent, aType ); + else + return EKeyWasNotConsumed; + break; + } + } + +// --------------------------------------------------------- +// CSmscContainer::HandleControlEventL( +// CCoeControl* aControl,TCoeEvent aEventType) +// --------------------------------------------------------- +// +void CSmscContainer::HandleControlEventL( + CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) + { + // No need to add any control event handler code here + } + +void CSmscContainer::ClearListL(TBool aRedraw) +{ + iTextArray->Reset(); + iMsvidArray->Reset(); + iListBox->HandleItemRemovalL(); + if(aRedraw) iListBox->DrawNow(); +} + +void CSmscContainer::HandleSessionEventL + (TMsvSessionEvent aEvent, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) +{ + if( + aEvent == EMsvMtmGroupInstalled || + aEvent == EMsvMtmGroupDeInstalled || + aEvent == EMsvCloseSession || + aEvent == EMsvCorruptedIndexRebuilt || + aEvent == EMsvServerTerminated || + aEvent == EMsvMediaChanged || + aEvent == EMsvMediaUnavailable || + aEvent == EMsvGeneralError || + aEvent == EMsvCorruptedIndexRebuilding + ) + { + delete iSmsMtm; + delete iMtmReg; + delete iMsvSession; // session must be deleted last (and constructed first) + + iMsvSession = CMsvSession::OpenSyncL(*this); + iMtmReg = CClientMtmRegistry::NewL(*iMsvSession); + iSmsMtm = (CSmsClientMtm*) iMtmReg->NewMtmL( KUidMsgTypeSMS ); + + RefreshListL(ETrue); + } + else + RefreshListL(ETrue); +} + +void CSmscContainer::ShowDetailsL() +{ + if(iListBox->Model()->NumberOfItems() == 0) + { + // inform the users that there are no messages + HBufC* textResource = StringLoader::LoadLC(R_NO_MESSAGES_SELECTED); + CAknInformationNote* note = new (ELeave) CAknInformationNote(); + note->ExecuteLD(*textResource); + CleanupStack::PopAndDestroy(textResource); + return; + } + + // Create listbox and PUSH it. + CEikTextListBox* list = new(ELeave) CAknSingleHeadingPopupMenuStyleListBox; + CleanupStack::PushL(list); + + // Create popup list and PUSH it. + CAknPopupList* popupList = CAknPopupList::NewL( + list, R_AVKON_SOFTKEYS_BACK, + AknPopupLayouts::EMenuWindow); + CleanupStack::PushL(popupList); + + // initialize listbox. + list->ConstructL(popupList, CEikListBox::ELeftDownInViewRect | EAknListBoxViewerFlag); + list->CreateScrollBarFrameL(ETrue); + list->ScrollBarFrame()->SetScrollBarVisibilityL( + CEikScrollBarFrame::EOff, + CEikScrollBarFrame::EAuto); + + // Set title + HBufC* textResource = StringLoader::LoadLC(R_DETAILS_TITLE); + popupList->SetTitleL(*textResource); + CleanupStack::PopAndDestroy(textResource); + + // Load the selected message + CMsvEntry* currentEntry = iMsvSession->GetEntryL((*iMsvidArray)[iListBox->CurrentItemIndex()]); + CleanupStack::PushL(currentEntry); + const TMsvEntry& entry = currentEntry->Entry(); + iSmsMtm->SwitchCurrentEntryL(entry.Id()); + iSmsMtm->LoadMessageL(); + + + // Get the info + TBuf<50> text; + TBuf<30> dateString; + CDesCArray* items = new(ELeave) CDesCArraySeg(5); + + // From + textResource = StringLoader::LoadLC(R_DETAILS_FROM); + text.Append(*textResource); + text.Append(_L("\t")); + text.Append(entry.iDetails); + items->AppendL(text); + CleanupStack::PopAndDestroy(textResource); + + + // Tel No + text.Zero(); + textResource = StringLoader::LoadLC(R_DETAILS_TELNO); + text.Append(*textResource); + text.Append(_L("\t")); + text.Append(iSmsMtm->SmsHeader().Message().ToFromAddress()); + items->AppendL(text); + CleanupStack::PopAndDestroy(textResource); + + // SMSC + text.Zero(); + textResource = StringLoader::LoadLC(R_DETAILS_SMSC); + text.Append(*textResource); + text.Append(_L("\t")); + text.Append(iSmsMtm->SmsHeader().ServiceCenterAddress()); + items->AppendL(text); + CleanupStack::PopAndDestroy(textResource); + + //Subject + text.Zero(); + textResource = StringLoader::LoadLC(R_DETAILS_SUBJECT); + text.Append(*textResource); + text.Append(_L("\t")); + text.Append(entry.iDescription); + items->AppendL(text); + CleanupStack::PopAndDestroy(textResource); + + // Date + text.Zero(); + textResource = StringLoader::LoadLC(R_DETAILS_DATE); + text.Append(*textResource); + text.Append(_L("\t")); + entry.iDate.FormatL(dateString, _L("%D%M%Y%/0%1%/1%2%/2%3%/3")); + text.Append(dateString); + items->AppendL(text); + CleanupStack::PopAndDestroy(textResource); + + // Time + text.Zero(); + textResource = StringLoader::LoadLC(R_DETAILS_TIME); + text.Append(*textResource); + text.Append(_L("\t")); + entry.iDate.FormatL(dateString, _L("%-B%:0%J%:1%T%:3%+B")); + text.Append(dateString); + items->AppendL(text); + CleanupStack::PopAndDestroy(textResource); + + CleanupStack::PopAndDestroy(currentEntry); + + // Set listitems. + list->Model()->SetItemTextArray(items); + list->Model()->SetOwnershipType(ELbmOwnsItemArray); + + // Show popup list + popupList->ExecuteLD(); + CleanupStack::Pop(); // popuplist + + CleanupStack::PopAndDestroy(); // list +} + +// End of File \ No newline at end of file diff --git a/src/SmscContainer2.cpp b/src/SmscContainer2.cpp new file mode 100644 index 0000000..c12eab8 --- /dev/null +++ b/src/SmscContainer2.cpp @@ -0,0 +1,166 @@ +/* +* ============================================================================ +* Name : CSmscContainer2 from SmscContainer2.cpp +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Implementation notes: +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// INCLUDE FILES +#include // for CEikEdwin +#include // for StringLoader +#include +#include "SmscContainer2.h" +#include "Smsc.hrh" + +#define EDWIN_POS TPoint(0, 0) + +// ================= MEMBER FUNCTIONS ======================= + +// --------------------------------------------------------- +// CSmscContainer2::ConstructL(const TRect& aRect) +// EPOC two phased constructor +// --------------------------------------------------------- +// +void CSmscContainer2::ConstructL(const TRect& aRect) + { + CreateWindowL(); + + // Create the editor + iEdwin = new (ELeave) CEikEdwin; + iEdwin->SetContainerWindowL(*this); + iEdwin->SetAknEditorFlags(EAknEditorFlagEnableScrollBars); + iEdwin->ConstructL( CEikEdwin::EWidthInPixels | + CEikEdwin::ELineCursor | + EEikEdwinDisplayOnly + , aRect.Width(),1024,7); + HBufC* textResource = StringLoader::LoadLC(R_SMSC_HELP); + + iEdwin->SetTextL(textResource); + + // Enter the line feeds (based on Forum Nokia Discussion topic) + CPlainText* textStream = iEdwin->Text(); + const TInt KReturnCharNum = {12}; // 12 = ASCII return sign + TChar ReturnChar( KReturnCharNum ); + //any sign can be used here as long as its not in the resource string. + TChar secondChar( '%' ); + TInt i( textResource->Length() -2 ); + while( i >= 0 ) + { + TChar Char = textResource->operator[]( i ); + //if there are any special chars put them back as returns. + if( Char == secondChar ) + { + textStream->DeleteL( i, 1 ); + textStream->InsertL( i, ReturnChar ); + } + i--; + } + + textStream = 0; + CleanupStack::PopAndDestroy(textResource); + + SetRect(aRect); + ActivateL(); + iEdwin->SetCursorPosL(0, EFalse); + //iEdwin->SetFocus(ETrue); + } + +// Destructor +CSmscContainer2::~CSmscContainer2() + { + delete iEdwin; + } + +// --------------------------------------------------------- +// CSmscContainer2::SizeChanged() +// Called by framework when the view size is changed +// --------------------------------------------------------- +// +void CSmscContainer2::SizeChanged() + { + iEdwin->SetExtent(EDWIN_POS, iEdwin->MinimumSize()); + } + +// --------------------------------------------------------- +// CSmscContainer2::CountComponentControls() const +// --------------------------------------------------------- +// +TInt CSmscContainer2::CountComponentControls() const + { + return 1; // return nbr of controls inside this container + } + +// --------------------------------------------------------- +// CSmscContainer2::ComponentControl(TInt aIndex) const +// --------------------------------------------------------- +// +CCoeControl* CSmscContainer2::ComponentControl(TInt aIndex) const + { + switch ( aIndex ) + { + case 0: + return iEdwin; + default: + return NULL; + } + } + +// --------------------------------------------------------- +// CSmscContainer2::Draw(const TRect& aRect) const +// --------------------------------------------------------- +// +void CSmscContainer2::Draw(const TRect& /*aRect*/) const + { + CWindowGc& gc = SystemGc(); + gc.Clear(); + } + +// --------------------------------------------------------- +// CSmscContainer2::OfferKeyEventL(...) +// Notify key events to editors. +// --------------------------------------------------------- +// +TKeyResponse CSmscContainer2::OfferKeyEventL( + const TKeyEvent& aKeyEvent, TEventCode aType) + { + if (iEdwin) + { + if (aType == EEventKey) + { + if (aKeyEvent.iCode == EKeyDownArrow) + { + //iEdwin->MoveCursorL(TCursorPosition::EFPageDown, EFalse); + // Attempt to correct the scroller behaviour (doesn't really work) + //if(iEdwin->CursorPos() > iEdwin->Text()->Read(0).Length() - 50) + iEdwin->SetCursorPosL(iEdwin->Text()->Read(0).Length()-1, EFalse); + return EKeyWasConsumed; + } + if (aKeyEvent.iCode == EKeyUpArrow) + { + //iEdwin->MoveCursorL(TCursorPosition::EFPageUp, EFalse); + // Attempt to correct the scroller behaviour (doesn't really work) + //if(iEdwin->CursorPos() < 50) + iEdwin->SetCursorPosL(0, EFalse); + return EKeyWasConsumed; + } + } + } + return EKeyWasNotConsumed; + } + +// --------------------------------------------------------- +// CSmscContainer2::HandleControlEventL( +// CCoeControl* aControl,TCoeEvent aEventType) +// --------------------------------------------------------- +// +void CSmscContainer2::HandleControlEventL( + CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) + { + // No need to add any control event handler code here + } + +// End of File diff --git a/src/SmscDocument.cpp b/src/SmscDocument.cpp new file mode 100644 index 0000000..1df4c53 --- /dev/null +++ b/src/SmscDocument.cpp @@ -0,0 +1,57 @@ +/* +* ============================================================================ +* Name : CSmscDocument from SmscDocument.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Implementation notes: +* This class is just a placeholder. +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// INCLUDE FILES +#include "SmscDocument.h" +#include "SmscAppUi.h" + +// ================= MEMBER FUNCTIONS ======================= + +// constructor +CSmscDocument::CSmscDocument(CEikApplication& aApp) +: CAknDocument(aApp) + { + } + +// destructor +CSmscDocument::~CSmscDocument() + { + } + +// EPOC default constructor can leave. +void CSmscDocument::ConstructL() + { + } + +// Two-phased constructor. +CSmscDocument* CSmscDocument::NewL( + CEikApplication& aApp) // CSmscApp reference + { + CSmscDocument* self = new (ELeave) CSmscDocument( aApp ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop(); + + return self; + } + +// ---------------------------------------------------- +// CSmscDocument::CreateAppUiL() +// constructs CSmscAppUi +// ---------------------------------------------------- +// +CEikAppUi* CSmscDocument::CreateAppUiL() + { + return new (ELeave) CSmscAppUi; + } + +// End of File diff --git a/src/SmscView.cpp b/src/SmscView.cpp new file mode 100644 index 0000000..36e90fe --- /dev/null +++ b/src/SmscView.cpp @@ -0,0 +1,130 @@ +/* +* ============================================================================ +* Name : CSmscView from SmscView.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Implementation notes: +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// INCLUDE FILES +#include "SmscView.h" +#include "SmscContainer.h" +#include +#include +#include + + +// ================= MEMBER FUNCTIONS ======================= + +// --------------------------------------------------------- +// CSmscView::ConstructL(const TRect& aRect) +// EPOC two-phased constructor +// --------------------------------------------------------- +// +void CSmscView::ConstructL() + { + BaseConstructL( R_SMSC_VIEW1 ); + } + +// --------------------------------------------------------- +// CSmscView::~CSmscView() +// ?implementation_description +// --------------------------------------------------------- +// +CSmscView::~CSmscView() + { + if ( iContainer ) + { + AppUi()->RemoveFromViewStack( *this, iContainer ); + } + + delete iContainer; + } + +// --------------------------------------------------------- +// TUid CSmscView::Id() +// ?implementation_description +// --------------------------------------------------------- +// +TUid CSmscView::Id() const + { + return KViewId; + } + +// --------------------------------------------------------- +// CSmscView::HandleCommandL(TInt aCommand) +// ?implementation_description +// --------------------------------------------------------- +// +void CSmscView::HandleCommandL(TInt aCommand) + { + switch ( aCommand ) + { + case RefreshGrid: + iContainer->RefreshListL(); + break; + case ClearGrid: + iContainer->ClearListL(); + break; + case ShowDetails: + { + iContainer->ShowDetailsL(); + break; + } + default: + AppUi()->HandleCommandL( aCommand ); + break; + } + } + +// --------------------------------------------------------- +// CSmscView::HandleClientRectChange() +// --------------------------------------------------------- +// +void CSmscView::HandleClientRectChange() + { + if ( iContainer ) + { + iContainer->SetRect( ClientRect() ); + } + } + +// --------------------------------------------------------- +// CSmscView::DoActivateL(...) +// ?implementation_description +// --------------------------------------------------------- +// +void CSmscView::DoActivateL( + const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/, + const TDesC8& /*aCustomMessage*/) + { + if (!iContainer) + { + iContainer = new (ELeave) CSmscContainer(this); + iContainer->SetMopParent(this); + iContainer->ConstructL( ClientRect() ); + AppUi()->AddToStackL( *this, iContainer ); + } + } + +// --------------------------------------------------------- +// CSmscView::HandleCommandL(TInt aCommand) +// ?implementation_description +// --------------------------------------------------------- +// +void CSmscView::DoDeactivate() + { + if ( iContainer ) + { + AppUi()->RemoveFromViewStack( *this, iContainer ); + } + + delete iContainer; + iContainer = NULL; + } + +// End of File + diff --git a/src/SmscView2.cpp b/src/SmscView2.cpp new file mode 100644 index 0000000..353e628 --- /dev/null +++ b/src/SmscView2.cpp @@ -0,0 +1,114 @@ +/* +* ============================================================================ +* Name : CSmscView2 from SmscView2.h +* Part of : Smsc +* Created : 30/7/2003 by Makidis Michael +* Implementation notes: +* Initial content was generated by Series 60 AppWizard. +* Copyright: Makidis Michael 2003-2004 +* ============================================================================ +*/ + +// INCLUDE FILES +#include "SmscView2.h" +#include "SmscContainer2.h" +#include "Smsc.hrh" +#include +#include +#include + +// ================= MEMBER FUNCTIONS ======================= + +// --------------------------------------------------------- +// CSmscView2::ConstructL(const TRect& aRect) +// EPOC two-phased constructor +// --------------------------------------------------------- +// +void CSmscView2::ConstructL() + { + BaseConstructL( R_SMSC_VIEW2 ); + } + +// --------------------------------------------------------- +// CSmscView2::~CSmscView2() +// ?implementation_description +// --------------------------------------------------------- +// +CSmscView2::~CSmscView2() + { + if ( iContainer ) + { + AppUi()->RemoveFromViewStack( *this, iContainer ); + } + + delete iContainer; + } + +// --------------------------------------------------------- +// TUid CSmscView2::Id() +// ?implementation_description +// --------------------------------------------------------- +// +TUid CSmscView2::Id() const + { + return KView2Id; + } + +// --------------------------------------------------------- +// CSmscView2::HandleCommandL(TInt aCommand) +// ?implementation_description +// --------------------------------------------------------- +// +void CSmscView2::HandleCommandL(TInt aCommand) + { + AppUi()->HandleCommandL( aCommand ); + } + +// --------------------------------------------------------- +// CSmscView2::HandleClientRectChange() +// --------------------------------------------------------- +// +void CSmscView2::HandleClientRectChange() + { + if ( iContainer ) + { + iContainer->SetRect( ClientRect() ); + } + } + +// --------------------------------------------------------- +// CSmscView2::DoActivateL(...) +// ?implementation_description +// --------------------------------------------------------- +// +void CSmscView2::DoActivateL( + const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/, + const TDesC8& /*aCustomMessage*/) + { + if (!iContainer) + { + iContainer = new (ELeave) CSmscContainer2; + iContainer->SetMopParent(this); + iContainer->ConstructL( ClientRect() ); + AppUi()->AddToStackL( *this, iContainer ); + } + } + +// --------------------------------------------------------- +// CSmscView2::HandleCommandL(TInt aCommand) +// ?implementation_description +// --------------------------------------------------------- +// +void CSmscView2::DoDeactivate() + { + if ( iContainer ) + { + AppUi()->RemoveFromViewStack( *this, iContainer ); + } + + delete iContainer; + iContainer = NULL; + } + +// End of File +