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: Interface for all player factories. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MMMAPLAYERFACTORY_H |
|
20 #define MMMAPLAYERFACTORY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <badesca.h> // CDesC16Array |
|
24 |
|
25 // CONSTANTS |
|
26 _LIT(KMMAHttpProtocol, "http"); |
|
27 _LIT(KMMAHttpsProtocol, "https"); |
|
28 _LIT(KMMAFileProtocol, "file"); |
|
29 _LIT(KMMACaptureProtocol, "capture"); |
|
30 _LIT(KMMADeviceProtocol, "device"); |
|
31 |
|
32 // CLASS DEFINITION |
|
33 class CMMAPlayer; |
|
34 |
|
35 /* |
|
36 ----------------------------------------------------------------------------- |
|
37 |
|
38 DESCRIPTION |
|
39 Interface for all player factories. |
|
40 |
|
41 ----------------------------------------------------------------------------- |
|
42 */ |
|
43 NONSHARABLE_CLASS(MMMAPlayerFactory) |
|
44 { |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Allow delete through this interface. |
|
49 */ |
|
50 virtual ~MMMAPlayerFactory() {}; |
|
51 |
|
52 /** |
|
53 * Creates new player according to a content type. |
|
54 * |
|
55 * @param aContentType Player's content type. |
|
56 * @return New instance of CMMAPlayer or null if factory cannot |
|
57 * create it |
|
58 */ |
|
59 virtual CMMAPlayer* CreatePlayerL(const TDesC& aContentType) = 0; |
|
60 |
|
61 /** |
|
62 * Creates new player according to a locator |
|
63 * |
|
64 * @param aProtocol protocol part from the locator. |
|
65 * @param aMiddlePart middle part from the locator. |
|
66 * @param aParameters parameters part from the locator. |
|
67 * @return New instance of CMMAPlayer or null if factory cannot |
|
68 * create it |
|
69 */ |
|
70 virtual CMMAPlayer* CreatePlayerL(const TDesC& aProtocol, |
|
71 const TDesC& aMiddlePart, |
|
72 const TDesC& aParameters) = 0; |
|
73 |
|
74 /** |
|
75 * Creates new player according to a header data |
|
76 * |
|
77 * @param aHeaderData Header data from the content |
|
78 * @return New instance of CMMAPlayer or null if factory cannot |
|
79 * create it |
|
80 */ |
|
81 virtual CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData) = 0; |
|
82 |
|
83 /** |
|
84 * Gets player's supported content types. |
|
85 * |
|
86 * @param aProtocol The input protocol for the supported content types. |
|
87 * @param aMimeTypeArray Will contain supported mime types for protocol. |
|
88 */ |
|
89 virtual void GetSupportedContentTypesL(const TDesC& aProtocol, |
|
90 CDesC16Array& aMimeTypeArray) = 0; |
|
91 |
|
92 /** |
|
93 * Gets player's supported protocols for the content type. |
|
94 * |
|
95 * @param aContentType The content type for the supported protocols. |
|
96 * @param aProtocolArray Will contain supported protocols for content type. |
|
97 */ |
|
98 virtual void GetSupportedProtocolsL(const TDesC& aContentType, |
|
99 CDesC16Array& aProtocolArray) = 0; |
|
100 }; |
|
101 |
|
102 #endif // MMMAPLAYERFACTORY_H |
|