1 // Copyright (c) 2006-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef FORMATTER_API_H
17 #define FORMATTER_API_H
24 Defines the ECOM Core Dump Formatting interface.
31 #include <ImplementationInformation.h>
32 #include <crashdata.h>
35 This is the ECOM interface UID that all Formatter ECOM plugins supporting this interface
36 must implement. This must match with the implementation_uid field of the rss file.
38 const TUid KCCoreDumpFormatterUid = {0x10282fe2};
40 class CCrashDataSource;
48 Definition of the ECOM Core Dump Formatting interface.
49 The interface is pure virtual. Formatters must implement this interface for the
50 core dump server to be able to load them.
52 class CCoreDumpFormatter : public CBase
57 /** Interface for passing initialisation parameters
58 to the derived class constructor. Standard ECOM implementation.
60 struct TExampleInterfaceInitParams
65 const TDesC* descriptor;
68 // mandatory ECOM functions
70 static CCoreDumpFormatter* NewL();
71 static CCoreDumpFormatter* NewL( const TDesC8 & aCue );
72 static CCoreDumpFormatter* NewL(const TUid& aUid);
74 virtual ~CCoreDumpFormatter();
75 static void ListAllImplementationsL( RImplInfoPtrArray & aImplInfoArray );
78 // The formatter interface
82 Core dump server makes this call to supply the formatter with the
83 data save object. The formatter can then use this object to store
84 its crash data. The formatter does not own the object.
85 @param aDataSave Data save object to save crash data to.
88 virtual void ConfigureDataSaveL( CCrashDataSave * aDataSave ) = 0;
91 Core dump server makes this call to supply the formatter with the
92 data source object. The formatter can then use this object to obtain
93 crash data. The formatter does not own the object.
94 @param aDataSource Data source object to obtain crash data from.
97 virtual void ConfigureDataSourceL( CCrashDataSource * aDataSource ) = 0;
100 Call used to obtain a text description of the formatter. Can be used by
101 UIs to present a description to the user.
102 @param aPluginDescription Descriptor with formatter descriptor.
104 virtual void GetDescription( TDes & aPluginDescription ) = 0;
107 This method informs the formatter that a crash event has occured.
108 Called by Core Dump Server, which owns the TCrashInfo object.
109 @param aCrashInfo Crash event information with crash data.
110 Object is owned by caller.
113 virtual void CrashEventL(TCrashInfo* aCrashInfo) = 0;
116 Used to obtain the number of configuration parameters implemented by the
117 formatter. Use this call in conjunction with GetConfigParameterL().
118 @return Number of configuration parameters implemented by formatter.
121 virtual TInt GetNumberConfigParametersL( ) = 0;
124 Return the configuration parameter indexed by aIndex. aIndex should be less
125 than the value returned by GetNumberConfigParametersL().
126 @param aIndex Parameter ordinal to retrieve.
127 @return Pointer to a COptionConfig object that is then owned by the caller.
129 @see GetNumberConfigParametersL().
131 virtual COptionConfig * GetConfigParameterL( const TInt aIndex ) = 0;
134 Set the value of a configuration parameters indexed by aIndex.
135 @param aIndex Parameter ordinal to change.
136 @param aValue Integer value.
137 @param aDescValue Descriptor value.
140 virtual void SetConfigParameterL( const TInt aIndex,
141 const TInt32 & aValue,
142 const TDesC & aDescValue ) = 0;
145 CCoreDumpFormatter();
155 #include <formatterapi.inl>
157 #endif // FORMATTER_API_H