epoc32/include/tools/coredump/processdata.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/tools/coredump/processdata.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,116 @@
     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 +//
    1.18 +
    1.19 +
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 + @publishedPartner 
    1.24 + @released
    1.25 +*/
    1.26 +
    1.27 +#ifndef PROCESSDATA_H
    1.28 +#define PROCESSDATA_H
    1.29 +
    1.30 +#include <streamelement.h>
    1.31 +
    1.32 +
    1.33 +/**
    1.34 +@publishedPartner 
    1.35 +@released
    1.36 +
    1.37 +Class that represents a process on the target. It is based on CStreamElementBase so
    1.38 +it can be streamed between client and server.
    1.39 +It is used by the Core Dump server, its clients and the plugins.
    1.40 +@see CServerCrashDataSource::GetProcessListL()
    1.41 +*/
    1.42 +class CProcessInfo : public CStreamElementBase
    1.43 +{
    1.44 +
    1.45 +public:
    1.46 +
    1.47 +	IMPORT_C static CProcessInfo* NewL( const TUint64	  aId,
    1.48 +										const TDesC		& aName );
    1.49 +
    1.50 +	IMPORT_C static CProcessInfo* NewL( const TDesC8 & aStreamData );
    1.51 +
    1.52 +	IMPORT_C ~CProcessInfo();
    1.53 +
    1.54 +public:
    1.55 +	// Methods specific to CProcessInfo
    1.56 +
    1.57 +	IMPORT_C const TUint64 & Id( ) const;
    1.58 +
    1.59 +	IMPORT_C void NameL( const TDesC & aName );
    1.60 +	IMPORT_C const TDesC & Name() const;
    1.61 +
    1.62 +	IMPORT_C TBool Observed( ) const;
    1.63 +	IMPORT_C void  Observed( TBool aFlag );
    1.64 +
    1.65 +public:
    1.66 +	// Methods required by streaming interface 
    1.67 +
    1.68 +	IMPORT_C TInt static MaxSize();
    1.69 +
    1.70 +	IMPORT_C TInt Size() const;
    1.71 +
    1.72 +	// Initializes ’this’ from stream
    1.73 +	IMPORT_C void InternalizeL( RReadStream & aStream );
    1.74 +
    1.75 +	// Writes ’this’ to the stream
    1.76 +	IMPORT_C void ExternalizeL( RWriteStream & aStream, CBufFlat* buf );
    1.77 +
    1.78 +
    1.79 +private:
    1.80 +
    1.81 +	CProcessInfo(	const TUint64	  aId );
    1.82 +
    1.83 +	CProcessInfo();
    1.84 +
    1.85 +	void ConstructL( const TDesC & aName );
    1.86 +
    1.87 +private:
    1.88 +
    1.89 +	/** Symbian kernel process id */
    1.90 +	TUint64				iId;
    1.91 +
    1.92 +	/** Symbian kernel process name */
    1.93 +	HBufC  *			iName;
    1.94 +
    1.95 +    /** Observed by core dump server */
    1.96 +	TBool				iObserved;
    1.97 +
    1.98 +	/** Externalized size */
    1.99 +	TUint				iSize;
   1.100 +
   1.101 +	// These are not internalised/externalised since they are spare
   1.102 +	TUint32				iSpare0;
   1.103 +	TUint32				iSpare1;
   1.104 +	TUint32				iSpare2;
   1.105 +
   1.106 +	};
   1.107 +
   1.108 +
   1.109 +/**
   1.110 +@publishedPartner 
   1.111 +@released
   1.112 +
   1.113 +List of CProcessInfo object pointers
   1.114 +@see CProcessInfo
   1.115 +@see RPointerArray
   1.116 +*/
   1.117 +typedef RPointerArray<CProcessInfo>	RProcessPointerList;
   1.118 +
   1.119 +#endif