epoc32/include/tools/coredump/coredumpserverapi.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) 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 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 // Definitions used between the Core Dump Server interface library and the server.
    15 //
    16 
    17 
    18 
    19 /**
    20  @file
    21  @publishedPartner 
    22  @released
    23 */
    24 
    25 #ifndef CORE_DUMP_SERVER_API_H
    26 #define CORE_DUMP_SERVER_API_H
    27 
    28 #include <plugindata.h>
    29 
    30 /** Core Dump Server executable name */
    31 _LIT(KCoreDumpServerName, "coredump_svr");
    32 
    33 /** Core Dump Server UID */
    34 const TUid KCoreDumpServUid = { 0x10282FE5 };
    35 
    36 /** Core Dump Server major version */
    37 const TUint KCoreDumpServMajorVersionNumber=1;
    38 
    39 /** Core Dump Server minor version */
    40 const TUint KCoreDumpServMinorVersionNumber=0;
    41 
    42 /** Core Dump Server build number */
    43 const TUint KCoreDumpServBuildVersionNumber=1;
    44 
    45 /** 
    46 Core Dump Server client-server requests 
    47 @internalTechnology 
    48 */
    49 enum TCoreDumpServRqst
    50 	{
    51 	/** Obtain a plugin list. 
    52 	@see RCoreDumpSession::GetPluginListL(). */
    53 	ECoreDumpServGetPluginList,
    54 	
    55 	/** Generic call to obtain data about a list from the Core Dump Server. 
    56 	@see RCoreDumpSession::GetListLC(). */
    57 	ECoreDumpGetListInfo,
    58 
    59 	/** Generic call to obtain the list from the Core Dump Server. 
    60 	@see RCoreDumpSession::GetListLC(). */
    61 	ECoreDumpGetListData,
    62 
    63 	/** Request the loading or unloading of a plugin. 
    64 	@see RCoreDumpSession::PluginRequestL(). */
    65 	ECoreDumpPluginRequest,
    66 
    67 	/** Obtain the current number of configuration parameters. 
    68 	@see RCoreDumpSession::GetNumberConfigParametersL(). */
    69 	ECoreDumpGetNumberConfigParams,
    70 
    71 	/**  Obtain a configuration parameter.
    72 	@see RCoreDumpSession::GetConfigParameterL(). */
    73 	ECoreDumpGetConfigParam,
    74 
    75 	/**  Change a configuration parameter.
    76 	@see RCoreDumpSession::SetConfigParameterL(). */
    77 	ECoreDumpSetConfigParam,
    78 
    79 
    80 	/** Unused */
    81     ECoreDumpAttachThread,
    82 
    83 	/** Unused */
    84     ECoreDumpDetachThread,
    85 
    86 	/** Unused */
    87     ECoreDumpAttachProcess,
    88 
    89 	/** Unused */
    90     ECoreDumpDetachProcess,
    91 
    92 	/** Request the observation of a target or the cancellation of an observation.
    93 	@see RCoreDumpSession::ObservationRequestL(). */
    94     ECoreDumpObservationRequest,
    95 
    96 	/** Request the restoration of a configuration.
    97 	@see RCoreDumpSession::LoadConfigL(). */
    98 	ECoreDumpLoadConfig,
    99 
   100 	/** Request the saving of a configuration.
   101 	@see RCoreDumpSession::SaveConfigL(). */
   102 	ECoreDumpSaveConfig,
   103 	
   104 	/**	Guard	*/
   105 	ECoreDumpServEndMarker
   106 	
   107 	};
   108 
   109 /** Number of asynchronous requests */
   110 #define KTTMaxAsyncRequests		(4)
   111 
   112 /** Default number of message slots per session
   113 Same as KTTMaxAsyncRequests as synchronous requests provided
   114 by framework */
   115 #define KTTDefaultMessageSlots	(KTTMaxAsyncRequests)
   116 
   117 
   118 /**
   119 @internalTechnology
   120 Number of plugin details in a plugin transfer block. 
   121 Used between server library and cds
   122 */
   123 #define KNumPluginDetails 5
   124 
   125 
   126 /**
   127 @internalTechnology
   128 Class used for transfering fixed sized blocks of plugin information 
   129 between the Core Dump Server and its clients. This makes it easier
   130 accross the client/server interface.
   131 @see TPluginInfo
   132 */
   133 class TPluginInfoBlock
   134 {
   135 public:
   136 
   137 	/**	
   138 	A simple array is used as the transfer block across the 
   139 	process boundary.
   140 	*/
   141 	TPluginInfo plugins[ KNumPluginDetails ];
   142 };
   143 
   144 
   145 /**
   146 Enumerations that identify the RProperty objects shared between various parts 
   147 of the core dump server system, plugins and clients.
   148 
   149 The properties are defined by the Core Dump Session at startup. 
   150 These properties have the uid of the Core Dump Server.
   151 
   152 @publishedPartner 
   153 @released
   154 @see CCoreDumpSession::ConstructL().
   155 */
   156 enum TCrashProgress 
   157 	{ 
   158 	/** Current crash status. Updated by formatters during a crash. 
   159 	RProperty of type RProperty::EText. */
   160 	ECrashProgress, 
   161 
   162 	/** Cancels the generation of a crash when set to non-zero.
   163 	RProperty of type RProperty::EInt. */
   164 	ECancelCrash,
   165 
   166 	/** Number of crashes served by this session of the Core Dump Server.
   167 	RProperty of type RProperty::EInt. */
   168 	ECrashCount
   169 	};
   170 
   171 
   172 
   173 /**
   174 @publishedPartner 
   175 @released
   176 
   177 Class for requesting lists from the Core Dump Server. 
   178 The requestor appends the results of each request to obtain an entire list.
   179 Uses "T<type>InfoBlock" classes to transfer data accross the process boundary.
   180 */
   181 class TListRequest
   182 {
   183 public:
   184 
   185 	/** Type of data to supply for this request */
   186 	enum TListRequestType
   187 		{
   188 		/** This request is for the formatter plugin list */
   189 		EFormatterList,
   190 
   191 		/** This request is for the writer plugin list */
   192 		EWriterList,
   193 
   194 		/** This request is for the thread list */
   195 		EThreadList,
   196 
   197 		/** This request is for the process list */
   198 		EProcessList,
   199 
   200 		/** This request is for the executable list */
   201 		EExecutableList,
   202 
   203 		/** 
   204 		@internalTechnology
   205 		Last marker 
   206 		*/
   207 		EUnknownRequest
   208 
   209 		};
   210 
   211 	/** Type of data to supply for this request */
   212 	TListRequestType	iListType;
   213 
   214 	/** Sub identifiers for the request. These are auxiliary ids that 
   215 	can be used to refine the request. */
   216 	TUint32				iSubId1;
   217 	TUint32				iSubId2;
   218 
   219 	/** Requestor sets iIndex. iIndex==0 means the supplier should refresh the 
   220 	list and supply from index 0. iIndex > 0 means supply element 
   221 	[iIndex-1] and onwards. Requestor should thus increase iIndex 
   222 	by how many elements were supplied on each call. */
   223 	TUint				iIndex;
   224 
   225 	/** Supplier writes iSupplied according to how many items 
   226 	it copied into the buffer on this call */
   227 	TUint				iSupplied;
   228 
   229 	/** Supplier writes iRemaining to indicate how many items it 
   230 	has yet to supply. */
   231 	TUint				iRemaining;
   232 
   233 	/** Number of bytes required to hold the resulting data */
   234 	TUint				iRequiredDescriptorSize;
   235 
   236 	/** 
   237 	Spare variables for future expansion.
   238 	@internalTechnology */
   239 	TUint32				iSpare0;
   240 	/** @internalTechnology */
   241 	TUint32				iSpare1;
   242 	/** @internalTechnology */
   243 	TUint32				iSpare2;
   244 	/** @internalTechnology */
   245 	TUint32				iSpare3;
   246 
   247 };
   248 
   249 
   250 
   251 #endif // CORE_DUMP_SERVER_API_H