1 /* |
|
2 * Copyright (c) 2002 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: Declaration of the CApProtHandler class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAPPROTHANDLER_H |
|
20 #define CAPPROTHANDLER_H |
|
21 |
|
22 // Deprecation warning |
|
23 #warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details. |
|
24 |
|
25 |
|
26 // INCLUDES |
|
27 #include <e32base.h> |
|
28 #include <ApEngineVer.h> |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 // FORWARD DECLARATION |
|
34 class CCommsDatabase; |
|
35 class CCommsDbTableView; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 /** |
|
39 * A collection of access point protection handling routines. |
|
40 */ |
|
41 NONSHARABLE_CLASS( CApProtHandler ) |
|
42 { |
|
43 public: // New functions |
|
44 |
|
45 /** |
|
46 * Returns whether the Access Point Table is protected or not. |
|
47 * If the table is protected, new access points can not be added, |
|
48 * existing ones can not be modified and can not be deleted. |
|
49 * @param aDb The database object |
|
50 * @return TBool indicating whether the table is protected or not. |
|
51 * |
|
52 * @deprecated |
|
53 */ |
|
54 IMPORT_C static TBool IsTableProtectedL( CCommsDatabase* aDb ); |
|
55 |
|
56 |
|
57 /** |
|
58 * Returns whether the given Access Point is protected or not. |
|
59 * If the access point is protected, it can not be modified and |
|
60 * can not be deleted. |
|
61 * @param aDb The database object |
|
62 * @param aUid The uid of the access point |
|
63 * @return TBool indicating whether the access point is protected or not |
|
64 * |
|
65 * @deprecated |
|
66 */ |
|
67 IMPORT_C static TBool IsApProtectedL( CCommsDatabase* aDb, |
|
68 TUint32 aUid ); |
|
69 |
|
70 |
|
71 /** |
|
72 * Sets a given Access Point to protected. |
|
73 * If the access point is protected, it can not be modified and |
|
74 * can not be deleted. |
|
75 * @param aDb The database object |
|
76 * @param aUid The uid of the access point |
|
77 * |
|
78 * @deprecated |
|
79 */ |
|
80 IMPORT_C static void ProtectItemL( CCommsDatabase* aDb, TUint32 aUid ); |
|
81 |
|
82 |
|
83 /** |
|
84 * Sets a given Access Point to not-protected. |
|
85 * If the access point is not protected, it can be modified and |
|
86 * can be deleted. |
|
87 * @param aDb The database object |
|
88 * @param aUid The uid of the access point |
|
89 * |
|
90 * @deprecated |
|
91 */ |
|
92 IMPORT_C static void UnprotectItemL( CCommsDatabase* aDb, |
|
93 TUint32 aUid ); |
|
94 |
|
95 /** |
|
96 * Sets the access point table to protected. |
|
97 * If the table is protected, new access points can not be added, |
|
98 * existing ones can not be modified and can not be deleted. |
|
99 * @param aDb The database object |
|
100 * |
|
101 * @deprecated |
|
102 */ |
|
103 IMPORT_C static void ProtectTableL( CCommsDatabase* aDb ); |
|
104 |
|
105 |
|
106 /** |
|
107 * Sets the access point table to not-protected. |
|
108 * If the table is not protected, new access points can be added, |
|
109 * existing ones can be modified and can be deleted. |
|
110 * @param aDb The database object |
|
111 * |
|
112 * @deprecated |
|
113 */ |
|
114 IMPORT_C static void UnprotectTableL( CCommsDatabase* aDb ); |
|
115 |
|
116 |
|
117 /** |
|
118 * Gets whether the preferences are protected or not |
|
119 * @param aDb The database object |
|
120 * @returns TBool indicating whether the preferences are protected |
|
121 * or not |
|
122 * |
|
123 * @deprecated |
|
124 */ |
|
125 IMPORT_C static TBool IsPreferencesProtectedL( CCommsDatabase* aDb ); |
|
126 |
|
127 |
|
128 /** |
|
129 * Sets the preferences to protected. |
|
130 * @param aDb The database object |
|
131 * |
|
132 * @deprecated |
|
133 */ |
|
134 IMPORT_C static void ProtectPreferencesL( CCommsDatabase* aDb ); |
|
135 |
|
136 |
|
137 /** |
|
138 * Sets the preferences to not-protected. |
|
139 * @param aDb The database object |
|
140 * |
|
141 * @deprecated |
|
142 */ |
|
143 IMPORT_C static void UnprotectPreferencesL( CCommsDatabase* aDb ); |
|
144 |
|
145 |
|
146 // The following are not exported, for internal use only! |
|
147 /** |
|
148 * Returns whether the given record in the given table |
|
149 * is protected or not. |
|
150 * If the record is protected, it can not be modified and |
|
151 * can not be deleted. |
|
152 * @param aDb The database object in use |
|
153 * @param the table to use |
|
154 * @param the uid of the record |
|
155 * @return whether the given record in the given table |
|
156 * is protected or not. |
|
157 */ |
|
158 static TBool IsRecordProtectedL( CCommsDatabase* aDb, |
|
159 const TDesC& aTable, TUint32 aUid ); |
|
160 |
|
161 /** |
|
162 * Protects a given record in a given table. |
|
163 * @param aDb The database object in use |
|
164 * @param the table to use |
|
165 * @param the uid of the record |
|
166 */ |
|
167 static void ProtectRecordL( CCommsDatabase* aDb, |
|
168 const TDesC& aTable, TUint32 aUid ); |
|
169 |
|
170 |
|
171 /** |
|
172 * Unprotects a given record in a given table. |
|
173 * @param aDb The database object in use |
|
174 * @param the table to use |
|
175 * @param the uid of the record |
|
176 */ |
|
177 static void UnprotectRecordL( CCommsDatabase* aDb, |
|
178 const TDesC& aTable, TUint32 aUid ); |
|
179 |
|
180 |
|
181 /** |
|
182 * Returns whether the given table in a given database is |
|
183 * protected or not. |
|
184 * @param aDb The database object in use |
|
185 * @param the table we need the info on |
|
186 * @returns TBool indicating whether the given table in a given |
|
187 * database is protected or not. |
|
188 */ |
|
189 static TBool IsTableProtectedL( CCommsDatabase* aDb, |
|
190 const TDesC& aTable ); |
|
191 |
|
192 |
|
193 /** |
|
194 * Protects a given table in a given database. |
|
195 * @param aDb The database object in use |
|
196 * @param aTable The table to protect |
|
197 */ |
|
198 static void ProtectTableL( CCommsDatabase* aDb, const TDesC& aTable ); |
|
199 |
|
200 /** |
|
201 * Unprotects a given table in a given database. |
|
202 * @param aDb The database object in use |
|
203 * @param aTable The table to unprotect |
|
204 */ |
|
205 static void UnprotectTableL( CCommsDatabase* aDb, |
|
206 const TDesC& aTable ); |
|
207 |
|
208 /** |
|
209 * Gets the current records' protection state |
|
210 * aTable MUST be open and record cursor set to desired record |
|
211 * @param aTable The table containign the record whose protection |
|
212 * sate we would like to get |
|
213 * @return The records' protection state |
|
214 */ |
|
215 static TBool GetProtectionStateL( CCommsDbTableView& aTable ); |
|
216 |
|
217 |
|
218 |
|
219 /** |
|
220 * Remove all protected AP-s and sets the table to be 'updatable'. |
|
221 * @param aDb The database object in use |
|
222 * |
|
223 * @deprecated |
|
224 */ |
|
225 IMPORT_C static void RemoveProtectedAccessPointsL(CCommsDatabase* aDb); |
|
226 |
|
227 |
|
228 /** |
|
229 * Remove all protected AP-s and sets the table to be 'updatable'. |
|
230 * @param aDb The database object in use |
|
231 */ |
|
232 static void DoRemoveProtectedAccessPointsL( CCommsDatabase& aDb ); |
|
233 |
|
234 |
|
235 }; |
|
236 |
|
237 #endif |
|
238 |
|
239 // End of File |
|