kerneltest/e32test/usb/t_usb_device/src/tranhandlesrv.cpp
changeset 247 d8d70de2bd36
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 @internalTechnology
       
    21 */
       
    22 
       
    23 #include <e32base.h>
       
    24 #include "tranhandlesrv.h"
       
    25 #include "tranhandleserverconsts.h"
       
    26 
       
    27 
       
    28 /** Constructor */
       
    29 EXPORT_C RTranHandleSrv::RTranHandleSrv()
       
    30     {
       
    31     }
       
    32 
       
    33 /** Destructor */
       
    34 EXPORT_C RTranHandleSrv::~RTranHandleSrv()
       
    35     {
       
    36     }
       
    37 
       
    38 EXPORT_C TVersion RTranHandleSrv::Version() const
       
    39     {
       
    40     return TVersion(    KTranHandleSrvMajorVersionNumber,
       
    41                         KTranHandleSrvMinorVersionNumber,
       
    42                         KTranHandleSrvBuildNumber
       
    43                     );
       
    44     }
       
    45 
       
    46 EXPORT_C TInt RTranHandleSrv::Connect()
       
    47     {
       
    48     return CreateSession(KTranHandleServerName, Version(), 1);
       
    49     }
       
    50 
       
    51 EXPORT_C TInt RTranHandleSrv::TransferHandle(RHandleBase& aHandle, RHandleBase& aChunk)
       
    52     {
       
    53     return SendReceive(ETransferHandle, TIpcArgs(aHandle, aChunk));
       
    54     }
       
    55