MSenServiceDescription Class Reference

API published in: S60 3rd Ed

Link against: senservdesc.lib

Capability Information

Required Capabilities

NetworkServices ReadUserData WriteUserData


#include <msenservicedescription.h>

Inherited by CSenXmlServiceDescription.


Detailed Description

Interface (abstract) class for subclasses implementing the most common value objects used in WSF, which are used to describe some invocable service.

All of the subclasses are capable of representing themselves in XML.


Public Types

enum   TDescriptionClassType {
  ERoot = 0, EBaseServiceDescription, EXmlServiceDescription, EIdentityProvider,
  EServicePattern, EServiceSession, EWebServiceSession, EBasicWebServiceSession,
  EIdWSFServiceSession, EIdWsfServiceInstance, ECoreServiceConsumer, ESenInternalServiceConsumer,
  EIdWsfAuthenticationServiceClient, EIdWsfDiscoveryServiceClient
}
  DescriptionClassType enumeration. More...

Public Member Functions

virtual TDescriptionClassType  DescriptionClassType ()=0
  The DescriptionClassType() method is used to resolve the real subclass type in cases where instance of that class is seen through one of its superclass interfaces.
virtual TBool  Matches (MSenServiceDescription &aPattern)=0
  Method returns ETrue if this service description matches the given pattern.
virtual TPtrC8  Contract ()=0
  Getter for contract, which is typically some URI.
virtual TInt  HasFacetL (const TDesC8 &aURI, TBool &aHasFacet)=0
  Method for checking if service description has a certain facet.
virtual TInt  FacetValue (TDesC8 &aURI, HBufC8 *&aValueTo)=0
virtual TInt  AddFacetL (const CSenFacet &aFacet)=0
  Method for adding a facet.
virtual TInt  SetFacetL (const CSenFacet &aFacet)=0
  Method for setting a facet.Adds a new facet, if non-existent.
virtual TInt  RemoveFacet (const TDesC8 &aURI)=0
  Removes a characteristic (Facet) from the description.
virtual TInt  FacetsL (RFacetArray &aFacetArray)=0
  Method for getting all facets.
virtual TInt  ScoreMatchL (MSenServiceDescription &aPattern)=0
  Method returns a positive integer if this ServiceDescription matches the given pattern in at least one aspect.
virtual TPtrC8  Endpoint ()=0
  Getter for endpoint.
virtual TPtrC8  FrameworkId ()=0
  Getter for the framework ID.
virtual TPtrC8  FrameworkVersion ()=0
  Getter for the framework version.
virtual void  SetContractL (const TDesC8 &aContract)=0
  Setter for contract.
virtual void  SetEndPointL (const TDesC8 &aEndPoint)=0
  Setter for endpoint.
virtual HBufC8 *  AsXmlL ()=0
  Gets the service description as XML fragment in UTF-8 format.
virtual HBufC *  AsXmlUnicodeL ()=0
  Gets the service description as XML, in Unicode (UCS-2).
virtual void  WriteAsXMLToL (RWriteStream &aWriteStream)=0
  Writes this service description as XML, in UTF-8 form to a stream.

Member Enumeration Documentation

enum MSenServiceDescription::TDescriptionClassType
 

DescriptionClassType enumeration.

Enumerator:
ERoot 
EBaseServiceDescription 
EXmlServiceDescription 
EIdentityProvider 
EServicePattern 
EServiceSession 
EWebServiceSession 
EBasicWebServiceSession 
EIdWSFServiceSession 
EIdWsfServiceInstance 
ECoreServiceConsumer 
ESenInternalServiceConsumer 
EIdWsfAuthenticationServiceClient 
EIdWsfDiscoveryServiceClient 

Member Function Documentation

virtual TInt MSenServiceDescription::AddFacetL const CSenFacet aFacet  )  [pure virtual]
 

Method for adding a facet.

Will NOT override an already existing facet with a same name.

Parameters:
aFacet  is the one to be added. A copy of the the original facet instance will be added.
Returns:
KErrNone or other system-wide Symbian error codes. KErrAlreadyExists if a facet with same name exists

Implemented in CSenXmlServiceDescription.

virtual HBufC8* MSenServiceDescription::AsXmlL  )  [pure virtual]
 

Gets the service description as XML fragment in UTF-8 format.

Returns:
the service description as XML, which ownership is transferred to the caller.

Implemented in CSenXmlServiceDescription.

virtual HBufC* MSenServiceDescription::AsXmlUnicodeL  )  [pure virtual]
 

Gets the service description as XML, in Unicode (UCS-2).

Returns:
the service description as XML, which ownership is transferred to the caller.

Implemented in CSenXmlServiceDescription.

virtual TPtrC8 MSenServiceDescription::Contract  )  [pure virtual]
 

Getter for contract, which is typically some URI.

Returns:
the Contract

Implemented in CSenXmlServiceDescription.

virtual TDescriptionClassType MSenServiceDescription::DescriptionClassType  )  [pure virtual]
 

The DescriptionClassType() method is used to resolve the real subclass type in cases where instance of that class is seen through one of its superclass interfaces.

Returns:
TDescriptionClassType enumeration identifying the class.

Implemented in CSenXmlServiceDescription.

virtual TPtrC8 MSenServiceDescription::Endpoint  )  [pure virtual]
 

Getter for endpoint.

Returns:
The endpoint.

Implemented in CSenXmlServiceDescription.

virtual TInt MSenServiceDescription::FacetsL RFacetArray aFacetArray  )  [pure virtual]
 

Method for getting all facets.

Copies characteristics (Facets) from the description into array. For each characteristic (Facet) found in array the HasFacetL() method should return "ETrue".

Parameters:
aFacetArray  is typically an empty array, into where copies of facets will be added. Ownership of the items in this array is transferred to the caller.
Returns:
KErrNone or other system-wide Symbian error codes.

Implemented in CSenXmlServiceDescription.

virtual TInt MSenServiceDescription::FacetValue TDesC8 &  aURI,
HBufC8 *&  aValueTo
[pure virtual]
 

Implemented in CSenXmlServiceDescription.

virtual TPtrC8 MSenServiceDescription::FrameworkId  )  [pure virtual]
 

Getter for the framework ID.

Returns:
The framework ID or KNullDesC8 if no framework is set

Implemented in CSenXmlServiceDescription.

virtual TPtrC8 MSenServiceDescription::FrameworkVersion  )  [pure virtual]
 

Getter for the framework version.

Returns:
The framework version or KNullDesC8 if not set.

Implemented in CSenXmlServiceDescription.

virtual TInt MSenServiceDescription::HasFacetL const TDesC8 &  aURI,
TBool &  aHasFacet
[pure virtual]
 

Method for checking if service description has a certain facet.

Parameters:
aURI  the facet to check, typically some URI.
aHasFacet  is ETrue if facet is found and EFalse, if not.
Returns:
KErrNone or other system-wide Symbian error codes.

Implemented in CSenXmlServiceDescription.

virtual TBool MSenServiceDescription::Matches MSenServiceDescription aPattern  )  [pure virtual]
 

Method returns ETrue if this service description matches the given pattern.

The bits of information that are in the pattern are read and compared to corresponding fields in this service description. Note that a pattern may have far fewer fields and that only the non-null and non-zero-length fields are compared. For example, assume that a pattern with only a contract was defined; with the contract set to "urn:example.com:service". Each service description with the same contract will match the pattern, even if such a service description has non-null/non-zero-length fields for other aspects.

Parameters:
aPattern  is a Service Description, typically with partial information.
Returns:
TBool ETrue if match, EFalse otherwise. If the value is not found from current instance, it is not used in comparison (even if offered in the given pattern).

Implemented in CSenServicePattern, and CSenXmlServiceDescription.

virtual TInt MSenServiceDescription::RemoveFacet const TDesC8 &  aURI  )  [pure virtual]
 

Removes a characteristic (Facet) from the description.

Parameters:
aURI  of the facet to be removed.
Returns:
KErrNone if a Facet was successfully removed KErrNotFound if a Facet could not be found Other system-wide Symbian error codes.

Implemented in CSenXmlServiceDescription.

virtual TInt MSenServiceDescription::ScoreMatchL MSenServiceDescription aPattern  )  [pure virtual]
 

Method returns a positive integer if this ServiceDescription matches the given pattern in at least one aspect.

Higher numbers mean a closer match. The bits of information that are in the pattern are read and compared to corresponding fields in this ServiceDescription. Note that a pattern may have far fewer fields and that only the non-null fields are compared. For example, assume that a pattern with only a contract was defined; with the contract set to "urn:example.com:service". Each ServiceDescription with the same contract will match the pattern, even if such a ServiceDescription has non-null fields for other aspects.

Parameters:
aPattern  a ServiceDescription, typically with partial information.
Returns:
the score. If nothing matches, returns 0

Implemented in CSenXmlServiceDescription.

virtual void MSenServiceDescription::SetContractL const TDesC8 &  aContract  )  [pure virtual]
 

Setter for contract.

Parameters:
aContract  the contract to be set.

Implemented in CSenXmlServiceDescription.

virtual void MSenServiceDescription::SetEndPointL const TDesC8 &  aEndPoint  )  [pure virtual]
 

Setter for endpoint.

Parameters:
aEndpoint  to the service. Note that endpoint cannot include characters which are illegal in XML. If endpoint is an URL which contains illegal characters (like '&'-char), those need to be encoded into XML entity form (like &). EncodeHttpCharactersLC() method from XmlUtils can be used for encoding of basic XML entities.

Implemented in CSenXmlServiceDescription.

virtual TInt MSenServiceDescription::SetFacetL const CSenFacet aFacet  )  [pure virtual]
 

Method for setting a facet.Adds a new facet, if non-existent.

But, if a facet with same name exists, it will be overridden.

Parameters:
aFacet  to be set. A copy of the original will be created.
Returns:
KErrNotFound if facet can not be found KErrNone if facet was found KErrNoMemory if no memory could be allocated for the value Other system-wide Symbian error codes.

Implemented in CSenXmlServiceDescription.

virtual void MSenServiceDescription::WriteAsXMLToL RWriteStream &  aWriteStream  )  [pure virtual]
 

Writes this service description as XML, in UTF-8 form to a stream.

Parameters:
aWriteStream  to write into.

Implemented in CSenXmlServiceDescription.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top