mtpfws/mtpfw/dataproviders/devdp/inc/cmtptypedeviceinfo.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 CMTPTYPEDEVICEINFO_H
       
    22 #define CMTPTYPEDEVICEINFO_H
       
    23 
       
    24 #include <e32std.h>
       
    25 #include <mtp/cmtptypecompoundbase.h>
       
    26 
       
    27 class CMTPTypeArray;
       
    28 class CMTPTypeString;
       
    29 
       
    30 //
       
    31 
       
    32 /** 
       
    33 Defines the MTP DeviceInfo dataset. The DeviceInfo dataset provides a 
       
    34 description of the MTP device and is generated in response to a GetDeviceInfo
       
    35 operation request.
       
    36 @internalComponent
       
    37 */ 
       
    38 class CMTPTypeDeviceInfo : public CMTPTypeCompoundBase
       
    39     {
       
    40 public:
       
    41 
       
    42     /**
       
    43     MTP DeviceInfo dataset element identifiers.
       
    44     */
       
    45     enum TMTPDeviceInfoElement
       
    46         {
       
    47         /**
       
    48         Standard Version.
       
    49         */
       
    50         EStandardVersion,
       
    51         
       
    52         /**
       
    53         MTP Vendor Extension ID.
       
    54         */
       
    55         EMTPVendorExtensionID,
       
    56         
       
    57         /**
       
    58         MTP Version.
       
    59         */
       
    60         EMTPVersion,
       
    61         
       
    62         /**
       
    63         MTP Extensions.
       
    64         */
       
    65         EMTPExtensions, 
       
    66         
       
    67         /**
       
    68         Functional Mode.
       
    69         */
       
    70         EFunctionalMode,
       
    71         
       
    72         /**
       
    73         Operations Supported.
       
    74         */
       
    75         EOperationsSupported,
       
    76         
       
    77         /**
       
    78         Events Supported.
       
    79         */
       
    80         EEventsSupported,
       
    81         
       
    82         /**
       
    83         Device Properties Supported.
       
    84         */
       
    85         EDevicePropertiesSupported,
       
    86         
       
    87         /**
       
    88         Capture Formats.
       
    89         */
       
    90         ECaptureFormats,
       
    91         
       
    92         /**
       
    93         Playback Formats.
       
    94         */
       
    95         EPlaybackFormats,
       
    96         
       
    97         /**
       
    98         Manufacturer.
       
    99         */
       
   100         EManufacturer,
       
   101         
       
   102         /**
       
   103         Model.
       
   104         */
       
   105         EModel,  
       
   106         
       
   107         /**
       
   108         Device Version.
       
   109         */
       
   110         EDeviceVersion,
       
   111         
       
   112         /**
       
   113         Serial Number.
       
   114         */
       
   115         ESerialNumber,
       
   116         
       
   117         /**
       
   118         The number of dataset elements.
       
   119         */
       
   120         ENumElements,
       
   121         };
       
   122 
       
   123 public:
       
   124     
       
   125     static CMTPTypeDeviceInfo* NewL();
       
   126     static CMTPTypeDeviceInfo* NewLC();
       
   127     
       
   128     virtual ~CMTPTypeDeviceInfo();   
       
   129      
       
   130 public: // From MMTPType
       
   131 
       
   132     TUint Type() const;
       
   133         
       
   134 private: // From CMTPTypeCompoundBase
       
   135     
       
   136     const TElementInfo& ElementInfo(TInt aElementId) const;
       
   137 
       
   138 private:
       
   139 
       
   140     CMTPTypeDeviceInfo();
       
   141     void ConstructL();
       
   142 
       
   143     MMTPType* NewArrayChunkL(const TElementInfo& aElementInfo);
       
   144     MMTPType* NewFlatChunkL(const TElementInfo& aElementInfo);
       
   145     MMTPType* NewStringChunkL(const TElementInfo& aElementInfo);
       
   146     MMTPType* NewUInt16Chunk(const TElementInfo& aElementInfo);
       
   147 
       
   148 private:
       
   149         
       
   150     /**
       
   151     Data chunk identifiers.
       
   152     */
       
   153     enum TChunkIds
       
   154         {
       
   155         /**
       
   156         The flat data chunk ID.
       
   157         */
       
   158         EIdFlatChunk,
       
   159         
       
   160         /**
       
   161         The EMTPExtensions element data chunk ID.
       
   162         */
       
   163         EIdMTPExtensionsChunk,
       
   164         
       
   165         /**
       
   166         The EFunctionalMode element data chunk ID.
       
   167         */
       
   168         EIdFunctionalModeChunk,
       
   169         
       
   170         /**
       
   171         The EOperationsSupported element data chunk ID.
       
   172         */
       
   173         EIdOperationsSupportedChunk,
       
   174         
       
   175         /**
       
   176         The EEventsSupported element data chunk ID.
       
   177         */
       
   178         EIdEventsSupportedChunk,
       
   179         
       
   180         /**
       
   181         The EDevicePropertiesSupported element data chunk ID.
       
   182         */
       
   183         EIdDevicePropertiesSupportedChunk,
       
   184         
       
   185         /**
       
   186         The ECaptureFormats element data chunk ID.
       
   187         */
       
   188         EIdCaptureFormatsChunk,
       
   189         
       
   190         /**
       
   191         The EPlaybackFormats element data chunk ID.
       
   192         */
       
   193         EIdPlaybackFormatsChunk,
       
   194         
       
   195         /**
       
   196         The EPlaybackFormats element data chunk ID.
       
   197         */
       
   198         EIdManufacturerChunk,
       
   199         
       
   200         /**
       
   201         The EModel element data chunk ID.
       
   202         */
       
   203         EIdModelChunk,
       
   204         
       
   205         /**
       
   206         The EDeviceVersion element data chunk ID.
       
   207         */
       
   208         EIdDeviceVersionChunk,
       
   209         
       
   210         /**
       
   211         The ESerialNumber element data chunk ID.
       
   212         */
       
   213         EIdSerialNumberChunk,
       
   214         
       
   215         /**
       
   216         The number of data chunks.
       
   217         */
       
   218         EIdNumChunks
       
   219         };
       
   220     
       
   221     /**
       
   222     The dataset element metadata table content.
       
   223     */
       
   224     static const CMTPTypeCompoundBase::TElementInfo iElementMetaData[];
       
   225     
       
   226     /**
       
   227     The dataset element metadata table.
       
   228     */
       
   229     const TFixedArray<TElementInfo, ENumElements>   iElementInfo;
       
   230     
       
   231     /**
       
   232     The flat data chunk comprising elements EStandardVersion to EMTPVersion.
       
   233     */
       
   234     RMTPTypeCompoundFlatChunk                       iChunkFlat;
       
   235     
       
   236     /**
       
   237     The EFunctionalMode data chunk.
       
   238     */
       
   239     TMTPTypeUint16                                  iChunkFunctionalMode;
       
   240     
       
   241     /**
       
   242     The MTP array type data chunks (EOperationsSupported, EEventsSupported, 
       
   243     EDevicePropertiesSupported, ECaptureFormats, and EPlaybackFormats). 
       
   244     */
       
   245     RPointerArray<CMTPTypeArray>                    iArrayChunks;
       
   246     
       
   247     /**
       
   248     The MTP string type data chunks (EManufacturer, EModel, EDeviceVersion, and 
       
   249     ESerialNumber).
       
   250     */
       
   251     RPointerArray<CMTPTypeString>                   iStringChunks;
       
   252     };
       
   253     
       
   254 #endif // CMTPTYPEDEVICEINFO_H