mtptransports/mtpusbtransport/usbdatatypes/src/tmtpusbcontrolrequestcanceldata.cpp
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2006-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 "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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #include <mtp/mtpdatatypeconstants.h>
       
    22 
       
    23 #include "mtpusbdatatypeconstants.h"
       
    24 #include "tmtpusbcontrolrequestcanceldata.h"
       
    25     
       
    26 // Dataset element metadata.
       
    27 const TMTPUsbControlRequestCancelData::TElementInfo TMTPUsbControlRequestCancelData::iElementMetaData[ENumElements] = 
       
    28     {
       
    29         {EMTPTypeUINT16,    0,  KMTPTypeUINT16Size},    // ECancellationCode
       
    30         {EMTPTypeUINT32,    2,  KMTPTypeUINT32Size},    // ETransactionID
       
    31     }; 
       
    32 
       
    33 /** 
       
    34 Constructor
       
    35 */
       
    36 EXPORT_C TMTPUsbControlRequestCancelData::TMTPUsbControlRequestCancelData() :
       
    37     iElementInfo(iElementMetaData, ENumElements),
       
    38     iBuffer(KSize)
       
    39     {
       
    40     SetBuffer(iBuffer);
       
    41     }     
       
    42 
       
    43 EXPORT_C TUint TMTPUsbControlRequestCancelData::Type() const
       
    44 	{
       
    45 	return EMTPUsbTypeControlRequestCancelData;
       
    46 	}
       
    47     
       
    48 EXPORT_C const TMTPTypeFlatBase::TElementInfo& TMTPUsbControlRequestCancelData::ElementInfo(TInt aElementId) const
       
    49     {
       
    50     __ASSERT_DEBUG((aElementId < ENumElements), User::Invariant());
       
    51     return iElementInfo[aElementId];
       
    52     }