0
|
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 "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.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 |
_LIT(KNoThreadName, "No Thread Name Available");
|
|
30 |
|
|
31 |
/**
|
|
32 |
@publishedPartner
|
|
33 |
@released
|
|
34 |
|
|
35 |
Class that represents a process on the target. It is based on CStreamElementBase so
|
|
36 |
it can be streamed between client and server.
|
|
37 |
It is used by the Core Dump server, its clients and the plugins.
|
|
38 |
@see CServerCrashDataSource::GetProcessListL()
|
|
39 |
*/
|
|
40 |
class CProcessInfo : public CStreamElementBase
|
|
41 |
{
|
|
42 |
|
|
43 |
public:
|
|
44 |
|
|
45 |
IMPORT_C static CProcessInfo* NewL( const TUint64 aId,
|
|
46 |
const TDesC & aName );
|
|
47 |
|
|
48 |
IMPORT_C static CProcessInfo* NewL( const TDesC8 & aStreamData );
|
|
49 |
|
|
50 |
IMPORT_C ~CProcessInfo();
|
|
51 |
|
|
52 |
public:
|
|
53 |
// Methods specific to CProcessInfo
|
|
54 |
|
|
55 |
IMPORT_C const TUint64 & Id( ) const;
|
|
56 |
|
|
57 |
IMPORT_C void NameL( const TDesC & aName );
|
|
58 |
IMPORT_C const TDesC & Name() const;
|
|
59 |
|
|
60 |
IMPORT_C TBool Observed( ) const;
|
|
61 |
IMPORT_C void Observed( TBool aFlag );
|
|
62 |
|
|
63 |
public:
|
|
64 |
// Methods required by streaming interface
|
|
65 |
|
|
66 |
IMPORT_C TInt static MaxSize();
|
|
67 |
|
|
68 |
IMPORT_C TInt Size() const;
|
|
69 |
|
|
70 |
// Initializes ’this’ from stream
|
|
71 |
IMPORT_C void InternalizeL( RReadStream & aStream );
|
|
72 |
|
|
73 |
// Writes ’this’ to the stream
|
|
74 |
IMPORT_C void ExternalizeL( RWriteStream & aStream, CBufFlat* buf );
|
|
75 |
|
|
76 |
|
|
77 |
private:
|
|
78 |
|
|
79 |
CProcessInfo( const TUint64 aId );
|
|
80 |
|
|
81 |
CProcessInfo();
|
|
82 |
|
|
83 |
void ConstructL( const TDesC & aName );
|
|
84 |
|
|
85 |
private:
|
|
86 |
|
|
87 |
/** Symbian kernel process id */
|
|
88 |
TUint64 iId;
|
|
89 |
|
|
90 |
/** Symbian kernel process name */
|
|
91 |
HBufC * iName;
|
|
92 |
|
|
93 |
/** Observed by core dump server */
|
|
94 |
TBool iObserved;
|
|
95 |
|
|
96 |
/** Externalized size */
|
|
97 |
TUint iSize;
|
|
98 |
|
|
99 |
// These are not internalised/externalised since they are spare
|
|
100 |
TUint32 iSpare0;
|
|
101 |
TUint32 iSpare1;
|
|
102 |
TUint32 iSpare2;
|
|
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
|