|
1 /* |
|
2 * Copyright (c) 2007 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: PSM plugin loader. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PSMPLUGINLOADER_H |
|
20 #define PSMPLUGINLOADER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <psmtypes.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CPsmPluginBase; |
|
27 class CPsmManager; |
|
28 class CPsmSrvPlugin; |
|
29 |
|
30 /** |
|
31 * PSM Plugin loader |
|
32 * |
|
33 * Responsible for loading PSM ECom plug-ins |
|
34 * |
|
35 * @since S60 5.0 |
|
36 */ |
|
37 class CPsmPluginLoader : public CBase |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Creates a new PSM plug-in loader. |
|
43 * |
|
44 * @return A pointer to the created object. |
|
45 */ |
|
46 static CPsmPluginLoader* NewL( CPsmManager& aManager ); |
|
47 |
|
48 /** |
|
49 * Creates a new PSM plug-in loader. Newly created instance is left in the cleanup stack. |
|
50 * |
|
51 * @return A pointer to the created object. |
|
52 */ |
|
53 static CPsmPluginLoader* NewLC( CPsmManager& aManager ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CPsmPluginLoader(); |
|
59 |
|
60 /** |
|
61 * Initializes plugins |
|
62 */ |
|
63 void InitializePluginsL(); |
|
64 |
|
65 /** |
|
66 * Notifies plugins |
|
67 */ |
|
68 void NotifyPlugins(); |
|
69 |
|
70 /** |
|
71 * Rerturns plugin count |
|
72 */ |
|
73 TInt PluginCount() const { return iPluginArray.Count(); }; |
|
74 |
|
75 private: |
|
76 |
|
77 /** |
|
78 * C++ constructor. |
|
79 */ |
|
80 CPsmPluginLoader( CPsmManager& aManager ); |
|
81 |
|
82 /** |
|
83 * By default Symbian 2nd phase constructor is private. |
|
84 */ |
|
85 void ConstructL(); |
|
86 |
|
87 private: // Data |
|
88 |
|
89 /** |
|
90 * Plugin array |
|
91 */ |
|
92 RPointerArray<CPsmSrvPlugin> iPluginArray; |
|
93 |
|
94 /** |
|
95 * Reference to manager |
|
96 */ |
|
97 CPsmManager& iManager; |
|
98 |
|
99 }; |
|
100 |
|
101 #endif // PSMPLUGINLOADER_H |