mtptransports/mtpusbtransport/usbdatatypes/inc/tmtpusbcontrolrequestsetup.h
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 #ifndef TMTPUSBCONTROLREQUESTSETUP_H
       
    22 #define TMTPUSBCONTROLREQUESTSETUP_H
       
    23 
       
    24 #include <mtp/tmtptypeflatbase.h>
       
    25 
       
    26 /**
       
    27 Defines the MTP USB device class control request setup dataset.
       
    28 @internalComponent
       
    29  
       
    30 */
       
    31 class TMTPUsbControlRequestSetup : public TMTPTypeFlatBase 
       
    32     {
       
    33     
       
    34 public:
       
    35 
       
    36     /**
       
    37     MTP USB control request setup dataset element identifiers.
       
    38     */
       
    39     enum TElements
       
    40         {
       
    41         EbmRequestType,
       
    42         EbRequest,
       
    43         EwValue,
       
    44         EwIndex,
       
    45         EwLength,
       
    46         ENumElements
       
    47         };
       
    48         
       
    49 public:
       
    50 
       
    51     IMPORT_C TMTPUsbControlRequestSetup();
       
    52      
       
    53 public: // From TMTPTypeFlatBase
       
    54 
       
    55     IMPORT_C TUint Type() const;
       
    56     
       
    57 private: // From TMTPTypeFlatBase
       
    58 
       
    59     IMPORT_C const TMTPTypeFlatBase::TElementInfo& ElementInfo(TInt aElementId) const;
       
    60 
       
    61 private:
       
    62    
       
    63     /**
       
    64     The dataset size in bytes.
       
    65     */
       
    66     static const TInt                               KSize = 8;
       
    67     
       
    68     /**
       
    69     The dataset element metadata table content.
       
    70     */
       
    71     static const TMTPTypeFlatBase::TElementInfo     iElementMetaData[];
       
    72     
       
    73     /**
       
    74     The dataset element metadata table.
       
    75     */
       
    76     const TFixedArray<TElementInfo, ENumElements>   iElementInfo;
       
    77     
       
    78     /**
       
    79     The data buffer.
       
    80     */
       
    81     TBuf8<KSize>                                    iBuffer;        
       
    82     };
       
    83 
       
    84 #endif // TMTPUSBCONTROLREQUESTSETUP_H