williamr@2: /* williamr@2: * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: CSenServiceManager class offers API for williamr@2: * accessing and managing WebServicesFramework williamr@2: * (WSF) service and identity related data. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: #ifndef SEN_SERVICE_MANAGER_H williamr@2: #define SEN_SERVICE_MANAGER_H williamr@2: williamr@2: // INCLUDES williamr@2: #include // for CActive williamr@2: #include // for RPointerArray williamr@2: #include williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include "MSenAuthenticationProvider.h" williamr@2: williamr@2: // FORWARD DECLARATIONS williamr@2: class CSenXmlServiceDescription; williamr@2: class CSenIdentityProvider; williamr@2: williamr@2: // DATA TYPES williamr@2: typedef RPointerArray RServiceDescriptionArray; williamr@2: typedef RPointerArray RCredentialArray; williamr@2: typedef RPointerArray RCredentialPropertiesArray; williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * CSenServiceManager class offers API for accessing and managing williamr@2: * WebServicesFramework (WSF) service and identity related data. williamr@2: * The class is designed using abstract factory pattern: williamr@2: * it only offers a instance (pointer) to the actual implementation williamr@2: * class meeting this interface. williamr@2: * Typically, service consumers use of CSenServiceManager to register service williamr@2: * or identity based data, which is required for accessing some invocable, williamr@2: * possibly remote service. williamr@2: * The class is meant for both default frameworks offered by WSF williamr@2: * and for any custom plug-in service invocation framework implementation. williamr@2: * The default frameworks are: williamr@2: * 1) Identity Based Web Services Framework (ID-WSF). williamr@2: * 2) Basic Web Services Framework. williamr@2: * For Basic Web Service consumer, the only applicable operations are williamr@2: * Identity data managing methods. These can be used to make connection williamr@2: * specific Basic Authentication (BASIC-AUTH) credentials available without williamr@2: * later end-user interaction. Otherwise required authentication info williamr@2: * will be requested via notifier dialog prompts. williamr@2: * ID-WSF consumer has to use the CSenServiceManager methods to register williamr@2: * authentication service description and identity provider (which are williamr@2: * the same service in ID-WSF) and finally associate some actual service williamr@2: * (contract to a WSP) to this IDP. williamr@2: * williamr@2: * The current client-server framework implementation of CSenServiceManager williamr@2: * is synchronous, although class inherits CActive for future extensions. williamr@2: * So, the class instance will not be an active object handled williamr@2: * by ActiveScheduler, and it does not have implementation williamr@2: * in RunL() or DoCancel() methods. williamr@2: * williamr@2: * @lib SenServMgr.lib williamr@2: * @since Series60 3.0 williamr@2: */ williamr@2: class CSenServiceManager : public CActive williamr@2: { williamr@2: public: // Constructors and destructor williamr@2: williamr@2: /** williamr@2: * Two-phased constructor. williamr@2: */ williamr@2: IMPORT_C static CSenServiceManager* NewL(); williamr@2: williamr@2: /** williamr@2: * Two-phased constructor. williamr@2: */ williamr@2: IMPORT_C static CSenServiceManager* NewLC(); williamr@2: williamr@2: /** williamr@2: * Two-phased constructor. williamr@2: */ williamr@2: IMPORT_C static CSenServiceManager* NewL(MSenAuthenticationProvider& aAuthProvider); williamr@2: williamr@2: /** williamr@2: * Two-phased constructor. williamr@2: */ williamr@2: IMPORT_C static CSenServiceManager* NewLC(MSenAuthenticationProvider& aAuthProvider); williamr@2: williamr@2: // New functions williamr@2: williamr@2: /** williamr@2: * Consumers use this to find services with matching URI williamr@2: * (contract or endpoint) of the service. ID-WSF consumers williamr@2: * typically use the service type (contract) they are williamr@2: * interested on. williamr@2: * Contract is typically some URN and most endpoints are URLs. williamr@2: * The Basic Web Service descriptions are not written into WSF williamr@2: * database, so they cannot be searched using this method. williamr@2: * @param aUri specifies the search string (contract or endpoint) williamr@2: * which will be used to find matching service descriptions. williamr@2: * @param aList an array with 0 or more service descriptions which williamr@2: * are already registered to WSF. williamr@2: * The ownership of the array is passed to the caller so before williamr@2: * the array goes out of scope in the client, the caller must williamr@2: * call RPointerArray::ResetAndDestroy() on the array to free any williamr@2: * entries. williamr@2: * @return status/error code. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * Error codes: williamr@2: * KErrNotFound No matching service description was found. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt ServiceDescriptionsL( const TDesC8& aURI, williamr@2: RServiceDescriptionArray& aList) = 0; williamr@2: williamr@2: /** williamr@2: * Consumers use this to find services with matching williamr@2: * service description. The service description may williamr@2: * include specific contract or endpoint of the service williamr@2: * as a searching criteria. williamr@2: * Contract is typically some URN and most endpoints are URLs. williamr@2: * The Basic Web Service descriptions are not written into WSF williamr@2: * database, so they cannot be searched using this method. williamr@2: * @param aSD a service description specifying search pattern williamr@2: * (which includes contract, URI or both) used to find williamr@2: * matching service descriptions. williamr@2: * @param aList an array with 0 or more ServiceDescriptions which williamr@2: * are already registered to WSF. williamr@2: * The ownership of the array is passed to the caller so before williamr@2: * the array goes out of scope in the client, the caller must williamr@2: * call RPointerArray::ResetAndDestroy() on the array to free any williamr@2: * entries. williamr@2: * @return status/error code. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * Error codes: williamr@2: * KErrNotFound No matching service descriptions found. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt ServiceDescriptionsL( MSenServiceDescription& aSD, williamr@2: RServiceDescriptionArray& aList) = 0; williamr@2: williamr@2: /** williamr@2: * Used by consumer applications to register new service to WSF williamr@2: * The service could not otherwise be discovered while creating williamr@2: * a service connection. ID-WSF Authentication Service is an williamr@2: * example of this kind of remote service. williamr@2: * The Basic Web Service consumer does not need to and cannot williamr@2: * register any service related data. williamr@2: * In service description, the default framework ID is "ID-WSF", williamr@2: * through which frameworks performing the actual registration williamr@2: * are looked up. For any custom framework plug-in, the framework williamr@2: * ID must be separately set. williamr@2: * For ID-WSF service descriptions it is mandatory to set both williamr@2: * contract and endpoint. williamr@2: * Calling the method performs one of the following: williamr@2: * 1. It registers a new service description williamr@2: * 2. It updates an existing service description williamr@2: * with matching contract and endpoint. williamr@2: * @param aSD a service description to be registered williamr@2: * @return status/error code. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * Error codes: williamr@2: * KErrNotReady Service description couldn't be registered, williamr@2: * e.g. because end-user permission to modify williamr@2: * WSF data was not granted (a dialog prompt). williamr@2: * KErrNotFound Web Services framework couldn't find any williamr@2: * required framework plug-in used to register williamr@2: * a service description of a given type williamr@2: * (framework ID). williamr@2: * KErrSenNoContract Given service description didn't have williamr@2: * a contract specified, even if the used williamr@2: * framework needs one. For ID-WSF it is williamr@2: * mandatory to define a contract for williamr@2: * service description registration. williamr@2: * KErrSenNoEndpoint Given service description didn't have williamr@2: * a endpoint specified, even if the used williamr@2: * framework needs one. For ID-WSF it is williamr@2: * mandatory to define an endpoint for williamr@2: * service description registration. williamr@2: * KErrSenNoContractNoEndPoint Given service description didn't have williamr@2: * an endpoint and contract specified, even if the used williamr@2: * framework needs one. For ID-WSF it is williamr@2: * mandatory to define both an endpoint and contract for williamr@2: * service description registration. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt RegisterServiceDescriptionL(MSenServiceDescription& aSD) = 0; williamr@2: williamr@2: /** williamr@2: * Used by consumer application to to inform the ServiceManager williamr@2: * about a service which no longer is available. The ServiceManager williamr@2: * will remove the service from its database as soon as it is no williamr@2: * longer used. williamr@2: * @param aSD a ServiceDescription to be unregistered williamr@2: * @return status/error code. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * Error codes: williamr@2: * KErrBadDescriptor aSD was invalid service description and williamr@2: * couldn't be unregistered. williamr@2: * KErrNotReady Service description couldn't be registered, williamr@2: * e.g. because end-user permission to modify williamr@2: * WSF data was not granted (a dialog prompt). williamr@2: * KErrNotFound Couldn't find a matching framework to williamr@2: * register service description or couldn't williamr@2: * find a matching service description. williamr@2: * KErrSenNoContract Given service description didn't have williamr@2: * a contract specified, even if the used williamr@2: * framework needs one. williamr@2: * KErrSenNoEndpoint Given service description didn't have williamr@2: * a endpoint specified, even if the used williamr@2: * framework needs one. williamr@2: * KErrSenNoContractNoEndPoint Given service description didn't have williamr@2: * an endpoint and contract specified, even if the used williamr@2: * framework needs one. For ID-WSF it is williamr@2: * mandatory to define both an endpoint and contract for williamr@2: * service description registration. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt UnregisterServiceDescriptionL( williamr@2: MSenServiceDescription& aSD) = 0; williamr@2: williamr@2: /** williamr@2: * Register an identity provider for the current active identity. williamr@2: * It is required for both Basic Web Service and ID-WSF consumers williamr@2: * that endpoint is defined in identity provider instance to make williamr@2: * this data accessible later on while creating a service connection. williamr@2: * @param aProvider an identity provider to be registered williamr@2: * @return status/error code. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * Error codes: williamr@2: * KErrBadDescriptor aProvider was an invalid identity provider williamr@2: * and couldn't be registered. williamr@2: * KErrNotReady Service description couldn't be registered, williamr@2: * e.g. because end-user permission to modify williamr@2: * WSF data was not granted (a dialog prompt). williamr@2: * KErrSenProviderIdInUseByAnotherEndpoint williamr@2: * attempt to register an identity provider williamr@2: * failed, because ProviderID was already williamr@2: * reserved in the use of another endpoint. williamr@2: * williamr@2: * A possible work-around for this would be williamr@2: * to unregister such conflicting identity williamr@2: * provider using this particular ProviderID, williamr@2: * but this solution is not recommended. Instead, williamr@2: * separate providers, locating in different williamr@2: * endpoints, SHOULD always use different williamr@2: * ProviderIDs. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt RegisterIdentityProviderL(CSenIdentityProvider& aProvider) = 0; williamr@2: williamr@2: /** williamr@2: * Unregister an identity provider from the current active Identity. williamr@2: * @param aProvider an identity provider to be unregistered williamr@2: * @return status/error code. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * Error codes: williamr@2: * KErrBadDescriptor aProvider was an invalid identity provider williamr@2: * and couldn't be unregistered. williamr@2: * KErrNotReady Identity provider couldn't be unregistered, williamr@2: * e.g. because user didn't allow it. williamr@2: * KErrNotFound aProvider was not found and couldn't be williamr@2: * unregistered. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt UnregisterIdentityProviderL( williamr@2: CSenIdentityProvider& aProvider) = 0; williamr@2: williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method to associate williamr@2: * some pre-registered service to certain (registered) williamr@2: * identity provider. The association adds the service ID williamr@2: * (contract of the service that trusts this identity williamr@2: * provider) into WSF identity database. williamr@2: * In ID-WSF, consumers typically associate authentication williamr@2: * service description with some identity provider. This williamr@2: * way the ID-WSF framework can find the identity provider williamr@2: * by using the contract of the service as a search pattern williamr@2: * (for e.g. liberty AS contract). williamr@2: * @param aURI either the contract or the endpoint williamr@2: * identifying some service williamr@2: * @param aProviderID the ID of an identity provider williamr@2: * @return status/error code. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * Error codes: williamr@2: * KErrArgument Either or both of the parameters were williamr@2: * zero-length or invalid descriptors williamr@2: * KErrNotReady Identity provider couldn't be unregistered, williamr@2: * e.g. because user didn't allow it. williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the identity provider by given provider ID. williamr@2: */ williamr@2: virtual TInt AssociateServiceL( const TDesC8& aURI, williamr@2: const TDesC8& aProviderID) = 0; williamr@2: williamr@2: /** williamr@2: * Dissociate a service from an identity provider. williamr@2: * @param aServiceID the contract or endpoint of a service williamr@2: * @param aProviderID the id of an identity provider williamr@2: * @return status/error code. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * Error codes: williamr@2: * KErrArgument Either or both of the parameters were williamr@2: * zero-length or invalid descriptors williamr@2: * KErrNotReady Service couldn't be dissociated, williamr@2: * e.g. because user didn't allow it. williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the identity provider by given williamr@2: * provider ID. williamr@2: */ williamr@2: virtual TInt DissociateServiceL(const TDesC8& aServiceID, williamr@2: const TDesC8& aProviderID) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for finding Credentials. williamr@2: * IdentityProvider or Username and Password are given either via williamr@2: * IdentityProviderL() callback or UsernameL() and Password() williamr@2: * callbacks from MSenAuthenticationProvider (which can be given williamr@2: * through specialized NewL or NewLC methods). williamr@2: * williamr@2: * @param aEndpoint the endpoint which identifies the Credential williamr@2: * @param aCredentials an array with 0 or more Credentials. williamr@2: * The ownership of the array (and Credentials) williamr@2: * is passed to the caller so before the array williamr@2: * goes out of scope in the client, the caller williamr@2: * must call RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * @param aCredentialProperties an array with 0 or more williamr@2: * CredentialsProperties. williamr@2: * The ownership of the array (and williamr@2: * CredentialProperties) is passed to the caller williamr@2: * so before the array goes out of scope in the williamr@2: * client, the caller must call williamr@2: * RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the CredentialProperties in the array. williamr@2: * Note: aCredentials array and williamr@2: * aCredentialProperties array are in williamr@2: * sync. If Credential has properties, williamr@2: * properties are placed in same williamr@2: * position in aCredentialProperties array williamr@2: * as raleted Credential in aCredentials williamr@2: * array. williamr@2: * Note: If Credential has no properties, williamr@2: * there is NULL in related position williamr@2: * in aCredentialProperties array. williamr@2: * all the Credentials in the array. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the Credentials using given Endpoint. williamr@2: * KErrSenNoPermission Given IdentityProvider or Username and williamr@2: * Password did not match for IdentityProvider williamr@2: * which is related to found Credential(s). williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt CredentialsL(const TDesC8& aEndpoint, williamr@2: RCredentialArray& aCredentials, williamr@2: RCredentialPropertiesArray& aCredentialProperties) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for finding Credentials. williamr@2: * williamr@2: * @param aEndpoint the endpoint which identifies the Credential williamr@2: * @param aIdP the IdentityProvider which should match williamr@2: * for IdentityProvider which is related to williamr@2: * found Credential(s). williamr@2: * @param aCredentials an array with 0 or more Credentials. williamr@2: * The ownership of the array (and Credentials) williamr@2: * is passed to the caller so before the array williamr@2: * goes out of scope in the client, the caller williamr@2: * must call RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the Credentials in the array. williamr@2: * @param aCredentialProperties an array with 0 or more williamr@2: * CredentialsProperties. williamr@2: * The ownership of the array (and williamr@2: * CredentialProperties) is passed to the caller williamr@2: * so before the array goes out of scope in the williamr@2: * client, the caller must call williamr@2: * RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the CredentialProperties in the array. williamr@2: * Note: aCredentials array and williamr@2: * aCredentialProperties array are in williamr@2: * sync. If Credential has properties, williamr@2: * properties are placed in same williamr@2: * position in aCredentialProperties array williamr@2: * as raleted Credential in aCredentials williamr@2: * array. williamr@2: * Note: If Credential has no properties, williamr@2: * there is NULL in related position williamr@2: * in aCredentialProperties array. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the Credentials using given Endpoint. williamr@2: * KErrSenNoPermission Given IdentityProvider did not match for williamr@2: * IdentityProvider which is related to williamr@2: * found Credential. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt CredentialsL(const TDesC8& aEndpoint, williamr@2: const CSenIdentityProvider& aIdP, williamr@2: RCredentialArray& aCredentials, williamr@2: RCredentialPropertiesArray& aCredentialProperties) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for finding Credentials. williamr@2: * williamr@2: * @param aEndpoint the endpoint which identifies the Credential williamr@2: * @param aUserName the username which should match for williamr@2: * username in IdentityProvider which is related williamr@2: * to found Credential(s). williamr@2: * @param aPassword the password which should match for williamr@2: * password in IdentityProvider which is related williamr@2: * to found Credential(s). williamr@2: * @param aCredentials an array with 0 or more Credentials. williamr@2: * The ownership of the array (and Credentials) williamr@2: * is passed to the caller so before the array williamr@2: * goes out of scope in the client, the caller williamr@2: * must call RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the Credentials in the array. williamr@2: * @param aCredentialProperties an array with 0 or more williamr@2: * CredentialsProperties. williamr@2: * The ownership of the array (and williamr@2: * CredentialProperties) is passed to the caller williamr@2: * so before the array goes out of scope in the williamr@2: * client, the caller must call williamr@2: * RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the CredentialProperties in the array. williamr@2: * Note: aCredentials array and williamr@2: * aCredentialProperties array are in williamr@2: * sync. If Credential has properties, williamr@2: * properties are placed in same williamr@2: * position in aCredentialProperties array williamr@2: * as raleted Credential in aCredentials williamr@2: * array. williamr@2: * Note: If Credential has no properties, williamr@2: * there is NULL in related position williamr@2: * in aCredentialProperties array. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the Credentials using given Endpoint. williamr@2: * KErrSenNoPermission Given IdentityProvider did not match for williamr@2: * IdentityProvider which is related to williamr@2: * found Credential. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt CredentialsL(const TDesC8& aEndpoint, williamr@2: const TDesC8& aUserName, williamr@2: const TDesC8& aPassword, williamr@2: RCredentialArray& aCredentials, williamr@2: RCredentialPropertiesArray& aCredentialProperties) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for finding Credentials. williamr@2: * IdentityProvider or Username and Password are given either via williamr@2: * IdentityProviderL() callback or UsernameL() and Password() williamr@2: * callbacks from MSenAuthenticationProvider (which can be given williamr@2: * through specialized NewL or NewLC methods). williamr@2: * williamr@2: * @param aPattern the pattern which identifies the Credential williamr@2: * Note: Pattern which was used to add Credential williamr@2: * has to be used for finding Credential. williamr@2: * Note: Used Framework should specify what williamr@2: * kind of pattern should be used williamr@2: * for storing framework specific williamr@2: * Credentials. williamr@2: * @param aCredentials an array with 0 or more Credentials. williamr@2: * The ownership of the array (and Credentials) williamr@2: * is passed to the caller so before the array williamr@2: * goes out of scope in the client, the caller williamr@2: * must call RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the Credentials in the array. williamr@2: * @param aCredentialProperties an array with 0 or more williamr@2: * CredentialsProperties. williamr@2: * The ownership of the array (and williamr@2: * CredentialProperties) is passed to the caller williamr@2: * so before the array goes out of scope in the williamr@2: * client, the caller must call williamr@2: * RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the CredentialProperties in the array. williamr@2: * Note: aCredentials array and williamr@2: * aCredentialProperties array are in williamr@2: * sync. If Credential has properties, williamr@2: * properties are placed in same williamr@2: * position in aCredentialProperties array williamr@2: * as raleted Credential in aCredentials williamr@2: * array. williamr@2: * Note: If Credential has no properties, williamr@2: * there is NULL in related position williamr@2: * in aCredentialProperties array. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the Credentials using given Endpoint. williamr@2: * KErrSenNoPermission Given IdentityProvider or Username and williamr@2: * Password did not match for IdentityProvider williamr@2: * which is related to found Credential(s). williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt CredentialsL(const MSenServiceDescription& aPattern, williamr@2: RCredentialArray& aCredentials, williamr@2: RCredentialPropertiesArray& aCredentialProperties) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for finding Credentials. williamr@2: * williamr@2: * @param aPattern the pattern which identifies the Credential williamr@2: * Note: Pattern which was used to add Credential williamr@2: * has to be used for finding Credential. williamr@2: * Note: Used Framework should specify what williamr@2: * kind of pattern should be used williamr@2: * for storing framework specific williamr@2: * Credentials. williamr@2: * @param aIdP the IdentityProvider which should match williamr@2: * for IdentityProvider which is related to williamr@2: * found Credential(s). williamr@2: * @param aCredentials an array with 0 or more Credentials. williamr@2: * The ownership of the array (and Credentials) williamr@2: * is passed to the caller so before the array williamr@2: * goes out of scope in the client, the caller williamr@2: * must call RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the Credentials in the array. williamr@2: * @param aCredentialProperties an array with 0 or more williamr@2: * CredentialsProperties. williamr@2: * The ownership of the array (and williamr@2: * CredentialProperties) is passed to the caller williamr@2: * so before the array goes out of scope in the williamr@2: * client, the caller must call williamr@2: * RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the CredentialProperties in the array. williamr@2: * Note: aCredentials array and williamr@2: * aCredentialProperties array are in williamr@2: * sync. If Credential has properties, williamr@2: * properties are placed in same williamr@2: * position in aCredentialProperties array williamr@2: * as raleted Credential in aCredentials williamr@2: * array. williamr@2: * Note: If Credential has no properties, williamr@2: * there is NULL in related position williamr@2: * in aCredentialProperties array. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the Credentials using given Endpoint. williamr@2: * KErrSenNoPermission Given IdentityProvider did not match for williamr@2: * IdentityProvider which is related to williamr@2: * found Credential. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt CredentialsL(const MSenServiceDescription& aPattern, williamr@2: const CSenIdentityProvider& aIdP, williamr@2: RCredentialArray& aCredentials, williamr@2: RCredentialPropertiesArray& aCredentialProperties) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for finding Credentials. williamr@2: * williamr@2: * @param aPattern the pattern which identifies the Credential williamr@2: * Note: Pattern which was used to add Credential williamr@2: * has to be used for finding Credential. williamr@2: * Note: Used Framework should specify what williamr@2: * kind of pattern should be used williamr@2: * for storing framework specific williamr@2: * Credentials. williamr@2: * @param aUserName the username which should match for williamr@2: * username in IdentityProvider which is related williamr@2: * to found Credential(s). williamr@2: * @param aPassword the password which should match for williamr@2: * password in IdentityProvider which is related williamr@2: * to found Credential(s). williamr@2: * @param aCredentials an array with 0 or more Credentials. williamr@2: * The ownership of the array (and Credentials) williamr@2: * is passed to the caller so before the array williamr@2: * goes out of scope in the client, the caller williamr@2: * must call RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the Credentials in the array. williamr@2: * @param aCredentialProperties an array with 0 or more williamr@2: * CredentialsProperties. williamr@2: * The ownership of the array (and williamr@2: * CredentialProperties) is passed to the caller williamr@2: * so before the array goes out of scope in the williamr@2: * client, the caller must call williamr@2: * RPointerArray::ResetAndDestroy() williamr@2: * on the array to close the array and delete williamr@2: * all the CredentialProperties in the array. williamr@2: * Note: aCredentials array and williamr@2: * aCredentialProperties array are in williamr@2: * sync. If Credential has properties, williamr@2: * properties are placed in same williamr@2: * position in aCredentialProperties array williamr@2: * as raleted Credential in aCredentials williamr@2: * array. williamr@2: * Note: If Credential has no properties, williamr@2: * there is NULL in related position williamr@2: * in aCredentialProperties array. williamr@2: * williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the Credentials using given Endpoint. williamr@2: * KErrSenNoPermission Given IdentityProvider did not match for williamr@2: * IdentityProvider which is related to williamr@2: * found Credential. williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt CredentialsL(const MSenServiceDescription& aPattern, williamr@2: const TDesC8& aUserName, williamr@2: const TDesC8& aPassword, williamr@2: RCredentialArray& aCredentials, williamr@2: RCredentialPropertiesArray& aCredentialProperties) = 0; williamr@2: /** williamr@2: * Consumer applications use this method for adding Credential. williamr@2: * williamr@2: * @param aEndpoint the endpoint which identifies the Credential williamr@2: * @param aIdP the IdentityProvider which will be related williamr@2: * to added Credential. williamr@2: * @param aCredential the Credential which will be added. williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrBadDescriptor One of the parameters was invalid. williamr@2: * KErrNotFound Given IdentityProvider was not found williamr@2: * and because of that Credential could williamr@2: * not be added. (Fix: Register IdentityProvider williamr@2: * first and try to add Credential after that.) williamr@2: * williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt AddCredentialL(const TDesC8& aEndpoint, williamr@2: const CSenIdentityProvider& aIdP, williamr@2: const CSenCredential2& aCredential) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for adding Credential. williamr@2: * williamr@2: * @param aPattern the pattern which identifies the Credential williamr@2: * Note: Exactly the same pattern has to be williamr@2: * used for finding Credential. williamr@2: * Note: Used Framework should specify what williamr@2: * kind of pattern should be used williamr@2: * for handling framework specific williamr@2: * Credentials. williamr@2: * @param aIdP the IdentityProvider which will be related williamr@2: * to added Credential. williamr@2: * @param aCredential the Credential which will be added. williamr@2: * williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrBadDescriptor One of the parameters was invalid. williamr@2: * KErrNotFound Given IdentityProvider was not found williamr@2: * and because of that Credential could williamr@2: * not be added. (Fix: Register IdentityProvider williamr@2: * first and try to add Credential after that) williamr@2: * williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt AddCredentialL(const MSenServiceDescription& aPattern, williamr@2: const CSenIdentityProvider& aIdP, williamr@2: const CSenCredential2& aCredential) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for adding Credential. williamr@2: * williamr@2: * @param aEndpoint the endpoint which identifies the williamr@2: * Credential williamr@2: * @param aIdP the IdentityProvider which will be williamr@2: * related to added Credential. williamr@2: * @param aCredential the Credential which will be added. williamr@2: * @param aCredentialProperties the properties for Credential williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrBadDescriptor One of the parameters was invalid. williamr@2: * KErrNotFound Given IdentityProvider was not found williamr@2: * and because of that Credential could williamr@2: * not be added. (Fix: Register IdentityProvider williamr@2: * first and try to add Credential after that.) williamr@2: * williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt AddCredentialL(const TDesC8& aEndpoint, williamr@2: const CSenIdentityProvider& aIdP, williamr@2: const CSenCredential2& aCredential, williamr@2: const CSenXmlProperties& aCredentialProperties) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for adding Credential. williamr@2: * williamr@2: * @param aPattern the pattern which identifies the williamr@2: * Credential williamr@2: * Note: Exactly the same pattern has williamr@2: * to be used for finding williamr@2: * Credential. williamr@2: * Note: Used Framework should specify williamr@2: * what kind of pattern should be williamr@2: * used for handling framework williamr@2: * specific Credentials. williamr@2: * @param aIdP the IdentityProvider which will be williamr@2: * related to added Credential. williamr@2: * @param aCredential the Credential which will be added. williamr@2: * @param aCredentialProperties the properties for Credential williamr@2: * williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrBadDescriptor One of the parameters was invalid. williamr@2: * KErrNotFound Given IdentityProvider was not found williamr@2: * and because of that Credential could williamr@2: * not be added. (Fix: Register IdentityProvider williamr@2: * first and try to add Credential after that) williamr@2: * williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt AddCredentialL(const MSenServiceDescription& aPattern, williamr@2: const CSenIdentityProvider& aIdP, williamr@2: const CSenCredential2& aCredential, williamr@2: const CSenXmlProperties& aCredentialProperties) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for removing Credentials. williamr@2: * williamr@2: * @param aPattern the pattern which identifies the Credential williamr@2: * Note: Pattern which was used to add Credential williamr@2: * has to be used for removing Credential. williamr@2: * Note: Used Framework should specify what williamr@2: * kind of pattern should be used williamr@2: * for handling framework specific williamr@2: * Credentials. williamr@2: * @param aIdP the IdentityProvider which should match williamr@2: * for IdentityProvider which is related to williamr@2: * found Credential(s). williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the Credentials using given Pattern. williamr@2: * KErrSenNoPermission Given IdentityProvider did not match for williamr@2: * IdentityProvider which is related to williamr@2: * found Credential(s). williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt RemoveCredentialsL(const MSenServiceDescription& aPattern, williamr@2: const CSenIdentityProvider& aIdP) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for removing Credentials. williamr@2: * williamr@2: * @param aIdP the IdentityProvider which should match williamr@2: * for IdentityProvider which is related to williamr@2: * found Credential(s). williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the Credentials using given Pattern. williamr@2: * KErrSenNoPermission Given IdentityProvider did not match for williamr@2: * IdentityProvider which is related to williamr@2: * found Credential(s). williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt RemoveCredentialsL(const CSenIdentityProvider& aIdP) = 0; williamr@2: williamr@2: /** williamr@2: * Consumer applications use this method for removing Credentials. williamr@2: * williamr@2: * @param aPattern the pattern which identifies the Credential williamr@2: * Note: Pattern which was used to add Credential williamr@2: * has to be used for finding Credential. williamr@2: * Note: Used Framework should specify what williamr@2: * kind of pattern should be used williamr@2: * for handling framework specific williamr@2: * Credentials. williamr@2: * @param aUserName the username which should match for williamr@2: * username in IdentityProvider which is related williamr@2: * to found Credential(s). williamr@2: * @param aPassword the password which should match for williamr@2: * password in IdentityProvider which is related williamr@2: * to found Credential(s). williamr@2: * Status codes: williamr@2: * KErrNone ok williamr@2: * williamr@2: * Error codes: williamr@2: * KErrNotFound Web Services framework couldn't find williamr@2: * the Credentials using given Pattern. williamr@2: * KErrSenNoPermission Given Username and Password did not match for williamr@2: * IdentityProvider which is related to williamr@2: * found Credential(s). williamr@2: * Other error codes are system-wide Symbian error codes. williamr@2: */ williamr@2: virtual TInt RemoveCredentialsL(const MSenServiceDescription& aPattern, williamr@2: const TDesC8& aUserName, williamr@2: const TDesC8& aPassword) = 0; williamr@2: williamr@2: williamr@2: /** williamr@2: * This method provides an interface which is identified by unique ID (UID). williamr@2: * @param aUID is the UID of the interface being requested williamr@2: * @return TAny* pointer to the interface, or if no interface to williamr@2: * given UID exists, function returns NULL. In typical cases, returned williamr@2: * pointer should be cast to some preknown M-class pointer (the actual williamr@2: * new interface). williamr@2: * williamr@2: * Currently, there is only one supported interface: williamr@2: * KSenInterfaceUidInternalServiceManager => MSenInternalServiceManager williamr@2: */ williamr@2: virtual TAny* InterfaceByUid( TUid aUID ) = 0; williamr@2: williamr@2: protected: williamr@2: williamr@2: /** williamr@2: * C++ default constructor williamr@2: */ williamr@2: CSenServiceManager(); williamr@2: }; williamr@2: williamr@2: #endif //SEN_SERVICE_MANAGER_H williamr@2: williamr@2: // End of File williamr@2: