phonebookui/Phonebook2/UIControls/inc/CPbk2FetchDlgPage.h
changeset 0 e686773b3f54
child 14 81f8547efd4f
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 fetch dialog page.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2FETCHDLGPAGE_H
       
    20 #define CPBK2FETCHDLGPAGE_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "MPbk2FetchDlgPage.h"
       
    25 #include "MPbk2ControlObserver.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CPbk2NamesListControl;
       
    29 class MPbk2FetchDlg;
       
    30 class MVPbkContactViewBase;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * Phonebook 2 fetch dialog page.
       
    36  * Responsible for presenting and managing a single fetch page.
       
    37  */
       
    38 NONSHARABLE_CLASS(CPbk2FetchDlgPage) : public CBase,
       
    39                                        public MPbk2FetchDlgPage,
       
    40                                        private MPbk2ControlObserver
       
    41     {
       
    42     public: // Constructors and destructor
       
    43 
       
    44         /**
       
    45          * Creates a new instance of this class.
       
    46          *
       
    47          * @param aParentDlg        Parent dialog.
       
    48          * @param aControlId        Id of the control.
       
    49          * @return  A new instance of this class.
       
    50          */
       
    51         static CPbk2FetchDlgPage* NewL(
       
    52                 MPbk2FetchDlg& aParentDlg,
       
    53                 TInt aControlId );
       
    54 
       
    55         /**
       
    56          * Destructor
       
    57          */
       
    58         ~CPbk2FetchDlgPage();
       
    59 
       
    60     public: // From MPbk2FetchDlgPage
       
    61         TInt FetchDlgPageId() const;
       
    62         void ActivateFetchDlgPageL();
       
    63         void DeactivateFetchDlgPage();
       
    64         const MVPbkBaseContact* FocusedContactL() const;
       
    65         MPbk2ContactUiControl& Control() const;
       
    66         MVPbkContactViewBase& View() const;
       
    67         void SetViewL(
       
    68                 MVPbkContactViewBase& aView );
       
    69         TBool DlgPageReady() const;
       
    70         TBool DlgPageEmpty() const;
       
    71         void SelectContactL(
       
    72                 const MVPbkContactLink& aLink,
       
    73                 TBool aSelected );
       
    74         void HandleResourceChange(
       
    75                 TInt aType );
       
    76 
       
    77     private: // From MPbk2ControlObserver
       
    78         void HandleControlEventL(
       
    79                 MPbk2ContactUiControl& aControl,
       
    80                 const TPbk2ControlEvent& aEvent );
       
    81 
       
    82     private: // Implementation
       
    83         CPbk2FetchDlgPage(
       
    84                 MPbk2FetchDlg& aFetchDlg,
       
    85                 TInt aControlId );
       
    86         void ConstructL();
       
    87         void HandleContactSelectionL(
       
    88                 const MVPbkBaseContact* aContact,
       
    89                 TInt aIndex,
       
    90                 TBool aSelected );
       
    91         void SetPagesReadyStateL(
       
    92                 TBool aReadyState );
       
    93         void UpdateListEmptyTextL(
       
    94                 TInt aListState );
       
    95         HBufC* ListEmptyTextLC(
       
    96                 TInt aListState );
       
    97 
       
    98     protected: // Data
       
    99         /// Ref: Parent dialog of this page
       
   100         MPbk2FetchDlg& iParentDlg;
       
   101         /// Ref: Names list control
       
   102         CPbk2NamesListControl* iControl;
       
   103         /// Ref: Contact view
       
   104         MVPbkContactViewBase* iContactView;
       
   105         /// Own: Control id
       
   106         TInt iControlId;
       
   107         /// Own: Flag indicating is the control ready
       
   108         TBool iIsReady;
       
   109     };
       
   110 
       
   111 #endif // CPBK2FETCHDLGPAGE_H
       
   112 
       
   113 // End of File