phonebookui/Phonebook/inc/CPbkPhonebookInfoDlg.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: 
       
    15 *     Phonebook Info view UI control.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPbkPhonebookInfoDlg_H__
       
    21 #define __CPbkPhonebookInfoDlg_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <eikdialg.h>    // CEikDialog
       
    25 #include <cntviewbase.h> // MContactViewObserver
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CPbkContactEngine;
       
    29 class CAknPopupList;
       
    30 class CAknSingleHeadingPopupMenuStyleListBox;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * @internal Only Phonebook internal use supported!
       
    36  *
       
    37  * "Phonebook Info View" UI control.
       
    38  */
       
    39 class CPbkPhonebookInfoDlg : 
       
    40         public CBase, 
       
    41         private MContactViewObserver
       
    42     {
       
    43     public:  // Constructors and destructor
       
    44         /**
       
    45          * Creates a new instance of this class.
       
    46 		 * @param aEngine reference to Phonebook engine
       
    47          */
       
    48         IMPORT_C static CPbkPhonebookInfoDlg* NewL(
       
    49                 CPbkContactEngine& aEngine);
       
    50         
       
    51         /**
       
    52          * Destructor.
       
    53          */
       
    54         ~CPbkPhonebookInfoDlg();
       
    55 
       
    56     public: // interface
       
    57         /**
       
    58          * Executes info note dialog.
       
    59          */
       
    60         IMPORT_C void ExecuteLD();
       
    61 
       
    62     private:  // from MContactViewObserver
       
    63 	    void HandleContactViewEvent
       
    64             (const CContactViewBase& aView,const TContactViewEvent& aEvent);
       
    65     
       
    66     private: // implementation
       
    67         CPbkPhonebookInfoDlg(CPbkContactEngine& aEngine);
       
    68         void ConstructL();
       
    69 	    void HandleContactViewEventL
       
    70             (const CContactViewBase& aView, const TContactViewEvent& aEvent);
       
    71 		void SetTitleL(const TDesC &aTitle);
       
    72         MDesCArray* ConstructDataArrayL();
       
    73         HBufC* ContactsEntryLC();
       
    74         HBufC* GroupsEntryLC();
       
    75         HBufC* UsedMemoryEntryLC();
       
    76         HBufC* FreeMemoryEntryLC();
       
    77         void UpdateDataL();
       
    78 
       
    79     private: // Data members
       
    80         /// Ref: Phonebook engine
       
    81         CPbkContactEngine& iEngine;
       
    82         /// Ref: all contacts view
       
    83         CContactViewBase* iAllContactsView;
       
    84         /// Ref: all groups view
       
    85         CContactViewBase* iAllGroupsView;
       
    86         /// Own: Popup list that is the actual dialog that is shown.
       
    87 		CAknPopupList* iPopupList;
       
    88 		/// Own: Listbox that is given to CAknPopupList constructor.
       
    89 		CAknSingleHeadingPopupMenuStyleListBox* iListBox;
       
    90         /// Ref: Keeps track if destructor is already called.
       
    91 		TBool* iDestroyed;
       
    92         /// Own: keeps track of contacts view readiness
       
    93         TBool iContactsViewReady;
       
    94         /// Own: keeps track of groups view readiness
       
    95         TBool iGroupsViewReady;
       
    96     };
       
    97 
       
    98 #endif // __CPbkPhonebookInfoDlg_H__
       
    99                    
       
   100 // End of File