38
|
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: Implementation of interface for playbackutility
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// Version : %version: 3 %
|
|
19 |
|
|
20 |
#ifndef CMPXPLAYBACKUTILITY_H
|
|
21 |
#define CMPXPLAYBACKUTILITY_H
|
|
22 |
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <f32file.h>
|
|
25 |
#include <mpxplaybackobserver.h>
|
|
26 |
#include <mpxplaybackmessage.h>
|
|
27 |
#include <mpxsession.h>
|
|
28 |
#include <mpxmessageobserver.h>
|
|
29 |
#include "mpxplaybackutility.h"
|
|
30 |
|
|
31 |
class CMPXMessageMonitor;
|
|
32 |
class CMPXTaskQueue;
|
|
33 |
|
|
34 |
NONSHARABLE_STRUCT( TMPXPlaybackUtilityStruct )
|
|
35 |
{
|
|
36 |
// Default mode playback utility
|
|
37 |
MMPXPlaybackUtility* iDefaultPlaybackUtility;
|
|
38 |
};
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Implementation of playback utility interface
|
|
42 |
* this interface:
|
|
43 |
*/
|
|
44 |
NONSHARABLE_CLASS(CMPXPlaybackUtility) : public MMPXPlaybackUtility,
|
|
45 |
public MMPXSource,
|
|
46 |
public MMPXPlayerManager
|
|
47 |
{
|
|
48 |
public:
|
|
49 |
/**
|
|
50 |
* Two-phased constructor
|
|
51 |
*
|
|
52 |
* @param aModeId playback mode id
|
|
53 |
* @param aObs observer
|
|
54 |
* @param aCategory category of client / engine
|
|
55 |
* @return object of constructed
|
|
56 |
*/
|
|
57 |
static CMPXPlaybackUtility* NewL(const TUid& aModeId,
|
|
58 |
MMPXPlaybackObserver* aObs,
|
|
59 |
const TMPXCategory aCategory);
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Gets the interface for the client, or creates a new one.
|
|
63 |
* This interface could be a singleton
|
|
64 |
*/
|
|
65 |
static MMPXPlaybackUtility* UtilityL( const TUid& aModeId,
|
|
66 |
const TMPXCategory aCategory);
|
|
67 |
|
|
68 |
private:
|
|
69 |
/**
|
|
70 |
* Destructor
|
|
71 |
*/
|
|
72 |
~CMPXPlaybackUtility();
|
|
73 |
|
|
74 |
/**
|
|
75 |
* C++ constructor
|
|
76 |
*/
|
|
77 |
CMPXPlaybackUtility();
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Second phase constructor
|
|
81 |
*
|
|
82 |
* @param aModeId playback mode id
|
|
83 |
* @param aObs observer
|
|
84 |
* @param aCategory category of client / engine
|
|
85 |
*/
|
|
86 |
void ConstructL(const TUid& aModeId, MMPXPlaybackObserver* aObs, const TMPXCategory aCategory);
|
|
87 |
/**
|
|
88 |
* Second phase constructor
|
|
89 |
*
|
|
90 |
* @param aObs observer
|
|
91 |
*/
|
|
92 |
void ConstructL(MMPXPlaybackObserver* aObs);
|
|
93 |
|
|
94 |
/**
|
|
95 |
* From MMPXPlaybackUtility
|
|
96 |
* Add a Observer. Clients only receive events from the engine corresponding
|
|
97 |
* to the specific mode the interface was created in
|
|
98 |
*
|
|
99 |
* @param aObs, observer to be added
|
|
100 |
*/
|
|
101 |
void AddObserverL(MMPXPlaybackObserver& aObs);
|
|
102 |
|
|
103 |
/**
|
|
104 |
* From MMPXPlaybackUtility
|
|
105 |
* Remove a observer.
|
|
106 |
*
|
|
107 |
* @param aObs, observer to be removed
|
|
108 |
*/
|
|
109 |
void RemoveObserverL(MMPXPlaybackObserver& aObs);
|
|
110 |
|
|
111 |
/**
|
|
112 |
* From MMPXPlaybackUtility
|
|
113 |
* Returns PIds of clients that are using the engine in the mode this
|
|
114 |
* interface was created in. For example, if a client was interested in all
|
|
115 |
* the clients' pids with an active engine, they would:
|
|
116 |
*
|
|
117 |
* MMPXPlaybackUtility* m=MMPXPlaybackUtility::NewL(EActivePlayer);
|
|
118 |
* RArray<TProcessId> pids;
|
|
119 |
* m->GetClients(pids);
|
|
120 |
* .........
|
|
121 |
* pids->Close();
|
|
122 |
* m->Close();
|
|
123 |
*
|
|
124 |
* @param aClients Array of Pids returned.
|
|
125 |
*/
|
|
126 |
void GetClientsL(RArray<TProcessId>& aClients);
|
|
127 |
|
|
128 |
/**
|
|
129 |
* From MMPXPlaybackUtility
|
|
130 |
* Initializes a track given by aCollectionPath
|
|
131 |
*
|
|
132 |
* @param aCollectionPath collection path
|
|
133 |
* @param aPlay Whether to initialize for playback, or
|
|
134 |
* else just to setup the engine first
|
|
135 |
*/
|
|
136 |
virtual void InitL(const CMPXCollectionPlaylist& aPlaylist,
|
|
137 |
TBool aPlay=ETrue);
|
|
138 |
|
|
139 |
/**
|
|
140 |
* From MMPXPlaybackUtility
|
|
141 |
* Inititialises with a single item, may not be part of any collection
|
|
142 |
*
|
|
143 |
* @param aUri URI of the item
|
|
144 |
* @param aType the mime type of the item
|
|
145 |
*/
|
|
146 |
void InitL(const TDesC& aUri,const TDesC8* aType=NULL);
|
|
147 |
|
|
148 |
/**
|
|
149 |
* From MMPXPlaybackUtility
|
|
150 |
* Inititialises with a single item, may not be part of any collection
|
|
151 |
* Before this function can be called, the file server session which owns
|
|
152 |
* this file handle must first be marked as shareable by calling
|
|
153 |
* RFs::ShareProtected().
|
|
154 |
*
|
|
155 |
* @param aFile file handle
|
|
156 |
*/
|
|
157 |
void InitL(RFile& aShareableFile);
|
|
158 |
|
|
159 |
/**
|
|
160 |
* From MMPXPlaybackUtility
|
|
161 |
* Frees up client side resources only; a player is freed when there are no
|
|
162 |
* clients using it, and all resources are freed when the last client closed
|
|
163 |
*/
|
|
164 |
void Close();
|
|
165 |
|
|
166 |
/**
|
|
167 |
* From MMPXPlaybackUtility
|
|
168 |
* Stops any async operations that are currently under way
|
|
169 |
*/
|
|
170 |
void CancelRequest();
|
|
171 |
|
|
172 |
/**
|
|
173 |
* From MMPXPlaybackUtility
|
|
174 |
* Issue player commands, with optional data. ECommandReceived and
|
|
175 |
* ECommandComplete events should follow
|
|
176 |
*
|
|
177 |
* @param aCmd the command
|
|
178 |
* @param aData optional data
|
|
179 |
*/
|
|
180 |
void CommandL(TMPXPlaybackCommand aCmd,TInt aData=0);
|
|
181 |
|
|
182 |
/**
|
|
183 |
* From MMPXPlaybackUtility
|
|
184 |
* Send a command to the playback server
|
|
185 |
*
|
|
186 |
* @param aCmd, reference to command object
|
|
187 |
* @param aCallback, call back when command exection completed.
|
|
188 |
* Asynchronously command only
|
|
189 |
*/
|
|
190 |
void CommandL(CMPXCommand& aCmd, MMPXPlaybackCallback* aCallback=NULL);
|
|
191 |
|
|
192 |
/**
|
|
193 |
* From MMPXPlaybackUtility
|
|
194 |
* Current state of player
|
|
195 |
* @return current state
|
|
196 |
*/
|
|
197 |
TMPXPlaybackState StateL() const;
|
|
198 |
|
|
199 |
/**
|
|
200 |
* From MMPXPlaybackUtility
|
|
201 |
* Current source being played, NULL if none was supplied
|
|
202 |
*
|
|
203 |
* @return source object
|
|
204 |
*/
|
|
205 |
MMPXSource* Source();
|
|
206 |
|
|
207 |
/**
|
|
208 |
* From MMPXPlaybackUtility
|
|
209 |
* Player manager
|
|
210 |
*
|
|
211 |
* @return reference to player manager
|
|
212 |
*/
|
|
213 |
MMPXPlayerManager& PlayerManager();
|
|
214 |
|
|
215 |
/**
|
|
216 |
* From MMPXPlaybackUtility
|
|
217 |
* Set playback property, EPropertyChanged event when complete
|
|
218 |
*
|
|
219 |
* @param aProperty the property to be set
|
|
220 |
* @param aValue the the value of the property
|
|
221 |
*/
|
|
222 |
void SetL(TMPXPlaybackProperty aProperty,TInt aValue);
|
|
223 |
|
|
224 |
/**
|
|
225 |
* From MMPXPlaybackUtility
|
|
226 |
* Get value of a playback property, Asyc
|
|
227 |
*
|
|
228 |
* @param aCallback playback callback
|
|
229 |
* @param aProperty the property
|
|
230 |
*/
|
|
231 |
void ValueL(MMPXPlaybackCallback& aCallback,TMPXPlaybackProperty aProperty);
|
|
232 |
|
|
233 |
/**
|
|
234 |
* Get value of a playback property, Asyc
|
|
235 |
* Result will be called back in HandleProperty
|
|
236 |
*
|
|
237 |
* @param aCallback playback callback
|
|
238 |
* @param aProperty the property
|
|
239 |
*/
|
|
240 |
void PropertyL(MMPXPlaybackCallback& aCallback,
|
|
241 |
TMPXPlaybackProperty aProperty);
|
|
242 |
|
|
243 |
/**
|
|
244 |
* From MMPXPlaybackUtility
|
|
245 |
* Return a list of mime types supported by playback framework
|
|
246 |
*
|
|
247 |
* @return an array of mime types
|
|
248 |
*/
|
|
249 |
virtual CDesCArray* SupportedMimeTypes();
|
|
250 |
|
|
251 |
/**
|
|
252 |
* From MMPXPlaybackUtility
|
|
253 |
* Return a list of file extensions supported by playback framework
|
|
254 |
*
|
|
255 |
* @return an array of extensions
|
|
256 |
*/
|
|
257 |
virtual CDesCArray* SupportedExtensions();
|
|
258 |
|
|
259 |
/**
|
|
260 |
* From MMPXPlaybackUtility
|
|
261 |
* Return a list of schemas supported by playback framework
|
|
262 |
*
|
|
263 |
* @return an array of schemas
|
|
264 |
*/
|
|
265 |
virtual CDesCArray* SupportedSchemas();
|
|
266 |
|
|
267 |
/**
|
|
268 |
* Sets the priority of the playback utility
|
|
269 |
*
|
|
270 |
* @param aPriority Priority to set
|
|
271 |
*/
|
|
272 |
virtual void SetPriority( TInt aPriority );
|
|
273 |
|
|
274 |
/**
|
|
275 |
* Adds a message subscription for this client.
|
|
276 |
* @param aSubscription subscription to be added
|
|
277 |
*/
|
|
278 |
void AddSubscriptionL(const CMPXSubscription& aSubscription);
|
|
279 |
|
|
280 |
/**
|
|
281 |
* Removes a message subscription for this client.
|
|
282 |
* @param aSubscription subscription to be removed.
|
|
283 |
*/
|
|
284 |
void RemoveSubscriptionL(const CMPXSubscription& aSubscription);
|
|
285 |
|
|
286 |
/**
|
|
287 |
* Removes all message subscriptions for this client.
|
|
288 |
*/
|
|
289 |
void ClearSubscriptionsL();
|
|
290 |
|
|
291 |
/**
|
|
292 |
* From MMPXPlayerManager
|
|
293 |
* Typically, a client will obtain the list of all the (non-duplicated)
|
|
294 |
* player 'types' in the system from GetPlayerTypesL and present localized
|
|
295 |
* type names (e.g. "Local","Home network", if possible, else if
|
|
296 |
* non-standard type,should use PlayerTypeDisplayNameL to get text from
|
|
297 |
* player).
|
|
298 |
*
|
|
299 |
* User should be given opportunity to choose IF there is more than one
|
|
300 |
* type available, or if there is one type but more than one sub players,
|
|
301 |
* the user could be presented with the sub player list.
|
|
302 |
*
|
|
303 |
* @param aTypes the list of player types
|
|
304 |
*/
|
|
305 |
void GetPlayerTypesL(RArray<TMPXPlaybackPlayerType>& aTypes);
|
|
306 |
|
|
307 |
/**
|
|
308 |
* From MMPXPlayerManager
|
|
309 |
* Returns display name for custom types; standard types should be
|
|
310 |
* recognized by client and localized - calling this method would then not
|
|
311 |
* be required
|
|
312 |
*
|
|
313 |
* @param aType playback type
|
|
314 |
*/
|
|
315 |
HBufC* PlayerTypeDisplayNameL(TMPXPlaybackPlayerType aType);
|
|
316 |
|
|
317 |
/**
|
|
318 |
* From MMPXPlayerManager
|
|
319 |
* Get the list of UIDs of all players
|
|
320 |
*
|
|
321 |
* @param aPlayers All the players' uids in the system
|
|
322 |
*/
|
|
323 |
void GetPlayerListL(RArray<TUid>& aPlayers);
|
|
324 |
|
|
325 |
/**
|
|
326 |
* From MMPXPlayerManager
|
|
327 |
* Get the list of UIDs of players with the specific type
|
|
328 |
*
|
|
329 |
* @param aPlayers All the players' uids with the same type
|
|
330 |
* @param aType the type of players
|
|
331 |
*/
|
|
332 |
void GetPlayerListL(RArray<TUid>& aPlayers,TMPXPlaybackPlayerType aType);
|
|
333 |
|
|
334 |
/**
|
|
335 |
* From MMPXPlayerManager
|
|
336 |
* Get the list of sub player names, Async
|
|
337 |
*
|
|
338 |
* @param aCallback sub players returned in call back interface
|
|
339 |
* @param aPlayer UID of the player
|
|
340 |
*/
|
|
341 |
void SubPlayerNamesL(MMPXPlaybackCallback& aCallback,TUid aPlayer);
|
|
342 |
|
|
343 |
/**
|
|
344 |
* From MMPXPlayerManager
|
|
345 |
* Client selects all players with the type aType, the specific player used
|
|
346 |
* then being resolved on the basis of the content.
|
|
347 |
*
|
|
348 |
* @param aType the type of player
|
|
349 |
*/
|
|
350 |
void SelectPlayersL(TMPXPlaybackPlayerType aType);
|
|
351 |
|
|
352 |
/**
|
|
353 |
* From MMPXPlayerManager
|
|
354 |
* Client selects specific player aPlayer and sub player aSubPlayerIndex
|
|
355 |
* from array returned by SubPlayerNamesL
|
|
356 |
*
|
|
357 |
* @param aPlayer the UID of player
|
|
358 |
* @param aSubPlayerIndex the index of the sub player
|
|
359 |
*/
|
|
360 |
void SelectSubPlayerL(TUid aPlayer,TInt aSubPlayerIndex);
|
|
361 |
|
|
362 |
/**
|
|
363 |
* From MMPXPlayerManager
|
|
364 |
* Client selects a specific player
|
|
365 |
*
|
|
366 |
* @param aPlayer the UID of the player
|
|
367 |
*/
|
|
368 |
void SelectPlayerL(TUid aPlayer);
|
|
369 |
|
|
370 |
/**
|
|
371 |
* From MMPXPlayerManager
|
|
372 |
* Clears all selection criteria. Essentially the same as
|
|
373 |
* SelectPlayersL(EPbLocal).
|
|
374 |
*/
|
|
375 |
void ClearSelectPlayersL();
|
|
376 |
|
|
377 |
/**
|
|
378 |
* From MMPXPlayerManager
|
|
379 |
* Retreives the current selection: KNullUid and KErrNotFound are possible
|
|
380 |
* return values for aPlayer and aSubPlayerIndex respectively if none are
|
|
381 |
* explicitly selected
|
|
382 |
*
|
|
383 |
* @param aType player type
|
|
384 |
* @param aPlayer the UID of player
|
|
385 |
* @param aSubPlayerIndex index of the subplayer
|
|
386 |
* @param aSubPlayerName friendly name of the subplayer
|
|
387 |
* Notes: Client owns the returned aSubPlayerName object.
|
|
388 |
*/
|
|
389 |
void GetSelectionL(TMPXPlaybackPlayerType& aType,
|
|
390 |
TUid& aPlayer,
|
|
391 |
TInt& aSubPlayerIndex,
|
|
392 |
HBufC*& aSubPlayerName);
|
|
393 |
|
|
394 |
/**
|
|
395 |
* From MMPXPlayerManager
|
|
396 |
* The current player, may change with each item, NULL if none found
|
|
397 |
*
|
|
398 |
* @return object of current player
|
|
399 |
*/
|
|
400 |
MMPXPlayer* CurrentPlayer();
|
|
401 |
|
|
402 |
/**
|
|
403 |
* From MMPXPlayer
|
|
404 |
* The 'type' of the player. Built-in types are EPbLocal and EPbRemote, but
|
|
405 |
* the plug-ins could extend this if they desire to be a different type
|
|
406 |
* which can be selected by the user
|
|
407 |
*
|
|
408 |
* @return player type
|
|
409 |
*/
|
|
410 |
TMPXPlaybackPlayerType TypeL();
|
|
411 |
|
|
412 |
/**
|
|
413 |
* From MMPXPlayer
|
|
414 |
* If TypeL returns a value that is not known to the UI (and therefore
|
|
415 |
* can't localize it),then TypeNameL can be used for unlocalized display
|
|
416 |
* purposes.
|
|
417 |
*
|
|
418 |
* @return player name.
|
|
419 |
*/
|
|
420 |
HBufC* TypeNameL();
|
|
421 |
|
|
422 |
/**
|
|
423 |
* From MMPXPlayer
|
|
424 |
* If the player supports other 'players', else array count == 0.
|
|
425 |
*
|
|
426 |
* @param aCallback sub players returned in the callback
|
|
427 |
*/
|
|
428 |
void SubPlayerNamesL(MMPXPlaybackCallback& aCallback);
|
|
429 |
|
|
430 |
/**
|
|
431 |
* From MMPXPlayer
|
|
432 |
* Selected sub player index, corresponding to sub player names array.
|
|
433 |
*
|
|
434 |
* @return sub player index. KErrNotFound if none
|
|
435 |
*/
|
|
436 |
TInt SubPlayerL() const;
|
|
437 |
|
|
438 |
/**
|
|
439 |
* From MMPXPlayer
|
|
440 |
* The UID identifying this player
|
|
441 |
*
|
|
442 |
* @return UID of the player
|
|
443 |
*/
|
|
444 |
TUid UidL() const;
|
|
445 |
|
|
446 |
/**
|
|
447 |
* From MMPXSource
|
|
448 |
* Path to the collection, or NULL if not in any collection
|
|
449 |
* Ownership transferred
|
|
450 |
*
|
|
451 |
* @return collection path
|
|
452 |
*/
|
|
453 |
CMPXCollectionPlaylist* PlaylistL();
|
|
454 |
|
|
455 |
/**
|
|
456 |
* From MMPXSource
|
|
457 |
* File passed in, or NULL if none passed in
|
|
458 |
*
|
|
459 |
* @return pointer to file handle
|
|
460 |
*/
|
|
461 |
RFile* FileL();
|
|
462 |
|
|
463 |
/**
|
|
464 |
* From MMPXSource
|
|
465 |
* URI of current item
|
|
466 |
*
|
|
467 |
* @return URI of the item
|
|
468 |
*/
|
|
469 |
HBufC* UriL();
|
|
470 |
|
|
471 |
/**
|
|
472 |
* From MMPXSource
|
|
473 |
*
|
|
474 |
* DEPRECATED
|
|
475 |
*
|
|
476 |
* Media request
|
|
477 |
* HandleMediaL of the callback
|
|
478 |
*
|
|
479 |
* @param aAttrs attributes requested
|
|
480 |
* @param aCallback playback callback
|
|
481 |
*/
|
|
482 |
void MediaL(const TArray<TMPXAttribute>& aAttrs,
|
|
483 |
MMPXPlaybackCallback& aCallback);
|
|
484 |
|
|
485 |
/**
|
|
486 |
* From MMPXSource
|
|
487 |
* Media request
|
|
488 |
* HandleMediaL of the callback
|
|
489 |
*
|
|
490 |
* @param aAttrs attributes requested
|
|
491 |
* @param aCallback playback callback
|
|
492 |
* @param aSpecs, specifications for attributes
|
|
493 |
*/
|
|
494 |
void MediaL(const TArray<TMPXAttribute>& aAttrs,
|
|
495 |
MMPXPlaybackCallback& aCallback,
|
|
496 |
CMPXAttributeSpecs* aSpecs);
|
|
497 |
|
|
498 |
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
|
499 |
/**
|
|
500 |
* From MMPXSource
|
|
501 |
* File passed in, or NULL if none passed in
|
|
502 |
*
|
|
503 |
* @return pointer to file handle
|
|
504 |
*/
|
|
505 |
RFile64* File64L();
|
|
506 |
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
|
507 |
|
|
508 |
/**
|
|
509 |
* From CActive
|
|
510 |
* Handles an active object's request completion event
|
|
511 |
*/
|
|
512 |
void RunL();
|
|
513 |
|
|
514 |
/**
|
|
515 |
* From CActive
|
|
516 |
* Implements cancellation of an outstanding request.
|
|
517 |
*/
|
|
518 |
void DoCancel();
|
|
519 |
|
|
520 |
/**
|
|
521 |
* From CActive
|
|
522 |
* Handles a leave occurring in the request completion event handler RunL()
|
|
523 |
*
|
|
524 |
* @param aError error code
|
|
525 |
*/
|
|
526 |
TInt RunError(TInt aError);
|
|
527 |
|
|
528 |
/**
|
|
529 |
* From MMPXMessageObserver
|
|
530 |
* Message received
|
|
531 |
* @param aMsgData message data
|
|
532 |
* @param aError error code
|
|
533 |
*/
|
|
534 |
void MessageReceived(TInt aMsgData, TInt aError);
|
|
535 |
|
|
536 |
/**
|
|
537 |
* Inititialises for streaming with URI and Access Point
|
|
538 |
*
|
|
539 |
* @since S60 9.2
|
|
540 |
* @param aUri URI of the item
|
|
541 |
* @param aType the mime type of the item
|
|
542 |
* @param aAccessPoint the access point of the item
|
|
543 |
*/
|
|
544 |
virtual void InitStreamingL(const TDesC& aUri, const TDesC8* aType, const TInt aAccessPoint);
|
|
545 |
|
|
546 |
/**
|
|
547 |
* Inititialises for streaming with URI and Access Point, the file may not be part of any collection
|
|
548 |
* Before this function can be called, the file server session which owns
|
|
549 |
* this file handle must first be marked as shareable by calling
|
|
550 |
* RFs::ShareProtected().
|
|
551 |
*
|
|
552 |
* @since S60 9.2
|
|
553 |
* @param aShareableFile shareable file handle
|
|
554 |
* @param aAccessPoint the access point of the item
|
|
555 |
*/
|
|
556 |
virtual void InitStreamingL(RFile& aShareableFile, const TInt aAccessPoint);
|
|
557 |
|
|
558 |
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
|
559 |
/**
|
|
560 |
* Inititialises with a single item, may not be part of any collection
|
|
561 |
* Before this function can be called, the file server session which owns
|
|
562 |
* this file handle must first be marked as shareable by calling
|
|
563 |
* RFs::ShareProtected().
|
|
564 |
*
|
|
565 |
* @since S60 9.2
|
|
566 |
* @param aShareableFile shareable RFile64 file handle
|
|
567 |
*/
|
|
568 |
virtual void Init64L(RFile64& aShareableFile);
|
|
569 |
|
|
570 |
/**
|
|
571 |
* Inititialises for streaming with URI and Access Point, the file may not be part of any collection
|
|
572 |
* Before this function can be called, the file server session which owns
|
|
573 |
* this file handle must first be marked as shareable by calling
|
|
574 |
* RFs::ShareProtected().
|
|
575 |
*
|
|
576 |
* @since S60 9.2
|
|
577 |
* @param aShareableFile shareable RFile64 file handle
|
|
578 |
* @param aAccessPoint the access point of the item
|
|
579 |
*/
|
|
580 |
virtual void InitStreaming64L(RFile64& aShareableFile, const TInt aAccessPoint);
|
|
581 |
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
|
582 |
|
|
583 |
private:
|
|
584 |
|
|
585 |
|
|
586 |
/**
|
|
587 |
* Helper to return a descriptor buffer
|
|
588 |
*
|
|
589 |
* @param aSize size of the buffer
|
|
590 |
*/
|
|
591 |
HBufC* DesL(TInt aSize);
|
|
592 |
|
|
593 |
/**
|
|
594 |
* Add a request
|
|
595 |
*
|
|
596 |
* @param aFunction function code
|
|
597 |
* @param aCallback callback
|
|
598 |
* @param aParamData data
|
|
599 |
* @param aBuf buffer data, ownership transferred
|
|
600 |
* @param aPtr, pointer to a object
|
|
601 |
* @param aAlivePtr1, object to keep alive for a task
|
|
602 |
* ownership transferred
|
|
603 |
* @leave leave with system error code when failed
|
|
604 |
*/
|
|
605 |
void AddRequestL(TMPXPlaybackServerOp aFunction,
|
|
606 |
MMPXPlaybackCallback* aCallback=NULL,
|
|
607 |
TInt aParamData=0,
|
|
608 |
CBufBase* aBuf=NULL,
|
|
609 |
TAny* aPtr=NULL,
|
|
610 |
CBase* aAlivePtr=NULL);
|
|
611 |
|
|
612 |
/**
|
|
613 |
* Send next request to server
|
|
614 |
*/
|
|
615 |
void ExecuteNextRequest();
|
|
616 |
|
|
617 |
/**
|
|
618 |
* Handle message from message queue
|
|
619 |
* @param aMsgData message data
|
|
620 |
* @param aError error code
|
|
621 |
*/
|
|
622 |
void HandleMessageL(TInt aMsgData, TInt aError);
|
|
623 |
|
|
624 |
/**
|
|
625 |
* Handles error in RunL
|
|
626 |
*
|
|
627 |
* @param aError error code
|
|
628 |
*/
|
|
629 |
void HandleRunErrorL(TInt aError);
|
|
630 |
|
|
631 |
|
|
632 |
public:
|
|
633 |
|
|
634 |
TMPXPlaybackState iState;
|
|
635 |
|
|
636 |
RArray<MMPXPlaybackObserver*> iObservers;
|
|
637 |
CMPXMessageMonitor* iMsgMonitor;
|
|
638 |
CMPXTaskQueue* iTaskQueue;
|
|
639 |
RMPXSession iPbs;
|
|
640 |
CBufBase* iBuffer;
|
|
641 |
TPckgBuf<TInt> iPropertyValuePckg;
|
|
642 |
TPckgBuf<TBool> iCompletePckg;
|
|
643 |
TPckgBuf<TInt> iResultSizePckg;
|
|
644 |
RFile iFile;
|
|
645 |
TBool iCallbackOngoing; // whether client is processing callback or not
|
|
646 |
#ifdef _ENABLE_GUARD_TIMER
|
|
647 |
CPeriodic* iGuardTimer; // guard timer for async request
|
|
648 |
#endif
|
|
649 |
CMPXMedia* iMediaOnError; // media object while handling error
|
|
650 |
TInt iRefCount;
|
|
651 |
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
|
652 |
RFile64 iFile64;
|
|
653 |
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
|
654 |
};
|
|
655 |
|
|
656 |
#endif // CMPXPLAYBACKUTILITY_H
|