kerneltest/e32test/usb/t_usb_device/src/tranhandlesession.cpp
changeset 247 d8d70de2bd36
child 253 d37db4dcc88d
equal deleted inserted replaced
201:43365a9b78a3 247:d8d70de2bd36
       
     1 /*
       
     2 * Copyright (c) 2010 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 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "tranhandleserverconsts.h"
       
    26 #include "tranhandlesession.h"
       
    27 #include "activecontrol.h"
       
    28 
       
    29 
       
    30 
       
    31 CTranHandleSession* CTranHandleSession::NewL(CActiveControl& aControl)
       
    32     {
       
    33     CTranHandleSession* self = new(ELeave) CTranHandleSession(aControl);
       
    34     return self;
       
    35     }
       
    36 
       
    37 CTranHandleSession::CTranHandleSession(CActiveControl& aControl)
       
    38     : iActiveControl(aControl)
       
    39     {
       
    40     }
       
    41 
       
    42 CTranHandleSession::~CTranHandleSession()
       
    43     {
       
    44     RDebug::Printf("CTranHandleSession::~CTranHandleSession");
       
    45     }
       
    46 
       
    47 void CTranHandleSession::ServiceL(const RMessage2& aMessage)
       
    48     {
       
    49 	RDebug::Printf("CTranHandleSession::ServiceL");
       
    50 	TInt r;
       
    51     switch ( aMessage.Function() )
       
    52         {
       
    53     case ETransferHandle:
       
    54         {
       
    55         RMessagePtr2 messagePtr(aMessage);
       
    56         TRAP(r, iActiveControl.ConstructLOnSharedLdd(messagePtr));
       
    57 
       
    58         aMessage.Complete(r);
       
    59         break;
       
    60         }
       
    61 
       
    62     default:
       
    63         aMessage.Complete(KErrNotSupported);
       
    64         break;
       
    65         }
       
    66     }