mmappcomponents/mmmtpdataprovider/inc/mmmtpdputility.h
changeset 25 d881023c13eb
parent 0 a2952bb97e68
child 32 edd273b3192a
equal deleted inserted replaced
21:a05c44bc3c61 25:d881023c13eb
    22 #include <mtp/mtpprotocolconstants.h>
    22 #include <mtp/mtpprotocolconstants.h>
    23 
    23 
    24 #include "mmmtpdpfiledefs.h"
    24 #include "mmmtpdpfiledefs.h"
    25 
    25 
    26 // forward declacration
    26 // forward declacration
    27 class CMTPObjectMetaData;
    27 class RFs;
    28 class MMTPDataProviderFramework;
       
    29 
    28 
    30 class MmMtpDpUtility
    29 class MmMtpDpUtility
    31     {
    30     {
    32 public:
    31 public:
    33     /**
    32     /**
    43     * @return TBool for decide if has metadata
    42     * @return TBool for decide if has metadata
    44     */
    43     */
    45     static TBool HasMetadata( TUint16 aObjFormatCode );
    44     static TBool HasMetadata( TUint16 aObjFormatCode );
    46 
    45 
    47     /**
    46     /**
    48     * Utility function to decide if the file is video.
    47     * Utility function to decide if there is any reference
    49     * @param aFullFileName, the full file name
    48     * @param aObjFormatCode, object format code
    50     * @return TBool for decide if the file is video
    49     * @return TBool for decide if there are some references
    51     */
    50     */
    52     IMPORT_C static TBool IsVideoL( const TDesC& aFullFileName );
    51     static TBool HasReference( TUint16 aObjFormatCode );
    53 
       
    54     /**
       
    55     * Utility function to decide if the file is video.
       
    56     * For internal use, this is fast version by querying framework DB
       
    57     * @param aFullFileName, the full file name
       
    58     * @param aFramework, the mtp framework instance pointer, default is null
       
    59     * @return TBool for decide if the file is video
       
    60     */
       
    61     static TBool IsVideoL( const TDesC& aFullFileName, const MMTPDataProviderFramework& aFramework );
       
    62 
    52 
    63     /**
    53     /**
    64     * Check the filename length to see if it exceeds Symbian 256 limit.
    54     * Check the filename length to see if it exceeds Symbian 256 limit.
    65     * @param aPathName, the path name of the file
    55     * @param aPathName, the path name of the file
    66     * @param aFileName, the file to be check
    56     * @param aFileName, the file to be check
    81     * Get file date modified info
    71     * Get file date modified info
    82     * @param aFs , handle of file server session
    72     * @param aFs , handle of file server session
    83     * @param aFullFileName, fine name
    73     * @param aFullFileName, fine name
    84     * @return TTime for specified file
    74     * @return TTime for specified file
    85     */
    75     */
    86     static TTime GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName );
    76     static void GetObjectDateModifiedL( RFs& aFs, const TDesC& aFullFileName, TDes& aDateModified );
    87 
    77 
    88     /**
    78     /**
    89     * Check if file is read-only, if file doesn't exist, leave
    79     * Check if file is read-only, if file doesn't exist, leave
    90     * @param aFs , handle of file server session
    80     * @param aFs , handle of file server session
    91     * @param aFullFileName, the file to be check
    81     * @param aFullFileName, the file to be check
   143     * get the sub format code by mime
   133     * get the sub format code by mime
   144     * @param aMimeType, mime type
   134     * @param aMimeType, mime type
   145     * @param aSubFormatCode, output the sub format code
   135     * @param aSubFormatCode, output the sub format code
   146     * @return if success, return KErrNone, otherwise, error code
   136     * @return if success, return KErrNone, otherwise, error code
   147     */
   137     */
   148     static TInt SubFormatCodeFromMime( const TDesC8& aMimeType, TMmMtpSubFormatCode& aSubFormatCode );
   138     static TMmMtpSubFormatCode SubFormatCodeFromMime( const TDesC8& aMimeType );
   149 
   139 
   150     /**
   140     /**
   151     * Get DRM status
   141     * Get DRM status
   152     * @param aFullFileName, full file name
   142     * @param aFullFileName, full file name
   153     * @return return DRM status code
   143     * @return return DRM status code