eventsui/eventsengine/src/evtbasiceventinfo.cpp
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     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:  Basic Classes for the Location Events.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // System Includes
       
    20 
       
    21 // User Includes
       
    22 #include "evtbasiceventinfo.h"
       
    23 
       
    24 // ================ Member funtions for CEvtBasicEventInfo class =============
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // CEvtBasicEventInfo::CEvtBasicEventInfo
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 EXPORT_C CEvtBasicEventInfo::CEvtBasicEventInfo():
       
    31 	iEventId( 0 )
       
    32     {    
       
    33     }
       
    34     
       
    35 // ---------------------------------------------------------------------------
       
    36 // CEvtBasicEventInfo::~CEvtBasicEventInfo
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 EXPORT_C CEvtBasicEventInfo::~CEvtBasicEventInfo()
       
    40     {
       
    41     delete iSubject;
       
    42     delete iPlace;
       
    43     } 
       
    44     
       
    45 // ---------------------------------------------------------------------------
       
    46 // CEvtBasicEventInfo::NewL
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 EXPORT_C CEvtBasicEventInfo* CEvtBasicEventInfo::NewL()
       
    50     {
       
    51 	CEvtBasicEventInfo* self = NewLC( );
       
    52 	CleanupStack::Pop( self );
       
    53 	return self;
       
    54     }
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // CEvtBasicEventInfo::NewLC
       
    58 // ---------------------------------------------------------------------------
       
    59 //
       
    60 EXPORT_C CEvtBasicEventInfo* CEvtBasicEventInfo::NewLC()
       
    61     {
       
    62 	CEvtBasicEventInfo* self = new ( ELeave )CEvtBasicEventInfo( );
       
    63 	CleanupStack::PushL( self );
       
    64 	self->ConstructL( );
       
    65 	return self;
       
    66     } 
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // CEvtBasicEventInfo::ConstructL
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 EXPORT_C void CEvtBasicEventInfo::ConstructL()
       
    73     {
       
    74     // Allocate empty string.
       
    75     iSubject = KNullDesC().AllocL();
       
    76     iPlace = KNullDesC().AllocL();
       
    77     } 
       
    78     
       
    79 // ---------------------------------------------------------------------------
       
    80 // CEvtBasicEventInfo::EventId
       
    81 // ---------------------------------------------------------------------------
       
    82 //
       
    83 EXPORT_C TEvtEventId CEvtBasicEventInfo::EventId() const
       
    84     {
       
    85     return iEventId;
       
    86     } 
       
    87     
       
    88 // ---------------------------------------------------------------------------
       
    89 // CEvtBasicEventInfo::SetEventId
       
    90 // ---------------------------------------------------------------------------
       
    91 //
       
    92 EXPORT_C void CEvtBasicEventInfo::SetEventId( const TEvtEventId aId )
       
    93     {
       
    94     iEventId = aId;
       
    95     } 
       
    96     
       
    97 // ---------------------------------------------------------------------------
       
    98 // CEvtBasicEventInfo::Subject
       
    99 // ---------------------------------------------------------------------------
       
   100 //
       
   101 EXPORT_C TPtrC CEvtBasicEventInfo::Subject() const
       
   102     {
       
   103     return iSubject->Des();
       
   104     } 
       
   105     
       
   106 // ---------------------------------------------------------------------------
       
   107 // CEvtBasicEventInfo::SetSubjectL
       
   108 // ---------------------------------------------------------------------------
       
   109 //
       
   110 EXPORT_C void CEvtBasicEventInfo::SetSubjectL( const TDesC& aSubject )
       
   111     {
       
   112     delete iSubject;
       
   113     iSubject = NULL;
       
   114     iSubject = aSubject.AllocL();
       
   115     } 
       
   116     
       
   117 // ---------------------------------------------------------------------------
       
   118 // CEvtBasicEventInfo::Place
       
   119 // ---------------------------------------------------------------------------
       
   120 //
       
   121 EXPORT_C TPtrC CEvtBasicEventInfo::Place() const
       
   122     {
       
   123     return iPlace->Des();
       
   124     } 
       
   125     
       
   126 // ---------------------------------------------------------------------------
       
   127 // CEvtBasicEventInfo::SetPlaceL
       
   128 // ---------------------------------------------------------------------------
       
   129 //
       
   130 EXPORT_C void CEvtBasicEventInfo::SetPlaceL( const TDesC& aPlace )
       
   131     {
       
   132     delete iPlace;
       
   133     iPlace = NULL;
       
   134     iPlace = aPlace.AllocL();
       
   135     } 
       
   136     
       
   137 // ---------------------------------------------------------------------------
       
   138 // CEvtEvent::Repeat
       
   139 // ---------------------------------------------------------------------------
       
   140 //
       
   141 EXPORT_C TBool CEvtBasicEventInfo::Repeat() const
       
   142     {
       
   143     return iRepeat;
       
   144     } 
       
   145     
       
   146 // ---------------------------------------------------------------------------
       
   147 // CEvtEvent::SetRepeat
       
   148 // ---------------------------------------------------------------------------
       
   149 //
       
   150 EXPORT_C void CEvtBasicEventInfo::SetRepeat( const TBool aRepeat )
       
   151     {
       
   152     iRepeat = aRepeat;
       
   153     } 
       
   154 
       
   155 // ---------------------------------------------------------------------------
       
   156 // CEvtBasicEventInfo::EventStatus
       
   157 // ---------------------------------------------------------------------------
       
   158 //
       
   159 EXPORT_C TEvtEventStatus CEvtBasicEventInfo::EventStatus() const
       
   160     {
       
   161     return iEventStatus;
       
   162     } 
       
   163     
       
   164 // ---------------------------------------------------------------------------
       
   165 // CEvtBasicEventInfo::SetEventStatus
       
   166 // ---------------------------------------------------------------------------
       
   167 //
       
   168 EXPORT_C void CEvtBasicEventInfo::SetEventStatus( 
       
   169                             const TEvtEventStatus aEventStatus )
       
   170     {
       
   171     iEventStatus = aEventStatus;
       
   172     } 
       
   173 
       
   174 // End of File