mmappcomponents/mmmtpdataprovider/inc/cmmmtpdpmetadatampxaccess.h
branchRCL_3
changeset 17 780c925249c1
parent 14 05b0d2323768
child 23 4740b34b83ce
equal deleted inserted replaced
15:d240f0a77280 17:780c925249c1
    45  */
    45  */
    46 class CMmMtpDpMetadataMpxAccess : public CBase
    46 class CMmMtpDpMetadataMpxAccess : public CBase
    47     {
    47     {
    48 public:
    48 public:
    49 
    49 
    50     static CMmMtpDpMetadataMpxAccess* NewL( RFs& aRfs,
    50     static CMmMtpDpMetadataMpxAccess* NewL( RFs& aRfs );
    51         MMTPDataProviderFramework& aFramework );
       
    52 
    51 
    53     /**
    52     /**
    54      * Destructor
    53      * Destructor
    55      */
    54      */
    56     ~CMmMtpDpMetadataMpxAccess();
    55     ~CMmMtpDpMetadataMpxAccess();
    97     void AddAbstractMediaL( const TDesC& aFullFileName,
    96     void AddAbstractMediaL( const TDesC& aFullFileName,
    98         TMPXGeneralCategory aCategory );
    97         TMPXGeneralCategory aCategory );
    99 
    98 
   100     /**
    99     /**
   101      * Set abstract media to DB
   100      * Set abstract media to DB
   102      * @param aAbstractMediaFileName, full file name of abstract media file
   101      * @param aRefOwnerName, full file name of abstract media file
   103      * @param aRefFileArray, a array to store the full file name of media files
   102      * @param aRefFileArray, a array to store the full file name of media files
   104      * @param aCategory, indicate the category of abstract media
   103      * @param aCategory, indicate the category of abstract media
   105      */
   104      */
   106     void SetAbstractMediaL( const TDesC& aAbstractMediaFileName,
   105     void SetReferenceL( const TDesC& aRefOwnerName,
   107         CDesCArray& aRefFileArray,
   106         CDesCArray& aRefFileArray,
   108         TMPXGeneralCategory aCategory );
   107         TMPXGeneralCategory aCategory );
   109 
   108 
   110     void GetObjectMetadataValueL( const TUint16 aPropCode,
   109     void GetObjectMetadataValueL( const TUint16 aPropCode,
   111         MMTPType& aNewData,
   110         MMTPType& aNewData,
   112         const CMTPObjectMetaData& aObjectMetaData );
   111         const TDesC& aFullFileName,
       
   112         TMPXGeneralCategory aCategory );
   113 
   113 
   114     /**
   114     /**
   115      * Set object property and updated object in DB according property code,
   115      * Set object property and updated object in DB according property code,
   116      * only for update, not for creation
   116      * only for update, not for creation
   117      * @param aPropCode, property code of aObjectMetaData
   117      * @param aPropCode, property code of aObjectMetaData
   120      * @param aObjectMetaData, owner of the property which should be
   120      * @param aObjectMetaData, owner of the property which should be
   121      *     updated into database
   121      *     updated into database
   122      */
   122      */
   123     void SetObjectMetadataValueL( const TUint16 aPropCode,
   123     void SetObjectMetadataValueL( const TUint16 aPropCode,
   124         const MMTPType& aNewData,
   124         const MMTPType& aNewData,
   125         const CMTPObjectMetaData& aObjectMetaData );
   125         const TDesC& aFullFileName,
   126 
   126         TMPXGeneralCategory aCategory );
   127     /**
       
   128      * Set object property and updated object in DB according property code,
       
   129      * only for update, not for creation
       
   130      * @param aPropCode, property code of aObjectMetaData
       
   131      * @param aNewData, object property value which will be set into
       
   132      *     aObjectMetaData
       
   133      * @param aSuid, full file name of object of which properties need to set
       
   134      */
       
   135     void SetObjectMetadataValueL( const TUint16 aPropCode,
       
   136         const MMTPType& aNewData,
       
   137         const TDesC& aSuid );
       
   138 
   127 
   139     CMPXMedia* FindWMPMediaLC( TMPXAttributeData aWMPMediaID,
   128     CMPXMedia* FindWMPMediaLC( TMPXAttributeData aWMPMediaID,
   140         TBool aFlag );
   129         TBool aFlag );
   141 
   130 
   142     /**
   131     /**
   156 
   145 
   157     /**
   146     /**
   158      * Rename the filename onto MPX DB
   147      * Rename the filename onto MPX DB
   159      * @param aOldFileName, the old file to rename
   148      * @param aOldFileName, the old file to rename
   160      * @param aNewFileName, the new file name
   149      * @param aNewFileName, the new file name
   161      * @param aFormatCode, the format of object
   150      * @param aCategory, the category of object
   162      */
   151      */
   163     void RenameObjectL( const TDesC& aOldFileName,
   152     void RenameObjectL( const TDesC& aOldFileName,
   164         const TDesC& aNewFileName,
   153         const TDesC& aNewFileName,
   165         TUint aFormatCode );
   154         TMPXGeneralCategory aCategory );
   166 
   155 
   167     /**
   156     /**
   168      * Set current  drive info
   157      * Set current  drive info
   169      * @param aStorageRoot, current drive info
   158      * @param aStorageRoot, current drive info
   170      */
   159      */
   183      * @param aSuid, the suid of playlsit
   172      * @param aSuid, the suid of playlsit
   184      */
   173      */
   185     TBool IsExistL( const TDesC& aSuid );
   174     TBool IsExistL( const TDesC& aSuid );
   186 
   175 
   187 private:
   176 private:
   188     CMmMtpDpMetadataMpxAccess( RFs& aFs,
   177     CMmMtpDpMetadataMpxAccess( RFs& aFs );
   189         MMTPDataProviderFramework& aFramework );
       
   190 
   178 
   191     void ConstructL();
   179     void ConstructL();
   192 
   180 
   193     void SetDefaultL( CMPXMedia& aMediaProp );
   181     void SetDefaultL( CMPXMedia& aMediaProp );
   194 
   182 
   208     TMPXAttributeData MpxAttribFromPropL( const TUint16 aPropCode );
   196     TMPXAttributeData MpxAttribFromPropL( const TUint16 aPropCode );
   209 
   197 
   210     MMPXCollectionHelper* CollectionHelperL();
   198     MMPXCollectionHelper* CollectionHelperL();
   211 
   199 
   212 private:
   200 private:
   213     // File server to allow file access
       
   214     RFs& iRfs;
   201     RFs& iRfs;
   215 
   202 
   216     TBuf<KStorageRootMaxLength> iStoreRoot;
   203     TBuf<KStorageRootMaxLength> iStoreRoot;
   217 
   204 
   218     MMPXCollectionHelper* iCollectionHelper;
   205     MMPXCollectionHelper* iCollectionHelper;
   219 
       
   220     MMTPDataProviderFramework& iFramework;
       
   221 
   206 
   222 #if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
   207 #if defined(_DEBUG) || defined(MMMTPDP_PERFLOG)
   223     CMmMtpDpPerfLog* iPerfLog;
   208     CMmMtpDpPerfLog* iPerfLog;
   224 #endif
   209 #endif
   225 
   210