dbgsrv/coredumpserver/interface/datasave/crashdatasave.inl
changeset 0 c6b0df440bee
equal deleted inserted replaced
-1:000000000000 0:c6b0df440bee
       
     1 // Copyright (c) 2007-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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Implements some of the ECOM Core Dump Writer interface.
       
    15 // The rest is implemented by the inheritors.
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @publishedPartner 
       
    23  @released
       
    24  @see CCrashDataSave
       
    25 */
       
    26 
       
    27 // Set default to be first implementation found by resolver
       
    28 _LIT8(KDefaultImpl, "*");
       
    29 
       
    30 inline CCrashDataSave::~CCrashDataSave()
       
    31     {
       
    32     // Destroy any instance variables and then
       
    33     // inform the framework that this specific
       
    34     // instance of the interface has been destroyed.
       
    35     REComSession::DestroyedImplementation(iDtor_ID_Key);
       
    36     }
       
    37 
       
    38 inline CCrashDataSave* CCrashDataSave::NewL()
       
    39     {
       
    40     // Set up the interface find for the default resolver.
       
    41     TEComResolverParams resolverParams;
       
    42     resolverParams.SetDataType(KDefaultImpl());
       
    43     resolverParams.SetGenericMatch(ETrue);     // Allow wildcard matching
       
    44 
       
    45     // Set up some empty initialisation parameters
       
    46     TExampleInterfaceInitParams initParams;
       
    47     initParams.integer      = 0;
       
    48     initParams.descriptor   = NULL;
       
    49 
       
    50     return reinterpret_cast<CCrashDataSave*>(
       
    51                             REComSession::CreateImplementationL(KCCrashDataSaveUid,
       
    52                                                              _FOFF(CCrashDataSave, iDtor_ID_Key),
       
    53                                                              &initParams,
       
    54                                                              resolverParams));
       
    55     }
       
    56 
       
    57 inline CCrashDataSave* CCrashDataSave::NewL(const TDesC8& aCue)
       
    58 	{
       
    59 	TEComResolverParams resolverParams;
       
    60 	resolverParams.SetDataType(aCue);
       
    61 	resolverParams.SetGenericMatch(ETrue);
       
    62 	TAny* fileWriter = REComSession::CreateImplementationL(KCCrashDataSaveUid, _FOFF(CCrashDataSave, iDtor_ID_Key),
       
    63 		resolverParams);
       
    64 	return reinterpret_cast<CCrashDataSave*>(fileWriter);
       
    65 	}
       
    66 
       
    67 inline CCrashDataSave* CCrashDataSave::NewL(const TUid& aUid)
       
    68 	{
       
    69 	TAny* fileWriter = REComSession::CreateImplementationL(aUid, _FOFF(CCrashDataSave, iDtor_ID_Key));
       
    70 	return reinterpret_cast<CCrashDataSave*>(fileWriter);
       
    71 	}
       
    72 
       
    73 inline void CCrashDataSave::ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray)
       
    74 	{
       
    75 	REComSession::ListImplementationsL(KCCrashDataSaveUid, aImplInfoArray);
       
    76 	}
       
    77 
       
    78