phonebookui/Phonebook2/Presentation/src/CPbk2storePropertyContentStoreName.cpp
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 Store Property Content Store Name.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "CPbk2StorePropertyContentStoreName.h"
       
    20 
       
    21 #include "CPbk2LocalizedText.h"
       
    22 
       
    23 // --------------------------------------------------------------------------
       
    24 // CPbk2StorePropertyContentStoreName::CPbk2StorePropertyContentStoreName
       
    25 // --------------------------------------------------------------------------
       
    26 //
       
    27 CPbk2StorePropertyContentStoreName::CPbk2StorePropertyContentStoreName(
       
    28         const TArray<const CPbk2LocalizedText*> aTexts,
       
    29         TPbk2ContentId aContentId ) :
       
    30     iTexts( aTexts ), iContentId( aContentId )
       
    31     {
       
    32     }
       
    33 
       
    34 // --------------------------------------------------------------------------
       
    35 // CPbk2StorePropertyContentStoreName::~CPbk2StorePropertyContentStoreName
       
    36 // --------------------------------------------------------------------------
       
    37 //
       
    38 CPbk2StorePropertyContentStoreName::~CPbk2StorePropertyContentStoreName()
       
    39     {
       
    40     }
       
    41 
       
    42 // --------------------------------------------------------------------------
       
    43 // CPbk2StorePropertyContentStoreName::Uid
       
    44 // --------------------------------------------------------------------------
       
    45 //
       
    46 TInt CPbk2StorePropertyContentStoreName::Uid() const
       
    47     {    
       
    48     return iContentId;
       
    49     }
       
    50 
       
    51 // --------------------------------------------------------------------------
       
    52 // CPbk2StorePropertyContentStoreName::StoreName
       
    53 // --------------------------------------------------------------------------
       
    54 //    
       
    55 const TDesC& CPbk2StorePropertyContentStoreName::StoreName() const
       
    56     {
       
    57     for ( TInt i = 0; i < iTexts.Count(); ++i )
       
    58         {
       
    59         if ( iTexts[ i ]->ContextUid() == iContentId )
       
    60             {
       
    61             return iTexts[ i ]->Text();
       
    62             }
       
    63         }
       
    64         
       
    65     return KNullDesC;
       
    66     }
       
    67     
       
    68 // End of file