os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/server/protocol/include/mblocktransferprotocol.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2008-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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // BOT Protocol layer for USB Mass Storage Class
    15 // 
    16 //
    17 
    18 /**
    19  @file
    20  @internalTechnology
    21 */
    22 
    23 #ifndef MBLOCKTRANSFERPROTOCOL_H
    24 #define MBLOCKTRANSFERPROTOCOL_H
    25 
    26 /**
    27 Interface class to be provided by the Protocol layer. The interface methods are
    28 used by TBlockTransfer class which manages block read and block writes of the
    29 data to be transferred.
    30 */
    31 class MBlockTransferProtocol
    32     {
    33 public:
    34     /**
    35     Read a block of data aligned to block boundary.
    36 
    37     @param aPos The position aligned to block boundary
    38     @param aBuf The buffer to copy the data into
    39     @param aLength The Length in bytes, a multiple of the block length
    40     */
    41     virtual void BlockReadL(TUint64 aPos, TDes8& aBuf, TInt aLength) = 0;
    42 
    43     /**
    44     Write a block of data aligned to block boundary.
    45 
    46     @param aPos The position aligned to block boundary
    47     @param aBuf The buffer containing the data to write
    48     @param aOffset The offset into the buffer to the start of the block
    49     @param aLength The length in bytes, must be a multiple of the block length
    50     */
    51     virtual void BlockWriteL(TUint64 aPos, TDesC8& aBuf, TUint aOffset, TInt aLength) = 0;
    52     };
    53 
    54 #endif // MBLOCKTRANSFERPROTOCOL_H
    55