Update contrib.
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 #ifndef __PROTOCOL_H__
22 #define __PROTOCOL_H__
24 #include <e32base.h> // C Class Definitions, Cleanup Stack
25 #include <e32def.h> // T Type Definitions
26 #include <e32std.h> // ELeave definition
27 #include "usbmsshared.h"
35 virtual void SetupWriteData(TPtrC8& aData) = 0;
36 virtual TInt Start() = 0;
37 virtual TInt Stop() = 0;
38 virtual void RegisterProtocol(MProtocolBase& aProtocol) = 0;
39 virtual TInt BytesAvailable() = 0;
40 virtual ~MTransportBase() {};
41 virtual TInt InitialiseTransportL(TInt aTransportLddFlag) = 0;
42 virtual void SetupReadData(TUint aLength) = 0;
43 virtual void GetCommandBufPtr(TPtr8& aDes, TUint aLength) = 0;
44 virtual void GetReadDataBufPtr(TPtr8& aDes) = 0;
45 virtual void GetWriteDataBufPtr(TPtrC8& aDes) = 0;
46 #ifdef MSDC_MULTITHREADED
47 virtual void ProcessReadData(TAny* aAddress) = 0;
55 virtual void RegisterTransport(MTransportBase* aTransport) = 0;
56 virtual TBool DecodePacket(TPtrC8& aData, TUint aLun) = 0;
57 virtual TInt ReadComplete(TInt aError) = 0;
58 virtual TInt Cancel() = 0;
59 virtual void ReportHighSpeedDevice() {};
60 virtual ~MProtocolBase() {};
61 #ifdef MSDC_MULTITHREADED
62 virtual void InitializeBufferPointers(TPtr8& aDes1, TPtr8& aDes2) = 0;
67 #endif // __PROTOCOL_H__