meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrtextitem.cpp
branchRCL_3
changeset 12 4ce476e64c59
child 16 b5fbb9b25d57
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     1 /*
       
     2 * Copyright (c) 2009 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:  ESMR text item implementation, used to map text resource to id
       
    15  *
       
    16 */
       
    17 
       
    18 #include "emailtrace.h"
       
    19 #include "cesmrtextitem.h"
       
    20 
       
    21 #include <barsread.h>
       
    22 #include <stringloader.h>
       
    23 
       
    24 // ======== MEMBER FUNCTIONS ========
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // ESMRTextItem::CESMRTextItem
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CESMRTextItem::CESMRTextItem( )
       
    31     {
       
    32     FUNC_LOG;
       
    33     //do nothing
       
    34     }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // CESMRTextItem::~CESMRTextItem
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 CESMRTextItem::~CESMRTextItem( )
       
    41     {
       
    42     FUNC_LOG;
       
    43     delete iText;
       
    44     }
       
    45 
       
    46 // ---------------------------------------------------------------------------
       
    47 // CESMRTextItem::ConstructFromResourceL
       
    48 // ---------------------------------------------------------------------------
       
    49 //
       
    50 void CESMRTextItem::ConstructFromResourceL( TResourceReader& aReader )
       
    51     {
       
    52     FUNC_LOG;
       
    53     iId = aReader.ReadInt16 ( );
       
    54     TInt textId = aReader.ReadInt32 ( );
       
    55     iText = StringLoader::LoadL ( textId );
       
    56     }
       
    57 
       
    58 // ---------------------------------------------------------------------------
       
    59 // CESMRTextItem::TextL
       
    60 // ---------------------------------------------------------------------------
       
    61 //
       
    62 TDesC& CESMRTextItem::TextL( )
       
    63     {
       
    64     FUNC_LOG;
       
    65     return *iText;
       
    66     }
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // CESMRTextItem::Id
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 TInt CESMRTextItem::Id( )
       
    73     {
       
    74     FUNC_LOG;
       
    75     return iId;
       
    76     }
       
    77 
       
    78 // EOF
       
    79