mmappfw_plat/mpx_playback_common_definition_api/inc/mpxplaybackframeworkdefs.h
changeset 0 a2952bb97e68
child 2 7a9a8e73f54b
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:  Common definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPXPLAYBACKFRAMEWORKDEFS_H
       
    20 #define MPXPLAYBACKFRAMEWORKDEFS_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <mpxplaybackcommanddefs.h> // TMPXPlaybackCommand. After all of clients
       
    25                                     // inlcude this file. this line can be removed.
       
    26 #include <mpxplaybackplugin.hrh> // TMPXPlaybackPlayerType
       
    27 
       
    28 // 2s - time into the track after which 'back' replays track, else previous track
       
    29 const TInt KPbReplayThresholdMiliSeconds=2000;
       
    30 // 4s - fades into track over KPbFadeInDurationMicroSeconds
       
    31 const TInt KPbFadeInDurationMicroSeconds=4000000;
       
    32 // 1s - updates position every KPbPosUpdateMicroSeconds
       
    33 const TInt KPbPosUpdateMicroSeconds=1000000;
       
    34 // 3s - time taken to fade in after a call
       
    35 const TInt KPbResumeWaitTimeMicroSeconds=3000000;
       
    36 // 0.5s - interval during which media keys will be buffered
       
    37 const TInt KPbMediaKeyIntervalMicroSeconds=500000;
       
    38 const TInt KPbSeekIntervalMicroSeconds=300000; // 0.3s  - how often to update
       
    39 const TInt KPbInitialSeekStepMilliSeconds=1000; // 1s (1000 millisecond) - first seek step
       
    40 const TInt KPbMaxSeekStepPercent=5; // Maximum step size is 5% of duration
       
    41 const TInt KPbSeekAccelerationFactor=2; // Each step doubles acceleration speed
       
    42 // Multiplier from second to microsecond
       
    43 const TInt KPbMicroMultiplier = 1000000;
       
    44 // Multiplier from second to millisecond
       
    45 const TInt KPbMilliMultiplier = 1000;
       
    46 // Minimum volume level
       
    47 const TInt KPbPlaybackVolumeLevelMin = 0;
       
    48 // Maximum volume level
       
    49 const TInt KPbPlaybackVolumeLevelMax = 100;
       
    50 // Default volume level
       
    51 const TInt KMPXPlaybackDefaultVolume = 40;
       
    52 // Position threshold for changes (in miliseconds)
       
    53 const TInt KPbPositionChangeThreshold = 1500;
       
    54 // Duration change threshold (in miliseconds)
       
    55 const TInt KPbDurationChangeThreshold = 1500;
       
    56 
       
    57 // UID definition for playback mode
       
    58 // For application playback mode, application UID can be used
       
    59 //
       
    60 const TUid KPbModeDefault = {0x10282930}; // Uses same player as any other
       
    61                                           // player running in same
       
    62 const TUid KPbModeActivePlayer = {0x10282931}; // Currently active player or any player if no active player.
       
    63 const TUid KPbModeNewPlayer = {0x10282932}; // New player
       
    64 
       
    65 
       
    66 // Category for playback utility creation.
       
    67 enum TMPXCategory
       
    68     {
       
    69     EMPXCategoryUndefined = 0,
       
    70     EMPXCategoryMusic,
       
    71     EMPXCategoryVideo
       
    72     };
       
    73 
       
    74 enum TMPXPlaybackState // State of current player
       
    75     {
       
    76     EPbStateNotInitialised, // 0
       
    77     EPbStateInitialising,   // 1
       
    78     EPbStatePlaying,        // 2
       
    79     EPbStatePaused,         // 3
       
    80     EPbStateStopped,        // 4
       
    81     EPbStateSeekingForward, // 5
       
    82     EPbStateSeekingBackward,// 6
       
    83     EPbStateShuttingDown,   // 7
       
    84     EPbStateBuffering,      // 8
       
    85     EPbStateDownloading,    // 9
       
    86     EPbStatePluginSeeking,  // 10	
       
    87     EPbStateInitialised    // 11    
       
    88     };
       
    89 
       
    90 enum // Supported features
       
    91     {
       
    92     EPbFeatureBalance=0x01,
       
    93     EPbFeatureEmbeddedMode=0x04,
       
    94     EPbFeatureCrossFade=0x08,
       
    95     EPbFeatureFadeIn=0x10,
       
    96     EPbFeatureSeekable=0x20,
       
    97     EPbFeatureNetwork=0x40,
       
    98     EPbFeatureVolumeRamp=0x80,
       
    99     EPbFeaturePdPausable=0x1000 //progress download pausable
       
   100     };
       
   101 
       
   102 /**
       
   103 *  Properties that can be queried, but not all can be set.
       
   104 *  Some properties pertain to the specific track, some to
       
   105 *  the specific player, and others are general
       
   106 */
       
   107 enum TMPXPlaybackProperty
       
   108     {
       
   109     EPbPropertyVolume,    // 0 volume level values 0-KPbPlaybackVolumeLevelMax
       
   110     EPbPropertyMaxVolume, // 1 read only, KPbPlaybackVolumeLevelMax
       
   111     EPbPropertyVolumeRamp,// 2
       
   112     EPbPropertyMute,      // 3 values 0(normal), 1(muted)
       
   113     EPbPropertyBalance,   // 4 values -100(left) - 0 - +100(right)
       
   114     EPbPropertyEmbeddedMode,// 5
       
   115     EPbPropertyCrossFade,   // 6
       
   116     EPbPropertyRandomMode,  // 7
       
   117     EPbPropertyRepeatMode,  // 8
       
   118     EPbPropertyAccessPoint, // 9
       
   119     EPbPropertyPosition,    // 10 depends on the plugin, it's safer to pause
       
   120                             // the playing item before setting position
       
   121     EPbPropertyDuration,    // 11 read only, millisecond
       
   122     EPbPropertySongValid,   // 12
       
   123     EPbPropertyRemote,      // 13
       
   124     EPbPropertySupportedFeatures,// 14 read only
       
   125     EPbPropertyNum               // 15 Last
       
   126     };
       
   127 
       
   128 enum TMPXPlaybackRepeatMode // Repeat settings
       
   129     {
       
   130     EPbRepeatOff, // No repeat
       
   131     EPbRepeatOne, // Play one track over and over again
       
   132     EPbRepeatAll  // Repeat the whole play list
       
   133     };
       
   134 
       
   135 enum // Balance settings
       
   136     {
       
   137     EPbBalanceMaxLeft=-100,
       
   138     EPbBalanceCenter=0,
       
   139     EPbBalanceMaxRight=100
       
   140     };
       
   141 
       
   142 #ifdef __ACCESSORY_FW
       
   143 
       
   144 /**
       
   145 * accessory modes:
       
   146 * EPbAccessoryHandPortable       Hand-portable
       
   147 * EPbAccessoryWiredHeadset       Wired headset
       
   148 * EPbAccessoryWirelessHeadset    Wireless headset
       
   149 * EPbAccessoryWiredCarKit        Wired carkit
       
   150 * EPbAccessoryWirelessCarKit     Wireless carkit
       
   151 * EPbAccessoryTextDevice         TTY
       
   152 * EPbAccessoryLoopset            Loopset
       
   153 * EPbAccessoryMusicStand         Musicstand
       
   154 */
       
   155 enum TMPXPlaybackAccessoryMode
       
   156     {
       
   157     EPbAccessoryModeUnknown        = -1,
       
   158     EPbAccessoryHandPortable       = 0x00000000,
       
   159     EPbAccessoryWiredHeadset       = 0x00000001,
       
   160     EPbAccessoryWirelessHeadset    = 0x00000002,
       
   161     EPbAccessoryWiredCarKit        = 0x00000004,
       
   162     EPbAccessoryWirelessCarKit     = 0x00000008,
       
   163     EPbAccessoryTextDevice         = 0x00000010,
       
   164     EPbAccessoryLoopset            = 0x00000020,
       
   165     EPbAccessoryMusicStand         = 0x00000040,
       
   166     EPbAccessoryTVOut              = 0x00000080,
       
   167     EPbAccessoryHeadphones         = 0x00000100
       
   168     };
       
   169 #else
       
   170 /**
       
   171 * accessory modes:
       
   172 * EPbAccessoryUnknown          Accessory mode is unknown
       
   173 * EPbAccessoryNone             No external accessories connected.
       
   174 * EPbAccessoryUnsupported      Unknown accessory connected.
       
   175 * EPbAccessoryDataCable        Connected with data cable.
       
   176 * EPbAccessoryHeadset          Headset connected.
       
   177 * EPbAccessoryLoopset          Loopset connected.
       
   178 * EPbAccessoryCarKit           CarKit connected.
       
   179 * EPbAccessoryMic              External mic connected.
       
   180 * EPbAccessoryTty              TTY connected.
       
   181 * EPbAccessoryBtHeadset        BT Headset connected.
       
   182 * EPbAccessoryBtCarKit         BT CarKit connected.
       
   183 */
       
   184 enum TMPXPlaybackAccessoryMode
       
   185     {
       
   186     EPbAccessoryModeUnknown  = -1,
       
   187     EPbAccessoryNone         = 0x00000000,
       
   188     EPbAccessoryUnsupported  = 0x00000001,
       
   189     EPbAccessoryDataCable    = 0x00000002,
       
   190     EPbAccessoryHeadset      = 0x00000004,
       
   191     EPbAccessoryLoopset      = 0x00000008,
       
   192     EPbAccessoryCarKit       = 0x00000010,
       
   193     EPbAccessoryMic          = 0x00000020,
       
   194     EPbAccessoryTty          = 0x00000040,
       
   195     EPbAccessoryBtHeadset    = 0x00000080,
       
   196     EPbAccessoryBtCarKit     = 0x00000100,
       
   197     };
       
   198 #endif
       
   199 
       
   200 // Server function codes
       
   201 enum TMPXPlaybackServerOp
       
   202     {
       
   203     EPbsGetNextMessage,           // 0 Must be 0
       
   204     EPbsCancelGetMessage,         // 1 Must be 1
       
   205     EPbsSetMode,                  // 2 Must be called before any other following op
       
   206     EPbsGetClients,               // 3
       
   207     EPbsInitFromCollection,       // 4
       
   208     EPbsInitFromUri,              // 5
       
   209     EPbsInitFromFile,             // 6
       
   210     EPbsCancelRequest,            // 7
       
   211     EPbsCommand,                  // 8
       
   212     EPbsCommandExt = EPbsCommand, // DEPRECATED to be removed
       
   213     EPbsGetState,                 // 9
       
   214     EPbsSetProperty,              // 10
       
   215     EPbsGetProperty,              // 11
       
   216     EPbsGetPlayerTypes,           // 12
       
   217     EPbsGetPlayerTypeDisplayName, // 13
       
   218     EPbsGetAllPlayersUids,        // 14
       
   219     EPbsGetPlayersUidsForType,    // 15
       
   220     EPbsGetSubPlayerNamesByUid,   // 16
       
   221     EPbsSelectPlayerByType,       // 17
       
   222     EPbsSelectPlayerByUid,        // 18
       
   223     EPbsSelectSubPlayer,          // 19
       
   224     EPbsClearPlayerSelection,     // 20
       
   225     EPbsGetSelection,             // 21
       
   226     EPbsPlayerFound,              // 22
       
   227     EPbsGetPlayerType,            // 23
       
   228     EPbsGetTypeName,              // 24
       
   229     EPbsGetSubPlayerIndex,        // 25
       
   230     EPbsGetPlayerUid,             // 26
       
   231     EPbsGetCollectionPlaylist,    // 27
       
   232     EPbsGetFile,                  // 28
       
   233     EPbsGetUri,                   // 29
       
   234     EPbsGetMedia,                 // 30
       
   235     EPbsGetSupportedMimeTypes,    // 31
       
   236     EPbsGetSupportedExtensions,   // 32
       
   237     EPbsGetSupportedSchemas,      // 33
       
   238     EPbsGetSyncBuffer, // 34 Gets server side buffer following client sync request
       
   239     EPbsGetAsyncBuffer, // 35 Gets server side buffer following client async request
       
   240     EPbsCustomCommandSyncReceive,   // 36
       
   241     EPbsCustomCommandSyncNoReceive, // 37
       
   242     EPbsCustomCommandAsyncReceive,  // 38
       
   243     EPbsCustomCommandAsyncNoReceive,// 39
       
   244     EPbsInitStreamingFromUri,       // 40
       
   245     EPbsInitStreamingFromFile,      // 41
       
   246     EPbsInitFromFile64,             // 42
       
   247     EPbsInitStreamingFromFile64,    // 43
       
   248     EPbsGetFile64,                  // 44
       
   249     EPbsServerOpEnd                 // End of operation     
       
   250     };
       
   251 
       
   252 #endif // MPXPLAYBACKFRAMEWORKDEFS_H
       
   253 
       
   254 // End of file