williamr@4: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@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 williamr@4: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // williamr@4: williamr@4: williamr@4: williamr@4: /** williamr@4: @file williamr@4: @publishedPartner williamr@4: @released williamr@4: */ williamr@4: williamr@4: #ifndef PROCESSDATA_H williamr@4: #define PROCESSDATA_H williamr@4: williamr@4: #include williamr@4: williamr@4: williamr@4: /** williamr@4: @publishedPartner williamr@4: @released williamr@4: williamr@4: Class that represents a process on the target. It is based on CStreamElementBase so williamr@4: it can be streamed between client and server. williamr@4: It is used by the Core Dump server, its clients and the plugins. williamr@4: @see CServerCrashDataSource::GetProcessListL() williamr@4: */ williamr@4: class CProcessInfo : public CStreamElementBase williamr@4: { williamr@4: williamr@4: public: williamr@4: williamr@4: IMPORT_C static CProcessInfo* NewL( const TUint64 aId, williamr@4: const TDesC & aName ); williamr@4: williamr@4: IMPORT_C static CProcessInfo* NewL( const TDesC8 & aStreamData ); williamr@4: williamr@4: IMPORT_C ~CProcessInfo(); williamr@4: williamr@4: public: williamr@4: // Methods specific to CProcessInfo williamr@4: williamr@4: IMPORT_C const TUint64 & Id( ) const; williamr@4: williamr@4: IMPORT_C void NameL( const TDesC & aName ); williamr@4: IMPORT_C const TDesC & Name() const; williamr@4: williamr@4: IMPORT_C TBool Observed( ) const; williamr@4: IMPORT_C void Observed( TBool aFlag ); williamr@4: williamr@4: public: williamr@4: // Methods required by streaming interface williamr@4: williamr@4: IMPORT_C TInt static MaxSize(); williamr@4: williamr@4: IMPORT_C TInt Size() const; williamr@4: williamr@4: // Initializes ’this’ from stream williamr@4: IMPORT_C void InternalizeL( RReadStream & aStream ); williamr@4: williamr@4: // Writes ’this’ to the stream williamr@4: IMPORT_C void ExternalizeL( RWriteStream & aStream, CBufFlat* buf ); williamr@4: williamr@4: williamr@4: private: williamr@4: williamr@4: CProcessInfo( const TUint64 aId ); williamr@4: williamr@4: CProcessInfo(); williamr@4: williamr@4: void ConstructL( const TDesC & aName ); williamr@4: williamr@4: private: williamr@4: williamr@4: /** Symbian kernel process id */ williamr@4: TUint64 iId; williamr@4: williamr@4: /** Symbian kernel process name */ williamr@4: HBufC * iName; williamr@4: williamr@4: /** Observed by core dump server */ williamr@4: TBool iObserved; williamr@4: williamr@4: /** Externalized size */ williamr@4: TUint iSize; williamr@4: williamr@4: // These are not internalised/externalised since they are spare williamr@4: TUint32 iSpare0; williamr@4: TUint32 iSpare1; williamr@4: TUint32 iSpare2; williamr@4: williamr@4: }; williamr@4: williamr@4: williamr@4: /** williamr@4: @publishedPartner williamr@4: @released williamr@4: williamr@4: List of CProcessInfo object pointers williamr@4: @see CProcessInfo williamr@4: @see RPointerArray williamr@4: */ williamr@4: typedef RPointerArray RProcessPointerList; williamr@4: williamr@4: #endif