phonebookui/Phonebook/inc/CPbkGroupBelongings.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 *     UI control for Phonebook's "Group belongings".
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CPbkGroupBelongings_H__
       
    21 #define __CPbkGroupBelongings_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <cntdef.h>         // TContactItemId
       
    26 #include <cntviewbase.h>    // MContactViewObserver
       
    27 #include <MPbkContactSelector.h>
       
    28 
       
    29 //  FORWARD DECLARATIONS
       
    30 class CPbkContactEngine;
       
    31 class CPbkGroupPopup;
       
    32 class CPbkContactSubView;
       
    33 
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38  * @internal Only Phonebook internal use supported!
       
    39  *
       
    40  * Phonebooks Group belongings dialog.
       
    41  */
       
    42 class CPbkGroupBelongings : 
       
    43         public CBase, 
       
    44         private MContactViewObserver, 
       
    45         private MPbkContactSelector
       
    46     {
       
    47     public:  // Interface
       
    48         /**
       
    49          * Creates a new instance of this class.
       
    50          */
       
    51         IMPORT_C static CPbkGroupBelongings* NewL();
       
    52 
       
    53         /**
       
    54          * Executes and deletes (also if a leave occurs) this dialog.
       
    55          *
       
    56          * @param aEngine       phonebook engine
       
    57          * @param aContactId    group belongings are listed for this contact
       
    58          */
       
    59         IMPORT_C void ExecuteLD(CPbkContactEngine& aEngine,
       
    60 			TContactItemId aContactId);
       
    61 
       
    62         /**
       
    63          * Destructor. Also cancels open dialog and makes ExecuteLD() return.
       
    64          */
       
    65         ~CPbkGroupBelongings();
       
    66 
       
    67     private:  // from MContactViewObserver
       
    68 	    void HandleContactViewEvent
       
    69             (const CContactViewBase& aView,const TContactViewEvent& aEvent);
       
    70 
       
    71     private:  // from MPbkContactSelector
       
    72         TBool IsContactIncluded(TContactItemId aId);
       
    73 
       
    74     private:  // Implementation
       
    75         CPbkGroupBelongings();
       
    76         void CreateGroupSubViewL
       
    77             (CPbkContactEngine& aEngine, TContactItemId aContactId);
       
    78         void RunPopupL();
       
    79 
       
    80     private:  // data
       
    81         /// Own: group list popup
       
    82         CPbkGroupPopup* iGroupPopup;
       
    83         /// Own: groups list
       
    84         CContactIdArray* iGroups;
       
    85         /// Own: contact id
       
    86         TContactItemId iContactId;
       
    87         /// Own: groups sub view
       
    88         CPbkContactSubView* iGroupView;
       
    89         /// Ref: destructor sets referred TBool to ETrue
       
    90         TBool* iDestroyedPtr;
       
    91     };
       
    92 
       
    93 
       
    94 #endif // __CPbkGroupBelongings_H__
       
    95 
       
    96 // End of File