phonebookui/Speeddial/inc/SpdiaView.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:     Declares view for application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef SPDIALVIEW_H
       
    24 #define SPDIALVIEW_H
       
    25 
       
    26 // INCLUDES
       
    27 #include <aknview.h>
       
    28 
       
    29         #include <sendui.h>
       
    30 
       
    31 
       
    32 
       
    33 #include <aiwdialdataext.h>
       
    34 
       
    35 
       
    36 #include <AiwServiceHandler.h>      //For Application InterWorking
       
    37 
       
    38 #include "SpdiaBaseView.h"
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 class CEikImage;
       
    42 class CSpdiaContainer;
       
    43 
       
    44 
       
    45 // CLASS DECLARATION
       
    46 
       
    47 /**
       
    48 *  Speed dial Application view class. Provides some common application 
       
    49 *  view functionality. 
       
    50 * 
       
    51 *  @since 
       
    52 */
       
    53 class CSpdiaView : public CSpdiaBaseView,public MAiwNotifyCallback
       
    54     {
       
    55     public: // Constructors and destructor
       
    56 
       
    57         /**
       
    58         * Symbian OS two-phased constructor
       
    59         * @return GS connection view.
       
    60         */
       
    61         static CSpdiaView* NewLC(CSpeedDialPrivate* aSpeedPrivate);
       
    62 
       
    63         /**
       
    64         * Destructor.
       
    65         */
       
    66         virtual ~CSpdiaView();
       
    67 
       
    68     public: // New functions
       
    69         /**
       
    70         * The CBA is set to menu from resourceID
       
    71         * @param aResourceID
       
    72         */
       
    73         void LoadCba(TInt aResourceID);
       
    74 
       
    75         /**
       
    76         * Performs the call operation on EspdiaCmdNumberCall event.
       
    77         * @param aNumber        A phone number.
       
    78         * @param aNumberType    Type of the number.
       
    79         * @param aVmbxNumber    Boolean indicating whether this is vmbx number.
       
    80         */
       
    81         void NumberCallL( const TDesC& aNumber, TInt& aNumberType, 
       
    82             TBool aVmbxNumber = EFalse );
       
    83         
       
    84         /* Set iSpeedPrivate
       
    85         * Only invoked by CSpdiaAppUi::~CSpdiaAppUi()
       
    86         * @param aSpeedPrivate
       
    87         */
       
    88         void SetSpeedPrivate(CSpeedDialPrivate* aSpeedPrivate);
       
    89         
       
    90           
       
    91         /**
       
    92         * Sets the cba buttons for middle softkey
       
    93         * @param Resource id
       
    94         */
       
    95         void SetCba(TInt aResourceId);
       
    96 
       
    97 
       
    98     public: // Functions from base classes
       
    99         /**
       
   100         * Returns this view's id.
       
   101         */
       
   102         TUid Id() const;
       
   103 
       
   104         /**
       
   105         * Processes Speed Dial View's commands.
       
   106         */ 
       
   107         void HandleCommandL(TInt aCommand);
       
   108 
       
   109         /**
       
   110         * Called by the view framework when the client rectangle of this 
       
   111         * view changes.
       
   112         */
       
   113         void HandleClientRectChange();
       
   114         
       
   115         /** 
       
   116         * Event handler for status pane size changes.
       
   117         */
       
   118         void HandleStatusPaneSizeChange();
       
   119 
       
   120         /**
       
   121         * Command handler: Assigns number to, or changes number in a dial 
       
   122         * grid entry.
       
   123         */
       
   124         TBool CmdAssignNumberL();
       
   125 
       
   126         /**
       
   127         * Default constructor.
       
   128         */
       
   129         void ConstructL(CSpeedDialPrivate* aSpeedPrivate);
       
   130 
       
   131     private:
       
   132 
       
   133         /**
       
   134         * Called by the view framework when this view is activated
       
   135         */
       
   136         void DoActivateL(const TVwsViewId& aPrevViewId, 
       
   137                 TUid aCustomMessageId, const TDesC8& aCustomMessage);
       
   138 
       
   139         /**
       
   140         * Called by the view framework when this view is deactivated.
       
   141         */
       
   142         void DoDeactivate();
       
   143 
       
   144         /**
       
   145         * From MEikMenuObserver, foreground event handler
       
   146         */
       
   147         void HandleForegroundEventL(TBool aForeground);
       
   148 
       
   149         /** 
       
   150         * From MEikMenuObserver, Delete meaningless menu item.  
       
   151         * @param aResourceId : resource ID of menu pane
       
   152         * @param aMenuPane : Pointer of menu pane object
       
   153         */
       
   154         void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   155 
       
   156         /**
       
   157          * Initialisation of CallUI menupane (AIW) 
       
   158          * 
       
   159          * @param aResourceId   As in DynInitMenuPaneL
       
   160          * @param aMenuPane     As in DynInitMenuPaneL
       
   161          * @param aVideo,       ETrue: video call selectable, EFalse: voice call only
       
   162          */
       
   163         void DynInitAiwMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane, TBool aVideo );
       
   164 
       
   165 
       
   166 
       
   167    public:  // Command handlers
       
   168         /**
       
   169         *  Command handler: Performs call using AIW
       
   170         *  @param  aCommandId Command to execute
       
   171         *  @param  aShowQuery False, if we are ececuting call based on Logs 
       
   172         *                     menu option. True, if we want the CallUI itself to
       
   173         *                     display a query to user and then act accordingly.
       
   174         */
       
   175         void CmdNumberCallL( TInt aCommandId, TBool aShowQuery );
       
   176         
       
   177        /**
       
   178         *  Command handler: Performs call using AIW
       
   179         *  @return  ETrue if is lanuched from general settings
       
   180         */
       
   181         TBool IsSettingType( );
       
   182         
       
   183         /**
       
   184          *  If msg dialog is showng.
       
   185          *  @return  ETrue if msg dialog is showng.
       
   186          */
       
   187         TBool IsShowMsgDlg();
       
   188         
       
   189         /**
       
   190          *  If Vmbx dialog is showng.
       
   191          *  @return  ETrue if msg dialog is showng.
       
   192          */
       
   193         TBool IsShowVmbxDlg();
       
   194         
       
   195         /* Get the iAssignCompletedFlag 
       
   196         * @return iAssignCompletedFlag 
       
   197         */
       
   198         TBool IsAssignCompleted();
       
   199         
       
   200         /* Check whether there has been a focus when clicking MSK 
       
   201         * @return ETrue for focus exists, or EFalse 
       
   202         */
       
   203         TBool IsFocused();
       
   204    private:
       
   205         /**
       
   206         * pop up the enable speeddial dialog.
       
   207         *
       
   208         * @return  the keyid which key pressed. 
       
   209         */
       
   210         TInt PopUpEnableSpDiaDlgL( );
       
   211 
       
   212         /**
       
   213         * Call function. Performs call using AIW
       
   214         *  @param  aCommandId Command to execute
       
   215         *  @param  aShowQuery False, if we are ececuting call based on Logs 
       
   216         *                     menu option. True, if we want the CallUI itself to
       
   217         *                     display a query to user and then act accordingly.
       
   218         *  @param  aNumber    Number to make call to
       
   219         *  @param  aCallType  Default calltype (However CallUI can change this) 
       
   220         */
       
   221         void CmdNumberCallL ( TInt aCommandId,
       
   222                               TBool aShowQuery, 
       
   223                               TPtrC aNumber, 
       
   224 							  CAiwDialData::TCallType aCallType);		
       
   225 
       
   226         /**
       
   227         * Command handler: Release
       
   228         */
       
   229         void CmdReleaseNumberL();
       
   230 
       
   231         /**
       
   232         * Command handler: ViewNumber
       
   233         */
       
   234         void CmdViewNumberL();
       
   235 
       
   236 
       
   237     	void CmdSendMessageL();
       
   238 
       
   239     private: // functions
       
   240         /**
       
   241         * Undo layout and user leave.
       
   242         */
       
   243         void UndoLayoutAndLeaveL(TInt aError, TBool aUpdateSp = ETrue);
       
   244 
       
   245         /**
       
   246         * Make the container to be invisible.
       
   247         *
       
   248         * @param aContainer CSpdiaContainer object
       
   249         * @return FALSE
       
   250         */
       
   251         static TInt MakeInvisibleCallBack(TAny *aContainer);
       
   252   	    /*
       
   253   		  * MAiwNotifyCallback APIs
       
   254   		  */
       
   255         TInt HandleNotifyL(
       
   256  		        TInt aCmdId,
       
   257  		        TInt aEventId,
       
   258  		        CAiwGenericParamList& aEventParamList,
       
   259  		        const CAiwGenericParamList& aInParamList);
       
   260          /**
       
   261          * ProcessCommandL
       
   262          */
       
   263          void ProcessCommandL(TInt aCommand);
       
   264     private: // Data
       
   265         CSpdiaContainer* iContainer;            // owned by this
       
   266         CSpeedDialPrivate* iSpeedPrivate;		//owned by application
       
   267         TInt iCbaID;
       
   268         CAiwServiceHandler* iServiceHandler;    /// Own: AIW
       
   269         TBool iClientRectChanged;
       
   270 		/// Own: AIW
       
   271 		TBool iSkinChange;// for build ver 2.6
       
   272 		TBool iReleasenumberFlag;
       
   273 
       
   274 		CSendUi* iSendUi;
       
   275 
       
   276 		TBool iAssignNumberFlag;
       
   277 		TInt vmbxsupported;
       
   278 		TBool iIsShowMsgDlg;
       
   279 		TBool iIsShowVmbxDlg;
       
   280 		TBool iAIWRunFlag;
       
   281 		TBool iAssignCompletedFlag;
       
   282     };
       
   283 
       
   284 #endif        // SPDIALVIEW_H
       
   285 
       
   286 // End of File