williamr@4
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
2 |
// All rights reserved.
|
williamr@4
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
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
|
williamr@4
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@4
|
7 |
//
|
williamr@4
|
8 |
// Initial Contributors:
|
williamr@4
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@4
|
10 |
//
|
williamr@4
|
11 |
// Contributors:
|
williamr@4
|
12 |
//
|
williamr@4
|
13 |
// Description:
|
williamr@4
|
14 |
// Implement some of the ECOM Core Dump Formatter interface.
|
williamr@4
|
15 |
//
|
williamr@4
|
16 |
|
williamr@4
|
17 |
|
williamr@4
|
18 |
|
williamr@4
|
19 |
/**
|
williamr@4
|
20 |
@file
|
williamr@4
|
21 |
@publishedPartner
|
williamr@4
|
22 |
@released
|
williamr@4
|
23 |
*/
|
williamr@4
|
24 |
|
williamr@4
|
25 |
// Set default to be first implementation found by resolver
|
williamr@4
|
26 |
_LIT8(KDefaultImplementation,"*");
|
williamr@4
|
27 |
|
williamr@4
|
28 |
#include <debuglogging.h>
|
williamr@4
|
29 |
|
williamr@4
|
30 |
inline CCoreDumpFormatter::CCoreDumpFormatter()
|
williamr@4
|
31 |
{
|
williamr@4
|
32 |
LOG_MSG( "CCoreDumpFormatter::CCoreDumpFormatter()\n" );
|
williamr@4
|
33 |
}
|
williamr@4
|
34 |
|
williamr@4
|
35 |
inline CCoreDumpFormatter::~CCoreDumpFormatter()
|
williamr@4
|
36 |
{
|
williamr@4
|
37 |
LOG_MSG2( "CCoreDumpFormatter::~CCoreDumpFormatter() with iDtor_ID_Key=0x%X\n", iDtor_ID_Key );
|
williamr@4
|
38 |
// Destroy any instance variables and then
|
williamr@4
|
39 |
// inform the framework that this specific
|
williamr@4
|
40 |
// instance of the interface has been destroyed.
|
williamr@4
|
41 |
REComSession::DestroyedImplementation( iDtor_ID_Key );
|
williamr@4
|
42 |
}
|
williamr@4
|
43 |
|
williamr@4
|
44 |
inline CCoreDumpFormatter* CCoreDumpFormatter::NewL()
|
williamr@4
|
45 |
{
|
williamr@4
|
46 |
LOG_MSG( "CCoreDumpFormatter::NewL()\n" );
|
williamr@4
|
47 |
// Set up the interface find for the default resolver.
|
williamr@4
|
48 |
TEComResolverParams resolverParams;
|
williamr@4
|
49 |
resolverParams.SetDataType(KDefaultImplementation());
|
williamr@4
|
50 |
//resolverParams.SetGenericMatch(ETrue); // Allow wildcard matching
|
williamr@4
|
51 |
resolverParams.SetWildcardMatch(ETrue); // Allow wildcard matching
|
williamr@4
|
52 |
|
williamr@4
|
53 |
// Set up some empty initialisation parameters
|
williamr@4
|
54 |
TExampleInterfaceInitParams initParams;
|
williamr@4
|
55 |
initParams.integer = 0;
|
williamr@4
|
56 |
initParams.descriptor = NULL;
|
williamr@4
|
57 |
|
williamr@4
|
58 |
return reinterpret_cast<CCoreDumpFormatter*>(
|
williamr@4
|
59 |
REComSession::CreateImplementationL(KCCoreDumpFormatterUid,
|
williamr@4
|
60 |
_FOFF(CCoreDumpFormatter,iDtor_ID_Key),
|
williamr@4
|
61 |
&initParams,
|
williamr@4
|
62 |
resolverParams));
|
williamr@4
|
63 |
}
|
williamr@4
|
64 |
|
williamr@4
|
65 |
inline CCoreDumpFormatter* CCoreDumpFormatter::NewL(const TDesC8& aCue)
|
williamr@4
|
66 |
{
|
williamr@4
|
67 |
LOG_MSG( "CCoreDumpFormatter::NewL(const TDesC8& aCue)\n" );
|
williamr@4
|
68 |
|
williamr@4
|
69 |
TEComResolverParams resolverParams;
|
williamr@4
|
70 |
resolverParams.SetDataType(aCue);
|
williamr@4
|
71 |
resolverParams.SetGenericMatch(ETrue);
|
williamr@4
|
72 |
TAny* symbianElf = REComSession::CreateImplementationL(KCCoreDumpFormatterUid, _FOFF(CCoreDumpFormatter, iDtor_ID_Key),
|
williamr@4
|
73 |
resolverParams);
|
williamr@4
|
74 |
return reinterpret_cast<CCoreDumpFormatter*>(symbianElf);
|
williamr@4
|
75 |
}
|
williamr@4
|
76 |
|
williamr@4
|
77 |
|
williamr@4
|
78 |
inline CCoreDumpFormatter* CCoreDumpFormatter::NewL(const TUid& aUid)
|
williamr@4
|
79 |
{
|
williamr@4
|
80 |
LOG_MSG( "CCoreDumpFormatter::NewL(const TUid& aUid)\n" );
|
williamr@4
|
81 |
|
williamr@4
|
82 |
LOG_MSG2( "->REComSession::CreateImplementationL(aUid=0x%X)\n", (aUid) );
|
williamr@4
|
83 |
|
williamr@4
|
84 |
TAny* symbianElf = REComSession::CreateImplementationL( aUid, _FOFF(CCoreDumpFormatter, iDtor_ID_Key) );
|
williamr@4
|
85 |
LOG_MSG2( "<-REComSession::CreateImplementationL() iDtor_ID_Key=0x%X\n", _FOFF(CCoreDumpFormatter, iDtor_ID_Key) );
|
williamr@4
|
86 |
|
williamr@4
|
87 |
return reinterpret_cast<CCoreDumpFormatter*>(symbianElf);
|
williamr@4
|
88 |
}
|
williamr@4
|
89 |
|
williamr@4
|
90 |
|
williamr@4
|
91 |
inline void CCoreDumpFormatter::ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray)
|
williamr@4
|
92 |
{
|
williamr@4
|
93 |
REComSession::ListImplementationsL(KCCoreDumpFormatterUid, aImplInfoArray);
|
williamr@4
|
94 |
}
|