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 uses player factories to generate different players |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CMMAMANAGER_H |
|
20 #define CMMAMANAGER_H |
|
21 |
|
22 // EXTERNAL INCLUDES |
|
23 #include <badesca.h> |
|
24 |
|
25 // INTERNAL INCLUDES |
|
26 #include "MMAFunctionServer.h" |
|
27 #include "MMMAPlayerFactory.h" |
|
28 |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CMMAPlayer; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 /** |
|
35 * This class uses player factories to generate different types of players. |
|
36 */ |
|
37 |
|
38 NONSHARABLE_CLASS(CMMAManager): public CBase, public MMMAPlayerFactory |
|
39 { |
|
40 public: // Constructors and destructors |
|
41 /** |
|
42 * Deletes all owned members. |
|
43 */ |
|
44 virtual ~CMMAManager(); |
|
45 |
|
46 /** |
|
47 * Static constructor |
|
48 */ |
|
49 static void StaticCreateManagerL(CMMAManager** aManager, |
|
50 TInt aMIDletSuiteID); |
|
51 |
|
52 protected: |
|
53 /** |
|
54 * Initializes member variables to defaults. |
|
55 */ |
|
56 CMMAManager(); |
|
57 |
|
58 /** |
|
59 * Second phase construct. |
|
60 */ |
|
61 void ConstructL(TInt aMIDletSuiteID); |
|
62 |
|
63 public: // From MMMAPlayerFactory |
|
64 |
|
65 /** |
|
66 * @see MMAPlayerFactory |
|
67 */ |
|
68 |
|
69 CMMAPlayer* CreatePlayerL(const TDesC& aContentType); |
|
70 |
|
71 CMMAPlayer* CreatePlayerL(const TDesC& aProtocol, |
|
72 const TDesC& aMiddlePart, |
|
73 const TDesC& aParameters); |
|
74 |
|
75 CMMAPlayer* CreatePlayerL(const TDesC8& aHeaderData); |
|
76 |
|
77 void GetSupportedContentTypesL(const TDesC& aProtocol, |
|
78 CDesC16Array& aMimeTypeArray); |
|
79 |
|
80 void GetSupportedProtocolsL(const TDesC& aContentType, |
|
81 CDesC16Array& aProtocolArray); |
|
82 public: // new methods |
|
83 |
|
84 /** |
|
85 * Adds player factory to manager |
|
86 * |
|
87 * @param aPlayerFactory handle to player factory |
|
88 */ |
|
89 IMPORT_C void AddPlayerFactoryL(MMMAPlayerFactory* aPlayerFactory); |
|
90 |
|
91 private: |
|
92 /** |
|
93 * Array of player factories. Owned. |
|
94 */ |
|
95 RPointerArray< MMMAPlayerFactory > iPlayerFactories; |
|
96 }; |
|
97 |
|
98 #endif // CMMAMANAGER_H |
|