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