59
|
1 |
/*
|
|
2 |
* Copyright ( c ) 2009 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: embedded playback helper.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CMPMPXEMBEDDEDPLAYBACKHELPER_H
|
|
19 |
#define CMPMPXEMBEDDEDPLAYBACKHELPER_H
|
|
20 |
|
|
21 |
#include <e32base.h>
|
|
22 |
#include <mpxcollectionobserver.h>
|
|
23 |
#include <mpxcollectionuihelperobserver.h>
|
|
24 |
|
|
25 |
// FOWARD DECLARATION
|
|
26 |
class MMPXPlaybackUtility;
|
|
27 |
class MMPXCollectionUtility;
|
|
28 |
class MMPXCollectionUiHelper;
|
|
29 |
|
|
30 |
class MMpMpxEmbeddedPlaybackHelperObserver
|
|
31 |
{
|
|
32 |
public:
|
|
33 |
|
|
34 |
virtual void HandleEmbeddedPlaybackError( TInt aError ) = 0;
|
|
35 |
|
|
36 |
};
|
|
37 |
|
|
38 |
class CMpMpxEmbeddedPlaybackHelper : public CBase,
|
|
39 |
public MMPXCollectionObserver,
|
|
40 |
public MMPXCHelperEmbeddedOpenObserver
|
|
41 |
{
|
|
42 |
|
|
43 |
public:
|
|
44 |
|
|
45 |
static CMpMpxEmbeddedPlaybackHelper* NewL( TUid aHostUid,
|
|
46 |
MMPXPlaybackUtility* aPlaybackUtility,
|
|
47 |
MMpMpxEmbeddedPlaybackHelperObserver* aObserver );
|
|
48 |
virtual ~CMpMpxEmbeddedPlaybackHelper();
|
|
49 |
|
|
50 |
void playL( const TDesC& aFilename );
|
|
51 |
|
|
52 |
private: // from base class
|
|
53 |
|
|
54 |
// From MMPXCollectionObserver
|
|
55 |
void HandleOpenL( const CMPXMedia& aEntries,
|
|
56 |
TInt aIndex,TBool aComplete,TInt aError );
|
|
57 |
void HandleOpenL( const CMPXCollectionPlaylist& aPlaylist,TInt aError );
|
|
58 |
void HandleCollectionMessage( CMPXMessage* aMsg, TInt aErr );
|
|
59 |
void HandleCollectionMediaL( const CMPXMedia& aMedia, TInt aError );
|
|
60 |
|
|
61 |
// From MMPXCHelperEmbeddedOpenObserver
|
|
62 |
void HandleEmbeddedOpenL( TInt aErr, TMPXGeneralCategory aCategory );
|
|
63 |
|
|
64 |
private:
|
|
65 |
|
|
66 |
CMpMpxEmbeddedPlaybackHelper( TUid aHostUid,
|
|
67 |
MMPXPlaybackUtility* aPlaybackUtility,
|
|
68 |
MMpMpxEmbeddedPlaybackHelperObserver* aObserver );
|
|
69 |
void ConstructL();
|
|
70 |
|
|
71 |
void DoHandleCollectionMessageL( const CMPXMessage& aMsg );
|
|
72 |
|
|
73 |
private:
|
|
74 |
MMPXPlaybackUtility *iPlaybackUtility;
|
|
75 |
MMPXCollectionUtility *iCollectionUtility; //Owned
|
|
76 |
MMPXCollectionUiHelper *iCollectionUiHelper; //Owned
|
|
77 |
MMpMpxEmbeddedPlaybackHelperObserver *iObserver;
|
|
78 |
TUid iHostUid;
|
|
79 |
};
|
|
80 |
|
|
81 |
#endif // CMPMPXEMBEDDEDPLAYBACKHELPER_H
|
|
82 |
|