mtpfws/mtpfw/dataproviders/dataproviderapi/interface/cmtpobjectmetadata.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  @publishedPartner
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef CMTPOBJECTMETADATA_H
       
    23 #define CMTPOBJECTMETADATA_H
       
    24 
       
    25 #include <mtp/cmtpmetadata.h>
       
    26 
       
    27 /** 
       
    28 Defines the MTP object meta-data.
       
    29 @publishedPartner
       
    30 @released
       
    31 */
       
    32 class CMTPObjectMetaData : public CMTPMetaData
       
    33 {
       
    34 public:
       
    35 
       
    36     /**
       
    37     MTP object meta-data element identifiers.
       
    38     */      
       
    39     enum TElementId
       
    40         {        
       
    41         /**
       
    42         The ID of the data provider responsible for the data object. This 
       
    43         element is of type @see TUint.
       
    44         */
       
    45         EDataProviderId     = 0,
       
    46         
       
    47         /**
       
    48         The object format code. This element is of type @see TUint.
       
    49         */
       
    50         EFormatCode         = 1,
       
    51         
       
    52         /**
       
    53         The object format sub-code. Currently this field is ignored unless the 
       
    54         @see EFormatCode contains a value of @see EMTPFormatCodeAssociation, in 
       
    55         which case this field should the specify the MTP association type code.
       
    56         This element is of type @see TUint.
       
    57         */
       
    58         EFormatSubCode      = 2,
       
    59         
       
    60         /**
       
    61         The object handle. This element is of type @see TUint.
       
    62         */
       
    63         EHandle             = 3,
       
    64         
       
    65         /**
       
    66         The set of MTP operational modes in which the object is visible and 
       
    67         will be enumerated to a connected MTP Initiator. The MTP operational
       
    68         modes are represented as a set of @see TMTPOperationalMode bit flags.
       
    69         This element is of type @see TUint 
       
    70         */
       
    71         EModes              = 4,
       
    72         
       
    73         /**
       
    74         The parent object handle. This element is of type @see TUint.
       
    75         */
       
    76         EParentHandle       = 5,
       
    77         
       
    78         /**
       
    79         The MTP storage ID of the storage on which the data object resides. 
       
    80         This element is of type @see TUint.
       
    81         */
       
    82         EStorageId          = 6,
       
    83         
       
    84         /**
       
    85         The MTP storage ID of the storage on which the data object resides. 
       
    86         This element is of type @see TUint.
       
    87         */
       
    88         EStorageVolumeId    = 7,
       
    89         
       
    90         /**
       
    91         The data object's System Unique IDentifier (SUID). This element is of 
       
    92         type @see TDesC&.
       
    93         */
       
    94         ESuid               = 8,
       
    95 
       
    96 		/**
       
    97 		The data object's user rating
       
    98 		This element is of type @see TUint.
       
    99 		@deprecated
       
   100 		*/
       
   101 		EUserRating = 9,
       
   102 
       
   103 		/** 
       
   104 		The data object's BuyNow flag
       
   105 		This element is of type @see TUint.
       
   106 		@deprecated
       
   107 		*/
       
   108 		EBuyNow = 10,
       
   109 
       
   110 		/** The data object's Played flag
       
   111 		This element is of type @see TUint.
       
   112 		@deprecated
       
   113 		*/
       
   114 		EPlayCount = 11,
       
   115 		
       
   116 		/**
       
   117 		The data Objects Identifier as in HandleStore table
       
   118 		This element is of type @see TUint.
       
   119 		*/
       
   120 		EIdentifier = 12,
       
   121 		
       
   122 		/**
       
   123 		The id related to ParentHandle
       
   124 		This element is of type @see TUint.
       
   125 		*/
       
   126 		//EParentId = 13,
       
   127 		
       
   128 		/**
       
   129 		The flag, used in object modification, indicates if the modified object
       
   130 		should be reported to initiator
       
   131 		This element is of type @see TUint.
       
   132 		*/
       
   133 		ENonConsumable = 13,
       
   134 		
       
   135 		EObjectMetaDataUpdate = 14,	
       
   136 
       
   137 		EName = 15,
       
   138         /**
       
   139         The number of elements.        
       
   140         */
       
   141         ENumElements,
       
   142         };
       
   143 
       
   144 public:
       
   145     
       
   146     IMPORT_C static CMTPObjectMetaData* NewL();
       
   147     IMPORT_C static CMTPObjectMetaData* NewLC();
       
   148     IMPORT_C static CMTPObjectMetaData* NewL(TUint aDataProviderId, TUint aFormatCode, TUint aStorageId, const TDesC& aSuid);
       
   149     IMPORT_C static CMTPObjectMetaData* NewLC(TUint aDataProviderId, TUint aFormatCode, TUint aStorageId, const TDesC& aSuid);
       
   150     IMPORT_C ~CMTPObjectMetaData();
       
   151     
       
   152 private:
       
   153     
       
   154     CMTPObjectMetaData();
       
   155     void ConstructL();
       
   156     void ConstructL(TUint aDataProviderId, TUint aFormatCode, TUint aStorageId, const TDesC& aSuid);
       
   157     /* @deprecated */
       
   158     void ConstructL( const TDesC& aSuid, TUint aUserRating, TUint aBuyNow, TUint aPlayCount);
       
   159 
       
   160 public:
       
   161 	/* @deprecated */
       
   162     IMPORT_C static CMTPObjectMetaData* NewL(const TDesC& aSuid, TUint aUserRating, TUint aBuyNow, TUint aPlayCount );
       
   163     /* @deprecated */
       
   164     IMPORT_C static CMTPObjectMetaData* NewLC(const TDesC& aSuid, TUint aUserRating, TUint aBuyNow, TUint aPlayCount );
       
   165     
       
   166 private:  // Owned
       
   167     
       
   168     /**
       
   169     The element meta-data.
       
   170     */
       
   171     static const TElementMetaData   KElements[];
       
   172 };
       
   173 
       
   174 #endif // CMTPOBJECTMETADATA_H