calendarengines/agnversit2/inc/AgnExternalInterface.inl
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2005 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 functions of CAgnExternalInterface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21 Finds and loads a plugin for the mime type provided.
       
    22 @param aMimeType An 8 bit descriptor used for plugin recognition.
       
    23 @return a pointer to a new instance of the appropriate plugin.
       
    24 */
       
    25 inline CAgnExternalInterface* CAgnExternalInterface::NewL(const TDesC8& aMimeType)
       
    26     {
       
    27 	const TUid KAgnExternalInterfaceUid = {0x10206C81};
       
    28 
       
    29 	TEComResolverParams resolverParams; 
       
    30 	resolverParams.SetDataType(aMimeType);
       
    31 	TAny* ptr = REComSession::CreateImplementationL(KAgnExternalInterfaceUid, _FOFF(CAgnExternalInterface, iDtorIdKey), resolverParams);
       
    32 
       
    33 	return reinterpret_cast<CAgnExternalInterface*>(ptr);
       
    34 	}
       
    35 
       
    36 /**
       
    37 This destructor handles the destruction of the plugin loaded by a call to NewL.
       
    38 @internalTechnology
       
    39 */
       
    40 inline CAgnExternalInterface::~CAgnExternalInterface()
       
    41 	{
       
    42 	REComSession::DestroyedImplementation(iDtorIdKey);
       
    43 	}
       
    44 	
       
    45 //End of file