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