memspy/MemSpyServer/Include/MemSpyServerSession.h
changeset 34 7259cf1302ad
parent 33 0d72cc2a29a3
child 35 1ea875759131
child 38 169364e7e4b4
equal deleted inserted replaced
33:0d72cc2a29a3 34:7259cf1302ad
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * MemSpyServer headder file to declare MemSpyServer class
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef MEMSPYSERVERSESSION_H
       
    20 #define MEMSPYSERVERSESSION_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 #include <BADESCA.H>
       
    25 
       
    26 // User includes
       
    27 #include <memspyengineclientinterface.h>
       
    28 #include <memspy/engine/memspyengineobjectthreadinfoobjects.h>
       
    29 
       
    30     // Classes referenced
       
    31 class CMemSpyEngine;
       
    32 
       
    33 
       
    34 NONSHARABLE_CLASS( CMemSpyServerSession ) : public CSession2
       
    35 	{
       
    36 public:
       
    37 	static CMemSpyServerSession* NewL( CMemSpyEngine& aEngine, const RMessage2& aMessage );
       
    38 	~CMemSpyServerSession();
       
    39 
       
    40 private:
       
    41 	CMemSpyServerSession( CMemSpyEngine& aEngine );
       
    42 	void ConstructL( const RMessage2& aMessage );
       
    43 
       
    44 private: // From CSession2
       
    45 	void ServiceL( const RMessage2& aMessage );
       
    46 
       
    47 private: // Internal methods
       
    48     void DoServiceL( const RMessage2& aMessage );
       
    49     void DoUiServiceL( const RMessage2& aMessage );
       
    50     void DoCmdServiceL( const RMessage2& aMessage );
       
    51     static TInt ValidateFunction( TInt aFunction, TBool aIncludesThreadId, TBool aIncludesThreadName );
       
    52     void HandleThreadSpecificOpL( TInt aFunction, const TThreadId& aThreadId );
       
    53     void HandleThreadSpecificOpL( TInt aFunction, const TDesC& aThreadName );
       
    54     void HandleThreadAgnosticOpL( TInt aFunction, const RMessage2& aMessage );
       
    55     
       
    56 private:
       
    57     CMemSpyEngine& iEngine;
       
    58     HBufC* iClientThreadName;
       
    59     TUint32 iClientThreadId;
       
    60     };
       
    61 
       
    62 #endif