phonebookui/Phonebook2/USIMExtension/inc/CPsu2FixedDialingInfoView.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Phonebook 2 USIM UI Extension FDN contact info view.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPSU2FIXEDDIALINGINFOVIEW_H
       
    20 #define CPSU2FIXEDDIALINGINFOVIEW_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "CPsu2InfoViewBase.h"
       
    24 #include <MVPbkSingleContactOperationObserver.h>
       
    25 #include <MPbk2EditedContactObserver.h>
       
    26 #include <MVPbkContactObserver.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CPsu2FixedDialingCall;
       
    30 class MVPbkContactLink;
       
    31 class MVPbkStoreContactField;
       
    32 class MVPbkStoreContact;
       
    33 class MPbk2DialogEliminator;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  * Phonebook 2 USIM UI Extension FDN contact info view.
       
    39  * Responsible for implementing FDN info view.
       
    40  */
       
    41 class CPsu2FixedDialingInfoView : public CPsu2InfoViewBase,
       
    42                                   public MVPbkSingleContactOperationObserver,
       
    43                                   public MVPbkContactObserver,
       
    44                                   public MPbk2EditedContactObserver
       
    45     {
       
    46     public:  // Constructors and destructor
       
    47 
       
    48         /**
       
    49          * Creates a new instance of this class.
       
    50          *
       
    51          * @param aExtensionView    The view from the extension framework.
       
    52          * @param aViewManager      View manager.
       
    53          * @return  A new instance of this class.
       
    54          */
       
    55         static CPsu2FixedDialingInfoView* NewL(
       
    56                 CPbk2UIExtensionView& aExtensionView,
       
    57                 CPsu2ViewManager& aViewManager );
       
    58 
       
    59         /**
       
    60          * Destructor.
       
    61          */
       
    62         ~CPsu2FixedDialingInfoView();
       
    63 
       
    64     public: // From MPbk2UIExtensionView
       
    65         void DoActivateL(
       
    66                 const TVwsViewId& aPrevViewId,
       
    67                 TUid aCustomMessageId,
       
    68                 const TDesC8& aCustomMessage );
       
    69         void DoDeactivate();
       
    70 
       
    71     public: // From MPbk2ControlObserver
       
    72         void HandleControlEventL(
       
    73             MPbk2ContactUiControl& aControl,
       
    74             const TPbk2ControlEvent& aEvent );
       
    75     private: // From MPbk2UIExtensionView
       
    76         TBool HandleCommandKeyL(
       
    77                 const TKeyEvent& aKeyEvent,
       
    78                 TEventCode aType );
       
    79         void HandleCommandL(
       
    80                 TInt aCommand );
       
    81         void DynInitMenuPaneL(
       
    82                 TInt aResourceId,
       
    83                 CEikMenuPane* aMenuPane );
       
    84 
       
    85     private: // From CPsu2InfoViewBase
       
    86         TInt NameListControlResourceId() const;
       
    87         HBufC* NaviPaneLabelL() const;
       
    88         void UpdateCbasL();
       
    89         
       
    90     private: // From MVPbkSingleContactOperationObserver
       
    91         void VPbkSingleContactOperationComplete(
       
    92                 MVPbkContactOperationBase& aOperation,
       
    93                 MVPbkStoreContact* aContact );
       
    94         void VPbkSingleContactOperationFailed(
       
    95                 MVPbkContactOperationBase& aOperation, 
       
    96                 TInt aError );                
       
    97     
       
    98     private: // From MPbk2EditedContactObserver
       
    99         void ContactEditingComplete(
       
   100                 MVPbkStoreContact* aEditedContact );
       
   101         void ContactEditingDeletedContact(
       
   102                 MVPbkStoreContact* aEditedContact );
       
   103         void ContactEditingAborted();
       
   104         
       
   105     private: // From MVPbkContactObserver        
       
   106         void ContactOperationCompleted(TContactOpResult aResult);
       
   107         void ContactOperationFailed(
       
   108                 TContactOp aOpCode, 
       
   109                 TInt aErrorCode, 
       
   110                 TBool aErrorNotified );
       
   111                 
       
   112     private: // Implementation
       
   113         CPsu2FixedDialingInfoView(
       
   114                 CPbk2UIExtensionView& aExtensionView,
       
   115                 CPsu2ViewManager& aViewManager );
       
   116         void ConstructL();
       
   117         void CreateCallL(
       
   118                 TInt aCommand );
       
   119         void EditFdnContactL();
       
   120         MVPbkStoreContactField* FocusedFieldLC( 
       
   121             MVPbkStoreContact& aStoreContact );
       
   122 
       
   123     private: // Data
       
   124         /// Own: FDN calling support
       
   125         CPsu2FixedDialingCall* iFdnCall;
       
   126         /// Own: Link to contact to edit
       
   127         MVPbkContactLink* iContactLink;
       
   128         /// Own: The store contact to edit
       
   129         MVPbkStoreContact* iContact;
       
   130         /// Own: An operation to get a contact from the link
       
   131         MVPbkContactOperationBase* iContactRetriever;
       
   132         /// Ref: Eliminator of current contact editing dialog
       
   133         MPbk2DialogEliminator* iDlgEliminator;
       
   134     };
       
   135 
       
   136 #endif // CPSU2FIXEDDIALINGINFOVIEW_H
       
   137 
       
   138 // End of File