2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: CSenServiceManager class offers API for
15 * accessing and managing WebServicesFramework
16 * (WSF) service and identity related data.
27 #ifndef SEN_SERVICE_MANAGER_H
28 #define SEN_SERVICE_MANAGER_H
31 #include <e32base.h> // for CActive
32 #include <e32std.h> // for RPointerArray
35 #include <MSenServiceConsumer.h>
36 #include <MSenServiceDescription.h>
37 #include <SenCredential2.h>
38 #include <SenXmlProperties.h>
39 #include "MSenAuthenticationProvider.h"
41 // FORWARD DECLARATIONS
42 class CSenXmlServiceDescription;
43 class CSenIdentityProvider;
46 typedef RPointerArray<CSenXmlServiceDescription> RServiceDescriptionArray;
47 typedef RPointerArray<CSenCredential2> RCredentialArray;
48 typedef RPointerArray<CSenXmlProperties> RCredentialPropertiesArray;
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.
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.
85 class CSenServiceManager : public CActive
87 public: // Constructors and destructor
90 * Two-phased constructor.
92 IMPORT_C static CSenServiceManager* NewL();
95 * Two-phased constructor.
97 IMPORT_C static CSenServiceManager* NewLC();
100 * Two-phased constructor.
102 IMPORT_C static CSenServiceManager* NewL(MSenAuthenticationProvider& aAuthProvider);
105 * Two-phased constructor.
107 IMPORT_C static CSenServiceManager* NewLC(MSenAuthenticationProvider& aAuthProvider);
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
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
127 * @return status/error code.
131 * KErrNotFound No matching service description was found.
132 * Other error codes are system-wide Symbian error codes.
134 virtual TInt ServiceDescriptionsL( const TDesC8& aURI,
135 RServiceDescriptionArray& aList) = 0;
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
154 * @return status/error code.
158 * KErrNotFound No matching service descriptions found.
159 * Other error codes are system-wide Symbian error codes.
161 virtual TInt ServiceDescriptionsL( MSenServiceDescription& aSD,
162 RServiceDescriptionArray& aList) = 0;
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.
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
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.
210 virtual TInt RegisterServiceDescriptionL(MSenServiceDescription& aSD) = 0;
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
217 * @param aSD a ServiceDescription to be unregistered
218 * @return status/error code.
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.
243 virtual TInt UnregisterServiceDescriptionL(
244 MSenServiceDescription& aSD) = 0;
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.
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.
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
273 * Other error codes are system-wide Symbian error codes.
275 virtual TInt RegisterIdentityProviderL(CSenIdentityProvider& aProvider) = 0;
278 * Unregister an identity provider from the current active Identity.
279 * @param aProvider an identity provider to be unregistered
280 * @return status/error code.
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
290 * Other error codes are system-wide Symbian error codes.
292 virtual TInt UnregisterIdentityProviderL(
293 CSenIdentityProvider& aProvider) = 0;
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.
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.
321 virtual TInt AssociateServiceL( const TDesC8& aURI,
322 const TDesC8& aProviderID) = 0;
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.
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
340 virtual TInt DissociateServiceL(const TDesC8& aServiceID,
341 const TDesC8& aProviderID) = 0;
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).
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
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.
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.
388 virtual TInt CredentialsL(const TDesC8& aEndpoint,
389 RCredentialArray& aCredentials,
390 RCredentialPropertiesArray& aCredentialProperties) = 0;
393 * Consumer applications use this method for finding Credentials.
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
422 * Note: If Credential has no properties,
423 * there is NULL in related position
424 * in aCredentialProperties array.
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
434 * Other error codes are system-wide Symbian error codes.
436 virtual TInt CredentialsL(const TDesC8& aEndpoint,
437 const CSenIdentityProvider& aIdP,
438 RCredentialArray& aCredentials,
439 RCredentialPropertiesArray& aCredentialProperties) = 0;
442 * Consumer applications use this method for finding Credentials.
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
474 * Note: If Credential has no properties,
475 * there is NULL in related position
476 * in aCredentialProperties array.
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
486 * Other error codes are system-wide Symbian error codes.
488 virtual TInt CredentialsL(const TDesC8& aEndpoint,
489 const TDesC8& aUserName,
490 const TDesC8& aPassword,
491 RCredentialArray& aCredentials,
492 RCredentialPropertiesArray& aCredentialProperties) = 0;
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).
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
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
531 * Note: If Credential has no properties,
532 * there is NULL in related position
533 * in aCredentialProperties array.
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.
545 virtual TInt CredentialsL(const MSenServiceDescription& aPattern,
546 RCredentialArray& aCredentials,
547 RCredentialPropertiesArray& aCredentialProperties) = 0;
550 * Consumer applications use this method for finding Credentials.
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
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
585 * Note: If Credential has no properties,
586 * there is NULL in related position
587 * in aCredentialProperties array.
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
597 * Other error codes are system-wide Symbian error codes.
599 virtual TInt CredentialsL(const MSenServiceDescription& aPattern,
600 const CSenIdentityProvider& aIdP,
601 RCredentialArray& aCredentials,
602 RCredentialPropertiesArray& aCredentialProperties) = 0;
605 * Consumer applications use this method for finding Credentials.
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
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
643 * Note: If Credential has no properties,
644 * there is NULL in related position
645 * in aCredentialProperties array.
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
656 * Other error codes are system-wide Symbian error codes.
658 virtual TInt CredentialsL(const MSenServiceDescription& aPattern,
659 const TDesC8& aUserName,
660 const TDesC8& aPassword,
661 RCredentialArray& aCredentials,
662 RCredentialPropertiesArray& aCredentialProperties) = 0;
664 * Consumer applications use this method for adding Credential.
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.
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.)
680 * Other error codes are system-wide Symbian error codes.
682 virtual TInt AddCredentialL(const TDesC8& aEndpoint,
683 const CSenIdentityProvider& aIdP,
684 const CSenCredential2& aCredential) = 0;
687 * Consumer applications use this method for adding Credential.
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
696 * @param aIdP the IdentityProvider which will be related
697 * to added Credential.
698 * @param aCredential the Credential which will be added.
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)
710 * Other error codes are system-wide Symbian error codes.
712 virtual TInt AddCredentialL(const MSenServiceDescription& aPattern,
713 const CSenIdentityProvider& aIdP,
714 const CSenCredential2& aCredential) = 0;
717 * Consumer applications use this method for adding Credential.
719 * @param aEndpoint the endpoint which identifies the
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
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.)
735 * Other error codes are system-wide Symbian error codes.
737 virtual TInt AddCredentialL(const TDesC8& aEndpoint,
738 const CSenIdentityProvider& aIdP,
739 const CSenCredential2& aCredential,
740 const CSenXmlProperties& aCredentialProperties) = 0;
743 * Consumer applications use this method for adding Credential.
745 * @param aPattern the pattern which identifies the
747 * Note: Exactly the same pattern has
748 * to be used for finding
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
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)
769 * Other error codes are system-wide Symbian error codes.
771 virtual TInt AddCredentialL(const MSenServiceDescription& aPattern,
772 const CSenIdentityProvider& aIdP,
773 const CSenCredential2& aCredential,
774 const CSenXmlProperties& aCredentialProperties) = 0;
777 * Consumer applications use this method for removing Credentials.
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
786 * @param aIdP the IdentityProvider which should match
787 * for IdentityProvider which is related to
788 * found Credential(s).
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.
800 virtual TInt RemoveCredentialsL(const MSenServiceDescription& aPattern,
801 const CSenIdentityProvider& aIdP) = 0;
804 * Consumer applications use this method for removing Credentials.
806 * @param aIdP the IdentityProvider which should match
807 * for IdentityProvider which is related to
808 * found Credential(s).
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.
820 virtual TInt RemoveCredentialsL(const CSenIdentityProvider& aIdP) = 0;
823 * Consumer applications use this method for removing Credentials.
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
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).
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.
849 virtual TInt RemoveCredentialsL(const MSenServiceDescription& aPattern,
850 const TDesC8& aUserName,
851 const TDesC8& aPassword) = 0;
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
862 * Currently, there is only one supported interface:
863 * KSenInterfaceUidInternalServiceManager => MSenInternalServiceManager
865 virtual TAny* InterfaceByUid( TUid aUID ) = 0;
870 * C++ default constructor
872 CSenServiceManager();
875 #endif //SEN_SERVICE_MANAGER_H