phonebookui/Phonebook2/remotecontactlookup/contactactionservice/src/CFscFieldPropertyGroup.cpp
branchRCL_3
changeset 20 f4a778e096c2
parent 0 e686773b3f54
equal deleted inserted replaced
19:5b6f26637ad3 20:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Implementation field property group.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #include "emailtrace.h"
       
    20 #include "CFscFieldPropertyGroup.h"
       
    21 
       
    22 // System includes
       
    23 #include <barsread.h>
       
    24 
       
    25 // --------------------------------------------------------------------------
       
    26 // CFscFieldPropertyGroup::CFscFieldPropertyGroup
       
    27 // --------------------------------------------------------------------------
       
    28 //
       
    29 CFscFieldPropertyGroup::CFscFieldPropertyGroup()
       
    30     {
       
    31     FUNC_LOG;
       
    32     }
       
    33 
       
    34 // --------------------------------------------------------------------------
       
    35 // CFscFieldPropertyGroup::~CFscFieldPropertyGroup
       
    36 // --------------------------------------------------------------------------
       
    37 //
       
    38 CFscFieldPropertyGroup::~CFscFieldPropertyGroup()
       
    39     {
       
    40     FUNC_LOG;
       
    41     iProperties.Close();
       
    42     delete iLabel;
       
    43     }
       
    44 
       
    45 // --------------------------------------------------------------------------
       
    46 // CFscFieldPropertyGroup::ConstructL
       
    47 // --------------------------------------------------------------------------
       
    48 //
       
    49 inline void CFscFieldPropertyGroup::ConstructL(TResourceReader& aReader)
       
    50     {
       
    51     FUNC_LOG;
       
    52     aReader.ReadInt8(); // read version number
       
    53     iGroupId = static_cast<TPbk2FieldGroupId>(aReader.ReadInt8() );
       
    54     iLabel = aReader.ReadHBufC16L();
       
    55     iIconId = TPbk2IconId(aReader);
       
    56     iAddItemOrdering = aReader.ReadInt8();
       
    57     }
       
    58 
       
    59 // --------------------------------------------------------------------------
       
    60 // CFscFieldPropertyGroup::NewLC
       
    61 // --------------------------------------------------------------------------
       
    62 //
       
    63 CFscFieldPropertyGroup* CFscFieldPropertyGroup::NewLC(
       
    64         TResourceReader& aReader)
       
    65     {
       
    66     FUNC_LOG;
       
    67     CFscFieldPropertyGroup* self = new ( ELeave ) CFscFieldPropertyGroup;
       
    68     CleanupStack::PushL(self);
       
    69     self->ConstructL(aReader);
       
    70     return self;
       
    71     }
       
    72 
       
    73 // --------------------------------------------------------------------------
       
    74 // CFscFieldPropertyGroup::Count
       
    75 // --------------------------------------------------------------------------
       
    76 //
       
    77  TInt CFscFieldPropertyGroup::Count() const
       
    78     {
       
    79     FUNC_LOG;
       
    80     return iProperties.Count();
       
    81     }
       
    82 
       
    83 // --------------------------------------------------------------------------
       
    84 // CFscFieldPropertyGroup::At
       
    85 // --------------------------------------------------------------------------
       
    86 //
       
    87  const MPbk2FieldProperty& CFscFieldPropertyGroup::At
       
    88 ( TInt aIndex ) const
       
    89     {
       
    90     FUNC_LOG;
       
    91     return *iProperties[aIndex];
       
    92     }
       
    93 
       
    94 // --------------------------------------------------------------------------
       
    95 // CFscFieldPropertyGroup::AddFieldPropertyL
       
    96 // --------------------------------------------------------------------------
       
    97 //  
       
    98 void CFscFieldPropertyGroup::AddFieldPropertyL(
       
    99         const MPbk2FieldProperty& aProperty)
       
   100     {
       
   101     FUNC_LOG;
       
   102     iProperties.AppendL( &aProperty);
       
   103     }
       
   104 
       
   105 // End of File  
       
   106