networkcontrol/commsuserpromptmgr/utils/inc/netupskeys.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 public type definitions used by the Networking UPS Component.
       
    15 // To avoid using stale refernces these keys should only be used in synchronous methods. 
       
    16 // @internalAll
       
    17 // @prototype
       
    18 // 
       
    19 //
       
    20 
       
    21 #ifndef NETUPSKEYS_H
       
    22 #define NETUPSKEYS_H
       
    23 
       
    24 namespace Messages
       
    25 {
       
    26 class TNodeId;	
       
    27 }
       
    28 
       
    29 namespace NetUps
       
    30 {
       
    31 
       
    32 class CDatabaseEntry;
       
    33 class CProcessEntry;
       
    34 class CThreadEntry;
       
    35 
       
    36 struct TProcessKey
       
    37 	{
       
    38 	TProcessKey(CDatabaseEntry& 	aDatabaseEntry	,
       
    39 				CProcessEntry& 	aProcessEntry) 	:
       
    40 				iDatabaseEntry(aDatabaseEntry),
       
    41 				iProcessEntry (aProcessEntry)
       
    42 				{	
       
    43 				};
       
    44 				
       
    45 	CDatabaseEntry&	iDatabaseEntry;
       
    46 	CProcessEntry& 	iProcessEntry;
       
    47 	};
       
    48 
       
    49 struct TThreadKey : public TProcessKey
       
    50 	{
       
    51 	TThreadKey(	CDatabaseEntry& 		aDatabaseEntry,
       
    52 				CProcessEntry& 			aProcessEntry,
       
    53 	 			CThreadEntry&			aThreadEntry) :
       
    54 				TProcessKey(aDatabaseEntry, aProcessEntry),
       
    55 				iThreadEntry(aThreadEntry)
       
    56 					{	
       
    57 					}
       
    58 	CThreadEntry& 	iThreadEntry;
       
    59 	};
       
    60 
       
    61 struct TCommsIdKey : public TThreadKey
       
    62 	{
       
    63 	TCommsIdKey(CDatabaseEntry& 			aDatabaseEntry,
       
    64 				CProcessEntry& 				aProcessEntry,
       
    65 	 			CThreadEntry&				aThreadEntry,
       
    66 				const Messages::TNodeId& 		aCallersNodeId) :
       
    67 				TThreadKey(aDatabaseEntry, 	aProcessEntry, aThreadEntry),
       
    68 				iCommsId(aCallersNodeId)
       
    69 					{	
       
    70 					}					
       
    71 	const Messages::TNodeId& 	iCommsId;
       
    72 	};
       
    73 	
       
    74 } // end of namespace NetUps
       
    75 
       
    76 #endif // NETUPSKEYS_H