|
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 SCPPLUGIN_H |
|
20 #define SCPPLUGIN_H |
|
21 |
|
22 #include "SCPDebug.h" |
|
23 /*#ifdef _DEBUG |
|
24 #define __SCP_DEBUG |
|
25 #endif // _DEBUG |
|
26 |
|
27 // Define this so the precompiler in CW 3.1 won't complain about token pasting, |
|
28 // the warnings are not valid |
|
29 #pragma warn_illtokenpasting off |
|
30 |
|
31 #ifdef __SCP_DEBUG |
|
32 #define Dprint(a) RDebug::Print ## a |
|
33 #else |
|
34 #define Dprint(a) |
|
35 #endif // _DEBUG*/ |
|
36 |
|
37 // INCLUDES |
|
38 #include <bldvariant.hrh> |
|
39 #include <e32base.h> |
|
40 #include <f32file.h> |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 class CSCPParamObject; |
|
44 |
|
45 |
|
46 /** |
|
47 * An interface class that specifies the services available to the plugins |
|
48 */ |
|
49 class MSCPPluginEventHandler |
|
50 { |
|
51 public: |
|
52 |
|
53 /** |
|
54 * Used by plugins to retrieve a reference to the configuration object. |
|
55 */ |
|
56 virtual CSCPParamObject& GetParameters() = 0; |
|
57 |
|
58 /** |
|
59 * Used by plugins to retrieve a reference to the configuration object. |
|
60 */ |
|
61 virtual TInt GetStoragePathL( TDes& aPath ) = 0; |
|
62 |
|
63 /** |
|
64 * Used to hash the given input buffer using MD5 to the output buffer. |
|
65 */ |
|
66 virtual TInt HashInput( TDes& aInput, TDes& aOutput ) = 0; |
|
67 |
|
68 /** |
|
69 * Retrieves a reference to a connected File Server session |
|
70 */ |
|
71 virtual RFs& GetFsSession() = 0; |
|
72 |
|
73 }; |
|
74 |
|
75 /** |
|
76 * The base class for SCP plugins |
|
77 */ |
|
78 class CSCPPlugin: public CBase |
|
79 { |
|
80 public: // Methods |
|
81 |
|
82 // Constructors and destructor |
|
83 |
|
84 /** |
|
85 * Static constructor. |
|
86 */ |
|
87 inline static CSCPPlugin* NewL( TDesC8& aResData ); |
|
88 |
|
89 /** |
|
90 * Destructor. |
|
91 */ |
|
92 inline virtual ~CSCPPlugin(); |
|
93 |
|
94 /** |
|
95 * Handles plugin events |
|
96 * @param aID The event ID |
|
97 * @param aParam The event parameters |
|
98 * @returns The parameter object identifying the actions taken. |
|
99 */ |
|
100 virtual CSCPParamObject* HandleEvent( TInt aID, CSCPParamObject& aParam ) = 0; |
|
101 |
|
102 virtual void SetEventHandler( MSCPPluginEventHandler* aHandler ) = 0; |
|
103 |
|
104 protected: // Methods |
|
105 |
|
106 // New Methods |
|
107 |
|
108 /** |
|
109 * C++ default constructor. |
|
110 */ |
|
111 inline CSCPPlugin(); |
|
112 |
|
113 // Methods from base classes |
|
114 |
|
115 |
|
116 private: //Methods |
|
117 |
|
118 private: // Data |
|
119 |
|
120 /** ECOM instance identifier key */ |
|
121 TUid iDtor_ID_Key; |
|
122 }; |
|
123 |
|
124 #include "SCPPlugin.inl" |
|
125 |
|
126 #endif // SCPPLUGIN_H |
|
127 |
|
128 // End of File |
|
129 |