1 senservicemanager.h |
1 /* |
|
2 * Copyright (c) 2002-2005 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: CSenServiceManager class offers API for |
|
15 * accessing and managing WebServicesFramework |
|
16 * (WSF) service and identity related data. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 #ifndef SEN_SERVICE_MANAGER_H |
|
28 #define SEN_SERVICE_MANAGER_H |
|
29 |
|
30 // INCLUDES |
|
31 #include <e32base.h> // for CActive |
|
32 #include <e32std.h> // for RPointerArray |
|
33 #include <badesca.h> |
|
34 |
|
35 #include <MSenServiceConsumer.h> |
|
36 #include <MSenServiceDescription.h> |
|
37 #include <SenCredential2.h> |
|
38 #include <SenXmlProperties.h> |
|
39 #include "MSenAuthenticationProvider.h" |
|
40 |
|
41 // FORWARD DECLARATIONS |
|
42 class CSenXmlServiceDescription; |
|
43 class CSenIdentityProvider; |
|
44 |
|
45 // DATA TYPES |
|
46 typedef RPointerArray<CSenXmlServiceDescription> RServiceDescriptionArray; |
|
47 typedef RPointerArray<CSenCredential2> RCredentialArray; |
|
48 typedef RPointerArray<CSenXmlProperties> RCredentialPropertiesArray; |
|
49 |
|
50 // CLASS DECLARATION |
|
51 |
|
52 /** |
|
53 * CSenServiceManager class offers API for accessing and managing |
|
54 * WebServicesFramework (WSF) service and identity related data. |
|
55 * The class is designed using abstract factory pattern: |
|
56 * it only offers a instance (pointer) to the actual implementation |
|
57 * class meeting this interface. |
|
58 * Typically, service consumers use of CSenServiceManager to register service |
|
59 * or identity based data, which is required for accessing some invocable, |
|
60 * possibly remote service. |
|
61 * The class is meant for both default frameworks offered by WSF |
|
62 * and for any custom plug-in service invocation framework implementation. |
|
63 * The default frameworks are: |
|
64 * 1) Identity Based Web Services Framework (ID-WSF). |
|
65 * 2) Basic Web Services Framework. |
|
66 * For Basic Web Service consumer, the only applicable operations are |
|
67 * Identity data managing methods. These can be used to make connection |
|
68 * specific Basic Authentication (BASIC-AUTH) credentials available without |
|
69 * later end-user interaction. Otherwise required authentication info |
|
70 * will be requested via notifier dialog prompts. |
|
71 * ID-WSF consumer has to use the CSenServiceManager methods to register |
|
72 * authentication service description and identity provider (which are |
|
73 * the same service in ID-WSF) and finally associate some actual service |
|
74 * (contract to a WSP) to this IDP. |
|
75 * |
|
76 * The current client-server framework implementation of CSenServiceManager |
|
77 * is synchronous, although class inherits CActive for future extensions. |
|
78 * So, the class instance will not be an active object handled |
|
79 * by ActiveScheduler, and it does not have implementation |
|
80 * in RunL() or DoCancel() methods. |
|
81 * |
|
82 * @lib SenServMgr.lib |
|
83 * @since Series60 3.0 |
|
84 */ |
|
85 class CSenServiceManager : public CActive |
|
86 { |
|
87 public: // Constructors and destructor |
|
88 |
|
89 /** |
|
90 * Two-phased constructor. |
|
91 */ |
|
92 IMPORT_C static CSenServiceManager* NewL(); |
|
93 |
|
94 /** |
|
95 * Two-phased constructor. |
|
96 */ |
|
97 IMPORT_C static CSenServiceManager* NewLC(); |
|
98 |
|
99 /** |
|
100 * Two-phased constructor. |
|
101 */ |
|
102 IMPORT_C static CSenServiceManager* NewL(MSenAuthenticationProvider& aAuthProvider); |
|
103 |
|
104 /** |
|
105 * Two-phased constructor. |
|
106 */ |
|
107 IMPORT_C static CSenServiceManager* NewLC(MSenAuthenticationProvider& aAuthProvider); |
|
108 |
|
109 // New functions |
|
110 |
|
111 /** |
|
112 * Consumers use this to find services with matching URI |
|
113 * (contract or endpoint) of the service. ID-WSF consumers |
|
114 * typically use the service type (contract) they are |
|
115 * interested on. |
|
116 * Contract is typically some URN and most endpoints are URLs. |
|
117 * The Basic Web Service descriptions are not written into WSF |
|
118 * database, so they cannot be searched using this method. |
|
119 * @param aUri specifies the search string (contract or endpoint) |
|
120 * which will be used to find matching service descriptions. |
|
121 * @param aList an array with 0 or more service descriptions which |
|
122 * are already registered to WSF. |
|
123 * The ownership of the array is passed to the caller so before |
|
124 * the array goes out of scope in the client, the caller must |
|
125 * call RPointerArray::ResetAndDestroy() on the array to free any |
|
126 * entries. |
|
127 * @return status/error code. |
|
128 * Status codes: |
|
129 * KErrNone ok |
|
130 * Error codes: |
|
131 * KErrNotFound No matching service description was found. |
|
132 * Other error codes are system-wide Symbian error codes. |
|
133 */ |
|
134 virtual TInt ServiceDescriptionsL( const TDesC8& aURI, |
|
135 RServiceDescriptionArray& aList) = 0; |
|
136 |
|
137 /** |
|
138 * Consumers use this to find services with matching |
|
139 * service description. The service description may |
|
140 * include specific contract or endpoint of the service |
|
141 * as a searching criteria. |
|
142 * Contract is typically some URN and most endpoints are URLs. |
|
143 * The Basic Web Service descriptions are not written into WSF |
|
144 * database, so they cannot be searched using this method. |
|
145 * @param aSD a service description specifying search pattern |
|
146 * (which includes contract, URI or both) used to find |
|
147 * matching service descriptions. |
|
148 * @param aList an array with 0 or more ServiceDescriptions which |
|
149 * are already registered to WSF. |
|
150 * The ownership of the array is passed to the caller so before |
|
151 * the array goes out of scope in the client, the caller must |
|
152 * call RPointerArray::ResetAndDestroy() on the array to free any |
|
153 * entries. |
|
154 * @return status/error code. |
|
155 * Status codes: |
|
156 * KErrNone ok |
|
157 * Error codes: |
|
158 * KErrNotFound No matching service descriptions found. |
|
159 * Other error codes are system-wide Symbian error codes. |
|
160 */ |
|
161 virtual TInt ServiceDescriptionsL( MSenServiceDescription& aSD, |
|
162 RServiceDescriptionArray& aList) = 0; |
|
163 |
|
164 /** |
|
165 * Used by consumer applications to register new service to WSF |
|
166 * The service could not otherwise be discovered while creating |
|
167 * a service connection. ID-WSF Authentication Service is an |
|
168 * example of this kind of remote service. |
|
169 * The Basic Web Service consumer does not need to and cannot |
|
170 * register any service related data. |
|
171 * In service description, the default framework ID is "ID-WSF", |
|
172 * through which frameworks performing the actual registration |
|
173 * are looked up. For any custom framework plug-in, the framework |
|
174 * ID must be separately set. |
|
175 * For ID-WSF service descriptions it is mandatory to set both |
|
176 * contract and endpoint. |
|
177 * Calling the method performs one of the following: |
|
178 * 1. It registers a new service description |
|
179 * 2. It updates an existing service description |
|
180 * with matching contract and endpoint. |
|
181 * @param aSD a service description to be registered |
|
182 * @return status/error code. |
|
183 * Status codes: |
|
184 * KErrNone ok |
|
185 * Error codes: |
|
186 * KErrNotReady Service description couldn't be registered, |
|
187 * e.g. because end-user permission to modify |
|
188 * WSF data was not granted (a dialog prompt). |
|
189 * KErrNotFound Web Services framework couldn't find any |
|
190 * required framework plug-in used to register |
|
191 * a service description of a given type |
|
192 * (framework ID). |
|
193 * KErrSenNoContract Given service description didn't have |
|
194 * a contract specified, even if the used |
|
195 * framework needs one. For ID-WSF it is |
|
196 * mandatory to define a contract for |
|
197 * service description registration. |
|
198 * KErrSenNoEndpoint Given service description didn't have |
|
199 * a endpoint specified, even if the used |
|
200 * framework needs one. For ID-WSF it is |
|
201 * mandatory to define an endpoint for |
|
202 * service description registration. |
|
203 * KErrSenNoContractNoEndPoint Given service description didn't have |
|
204 * an endpoint and contract specified, even if the used |
|
205 * framework needs one. For ID-WSF it is |
|
206 * mandatory to define both an endpoint and contract for |
|
207 * service description registration. |
|
208 * Other error codes are system-wide Symbian error codes. |
|
209 */ |
|
210 virtual TInt RegisterServiceDescriptionL(MSenServiceDescription& aSD) = 0; |
|
211 |
|
212 /** |
|
213 * Used by consumer application to to inform the ServiceManager |
|
214 * about a service which no longer is available. The ServiceManager |
|
215 * will remove the service from its database as soon as it is no |
|
216 * longer used. |
|
217 * @param aSD a ServiceDescription to be unregistered |
|
218 * @return status/error code. |
|
219 * Status codes: |
|
220 * KErrNone ok |
|
221 * Error codes: |
|
222 * KErrBadDescriptor aSD was invalid service description and |
|
223 * couldn't be unregistered. |
|
224 * KErrNotReady Service description couldn't be registered, |
|
225 * e.g. because end-user permission to modify |
|
226 * WSF data was not granted (a dialog prompt). |
|
227 * KErrNotFound Couldn't find a matching framework to |
|
228 * register service description or couldn't |
|
229 * find a matching service description. |
|
230 * KErrSenNoContract Given service description didn't have |
|
231 * a contract specified, even if the used |
|
232 * framework needs one. |
|
233 * KErrSenNoEndpoint Given service description didn't have |
|
234 * a endpoint specified, even if the used |
|
235 * framework needs one. |
|
236 * KErrSenNoContractNoEndPoint Given service description didn't have |
|
237 * an endpoint and contract specified, even if the used |
|
238 * framework needs one. For ID-WSF it is |
|
239 * mandatory to define both an endpoint and contract for |
|
240 * service description registration. |
|
241 * Other error codes are system-wide Symbian error codes. |
|
242 */ |
|
243 virtual TInt UnregisterServiceDescriptionL( |
|
244 MSenServiceDescription& aSD) = 0; |
|
245 |
|
246 /** |
|
247 * Register an identity provider for the current active identity. |
|
248 * It is required for both Basic Web Service and ID-WSF consumers |
|
249 * that endpoint is defined in identity provider instance to make |
|
250 * this data accessible later on while creating a service connection. |
|
251 * @param aProvider an identity provider to be registered |
|
252 * @return status/error code. |
|
253 * Status codes: |
|
254 * KErrNone ok |
|
255 * Error codes: |
|
256 * KErrBadDescriptor aProvider was an invalid identity provider |
|
257 * and couldn't be registered. |
|
258 * KErrNotReady Service description couldn't be registered, |
|
259 * e.g. because end-user permission to modify |
|
260 * WSF data was not granted (a dialog prompt). |
|
261 * KErrSenProviderIdInUseByAnotherEndpoint |
|
262 * attempt to register an identity provider |
|
263 * failed, because ProviderID was already |
|
264 * reserved in the use of another endpoint. |
|
265 * |
|
266 * A possible work-around for this would be |
|
267 * to unregister such conflicting identity |
|
268 * provider using this particular ProviderID, |
|
269 * but this solution is not recommended. Instead, |
|
270 * separate providers, locating in different |
|
271 * endpoints, SHOULD always use different |
|
272 * ProviderIDs. |
|
273 * Other error codes are system-wide Symbian error codes. |
|
274 */ |
|
275 virtual TInt RegisterIdentityProviderL(CSenIdentityProvider& aProvider) = 0; |
|
276 |
|
277 /** |
|
278 * Unregister an identity provider from the current active Identity. |
|
279 * @param aProvider an identity provider to be unregistered |
|
280 * @return status/error code. |
|
281 * Status codes: |
|
282 * KErrNone ok |
|
283 * Error codes: |
|
284 * KErrBadDescriptor aProvider was an invalid identity provider |
|
285 * and couldn't be unregistered. |
|
286 * KErrNotReady Identity provider couldn't be unregistered, |
|
287 * e.g. because user didn't allow it. |
|
288 * KErrNotFound aProvider was not found and couldn't be |
|
289 * unregistered. |
|
290 * Other error codes are system-wide Symbian error codes. |
|
291 */ |
|
292 virtual TInt UnregisterIdentityProviderL( |
|
293 CSenIdentityProvider& aProvider) = 0; |
|
294 |
|
295 |
|
296 /** |
|
297 * Consumer applications use this method to associate |
|
298 * some pre-registered service to certain (registered) |
|
299 * identity provider. The association adds the service ID |
|
300 * (contract of the service that trusts this identity |
|
301 * provider) into WSF identity database. |
|
302 * In ID-WSF, consumers typically associate authentication |
|
303 * service description with some identity provider. This |
|
304 * way the ID-WSF framework can find the identity provider |
|
305 * by using the contract of the service as a search pattern |
|
306 * (for e.g. liberty AS contract). |
|
307 * @param aURI either the contract or the endpoint |
|
308 * identifying some service |
|
309 * @param aProviderID the ID of an identity provider |
|
310 * @return status/error code. |
|
311 * Status codes: |
|
312 * KErrNone ok |
|
313 * Error codes: |
|
314 * KErrArgument Either or both of the parameters were |
|
315 * zero-length or invalid descriptors |
|
316 * KErrNotReady Identity provider couldn't be unregistered, |
|
317 * e.g. because user didn't allow it. |
|
318 * KErrNotFound Web Services framework couldn't find |
|
319 * the identity provider by given provider ID. |
|
320 */ |
|
321 virtual TInt AssociateServiceL( const TDesC8& aURI, |
|
322 const TDesC8& aProviderID) = 0; |
|
323 |
|
324 /** |
|
325 * Dissociate a service from an identity provider. |
|
326 * @param aServiceID the contract or endpoint of a service |
|
327 * @param aProviderID the id of an identity provider |
|
328 * @return status/error code. |
|
329 * Status codes: |
|
330 * KErrNone ok |
|
331 * Error codes: |
|
332 * KErrArgument Either or both of the parameters were |
|
333 * zero-length or invalid descriptors |
|
334 * KErrNotReady Service couldn't be dissociated, |
|
335 * e.g. because user didn't allow it. |
|
336 * KErrNotFound Web Services framework couldn't find |
|
337 * the identity provider by given |
|
338 * provider ID. |
|
339 */ |
|
340 virtual TInt DissociateServiceL(const TDesC8& aServiceID, |
|
341 const TDesC8& aProviderID) = 0; |
|
342 |
|
343 /** |
|
344 * Consumer applications use this method for finding Credentials. |
|
345 * IdentityProvider or Username and Password are given either via |
|
346 * IdentityProviderL() callback or UsernameL() and Password() |
|
347 * callbacks from MSenAuthenticationProvider (which can be given |
|
348 * through specialized NewL or NewLC methods). |
|
349 * |
|
350 * @param aEndpoint the endpoint which identifies the Credential |
|
351 * @param aCredentials an array with 0 or more Credentials. |
|
352 * The ownership of the array (and Credentials) |
|
353 * is passed to the caller so before the array |
|
354 * goes out of scope in the client, the caller |
|
355 * must call RPointerArray::ResetAndDestroy() |
|
356 * on the array to close the array and delete |
|
357 * @param aCredentialProperties an array with 0 or more |
|
358 * CredentialsProperties. |
|
359 * The ownership of the array (and |
|
360 * CredentialProperties) is passed to the caller |
|
361 * so before the array goes out of scope in the |
|
362 * client, the caller must call |
|
363 * RPointerArray::ResetAndDestroy() |
|
364 * on the array to close the array and delete |
|
365 * all the CredentialProperties in the array. |
|
366 * Note: aCredentials array and |
|
367 * aCredentialProperties array are in |
|
368 * sync. If Credential has properties, |
|
369 * properties are placed in same |
|
370 * position in aCredentialProperties array |
|
371 * as raleted Credential in aCredentials |
|
372 * array. |
|
373 * Note: If Credential has no properties, |
|
374 * there is NULL in related position |
|
375 * in aCredentialProperties array. |
|
376 * all the Credentials in the array. |
|
377 * Status codes: |
|
378 * KErrNone ok |
|
379 * |
|
380 * Error codes: |
|
381 * KErrNotFound Web Services framework couldn't find |
|
382 * the Credentials using given Endpoint. |
|
383 * KErrSenNoPermission Given IdentityProvider or Username and |
|
384 * Password did not match for IdentityProvider |
|
385 * which is related to found Credential(s). |
|
386 * Other error codes are system-wide Symbian error codes. |
|
387 */ |
|
388 virtual TInt CredentialsL(const TDesC8& aEndpoint, |
|
389 RCredentialArray& aCredentials, |
|
390 RCredentialPropertiesArray& aCredentialProperties) = 0; |
|
391 |
|
392 /** |
|
393 * Consumer applications use this method for finding Credentials. |
|
394 * |
|
395 * @param aEndpoint the endpoint which identifies the Credential |
|
396 * @param aIdP the IdentityProvider which should match |
|
397 * for IdentityProvider which is related to |
|
398 * found Credential(s). |
|
399 * @param aCredentials an array with 0 or more Credentials. |
|
400 * The ownership of the array (and Credentials) |
|
401 * is passed to the caller so before the array |
|
402 * goes out of scope in the client, the caller |
|
403 * must call RPointerArray::ResetAndDestroy() |
|
404 * on the array to close the array and delete |
|
405 * all the Credentials in the array. |
|
406 * @param aCredentialProperties an array with 0 or more |
|
407 * CredentialsProperties. |
|
408 * The ownership of the array (and |
|
409 * CredentialProperties) is passed to the caller |
|
410 * so before the array goes out of scope in the |
|
411 * client, the caller must call |
|
412 * RPointerArray::ResetAndDestroy() |
|
413 * on the array to close the array and delete |
|
414 * all the CredentialProperties in the array. |
|
415 * Note: aCredentials array and |
|
416 * aCredentialProperties array are in |
|
417 * sync. If Credential has properties, |
|
418 * properties are placed in same |
|
419 * position in aCredentialProperties array |
|
420 * as raleted Credential in aCredentials |
|
421 * array. |
|
422 * Note: If Credential has no properties, |
|
423 * there is NULL in related position |
|
424 * in aCredentialProperties array. |
|
425 * Status codes: |
|
426 * KErrNone ok |
|
427 * |
|
428 * Error codes: |
|
429 * KErrNotFound Web Services framework couldn't find |
|
430 * the Credentials using given Endpoint. |
|
431 * KErrSenNoPermission Given IdentityProvider did not match for |
|
432 * IdentityProvider which is related to |
|
433 * found Credential. |
|
434 * Other error codes are system-wide Symbian error codes. |
|
435 */ |
|
436 virtual TInt CredentialsL(const TDesC8& aEndpoint, |
|
437 const CSenIdentityProvider& aIdP, |
|
438 RCredentialArray& aCredentials, |
|
439 RCredentialPropertiesArray& aCredentialProperties) = 0; |
|
440 |
|
441 /** |
|
442 * Consumer applications use this method for finding Credentials. |
|
443 * |
|
444 * @param aEndpoint the endpoint which identifies the Credential |
|
445 * @param aUserName the username which should match for |
|
446 * username in IdentityProvider which is related |
|
447 * to found Credential(s). |
|
448 * @param aPassword the password which should match for |
|
449 * password in IdentityProvider which is related |
|
450 * to found Credential(s). |
|
451 * @param aCredentials an array with 0 or more Credentials. |
|
452 * The ownership of the array (and Credentials) |
|
453 * is passed to the caller so before the array |
|
454 * goes out of scope in the client, the caller |
|
455 * must call RPointerArray::ResetAndDestroy() |
|
456 * on the array to close the array and delete |
|
457 * all the Credentials in the array. |
|
458 * @param aCredentialProperties an array with 0 or more |
|
459 * CredentialsProperties. |
|
460 * The ownership of the array (and |
|
461 * CredentialProperties) is passed to the caller |
|
462 * so before the array goes out of scope in the |
|
463 * client, the caller must call |
|
464 * RPointerArray::ResetAndDestroy() |
|
465 * on the array to close the array and delete |
|
466 * all the CredentialProperties in the array. |
|
467 * Note: aCredentials array and |
|
468 * aCredentialProperties array are in |
|
469 * sync. If Credential has properties, |
|
470 * properties are placed in same |
|
471 * position in aCredentialProperties array |
|
472 * as raleted Credential in aCredentials |
|
473 * array. |
|
474 * Note: If Credential has no properties, |
|
475 * there is NULL in related position |
|
476 * in aCredentialProperties array. |
|
477 * Status codes: |
|
478 * KErrNone ok |
|
479 * |
|
480 * Error codes: |
|
481 * KErrNotFound Web Services framework couldn't find |
|
482 * the Credentials using given Endpoint. |
|
483 * KErrSenNoPermission Given IdentityProvider did not match for |
|
484 * IdentityProvider which is related to |
|
485 * found Credential. |
|
486 * Other error codes are system-wide Symbian error codes. |
|
487 */ |
|
488 virtual TInt CredentialsL(const TDesC8& aEndpoint, |
|
489 const TDesC8& aUserName, |
|
490 const TDesC8& aPassword, |
|
491 RCredentialArray& aCredentials, |
|
492 RCredentialPropertiesArray& aCredentialProperties) = 0; |
|
493 |
|
494 /** |
|
495 * Consumer applications use this method for finding Credentials. |
|
496 * IdentityProvider or Username and Password are given either via |
|
497 * IdentityProviderL() callback or UsernameL() and Password() |
|
498 * callbacks from MSenAuthenticationProvider (which can be given |
|
499 * through specialized NewL or NewLC methods). |
|
500 * |
|
501 * @param aPattern the pattern which identifies the Credential |
|
502 * Note: Pattern which was used to add Credential |
|
503 * has to be used for finding Credential. |
|
504 * Note: Used Framework should specify what |
|
505 * kind of pattern should be used |
|
506 * for storing framework specific |
|
507 * Credentials. |
|
508 * @param aCredentials an array with 0 or more Credentials. |
|
509 * The ownership of the array (and Credentials) |
|
510 * is passed to the caller so before the array |
|
511 * goes out of scope in the client, the caller |
|
512 * must call RPointerArray::ResetAndDestroy() |
|
513 * on the array to close the array and delete |
|
514 * all the Credentials in the array. |
|
515 * @param aCredentialProperties an array with 0 or more |
|
516 * CredentialsProperties. |
|
517 * The ownership of the array (and |
|
518 * CredentialProperties) is passed to the caller |
|
519 * so before the array goes out of scope in the |
|
520 * client, the caller must call |
|
521 * RPointerArray::ResetAndDestroy() |
|
522 * on the array to close the array and delete |
|
523 * all the CredentialProperties in the array. |
|
524 * Note: aCredentials array and |
|
525 * aCredentialProperties array are in |
|
526 * sync. If Credential has properties, |
|
527 * properties are placed in same |
|
528 * position in aCredentialProperties array |
|
529 * as raleted Credential in aCredentials |
|
530 * array. |
|
531 * Note: If Credential has no properties, |
|
532 * there is NULL in related position |
|
533 * in aCredentialProperties array. |
|
534 * Status codes: |
|
535 * KErrNone ok |
|
536 * |
|
537 * Error codes: |
|
538 * KErrNotFound Web Services framework couldn't find |
|
539 * the Credentials using given Endpoint. |
|
540 * KErrSenNoPermission Given IdentityProvider or Username and |
|
541 * Password did not match for IdentityProvider |
|
542 * which is related to found Credential(s). |
|
543 * Other error codes are system-wide Symbian error codes. |
|
544 */ |
|
545 virtual TInt CredentialsL(const MSenServiceDescription& aPattern, |
|
546 RCredentialArray& aCredentials, |
|
547 RCredentialPropertiesArray& aCredentialProperties) = 0; |
|
548 |
|
549 /** |
|
550 * Consumer applications use this method for finding Credentials. |
|
551 * |
|
552 * @param aPattern the pattern which identifies the Credential |
|
553 * Note: Pattern which was used to add Credential |
|
554 * has to be used for finding Credential. |
|
555 * Note: Used Framework should specify what |
|
556 * kind of pattern should be used |
|
557 * for storing framework specific |
|
558 * Credentials. |
|
559 * @param aIdP the IdentityProvider which should match |
|
560 * for IdentityProvider which is related to |
|
561 * found Credential(s). |
|
562 * @param aCredentials an array with 0 or more Credentials. |
|
563 * The ownership of the array (and Credentials) |
|
564 * is passed to the caller so before the array |
|
565 * goes out of scope in the client, the caller |
|
566 * must call RPointerArray::ResetAndDestroy() |
|
567 * on the array to close the array and delete |
|
568 * all the Credentials in the array. |
|
569 * @param aCredentialProperties an array with 0 or more |
|
570 * CredentialsProperties. |
|
571 * The ownership of the array (and |
|
572 * CredentialProperties) is passed to the caller |
|
573 * so before the array goes out of scope in the |
|
574 * client, the caller must call |
|
575 * RPointerArray::ResetAndDestroy() |
|
576 * on the array to close the array and delete |
|
577 * all the CredentialProperties in the array. |
|
578 * Note: aCredentials array and |
|
579 * aCredentialProperties array are in |
|
580 * sync. If Credential has properties, |
|
581 * properties are placed in same |
|
582 * position in aCredentialProperties array |
|
583 * as raleted Credential in aCredentials |
|
584 * array. |
|
585 * Note: If Credential has no properties, |
|
586 * there is NULL in related position |
|
587 * in aCredentialProperties array. |
|
588 * Status codes: |
|
589 * KErrNone ok |
|
590 * |
|
591 * Error codes: |
|
592 * KErrNotFound Web Services framework couldn't find |
|
593 * the Credentials using given Endpoint. |
|
594 * KErrSenNoPermission Given IdentityProvider did not match for |
|
595 * IdentityProvider which is related to |
|
596 * found Credential. |
|
597 * Other error codes are system-wide Symbian error codes. |
|
598 */ |
|
599 virtual TInt CredentialsL(const MSenServiceDescription& aPattern, |
|
600 const CSenIdentityProvider& aIdP, |
|
601 RCredentialArray& aCredentials, |
|
602 RCredentialPropertiesArray& aCredentialProperties) = 0; |
|
603 |
|
604 /** |
|
605 * Consumer applications use this method for finding Credentials. |
|
606 * |
|
607 * @param aPattern the pattern which identifies the Credential |
|
608 * Note: Pattern which was used to add Credential |
|
609 * has to be used for finding Credential. |
|
610 * Note: Used Framework should specify what |
|
611 * kind of pattern should be used |
|
612 * for storing framework specific |
|
613 * Credentials. |
|
614 * @param aUserName the username which should match for |
|
615 * username in IdentityProvider which is related |
|
616 * to found Credential(s). |
|
617 * @param aPassword the password which should match for |
|
618 * password in IdentityProvider which is related |
|
619 * to found Credential(s). |
|
620 * @param aCredentials an array with 0 or more Credentials. |
|
621 * The ownership of the array (and Credentials) |
|
622 * is passed to the caller so before the array |
|
623 * goes out of scope in the client, the caller |
|
624 * must call RPointerArray::ResetAndDestroy() |
|
625 * on the array to close the array and delete |
|
626 * all the Credentials in the array. |
|
627 * @param aCredentialProperties an array with 0 or more |
|
628 * CredentialsProperties. |
|
629 * The ownership of the array (and |
|
630 * CredentialProperties) is passed to the caller |
|
631 * so before the array goes out of scope in the |
|
632 * client, the caller must call |
|
633 * RPointerArray::ResetAndDestroy() |
|
634 * on the array to close the array and delete |
|
635 * all the CredentialProperties in the array. |
|
636 * Note: aCredentials array and |
|
637 * aCredentialProperties array are in |
|
638 * sync. If Credential has properties, |
|
639 * properties are placed in same |
|
640 * position in aCredentialProperties array |
|
641 * as raleted Credential in aCredentials |
|
642 * array. |
|
643 * Note: If Credential has no properties, |
|
644 * there is NULL in related position |
|
645 * in aCredentialProperties array. |
|
646 * |
|
647 * Status codes: |
|
648 * KErrNone ok |
|
649 * |
|
650 * Error codes: |
|
651 * KErrNotFound Web Services framework couldn't find |
|
652 * the Credentials using given Endpoint. |
|
653 * KErrSenNoPermission Given IdentityProvider did not match for |
|
654 * IdentityProvider which is related to |
|
655 * found Credential. |
|
656 * Other error codes are system-wide Symbian error codes. |
|
657 */ |
|
658 virtual TInt CredentialsL(const MSenServiceDescription& aPattern, |
|
659 const TDesC8& aUserName, |
|
660 const TDesC8& aPassword, |
|
661 RCredentialArray& aCredentials, |
|
662 RCredentialPropertiesArray& aCredentialProperties) = 0; |
|
663 /** |
|
664 * Consumer applications use this method for adding Credential. |
|
665 * |
|
666 * @param aEndpoint the endpoint which identifies the Credential |
|
667 * @param aIdP the IdentityProvider which will be related |
|
668 * to added Credential. |
|
669 * @param aCredential the Credential which will be added. |
|
670 * Status codes: |
|
671 * KErrNone ok |
|
672 * |
|
673 * Error codes: |
|
674 * KErrBadDescriptor One of the parameters was invalid. |
|
675 * KErrNotFound Given IdentityProvider was not found |
|
676 * and because of that Credential could |
|
677 * not be added. (Fix: Register IdentityProvider |
|
678 * first and try to add Credential after that.) |
|
679 * |
|
680 * Other error codes are system-wide Symbian error codes. |
|
681 */ |
|
682 virtual TInt AddCredentialL(const TDesC8& aEndpoint, |
|
683 const CSenIdentityProvider& aIdP, |
|
684 const CSenCredential2& aCredential) = 0; |
|
685 |
|
686 /** |
|
687 * Consumer applications use this method for adding Credential. |
|
688 * |
|
689 * @param aPattern the pattern which identifies the Credential |
|
690 * Note: Exactly the same pattern has to be |
|
691 * used for finding Credential. |
|
692 * Note: Used Framework should specify what |
|
693 * kind of pattern should be used |
|
694 * for handling framework specific |
|
695 * Credentials. |
|
696 * @param aIdP the IdentityProvider which will be related |
|
697 * to added Credential. |
|
698 * @param aCredential the Credential which will be added. |
|
699 * |
|
700 * Status codes: |
|
701 * KErrNone ok |
|
702 * |
|
703 * Error codes: |
|
704 * KErrBadDescriptor One of the parameters was invalid. |
|
705 * KErrNotFound Given IdentityProvider was not found |
|
706 * and because of that Credential could |
|
707 * not be added. (Fix: Register IdentityProvider |
|
708 * first and try to add Credential after that) |
|
709 * |
|
710 * Other error codes are system-wide Symbian error codes. |
|
711 */ |
|
712 virtual TInt AddCredentialL(const MSenServiceDescription& aPattern, |
|
713 const CSenIdentityProvider& aIdP, |
|
714 const CSenCredential2& aCredential) = 0; |
|
715 |
|
716 /** |
|
717 * Consumer applications use this method for adding Credential. |
|
718 * |
|
719 * @param aEndpoint the endpoint which identifies the |
|
720 * Credential |
|
721 * @param aIdP the IdentityProvider which will be |
|
722 * related to added Credential. |
|
723 * @param aCredential the Credential which will be added. |
|
724 * @param aCredentialProperties the properties for Credential |
|
725 * Status codes: |
|
726 * KErrNone ok |
|
727 * |
|
728 * Error codes: |
|
729 * KErrBadDescriptor One of the parameters was invalid. |
|
730 * KErrNotFound Given IdentityProvider was not found |
|
731 * and because of that Credential could |
|
732 * not be added. (Fix: Register IdentityProvider |
|
733 * first and try to add Credential after that.) |
|
734 * |
|
735 * Other error codes are system-wide Symbian error codes. |
|
736 */ |
|
737 virtual TInt AddCredentialL(const TDesC8& aEndpoint, |
|
738 const CSenIdentityProvider& aIdP, |
|
739 const CSenCredential2& aCredential, |
|
740 const CSenXmlProperties& aCredentialProperties) = 0; |
|
741 |
|
742 /** |
|
743 * Consumer applications use this method for adding Credential. |
|
744 * |
|
745 * @param aPattern the pattern which identifies the |
|
746 * Credential |
|
747 * Note: Exactly the same pattern has |
|
748 * to be used for finding |
|
749 * Credential. |
|
750 * Note: Used Framework should specify |
|
751 * what kind of pattern should be |
|
752 * used for handling framework |
|
753 * specific Credentials. |
|
754 * @param aIdP the IdentityProvider which will be |
|
755 * related to added Credential. |
|
756 * @param aCredential the Credential which will be added. |
|
757 * @param aCredentialProperties the properties for Credential |
|
758 * |
|
759 * Status codes: |
|
760 * KErrNone ok |
|
761 * |
|
762 * Error codes: |
|
763 * KErrBadDescriptor One of the parameters was invalid. |
|
764 * KErrNotFound Given IdentityProvider was not found |
|
765 * and because of that Credential could |
|
766 * not be added. (Fix: Register IdentityProvider |
|
767 * first and try to add Credential after that) |
|
768 * |
|
769 * Other error codes are system-wide Symbian error codes. |
|
770 */ |
|
771 virtual TInt AddCredentialL(const MSenServiceDescription& aPattern, |
|
772 const CSenIdentityProvider& aIdP, |
|
773 const CSenCredential2& aCredential, |
|
774 const CSenXmlProperties& aCredentialProperties) = 0; |
|
775 |
|
776 /** |
|
777 * Consumer applications use this method for removing Credentials. |
|
778 * |
|
779 * @param aPattern the pattern which identifies the Credential |
|
780 * Note: Pattern which was used to add Credential |
|
781 * has to be used for removing Credential. |
|
782 * Note: Used Framework should specify what |
|
783 * kind of pattern should be used |
|
784 * for handling framework specific |
|
785 * Credentials. |
|
786 * @param aIdP the IdentityProvider which should match |
|
787 * for IdentityProvider which is related to |
|
788 * found Credential(s). |
|
789 * Status codes: |
|
790 * KErrNone ok |
|
791 * |
|
792 * Error codes: |
|
793 * KErrNotFound Web Services framework couldn't find |
|
794 * the Credentials using given Pattern. |
|
795 * KErrSenNoPermission Given IdentityProvider did not match for |
|
796 * IdentityProvider which is related to |
|
797 * found Credential(s). |
|
798 * Other error codes are system-wide Symbian error codes. |
|
799 */ |
|
800 virtual TInt RemoveCredentialsL(const MSenServiceDescription& aPattern, |
|
801 const CSenIdentityProvider& aIdP) = 0; |
|
802 |
|
803 /** |
|
804 * Consumer applications use this method for removing Credentials. |
|
805 * |
|
806 * @param aIdP the IdentityProvider which should match |
|
807 * for IdentityProvider which is related to |
|
808 * found Credential(s). |
|
809 * Status codes: |
|
810 * KErrNone ok |
|
811 * |
|
812 * Error codes: |
|
813 * KErrNotFound Web Services framework couldn't find |
|
814 * the Credentials using given Pattern. |
|
815 * KErrSenNoPermission Given IdentityProvider did not match for |
|
816 * IdentityProvider which is related to |
|
817 * found Credential(s). |
|
818 * Other error codes are system-wide Symbian error codes. |
|
819 */ |
|
820 virtual TInt RemoveCredentialsL(const CSenIdentityProvider& aIdP) = 0; |
|
821 |
|
822 /** |
|
823 * Consumer applications use this method for removing Credentials. |
|
824 * |
|
825 * @param aPattern the pattern which identifies the Credential |
|
826 * Note: Pattern which was used to add Credential |
|
827 * has to be used for finding Credential. |
|
828 * Note: Used Framework should specify what |
|
829 * kind of pattern should be used |
|
830 * for handling framework specific |
|
831 * Credentials. |
|
832 * @param aUserName the username which should match for |
|
833 * username in IdentityProvider which is related |
|
834 * to found Credential(s). |
|
835 * @param aPassword the password which should match for |
|
836 * password in IdentityProvider which is related |
|
837 * to found Credential(s). |
|
838 * Status codes: |
|
839 * KErrNone ok |
|
840 * |
|
841 * Error codes: |
|
842 * KErrNotFound Web Services framework couldn't find |
|
843 * the Credentials using given Pattern. |
|
844 * KErrSenNoPermission Given Username and Password did not match for |
|
845 * IdentityProvider which is related to |
|
846 * found Credential(s). |
|
847 * Other error codes are system-wide Symbian error codes. |
|
848 */ |
|
849 virtual TInt RemoveCredentialsL(const MSenServiceDescription& aPattern, |
|
850 const TDesC8& aUserName, |
|
851 const TDesC8& aPassword) = 0; |
|
852 |
|
853 |
|
854 /** |
|
855 * This method provides an interface which is identified by unique ID (UID). |
|
856 * @param aUID is the UID of the interface being requested |
|
857 * @return TAny* pointer to the interface, or if no interface to |
|
858 * given UID exists, function returns NULL. In typical cases, returned |
|
859 * pointer should be cast to some preknown M-class pointer (the actual |
|
860 * new interface). |
|
861 * |
|
862 * Currently, there is only one supported interface: |
|
863 * KSenInterfaceUidInternalServiceManager => MSenInternalServiceManager |
|
864 */ |
|
865 virtual TAny* InterfaceByUid( TUid aUID ) = 0; |
|
866 |
|
867 protected: |
|
868 |
|
869 /** |
|
870 * C++ default constructor |
|
871 */ |
|
872 CSenServiceManager(); |
|
873 }; |
|
874 |
|
875 #endif //SEN_SERVICE_MANAGER_H |
|
876 |
|
877 // End of File |
|
878 |