sl@0
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#include "hashing.h"
|
sl@0
|
17 |
#include "sqlfn.h"
|
sl@0
|
18 |
#include "cdtest.h"
|
sl@0
|
19 |
#include <sqldb.h>
|
sl@0
|
20 |
|
sl@0
|
21 |
//
|
sl@0
|
22 |
// This code is for setting up and accessing hashes. These are used within
|
sl@0
|
23 |
// the test harness to associate a word (for example "KErrNone") with an
|
sl@0
|
24 |
// integer value (0 in this case). The base class CSQLHashUtil contains the
|
sl@0
|
25 |
// accessor and destructor methods which do 99% of the work. All of the
|
sl@0
|
26 |
// other classes merely contain constructors to set up their hashes.
|
sl@0
|
27 |
//
|
sl@0
|
28 |
|
sl@0
|
29 |
// Basic functionality first...
|
sl@0
|
30 |
TPtrC* CSQLHashUtil::GetStringFromNum(TInt aErrNum)
|
sl@0
|
31 |
{
|
sl@0
|
32 |
return ihash.Find(aErrNum);
|
sl@0
|
33 |
}
|
sl@0
|
34 |
|
sl@0
|
35 |
TInt CSQLHashUtil::GetNumFromString(TPtrC aErrMsg)
|
sl@0
|
36 |
{
|
sl@0
|
37 |
THashMapIter<TInt, TPtrC> it(ihash);
|
sl@0
|
38 |
it.NextValue();
|
sl@0
|
39 |
while (it.CurrentValue())
|
sl@0
|
40 |
{
|
sl@0
|
41 |
if (*it.CurrentValue() == aErrMsg)
|
sl@0
|
42 |
return *it.CurrentKey();
|
sl@0
|
43 |
it.NextValue();
|
sl@0
|
44 |
}
|
sl@0
|
45 |
return (KErrNotFound);
|
sl@0
|
46 |
}
|
sl@0
|
47 |
|
sl@0
|
48 |
CSQLHashUtil::~CSQLHashUtil()
|
sl@0
|
49 |
{
|
sl@0
|
50 |
while(ihash.Count())
|
sl@0
|
51 |
{
|
sl@0
|
52 |
THashMapIter<TInt, TPtrC> it(ihash);
|
sl@0
|
53 |
const TInt *curkey = it.NextKey();
|
sl@0
|
54 |
ihash.Remove(*curkey);
|
sl@0
|
55 |
}
|
sl@0
|
56 |
}
|
sl@0
|
57 |
|
sl@0
|
58 |
// Now setup OS errors..
|
sl@0
|
59 |
CSQLOsErrHash::CSQLOsErrHash()
|
sl@0
|
60 |
{
|
sl@0
|
61 |
// error codes from e32err.h
|
sl@0
|
62 |
ihash.Insert(KErrNone, _L("KErrNone"));
|
sl@0
|
63 |
ihash.Insert(KErrNotFound, _L("KErrNotFound"));
|
sl@0
|
64 |
ihash.Insert(KErrGeneral, _L("KErrGeneral"));
|
sl@0
|
65 |
ihash.Insert(KErrCancel, _L("KErrCancel"));
|
sl@0
|
66 |
ihash.Insert(KErrNoMemory, _L("KErrNoMemory"));
|
sl@0
|
67 |
ihash.Insert(KErrNotSupported, _L("KErrNotSupported"));
|
sl@0
|
68 |
ihash.Insert(KErrArgument, _L("KErrArgument"));
|
sl@0
|
69 |
ihash.Insert(KErrTotalLossOfPrecision, _L("KErrTotalLossOfPrecision"));
|
sl@0
|
70 |
ihash.Insert(KErrBadHandle, _L("KErrBadHandle"));
|
sl@0
|
71 |
ihash.Insert(KErrOverflow, _L("KErrOverflow"));
|
sl@0
|
72 |
ihash.Insert(KErrUnderflow, _L("KErrUnderflow"));
|
sl@0
|
73 |
ihash.Insert(KErrAlreadyExists, _L("KErrAlreadyExists"));
|
sl@0
|
74 |
ihash.Insert(KErrPathNotFound, _L("KErrPathNotFound"));
|
sl@0
|
75 |
ihash.Insert(KErrDied, _L("KErrDied"));
|
sl@0
|
76 |
ihash.Insert(KErrInUse, _L("KErrInUse"));
|
sl@0
|
77 |
ihash.Insert(KErrServerTerminated, _L("KErrServerTerminated"));
|
sl@0
|
78 |
ihash.Insert(KErrServerBusy, _L("KErrServerBusy"));
|
sl@0
|
79 |
ihash.Insert(KErrCompletion, _L("KErrCompletion"));
|
sl@0
|
80 |
ihash.Insert(KErrNotReady, _L("KErrNotReady"));
|
sl@0
|
81 |
ihash.Insert(KErrUnknown, _L("KErrUnknown"));
|
sl@0
|
82 |
ihash.Insert(KErrCorrupt, _L("KErrCorrupt"));
|
sl@0
|
83 |
ihash.Insert(KErrAccessDenied, _L("KErrAccessDenied"));
|
sl@0
|
84 |
ihash.Insert(KErrLocked, _L("KErrLocked"));
|
sl@0
|
85 |
ihash.Insert(KErrWrite, _L("KErrWrite"));
|
sl@0
|
86 |
ihash.Insert(KErrDisMounted, _L("KErrDisMounted"));
|
sl@0
|
87 |
ihash.Insert(KErrEof, _L("KErrEof"));
|
sl@0
|
88 |
ihash.Insert(KErrDiskFull, _L("KErrDiskFull"));
|
sl@0
|
89 |
ihash.Insert(KErrBadDriver, _L("KErrBadDriver"));
|
sl@0
|
90 |
ihash.Insert(KErrBadName, _L("KErrBadName"));
|
sl@0
|
91 |
ihash.Insert(KErrCommsLineFail, _L("KErrCommsLineFail"));
|
sl@0
|
92 |
ihash.Insert(KErrCommsFrame, _L("KErrCommsFrame"));
|
sl@0
|
93 |
ihash.Insert(KErrCommsOverrun, _L("KErrCommsOverrun"));
|
sl@0
|
94 |
ihash.Insert(KErrCommsParity, _L("KErrCommsParity"));
|
sl@0
|
95 |
ihash.Insert(KErrTimedOut, _L("KErrTimedOut"));
|
sl@0
|
96 |
ihash.Insert(KErrCouldNotConnect, _L("KErrCouldNotConnect"));
|
sl@0
|
97 |
ihash.Insert(KErrCouldNotDisconnect, _L("KErrCouldNotDisconnect"));
|
sl@0
|
98 |
ihash.Insert(KErrDisconnected, _L("KErrDisconnected"));
|
sl@0
|
99 |
ihash.Insert(KErrBadLibraryEntryPoint, _L("KErrBadLibraryEntryPoint"));
|
sl@0
|
100 |
ihash.Insert(KErrBadDescriptor, _L("KErrBadDescriptor"));
|
sl@0
|
101 |
ihash.Insert(KErrAbort, _L("KErrAbort"));
|
sl@0
|
102 |
ihash.Insert(KErrTooBig, _L("KErrTooBig"));
|
sl@0
|
103 |
ihash.Insert(KErrDivideByZero, _L("KErrDivideByZero"));
|
sl@0
|
104 |
ihash.Insert(KErrBadPower, _L("KErrBadPower"));
|
sl@0
|
105 |
ihash.Insert(KErrDirFull, _L("KErrDirFull"));
|
sl@0
|
106 |
ihash.Insert(KErrHardwareNotAvailable, _L("KErrHardwareNotAvailable"));
|
sl@0
|
107 |
ihash.Insert(KErrSessionClosed, _L("KErrSessionClosed"));
|
sl@0
|
108 |
ihash.Insert(KErrPermissionDenied, _L("KErrPermissionDenied"));
|
sl@0
|
109 |
ihash.Insert(KErrExtensionNotSupported, _L("KErrExtensionNotSupported"));
|
sl@0
|
110 |
TInt err = ihash.Insert(KErrCommsBreak, _L("KErrCommsBreak"));
|
sl@0
|
111 |
if( err == KErrNone )
|
sl@0
|
112 |
return;
|
sl@0
|
113 |
User::Panic(_L("Unable to create OS error hash"), 1411);
|
sl@0
|
114 |
}
|
sl@0
|
115 |
|
sl@0
|
116 |
// Now setup SQL errors..
|
sl@0
|
117 |
CSQLErrHash::CSQLErrHash()
|
sl@0
|
118 |
{
|
sl@0
|
119 |
// error codes from sqldb.h
|
sl@0
|
120 |
ihash.Insert(KSqlErrGeneral, _L("KSqlErrGeneral"));
|
sl@0
|
121 |
ihash.Insert(KSqlErrInternal, _L("KSqlErrInternal"));
|
sl@0
|
122 |
ihash.Insert(KSqlErrPermission, _L("KSqlErrPermission"));
|
sl@0
|
123 |
ihash.Insert(KSqlErrAbort, _L("KSqlErrAbort"));
|
sl@0
|
124 |
ihash.Insert(KSqlErrBusy, _L("KSqlErrBusy"));
|
sl@0
|
125 |
ihash.Insert(KSqlErrLocked, _L("KSqlErrLocked"));
|
sl@0
|
126 |
ihash.Insert(KSqlErrReadOnly, _L("KSqlErrReadOnly"));
|
sl@0
|
127 |
ihash.Insert(KSqlErrInterrupt, _L("KSqlErrInterrupt"));
|
sl@0
|
128 |
ihash.Insert(KSqlErrIO, _L("KSqlErrIO"));
|
sl@0
|
129 |
ihash.Insert(KSqlErrCorrupt, _L("KSqlErrCorrupt"));
|
sl@0
|
130 |
ihash.Insert(KSqlErrNotFound, _L("KSqlErrNotFound"));
|
sl@0
|
131 |
ihash.Insert(KSqlErrFull, _L("KSqlErrFull"));
|
sl@0
|
132 |
ihash.Insert(KSqlErrCantOpen, _L("KSqlErrCantOpen"));
|
sl@0
|
133 |
ihash.Insert(KSqlErrProtocol, _L("KSqlErrProtocol"));
|
sl@0
|
134 |
ihash.Insert(KSqlErrEmpty, _L("KSqlErrEmpty"));
|
sl@0
|
135 |
ihash.Insert(KSqlErrSchema, _L("KSqlErrSchema"));
|
sl@0
|
136 |
ihash.Insert(KSqlErrTooBig, _L("KSqlErrTooBig"));
|
sl@0
|
137 |
ihash.Insert(KSqlErrConstraint, _L("KSqlErrConstraint"));
|
sl@0
|
138 |
ihash.Insert(KSqlErrMismatch, _L("KSqlErrMismatch"));
|
sl@0
|
139 |
ihash.Insert(KSqlErrMisuse, _L("KSqlErrMisuse"));
|
sl@0
|
140 |
ihash.Insert(KSqlErrRange, _L("KSqlErrRange"));
|
sl@0
|
141 |
ihash.Insert(KSqlErrNotDb, _L("KSqlErrNotDb"));
|
sl@0
|
142 |
ihash.Insert(KSqlErrStmtExpired, _L("KSqlErrStmtExpired"));
|
sl@0
|
143 |
// The last two aren't strictly errors, but it is convenient to treat
|
sl@0
|
144 |
// them as such to process the output from RSqlStatement::Next().
|
sl@0
|
145 |
ihash.Insert(KSqlAtRow, _L("KSqlAtRow"));
|
sl@0
|
146 |
TInt err = ihash.Insert(KSqlAtEnd, _L("KSqlAtEnd"));
|
sl@0
|
147 |
if( err == KErrNone )
|
sl@0
|
148 |
return;
|
sl@0
|
149 |
User::Panic(_L("Unable to create SQL error hash"), 1412);
|
sl@0
|
150 |
}
|
sl@0
|
151 |
|
sl@0
|
152 |
// Now do the SQL enumerations..
|
sl@0
|
153 |
CSQLColTypeHash::CSQLColTypeHash()
|
sl@0
|
154 |
{
|
sl@0
|
155 |
// Enumerations for sqldb.h
|
sl@0
|
156 |
ihash.Insert(ESqlNull, _L("ESqlNull"));
|
sl@0
|
157 |
ihash.Insert(ESqlInt, _L("ESqlInt"));
|
sl@0
|
158 |
ihash.Insert(ESqlInt64, _L("ESqlInt64"));
|
sl@0
|
159 |
ihash.Insert(ESqlReal, _L("ESqlReal"));
|
sl@0
|
160 |
ihash.Insert(ESqlText, _L("ESqlText"));
|
sl@0
|
161 |
ihash.Insert(ESqlBinary, _L("ESqlBinary"));
|
sl@0
|
162 |
TInt err = ihash.Insert(ESqlNull, _L("ESqlNull"));
|
sl@0
|
163 |
if( err == KErrNone )
|
sl@0
|
164 |
return;
|
sl@0
|
165 |
|
sl@0
|
166 |
User::Panic(_L("Unable to create column type hash"), 1413);
|
sl@0
|
167 |
}
|
sl@0
|
168 |
|
sl@0
|
169 |
// Now do the enumerations for all of the functions in sqlfn..
|
sl@0
|
170 |
CSQLTEFAction::CSQLTEFAction()
|
sl@0
|
171 |
{
|
sl@0
|
172 |
// Enumerations from sqlfn.h
|
sl@0
|
173 |
ihash.Insert(CSQLFnStep::Efn_undefined, _L("fn_undefined"));
|
sl@0
|
174 |
ihash.Insert(CSQLFnStep::Efn_nop, _L("NoOperation"));
|
sl@0
|
175 |
ihash.Insert(CSQLFnStep::Efn_create, _L("Create"));
|
sl@0
|
176 |
ihash.Insert(CSQLFnStep::Efn_createl, _L("CreateL"));
|
sl@0
|
177 |
ihash.Insert(CSQLFnStep::Efn_createsp, _L("CreateSP"));
|
sl@0
|
178 |
ihash.Insert(CSQLFnStep::Efn_open, _L("Open"));
|
sl@0
|
179 |
ihash.Insert(CSQLFnStep::Efn_openl, _L("OpenL"));
|
sl@0
|
180 |
ihash.Insert(CSQLFnStep::Efn_attach, _L("Attach"));
|
sl@0
|
181 |
ihash.Insert(CSQLFnStep::Efn_detach, _L("Detach"));
|
sl@0
|
182 |
ihash.Insert(CSQLFnStep::Efn_copy, _L("Copy"));
|
sl@0
|
183 |
ihash.Insert(CSQLFnStep::Efn_delete, _L("Delete"));
|
sl@0
|
184 |
ihash.Insert(CSQLFnStep::Efn_close, _L("Close"));
|
sl@0
|
185 |
ihash.Insert(CSQLFnStep::Efn_exec, _L("Exec"));
|
sl@0
|
186 |
ihash.Insert(CSQLFnStep::Efn_setisolationlevel, _L("SetIsolationLevel"));
|
sl@0
|
187 |
ihash.Insert(CSQLFnStep::Efn_lasterrormessage, _L("LastErrorMessage"));
|
sl@0
|
188 |
ihash.Insert(CSQLFnStep::Efn_reservedrivespace, _L("ReserveDriveSpace"));
|
sl@0
|
189 |
ihash.Insert(CSQLFnStep::Efn_freereservedspace, _L("FreeReservedSpace"));
|
sl@0
|
190 |
ihash.Insert(CSQLFnStep::Efn_getreserveaccess, _L("GetReserveAccess"));
|
sl@0
|
191 |
ihash.Insert(CSQLFnStep::Efn_releasereserveaccess, _L("ReleaseReserveAccess"));
|
sl@0
|
192 |
ihash.Insert(CSQLFnStep::Erstmt_prepare, _L("Prepare"));
|
sl@0
|
193 |
ihash.Insert(CSQLFnStep::Erstmt_preparel, _L("PrepareL"));
|
sl@0
|
194 |
ihash.Insert(CSQLFnStep::Erstmt_close, _L("St_Close"));
|
sl@0
|
195 |
ihash.Insert(CSQLFnStep::Erstmt_atrow, _L("AtRow"));
|
sl@0
|
196 |
ihash.Insert(CSQLFnStep::Erstmt_reset, _L("Reset"));
|
sl@0
|
197 |
ihash.Insert(CSQLFnStep::Erstmt_exec, _L("St_Exec"));
|
sl@0
|
198 |
ihash.Insert(CSQLFnStep::Erstmt_next, _L("Next"));
|
sl@0
|
199 |
ihash.Insert(CSQLFnStep::Erstmt_paramindex, _L("ParameterIndex"));
|
sl@0
|
200 |
ihash.Insert(CSQLFnStep::Erstmt_colindex, _L("ColumnIndex"));
|
sl@0
|
201 |
ihash.Insert(CSQLFnStep::Erstmt_coltype, _L("ColumnType"));
|
sl@0
|
202 |
ihash.Insert(CSQLFnStep::Erstmt_colsize, _L("ColumnSize"));
|
sl@0
|
203 |
ihash.Insert(CSQLFnStep::Erstmt_bindnull, _L("BindNull"));
|
sl@0
|
204 |
ihash.Insert(CSQLFnStep::Erstmt_bindint, _L("BindInt"));
|
sl@0
|
205 |
ihash.Insert(CSQLFnStep::Erstmt_bindint64, _L("BindInt64_"));
|
sl@0
|
206 |
ihash.Insert(CSQLFnStep::Erstmt_bindreal, _L("BindReal"));
|
sl@0
|
207 |
ihash.Insert(CSQLFnStep::Erstmt_bindtext, _L("BindText"));
|
sl@0
|
208 |
ihash.Insert(CSQLFnStep::Erstmt_bindbigtext, _L("BindTextFromFile"));
|
sl@0
|
209 |
ihash.Insert(CSQLFnStep::Erstmt_bindbinary, _L("BindBinary"));
|
sl@0
|
210 |
ihash.Insert(CSQLFnStep::Erstmt_isnull, _L("IsNull"));
|
sl@0
|
211 |
ihash.Insert(CSQLFnStep::Erstmt_colint, _L("ColumnInt"));
|
sl@0
|
212 |
ihash.Insert(CSQLFnStep::Erstmt_colint64, _L("ColumnInt64_"));
|
sl@0
|
213 |
ihash.Insert(CSQLFnStep::Erstmt_colreal, _L("ColumnReal"));
|
sl@0
|
214 |
ihash.Insert(CSQLFnStep::Erstmt_coltextL, _L("ColumnTextL"));
|
sl@0
|
215 |
ihash.Insert(CSQLFnStep::Erstmt_coltextP, _L("ColumnTextP"));
|
sl@0
|
216 |
ihash.Insert(CSQLFnStep::Erstmt_coltextD, _L("ColumnTextD"));
|
sl@0
|
217 |
ihash.Insert(CSQLFnStep::Erstmt_colbinL, _L("ColumnBinaryL"));
|
sl@0
|
218 |
ihash.Insert(CSQLFnStep::Erstmt_colbinP, _L("ColumnBinaryP"));
|
sl@0
|
219 |
ihash.Insert(CSQLFnStep::Erstmt_colbinD, _L("ColumnBinaryD"));
|
sl@0
|
220 |
ihash.Insert(CSQLFnStep::Esp_create, _L("SPCreate"));
|
sl@0
|
221 |
ihash.Insert(CSQLFnStep::Esp_createl, _L("SPCreateL"));
|
sl@0
|
222 |
ihash.Insert(CSQLFnStep::Esp_close, _L("SPClose"));
|
sl@0
|
223 |
ihash.Insert(CSQLFnStep::Esp_setdbpolicy, _L("SetDBPolicy"));
|
sl@0
|
224 |
ihash.Insert(CSQLFnStep::Esp_setpolicy, _L("SetPolicy"));
|
sl@0
|
225 |
ihash.Insert(CSQLFnStep::Esp_externalizel, _L("SPExternalizeL"));
|
sl@0
|
226 |
ihash.Insert(CSQLFnStep::Esp_internalizel, _L("SPInternalizeL"));
|
sl@0
|
227 |
ihash.Insert(CSQLFnStep::Estreamwrite_bindtext, _L("StreamWriteBindText"));
|
sl@0
|
228 |
ihash.Insert(CSQLFnStep::Estreamwrite_bindbinary, _L("StreamWriteBindBin"));
|
sl@0
|
229 |
ihash.Insert(CSQLFnStep::Estreamread_columntext, _L("StreamReadColText"));
|
sl@0
|
230 |
ihash.Insert(CSQLFnStep::Estreamread_columnbinary, _L("StreamReadColBin"));
|
sl@0
|
231 |
ihash.Insert(CSQLFnStep::Edefineconfig, _L("DefineConfig"));
|
sl@0
|
232 |
ihash.Insert(CSQLFnStep::Ectrl_newblock, _L("NewBlock"));
|
sl@0
|
233 |
ihash.Insert(CSQLFnStep::Ectrl_function, _L("Function"));
|
sl@0
|
234 |
ihash.Insert(CSQLFnStep::Ectrl_waitA, _L("WaitA"));
|
sl@0
|
235 |
ihash.Insert(CSQLFnStep::Ectrl_signalA, _L("SignalA"));
|
sl@0
|
236 |
ihash.Insert(CSQLFnStep::Ectrl_waitB, _L("WaitB"));
|
sl@0
|
237 |
ihash.Insert(CSQLFnStep::Ectrl_signalB, _L("SignalB"));
|
sl@0
|
238 |
ihash.Insert(CSQLFnStep::Ectrl_sleep, _L("Sleep"));
|
sl@0
|
239 |
ihash.Insert(CSQLFnStep::Ectrl_eightbit, _L("EightBit"));
|
sl@0
|
240 |
ihash.Insert(CSQLFnStep::Ectrl_async, _L("Async"));
|
sl@0
|
241 |
TInt err = ihash.Insert(CSQLFnStep::Ectrl_endblock, _L("EndBlock"));
|
sl@0
|
242 |
if( err == KErrNone )
|
sl@0
|
243 |
return;
|
sl@0
|
244 |
|
sl@0
|
245 |
User::Panic(_L("Unable to create action hash"), 1414);
|
sl@0
|
246 |
}
|
sl@0
|
247 |
|
sl@0
|
248 |
CSQLCapability::CSQLCapability()
|
sl@0
|
249 |
{
|
sl@0
|
250 |
ihash.Insert(ECapabilityTCB, _L("ECapabilityTCB"));
|
sl@0
|
251 |
ihash.Insert(ECapabilityCommDD, _L("ECapabilityCommDD"));
|
sl@0
|
252 |
ihash.Insert(ECapabilityPowerMgmt, _L("ECapabilityPowerMgmt"));
|
sl@0
|
253 |
ihash.Insert(ECapabilityMultimediaDD, _L("ECapabilityMultimediaDD"));
|
sl@0
|
254 |
ihash.Insert(ECapabilityReadDeviceData, _L("ECapabilityReadDeviceData"));
|
sl@0
|
255 |
ihash.Insert(ECapabilityWriteDeviceData, _L("ECapabilityWriteDeviceData"));
|
sl@0
|
256 |
ihash.Insert(ECapabilityDRM, _L("ECapabilityDRM"));
|
sl@0
|
257 |
ihash.Insert(ECapabilityTrustedUI, _L("ECapabilityTrustedUI"));
|
sl@0
|
258 |
ihash.Insert(ECapabilityProtServ, _L("ECapabilityProtServ"));
|
sl@0
|
259 |
ihash.Insert(ECapabilityDiskAdmin, _L("ECapabilityDiskAdmin"));
|
sl@0
|
260 |
ihash.Insert(ECapabilityNetworkControl, _L("ECapabilityNetworkControl"));
|
sl@0
|
261 |
ihash.Insert(ECapabilityAllFiles, _L("ECapabilityAllFiles"));
|
sl@0
|
262 |
ihash.Insert(ECapabilitySwEvent, _L("ECapabilitySwEvent"));
|
sl@0
|
263 |
ihash.Insert(ECapabilityNetworkServices, _L("ECapabilityNetworkServices"));
|
sl@0
|
264 |
ihash.Insert(ECapabilityLocalServices, _L("ECapabilityLocalServices"));
|
sl@0
|
265 |
ihash.Insert(ECapabilityReadUserData, _L("ECapabilityReadUserData"));
|
sl@0
|
266 |
ihash.Insert(ECapabilityWriteUserData, _L("ECapabilityWriteUserData"));
|
sl@0
|
267 |
ihash.Insert(ECapabilityLocation, _L("ECapabilityLocation"));
|
sl@0
|
268 |
ihash.Insert(ECapabilitySurroundingsDD, _L("ECapabilitySurroundingsDD"));
|
sl@0
|
269 |
ihash.Insert(ECapabilityUserEnvironment, _L("ECapabilityUserEnvironment"));
|
sl@0
|
270 |
ihash.Insert(ECapability_Limit, _L("ECapability_Limit"));
|
sl@0
|
271 |
ihash.Insert(ECapability_HardLimit, _L("ECapability_HardLimit"));
|
sl@0
|
272 |
ihash.Insert(ECapability_None, _L("ECapability_None"));
|
sl@0
|
273 |
TInt err = ihash.Insert(ECapability_Denied, _L("ECapability_Denied"));
|
sl@0
|
274 |
if( err == KErrNone )
|
sl@0
|
275 |
return;
|
sl@0
|
276 |
|
sl@0
|
277 |
User::Panic(_L("Unable to create capability hash"), 1414);
|
sl@0
|
278 |
}
|
sl@0
|
279 |
|
sl@0
|
280 |
CSQLPolicy::CSQLPolicy()
|
sl@0
|
281 |
{
|
sl@0
|
282 |
ihash.Insert(RSqlSecurityPolicy::ESchemaPolicy, _L("ESchemaPolicy"));
|
sl@0
|
283 |
ihash.Insert(RSqlSecurityPolicy::EReadPolicy, _L("EReadPolicy"));
|
sl@0
|
284 |
TInt err = ihash.Insert(RSqlSecurityPolicy::EWritePolicy, _L("EWritePolicy"));
|
sl@0
|
285 |
if( err == KErrNone )
|
sl@0
|
286 |
return;
|
sl@0
|
287 |
|
sl@0
|
288 |
User::Panic(_L("Unable to create SQL policy hash"), 1414);
|
sl@0
|
289 |
}
|
sl@0
|
290 |
|
sl@0
|
291 |
CSQLObject::CSQLObject()
|
sl@0
|
292 |
{
|
sl@0
|
293 |
TInt err = ihash.Insert(RSqlSecurityPolicy::ETable, _L("ETable"));
|
sl@0
|
294 |
if( err == KErrNone )
|
sl@0
|
295 |
return;
|
sl@0
|
296 |
|
sl@0
|
297 |
User::Panic(_L("Unable to create SQL policy hash"), 1414);
|
sl@0
|
298 |
}
|
sl@0
|
299 |
|
sl@0
|
300 |
CSQLSFSTEFAction::CSQLSFSTEFAction()
|
sl@0
|
301 |
{
|
sl@0
|
302 |
ihash.Insert(ESFS_SelectIntL, _L("SelectIntL"));
|
sl@0
|
303 |
ihash.Insert(ESFS_SelectInt64L, _L("SelectInt64L"));
|
sl@0
|
304 |
ihash.Insert(ESFS_SelectRealL, _L("SelectRealL"));
|
sl@0
|
305 |
ihash.Insert(ESFS_SelectTextL, _L("SelectTextL"));
|
sl@0
|
306 |
|
sl@0
|
307 |
TInt err = ihash.Insert(ESFS_SelectBinaryL, _L("SelectBinaryL"));
|
sl@0
|
308 |
if( err == KErrNone )
|
sl@0
|
309 |
return;
|
sl@0
|
310 |
|
sl@0
|
311 |
User::Panic(_L("Unable to create action hash"), 1414);
|
sl@0
|
312 |
}
|
sl@0
|
313 |
|