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@2: * 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 williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Class implements the most common value object used in WSF, williamr@2: * which is used to describe some invocable service. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: #ifndef SEN_XML_SERVICE_DESCRIPTION_H williamr@2: #define SEN_XML_SERVICE_DESCRIPTION_H williamr@2: williamr@2: // INCLUDES williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: // CONSTANTS williamr@2: const TInt KStateParsingCredentials = 12; williamr@2: const TInt KStateParsingSingleCredential = 122; williamr@2: const TInt KStateParsingProviderPolicy = 1222; williamr@2: const TInt KStateParsingServicePolicy = 12222; williamr@2: williamr@2: _LIT8( KSenAttrSoap12, "SOAP12" ); williamr@2: _LIT8( KSenAttrAddressing, "Addressing" ); williamr@2: _LIT8( KSenAttrClientEntropy, "ClientEntropy" ); williamr@2: _LIT8( KSenAttrTokenType, "TokenType" ); williamr@2: _LIT8( KSenAttrPassportExtensions, "PassportExtensions" ); williamr@2: _LIT8( KSenAttrMetadataEndpoint, "MetadataEndpoint" ); williamr@2: _LIT8( KSenAttrUsernameTokenOverTLS, "UsernameTokenOverTLS" ); williamr@2: _LIT8( KSenAttrPromptUserInfo, "promptUserInfo" ); williamr@2: williamr@2: // FORWARD DECLARATIONS williamr@2: class CSenCredential; williamr@2: class CSenProviderPolicy; williamr@2: class CSenServicePolicy; williamr@2: class MSenServicePolicy; williamr@2: williamr@2: // DATA TYPES williamr@2: typedef RPointerArray RCredentialList; williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * CSenXmlServiceDescription class implements the most williamr@2: * common value object used in WSF, which is used to williamr@2: * describe some invocable service. williamr@2: * williamr@2: * Class offers basic properties which describe some williamr@2: * service and methods to manipulate this info. These williamr@2: * properties are stored in XML fragment format and williamr@2: * a class instance can be represented as one XML tree. williamr@2: * williamr@2: * The main properties for service description are: williamr@2: * - contract (typically some URI) williamr@2: * - endpoint (typically some URL) williamr@2: * - frameworkID williamr@2: * williamr@2: * @lib SenServDesc.lib williamr@2: * @since Series60 3.0 williamr@2: */ williamr@2: class CSenXmlServiceDescription : public CSenDomFragment, williamr@2: public MSenServiceDescription, williamr@2: public MSenProviderPolicy williamr@2: { williamr@2: public: // Constructors and destructor williamr@2: williamr@2: /** williamr@2: * Standard 2 phase constructor williamr@2: * @return a pointer to a new CSenXmlServiceDescription instance. williamr@2: */ williamr@2: IMPORT_C static CSenXmlServiceDescription* NewL(); williamr@2: williamr@2: /** williamr@2: * Standard 2 phase constructor williamr@2: * @return a pointer to a new CSenXmlServiceDescription instance, williamr@2: * which is left on cleanup stack. williamr@2: */ williamr@2: IMPORT_C static CSenXmlServiceDescription* NewLC(); williamr@2: williamr@2: /** williamr@2: * Standard 2 phase constructor williamr@2: * @param aNamespaceURI namespace URI for the service description. williamr@2: * @return a pointer to a new CSenXmlServiceDescription instance williamr@2: */ williamr@2: IMPORT_C static CSenXmlServiceDescription* NewL(const TDesC8& aNamespaceURI); williamr@2: williamr@2: /** williamr@2: * Standard 2 phase constructor williamr@2: * @param aNamespaceURI namespace URI for the service description. williamr@2: * @return a pointer to a new CSenXmlServiceDescription instance, williamr@2: * which is left on cleanup stack. williamr@2: */ williamr@2: IMPORT_C static CSenXmlServiceDescription* NewLC(const TDesC8& aNamespaceURI); williamr@2: williamr@2: /** williamr@2: * Standard 2 phase constructors williamr@2: * @param aEndpoint the service endpoint. Note that endpoint cannot williamr@2: * include characters which are illegal in XML. If endpoint williamr@2: * is an URL which contains illegal characters (like '&'-char), williamr@2: * those need to be encoded into XML entity form (like &). williamr@2: * EncodeHttpCharactersLC() method from XmlUtils can be used williamr@2: * for encoding of basic XML entities. williamr@2: * @param aContract identifies the service type. williamr@2: * @return a pointer to a new CSenXmlServiceDescription instance williamr@2: */ williamr@2: IMPORT_C static CSenXmlServiceDescription* NewL(const TDesC8& aEndPoint, williamr@2: const TDesC8& aContract); williamr@2: williamr@2: /** williamr@2: * Standard 2 phase constructors williamr@2: * @param aEndpoint the service endpoint. Note that endpoint cannot williamr@2: * include characters which are illegal in XML. If endpoint williamr@2: * is an URL which contains illegal characters (like '&'-char), williamr@2: * those need to be encoded into XML entity form (like &). williamr@2: * EncodeHttpCharactersLC() method from XmlUtils can be used williamr@2: * for encoding of basic XML entities. williamr@2: * @param aContract identifies the service type. williamr@2: * @return a pointer to a new CSenXmlServiceDescription instance, williamr@2: * which is left on cleanup stack. williamr@2: */ williamr@2: IMPORT_C static CSenXmlServiceDescription* NewLC(const TDesC8& aEndPoint, williamr@2: const TDesC8& aContract); williamr@2: williamr@2: /** williamr@2: * Destructor. williamr@2: */ williamr@2: IMPORT_C virtual ~CSenXmlServiceDescription(); williamr@2: williamr@2: // New functions williamr@2: williamr@2: /** williamr@2: * Setter for the framework ID. williamr@2: * The developer may use a FrameworkID to search for a session of williamr@2: * (i.e. connection to) a certain service invocation framework. williamr@2: * @since Series60 3.0 williamr@2: * @param aFrameworkId williamr@2: * If set to KNullDesC8, then any matching framework may be used. williamr@2: * The default frameworkID in WSF is "ID-WSF" williamr@2: * (KDefaultIdWsfFrameworkID). williamr@2: * Note that Basic Web Services MUST use "WS-I" williamr@2: * (KDefaultBasicWebServicesFrameworkID). williamr@2: */ williamr@2: IMPORT_C void SetFrameworkIdL(const TDesC8& aFrameworkID); williamr@2: williamr@2: /** williamr@2: * Method returns the localname for this service description. williamr@2: * This is the localname of the element, when this class is williamr@2: * represented as an XML element. williamr@2: * @since Series60 3.0 williamr@2: * @return descriptor to XML localname of this service description williamr@2: */ williamr@2: IMPORT_C virtual const TDesC8& NewElementName(); williamr@2: williamr@2: /** williamr@2: * Returns list of credentials. Ownership is not transferred, any williamr@2: * modifications to the contents of the list modify the real objects. williamr@2: * @since Series60 3.0 williamr@2: * @return the list of credentials (CSenCredential objects). williamr@2: */ williamr@2: IMPORT_C RCredentialList& Credentials(); williamr@2: williamr@2: // Functions from base classes williamr@2: williamr@2: // From MSenProviderPolicy williamr@2: IMPORT_C virtual void SetIapIdL(TUint32 aIapId); williamr@2: IMPORT_C virtual TInt IapId(TUint32& aCurrentIapId); williamr@2: IMPORT_C virtual void SetIdentityProviderIdsL( williamr@2: CSenIdentityProviderIdArray8& aList); williamr@2: IMPORT_C TInt SetTransportPropertiesL(const TDesC8& aProperties); williamr@2: williamr@2: IMPORT_C virtual TInt AddIdentityProviderIdL(TDesC8& aProviderId); williamr@2: IMPORT_C virtual TInt RebuildFrom(MSenProviderPolicy& aTemplate); williamr@2: IMPORT_C virtual const CSenIdentityProviderIdArray8& williamr@2: IdentityProviderIds8L(); williamr@2: IMPORT_C TInt TransportPropertiesL(HBufC8*& aProperties); williamr@2: williamr@2: IMPORT_C virtual TBool Accepts(MSenProviderPolicy& aPolicyPattern); williamr@2: williamr@2: // From MSenServiceDescription: williamr@2: IMPORT_C TDescriptionClassType DescriptionClassType(); williamr@2: IMPORT_C TBool Matches(MSenServiceDescription& aPattern); williamr@2: IMPORT_C TPtrC8 Contract(); williamr@2: williamr@2: // New method williamr@2: /** williamr@2: * Method for checking if service description has a certain facet. williamr@2: * @since Series60 3.0 williamr@2: * @param aURI the facet to check, typically some URI. williamr@2: * @param aHasFacet is ETrue if facet is found and EFalse, if not. williamr@2: * @return KErrNone or other system-wide Symbian error codes. williamr@2: */ williamr@2: IMPORT_C virtual TInt HasFacetL(const TDesC8& aURI, TBool& aHasFacet); williamr@2: williamr@2: // From MSenServiceDescription williamr@2: IMPORT_C virtual TInt FacetValue(TDesC8& aURI, HBufC8*& aValueTo); williamr@2: IMPORT_C virtual TInt AddFacetL(const CSenFacet& aFacet); williamr@2: IMPORT_C virtual TInt SetFacetL(const CSenFacet& aFacet); williamr@2: IMPORT_C virtual TInt RemoveFacet(const TDesC8& aURI); williamr@2: IMPORT_C virtual TInt FacetsL(RFacetArray& aFacetArray); williamr@2: williamr@2: // New method williamr@2: /** williamr@2: * On success, this method returns a positive integer if this williamr@2: * service description matches with the given pattern in at williamr@2: * least one aspect. Higher numbers mean a closer match. williamr@2: * williamr@2: * The bits of information that are in the pattern are read and compared williamr@2: * to corresponding fields in this ServiceDescription. Note that a pattern williamr@2: * may have far fewer fields and that only the non-null fields are compared. williamr@2: * For example, assume that a pattern with only a contract was defined; williamr@2: * with the contract set to "urn:example.com:service". williamr@2: * Each ServiceDescription with the same contract will match the pattern, williamr@2: * even if such a ServiceDescription has non-null fields for other aspects. williamr@2: * @since Series60 3.0 williamr@2: * @param aPattern a ServiceDescription, typically with partial williamr@2: * information. williamr@2: * @return the score or error. If nothing matches, returns 0. In case of williamr@2: * any error, a negative value is returned. williamr@2: */ williamr@2: IMPORT_C virtual TInt ScoreMatchL(MSenServiceDescription& aPattern); williamr@2: williamr@2: // From MSenServiceDescription williamr@2: williamr@2: IMPORT_C TPtrC8 Endpoint(); williamr@2: IMPORT_C TPtrC8 FrameworkId(); williamr@2: IMPORT_C TPtrC8 FrameworkVersion(); williamr@2: IMPORT_C void SetContractL(const TDesC8& aContract); williamr@2: IMPORT_C void SetEndPointL(const TDesC8& aEndPoint); williamr@2: williamr@2: // From CSenBaseFragment williamr@2: williamr@2: /** williamr@2: * Gets the service description as XML fragment in UTF-8 format. williamr@2: * @since Series60 3.0 williamr@2: * @return the service description as XML, which ownership is williamr@2: * transferred to the caller. williamr@2: */ williamr@2: IMPORT_C virtual HBufC8* AsXmlL(); williamr@2: williamr@2: /** williamr@2: * Gets the service description as XML, in Unicode (UCS-2) williamr@2: * @since Series60 3.0 williamr@2: * @return the service description as XML, in Unicode (UCS-2) williamr@2: * encoding form. williamr@2: */ williamr@2: IMPORT_C virtual HBufC* AsXmlUnicodeL(); williamr@2: williamr@2: /** williamr@2: * Writes this service description as XML, in UTF-8 form to a stream williamr@2: * @since Series60 3.0 williamr@2: * @param aWriteStream to write into. williamr@2: */ williamr@2: IMPORT_C virtual void WriteAsXMLToL(RWriteStream& aWriteStream); williamr@2: williamr@2: williamr@2: // From CSenDomFragment williamr@2: williamr@2: /** williamr@2: * Method looks for FrameworkID attribute from the given XML attribute williamr@2: * array and if one is found, sets its value for this instance. In williamr@2: * addition, all the namespace attributes are copied. All other williamr@2: * attributes are discarded. williamr@2: * @since Series60 3.0 williamr@2: * @param aAttributes the attribute list. williamr@2: */ williamr@2: IMPORT_C void SetAttributesL(const RAttributeArray& aAttributes); williamr@2: williamr@2: /** williamr@2: * Resumes the parsing. Called by the delegate fragment williamr@2: * in order to notify owner, which needs to regain williamr@2: * (take over) parsing. For example, when a policy fragment williamr@2: * is parsed, the service description fragment should williamr@2: * resume parsing the rest of its own XML document williamr@2: * representation. williamr@2: * @since Series60 3.0 williamr@2: * @param aNsUri The namespace URI of the current element williamr@2: * @param aLocalName The local name of the current element williamr@2: * @param aQName The qualified name of the current element williamr@2: */ williamr@2: IMPORT_C void ResumeParsingFromL(const TDesC8& aNsUri, williamr@2: const TDesC8& aLocalName, williamr@2: const TDesC8& aQName); williamr@2: williamr@2: protected: // New functions williamr@2: williamr@2: /** williamr@2: * C++ default constructor. williamr@2: * @param aType enumeration defining the type of this class. williamr@2: */ williamr@2: IMPORT_C CSenXmlServiceDescription(TDescriptionClassType aType); williamr@2: williamr@2: /** williamr@2: * Basic ConstructL function. williamr@2: */ williamr@2: IMPORT_C void ConstructL(); williamr@2: williamr@2: /** williamr@2: * Basic ConstructL function. williamr@2: * @since Series60 3.0 williamr@2: * @param aNamespaceURI for this service description, which is williamr@2: * also an XML element. williamr@2: */ williamr@2: IMPORT_C void ConstructL(const TDesC8& aNamespaceURI); williamr@2: williamr@2: /** williamr@2: * Basic ConstructL function. williamr@2: * @since Series60 3.0 williamr@2: * @param aEndpoint the service endpoint. Note that endpoint cannot williamr@2: * include characters which are illegal in XML. If endpoint williamr@2: * is an URL which contains illegal characters (like '&'-char), williamr@2: * those need to be encoded into XML entity form (like &). williamr@2: * EncodeHttpCharactersLC() method from XmlUtils can be used williamr@2: * for encoding of basic XML entities. williamr@2: * @param aContract identifies the service type, typically some URN. williamr@2: */ williamr@2: IMPORT_C void ConstructL(const TDesC8& aEndPoint, const TDesC8& aContract); williamr@2: williamr@2: // Functions from base classes williamr@2: williamr@2: // From CSenDomFragment williamr@2: williamr@2: /** williamr@2: * Callback function which implements the XML content handler interface. williamr@2: * @since Series60 3.0 williamr@2: * @param aNsURI The namespace URI of the new element williamr@2: * @param aLocalName The local name of the new element williamr@2: * @param aQName The qualified name of the new element williamr@2: * @param aAttributes The attributes of the new element williamr@2: */ williamr@2: IMPORT_C virtual void StartElementL(const TDesC8& aNsUri, williamr@2: const TDesC8& aLocalName, williamr@2: const TDesC8& aQName, williamr@2: const RAttributeArray& aAttributes); williamr@2: williamr@2: // From CSenBaseFragment williamr@2: /** williamr@2: * Callback function which implement the XML content handler interface. williamr@2: * @since Series60 3.0 williamr@2: * @param aNsUri The namespace URI of the new element williamr@2: * @param aLocalName The local name of the new element williamr@2: * @param aQName The qualified name of the new element williamr@2: */ williamr@2: IMPORT_C virtual void EndElementL(const TDesC8& aNsUri, williamr@2: const TDesC8& aLocalName, williamr@2: const TDesC8& aQName); williamr@2: williamr@2: public: williamr@2: /** williamr@2: * Method returns ETrue if the primary keys of this service description williamr@2: * are equal. Definition of primary keys varies on concrete implementations. williamr@2: * williamr@2: * In a typical XML sub class implementation the primary keys are Contract williamr@2: * and Endpoint elements. williamr@2: * williamr@2: * Difference to Match() method is that primary keys - often descriptors - williamr@2: * MUST be equal both in this service description and in aCandidate, unlike williamr@2: * in Match(), where argument is more like wildcard pattern matching even williamr@2: * in cases where it includes fewer fields (less information). williamr@2: * williamr@2: * @since Series60 williamr@2: * @param aCandidate is a service description, which primary keys are williamr@2: * checked in this comparison. williamr@2: * williamr@2: * @return TBool ETrue if primary keys are equal, EFalse otherwise. williamr@2: */ williamr@2: IMPORT_C TBool HasEqualPrimaryKeysL(MSenServiceDescription& aCandidate); williamr@2: williamr@2: /* williamr@2: * Method checks specific pieces of information to determine, whether this williamr@2: * service description is local or not. Typically this is defined by the williamr@2: * endpoint's scheme, which is KSenTransportSchemeLocal in most of the cases, williamr@2: * when this method returns true. williamr@2: * @return boolean indicating whether this endpoint is local or not. williamr@2: */ williamr@2: IMPORT_C TBool IsLocalL(); williamr@2: williamr@2: williamr@2: /* williamr@2: * Method for binding transport plug-in type with the endpoint in question. williamr@2: * Function adds/sets XML attribute called "cue" for element: williamr@2: * williamr@2: * williamr@2: * williamr@2: * local://urn:nokia.com.test.hostlet williamr@2: * williamr@2: * williamr@2: * williamr@2: * In above example, eventhough endpoint scheme "local://" would normally williamr@2: * invoke different type of plug-in (ECOM hostlet), the "cue" attribute williamr@2: * overrides this, and forces hostlet connection transport plug-in to be williamr@2: * loaded. williamr@2: * williamr@2: * Transport plug-in types (cues): williamr@2: * williamr@2: * _LIT8(KSenTransportCueHTTP, "com.nokia.wsf.transport.plugin.httpchannel"); williamr@2: * _LIT8(KSenTransportCueVirtualTCP, "com.nokia.wsf.transport.plugin.virtualtcp"); williamr@2: * _LIT8(KSenTransportCueLocalEcom, "com.nokia.wsf.transport.plugin.local"); williamr@2: * _LIT8(KSenTransportCueHostletConnection, "com.nokia.wsf.transport.plugin.hostlet"); williamr@2: * williamr@2: * williamr@2: * Note that this method does not attempt to load the plug-in - it might not williamr@2: * even exist in the system. Neither is this attribute checked when XML service williamr@2: * description is parsed. As a conclusion, if non-existant plug-ins are bind williamr@2: * to endpoints, they will be ignored, and the transport is created in normal williamr@2: * way and plug-in is chosen based on endpoint scheme and/or defaults. williamr@2: * williamr@2: * @param aTransportCue is the ECOM cue of CSenTransport implementation. williamr@2: * In ECOM resource files, cue is the value of "default_data" property. williamr@2: * @return KErrNone on success williamr@2: * KErrSenNoEndpoint, if endpoint element does not exist in this XML williamr@2: * service description. williamr@2: */ williamr@2: IMPORT_C TInt SetTransportCueL(const TDesC8& aTransportCue); williamr@2: williamr@2: williamr@2: /** williamr@2: * Getter for transport cue, assuming that attribute has been set, williamr@2: * and that has "cue" -attribute. williamr@2: * @return transport plug-in ECOM cue, or KNullDesC8, if it has williamr@2: * not been set in this service description. In each ECOM resource williamr@2: * file the cue is defined by "default_data" property. williamr@2: */ williamr@2: IMPORT_C TPtrC8 TransportCue(); williamr@2: williamr@2: /** williamr@2: * Getter for (web) service policy williamr@2: * @return pointer to service policy, or NULL, if it is not available williamr@2: */ williamr@2: IMPORT_C MSenServicePolicy* ServicePolicy(); williamr@2: williamr@2: /** williamr@2: * Method provides convenient way to add a new value in Client Policy williamr@2: * This method will add elements such as or williamr@2: * in the Policy to be used by stack. Infact this method adds a new element williamr@2: * in xml representation of ServicePolicy. williamr@2: * @param aName is the Name of the attribute. williamr@2: * @return KErrNone on success, KErrArgument if any of the arguments williamr@2: * (descriptors) is of zero-length, or one of the system-wide williamr@2: * error codes otherwise. williamr@2: */ williamr@2: IMPORT_C TInt SetPolicyL(const TDesC8& aName); williamr@2: williamr@2: /** williamr@2: * Method provides convenient way to add a new value in Client Policy williamr@2: * This method will add elements such as williamr@2: * in the Policy to be used by stack. Infact this method adds a new element williamr@2: * in xml representation of ServicePolicy and adds its value as contents of the element. williamr@2: * http://schemas.xmlsoap.org/ws/2004/03/addressing williamr@2: * @param aName is the Name of the Policy attribute. williamr@2: * @param aValue is the Contents of the Policy attribute. williamr@2: * @return KErrNone on success, KErrArgument if any of the arguments williamr@2: * (descriptors) is of zero-length, or one of the system-wide williamr@2: * error codes otherwise. williamr@2: */ williamr@2: IMPORT_C TInt SetPolicyL(const TDesC8& aName, const TDesC8& aValue); williamr@2: williamr@2: /** williamr@2: * Method provides convenient way to add a new value in Client Policy williamr@2: * This method will add elements such as williamr@2: * in the Policy to be used by stack, plus it will add one specified williamr@2: * attribute (name and value) for that element. Infact this method adds williamr@2: * a new element - and it's attribute - in the xml representation of williamr@2: * ServicePolicy element, which is direct child to ServiceDescription williamr@2: * (root element) document. williamr@2: * http://www.mypolicyendpoint.com/policy2/ williamr@2: * @param aName is the Name of the Policy attribute. williamr@2: * @param aValue is the Contents of the Policy attribute. williamr@2: * @param aAttribName is the Name of the attribute in element aName williamr@2: * @param aAttribValue is the Contents of the aAttribName attribute. williamr@2: * @return KErrNone on success, KErrArgument if any of the arguments williamr@2: * (descriptors) is of zero-length, or one of the system-wide williamr@2: * error codes otherwise. williamr@2: */ williamr@2: IMPORT_C TInt SetPolicyL(const TDesC8& aName, const TDesC8& aValue, const TDesC8& aAttribName, const TDesC8& aAttribValue); williamr@2: williamr@2: /** williamr@2: * Setter for (identity) provider ID williamr@2: * @since Series60 5.0 williamr@2: * @param aProviderID the unique identifier of the (identity) provider williamr@2: * @return KErrNone on success, KErrArgument if aProviderID is of zero-length, williamr@2: * or one of the system-wide Symbian error codes otherwise. williamr@2: */ williamr@2: IMPORT_C TInt SetProviderIdL( const TDesC8& aProviderID ); williamr@2: williamr@2: /** williamr@2: * Getter for (identity) provider ID williamr@2: * @since Series60 5.0 williamr@2: * @return the (locally) unique identifier of the (identity) provider williamr@2: * @return KErrNone on success, KErrArgument if aProviderID is of zero-length, williamr@2: * or one of the system-wide Symbian error codes otherwise. williamr@2: */ williamr@2: IMPORT_C TPtrC8 ProviderId(); williamr@2: williamr@2: /** williamr@2: * Setter for userinfo (KSenAttrPromptUserInfo) attribute, which williamr@2: * - password notifier dialog is shown to end-user or not, when williamr@2: * authentication fails (due wrong, or incomplete userinfo). williamr@2: * @param aPromptUserInfoMode williamr@2: * EFalse dictates that an error must be returned when creating williamr@2: * a service connection and userinfo is not accepted by williamr@2: * (remote) authentication, instead of showing the dialog. williamr@2: * ETrue (or if attribute does not exist in this XML SD) means that williamr@2: * end-user should be prompted (default behaviour). The number williamr@2: * of retry attempts (each showing a dialog) is service invocation williamr@2: * framework spesific; typically 3 retries are permitted. williamr@2: */ williamr@2: IMPORT_C void CSenXmlServiceDescription::SetPromptUserInfoL( TBool aPromptUserInfoMode ); williamr@2: williamr@2: /** williamr@2: * Getter for current userinfo mode (KSenAttrPromptUserInfo attribute). williamr@2: * @return Boolean that indicates the mode: williamr@2: * EFalse means that end-user prompts (notifier dialogs) have been williamr@2: * explicitely surpressed, and thus will not be shown to end-user: williamr@2: * attribute value is exactly as follows: "false" williamr@2: * ETrue means that attribute named as KSenAttrPromptUserInfo williamr@2: * does not exist (default), or it has ANY value OTHER than "false" williamr@2: */ williamr@2: IMPORT_C TBool PromptUserInfo(); williamr@2: williamr@2: public: williamr@2: /** williamr@2: * Sets the SNAP ID. williamr@2: * @param aIapId A TUint32 Snap ID williamr@2: */ williamr@2: IMPORT_C void SetSnapIdL(TUint32 aIapId); williamr@2: /** williamr@2: * Gets the SNAP ID. williamr@2: * @param aCurrentSnapId A TUint32 reference to be filled in with the williamr@2: * value of the SNAP ID. williamr@2: * @return KErrNone if no error, or some of the system williamr@2: * wide error codes. williamr@2: */ williamr@2: IMPORT_C TInt SnapId(TUint32& aCurrentIapId); williamr@2: williamr@2: private: williamr@2: TInt FacetValueL(TDesC8& aURI, HBufC8*& aValueTo); williamr@2: TInt RemoveFacetL(const TDesC8& aURI); williamr@2: williamr@2: protected: // Data williamr@2: // the type of this class instance williamr@2: const TDescriptionClassType iType; williamr@2: williamr@2: private: // Data williamr@2: CSenServicePolicy* iServicePolicy; williamr@2: CSenCredential* iCredential; williamr@2: RCredentialList iCredentialList; williamr@2: williamr@2: // Timestamp indicating validity of credentials. Using SenDateUtils williamr@2: // FromXmlDateTimeL and ToXmlDateTimeUtf8L is recommended for conversions. williamr@2: TTime iNotOnOrAfter; williamr@2: CSenProviderPolicy* iProviderPolicy; williamr@2: }; williamr@2: williamr@2: #endif // SEN_XML_SERVICE_DESCRIPTION_H williamr@2: williamr@2: // End of File williamr@2: williamr@2: