os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/protocol/include/mblocktransferprotocol.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/protocol/include/mblocktransferprotocol.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,55 @@
1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// BOT Protocol layer for USB Mass Storage Class
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @file
1.23 + @internalTechnology
1.24 +*/
1.25 +
1.26 +#ifndef MBLOCKTRANSFERPROTOCOL_H
1.27 +#define MBLOCKTRANSFERPROTOCOL_H
1.28 +
1.29 +/**
1.30 +Interface class to be provided by the Protocol layer. The interface methods are
1.31 +used by TBlockTransfer class which manages block read and block writes of the
1.32 +data to be transferred.
1.33 +*/
1.34 +class MBlockTransferProtocol
1.35 + {
1.36 +public:
1.37 + /**
1.38 + Read a block of data aligned to block boundary.
1.39 +
1.40 + @param aPos The position aligned to block boundary
1.41 + @param aBuf The buffer to copy the data into
1.42 + @param aLength The Length in bytes, a multiple of the block length
1.43 + */
1.44 + virtual void BlockReadL(TUint64 aPos, TDes8& aBuf, TInt aLength) = 0;
1.45 +
1.46 + /**
1.47 + Write a block of data aligned to block boundary.
1.48 +
1.49 + @param aPos The position aligned to block boundary
1.50 + @param aBuf The buffer containing the data to write
1.51 + @param aOffset The offset into the buffer to the start of the block
1.52 + @param aLength The length in bytes, must be a multiple of the block length
1.53 + */
1.54 + virtual void BlockWriteL(TUint64 aPos, TDesC8& aBuf, TUint aOffset, TInt aLength) = 0;
1.55 + };
1.56 +
1.57 +#endif // MBLOCKTRANSFERPROTOCOL_H
1.58 +