epoc32/include/tools/coredump/crashdatasave.inl
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/tools/coredump/crashdatasave.inl	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,78 @@
     1.4 +// Copyright (c) 2007-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 +// Implements some of the ECOM Core Dump Writer interface.
    1.18 +// The rest is implemented by the inheritors.
    1.19 +//
    1.20 +
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @publishedPartner 
    1.26 + @released
    1.27 + @see CCrashDataSave
    1.28 +*/
    1.29 +
    1.30 +// Set default to be first implementation found by resolver
    1.31 +_LIT8(KDefaultImpl, "*");
    1.32 +
    1.33 +inline CCrashDataSave::~CCrashDataSave()
    1.34 +    {
    1.35 +    // Destroy any instance variables and then
    1.36 +    // inform the framework that this specific
    1.37 +    // instance of the interface has been destroyed.
    1.38 +    REComSession::DestroyedImplementation(iDtor_ID_Key);
    1.39 +    }
    1.40 +
    1.41 +inline CCrashDataSave* CCrashDataSave::NewL()
    1.42 +    {
    1.43 +    // Set up the interface find for the default resolver.
    1.44 +    TEComResolverParams resolverParams;
    1.45 +    resolverParams.SetDataType(KDefaultImpl());
    1.46 +    resolverParams.SetGenericMatch(ETrue);     // Allow wildcard matching
    1.47 +
    1.48 +    // Set up some empty initialisation parameters
    1.49 +    TExampleInterfaceInitParams initParams;
    1.50 +    initParams.integer      = 0;
    1.51 +    initParams.descriptor   = NULL;
    1.52 +
    1.53 +    return reinterpret_cast<CCrashDataSave*>(
    1.54 +                            REComSession::CreateImplementationL(KCCrashDataSaveUid,
    1.55 +                                                             _FOFF(CCrashDataSave, iDtor_ID_Key),
    1.56 +                                                             &initParams,
    1.57 +                                                             resolverParams));
    1.58 +    }
    1.59 +
    1.60 +inline CCrashDataSave* CCrashDataSave::NewL(const TDesC8& aCue)
    1.61 +	{
    1.62 +	TEComResolverParams resolverParams;
    1.63 +	resolverParams.SetDataType(aCue);
    1.64 +	resolverParams.SetGenericMatch(ETrue);
    1.65 +	TAny* fileWriter = REComSession::CreateImplementationL(KCCrashDataSaveUid, _FOFF(CCrashDataSave, iDtor_ID_Key),
    1.66 +		resolverParams);
    1.67 +	return reinterpret_cast<CCrashDataSave*>(fileWriter);
    1.68 +	}
    1.69 +
    1.70 +inline CCrashDataSave* CCrashDataSave::NewL(const TUid& aUid)
    1.71 +	{
    1.72 +	TAny* fileWriter = REComSession::CreateImplementationL(aUid, _FOFF(CCrashDataSave, iDtor_ID_Key));
    1.73 +	return reinterpret_cast<CCrashDataSave*>(fileWriter);
    1.74 +	}
    1.75 +
    1.76 +inline void CCrashDataSave::ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray)
    1.77 +	{
    1.78 +	REComSession::ListImplementationsL(KCCrashDataSaveUid, aImplInfoArray);
    1.79 +	}
    1.80 +
    1.81 +