1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/tools/coredump/formatterapi.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,157 @@
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 +//
1.18 +
1.19 +#ifndef FORMATTER_API_H
1.20 +#define FORMATTER_API_H
1.21 +
1.22 +/**
1.23 +@file
1.24 +@publishedPartner
1.25 +@released
1.26 +
1.27 +Defines the ECOM Core Dump Formatting interface.
1.28 +
1.29 +*/
1.30 +
1.31 +#include <e32base.h>
1.32 +#include <badesca.h>
1.33 +#include <ecom.h>
1.34 +#include <ImplementationInformation.h>
1.35 +#include <crashdata.h>
1.36 +
1.37 +/**
1.38 +This is the ECOM interface UID that all Formatter ECOM plugins supporting this interface
1.39 +must implement. This must match with the implementation_uid field of the rss file.
1.40 +*/
1.41 +const TUid KCCoreDumpFormatterUid = {0x10282fe2};
1.42 +
1.43 +class CCrashDataSource;
1.44 +class CCrashDataSave;
1.45 +class COptionConfig;
1.46 +
1.47 +/**
1.48 +@publishedPartner
1.49 +@released
1.50 +
1.51 +Definition of the ECOM Core Dump Formatting interface.
1.52 +The interface is pure virtual. Formatters must implement this interface for the
1.53 +core dump server to be able to load them.
1.54 +*/
1.55 +class CCoreDumpFormatter : public CBase
1.56 +{
1.57 +
1.58 +public:
1.59 +
1.60 + /** Interface for passing initialisation parameters
1.61 + to the derived class constructor. Standard ECOM implementation.
1.62 + */
1.63 + struct TExampleInterfaceInitParams
1.64 + {
1.65 + /** Integer cue */
1.66 + TInt integer;
1.67 + /** Descriptor cue */
1.68 + const TDesC* descriptor;
1.69 + };
1.70 +
1.71 + // mandatory ECOM functions
1.72 +
1.73 + static CCoreDumpFormatter* NewL();
1.74 + static CCoreDumpFormatter* NewL( const TDesC8 & aCue );
1.75 + static CCoreDumpFormatter* NewL(const TUid& aUid);
1.76 +
1.77 + virtual ~CCoreDumpFormatter();
1.78 + static void ListAllImplementationsL( RImplInfoPtrArray & aImplInfoArray );
1.79 +
1.80 +public:
1.81 + // The formatter interface
1.82 +
1.83 +
1.84 + /**
1.85 + Core dump server makes this call to supply the formatter with the
1.86 + data save object. The formatter can then use this object to store
1.87 + its crash data. The formatter does not own the object.
1.88 + @param aDataSave Data save object to save crash data to.
1.89 + @see CCrashDataSave
1.90 + */
1.91 + virtual void ConfigureDataSaveL( CCrashDataSave * aDataSave ) = 0;
1.92 +
1.93 + /**
1.94 + Core dump server makes this call to supply the formatter with the
1.95 + data source object. The formatter can then use this object to obtain
1.96 + crash data. The formatter does not own the object.
1.97 + @param aDataSource Data source object to obtain crash data from.
1.98 + @see CCrashDataSource
1.99 + */
1.100 + virtual void ConfigureDataSourceL( CCrashDataSource * aDataSource ) = 0;
1.101 +
1.102 + /**
1.103 + Call used to obtain a text description of the formatter. Can be used by
1.104 + UIs to present a description to the user.
1.105 + @param aPluginDescription Descriptor with formatter descriptor.
1.106 + */
1.107 + virtual void GetDescription( TDes & aPluginDescription ) = 0;
1.108 +
1.109 + /**
1.110 + This method informs the formatter that a crash event has occured.
1.111 + Called by Core Dump Server, which owns the TCrashInfo object.
1.112 + @param aCrashInfo Crash event information with crash data.
1.113 + Object is owned by caller.
1.114 + @see TCrashInfo
1.115 + */
1.116 + virtual void CrashEventL(TCrashInfo* aCrashInfo) = 0;
1.117 +
1.118 + /**
1.119 + Used to obtain the number of configuration parameters implemented by the
1.120 + formatter. Use this call in conjunction with GetConfigParameterL().
1.121 + @return Number of configuration parameters implemented by formatter.
1.122 + @see COptionConfig
1.123 + */
1.124 + virtual TInt GetNumberConfigParametersL( ) = 0;
1.125 +
1.126 + /**
1.127 + Return the configuration parameter indexed by aIndex. aIndex should be less
1.128 + than the value returned by GetNumberConfigParametersL().
1.129 + @param aIndex Parameter ordinal to retrieve.
1.130 + @return Pointer to a COptionConfig object that is then owned by the caller.
1.131 + @see COptionConfig.
1.132 + @see GetNumberConfigParametersL().
1.133 + */
1.134 + virtual COptionConfig * GetConfigParameterL( const TInt aIndex ) = 0;
1.135 +
1.136 + /**
1.137 + Set the value of a configuration parameters indexed by aIndex.
1.138 + @param aIndex Parameter ordinal to change.
1.139 + @param aValue Integer value.
1.140 + @param aDescValue Descriptor value.
1.141 + @see COptionConfig
1.142 + */
1.143 + virtual void SetConfigParameterL( const TInt aIndex,
1.144 + const TInt32 & aValue,
1.145 + const TDesC & aDescValue ) = 0;
1.146 +
1.147 +protected:
1.148 + CCoreDumpFormatter();
1.149 +
1.150 +private:
1.151 +
1.152 + TUid iDtor_ID_Key;
1.153 +
1.154 + TUint32 iSpare1;
1.155 + TUint32 iSpare2;
1.156 +};
1.157 +
1.158 +#include <formatterapi.inl>
1.159 +
1.160 +#endif // FORMATTER_API_H