|
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 command type for playback framework |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MPXPLAYBACKCOMMANDDEFS_H |
|
21 #define MPXPLAYBACKCOMMANDDEFS_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <mpxattribute.h> |
|
25 |
|
26 /****************************************************** |
|
27 * Commands supported for KMPXCommandIdPlaybackGeneral |
|
28 ******************************************************/ |
|
29 /** |
|
30 * General Commands for playback framework |
|
31 */ |
|
32 const TInt KMPXCommandIdPlaybackGeneral = 0x10282971; |
|
33 |
|
34 /////////////////////////////////////////////////////////////////////////////// |
|
35 // Attributes supported by KMPXCommandIdPlaybackGeneral |
|
36 // Attributes besides KMPXCommandContentIdGeneral |
|
37 // The value of attribute KMPXCommandGeneralId is KMPXCommandIdPlaybackGeneral |
|
38 /////////////////////////////////////////////////////////////////////////////// |
|
39 |
|
40 /** |
|
41 * General command type |
|
42 * TInt value. value of TMPXPlaybackCommand |
|
43 */ |
|
44 const TMPXAttributeData KMPXCommandPlaybackGeneralType = |
|
45 {KMPXCommandIdPlaybackGeneral, 0x01}; |
|
46 |
|
47 /** Optional |
|
48 * Parameter data for the general command |
|
49 * TInt value |
|
50 */ |
|
51 const TMPXAttributeData KMPXCommandPlaybackGeneralData = |
|
52 {KMPXCommandIdPlaybackGeneral, 0x02}; |
|
53 |
|
54 /** Optional |
|
55 * Tells whether or not to use command buffering for this command |
|
56 * TBool value |
|
57 */ |
|
58 const TMPXAttributeData KMPXCommandPlaybackGeneralNoBuffer = |
|
59 {KMPXCommandIdPlaybackGeneral, 0x04}; |
|
60 |
|
61 /** Optional |
|
62 * The process id of the client which sends the command |
|
63 * TProcessId value |
|
64 */ |
|
65 const TMPXAttributeData KMPXCommandPlaybackGeneralClientPid = |
|
66 {KMPXCommandIdPlaybackGeneral, 0x08}; |
|
67 |
|
68 /** |
|
69 * Playback general command |
|
70 */ |
|
71 enum TMPXPlaybackCommand |
|
72 { |
|
73 EPbCmdPlay, // 0 Play which ever track is currently stopped, paused etc. |
|
74 EPbCmdPlayWithFadeIn, // 1 uses KPbFadeInDuration |
|
75 EPbCmdPause, // 2 |
|
76 EPbCmdStop, // 3 |
|
77 EPbCmdNext, // 4 No effect if no next track |
|
78 EPbCmdPrevious, // 5 No effect if no previous track; |
|
79 // if pos>KPbReplayThreshold, replays current track |
|
80 EPbCmdReplay, // 6 Restart current track at beginning |
|
81 EPbCmdStartSeekForward, // 7 |
|
82 EPbCmdStartSeekBackward, // 8 |
|
83 EPbCmdStopSeeking, // 9 |
|
84 EPbCmdIncreaseVolume, // 10 |
|
85 EPbCmdDecreaseVolume, // 11 |
|
86 EPbCmdMuteVolume, // 12 |
|
87 EPbCmdUnMuteVolume, // 13 |
|
88 EPbCmdClose, // 14 |
|
89 EPbApplyEffect, // 15 Apply an effect to the current playback, |
|
90 // aData used to identify effect |
|
91 EPbCmdPreservePosition, // 16 Preserve playback position |
|
92 EPbCmdPreserveState, // 17 Preserve playback state |
|
93 EPbCmdCloseItem, // 18 Request to close the file handle |
|
94 EPbCmdPlayPause, // 19 Play/Pause toggle command |
|
95 EPbCmdCancelInit, // 20 |
|
96 EPbCmdResetPreserveState, // 21 |
|
97 EPbCmdUnloadNonActivePlugin, // 22 KMPXCommandPlaybackGeneralData is TUid.iUid |
|
98 EPbCmdClearKeyBuffer, // 23 Clear all media key commands |
|
99 EPbCmdDisableEffect, |
|
100 EPbCmdSetVolume, // 25 Set volume to the value specified by aData |
|
101 EPbCmdSetAutoResume, // 26 Set autoresume value (true/false) |
|
102 EPbCmdEnd // Mark for the end of command |
|
103 }; |
|
104 |
|
105 /****************************************************** |
|
106 * Commands supported for KMPXCommandIdPlaybackPD |
|
107 ******************************************************/ |
|
108 /** |
|
109 * Progressive Download Commands for playback framework |
|
110 */ |
|
111 const TInt KMPXCommandIdPlaybackPD = 0x10282972; |
|
112 |
|
113 //////////////////////////////////////////////////////////////////////////// |
|
114 // Attributes supported by KMPXCommandIdPlaybackPD |
|
115 // Attributes besides KMPXCommandContentIdGeneral and |
|
116 // KMPXCommandIdPlaybackGeneral |
|
117 // The value of attribute KMPXCommandGeneralId is KMPXCommandIdPlaybackPD |
|
118 // The value of attribute KMPXCommandPlaybackGeneralType is the value of |
|
119 // TMPXPlaybackPdCommand |
|
120 //////////////////////////////////////////////////////////////////////////// |
|
121 |
|
122 /** Optional |
|
123 * Parameter for PD transaction ID |
|
124 * TUInt value |
|
125 */ |
|
126 const TMPXAttributeData KMPXCommandPlaybackPDTransactionID = { |
|
127 KMPXCommandIdPlaybackPD, 0x01}; |
|
128 |
|
129 /** Optional, TInt |
|
130 * Parameter for PD Event ID |
|
131 * TInt value |
|
132 */ |
|
133 const TMPXAttributeData KMPXCommandPlaybackPDEvent = { |
|
134 KMPXCommandIdPlaybackPD, 0x02}; |
|
135 |
|
136 /** Optional, TInt |
|
137 * Parameter for PD State |
|
138 * TInt value, value of TMPXPlaybackPdDownloadState |
|
139 */ |
|
140 const TMPXAttributeData KMPXCommandPlaybackPDState = { |
|
141 KMPXCommandIdPlaybackPD, 0x04}; |
|
142 |
|
143 /** Optional, TInt |
|
144 * Parameter for PD Downloaded Bytes |
|
145 * TInt value |
|
146 */ |
|
147 const TMPXAttributeData KMPXCommandPlaybackPDDownloadedBytes = { |
|
148 KMPXCommandIdPlaybackPD, 0x08}; |
|
149 |
|
150 /** Optional, TInt |
|
151 * Parameter for PD Total Bytes |
|
152 * TInt value |
|
153 */ |
|
154 const TMPXAttributeData KMPXCommandPlaybackPDTotalBytes = { |
|
155 KMPXCommandIdPlaybackPD, 0x10}; |
|
156 |
|
157 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
158 /** Optional, TInt64 |
|
159 * Parameter for PD Downloaded Bytes |
|
160 * TInt64 value |
|
161 */ |
|
162 const TMPXAttributeData KMPXCommandPlaybackPDDownloadedBytes64 = { |
|
163 KMPXCommandIdPlaybackPD, 0x20}; |
|
164 |
|
165 /** Optional, TInt64 |
|
166 * Parameter for PD Total Bytes |
|
167 * TInt64 value |
|
168 */ |
|
169 const TMPXAttributeData KMPXCommandPlaybackPDTotalBytes64 = { |
|
170 KMPXCommandIdPlaybackPD, 0x40}; |
|
171 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
172 |
|
173 /** |
|
174 * Progress download command |
|
175 */ |
|
176 enum TMPXPlaybackPdCommand |
|
177 { |
|
178 EPbCmdStartPd, |
|
179 EPbCmdFinishPd, |
|
180 EPbCmdHandlePdEvent, |
|
181 EPbCmdGetPdStatus, |
|
182 EPbCmdPausePd, |
|
183 EPbCmdResumePd, |
|
184 EPbCmdCancelPd |
|
185 }; |
|
186 |
|
187 enum TMPXPlaybackPdDownloadState // Progressive download state |
|
188 { |
|
189 EPbDlStateNotDownloading, // PD not in progress |
|
190 EPbDlStateBuffering, // Download in progress, not downloaded enough to start playback |
|
191 EPbDlStateDownloading, // Download in progress, playback can start/has started |
|
192 EPbDlStateDownloadPaused, // Download paused |
|
193 EPbDlStateDownloadCompleted, // Download completed |
|
194 EPbDlStateDownloadError, // Download error |
|
195 EPbDlStateDownloadCanceled // Download canceled |
|
196 }; |
|
197 |
|
198 #endif // MPXPLAYBACKCOMMANDDEFS_H |
|
199 |
|
200 // End of file |