meetingrequest/mrprocessor/inc/cmrentryprocessor.inl
branchRCL_3
changeset 12 4ce476e64c59
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     1 /*
       
     2 * Copyright (c) 2007 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:  esmricalviewer inline methods 
       
    15 *
       
    16 */
       
    17 
       
    18 #include <ecom/ecom.h>
       
    19 #include "esmrinternaluid.h"
       
    20 // -----------------------------------------------------------------------------
       
    21 // CMREntryProcessor::NewL
       
    22 // -----------------------------------------------------------------------------
       
    23 //
       
    24 inline CMREntryProcessor* CMREntryProcessor::NewL(
       
    25         TESMRCalendarEventType aEventType,
       
    26         MESMRCalDbMgr& aCalDb )
       
    27     {
       
    28     TAny* param = static_cast<TAny*>( &aCalDb );
       
    29     
       
    30     TAny* ptr = NULL;
       
    31     
       
    32     switch (aEventType )
       
    33         {
       
    34         case EESMREventTypeMeetingRequest:
       
    35             {
       
    36             TUid uid = TUid::Uid( KMRMeetingRequestProcessorImplementationUID );
       
    37             ptr = REComSession::CreateImplementationL(
       
    38                         uid,
       
    39                         _FOFF(CMREntryProcessor, iDtor_ID_Key ),
       
    40                         param );            
       
    41             }
       
    42             break;
       
    43 
       
    44         case EESMREventTypeAppt:
       
    45         case EESMREventTypeETodo:
       
    46         case EESMREventTypeEEvent:
       
    47         case EESMREventTypeEReminder:
       
    48         case EESMREventTypeEAnniv: 
       
    49             {
       
    50             TUid uid = TUid::Uid( KMRCalEventProcessorImplementationUID );
       
    51             ptr = REComSession::CreateImplementationL(
       
    52                         uid,
       
    53                         _FOFF(CMREntryProcessor, iDtor_ID_Key ),
       
    54                         param );             
       
    55             }
       
    56             break;
       
    57         }
       
    58     
       
    59     ASSERT( ptr );
       
    60     
       
    61     return reinterpret_cast<CMREntryProcessor*>(ptr);
       
    62     }
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // CMRBCEventPlugin::~CMRBCEventPlugin
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 inline CMREntryProcessor::~CMREntryProcessor()
       
    69     {
       
    70     REComSession::DestroyedImplementation( iDtor_ID_Key );
       
    71     }
       
    72 
       
    73 // EOF