meetingrequest/mrgui/src/cesmralarm.cpp
branchRCL_3
changeset 16 4ce476e64c59
parent 13 0396474f30f5
child 17 8592a65ad3fb
equal deleted inserted replaced
13:0396474f30f5 16:4ce476e64c59
     1 /*
       
     2 * Copyright (c) 2007-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 alarm implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "emailtrace.h"
       
    20 #include <StringLoader.h>
       
    21 #include "cesmralarm.h"
       
    22 
       
    23 // ======== MEMBER FUNCTIONS ========
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // CESMRAlarm::CESMRAlarm
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 EXPORT_C CESMRAlarm::CESMRAlarm( )
       
    30     {
       
    31     FUNC_LOG;
       
    32     }
       
    33 
       
    34 // ---------------------------------------------------------------------------
       
    35 // CESMRAlarm::~CESMRAlarm
       
    36 // ---------------------------------------------------------------------------
       
    37 //
       
    38 EXPORT_C CESMRAlarm::~CESMRAlarm( )
       
    39     {
       
    40     FUNC_LOG;
       
    41     delete iText;
       
    42     }
       
    43 
       
    44 // ---------------------------------------------------------------------------
       
    45 // CESMRAlarm::ConstructFromResourceL
       
    46 // ---------------------------------------------------------------------------
       
    47 //
       
    48 EXPORT_C void CESMRAlarm::ConstructFromResourceL( TResourceReader& aReader )
       
    49     {
       
    50     FUNC_LOG;
       
    51     iId = aReader.ReadInt16();
       
    52     iValue = aReader.ReadInt16();
       
    53     iRelative = aReader.ReadInt16();
       
    54     iTxtLink = aReader.ReadInt32(); // link to TBUF
       
    55     }
       
    56 
       
    57 // ---------------------------------------------------------------------------
       
    58 // CESMRAlarm::LoadTextL
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 EXPORT_C void CESMRAlarm::LoadTextL( CCoeEnv* aEnv )
       
    62     {
       
    63     FUNC_LOG;
       
    64     delete iText;
       
    65     iText = NULL;
       
    66     
       
    67     if ( iValue != KErrNotFound )
       
    68         {
       
    69         iText = StringLoader::LoadL ( iTxtLink, iValue, aEnv );
       
    70         }
       
    71     else
       
    72         {
       
    73         iText = StringLoader::LoadL ( iTxtLink, aEnv );
       
    74         }
       
    75     }
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // CESMRAlarm::RelativeTimeInMinutes
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 EXPORT_C TTimeIntervalMinutes CESMRAlarm::RelativeTimeInMinutes( )
       
    82     {
       
    83     FUNC_LOG;
       
    84     return TTimeIntervalMinutes ( iRelative );
       
    85     }
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // CESMRAlarm::Text
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 EXPORT_C HBufC* CESMRAlarm::Text( )
       
    92     {
       
    93     FUNC_LOG;
       
    94     return iText;
       
    95     }
       
    96 
       
    97 // ---------------------------------------------------------------------------
       
    98 // CESMRAlarm::Id
       
    99 // ---------------------------------------------------------------------------
       
   100 //
       
   101 EXPORT_C TInt CESMRAlarm::Id( )
       
   102     {
       
   103     FUNC_LOG;
       
   104     return iId;
       
   105     }
       
   106 
       
   107 // ---------------------------------------------------------------------------
       
   108 // CESMRAlarm::Relative
       
   109 // ---------------------------------------------------------------------------
       
   110 //
       
   111 EXPORT_C TInt CESMRAlarm::Relative( )
       
   112     {
       
   113     FUNC_LOG;
       
   114     return iRelative;
       
   115     }
       
   116 
       
   117 // EOF
       
   118