1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/tools/coredump/formatterapi.inl Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,94 @@
1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Implement some of the ECOM Core Dump Formatter interface.
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @publishedPartner
1.25 + @released
1.26 +*/
1.27 +
1.28 +// Set default to be first implementation found by resolver
1.29 +_LIT8(KDefaultImplementation,"*");
1.30 +
1.31 +#include <debuglogging.h>
1.32 +
1.33 +inline CCoreDumpFormatter::CCoreDumpFormatter()
1.34 + {
1.35 + LOG_MSG( "CCoreDumpFormatter::CCoreDumpFormatter()\n" );
1.36 + }
1.37 +
1.38 +inline CCoreDumpFormatter::~CCoreDumpFormatter()
1.39 + {
1.40 + LOG_MSG2( "CCoreDumpFormatter::~CCoreDumpFormatter() with iDtor_ID_Key=0x%X\n", iDtor_ID_Key );
1.41 + // Destroy any instance variables and then
1.42 + // inform the framework that this specific
1.43 + // instance of the interface has been destroyed.
1.44 + REComSession::DestroyedImplementation( iDtor_ID_Key );
1.45 + }
1.46 +
1.47 +inline CCoreDumpFormatter* CCoreDumpFormatter::NewL()
1.48 + {
1.49 + LOG_MSG( "CCoreDumpFormatter::NewL()\n" );
1.50 + // Set up the interface find for the default resolver.
1.51 + TEComResolverParams resolverParams;
1.52 + resolverParams.SetDataType(KDefaultImplementation());
1.53 + //resolverParams.SetGenericMatch(ETrue); // Allow wildcard matching
1.54 + resolverParams.SetWildcardMatch(ETrue); // Allow wildcard matching
1.55 +
1.56 + // Set up some empty initialisation parameters
1.57 + TExampleInterfaceInitParams initParams;
1.58 + initParams.integer = 0;
1.59 + initParams.descriptor = NULL;
1.60 +
1.61 + return reinterpret_cast<CCoreDumpFormatter*>(
1.62 + REComSession::CreateImplementationL(KCCoreDumpFormatterUid,
1.63 + _FOFF(CCoreDumpFormatter,iDtor_ID_Key),
1.64 + &initParams,
1.65 + resolverParams));
1.66 + }
1.67 +
1.68 +inline CCoreDumpFormatter* CCoreDumpFormatter::NewL(const TDesC8& aCue)
1.69 + {
1.70 + LOG_MSG( "CCoreDumpFormatter::NewL(const TDesC8& aCue)\n" );
1.71 +
1.72 + TEComResolverParams resolverParams;
1.73 + resolverParams.SetDataType(aCue);
1.74 + resolverParams.SetGenericMatch(ETrue);
1.75 + TAny* symbianElf = REComSession::CreateImplementationL(KCCoreDumpFormatterUid, _FOFF(CCoreDumpFormatter, iDtor_ID_Key),
1.76 + resolverParams);
1.77 + return reinterpret_cast<CCoreDumpFormatter*>(symbianElf);
1.78 + }
1.79 +
1.80 +
1.81 +inline CCoreDumpFormatter* CCoreDumpFormatter::NewL(const TUid& aUid)
1.82 + {
1.83 + LOG_MSG( "CCoreDumpFormatter::NewL(const TUid& aUid)\n" );
1.84 +
1.85 + LOG_MSG2( "->REComSession::CreateImplementationL(aUid=0x%X)\n", (aUid) );
1.86 +
1.87 + TAny* symbianElf = REComSession::CreateImplementationL( aUid, _FOFF(CCoreDumpFormatter, iDtor_ID_Key) );
1.88 + LOG_MSG2( "<-REComSession::CreateImplementationL() iDtor_ID_Key=0x%X\n", _FOFF(CCoreDumpFormatter, iDtor_ID_Key) );
1.89 +
1.90 + return reinterpret_cast<CCoreDumpFormatter*>(symbianElf);
1.91 + }
1.92 +
1.93 +
1.94 +inline void CCoreDumpFormatter::ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray)
1.95 + {
1.96 + REComSession::ListImplementationsL(KCCoreDumpFormatterUid, aImplInfoArray);
1.97 + }