|
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 Srv plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PSMSRVPLUGIN_H |
|
20 #define PSMSRVPLUGIN_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <psmtypes.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CPsmPluginBase; |
|
27 class CPsmManager; |
|
28 class CPsmSettingsHandler; |
|
29 |
|
30 /** |
|
31 * PSM Srv Plugin |
|
32 * |
|
33 * Responsible for loading PSM ECom plug-in and maintaining it |
|
34 * |
|
35 * @since S60 5.0 |
|
36 */ |
|
37 class CPsmSrvPlugin : 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 CPsmSrvPlugin* NewL( CPsmManager& aManager, TUid aImplUid ); |
|
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 CPsmSrvPlugin* NewLC( CPsmManager& aManager, TUid aImplUid ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CPsmSrvPlugin(); |
|
59 |
|
60 public: // Functions |
|
61 |
|
62 /** |
|
63 * Notifies plugin about mode change |
|
64 */ |
|
65 void NotifyModeChange( const TPsmsrvMode aMode ); |
|
66 |
|
67 private: |
|
68 |
|
69 /** |
|
70 * C++ constructor. |
|
71 */ |
|
72 CPsmSrvPlugin( CPsmManager& aManager, TUid aImplUid ); |
|
73 |
|
74 /** |
|
75 * By default Symbian 2nd phase constructor is private. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 private: // Data |
|
80 |
|
81 /** |
|
82 * Reference to manager |
|
83 */ |
|
84 CPsmManager& iManager; |
|
85 |
|
86 /** |
|
87 * Plugins implementation UID |
|
88 */ |
|
89 TUid iImplUid; |
|
90 |
|
91 /** |
|
92 * Currently active plugin |
|
93 */ |
|
94 CPsmPluginBase* iActivePlugin; |
|
95 |
|
96 /** |
|
97 * Own settings handler for each plugin |
|
98 */ |
|
99 CPsmSettingsHandler* iSettingsHandler; |
|
100 |
|
101 }; |
|
102 |
|
103 #endif // PSMSRVPLUGIN_H |