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