userlibandfileserver/fileserver/smassstorage/tbulkmm.cpp
changeset 286 48e57fb1237e
equal deleted inserted replaced
285:ff5437e4337c 286:48e57fb1237e
       
     1 /*
       
     2 * Copyright (c) 2004-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 the License "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 /**
       
    20  @file
       
    21  @internalTechnology
       
    22 */
       
    23 
       
    24 #include <e32base.h>
       
    25 #include "tbulkmm.h"
       
    26 
       
    27 #ifdef MSDC_MULTITHREADED    
       
    28 TBulkMm::TBulkMm()
       
    29 :	iSwap(ETrue)
       
    30     {
       
    31     }
       
    32 
       
    33 
       
    34 void TBulkMm::GetNextTransferBuffer(TUint aLength, TPtr8& aPtr)
       
    35 	{
       
    36 	if (iSwap)
       
    37 		{
       
    38 		iDataBuf1.SetLength(aLength);
       
    39 		aPtr.Set(iDataBuf1.LeftTPtr(iDataBuf1.Length()));
       
    40 		iSwap = EFalse;
       
    41 		}
       
    42 	else
       
    43 		{
       
    44 		iDataBuf2.SetLength(aLength);
       
    45 		aPtr.Set(iDataBuf2.LeftTPtr(iDataBuf2.Length()));
       
    46 		iSwap = ETrue;
       
    47 		}
       
    48 	}
       
    49 #endif
       
    50