epoc32/include/tools/coredump/formatterapi.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     2
// All rights reserved.
williamr@4
     3
// This component and the accompanying materials are made available
williamr@4
     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
williamr@4
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@4
     7
//
williamr@4
     8
// Initial Contributors:
williamr@4
     9
// Nokia Corporation - initial contribution.
williamr@4
    10
//
williamr@4
    11
// Contributors:
williamr@4
    12
//
williamr@4
    13
// Description:
williamr@4
    14
//
williamr@4
    15
williamr@4
    16
#ifndef FORMATTER_API_H
williamr@4
    17
#define FORMATTER_API_H
williamr@4
    18
williamr@4
    19
/**
williamr@4
    20
@file
williamr@4
    21
@publishedPartner
williamr@4
    22
@released
williamr@4
    23
williamr@4
    24
Defines the ECOM Core Dump Formatting interface. 
williamr@4
    25
williamr@4
    26
*/
williamr@4
    27
williamr@4
    28
#include <e32base.h>
williamr@4
    29
#include <badesca.h>
williamr@4
    30
#include <ecom.h>
williamr@4
    31
#include <ImplementationInformation.h>
williamr@4
    32
#include <crashdata.h>
williamr@4
    33
williamr@4
    34
/**
williamr@4
    35
This is the ECOM interface UID that all Formatter ECOM plugins supporting this interface
williamr@4
    36
must implement. This must match with the implementation_uid field of the rss file.
williamr@4
    37
*/
williamr@4
    38
const TUid KCCoreDumpFormatterUid = {0x10282fe2};
williamr@4
    39
williamr@4
    40
class CCrashDataSource;
williamr@4
    41
class CCrashDataSave;
williamr@4
    42
class COptionConfig;
williamr@4
    43
williamr@4
    44
/**
williamr@4
    45
@publishedPartner
williamr@4
    46
@released
williamr@4
    47
williamr@4
    48
Definition of the ECOM Core Dump Formatting interface. 
williamr@4
    49
The interface is pure virtual. Formatters must implement this interface for the 
williamr@4
    50
core dump server to be able to load them.
williamr@4
    51
*/
williamr@4
    52
class CCoreDumpFormatter : public CBase
williamr@4
    53
{
williamr@4
    54
williamr@4
    55
public:
williamr@4
    56
williamr@4
    57
    /** Interface for passing initialisation parameters
williamr@4
    58
    to the derived class constructor. Standard ECOM implementation. 
williamr@4
    59
	*/
williamr@4
    60
    struct TExampleInterfaceInitParams
williamr@4
    61
        {
williamr@4
    62
		/** Integer cue */
williamr@4
    63
        TInt integer;
williamr@4
    64
		/** Descriptor cue */
williamr@4
    65
        const TDesC* descriptor;
williamr@4
    66
        };
williamr@4
    67
williamr@4
    68
	// mandatory ECOM functions
williamr@4
    69
williamr@4
    70
	static CCoreDumpFormatter* NewL();
williamr@4
    71
	static CCoreDumpFormatter* NewL( const TDesC8 & aCue );
williamr@4
    72
	static CCoreDumpFormatter* NewL(const TUid& aUid);
williamr@4
    73
williamr@4
    74
	virtual ~CCoreDumpFormatter();
williamr@4
    75
	static void ListAllImplementationsL( RImplInfoPtrArray & aImplInfoArray );
williamr@4
    76
williamr@4
    77
public:
williamr@4
    78
	// The formatter interface
williamr@4
    79
williamr@4
    80
williamr@4
    81
	/**
williamr@4
    82
	Core dump server makes this call to supply the formatter with the 
williamr@4
    83
	data save object. The formatter can then use this object to store 
williamr@4
    84
	its crash data. The formatter does not own the object.
williamr@4
    85
	@param aDataSave Data save object to save crash data to.
williamr@4
    86
	@see CCrashDataSave 
williamr@4
    87
	*/
williamr@4
    88
	virtual void ConfigureDataSaveL( CCrashDataSave * aDataSave ) = 0;
williamr@4
    89
williamr@4
    90
	/**
williamr@4
    91
	Core dump server makes this call to supply the formatter with the 
williamr@4
    92
	data source object. The formatter can then use this object to obtain
williamr@4
    93
	crash data. The formatter does not own the object.
williamr@4
    94
	@param aDataSource Data source object to obtain crash data from.
williamr@4
    95
	@see CCrashDataSource
williamr@4
    96
	*/
williamr@4
    97
	virtual void ConfigureDataSourceL( CCrashDataSource * aDataSource ) = 0;
williamr@4
    98
williamr@4
    99
	/**
williamr@4
   100
	Call used to obtain a text description of the formatter. Can be used by
williamr@4
   101
	UIs to present a description to the user.
williamr@4
   102
	@param aPluginDescription Descriptor with formatter descriptor.
williamr@4
   103
	*/
williamr@4
   104
	virtual void GetDescription( TDes & aPluginDescription ) = 0;
williamr@4
   105
williamr@4
   106
	/** 
williamr@4
   107
	This method informs the formatter that a crash event has occured. 
williamr@4
   108
	Called by Core Dump Server, which owns the TCrashInfo object.
williamr@4
   109
	@param aCrashInfo Crash event information with crash data. 
williamr@4
   110
	Object is owned by caller.
williamr@4
   111
	@see TCrashInfo
williamr@4
   112
	*/
williamr@4
   113
    virtual void CrashEventL(TCrashInfo* aCrashInfo) = 0;
williamr@4
   114
williamr@4
   115
	/** 
williamr@4
   116
	Used to obtain the number of configuration parameters implemented by the 
williamr@4
   117
	formatter. Use this call in conjunction with GetConfigParameterL().
williamr@4
   118
	@return Number of configuration parameters implemented by formatter.
williamr@4
   119
	@see COptionConfig
williamr@4
   120
	*/
williamr@4
   121
	virtual TInt GetNumberConfigParametersL( ) = 0;
williamr@4
   122
williamr@4
   123
	/** 
williamr@4
   124
	Return the configuration parameter indexed by aIndex. aIndex should be less
williamr@4
   125
	than the value returned by GetNumberConfigParametersL().
williamr@4
   126
	@param aIndex Parameter ordinal to retrieve.
williamr@4
   127
	@return Pointer to a COptionConfig object that is then owned by the caller.
williamr@4
   128
	@see COptionConfig.
williamr@4
   129
	@see GetNumberConfigParametersL().
williamr@4
   130
	*/
williamr@4
   131
	virtual COptionConfig * GetConfigParameterL( const TInt aIndex ) = 0;
williamr@4
   132
williamr@4
   133
	/** 
williamr@4
   134
	Set the value of a configuration parameters indexed by aIndex. 
williamr@4
   135
	@param  aIndex Parameter ordinal to change.
williamr@4
   136
	@param  aValue Integer value.
williamr@4
   137
	@param  aDescValue Descriptor value.
williamr@4
   138
	@see COptionConfig
williamr@4
   139
	*/
williamr@4
   140
	virtual void SetConfigParameterL( const TInt aIndex, 
williamr@4
   141
									const TInt32 & aValue, 
williamr@4
   142
									const TDesC & aDescValue ) = 0;
williamr@4
   143
	
williamr@4
   144
protected:
williamr@4
   145
	CCoreDumpFormatter();
williamr@4
   146
williamr@4
   147
private:
williamr@4
   148
	
williamr@4
   149
	TUid iDtor_ID_Key;
williamr@4
   150
williamr@4
   151
	TUint32 iSpare1;
williamr@4
   152
	TUint32 iSpare2;
williamr@4
   153
};
williamr@4
   154
williamr@4
   155
#include <formatterapi.inl>
williamr@4
   156
williamr@4
   157
#endif // FORMATTER_API_H