meetingrequest/mrviewercalplugin/inc/caleneditorsplugin.inl
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007-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:  Inline methods for CCalenEditorsPlugin.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "esmrinternaluid.h"
       
    20 
       
    21 // ---------------------------------------------------------------------------
       
    22 // CCalenEditorsPlugin::NewL
       
    23 // ---------------------------------------------------------------------------
       
    24 //
       
    25 inline CCalenEditorsPlugin* CCalenEditorsPlugin::NewL()
       
    26     {
       
    27     const TUid KS60CalenEditorsImplementationId = { KS60CalenEditorsImplementation };
       
    28     const TUid KCalEntryUIImplmentationId = { KCalEntryUIImplmentation }; 
       
    29 
       
    30     TAny* interface = NULL;
       
    31     
       
    32     // Trying to create S60 editor component
       
    33     TRAPD( err, interface = REComSession::CreateImplementationL(
       
    34 								KS60CalenEditorsImplementationId, 
       
    35 								_FOFF(CCalenEditorsPlugin, iDtor_ID_Key)) );    
       
    36     
       
    37     if ( err != KErrNone && !interface )
       
    38     	{
       
    39     	// If S60 editor component cannot be created 
       
    40     	// --> Create FS calendar viewer component
       
    41     	interface = REComSession::CreateImplementationL(
       
    42     								KCalEntryUIImplmentationId, 
       
    43     								_FOFF( CCalenEditorsPlugin, iDtor_ID_Key) );    	
       
    44     	} 
       
    45     
       
    46     return reinterpret_cast<CCalenEditorsPlugin*>(interface);
       
    47     }
       
    48 
       
    49 // ---------------------------------------------------------------------------
       
    50 // CCalenEditorsPlugin::~CCalenEditorsPlugin
       
    51 // ---------------------------------------------------------------------------
       
    52 //
       
    53 inline CCalenEditorsPlugin::~CCalenEditorsPlugin()
       
    54     {
       
    55     REComSession::DestroyedImplementation( iDtor_ID_Key );
       
    56     }
       
    57 
       
    58 // EOF