1 /* |
|
2 * Copyright (c) 2002 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: This class is used for creating EMC-based players. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMMAEMCPLAYERFACTORY_H |
|
20 #define CMMAEMCPLAYERFACTORY_H |
|
21 |
|
22 // INCLUDES |
|
23 // #include <mmf/common/mmfcontrollerpluginresolver.h> Remove and replace with proper header file |
|
24 #include "mmmaplayerfactory.h" |
|
25 |
|
26 class CMMAEMCResolver; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * This class is used for creating EMC-based players. |
|
31 * |
|
32 * |
|
33 */ |
|
34 NONSHARABLE_CLASS(CMMAEMCPlayerFactory): public CBase, public MMMAPlayerFactory |
|
35 { |
|
36 public: // Constructor and destructor |
|
37 CMMAEMCPlayerFactory(); |
|
38 ~CMMAEMCPlayerFactory(); |
|
39 |
|
40 public: // From MMMAPlayerFactory |
|
41 CMMAPlayer* CreatePlayerL(const TDesC& aContentType); |
|
42 |
|
43 CMMAPlayer* CreatePlayerL(const TDesC& aProtocol, |
|
44 const TDesC& aMiddlePart, |
|
45 const TDesC& aParameters); |
|
46 |
|
47 CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData); |
|
48 |
|
49 void GetSupportedContentTypesL(const TDesC& aProtocol, |
|
50 CDesC16Array& aMimeTypeArray); |
|
51 |
|
52 void GetSupportedProtocolsL(const TDesC& aContentType, |
|
53 CDesC16Array& aProtocolArray); |
|
54 |
|
55 protected: |
|
56 /** |
|
57 * Creates new CMMAPlayer instance with given resolver. |
|
58 * @param aResolver Resolver that contains needed infos |
|
59 * for creating player. |
|
60 */ |
|
61 virtual CMMAPlayer* CreatePlayerL(CMMAEMCResolver* aResolver) = 0; |
|
62 |
|
63 /** |
|
64 * Returns list of allowed media IDs |
|
65 */ |
|
66 virtual void MediaIdsL(RArray<TUid>& aMediaIds) = 0; |
|
67 |
|
68 /** |
|
69 * Checks that is this protocol supported by this factory |
|
70 */ |
|
71 TBool IsSupportedProtocolL(const TDesC& aProtocol); |
|
72 |
|
73 /** |
|
74 * Checks that is this content-type supported by this factory |
|
75 */ |
|
76 TBool IsSupportedContentTypeL(const TDesC& aContentType); |
|
77 private: |
|
78 /** |
|
79 * File version of creating player from content type |
|
80 */ |
|
81 |
|
82 CMMAPlayer* CreatePlayerL(const TDesC& aContentType, |
|
83 const TDesC* aFileName); |
|
84 #ifndef RD_JAVA_OMA_DRM_V2 |
|
85 /** |
|
86 * Tries to open DRM file |
|
87 */ |
|
88 CMMAPlayer* TryOpenDRMFileL(const TDesC& aFileName); |
|
89 #endif // RD_JAVA_OMA_DRM_V2 |
|
90 |
|
91 }; |
|
92 |
|
93 #endif // CMMAEMCPLAYERFACTORY_H |
|