|
1 /* |
|
2 * Copyright (c) 2006-2008 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: pluginloader which loads home network ECom plugins |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_UPNPPLUGINLOADER_H |
|
20 #define C_UPNPPLUGINLOADER_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 // System |
|
24 #include <e32cmn.h> |
|
25 #include <e32base.h> |
|
26 #include <gulicon.h> |
|
27 |
|
28 // upnpframework / home media extension api |
|
29 #include <upnpplugininterface.h> |
|
30 |
|
31 class MUPnPPluginLoaderObserver; |
|
32 |
|
33 /** |
|
34 * Loads all the ECom plugins which implement the CUPnPPluginInterface |
|
35 * interface |
|
36 * |
|
37 * @since S60 3.2 |
|
38 */ |
|
39 NONSHARABLE_CLASS( CUPnPPluginLoader ) : public MUPnPPluginObserver, |
|
40 public CBase |
|
41 { |
|
42 |
|
43 public: // 1st phase constructor |
|
44 |
|
45 /** |
|
46 * Returns a pointer to an instance of the CUPnPPluginLoader class |
|
47 * |
|
48 * @since S60 3.2 |
|
49 * @param aLoaderObserver reference to the MUPnPPluginLoaderObserver |
|
50 * @return Pointer to an instance of the CUPnPPluginLoader class |
|
51 */ |
|
52 IMPORT_C static CUPnPPluginLoader* NewL( MUPnPPluginLoaderObserver& |
|
53 aLoaderObserver ); |
|
54 |
|
55 protected: // 2nd phase constructor |
|
56 |
|
57 /** |
|
58 * Default constructor |
|
59 * |
|
60 * @since S60 3.2 |
|
61 * @param aLoaderObserver reference to the MUPnPPluginLoaderObserver |
|
62 */ |
|
63 CUPnPPluginLoader( MUPnPPluginLoaderObserver& aLoaderObserver ); |
|
64 |
|
65 public: // Destructor |
|
66 |
|
67 /** |
|
68 * Destructor |
|
69 * |
|
70 * @since S60 3.2 |
|
71 */ |
|
72 IMPORT_C virtual ~CUPnPPluginLoader(); |
|
73 |
|
74 public: |
|
75 |
|
76 /** |
|
77 * This method creates all ECOM plugins which implement 0x200075DB |
|
78 * interface (CUPnPPluginInterface). |
|
79 * |
|
80 * @since S60 3.2 |
|
81 * @return Reference to the plugin array. CUPnPMainDialog uses this |
|
82 * reference to draw the UI. |
|
83 */ |
|
84 IMPORT_C const RPointerArray<CUPnPPluginInterface>& CreatePluginsL(); |
|
85 |
|
86 /** |
|
87 * Deletes plugin from iPluginArray which index corresponds the |
|
88 * parameter. |
|
89 * |
|
90 * @since S60 3.2 |
|
91 * @param aPluginIndex index of plugin to be deleted |
|
92 */ |
|
93 IMPORT_C void DeletePlugin( TInt aPluginIndex ); |
|
94 |
|
95 protected: // From MUPnPPluginObserver |
|
96 |
|
97 /** |
|
98 * Plugins call this method when they update. |
|
99 * |
|
100 * @since S60 3.2 |
|
101 * @param aEvent event from plugin |
|
102 */ |
|
103 void ExtensionEvent( const TExtensionEvent& aEvent ); |
|
104 |
|
105 private: |
|
106 |
|
107 /** |
|
108 * Pointer array which contains all the plugins |
|
109 */ |
|
110 RPointerArray<CUPnPPluginInterface> iPluginArray; |
|
111 |
|
112 /** |
|
113 * Pointer to CUPnPPluginLoaderObserver |
|
114 * Not own. |
|
115 */ |
|
116 MUPnPPluginLoaderObserver* iLoaderObserver; |
|
117 |
|
118 }; |
|
119 |
|
120 |
|
121 #endif // C_UPNPPLUGINLOADER_H |
|
122 |
|
123 // end of file |