PECengine/PresenceManager2/SrcCommon/TPEngCntLstMDesCArrayAdapter.cpp
branchRCL_3
changeset 13 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
12:6ca72c0fe49a 13:a941bc465d9f
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Contact list to MDesCArray adapter.
       
    15 *
       
    16 */
       
    17 
       
    18 //  INCLUDES
       
    19 #include "TPEngCntLstMDesCArrayAdapter.h"
       
    20 #include <E32Std.h>
       
    21 #include <BaDesCa.h>
       
    22 #include <MPEngContactList2.h>
       
    23 #include <MPEngContactItem.h>
       
    24 
       
    25 
       
    26 // ================= MEMBER FUNCTIONS =======================
       
    27 // C++ default constructor can NOT contain any code, that
       
    28 // might leave.
       
    29 //
       
    30 TPEngCntLstMDesCArrayAdapter::TPEngCntLstMDesCArrayAdapter( const MPEngContactList2& aList,
       
    31                                                             TPEngContactListView aContactListView )
       
    32         : iList( aList ),
       
    33         iContactListView( aContactListView )
       
    34     {
       
    35     }
       
    36 
       
    37 
       
    38 // -----------------------------------------------------------------------------
       
    39 // TPEngCntLstMDesCArrayAdapter::MdcaCount()
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 TInt TPEngCntLstMDesCArrayAdapter::MdcaCount() const
       
    43     {
       
    44     return iList.Count( iContactListView );
       
    45     }
       
    46 
       
    47 // -----------------------------------------------------------------------------
       
    48 // TPEngCntLstMDesCArrayAdapter::MdcaPoint()
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 TPtrC TPEngCntLstMDesCArrayAdapter::MdcaPoint( TInt aIndex ) const
       
    52     {
       
    53     return iList.ContactItem( aIndex, iContactListView ).Id();
       
    54     }
       
    55 
       
    56 
       
    57 //  End of File
       
    58 
       
    59