eventsui/eventsengine/src/evteventmanager.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:  Interface to store and access the Location Events.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // System Includes
       
    20 
       
    21 // User Includes
       
    22 #include "evteventmanager.h"
       
    23 #include "evtdatabase.h"
       
    24 #include "evtdebug.h"
       
    25 
       
    26 // ================ Member funtions for CEvtEventManager class ===============
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // CEvtEventManager::CEvtEventManager
       
    30 // ---------------------------------------------------------------------------
       
    31 //
       
    32 CEvtEventManager::CEvtEventManager()
       
    33     {
       
    34     }
       
    35     
       
    36 // ---------------------------------------------------------------------------
       
    37 // CEvtEventManager::~CEvtEventManager
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 EXPORT_C CEvtEventManager::~CEvtEventManager()
       
    41     {
       
    42     delete iEvtDb;
       
    43     } 
       
    44     
       
    45 // ---------------------------------------------------------------------------
       
    46 // CEvtEventManager::NewL
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 EXPORT_C CEvtEventManager* CEvtEventManager::NewL()
       
    50     {
       
    51 	CEvtEventManager* self = NewLC( );
       
    52 	CleanupStack::Pop( self );
       
    53 	return self;
       
    54     }
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // CEvtEventManager::NewLC
       
    58 // ---------------------------------------------------------------------------
       
    59 //
       
    60 EXPORT_C CEvtEventManager* CEvtEventManager::NewLC()
       
    61     {
       
    62 	CEvtEventManager* self = new ( ELeave )CEvtEventManager( );
       
    63 	CleanupStack::PushL( self );
       
    64 	self->ConstructL( );
       
    65 	return self;
       
    66     } 
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // CEvtEventManager::ConstructL
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 void CEvtEventManager::ConstructL()
       
    73     {
       
    74     iEvtDb = CEvtDatabase::NewL( );
       
    75     } 
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // CEvtEventManager::GetEventsL
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 EXPORT_C void CEvtEventManager::GetEventsL( 
       
    82                             TEvtEventStatus    aEvtStatus,
       
    83                             RPointerArray<CEvtBasicEventInfo>&     aEvtEventArray )
       
    84     {
       
    85 	EVTUIDEBUG( "+ CEvtEventManager::GetEventsL()" );
       
    86     // redirect the call to CEvtDatabase
       
    87 	iEvtDb->GetEventsL( aEvtStatus, aEvtEventArray );
       
    88 	EVTUIDEBUG( "- CEvtEventManager::GetEventsL()" );
       
    89     } 
       
    90 
       
    91 // ---------------------------------------------------------------------------
       
    92 // CEvtEventManager::GetEventsL
       
    93 // ---------------------------------------------------------------------------
       
    94 //
       
    95 EXPORT_C void CEvtEventManager::GetEventsL( 
       
    96                             RPointerArray<CEvtBasicEventInfo>&     aEvtEventArray )
       
    97     {
       
    98 	EVTUIDEBUG( "+ CEvtEventManager::GetEventsL()" );
       
    99     // redirect the call to CEvtDatabase
       
   100 	iEvtDb->GetEventsL( aEvtEventArray );
       
   101 	EVTUIDEBUG( "- CEvtEventManager::GetEventsL()" );
       
   102     } 
       
   103     
       
   104 // ---------------------------------------------------------------------------
       
   105 // CEvtEventManager::GetEventL
       
   106 // ---------------------------------------------------------------------------
       
   107 //
       
   108 EXPORT_C CEvtEvent* CEvtEventManager::GetEventL( TEvtEventId    aEvtId )
       
   109     {
       
   110 	EVTUIDEBUG( "+ CEvtEventManager::GetEventL()" );
       
   111     // redirect the call to CEvtDatabase
       
   112 	return iEvtDb->GetEventL( aEvtId );
       
   113     } 
       
   114     
       
   115 // ---------------------------------------------------------------------------
       
   116 // CEvtEventManager::RemoveEventsL
       
   117 // ---------------------------------------------------------------------------
       
   118 //
       
   119 EXPORT_C void CEvtEventManager::RemoveEventsL( 
       
   120                             const RArray<TEvtEventId>&     aEvtIdArray )
       
   121     {
       
   122 	EVTUIDEBUG( "+ CEvtEventManager::RemoveEventsL()" );
       
   123     // redirect the call to CEvtDatabase
       
   124 	iEvtDb->RemoveEventsL( aEvtIdArray );
       
   125 	EVTUIDEBUG( "- CEvtEventManager::RemoveEventsL()" );
       
   126     } 
       
   127 
       
   128 // ---------------------------------------------------------------------------
       
   129 // CEvtEventManager::UpdateEventsStatusL
       
   130 // ---------------------------------------------------------------------------
       
   131 //
       
   132 EXPORT_C void CEvtEventManager::UpdateEventsStatusL( 
       
   133                             const RArray<TEvtEventId>&     aEvtIdArray,
       
   134                             TEvtEventStatus    aEvtStatus)
       
   135     {
       
   136     // redirect the call to CEvtDatabase
       
   137     iEvtDb->UpdateEventsStatusL( aEvtIdArray, aEvtStatus );
       
   138     } 
       
   139     
       
   140 // ---------------------------------------------------------------------------
       
   141 // CEvtEventManager::UpdateEventL
       
   142 // ---------------------------------------------------------------------------
       
   143 //
       
   144 EXPORT_C void CEvtEventManager::UpdateEventL( 
       
   145                             CEvtEvent&          aEvtEvent )
       
   146     {
       
   147 	EVTUIDEBUG( "+ CEvtEventManager::UpdateEventL()" );
       
   148     // redirect the call to CEvtDatabase
       
   149 	iEvtDb->UpdateEventL( aEvtEvent );
       
   150 	EVTUIDEBUG( "- CEvtEventManager::UpdateEventL()" );
       
   151     } 
       
   152     
       
   153 // ---------------------------------------------------------------------------
       
   154 // CEvtEventManager::AddEventL
       
   155 // ---------------------------------------------------------------------------
       
   156 //
       
   157 EXPORT_C void CEvtEventManager::AddEventL( CEvtEvent&     aEvtEvent )
       
   158     {
       
   159 	EVTUIDEBUG( "+ CEvtEventManager::AddEventL()" );
       
   160     // redirect the call to CEvtDatabase
       
   161 	iEvtDb->AddEventL( aEvtEvent );
       
   162 	EVTUIDEBUG( "- CEvtEventManager::AddEventL()" );
       
   163     } 
       
   164  
       
   165 // ---------------------------------------------------------------------------
       
   166 // CEvtEventManager::UpdateEventStatus
       
   167 // ---------------------------------------------------------------------------
       
   168 //
       
   169 EXPORT_C void CEvtEventManager::UpdateEventStatusL( 
       
   170                             TEvtEventId      aEvtId,
       
   171                             TEvtEventStatus    aEvtStatus)
       
   172     {
       
   173 	EVTUIDEBUG( "+ CEvtEventManager::UpdateEventStatusL()" );
       
   174     // redirect the call to CEvtDatabase
       
   175 	iEvtDb->UpdateEventStatusL( aEvtId, aEvtStatus );
       
   176 	EVTUIDEBUG( "- CEvtEventManager::UpdateEventStatusL()" );
       
   177     } 
       
   178     
       
   179 // ---------------------------------------------------------------------------
       
   180 // CEvtEventManager::RemoveEvent
       
   181 // ---------------------------------------------------------------------------
       
   182 //
       
   183 EXPORT_C void CEvtEventManager::RemoveEventL( TEvtEventId      aEvtId )
       
   184     {
       
   185 	EVTUIDEBUG( "+ CEvtEventManager::RemoveEventL()" );
       
   186     // redirect the call to CEvtDatabase
       
   187 	iEvtDb->RemoveEventL( aEvtId );
       
   188 	EVTUIDEBUG( "- CEvtEventManager::RemoveEventL()" );
       
   189     } 
       
   190     
       
   191 // ---------------------------------------------------------------------------
       
   192 // CEvtEventManager::SetObserver
       
   193 // ---------------------------------------------------------------------------
       
   194 //
       
   195 EXPORT_C void CEvtEventManager::SetObserver( MEvtStorageDbObserver*      
       
   196 																aDbObserver )
       
   197     {
       
   198 	EVTUIDEBUG( "+ CEvtEventManager::SetObserver()" );
       
   199     // redirect the call to CEvtDatabase
       
   200 	iEvtDb->SetObserver( aDbObserver );
       
   201 	EVTUIDEBUG( "- CEvtEventManager::SetObserver()" );
       
   202     } 
       
   203 
       
   204 // End of File