mmappfw_plat/mpx_common_api/inc/mpxmediageneraldefs.h
changeset 0 a2952bb97e68
child 17 780c925249c1
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Definitions for general media type
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CMPXMEDIAGENERALDEFS_H
       
    21 #define CMPXMEDIAGENERALDEFS_H
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <mpxattribute.h>
       
    26 
       
    27 /**
       
    28 * Content ID identifying general category of content provided
       
    29 * in the media object and associated attributes. This should
       
    30 * be supported by ALL media objects as a common base
       
    31 */
       
    32 
       
    33 const TInt KMPXMediaIdGeneral=0x101FFC40;
       
    34 /**
       
    35 *  Attributes supported for KMPXMediaIdGeneral
       
    36 */
       
    37 /**
       
    38 *  TMPXGeneralType}; see below for enum definition
       
    39 */
       
    40 const TMPXAttributeData KMPXMediaGeneralType={KMPXMediaIdGeneral,0x01};
       
    41 
       
    42 /**
       
    43 *  TMPXGeneralCategory}; see below for enum definition
       
    44 */
       
    45 const TMPXAttributeData KMPXMediaGeneralCategory={KMPXMediaIdGeneral,0x02};
       
    46 
       
    47 /**
       
    48 *  Descriptor. File path if local (excluding scheme).
       
    49 */
       
    50 const TMPXAttributeData KMPXMediaGeneralUri={KMPXMediaIdGeneral,0x04};
       
    51 
       
    52 /**
       
    53 *  Descriptor. Drive}; if local (and physical)
       
    54 */
       
    55 const TMPXAttributeData KMPXMediaGeneralDrive={KMPXMediaIdGeneral,0x08};
       
    56 
       
    57 /**
       
    58 *  TInt}; in bytes
       
    59 */
       
    60 const TMPXAttributeData KMPXMediaGeneralSize={KMPXMediaIdGeneral,0x10};
       
    61 
       
    62 /**
       
    63 *  TInt.
       
    64 *  0 if static}; KMaxTInt if continous stream. If container};
       
    65 *  then duration applies to sum of contents
       
    66 */
       
    67 const TMPXAttributeData KMPXMediaGeneralDuration={KMPXMediaIdGeneral,0x20};
       
    68 
       
    69 /**
       
    70 *  Descriptor
       
    71 */
       
    72 const TMPXAttributeData KMPXMediaGeneralTitle={KMPXMediaIdGeneral,0x40};
       
    73 
       
    74 /**
       
    75 *  TTime.Int64(). Storing as TTime instead TInt64
       
    76 *  will result in compilation warning.
       
    77 */
       
    78 const TMPXAttributeData KMPXMediaGeneralDate={KMPXMediaIdGeneral,0x80};
       
    79 
       
    80 /**
       
    81 *  Descriptor
       
    82 */
       
    83 const TMPXAttributeData KMPXMediaGeneralComment={KMPXMediaIdGeneral,0x100};
       
    84 
       
    85 /**
       
    86 *  Descriptor
       
    87 */
       
    88 const TMPXAttributeData KMPXMediaGeneralMimeType={KMPXMediaIdGeneral,0x200};
       
    89 
       
    90 /**
       
    91 *  CFbsBitmap - for now could
       
    92 *  be file path in future to enable easier
       
    93 *  porting of client (i.e. UI)
       
    94 */
       
    95 const TMPXAttributeData KMPXMediaGeneralThumbnail1={KMPXMediaIdGeneral,0x400};
       
    96 
       
    97 /**
       
    98 *  CFbsBitmap - for now could
       
    99 *  be file path in future to enable easier
       
   100 *  porting of client (i.e. UI)
       
   101 */
       
   102 const TMPXAttributeData KMPXMediaGeneralThumbnail2={KMPXMediaIdGeneral,0x800};
       
   103 
       
   104 /**
       
   105 *  TIconInfo - Bitmap
       
   106 */
       
   107 const TMPXAttributeData KMPXMediaGeneralIcon={KMPXMediaIdGeneral,0x1000};
       
   108 
       
   109 /**
       
   110 *  TBool
       
   111 */
       
   112 const TMPXAttributeData KMPXMediaGeneralRemote={KMPXMediaIdGeneral,0x2000};
       
   113 
       
   114 /**
       
   115 *  TBool
       
   116 */
       
   117 const TMPXAttributeData KMPXMediaGeneralSynchronized={KMPXMediaIdGeneral,0x4000};
       
   118 
       
   119 /**
       
   120 *  TBool
       
   121 */
       
   122 const TMPXAttributeData KMPXMediaGeneralDeleted={KMPXMediaIdGeneral,0x8000};
       
   123 
       
   124 /**
       
   125 * TBool
       
   126 */
       
   127 const TMPXAttributeData KMPXMediaGeneralModified ={KMPXMediaIdGeneral, 0x10000};
       
   128 
       
   129 /**
       
   130 *  TInt. Number of items (if container}; else
       
   131 *  would trivially be 1)
       
   132 */
       
   133 const TMPXAttributeData KMPXMediaGeneralCount={KMPXMediaIdGeneral,0x20000};
       
   134 
       
   135 /**
       
   136 *  TMPXItemId (as def'd in CollectionPath)
       
   137 *  ID of item
       
   138 */
       
   139 const TMPXAttributeData KMPXMediaGeneralId={KMPXMediaIdGeneral,0x40000};
       
   140 
       
   141 /**
       
   142 *  Collection id of this media
       
   143 */
       
   144 const TMPXAttributeData KMPXMediaGeneralCollectionId={KMPXMediaIdGeneral,0x80000};
       
   145 
       
   146 /**
       
   147 *  TBool}; indicates if Uri is a broken link
       
   148 *  DEPRECATED - TO BE REMOVED IN INCREMENT 9 RELEASE
       
   149 *  This attribute has been replaced by
       
   150 *  KMPXMediaGeneralFlagsIsInvalid bit in
       
   151 *  const TMPXAttributeData KMPXMediaGeneralFlags
       
   152 */
       
   153 const TMPXAttributeData KMPXMediaGeneralBrokenLink={KMPXMediaIdGeneral,0x100000};
       
   154 
       
   155 /**
       
   156 *  TUint}; indicates which rights an end user
       
   157 *  does not have to perform on the media.
       
   158 *  Non-permissible actions are defined in
       
   159 *  TMPXGeneralNonPermissibleActions. Values
       
   160 *  can be combined.
       
   161 */
       
   162 const TMPXAttributeData KMPXMediaGeneralNonPermissibleActions={KMPXMediaIdGeneral,0x200000};
       
   163 
       
   164 /**
       
   165 *  TMPXItemId (as def'd in CollectionPath)
       
   166 *  ID of item's container or container
       
   167 */
       
   168 const TMPXAttributeData KMPXMediaGeneralContainerId={KMPXMediaIdGeneral,0x400000};
       
   169 
       
   170 /**
       
   171 *  Descriptor}; subtitle for this media
       
   172 */
       
   173 const TMPXAttributeData KMPXMediaGeneralSubTitle={KMPXMediaIdGeneral,0x800000};
       
   174 
       
   175 /**
       
   176 * Copyright information
       
   177 */
       
   178 const TMPXAttributeData KMPXMediaGeneralCopyright={KMPXMediaIdGeneral,0x1000000};
       
   179 
       
   180 /**
       
   181 * Flags stored in the database}; TUint
       
   182 */
       
   183 const TMPXAttributeData KMPXMediaGeneralFlags={KMPXMediaIdGeneral,0x2000000};
       
   184 
       
   185 /**
       
   186 * Last playback position}; TInt
       
   187 */
       
   188 const TMPXAttributeData KMPXMediaGeneralLastPlaybackPosition={KMPXMediaIdGeneral,0x4000000};
       
   189 
       
   190 /**
       
   191 * Last playback Time
       
   192 *  TTime.Int64(). Storing as TTime instead TInt64
       
   193 *  will result in compilation warning.
       
   194 */
       
   195 const TMPXAttributeData KMPXMediaGeneralLastPlaybackTime={KMPXMediaIdGeneral,0x8000000};
       
   196 
       
   197 /**
       
   198 * Play Count}; TUInt
       
   199 */
       
   200 const TMPXAttributeData KMPXMediaGeneralPlayCount={KMPXMediaIdGeneral,0x10000000};
       
   201 
       
   202 /**
       
   203 * Media container path
       
   204 */
       
   205 const TMPXAttributeData KMPXMediaGeneralContainerPath={KMPXMediaIdGeneral,0x20000000};
       
   206 
       
   207 /**
       
   208 * Media collection path}; CMPXCollectionPath
       
   209 */
       
   210 const TMPXAttributeData KMPXMediaGeneralPath={KMPXMediaIdGeneral,0x40000000};
       
   211 
       
   212 /** TInt
       
   213 *
       
   214 * A single word of general value users defined
       
   215 *
       
   216 * In practice, this word can be used to hold a pointer to allocated
       
   217 * memory; this makes that memory available to all code running on behalf
       
   218 * of the same thread.
       
   219 *
       
   220 */
       
   221 const TMPXAttributeData KMPXMediaGeneralValue={KMPXMediaIdGeneral,0x80000000};
       
   222 
       
   223 /**
       
   224 * Every attribute
       
   225 */
       
   226 const TMPXAttributeData KMPXMediaGeneralAll={KMPXMediaIdGeneral,0xffffffff};
       
   227 
       
   228 /**
       
   229 * Basic set of attributes, typically used for browsing where minimal data is
       
   230 * required. Type, category, title, duration
       
   231 */
       
   232 const TMPXAttributeData KMPXMediaGeneralBasic={KMPXMediaIdGeneral,0x01|0x02|0x20|0x40};
       
   233 
       
   234 /** 
       
   235 *  Attributes supported for KMPXMediaIdGeneral
       
   236 *
       
   237 *  @deprecated Use the above consts
       
   238 */
       
   239 enum
       
   240     {
       
   241     /**
       
   242     *  TMPXGeneralType, see below for enum definition
       
   243     */
       
   244     EMPXMediaGeneralType=0x01,
       
   245 
       
   246     /**
       
   247     *  TMPXGeneralCategory, see below for enum definition
       
   248     */
       
   249     EMPXMediaGeneralCategory=0x02,
       
   250 
       
   251     /**
       
   252     *  Descriptor. File path if local (excluding scheme).
       
   253     */
       
   254     EMPXMediaGeneralUri=0x04,
       
   255 
       
   256     /**
       
   257     *  Descriptor. Drive, if local (and physical)
       
   258     */
       
   259     EMPXMediaGeneralDrive=0x08,
       
   260 
       
   261     /**
       
   262     *  TInt, in bytes
       
   263     */
       
   264     EMPXMediaGeneralSize=0x10,
       
   265 
       
   266     /**
       
   267     *  TInt.
       
   268     *  0 if static, KMaxTInt if continous stream. If container,
       
   269     *  then duration applies to sum of contents
       
   270     */
       
   271     EMPXMediaGeneralDuration=0x20,
       
   272 
       
   273     /**
       
   274     *  Descriptor
       
   275     */
       
   276     EMPXMediaGeneralTitle=0x40,
       
   277 
       
   278     /**
       
   279     *  TTime.Int64(). Storing as TTime instead TInt64
       
   280     *  will result in compilation warning.
       
   281     */
       
   282     EMPXMediaGeneralDate=0x80,
       
   283 
       
   284     /**
       
   285     *  Descriptor
       
   286     */
       
   287     EMPXMediaGeneralComment=0x100,
       
   288 
       
   289     /**
       
   290     *  Descriptor
       
   291     */
       
   292     EMPXMediaGeneralMimeType=0x200,
       
   293 
       
   294     /**
       
   295     *  CFbsBitmap - for now could
       
   296     *  be file path in future to enable easier
       
   297     *  porting of client (i.e. UI)
       
   298     */
       
   299     EMPXMediaGeneralThumbnail1=0x400,
       
   300 
       
   301     /**
       
   302     *  CFbsBitmap - for now could
       
   303     *  be file path in future to enable easier
       
   304     *  porting of client (i.e. UI)
       
   305     */
       
   306     EMPXMediaGeneralThumbnail2=0x800,
       
   307 
       
   308     /**
       
   309     *  TIconInfo - Bitmap
       
   310     */
       
   311     EMPXMediaGeneralIcon=0x1000,
       
   312 
       
   313     /**
       
   314     *  TBool
       
   315     */
       
   316     EMPXMediaGeneralRemote=0x2000,
       
   317 
       
   318     /**
       
   319     *  TBool
       
   320     */
       
   321     EMPXMediaGeneralSynchronized=0x4000,
       
   322 
       
   323     /**
       
   324     *  TBool
       
   325     */
       
   326     EMPXMediaGeneralDeleted=0x8000,
       
   327 
       
   328     /**
       
   329     * TBool
       
   330     */
       
   331     EMPXMediaGeneralModified = 0x10000,
       
   332 
       
   333     /**
       
   334     *  TInt. Number of items (if container, else
       
   335     *  would trivially be 1)
       
   336     */
       
   337     EMPXMediaGeneralCount=0x20000,
       
   338 
       
   339     /**
       
   340     *  TMPXItemId (as def'd in CollectionPath)
       
   341     *  ID of item
       
   342     */
       
   343     EMPXMediaGeneralId=0x40000,
       
   344 
       
   345     /**
       
   346     *  Collection id of this media
       
   347     */
       
   348     EMPXMediaGeneralCollectionId=0x80000,
       
   349 
       
   350     /**
       
   351     *  TBool, indicates if Uri is a broken link
       
   352     *  DEPRECATED - TO BE REMOVED IN INCREMENT 9 RELEASE
       
   353     *  This attribute has been replaced by
       
   354     *  KMPXMediaGeneralFlagsIsInvalid bit in
       
   355     *  EMPXMediaGeneralFlags
       
   356     */
       
   357     EMPXMediaGeneralBrokenLink=0x100000,
       
   358 
       
   359     /**
       
   360     *  TUint, indicates which rights an end user
       
   361     *  does not have to perform on the media.
       
   362     *  Non-permissible actions are defined in
       
   363     *  TMPXGeneralNonPermissibleActions. Values
       
   364     *  can be combined.
       
   365     */
       
   366     EMPXMediaGeneralNonPermissibleActions=0x200000,
       
   367 
       
   368    /**
       
   369     *  TMPXItemId (as def'd in CollectionPath)
       
   370     *  ID of item's container or container
       
   371     */
       
   372     EMPXMediaGeneralContainerId=0x400000,
       
   373 
       
   374     /**
       
   375     *  Descriptor, subtitle for this media
       
   376     */
       
   377     EMPXMediaGeneralSubTitle=0x800000,
       
   378 
       
   379     /**
       
   380     * Copyright information
       
   381     */
       
   382     EMPXMediaGeneralCopyright=0x1000000,
       
   383 
       
   384     /**
       
   385     * Flags stored in the database, TUint
       
   386     */
       
   387     EMPXMediaGeneralFlags=0x2000000,
       
   388 
       
   389     /**
       
   390     * Last playback position, TInt
       
   391     */
       
   392     EMPXMediaGeneralLastPlaybackPosition=0x4000000,
       
   393 
       
   394     /**
       
   395     * Last playback Time
       
   396     *  TTime.Int64(). Storing as TTime instead TInt64
       
   397     *  will result in compilation warning.
       
   398     */
       
   399     EMPXMediaGeneralLastPlaybackTime=0x8000000,
       
   400 
       
   401     /**
       
   402     * Play Count, TUInt
       
   403     */
       
   404     EMPXMediaGeneralPlayCount=0x10000000,
       
   405 
       
   406     /**
       
   407     * Media container path
       
   408     */
       
   409     EMPXMediaContainerPath=0x20000000,
       
   410 
       
   411     /**
       
   412     * Media collection path, CMPXCollectionPath
       
   413     */
       
   414     EMPXMediaPath=0x40000000,
       
   415 
       
   416     /**
       
   417     * Every attribute
       
   418     */
       
   419     EMPXMediaGeneralAll=0xffffffff,
       
   420 
       
   421     /**
       
   422     *  Basic set of attributes, typically used for
       
   423     *  browsing where minimal data is required
       
   424     */
       
   425     EMPXMediaGeneralBasic=EMPXMediaGeneralType|
       
   426                           EMPXMediaGeneralCategory|
       
   427                           EMPXMediaGeneralTitle|
       
   428                           EMPXMediaGeneralDuration
       
   429     };
       
   430 
       
   431 
       
   432 enum TMPXGeneralType
       
   433     {
       
   434     EMPXNoType,
       
   435     EMPXGroup,
       
   436     EMPXItem,
       
   437     EMPXOtherType
       
   438     };
       
   439 
       
   440 enum TMPXGeneralCategory
       
   441     {
       
   442     EMPXNoCategory,
       
   443     EMPXCollection,
       
   444     EMPXPlaylist,
       
   445     EMPXSong,
       
   446     EMPXPodcast,
       
   447     EMPXArtist,
       
   448     EMPXAlbum,
       
   449     EMPXGenre,
       
   450     EMPXComposer,
       
   451     EMPXFile,
       
   452     EMPXImage,
       
   453     EMPXVideo,
       
   454     EMPXRadio,
       
   455     EMPXMessage,
       
   456     EMPXTag,
       
   457     EMPXCommand,
       
   458     EMPXMonth,
       
   459     EMPXOther
       
   460     };
       
   461 
       
   462 enum TMPXGeneralNonPermissibleActions
       
   463     {
       
   464     EMPXRead=0x01,
       
   465     EMPXWrite=0x02,
       
   466     EMPXCache=0x04
       
   467     };
       
   468 
       
   469 const TUint KMPXMediaGeneralFlagsDriveInfo=0x1F; // lower 5 bits
       
   470 
       
   471 // Top bit indicates whether to set or reset flag value.
       
   472 // If this bit is set, then the parameter that is passed in will
       
   473 // specify which bits to be set.
       
   474 // If this bit is unset, then the parameter that is passed in will
       
   475 // specify which bits will be unset.
       
   476 const TUint KMPXMediaGeneralFlagsSetOrUnsetBit=0x80000000; // top bit
       
   477 const TUint KMPXMediaGeneralFlagsIsCorrupted=0x40000000; // second bit
       
   478 const TUint KMPXMediaGeneralFlagsIsInvalid=0x20000000; // third bit
       
   479 const TUint KMPXMediaGeneralFlagsIsDrmProtected=0x10000000; // forth bit
       
   480 const TUint KMPXMediaGeneralFlagsIsDrmLicenceInvalid=0x08000000; // fifth bit
       
   481 const TUint KMPXMediaGeneralFlagsIsVirtual=0x04000000; // sixth bit
       
   482 const TUint KMPXMediaGeneralFlagsIsMissingDetails=0x02000000; // seventh bit
       
   483 
       
   484 /*
       
   485 * Simple structure to hold icon info
       
   486 */
       
   487 NONSHARABLE_STRUCT( TIconInfo )
       
   488     {
       
   489     TInt bitmapId;
       
   490     TInt maskId;
       
   491     TFileName bmpfile;
       
   492     };
       
   493 
       
   494 #endif // CMPXMEDIAGENERALDEFS_H