mobilemessaging/postcard/postcardinc/PostcardContact.inl
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2006 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 *     Postcard application's interface to contacts (Phonebook2 and
       
    16 *     virtual phonebook)
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 // Inline Functions
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 // CPostcardContact::IsValid()
       
    26 // -----------------------------------------------------------------------------
       
    27 //
       
    28 inline TBool CPostcardContact::IsValid() const
       
    29     {
       
    30     return iStoreContact != NULL;
       
    31     }
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // CPostcardContact::LocToFieldTypeParam
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 inline TVPbkFieldTypeParameter CPostcardContact::LocToFieldTypeParam(
       
    38     TLocation aLocation )
       
    39     {
       
    40     return iLocToFieldTypeParam[aLocation];
       
    41     }
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CPostcardContact::AddrFieldToSubFieldType
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 inline TVPbkSubFieldType CPostcardContact::AddrFieldToSubFieldType(
       
    48     TAddressField aAddressField )
       
    49     {
       
    50     return iAddrFieldToSubFieldType[aAddressField];
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // CPostcardContact::ControlIdToAddrField
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 inline CPostcardContact::TAddressField CPostcardContact::ControlIdToAddrField(
       
    58     TInt aControlId )
       
    59     {
       
    60     aControlId -= EPostcardAddressInfo;
       
    61     __ASSERT_DEBUG(aControlId >= 0 && aControlId < KNumAddressFields,
       
    62         Panic(EPostcardPanicCoding));
       
    63     return iControlIdToAddrField[aControlId];
       
    64     }
       
    65 
       
    66 // End of File