S60 3rd Edition SDK for Symbian OS
Example Applications Guide

IsvTelInfoAppDlg.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : IsvTelInfoAppDlg.h
00004 *  Part of     : IsvTelInfoApp
00005 *  Interface   : 
00006 *  Description : A class representing a Multi page Avkon dialog
00007 *  Version     : 
00008 *
00009 *  Copyright (c) 2005-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 #ifndef ISVTELINFOAPPDLG_H
00017 #define ISVTELINFOAPPDLG_H
00018 
00019 // INCLUDES
00020 #include <aknform.h>
00021 #include <eikappui.h>
00022 #include "IsvTelInfoApp.hrh"
00023 #include "IsvTelInfoAppTelephonyNotify.h"
00024 #include "IsvTelInfoAppTelephony.h"
00025 
00026 //FOWARD DECLARATIONS
00027 class CIsvTelInfoAppContainer;
00028 
00029 // CONSTANTS
00030 const TInt KDefaultAutomationCount = 1;
00031 const TInt KMaxUILogFileName = 200;
00032 
00033 class CIsvTelInfoAppAutomationActive;
00034 
00035 // CLASS DEFINITIONS
00036 /**
00037 * CIsvTelInfoAppDlg: A dialog class derived from CAknForm representing a
00038 * Multi-page UI dialog
00039 * It implments the MIsvTelInfoAppTelephonyNotify interface
00040 */
00041 class CIsvTelInfoAppDlg : public CAknForm, 
00042                            public MIsvTelInfoAppTelephonyNotify
00043     {
00044     public:  // Constructor and destructor  
00045         /**
00046         * Two-phased constructor.
00047         */
00048         static CIsvTelInfoAppDlg* NewL();
00049 
00050         /**
00051         * Destructor.
00052         */
00053         virtual ~CIsvTelInfoAppDlg();
00054 
00055     public: // From CAknForm
00056         /**
00057         * Overrides the ExecuteLD from CAknForm.
00058         * Inturn calls the ExecuteLD of the base class. It adds the
00059         * functionality of setting the Title of the page on the status
00060         * pane.
00061         * @param aResourceId: Id of the form resource
00062         * @return Return value of the base class ExecuteLD
00063         */
00064         TInt ExecuteLD( TInt aResourceId ); 
00065 
00066         /**
00067         * An over-riding routine that captures the Green dial key and the 
00068         * Red hang-up key from the key-pad when they are pressed with the 
00069         * focus being present on the Phone-numbers in the dialog screen.
00070          * For other keys, it calls the base-class routine for handling.
00071          * @param aKeyEvent The key event.
00072         * @param aType The type of key event.
00073         * @return Indicates whether or not the key event was used by 
00074         * this control.
00075         */
00076         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
00077             TEventCode aType );
00078         
00079         /**
00080         * Different controls/dialog items/pages on the multi-page dialog 
00081         * require their own context sensitive menus to be able to choose 
00082         * only the applicable operations on the item. For this purpose, 
00083         * this function, loads menu panes that are appropriate and
00084         * applicable for the respective menu items.
00085         * @param aResourceId Resource ID identifying the menu pane to 
00086         * initialise.
00087         * @param aMenuPane The in-memory representation of the menu pane.
00088         */
00089         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
00090         
00091         /**
00092         * An over-riding function that handles all commands loaded by the
00093         * DynInitMenuPaneL. For the remaining commands like Edit & Save, 
00094         * it invokes the base class routine.
00095         * aCommandId ID of the command to respond to. 
00096         */
00097         virtual void ProcessCommandL( TInt aCommandId );
00098         
00099         /**
00100         * Derived from base-class. It invokes the base-class function and 
00101         * after the page switch is executed, it sets the appropriate title
00102         * for the page.
00103         * @param aPageId The page ID.
00104         */
00105         void PageChangedL( TInt aPageId );
00106 
00107     public: //New Functions
00108 
00109         /**
00110         * Sets page on the dialog
00111         * @param aPageId. The control Id of the page
00112         */
00113         void SetDlgPage(TInt aPageId);
00114 
00115         /**
00116         * Sets title to the status pane.
00117         * @param aTitlePane. This object contains Title Name.
00118         */
00119         void SetTitlePane(CAknTitlePane* aTitlePane);
00120 
00121         /**
00122         * Sets the container control.
00123         * @param aContainer. This object specifies container of type 
00124         * CIsvTelInfoAppContainer
00125         */
00126         void SetContainer(CIsvTelInfoAppContainer* aContainer);
00127 
00128         /**
00129         * Sets title of specified page to the status pane.
00130         * @param aPageId. specifes which page
00131         */
00132         void SetPageTitleOnPaneL(TInt aPageId);
00133 
00134         /**
00135         * Sets title of Application to the status pane.
00136         */
00137         void SetMainPageTitleOnPaneL();
00138 
00139    public:
00140        /** 
00141         * Gets invoked once command completion notification from GetPhoneId 
00142         * ETel ISV API is received.
00143         * @param aStatus, specifies SUCCESS or Error Code
00144         * @param aPhoneId Contains mobile phone identity.
00145         * @param aErrMsg, contains the error message returned by ETel ISV API
00146         */
00147         void GetPhoneIdApiCompleteL(TInt aStatus, 
00148             CTelephony::TPhoneIdV1 aPhoneId, TDesC16& aErrMsg);
00149         
00150        /** 
00151         * Gets invoked once command completion notification from 
00152         * GetSubscriberId ETel ISV API is received.
00153         * @param aStatus, specifies SUCCESS or Error Code
00154         * @param aSubscriberId Contains Subscriber Id
00155         * @param aErrMsg, contains the error message returned by ETel ISV API
00156         */
00157         void GetSubscriberIdApiCompleteL(TInt aStatus, 
00158             CTelephony::TSubscriberIdV1 aSubscriberId, TDesC16& aErrMsg);
00159         
00160        /** 
00161         * Gets invoked once command completion notification from 
00162         * GetNwRegistrationStatus ETel ISV API is received.
00163         * @param aStatus, specifies SUCCESS or Error Code
00164         * @param aNwRegistrationStatus Contains current network 
00165         * registration status.
00166         * @param aErrMsg, contains the error message returned by ETel ISV API
00167         */
00168         void GetNwRegistrationStatusApiCompleteL(TInt aStatus, 
00169             CTelephony::TNetworkRegistrationV1 aNwRegistrationStatus, 
00170             TDesC16& aErrMsg);
00171         
00172        /** 
00173         * Gets invoked once command completion notification from 
00174         * GetBarringStatus ETel ISV API is received.
00175         * @param aStatus, specifies SUCCESS or Error Code
00176         * @param CTelephony::TCallBarringCondition aBarringCondition,
00177         * contains barring condition   
00178         * @param aCallBarringServices Contains information about the 
00179         * call barring service. 
00180         * @param aErrMsg, contains the error message returned by ETel ISV API
00181         */
00182         void GetBarringStatusApiCompleteL( TInt aStatus,
00183             CTelephony::TCallBarringCondition aBarringCondition, 
00184             CTelephony::TCallBarringSupplServicesV1 aCallBarringServices,
00185             TDesC16& aErrMsg );     
00186                                         
00187        /** 
00188         * Gets invoked once command completion notification from 
00189         * GetWaitingStatus ETel ISV API is received.
00190         * @param aStatus, specifies SUCCESS or Error Code
00191         * @param aCallWaitingServices Contains information about the 
00192         * call waiting service.
00193         * @param aErrMsg, contains the error message returned by ETel ISV API
00194         */
00195         void GetWaitingStatusApiCompleteL( TInt aStatus, 
00196             CTelephony::TCallWaitingSupplServicesV1 aCallWaitingServices,
00197             TDesC16& aErrMsg );
00198         
00199        /** 
00200         * Gets invoked once command completion notification from 
00201         * GetIdentityServiceStatus ETel ISV API is received.
00202         * @param aStatus, specifies SUCCESS or Error Code
00203         * @param CTelephony::TIdentityService aIdentityServiceType,
00204         * contains identity serivce type        
00205         * @param aIdentityService Conatins call identity service status.
00206         * @param aErrMsg, contains the error message returned by ETel ISV API
00207         */
00208         void GetIdentityServiceStatusApiCompleteL( TInt aStatus, 
00209             CTelephony::TIdentityService aIdentityServiceType, 
00210             CTelephony::TIdentityServiceV1 aIdentityService,
00211             TDesC16& aErrMsg );         
00212 
00213      private:  // Constructor
00214         /**
00215         * Default constructor.
00216         */
00217         CIsvTelInfoAppDlg();
00218 
00219         /**
00220         * Second-phase constructor.
00221         */
00222         void ConstructL();
00223     
00224         /**
00225         * Default Initialiser
00226         */
00227         void DefaultInitialiseMembers();
00228 
00229     private:  // Functions from base class
00230         /**
00231         * From CEikDialog 
00232         * Set default field value to member data.
00233         */
00234         void PostLayoutDynInitL();
00235 
00236         /**
00237          * Loads strings from resource
00238          */
00239         void LoadStringsFromResource( );
00240         
00241     private:
00242         //Have a handle to the title pane. This will be initialised
00243         //by the container calls before displaying the form
00244         CAknTitlePane* iTitlePane;
00245         CIsvTelInfoAppContainer* iContainer;
00246 
00247         //A form to store persistent information
00248         CIsvTelInfoAppDlg* iStoreForm;
00249 
00250         //Is it a StoreForm or a running form
00251         TBool iIsStoreForm;
00252 
00253         //Start page Id
00254         TInt iPageId;
00255 
00256        //Edit/View mode
00257         TBool iIsInEditMode;
00258 
00259         // Pointer to CIsvTelInfoAppTelephony
00260         // Class and those gets instantiated at second phase construction
00261         CIsvTelInfoAppTelephony* iTelephony;
00262         
00263         //General Error string
00264         TBuf8<KMaxCmdSize> iErrString;
00265         //General Success string
00266         TBuf8<KMaxCmdSize> iSuccessString;
00267         
00268         //Contains network registration strings loaded from resource
00269         TBuf8<KMaxCmdSize> iNwRegUnknown;
00270         TBuf8<KMaxCmdSize> iNwRegNoRegNoSrvc;
00271         TBuf8<KMaxCmdSize> iNwRegNoRegEmergSrvc;
00272         TBuf8<KMaxCmdSize> iNwRegNoRegSearching;
00273         TBuf8<KMaxCmdSize> iNwRegBusy;
00274         TBuf8<KMaxCmdSize> iNwRegHome;
00275         TBuf8<KMaxCmdSize> iNwRegDenied;
00276         TBuf8<KMaxCmdSize> iNwRegRoaming;
00277         
00278         //Contains barring status strings loaded from resource
00279         TBuf8<KMaxCmdSize> iBarStatusActive;
00280         TBuf8<KMaxCmdSize> iBarStatusNotActive;
00281         TBuf8<KMaxCmdSize> iBarStatusNotProvisioned;
00282         TBuf8<KMaxCmdSize> iBarStatusNotAvailable;
00283         TBuf8<KMaxCmdSize> iBarStatusUnknown;
00284         
00285         //Contains waiting status strings loaded from resource
00286         
00287         TBuf8<KMaxCmdSize> iWaitStatusActive;
00288         TBuf8<KMaxCmdSize> iWaitStatusNotActive;
00289         TBuf8<KMaxCmdSize> iWaitStatusNotProvisioned;
00290         TBuf8<KMaxCmdSize> iWaitStatusNotAvailable;
00291         TBuf8<KMaxCmdSize> iWaitStatusUnknown;
00292         
00293         //Contains identity service strings loaded from resource
00294         
00295         TBuf8<KMaxCmdSize> iIdStatusActivePerm;
00296         TBuf8<KMaxCmdSize> iIdStatusDefaultRestricted;
00297         TBuf8<KMaxCmdSize> iIdStatusDefaultAllowed;
00298         TBuf8<KMaxCmdSize> iIdStatusNotProvisioned;
00299         TBuf8<KMaxCmdSize> iIdStatusUnknown;
00300             
00301         //General Status Menu
00302         TBuf<EIsvTelInfoAppEdwinMaxLength> iEdwinPhoneMfr;
00303         TBuf<EIsvTelInfoAppEdwinMaxLength> iEdwinPhoneModel;
00304         TBuf<EIsvTelInfoAppEdwinMaxLength> iEdwinPhoneSerNum;
00305         TBuf<EIsvTelInfoAppEdwinMaxLength> iEdwinSubscriberId;
00306 
00307         TBuf<EIsvTelInfoAppEdwinMaxLength> iEdwinBarringStatus;
00308         TBuf<EIsvTelInfoAppEdwinMaxLength> iEdwinBarringCondition;
00309         TBuf<EIsvTelInfoAppEdwinMaxLength> iEdwinWaiting;
00310         TBuf<EIsvTelInfoAppEdwinMaxLength> iEdwinIdentity;
00311         TBuf<EIsvTelInfoAppEdwinMaxLength> iEdwinNwRegistration;
00312 
00313    };
00314    
00315 #endif  // ISVTELINFOAPPDLG_H
00316 
00317 // End of File

© Nokia 2006

Back to top