meetingrequest/mrgui/mrfieldbuildercommon/src/cesmrrichtextlink.cpp
changeset 0 8466d47a6819
child 16 4ce476e64c59
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2003-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:  Container class for CESMRRichTextViewer links
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "emailtrace.h"
       
    20 #include "cesmrrichtextlink.h"
       
    21 
       
    22 // ======== MEMBER FUNCTIONS ========
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // CESMRRichTextLink::NewL
       
    26 // ---------------------------------------------------------------------------
       
    27 //
       
    28 EXPORT_C CESMRRichTextLink* CESMRRichTextLink::NewL(
       
    29         TInt aStartPos,
       
    30         TInt aLength,
       
    31         const TDesC& aValue,
       
    32         TType aType,
       
    33         TTriggerKey aTriggerKey )
       
    34     {
       
    35     FUNC_LOG;
       
    36     CESMRRichTextLink* self = 
       
    37 		new (ELeave) CESMRRichTextLink(aStartPos, aLength, aType, aTriggerKey);
       
    38     CleanupStack::PushL (self );
       
    39     self->ConstructL (aValue );
       
    40     CleanupStack::Pop (self );
       
    41     return self;
       
    42     }
       
    43 
       
    44 // ---------------------------------------------------------------------------
       
    45 // CESMRRichTextLink::~CESMRRichTextLink
       
    46 // ---------------------------------------------------------------------------
       
    47 //
       
    48 EXPORT_C CESMRRichTextLink::~CESMRRichTextLink( )
       
    49     {
       
    50     FUNC_LOG;
       
    51     delete iValue;
       
    52     }
       
    53 
       
    54 // ---------------------------------------------------------------------------
       
    55 // CESMRRichTextLink::StartPos
       
    56 // ---------------------------------------------------------------------------
       
    57 //
       
    58 EXPORT_C TInt CESMRRichTextLink::StartPos( ) const
       
    59     {
       
    60     FUNC_LOG;
       
    61     return iStartPos;
       
    62     }
       
    63 
       
    64 // ---------------------------------------------------------------------------
       
    65 // CESMRRichTextLink::Length
       
    66 // ---------------------------------------------------------------------------
       
    67 //
       
    68 EXPORT_C TInt CESMRRichTextLink::Length( ) const
       
    69     {
       
    70     FUNC_LOG;
       
    71     return iLength;
       
    72     }
       
    73 
       
    74 // ---------------------------------------------------------------------------
       
    75 // CESMRRichTextLink::Value
       
    76 // ---------------------------------------------------------------------------
       
    77 //
       
    78 EXPORT_C TDesC& CESMRRichTextLink::Value( ) const
       
    79     {
       
    80     FUNC_LOG;
       
    81     return *iValue;
       
    82     }
       
    83 
       
    84 // ---------------------------------------------------------------------------
       
    85 // CESMRRichTextLink::TType
       
    86 // ---------------------------------------------------------------------------
       
    87 //
       
    88 EXPORT_C CESMRRichTextLink::TType CESMRRichTextLink::Type( ) const
       
    89     {
       
    90     FUNC_LOG;
       
    91     return iType;
       
    92     }
       
    93 
       
    94 // ---------------------------------------------------------------------------
       
    95 // CESMRRichTextLink::TTriggerKey
       
    96 // ---------------------------------------------------------------------------
       
    97 //
       
    98 EXPORT_C CESMRRichTextLink::TTriggerKey CESMRRichTextLink::TriggerKey( ) const
       
    99     {
       
   100     FUNC_LOG;
       
   101     return iTriggerKey;
       
   102     }
       
   103 
       
   104 // ---------------------------------------------------------------------------
       
   105 // CESMRRichTextLink::SetStartPos
       
   106 // ---------------------------------------------------------------------------
       
   107 //
       
   108 EXPORT_C void CESMRRichTextLink::SetStartPos( TInt aPos )
       
   109     {
       
   110     FUNC_LOG;
       
   111     iStartPos = aPos;
       
   112     }
       
   113 
       
   114 // ---------------------------------------------------------------------------
       
   115 // CESMRRichTextLink::CESMRRichTextLink
       
   116 // ---------------------------------------------------------------------------
       
   117 //
       
   118 CESMRRichTextLink::CESMRRichTextLink(
       
   119 		TInt aStartPos, 
       
   120 		TInt aLength, 
       
   121 		TType aType,
       
   122         TTriggerKey aTriggerKey )
       
   123     {
       
   124     FUNC_LOG;
       
   125     iStartPos = aStartPos;
       
   126     iLength = aLength;
       
   127     iType = aType;
       
   128     iTriggerKey = aTriggerKey;
       
   129     }
       
   130 
       
   131 // ---------------------------------------------------------------------------
       
   132 // CESMRRichTextLink::ConstructL
       
   133 // ---------------------------------------------------------------------------
       
   134 //
       
   135 void CESMRRichTextLink::ConstructL(const TDesC& aValue )
       
   136     {
       
   137     FUNC_LOG;
       
   138     iValue = aValue.AllocL();
       
   139     }
       
   140 
       
   141 // EOF
       
   142