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.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef FORMATTER_API_H
    17 #define FORMATTER_API_H
    18 
    19 /**
    20 @file
    21 @publishedPartner
    22 @released
    23 
    24 Defines the ECOM Core Dump Formatting interface. 
    25 
    26 */
    27 
    28 #include <e32base.h>
    29 #include <badesca.h>
    30 #include <ecom.h>
    31 #include <ImplementationInformation.h>
    32 #include <crashdata.h>
    33 
    34 /**
    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.
    37 */
    38 const TUid KCCoreDumpFormatterUid = {0x10282fe2};
    39 
    40 class CCrashDataSource;
    41 class CCrashDataSave;
    42 class COptionConfig;
    43 
    44 /**
    45 @publishedPartner
    46 @released
    47 
    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.
    51 */
    52 class CCoreDumpFormatter : public CBase
    53 {
    54 
    55 public:
    56 
    57     /** Interface for passing initialisation parameters
    58     to the derived class constructor. Standard ECOM implementation. 
    59 	*/
    60     struct TExampleInterfaceInitParams
    61         {
    62 		/** Integer cue */
    63         TInt integer;
    64 		/** Descriptor cue */
    65         const TDesC* descriptor;
    66         };
    67 
    68 	// mandatory ECOM functions
    69 
    70 	static CCoreDumpFormatter* NewL();
    71 	static CCoreDumpFormatter* NewL( const TDesC8 & aCue );
    72 	static CCoreDumpFormatter* NewL(const TUid& aUid);
    73 
    74 	virtual ~CCoreDumpFormatter();
    75 	static void ListAllImplementationsL( RImplInfoPtrArray & aImplInfoArray );
    76 
    77 public:
    78 	// The formatter interface
    79 
    80 
    81 	/**
    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.
    86 	@see CCrashDataSave 
    87 	*/
    88 	virtual void ConfigureDataSaveL( CCrashDataSave * aDataSave ) = 0;
    89 
    90 	/**
    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.
    95 	@see CCrashDataSource
    96 	*/
    97 	virtual void ConfigureDataSourceL( CCrashDataSource * aDataSource ) = 0;
    98 
    99 	/**
   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.
   103 	*/
   104 	virtual void GetDescription( TDes & aPluginDescription ) = 0;
   105 
   106 	/** 
   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.
   111 	@see TCrashInfo
   112 	*/
   113     virtual void CrashEventL(TCrashInfo* aCrashInfo) = 0;
   114 
   115 	/** 
   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.
   119 	@see COptionConfig
   120 	*/
   121 	virtual TInt GetNumberConfigParametersL( ) = 0;
   122 
   123 	/** 
   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.
   128 	@see COptionConfig.
   129 	@see GetNumberConfigParametersL().
   130 	*/
   131 	virtual COptionConfig * GetConfigParameterL( const TInt aIndex ) = 0;
   132 
   133 	/** 
   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.
   138 	@see COptionConfig
   139 	*/
   140 	virtual void SetConfigParameterL( const TInt aIndex, 
   141 									const TInt32 & aValue, 
   142 									const TDesC & aDescValue ) = 0;
   143 	
   144 protected:
   145 	CCoreDumpFormatter();
   146 
   147 private:
   148 	
   149 	TUid iDtor_ID_Key;
   150 
   151 	TUint32 iSpare1;
   152 	TUint32 iSpare2;
   153 };
   154 
   155 #include <formatterapi.inl>
   156 
   157 #endif // FORMATTER_API_H