memspy/Engine/Include/ClientServer/MemSpyEngineServer.h
changeset 0 a03f92240627
child 20 ca8a1b6995f6
equal deleted inserted replaced
-1:000000000000 0:a03f92240627
       
     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 *
       
    16 */
       
    17 
       
    18 #ifndef MEMSPYENGINESERVER_H
       
    19 #define MEMSPYENGINESERVER_H
       
    20 
       
    21 // System includes
       
    22 #include <e32base.h>
       
    23 
       
    24 // User includes
       
    25 #include <memspyengineclientinterface.h>
       
    26 
       
    27 // Classes referenced
       
    28 class CMemSpyEngine;
       
    29 
       
    30 
       
    31 
       
    32 NONSHARABLE_CLASS( CMemSpyEngineServer ) : public CServer2
       
    33     {
       
    34 public:
       
    35     static CMemSpyEngineServer* NewL( CMemSpyEngine& aEngine );
       
    36     ~CMemSpyEngineServer();
       
    37 
       
    38 private:
       
    39     CMemSpyEngineServer( CMemSpyEngine& aEngine );
       
    40 	void ConstructL();
       
    41 
       
    42 protected: // From CServer2
       
    43 	CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
       
    44 
       
    45 private:
       
    46     CMemSpyEngine& iEngine;
       
    47     };
       
    48 
       
    49 
       
    50 
       
    51 NONSHARABLE_CLASS( CMemSpyEngineSession ) : public CSession2
       
    52 	{
       
    53 public:
       
    54 	static CMemSpyEngineSession* NewL( CMemSpyEngine& aEngine, const RMessage2& aMessage );
       
    55 	~CMemSpyEngineSession();
       
    56 
       
    57 private:
       
    58 	CMemSpyEngineSession( CMemSpyEngine& aEngine );
       
    59 	void ConstructL( const RMessage2& aMessage );
       
    60 
       
    61 private: // From CSession2
       
    62 	void ServiceL( const RMessage2& aMessage );
       
    63 
       
    64 private: // Internal methods
       
    65     void DoServiceL( const RMessage2& aMessage );
       
    66     static TInt ValidateFunction( TInt aFunction, TBool aIncludesThreadId, TBool aIncludesThreadName );
       
    67     void HandleThreadSpecificOpL( TInt aFunction, const TThreadId& aThreadId );
       
    68     void HandleThreadSpecificOpL( TInt aFunction, const TDesC& aThreadName );
       
    69     void HandleThreadAgnosticOpL( TInt aFunction, const RMessage2& aMessage );
       
    70 
       
    71 private:
       
    72     CMemSpyEngine& iEngine;
       
    73     HBufC* iClientThreadName;
       
    74     TUint32 iClientThreadId;
       
    75     };
       
    76 
       
    77 
       
    78 
       
    79 #endif