1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/tools/coredump/coredumpserverapi.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,251 @@
1.4 +// Copyright (c) 2007-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 +// Definitions used between the Core Dump Server interface library and the server.
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @publishedPartner
1.25 + @released
1.26 +*/
1.27 +
1.28 +#ifndef CORE_DUMP_SERVER_API_H
1.29 +#define CORE_DUMP_SERVER_API_H
1.30 +
1.31 +#include <plugindata.h>
1.32 +
1.33 +/** Core Dump Server executable name */
1.34 +_LIT(KCoreDumpServerName, "coredump_svr");
1.35 +
1.36 +/** Core Dump Server UID */
1.37 +const TUid KCoreDumpServUid = { 0x10282FE5 };
1.38 +
1.39 +/** Core Dump Server major version */
1.40 +const TUint KCoreDumpServMajorVersionNumber=1;
1.41 +
1.42 +/** Core Dump Server minor version */
1.43 +const TUint KCoreDumpServMinorVersionNumber=0;
1.44 +
1.45 +/** Core Dump Server build number */
1.46 +const TUint KCoreDumpServBuildVersionNumber=1;
1.47 +
1.48 +/**
1.49 +Core Dump Server client-server requests
1.50 +@internalTechnology
1.51 +*/
1.52 +enum TCoreDumpServRqst
1.53 + {
1.54 + /** Obtain a plugin list.
1.55 + @see RCoreDumpSession::GetPluginListL(). */
1.56 + ECoreDumpServGetPluginList,
1.57 +
1.58 + /** Generic call to obtain data about a list from the Core Dump Server.
1.59 + @see RCoreDumpSession::GetListLC(). */
1.60 + ECoreDumpGetListInfo,
1.61 +
1.62 + /** Generic call to obtain the list from the Core Dump Server.
1.63 + @see RCoreDumpSession::GetListLC(). */
1.64 + ECoreDumpGetListData,
1.65 +
1.66 + /** Request the loading or unloading of a plugin.
1.67 + @see RCoreDumpSession::PluginRequestL(). */
1.68 + ECoreDumpPluginRequest,
1.69 +
1.70 + /** Obtain the current number of configuration parameters.
1.71 + @see RCoreDumpSession::GetNumberConfigParametersL(). */
1.72 + ECoreDumpGetNumberConfigParams,
1.73 +
1.74 + /** Obtain a configuration parameter.
1.75 + @see RCoreDumpSession::GetConfigParameterL(). */
1.76 + ECoreDumpGetConfigParam,
1.77 +
1.78 + /** Change a configuration parameter.
1.79 + @see RCoreDumpSession::SetConfigParameterL(). */
1.80 + ECoreDumpSetConfigParam,
1.81 +
1.82 +
1.83 + /** Unused */
1.84 + ECoreDumpAttachThread,
1.85 +
1.86 + /** Unused */
1.87 + ECoreDumpDetachThread,
1.88 +
1.89 + /** Unused */
1.90 + ECoreDumpAttachProcess,
1.91 +
1.92 + /** Unused */
1.93 + ECoreDumpDetachProcess,
1.94 +
1.95 + /** Request the observation of a target or the cancellation of an observation.
1.96 + @see RCoreDumpSession::ObservationRequestL(). */
1.97 + ECoreDumpObservationRequest,
1.98 +
1.99 + /** Request the restoration of a configuration.
1.100 + @see RCoreDumpSession::LoadConfigL(). */
1.101 + ECoreDumpLoadConfig,
1.102 +
1.103 + /** Request the saving of a configuration.
1.104 + @see RCoreDumpSession::SaveConfigL(). */
1.105 + ECoreDumpSaveConfig,
1.106 +
1.107 + /** Guard */
1.108 + ECoreDumpServEndMarker
1.109 +
1.110 + };
1.111 +
1.112 +/** Number of asynchronous requests */
1.113 +#define KTTMaxAsyncRequests (4)
1.114 +
1.115 +/** Default number of message slots per session
1.116 +Same as KTTMaxAsyncRequests as synchronous requests provided
1.117 +by framework */
1.118 +#define KTTDefaultMessageSlots (KTTMaxAsyncRequests)
1.119 +
1.120 +
1.121 +/**
1.122 +@internalTechnology
1.123 +Number of plugin details in a plugin transfer block.
1.124 +Used between server library and cds
1.125 +*/
1.126 +#define KNumPluginDetails 5
1.127 +
1.128 +
1.129 +/**
1.130 +@internalTechnology
1.131 +Class used for transfering fixed sized blocks of plugin information
1.132 +between the Core Dump Server and its clients. This makes it easier
1.133 +accross the client/server interface.
1.134 +@see TPluginInfo
1.135 +*/
1.136 +class TPluginInfoBlock
1.137 +{
1.138 +public:
1.139 +
1.140 + /**
1.141 + A simple array is used as the transfer block across the
1.142 + process boundary.
1.143 + */
1.144 + TPluginInfo plugins[ KNumPluginDetails ];
1.145 +};
1.146 +
1.147 +
1.148 +/**
1.149 +Enumerations that identify the RProperty objects shared between various parts
1.150 +of the core dump server system, plugins and clients.
1.151 +
1.152 +The properties are defined by the Core Dump Session at startup.
1.153 +These properties have the uid of the Core Dump Server.
1.154 +
1.155 +@publishedPartner
1.156 +@released
1.157 +@see CCoreDumpSession::ConstructL().
1.158 +*/
1.159 +enum TCrashProgress
1.160 + {
1.161 + /** Current crash status. Updated by formatters during a crash.
1.162 + RProperty of type RProperty::EText. */
1.163 + ECrashProgress,
1.164 +
1.165 + /** Cancels the generation of a crash when set to non-zero.
1.166 + RProperty of type RProperty::EInt. */
1.167 + ECancelCrash,
1.168 +
1.169 + /** Number of crashes served by this session of the Core Dump Server.
1.170 + RProperty of type RProperty::EInt. */
1.171 + ECrashCount
1.172 + };
1.173 +
1.174 +
1.175 +
1.176 +/**
1.177 +@publishedPartner
1.178 +@released
1.179 +
1.180 +Class for requesting lists from the Core Dump Server.
1.181 +The requestor appends the results of each request to obtain an entire list.
1.182 +Uses "T<type>InfoBlock" classes to transfer data accross the process boundary.
1.183 +*/
1.184 +class TListRequest
1.185 +{
1.186 +public:
1.187 +
1.188 + /** Type of data to supply for this request */
1.189 + enum TListRequestType
1.190 + {
1.191 + /** This request is for the formatter plugin list */
1.192 + EFormatterList,
1.193 +
1.194 + /** This request is for the writer plugin list */
1.195 + EWriterList,
1.196 +
1.197 + /** This request is for the thread list */
1.198 + EThreadList,
1.199 +
1.200 + /** This request is for the process list */
1.201 + EProcessList,
1.202 +
1.203 + /** This request is for the executable list */
1.204 + EExecutableList,
1.205 +
1.206 + /**
1.207 + @internalTechnology
1.208 + Last marker
1.209 + */
1.210 + EUnknownRequest
1.211 +
1.212 + };
1.213 +
1.214 + /** Type of data to supply for this request */
1.215 + TListRequestType iListType;
1.216 +
1.217 + /** Sub identifiers for the request. These are auxiliary ids that
1.218 + can be used to refine the request. */
1.219 + TUint32 iSubId1;
1.220 + TUint32 iSubId2;
1.221 +
1.222 + /** Requestor sets iIndex. iIndex==0 means the supplier should refresh the
1.223 + list and supply from index 0. iIndex > 0 means supply element
1.224 + [iIndex-1] and onwards. Requestor should thus increase iIndex
1.225 + by how many elements were supplied on each call. */
1.226 + TUint iIndex;
1.227 +
1.228 + /** Supplier writes iSupplied according to how many items
1.229 + it copied into the buffer on this call */
1.230 + TUint iSupplied;
1.231 +
1.232 + /** Supplier writes iRemaining to indicate how many items it
1.233 + has yet to supply. */
1.234 + TUint iRemaining;
1.235 +
1.236 + /** Number of bytes required to hold the resulting data */
1.237 + TUint iRequiredDescriptorSize;
1.238 +
1.239 + /**
1.240 + Spare variables for future expansion.
1.241 + @internalTechnology */
1.242 + TUint32 iSpare0;
1.243 + /** @internalTechnology */
1.244 + TUint32 iSpare1;
1.245 + /** @internalTechnology */
1.246 + TUint32 iSpare2;
1.247 + /** @internalTechnology */
1.248 + TUint32 iSpare3;
1.249 +
1.250 +};
1.251 +
1.252 +
1.253 +
1.254 +#endif // CORE_DUMP_SERVER_API_H