1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Implement some of the ECOM Core Dump Formatter interface.
25 // Set default to be first implementation found by resolver
26 _LIT8(KDefaultImplementation,"*");
28 #include <debuglogging.h>
30 inline CCoreDumpFormatter::CCoreDumpFormatter()
32 LOG_MSG( "CCoreDumpFormatter::CCoreDumpFormatter()\n" );
35 inline CCoreDumpFormatter::~CCoreDumpFormatter()
37 LOG_MSG2( "CCoreDumpFormatter::~CCoreDumpFormatter() with iDtor_ID_Key=0x%X\n", iDtor_ID_Key );
38 // Destroy any instance variables and then
39 // inform the framework that this specific
40 // instance of the interface has been destroyed.
41 REComSession::DestroyedImplementation( iDtor_ID_Key );
44 inline CCoreDumpFormatter* CCoreDumpFormatter::NewL()
46 LOG_MSG( "CCoreDumpFormatter::NewL()\n" );
47 // Set up the interface find for the default resolver.
48 TEComResolverParams resolverParams;
49 resolverParams.SetDataType(KDefaultImplementation());
50 //resolverParams.SetGenericMatch(ETrue); // Allow wildcard matching
51 resolverParams.SetWildcardMatch(ETrue); // Allow wildcard matching
53 // Set up some empty initialisation parameters
54 TExampleInterfaceInitParams initParams;
55 initParams.integer = 0;
56 initParams.descriptor = NULL;
58 return reinterpret_cast<CCoreDumpFormatter*>(
59 REComSession::CreateImplementationL(KCCoreDumpFormatterUid,
60 _FOFF(CCoreDumpFormatter,iDtor_ID_Key),
65 inline CCoreDumpFormatter* CCoreDumpFormatter::NewL(const TDesC8& aCue)
67 LOG_MSG( "CCoreDumpFormatter::NewL(const TDesC8& aCue)\n" );
69 TEComResolverParams resolverParams;
70 resolverParams.SetDataType(aCue);
71 resolverParams.SetGenericMatch(ETrue);
72 TAny* symbianElf = REComSession::CreateImplementationL(KCCoreDumpFormatterUid, _FOFF(CCoreDumpFormatter, iDtor_ID_Key),
74 return reinterpret_cast<CCoreDumpFormatter*>(symbianElf);
78 inline CCoreDumpFormatter* CCoreDumpFormatter::NewL(const TUid& aUid)
80 LOG_MSG( "CCoreDumpFormatter::NewL(const TUid& aUid)\n" );
82 LOG_MSG2( "->REComSession::CreateImplementationL(aUid=0x%X)\n", (aUid) );
84 TAny* symbianElf = REComSession::CreateImplementationL( aUid, _FOFF(CCoreDumpFormatter, iDtor_ID_Key) );
85 LOG_MSG2( "<-REComSession::CreateImplementationL() iDtor_ID_Key=0x%X\n", _FOFF(CCoreDumpFormatter, iDtor_ID_Key) );
87 return reinterpret_cast<CCoreDumpFormatter*>(symbianElf);
91 inline void CCoreDumpFormatter::ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray)
93 REComSession::ListImplementationsL(KCCoreDumpFormatterUid, aImplInfoArray);