harvester/composerplugins/composerplugininterface/src/composerplugin.cpp
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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:  Composer Plug-in ECom interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "composerplugin.h"
       
    20 
       
    21 // ---------------------------------------------------------------------------
       
    22 // NewL
       
    23 // ---------------------------------------------------------------------------
       
    24 //
       
    25 EXPORT_C CComposerPlugin* CComposerPlugin::NewL( const TUid& aUid )
       
    26 	{
       
    27 	TAny* composerPlugin = REComSession::CreateImplementationL(
       
    28 			aUid, _FOFF( CComposerPlugin, iDtor_ID_Key ) );
       
    29 	return ( reinterpret_cast<CComposerPlugin*>(composerPlugin) );
       
    30 	}
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // ListImplementationsL
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 EXPORT_C void CComposerPlugin::ListImplementationsL( RImplInfoPtrArray& aImplInfoArray )
       
    37 	{
       
    38 	REComSession::ListImplementationsL(
       
    39 			KCComposerPluginInterfaceUid, aImplInfoArray );
       
    40 	}
       
    41 
       
    42 // ---------------------------------------------------------------------------
       
    43 // Destructor, virtual
       
    44 // ---------------------------------------------------------------------------
       
    45 //
       
    46 EXPORT_C CComposerPlugin::~CComposerPlugin()
       
    47 	{
       
    48 	REComSession::DestroyedImplementation( iDtor_ID_Key );
       
    49 	}
       
    50 
       
    51 // ---------------------------------------------------------------------------
       
    52 // SetSession
       
    53 // ---------------------------------------------------------------------------
       
    54 //
       
    55 EXPORT_C void CComposerPlugin::SetSession( CMdESession& aSession )
       
    56 	{
       
    57 	iSession = &aSession;
       
    58 	
       
    59 	SetObservers();
       
    60 	}
       
    61 
       
    62 // ---------------------------------------------------------------------------
       
    63 // RemoveSession
       
    64 // ---------------------------------------------------------------------------
       
    65 //
       
    66 EXPORT_C void CComposerPlugin::RemoveSession()
       
    67 	{
       
    68 	RemoveObservers();
       
    69 	
       
    70 	iSession = NULL;
       
    71 	}
       
    72 
       
    73 // ---------------------------------------------------------------------------
       
    74 // E32Dll
       
    75 // ---------------------------------------------------------------------------
       
    76 //
       
    77 GLDEF_C TInt E32Dll()
       
    78 	{
       
    79 	return KErrNone;
       
    80 	}