|
1 /* |
|
2 * Copyright (c) 2000 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: Implementation of terminalsecurity components |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SCPPLUGINEVENTHANDLER_H |
|
20 #define SCPPLUGINEVENTHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <bldvariant.hrh> |
|
24 #include <e32base.h> |
|
25 #include <e32property.h> |
|
26 #include <f32file.h> |
|
27 |
|
28 #include "SCPPlugin.h" |
|
29 |
|
30 |
|
31 // LOCAL CONSTANTS |
|
32 |
|
33 const TInt KSCPNotifierTimeout( 45000000 ); // 45 seconds |
|
34 |
|
35 _LIT( KSCPPluginConfigFilename, "plugincfg.bin" ); |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 class CSCPParamObject; |
|
39 |
|
40 |
|
41 /** |
|
42 * A base class for the active objects responsible for the lock phone functionality |
|
43 */ |
|
44 class CSCPPluginEventHandler : public CBase, |
|
45 public MSCPPluginEventHandler |
|
46 |
|
47 { |
|
48 public: // Methods |
|
49 |
|
50 // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Static constructor. |
|
54 */ |
|
55 static CSCPPluginEventHandler* NewL( RFs* aRfs ); |
|
56 |
|
57 /** |
|
58 * Static constructor, that leaves the pointer to the cleanup stack. |
|
59 */ |
|
60 static CSCPPluginEventHandler* NewLC( RFs* aRfs ); |
|
61 |
|
62 /** |
|
63 * Destructor. |
|
64 */ |
|
65 virtual ~CSCPPluginEventHandler(); |
|
66 |
|
67 /** |
|
68 * Write the plugin configuration into persistent storage. |
|
69 * @return A system status code. |
|
70 */ |
|
71 TInt WritePluginConfigurationL(); |
|
72 |
|
73 /** |
|
74 * Reset the common storage for the plugins. |
|
75 */ |
|
76 void ResetConfigurationL(); |
|
77 |
|
78 // Methods from base classes |
|
79 |
|
80 // From MSCPPluginEventHandler |
|
81 |
|
82 /** |
|
83 * Retrieve the stored parameter object pointer, which can be used to |
|
84 * read/write the configuration for the plugin. |
|
85 */ |
|
86 CSCPParamObject& GetParameters(); |
|
87 |
|
88 /** |
|
89 * Fetch the storage path of the server to aPath |
|
90 */ |
|
91 TInt GetStoragePathL( TDes& aPath ); |
|
92 |
|
93 /** |
|
94 * Output the MD5 hash digest of the given buffer to aOutput |
|
95 */ |
|
96 TInt HashInput( TDes& aInput, TDes& aOutput ); |
|
97 |
|
98 /** |
|
99 * Return a reference to the Event handler's File Server session |
|
100 */ |
|
101 virtual RFs& GetFsSession(); |
|
102 |
|
103 protected: // Methods |
|
104 |
|
105 |
|
106 |
|
107 private: //Methods |
|
108 |
|
109 // New Methods |
|
110 |
|
111 /** |
|
112 * C++ default constructor. |
|
113 */ |
|
114 CSCPPluginEventHandler( RFs* aRfs ); |
|
115 |
|
116 /** |
|
117 * Symbian second-phase constructor |
|
118 */ |
|
119 void ConstructL(); |
|
120 |
|
121 private: // Data |
|
122 /** A pointer to the object, which contains the configuration for the plugins, owned */ |
|
123 CSCPParamObject* iPluginConfiguration; |
|
124 /** The configuration path */ |
|
125 TFileName iConfigurationPath; |
|
126 /** A pointer to a connected File Server session, not owned */ |
|
127 RFs* iRfs; |
|
128 }; |
|
129 |
|
130 #endif // SCPPLUGINEVENTHANDLER_H |
|
131 |
|
132 // End of File |
|
133 |