--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/kerneltest/e32test/usb/t_usb_device/src/tranhandlesession.cpp Wed Aug 18 11:08:29 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+/**
+ @file
+ @internalComponent
+*/
+
+#include <e32base.h>
+
+#include "tranhandleserverconsts.h"
+#include "tranhandlesession.h"
+#include "activecontrol.h"
+
+
+
+CTranHandleSession* CTranHandleSession::NewL(CActiveControl& aControl)
+ {
+ CTranHandleSession* self = new(ELeave) CTranHandleSession(aControl);
+ return self;
+ }
+
+CTranHandleSession::CTranHandleSession(CActiveControl& aControl)
+ : iActiveControl(aControl)
+ {
+ }
+
+CTranHandleSession::~CTranHandleSession()
+ {
+ RDebug::Printf("CTranHandleSession::~CTranHandleSession");
+ }
+
+void CTranHandleSession::ServiceL(const RMessage2& aMessage)
+ {
+ RDebug::Printf("CTranHandleSession::ServiceL");
+ TInt r;
+ switch ( aMessage.Function() )
+ {
+ case ETransferHandle:
+ {
+ RMessagePtr2 messagePtr(aMessage);
+ TRAP(r, iActiveControl.ConstructLOnSharedLdd(messagePtr));
+
+ aMessage.Complete(r);
+ break;
+ }
+
+ default:
+ aMessage.Complete(KErrNotSupported);
+ break;
+ }
+ }