epoc32/include/tools/coredump/processdata.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 //
    15 
    16 
    17 
    18 /**
    19  @file
    20  @publishedPartner 
    21  @released
    22 */
    23 
    24 #ifndef PROCESSDATA_H
    25 #define PROCESSDATA_H
    26 
    27 #include <streamelement.h>
    28 
    29 
    30 /**
    31 @publishedPartner 
    32 @released
    33 
    34 Class that represents a process on the target. It is based on CStreamElementBase so
    35 it can be streamed between client and server.
    36 It is used by the Core Dump server, its clients and the plugins.
    37 @see CServerCrashDataSource::GetProcessListL()
    38 */
    39 class CProcessInfo : public CStreamElementBase
    40 {
    41 
    42 public:
    43 
    44 	IMPORT_C static CProcessInfo* NewL( const TUint64	  aId,
    45 										const TDesC		& aName );
    46 
    47 	IMPORT_C static CProcessInfo* NewL( const TDesC8 & aStreamData );
    48 
    49 	IMPORT_C ~CProcessInfo();
    50 
    51 public:
    52 	// Methods specific to CProcessInfo
    53 
    54 	IMPORT_C const TUint64 & Id( ) const;
    55 
    56 	IMPORT_C void NameL( const TDesC & aName );
    57 	IMPORT_C const TDesC & Name() const;
    58 
    59 	IMPORT_C TBool Observed( ) const;
    60 	IMPORT_C void  Observed( TBool aFlag );
    61 
    62 public:
    63 	// Methods required by streaming interface 
    64 
    65 	IMPORT_C TInt static MaxSize();
    66 
    67 	IMPORT_C TInt Size() const;
    68 
    69 	// Initializes ’this’ from stream
    70 	IMPORT_C void InternalizeL( RReadStream & aStream );
    71 
    72 	// Writes ’this’ to the stream
    73 	IMPORT_C void ExternalizeL( RWriteStream & aStream, CBufFlat* buf );
    74 
    75 
    76 private:
    77 
    78 	CProcessInfo(	const TUint64	  aId );
    79 
    80 	CProcessInfo();
    81 
    82 	void ConstructL( const TDesC & aName );
    83 
    84 private:
    85 
    86 	/** Symbian kernel process id */
    87 	TUint64				iId;
    88 
    89 	/** Symbian kernel process name */
    90 	HBufC  *			iName;
    91 
    92     /** Observed by core dump server */
    93 	TBool				iObserved;
    94 
    95 	/** Externalized size */
    96 	TUint				iSize;
    97 
    98 	// These are not internalised/externalised since they are spare
    99 	TUint32				iSpare0;
   100 	TUint32				iSpare1;
   101 	TUint32				iSpare2;
   102 
   103 	};
   104 
   105 
   106 /**
   107 @publishedPartner 
   108 @released
   109 
   110 List of CProcessInfo object pointers
   111 @see CProcessInfo
   112 @see RPointerArray
   113 */
   114 typedef RPointerArray<CProcessInfo>	RProcessPointerList;
   115 
   116 #endif