networkcontrol/commsuserpromptmgr/database/inc/netupsprocessentry.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     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 // This file provides the interface specification for the Net Ups Process Entry.
       
    15 // @internalAll
       
    16 // @prototype
       
    17 // 
       
    18 //
       
    19 
       
    20 #ifndef NETUPSPROCESSENTRY_H
       
    21 #define NETUPSPROCESSENTRY_H
       
    22 
       
    23 #include <e32base.h>									// defines CBase
       
    24 #include <e32std.h>										// defines TProcessId
       
    25 
       
    26 #include "netupsstatedef.h"								// defines TNetUpsState
       
    27 
       
    28 #include <comms-infras/commsdebugutility.h> 		// defines the comms debug logging utility
       
    29 
       
    30 namespace NetUps
       
    31 {
       
    32 class CThreadEntry;
       
    33 class CProcessMonitor;
       
    34 class CUpsStateMachine;
       
    35 
       
    36 NONSHARABLE_CLASS(CProcessEntry) : public CBase
       
    37 {
       
    38 public:
       
    39 	static CProcessEntry* NewL(CDatabaseEntry& aDatabaseEntry, const TProcessId& aProcessId, CUpsStateMachine& aUpsStateMachine);
       
    40 	virtual ~CProcessEntry();
       
    41 
       
    42 	void							SetNetUpsState(TNetUpsState aNetUpsState);
       
    43 	TNetUpsState					NetUpsState() const;
       
    44 	RPointerArray<CThreadEntry>& 	ThreadEntry();
       
    45 	void							SetProcessMonitor(CProcessMonitor* aProcessMonitor);
       
    46 	CProcessMonitor* 				ProcessMonitor() const; // client code tests for Null Pointer
       
    47 	const TProcessId&						ProcessId() const;
       
    48 	CUpsStateMachine&				UpsStateMachine() const;
       
    49 protected: // class may be specialised by NetUps clients if required
       
    50 	CProcessEntry(const TProcessId& aProcessId, CUpsStateMachine& aUpsStateMachine);		
       
    51 private:
       
    52 	void ConstructL(CDatabaseEntry& aDatabaseEntry);
       
    53 private:
       
    54 	TNetUpsState					iNetUpsState;
       
    55 	RPointerArray<CThreadEntry> 	iThreadEntry;
       
    56 	CProcessMonitor* 				iProcessMonitor;// object life cycle may be shorter than CThreadEntry
       
    57 	TProcessId						iProcessId; 
       
    58 	CUpsStateMachine&				iUpsStateMachine;
       
    59 private:
       
    60 	__FLOG_DECLARATION_MEMBER;		
       
    61 	}; 
       
    62 	
       
    63 } // end of namespace
       
    64 
       
    65 #endif // NETUPSPROCESSENTRY_H
       
    66