diff -r f1112f777ce9 -r 96906a986c3b testdev/ite/test/com.nokia.testfw.cmdtool.test/test.resource/unittest/several.mmp.in.one.path/SysLibs/ECom/InterfaceDefinition/Interface.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testdev/ite/test/com.nokia.testfw.cmdtool.test/test.resource/unittest/several.mmp.in.one.path/SysLibs/ECom/InterfaceDefinition/Interface.inl Tue Mar 30 14:39:29 2010 +0800 @@ -0,0 +1,79 @@ +// +// Interface.inl +// Copyright © 1997-2001 Symbian Ltd. All rights reserved. +// + +// Set default to be first implementation found by resolver +_LIT8(KDefaultImplementation,"*"); + +inline CExampleInterface::CExampleInterface() + { + } + +inline CExampleInterface::~CExampleInterface() + { + // Destroy any instance variables and then + // inform the framework that this specific + // instance of the interface has been destroyed. + REComSession::DestroyedImplementation(iDtor_ID_Key); + } + +inline CExampleInterface* CExampleInterface::NewL() + { + // Set up the interface find for the default resolver. + TEComResolverParams resolverParams; + resolverParams.SetDataType(KDefaultImplementation()); + resolverParams.SetWildcardMatch(ETrue); // Allow wildcard matching + + // Set up some empty initialisation parameters + TExampleInterfaceInitParams initParams; + initParams.integer = 0; + initParams.descriptor = NULL; + + const TUid KExResolverUid = {0x10009DD0}; + return REINTERPRET_CAST(CExampleInterface*, + REComSession::CreateImplementationL(KCExampleInterfaceUid, + _FOFF(CExampleInterface,iDtor_ID_Key), + &initParams, + resolverParams, + KExResolverUid)); + } + +inline CExampleInterface* CExampleInterface::NewL(const TDesC8& aMatchString) + { + // Set up the interface find for the default resolver. + TEComResolverParams resolverParams; + resolverParams.SetDataType(aMatchString); + resolverParams.SetWildcardMatch(ETrue); // Allow wildcard matching + + // Set up some empty initialisation parameters + TExampleInterfaceInitParams initParams; + initParams.integer = 0; + initParams.descriptor = NULL; + + return REINTERPRET_CAST(CExampleInterface*, + REComSession::CreateImplementationL(KCExampleInterfaceUid, + _FOFF(CExampleInterface,iDtor_ID_Key), + &initParams, + resolverParams)); + } + +inline CExampleInterface* CExampleInterface::NewL(const TDesC8& aMatchString, TExampleInterfaceInitParams& aParams) + { + // Set up the interface find for the default resolver. + TEComResolverParams resolverParams; + resolverParams.SetDataType(aMatchString); + resolverParams.SetWildcardMatch(ETrue); // Allow wildcard matching + + // The CreateImplementationL method will return + // the created item. + return REINTERPRET_CAST(CExampleInterface*, REComSession::CreateImplementationL(KCExampleInterfaceUid, + _FOFF(CExampleInterface,iDtor_ID_Key), + &aParams, + resolverParams)); + } + +inline void CExampleInterface::ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray) + { + REComSession::ListImplementationsL(KCExampleInterfaceUid, aImplInfoArray); + }