sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* Rule-based plugin selector definition
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
/**
|
sl@0
|
21 |
@file
|
sl@0
|
22 |
@publishedAll
|
sl@0
|
23 |
@released
|
sl@0
|
24 |
*/
|
sl@0
|
25 |
|
sl@0
|
26 |
#ifndef __CRYPTOAPI_RULESELECTOR_H__
|
sl@0
|
27 |
#define __CRYPTOAPI_RULESELECTOR_H__
|
sl@0
|
28 |
|
sl@0
|
29 |
#include <cryptospi/pluginselectorbase.h>
|
sl@0
|
30 |
#include <cryptospi/cryptocharacteristics.h>
|
sl@0
|
31 |
#include <e32hashtab.h>
|
sl@0
|
32 |
#include <cryptospi/cryptoparams.h>
|
sl@0
|
33 |
|
sl@0
|
34 |
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
|
sl@0
|
35 |
#include <rulecharacteristics.h>
|
sl@0
|
36 |
#endif
|
sl@0
|
37 |
|
sl@0
|
38 |
namespace CryptoSpi
|
sl@0
|
39 |
{
|
sl@0
|
40 |
|
sl@0
|
41 |
/**
|
sl@0
|
42 |
The operators of the plugin selection rule
|
sl@0
|
43 |
*/
|
sl@0
|
44 |
enum TRuleOperator
|
sl@0
|
45 |
{
|
sl@0
|
46 |
/**
|
sl@0
|
47 |
Operator ==
|
sl@0
|
48 |
*/
|
sl@0
|
49 |
EOpEqual,
|
sl@0
|
50 |
|
sl@0
|
51 |
/**
|
sl@0
|
52 |
Operator !=
|
sl@0
|
53 |
*/
|
sl@0
|
54 |
EOpNotEqual,
|
sl@0
|
55 |
|
sl@0
|
56 |
/**
|
sl@0
|
57 |
Operator >
|
sl@0
|
58 |
*/
|
sl@0
|
59 |
EOpGreaterThan,
|
sl@0
|
60 |
|
sl@0
|
61 |
/**
|
sl@0
|
62 |
Operator <
|
sl@0
|
63 |
*/
|
sl@0
|
64 |
EOpLessThan,
|
sl@0
|
65 |
|
sl@0
|
66 |
/**
|
sl@0
|
67 |
Operator >=
|
sl@0
|
68 |
*/
|
sl@0
|
69 |
EOpGreaterThanOrEqual,
|
sl@0
|
70 |
|
sl@0
|
71 |
/**
|
sl@0
|
72 |
Operator <=
|
sl@0
|
73 |
*/
|
sl@0
|
74 |
EOpLessThanOrEqual,
|
sl@0
|
75 |
|
sl@0
|
76 |
/**
|
sl@0
|
77 |
Ascending Sort of an characteristic
|
sl@0
|
78 |
*/
|
sl@0
|
79 |
EOpAscendingSort,
|
sl@0
|
80 |
|
sl@0
|
81 |
/**
|
sl@0
|
82 |
Descending Sort of an characteristic
|
sl@0
|
83 |
*/
|
sl@0
|
84 |
EOpDescendingSort,
|
sl@0
|
85 |
|
sl@0
|
86 |
/**
|
sl@0
|
87 |
The total number of operators
|
sl@0
|
88 |
*/
|
sl@0
|
89 |
EOpInvalid
|
sl@0
|
90 |
};
|
sl@0
|
91 |
|
sl@0
|
92 |
class CRulesCharacteristicsAndPluginName;
|
sl@0
|
93 |
/**
|
sl@0
|
94 |
A single plugin selection rule definition
|
sl@0
|
95 |
*/
|
sl@0
|
96 |
NONSHARABLE_CLASS(CSelectionRuleContent) : public CBase
|
sl@0
|
97 |
{
|
sl@0
|
98 |
public:
|
sl@0
|
99 |
/**
|
sl@0
|
100 |
Create a selection rule content instance; the supported characteristic uid's are
|
sl@0
|
101 |
defined in plugincharacteristics.h; the supported operators are defined in ruleselector.h
|
sl@0
|
102 |
@param aInterfaceScope The Interface scope of this rule
|
sl@0
|
103 |
@param aAlgorithmScope The Algorithm scope of this rule
|
sl@0
|
104 |
@param aCharacteristicValue The value of the rule of this characteristic
|
sl@0
|
105 |
@param aOperator The operator of the rule
|
sl@0
|
106 |
@param aIsOptional Whether this rule is optional or mandatory
|
sl@0
|
107 |
@return A pointer to a CSelectionRuleContent instance
|
sl@0
|
108 |
*/
|
sl@0
|
109 |
IMPORT_C static CSelectionRuleContent* NewL(TUid aInterfaceScope,
|
sl@0
|
110 |
TUid aAlgorithmScope,
|
sl@0
|
111 |
CCryptoParam* aCharacteristicValue,
|
sl@0
|
112 |
TRuleOperator aOperator,
|
sl@0
|
113 |
TBool aIsOptional);
|
sl@0
|
114 |
/**
|
sl@0
|
115 |
Destructor
|
sl@0
|
116 |
*/
|
sl@0
|
117 |
IMPORT_C ~CSelectionRuleContent();
|
sl@0
|
118 |
|
sl@0
|
119 |
/**
|
sl@0
|
120 |
* @internalComponent
|
sl@0
|
121 |
*
|
sl@0
|
122 |
* Get the Interface Scope of this rule
|
sl@0
|
123 |
* @return the Interface Scope Uid of this rule
|
sl@0
|
124 |
**/
|
sl@0
|
125 |
TUid GetInterfaceScope();
|
sl@0
|
126 |
|
sl@0
|
127 |
/**
|
sl@0
|
128 |
* @internalComponent
|
sl@0
|
129 |
*
|
sl@0
|
130 |
* Get the Algorithm Scope of this rule
|
sl@0
|
131 |
* @return the Algorithm Scope Uid of this rule
|
sl@0
|
132 |
**/
|
sl@0
|
133 |
TUid GetAlgorithmScope();
|
sl@0
|
134 |
|
sl@0
|
135 |
/**
|
sl@0
|
136 |
* @internalComponent
|
sl@0
|
137 |
*
|
sl@0
|
138 |
* Get the Rule operator
|
sl@0
|
139 |
* @return The Rule operator
|
sl@0
|
140 |
**/
|
sl@0
|
141 |
TInt GetOperator();
|
sl@0
|
142 |
|
sl@0
|
143 |
/**
|
sl@0
|
144 |
* @internalComponent
|
sl@0
|
145 |
*
|
sl@0
|
146 |
* Get the value of the rule of this characteristic
|
sl@0
|
147 |
* @return The value of the rule of this characteristic
|
sl@0
|
148 |
**/
|
sl@0
|
149 |
const CCryptoParam* GetCharacteristicValue();
|
sl@0
|
150 |
|
sl@0
|
151 |
/**
|
sl@0
|
152 |
* @internalComponent
|
sl@0
|
153 |
*
|
sl@0
|
154 |
* returns whether the rule is optional
|
sl@0
|
155 |
* @return Whether the rule is optional
|
sl@0
|
156 |
**/
|
sl@0
|
157 |
TBool IsOptionalRule();
|
sl@0
|
158 |
|
sl@0
|
159 |
private:
|
sl@0
|
160 |
/**
|
sl@0
|
161 |
Constructor
|
sl@0
|
162 |
*/
|
sl@0
|
163 |
CSelectionRuleContent(TUid aInterfaceScope,
|
sl@0
|
164 |
TUid aAlgorithmScope,
|
sl@0
|
165 |
CCryptoParam* aCharacteristicValue,
|
sl@0
|
166 |
TRuleOperator aOperator,
|
sl@0
|
167 |
TBool aIsOptional);
|
sl@0
|
168 |
|
sl@0
|
169 |
/**
|
sl@0
|
170 |
The scopes of this rule
|
sl@0
|
171 |
*/
|
sl@0
|
172 |
TUid iInterfaceScope;
|
sl@0
|
173 |
TUid iAlgorithmScope;
|
sl@0
|
174 |
|
sl@0
|
175 |
/**
|
sl@0
|
176 |
The value of the rule of this characteristic
|
sl@0
|
177 |
*/
|
sl@0
|
178 |
const CCryptoParam* iCharacteristicValue;
|
sl@0
|
179 |
|
sl@0
|
180 |
/**
|
sl@0
|
181 |
The Operator of the Characteristic
|
sl@0
|
182 |
*/
|
sl@0
|
183 |
TRuleOperator iOperator;
|
sl@0
|
184 |
|
sl@0
|
185 |
/**
|
sl@0
|
186 |
if the rule on this characteristic is optional
|
sl@0
|
187 |
*/
|
sl@0
|
188 |
TBool iIsOptional;
|
sl@0
|
189 |
};
|
sl@0
|
190 |
|
sl@0
|
191 |
|
sl@0
|
192 |
/**
|
sl@0
|
193 |
Definition of rule-based plugin selection rules
|
sl@0
|
194 |
*/
|
sl@0
|
195 |
NONSHARABLE_CLASS(CSelectionRules) : public CBase
|
sl@0
|
196 |
{
|
sl@0
|
197 |
public:
|
sl@0
|
198 |
/**
|
sl@0
|
199 |
create a Selection Rule instance which will hold the rules to filter the plugins
|
sl@0
|
200 |
@return a pointer to a CSelectionRules instance
|
sl@0
|
201 |
*/
|
sl@0
|
202 |
IMPORT_C static CSelectionRules* NewL();
|
sl@0
|
203 |
|
sl@0
|
204 |
/**
|
sl@0
|
205 |
Destructor
|
sl@0
|
206 |
*/
|
sl@0
|
207 |
IMPORT_C ~CSelectionRules();
|
sl@0
|
208 |
|
sl@0
|
209 |
/**
|
sl@0
|
210 |
Add a selection rule the this object
|
sl@0
|
211 |
@param aSelectionRule The rule to be added
|
sl@0
|
212 |
*/
|
sl@0
|
213 |
IMPORT_C void AddSelectionRuleL(CSelectionRuleContent* aSelectionRule);
|
sl@0
|
214 |
|
sl@0
|
215 |
/**
|
sl@0
|
216 |
* @internalComponent
|
sl@0
|
217 |
*
|
sl@0
|
218 |
* Get the selection rules
|
sl@0
|
219 |
* @return The reference of the rules
|
sl@0
|
220 |
**/
|
sl@0
|
221 |
RPointerArray<CSelectionRuleContent>& GetSelectionRules();
|
sl@0
|
222 |
|
sl@0
|
223 |
private:
|
sl@0
|
224 |
/**
|
sl@0
|
225 |
Constructor
|
sl@0
|
226 |
*/
|
sl@0
|
227 |
CSelectionRules();
|
sl@0
|
228 |
|
sl@0
|
229 |
/**
|
sl@0
|
230 |
a group of plugin rules
|
sl@0
|
231 |
*/
|
sl@0
|
232 |
RPointerArray<CSelectionRuleContent> iRules;
|
sl@0
|
233 |
};
|
sl@0
|
234 |
|
sl@0
|
235 |
/**
|
sl@0
|
236 |
Selector apply the rule-based selection to find the plugin.
|
sl@0
|
237 |
*/
|
sl@0
|
238 |
NONSHARABLE_CLASS(CRuleSelector) : public CBase, public MPluginSelector
|
sl@0
|
239 |
{
|
sl@0
|
240 |
public:
|
sl@0
|
241 |
/**
|
sl@0
|
242 |
NewL create the ruled-based selector
|
sl@0
|
243 |
@param aRules The Rules to select the plugins
|
sl@0
|
244 |
@return a pointer to a CRuleSelector instance
|
sl@0
|
245 |
*/
|
sl@0
|
246 |
IMPORT_C static CRuleSelector* NewL(CSelectionRules* aRules);
|
sl@0
|
247 |
IMPORT_C static CRuleSelector* NewLC(CSelectionRules* aRules);
|
sl@0
|
248 |
|
sl@0
|
249 |
/**
|
sl@0
|
250 |
Destructor
|
sl@0
|
251 |
*/
|
sl@0
|
252 |
IMPORT_C ~CRuleSelector();
|
sl@0
|
253 |
|
sl@0
|
254 |
/**
|
sl@0
|
255 |
* @deprecated
|
sl@0
|
256 |
*
|
sl@0
|
257 |
* virtual function from MPluginSelector
|
sl@0
|
258 |
*/
|
sl@0
|
259 |
virtual void CreateHashL(CHash*& aHash,
|
sl@0
|
260 |
TUid aAlgorithmUid,
|
sl@0
|
261 |
TUid aOperationMode,
|
sl@0
|
262 |
const CKey* aKey,
|
sl@0
|
263 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
264 |
|
sl@0
|
265 |
//virtual function from MPluginSelector
|
sl@0
|
266 |
virtual void CreateRandomL(CRandom*& aRandom,
|
sl@0
|
267 |
TUid aAlgorithmUid,
|
sl@0
|
268 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
269 |
|
sl@0
|
270 |
//virtual function from MPluginSelector
|
sl@0
|
271 |
virtual void CreateSymmetricCipherL(CSymmetricCipher*& aCipher,
|
sl@0
|
272 |
TUid aAlgorithmUid,
|
sl@0
|
273 |
const CKey& aKey,
|
sl@0
|
274 |
TUid aCryptoMode,
|
sl@0
|
275 |
TUid aOperationMode,
|
sl@0
|
276 |
TUid aPaddingMode,
|
sl@0
|
277 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
278 |
|
sl@0
|
279 |
//virtual function from MPluginSelector
|
sl@0
|
280 |
virtual void CreateAsymmetricCipherL(CAsymmetricCipher*& aCipher,
|
sl@0
|
281 |
TUid aAlgorithmUid,
|
sl@0
|
282 |
const CKey& aKey,
|
sl@0
|
283 |
TUid aCryptoMode,
|
sl@0
|
284 |
TUid aPaddingMode,
|
sl@0
|
285 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
286 |
|
sl@0
|
287 |
//virtual function from MPluginSelector
|
sl@0
|
288 |
virtual void CreateSignerL(CSigner*& aSigner,
|
sl@0
|
289 |
TUid aAlgorithmUid,
|
sl@0
|
290 |
const CKey& aKey,
|
sl@0
|
291 |
TUid aPaddingMode,
|
sl@0
|
292 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
293 |
|
sl@0
|
294 |
//virtual function from MPluginSelector
|
sl@0
|
295 |
virtual void CreateVerifierL(CVerifier*& aVerifier,
|
sl@0
|
296 |
TUid aAlgorithmUid,
|
sl@0
|
297 |
const CKey& aKey,
|
sl@0
|
298 |
TUid aPaddingMode,
|
sl@0
|
299 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
300 |
|
sl@0
|
301 |
//virtual function from MPluginSelector
|
sl@0
|
302 |
virtual void CreateKeyPairGeneratorL(CKeyPairGenerator*& aKeyPairGenerator,
|
sl@0
|
303 |
TUid aKeyAlgorithmUid,
|
sl@0
|
304 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
305 |
|
sl@0
|
306 |
//virtual function from MPluginSelector
|
sl@0
|
307 |
virtual void CreateKeyAgreementL(CKeyAgreement*& aKeyAgreement,
|
sl@0
|
308 |
TUid aAlgorithmUid,
|
sl@0
|
309 |
const CKey& aPrivateKey,
|
sl@0
|
310 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
311 |
|
sl@0
|
312 |
/**
|
sl@0
|
313 |
* @deprecated
|
sl@0
|
314 |
*
|
sl@0
|
315 |
* virtual function from MPluginSelector
|
sl@0
|
316 |
*/
|
sl@0
|
317 |
virtual void CreateAsyncHashL(CAsyncHash*& aHash,
|
sl@0
|
318 |
TUid aAlgorithmUid,
|
sl@0
|
319 |
TUid aOperationMode,
|
sl@0
|
320 |
const CKey* aKey,
|
sl@0
|
321 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
322 |
|
sl@0
|
323 |
//virtual function from MPluginSelector
|
sl@0
|
324 |
virtual void CreateAsyncRandomL(CAsyncRandom*& aRandom,
|
sl@0
|
325 |
TUid aAlgorithmUid,
|
sl@0
|
326 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
327 |
|
sl@0
|
328 |
//virtual function from MPluginSelector
|
sl@0
|
329 |
virtual void CreateAsyncSymmetricCipherL(CAsyncSymmetricCipher*& aCipher,
|
sl@0
|
330 |
TUid aAlgorithmUid,
|
sl@0
|
331 |
const CKey& aKey,
|
sl@0
|
332 |
TUid aCryptoMode,
|
sl@0
|
333 |
TUid aOperationMode,
|
sl@0
|
334 |
TUid aPaddingMode,
|
sl@0
|
335 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
336 |
|
sl@0
|
337 |
//virtual function from MPluginSelector
|
sl@0
|
338 |
virtual void CreateAsyncAsymmetricCipherL(CAsyncAsymmetricCipher*& aCipher,
|
sl@0
|
339 |
TUid aAlgorithmUid,
|
sl@0
|
340 |
const CKey& aKey,
|
sl@0
|
341 |
TUid aCryptoMode,
|
sl@0
|
342 |
TUid aPaddingMode,
|
sl@0
|
343 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
344 |
|
sl@0
|
345 |
//virtual function from MPluginSelector
|
sl@0
|
346 |
virtual void CreateAsyncSignerL(CAsyncSigner*& aSigner,
|
sl@0
|
347 |
TUid aAlgorithmUid,
|
sl@0
|
348 |
const CKey& aKey,
|
sl@0
|
349 |
TUid aPaddingMode,
|
sl@0
|
350 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
351 |
|
sl@0
|
352 |
//virtual function from MPluginSelector
|
sl@0
|
353 |
virtual void CreateAsyncVerifierL(CAsyncVerifier*& aVerifier,
|
sl@0
|
354 |
TUid aAlgorithmUid,
|
sl@0
|
355 |
const CKey& aKey,
|
sl@0
|
356 |
TUid aPaddingMode,
|
sl@0
|
357 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
358 |
|
sl@0
|
359 |
//virtual function from MPluginSelector
|
sl@0
|
360 |
virtual void CreateAsyncKeyPairGeneratorL(CAsyncKeyPairGenerator*& aKeyPairGenerator,
|
sl@0
|
361 |
TUid aAlgorithmUid,
|
sl@0
|
362 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
363 |
|
sl@0
|
364 |
//virtual function from MPluginSelector
|
sl@0
|
365 |
virtual void CreateAsyncKeyAgreementL(CAsyncKeyAgreement*& aKeyAgreement,
|
sl@0
|
366 |
TUid aAlgorithmUid,
|
sl@0
|
367 |
const CKey& aPrivateKey,
|
sl@0
|
368 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
369 |
|
sl@0
|
370 |
#ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT
|
sl@0
|
371 |
|
sl@0
|
372 |
//virtual function from MPluginSelector
|
sl@0
|
373 |
virtual void CreateMacL(CMac*& aMac,
|
sl@0
|
374 |
const TUid aAlgorithmUid,
|
sl@0
|
375 |
const CKey& aKey,
|
sl@0
|
376 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
377 |
|
sl@0
|
378 |
//virtual function from MPluginSelector
|
sl@0
|
379 |
virtual void CreateAsyncMacL(CAsyncMac*& aMac,
|
sl@0
|
380 |
const TUid aAlgorithmUid,
|
sl@0
|
381 |
const CKey& aKey,
|
sl@0
|
382 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
383 |
|
sl@0
|
384 |
//virtual function from MPluginSelector
|
sl@0
|
385 |
virtual void CreateHashL(CHash*& aHash,
|
sl@0
|
386 |
TUid aAlgorithmUid,
|
sl@0
|
387 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
388 |
|
sl@0
|
389 |
//virtual function from MPluginSelector
|
sl@0
|
390 |
virtual void CreateAsyncHashL(CAsyncHash*& aHash,
|
sl@0
|
391 |
TUid aAlgorithmUid,
|
sl@0
|
392 |
const CCryptoParams* aAlgorithmParams);
|
sl@0
|
393 |
|
sl@0
|
394 |
#endif
|
sl@0
|
395 |
|
sl@0
|
396 |
/** @internalComponent */
|
sl@0
|
397 |
static TInt AscendCreatorName(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
398 |
|
sl@0
|
399 |
/** @internalComponent */
|
sl@0
|
400 |
static TInt DescendCreatorName(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
401 |
|
sl@0
|
402 |
/** @internalComponent */
|
sl@0
|
403 |
static TInt AscendExtendedTDesC8L(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
404 |
|
sl@0
|
405 |
/** @internalComponent */
|
sl@0
|
406 |
static TInt DescendExtendedTDesC8L(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
407 |
|
sl@0
|
408 |
/** @internalComponent */
|
sl@0
|
409 |
static TInt AscendMaxConcurrencySupported(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
410 |
|
sl@0
|
411 |
/** @internalComponent */
|
sl@0
|
412 |
static TInt DescendMaxConcurrencySupported(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
413 |
|
sl@0
|
414 |
/** @internalComponent */
|
sl@0
|
415 |
static TInt AscendLatency(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
416 |
|
sl@0
|
417 |
/** @internalComponent */
|
sl@0
|
418 |
static TInt DescendLatency(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
419 |
|
sl@0
|
420 |
/** @internalComponent */
|
sl@0
|
421 |
static TInt AscendThroughput(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
422 |
|
sl@0
|
423 |
/** @internalComponent */
|
sl@0
|
424 |
static TInt DescendThroughput(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
425 |
|
sl@0
|
426 |
/** @internalComponent */
|
sl@0
|
427 |
static TInt AscendHashBlockSize(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
428 |
|
sl@0
|
429 |
/** @internalComponent */
|
sl@0
|
430 |
static TInt DescendHashBlockSize(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
431 |
|
sl@0
|
432 |
/** @internalComponent */
|
sl@0
|
433 |
static TInt AscendSymmetricCipherBlockSize(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
434 |
|
sl@0
|
435 |
/** @internalComponent */
|
sl@0
|
436 |
static TInt DescendSymmetricCipherBlockSize(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
437 |
|
sl@0
|
438 |
/** @internalComponent */
|
sl@0
|
439 |
static TInt AscendHashOutputSize(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
440 |
|
sl@0
|
441 |
/** @internalComponent */
|
sl@0
|
442 |
static TInt DescendHashOutputSize(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
443 |
|
sl@0
|
444 |
/** @internalComponent */
|
sl@0
|
445 |
static TInt AscendRandomBlockingMode(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
446 |
|
sl@0
|
447 |
/** @internalComponent */
|
sl@0
|
448 |
static TInt DescendRandomBlockingMode(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
449 |
|
sl@0
|
450 |
/** @internalComponent */
|
sl@0
|
451 |
static TInt AscendSymmetricCipherKeyLength(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
452 |
|
sl@0
|
453 |
/** @internalComponent */
|
sl@0
|
454 |
static TInt DescendSymmetricCipherKeyLength(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
455 |
|
sl@0
|
456 |
/** @internalComponent */
|
sl@0
|
457 |
static TInt AscendAsymmetricCipherKeyLength(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
458 |
|
sl@0
|
459 |
/** @internalComponent */
|
sl@0
|
460 |
static TInt DescendAsymmetricCipherKeyLength(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
461 |
|
sl@0
|
462 |
/** @internalComponent */
|
sl@0
|
463 |
static TInt AscendAsymmetricSignatureKeyLength(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
464 |
|
sl@0
|
465 |
/** @internalComponent */
|
sl@0
|
466 |
static TInt DescendAsymmetricSignatureKeyLength(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
467 |
|
sl@0
|
468 |
/** @internalComponent */
|
sl@0
|
469 |
static TInt AscendSymmetricCipherKeySupport(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
470 |
|
sl@0
|
471 |
/** @internalComponent */
|
sl@0
|
472 |
static TInt DescendSymmetricCipherKeySupport(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
473 |
|
sl@0
|
474 |
/** @internalComponent */
|
sl@0
|
475 |
static TInt AscendAsymmetricCipherKeySupport(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
476 |
|
sl@0
|
477 |
/** @internalComponent */
|
sl@0
|
478 |
static TInt DescendAsymmetricCipherKeySupport(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
479 |
|
sl@0
|
480 |
/** @internalComponent */
|
sl@0
|
481 |
static TInt AscendAsymmetricSignatureKeySupport(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
482 |
|
sl@0
|
483 |
/** @internalComponent */
|
sl@0
|
484 |
static TInt DescendAsymmetricSignatureKeySupport(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
485 |
|
sl@0
|
486 |
/** @internalComponent */
|
sl@0
|
487 |
static TInt AscendAsymmetricKeypairGeneratorKeyLength(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
488 |
|
sl@0
|
489 |
/** @internalComponent */
|
sl@0
|
490 |
static TInt DescendAsymmetricKeypairGeneratorKeyLength(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
491 |
|
sl@0
|
492 |
/** @internalComponent */
|
sl@0
|
493 |
static TInt AscendExtendedCharacteristicL(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
494 |
|
sl@0
|
495 |
/** @internalComponent */
|
sl@0
|
496 |
static TInt DescendExtendedCharacteristicL(const CRulesCharacteristicsAndPluginName& aLeft, const CRulesCharacteristicsAndPluginName& aRight);
|
sl@0
|
497 |
|
sl@0
|
498 |
private:
|
sl@0
|
499 |
|
sl@0
|
500 |
/**
|
sl@0
|
501 |
Constructor
|
sl@0
|
502 |
@param aRules the Rules to select the plugins
|
sl@0
|
503 |
*/
|
sl@0
|
504 |
CRuleSelector();
|
sl@0
|
505 |
|
sl@0
|
506 |
/**
|
sl@0
|
507 |
Second Phase Constructor
|
sl@0
|
508 |
*/
|
sl@0
|
509 |
void ConstructL(CSelectionRules* aRules);
|
sl@0
|
510 |
|
sl@0
|
511 |
void PerformFilterL(CSelectionRules* aRules);
|
sl@0
|
512 |
|
sl@0
|
513 |
void PerformAlgorithmFilterL(TInt32 aInterfaceUid, RPointerArray<CRulesCharacteristicsAndPluginName>& aCharacteristicsDLL,
|
sl@0
|
514 |
CSelectionRuleContent* aRules, TInt& aLastPreference);
|
sl@0
|
515 |
|
sl@0
|
516 |
TBool FilterCommonCharacteristicsL(TInt32 aInterfaceUid, RPointerArray<CRulesCharacteristicsAndPluginName>& aCharacteristicsDLL,
|
sl@0
|
517 |
CSelectionRuleContent* aRules, TInt& aLastPreference);
|
sl@0
|
518 |
|
sl@0
|
519 |
TBool FilterNonCommonCharacteristicsL(TInt32 aInterfaceUid, RPointerArray<CRulesCharacteristicsAndPluginName>& aCharacteristicsDLL,
|
sl@0
|
520 |
CSelectionRuleContent* aRules, TInt& aLastPreference);
|
sl@0
|
521 |
|
sl@0
|
522 |
TBool FilterExtendedCharacteristicsL(TInt32 aInterfaceUid, RPointerArray<CRulesCharacteristicsAndPluginName>& aCharacteristicsDLL,
|
sl@0
|
523 |
CSelectionRuleContent* aRules, TInt& aLastPreference);
|
sl@0
|
524 |
|
sl@0
|
525 |
void FilterTInt32L(TInt32 aInterfaceUid, CRulesCharacteristicsAndPluginName& aCharacteristics,
|
sl@0
|
526 |
CSelectionRuleContent* aRules, TInt& aLastPreference, TInt32 aCharValue);
|
sl@0
|
527 |
|
sl@0
|
528 |
void FilterMultiTInt32L(TInt32 aInterfaceUid, CRulesCharacteristicsAndPluginName& aCharacteristicsDLL,
|
sl@0
|
529 |
CSelectionRuleContent* aRules, TInt& aLastPreference,
|
sl@0
|
530 |
TBool aSupport);
|
sl@0
|
531 |
|
sl@0
|
532 |
void FilterCreatorNameL(TInt32 aInterfaceUid, RPointerArray<CRulesCharacteristicsAndPluginName>& aCharacteristicsDLL,
|
sl@0
|
533 |
CSelectionRuleContent* aRules, TInt& aLastPreference);
|
sl@0
|
534 |
|
sl@0
|
535 |
void FilterExtendedTDesC8L(TInt32 aInterfaceUid, RPointerArray<CRulesCharacteristicsAndPluginName>& aCharacteristicsDLL,
|
sl@0
|
536 |
CSelectionRuleContent* aRules, TInt& aLastPreference, const TDesC8& aCharValue);
|
sl@0
|
537 |
|
sl@0
|
538 |
void FilterTBoolL(TInt32 aInterfaceUid, CRulesCharacteristicsAndPluginName& aCharacteristics,
|
sl@0
|
539 |
CSelectionRuleContent* aRules, TInt& aLastPreference, TBool aCharValue);
|
sl@0
|
540 |
|
sl@0
|
541 |
void FilterTIntL(TInt32 aInterfaceUid, RPointerArray<CRulesCharacteristicsAndPluginName>& aCharacteristicsDLL,
|
sl@0
|
542 |
CSelectionRuleContent* aRules, TInt& aLastPreference, TInt aCharValue);
|
sl@0
|
543 |
|
sl@0
|
544 |
void TryAddToOptionalCharListL(TInt32 aInterfaceUid, CRulesCharacteristicsAndPluginName& aCharacteristics,
|
sl@0
|
545 |
CSelectionRuleContent* aRules);
|
sl@0
|
546 |
|
sl@0
|
547 |
void AddToCharListL(TInt32 aInterfaceUid, CRulesCharacteristicsAndPluginName& aCharacteristics,
|
sl@0
|
548 |
TInt& aLastPreference);
|
sl@0
|
549 |
|
sl@0
|
550 |
void AddOptionalToCharListL(TInt32 aInterfaceUid, CRulesCharacteristicsAndPluginName& aCharacteristics);
|
sl@0
|
551 |
|
sl@0
|
552 |
void ConstructMapAL();
|
sl@0
|
553 |
|
sl@0
|
554 |
void SetSearchRecord(TUid aInterfaceUid, TInt aValue);
|
sl@0
|
555 |
|
sl@0
|
556 |
/**
|
sl@0
|
557 |
Loads the crypto plugins
|
sl@0
|
558 |
*/
|
sl@0
|
559 |
void LoadPluginsL();
|
sl@0
|
560 |
|
sl@0
|
561 |
TInt FindPlugin(TUid aInterfaceUid, TUid aAlgorithmUid, TUid& aImplementationId, TFileName& aDllName);
|
sl@0
|
562 |
|
sl@0
|
563 |
/**
|
sl@0
|
564 |
The selection rules to filter the plugins
|
sl@0
|
565 |
*/
|
sl@0
|
566 |
CSelectionRules* iSelectionRules;
|
sl@0
|
567 |
|
sl@0
|
568 |
/**
|
sl@0
|
569 |
Maps of the interface UID and the pointer of algorithm's characteristic array
|
sl@0
|
570 |
They are used alternatively to filter from one array to the other
|
sl@0
|
571 |
The final array will be set to iActiveInterfaceCharacteristics_Map for plugin lookup
|
sl@0
|
572 |
*/
|
sl@0
|
573 |
RHashMap<TInt32, RPointerArray<CRulesCharacteristicsAndPluginName>*> iSelectedInterfaceCharacteristics_MapA;
|
sl@0
|
574 |
RHashMap<TInt32, RPointerArray<CRulesCharacteristicsAndPluginName>*> iSelectedInterfaceCharacteristics_MapB;
|
sl@0
|
575 |
|
sl@0
|
576 |
/**
|
sl@0
|
577 |
Pointer of the active map of the interface UID and the characteristic list
|
sl@0
|
578 |
*/
|
sl@0
|
579 |
const RHashMap<TInt32, RPointerArray<CRulesCharacteristicsAndPluginName>*>* iActiveInterfaceCharacteristics_Map;
|
sl@0
|
580 |
|
sl@0
|
581 |
/**
|
sl@0
|
582 |
Records the next index to try
|
sl@0
|
583 |
*/
|
sl@0
|
584 |
RHashMap<TInt32, TInt> iNextTryCharacteristicsIndex;
|
sl@0
|
585 |
|
sl@0
|
586 |
/**
|
sl@0
|
587 |
To indicate whether to use iSelectedInterfaceCharacteristics_MapA
|
sl@0
|
588 |
or iSelectedInterfaceCharacteristics_MapA to filter
|
sl@0
|
589 |
*/
|
sl@0
|
590 |
TBool iUseMapAToFilter;
|
sl@0
|
591 |
|
sl@0
|
592 |
/**
|
sl@0
|
593 |
This is use to indicate whether to alternate the maps for next rule filtering or not
|
sl@0
|
594 |
*/
|
sl@0
|
595 |
TBool iToggleUseMap;
|
sl@0
|
596 |
|
sl@0
|
597 |
/**
|
sl@0
|
598 |
The plugin DLL list, which holds all the plugin DLLs
|
sl@0
|
599 |
*/
|
sl@0
|
600 |
RArray<RLibrary> iPluginDllList;
|
sl@0
|
601 |
};
|
sl@0
|
602 |
}
|
sl@0
|
603 |
|
sl@0
|
604 |
#endif //__CRYPTOAPI_RULESELECTOR_H__
|