|
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 policymanagement components |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CENTREPTOOLCLIENT_H__ |
|
20 #define __CENTREPTOOLCLIENT_H__ |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <e32std.h> |
|
25 #include "CentRepToolClientServer.h" |
|
26 |
|
27 // CONSTANTS |
|
28 // MACROS |
|
29 // DATA TYPES |
|
30 // FUNCTION PROTOTYPES |
|
31 // FORWARD DECLARATIONS |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * RPolicyEngine class to establish PolicyEngine server connection |
|
36 */ |
|
37 |
|
38 class RCentRepTool : public RSessionBase |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Connect Connects client side to policy engine server |
|
43 * @return KErrNone Symbian error code |
|
44 */ |
|
45 IMPORT_C TInt Connect(); |
|
46 |
|
47 /** |
|
48 * Close Close server connection |
|
49 */ |
|
50 IMPORT_C void Close(); |
|
51 |
|
52 IMPORT_C TInt PerformRFS(); |
|
53 IMPORT_C TInt CheckCommitState(); |
|
54 private: |
|
55 }; |
|
56 |
|
57 /** |
|
58 * RPolicyManagement class to handle policy management sessions |
|
59 */ |
|
60 |
|
61 class RSettingManagement : public RSubSessionBase |
|
62 { |
|
63 public: |
|
64 IMPORT_C RSettingManagement(); |
|
65 |
|
66 //Session management |
|
67 /** |
|
68 * Connect Open client side session |
|
69 * @param aServer Reference to connected RPolicyEngine |
|
70 * @return KErrNone Symbian error code |
|
71 */ |
|
72 IMPORT_C TInt Open( TUid aRepositoryId, RCentRepTool &aServer); |
|
73 |
|
74 /** |
|
75 * Close Close session |
|
76 */ |
|
77 IMPORT_C void Close(); |
|
78 |
|
79 IMPORT_C void InitSession( TRequestStatus& iRequestStatus); |
|
80 |
|
81 IMPORT_C TInt SetSIDWRForSetting( TUint32 aSettingId, TUid aSecurityId); |
|
82 IMPORT_C TInt RestoreSetting( TUint32 aSettingId); |
|
83 |
|
84 IMPORT_C TInt SetSIDWRForRange( TUint32 aRangeStart, TUint32 aRangeEnd, TUid aSecurityId); |
|
85 IMPORT_C TInt RestoreRange( TUint32 aRangeStart, TUint32 aRangeEnd); |
|
86 |
|
87 IMPORT_C TInt SetSIDWRForMask( TUint32 aCompareValue, TUint32 aMask, TUid aSecurityId); |
|
88 IMPORT_C TInt RestoreMask( TUint32 aCompareValue, TUint32 aMask); |
|
89 |
|
90 IMPORT_C TInt AddSIDWRForDefaults( TUid aSecurityId); |
|
91 IMPORT_C TInt RestoreDefaults(); |
|
92 |
|
93 IMPORT_C TInt RemoveBackupFlagForMask( TUint32 aCompareValue, TUint32 aMask); |
|
94 IMPORT_C TInt RestoreBackupFlagForMask( TUint32 aCompareValue, TUint32 aMask); |
|
95 |
|
96 IMPORT_C TInt RemoveBackupFlagForRange( TUint32 aRangeStart, TUint32 aRangeEnd); |
|
97 IMPORT_C TInt RestoreBackupFlagForRange( TUint32 aRangeStart, TUint32 aRangeEnd); |
|
98 |
|
99 IMPORT_C TInt RemoveBackupFlagForDefaults(); |
|
100 IMPORT_C TInt RestoreBackupFlagForDefaults(); |
|
101 |
|
102 IMPORT_C TBool CheckAccess( TUint32 aSettingId, TAccessType aAccessType); |
|
103 |
|
104 IMPORT_C TInt Flush(); |
|
105 private: |
|
106 TBool iConnected; |
|
107 }; |
|
108 |
|
109 class RAccessCheck : public RSubSessionBase |
|
110 { |
|
111 public: |
|
112 IMPORT_C TInt Open( TUid aRepositoryId, RCentRepTool &aServer); |
|
113 IMPORT_C void Close(); |
|
114 |
|
115 IMPORT_C TInt CheckAccess( TUint32 aSettingId, TAccessType aAccessType, TBool& aAccessValue); |
|
116 private: |
|
117 }; |
|
118 |
|
119 |
|
120 |
|
121 #endif //__POLICYENGINECLIENT_H__ |
|
122 |
|
123 |