MSenServiceDescription Class Reference

#include <mw/MSenServiceDescription.h>

Link against: SenServDesc.lib

class MSenServiceDescription
Public Member Enumerations
enumTDescriptionClassType { ERoot, EBaseServiceDescription, EXmlServiceDescription, EIdentityProvider, ..., EOviOAuthClient }
Public Member Functions
pure virtual TInt AddFacetL(const CSenFacet &)
pure virtual HBufC8 *AsXmlL()
pure virtual HBufC *AsXmlUnicodeL()
pure virtual TPtrC8 Contract()
pure virtual TDescriptionClassType DescriptionClassType()
pure virtual TPtrC8 Endpoint()
pure virtual TInt FacetValue(TDesC8 &, HBufC8 *&)
pure virtual TInt FacetsL(RFacetArray &)
pure virtual TPtrC8 FrameworkId()
pure virtual TPtrC8 FrameworkVersion()
pure virtual TInt HasFacetL(const TDesC8 &, TBool &)
pure virtual TBool Matches(MSenServiceDescription &)
pure virtual TInt RemoveFacet(const TDesC8 &)
pure virtual TInt ScoreMatchL(MSenServiceDescription &)
pure virtual voidSetContractL(const TDesC8 &)
pure virtual voidSetEndPointL(const TDesC8 &)
pure virtual TInt SetFacetL(const CSenFacet &)
pure virtual voidWriteAsXMLToL(RWriteStream &)

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.
Since
Series60 3.0

Member Enumeration Documentation

Member Function Documentation

AddFacetL ( const CSenFacet & )

TInt AddFacetL(const CSenFacet &aFacet)[pure virtual]
Method for adding a facet. Will NOT override an already existing facet with a same name.
Since
Series60 3.0
ParameterDescription
aFacetis 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

AsXmlL ( )

HBufC8 *AsXmlL()[pure virtual]
Gets the service description as XML fragment in UTF-8 format.
Since
Series60 3.0

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

AsXmlUnicodeL ( )

HBufC *AsXmlUnicodeL()[pure virtual]
Gets the service description as XML, in Unicode (UCS-2)
Since
Series60 3.0

Returns: the service description as XML, in Unicode (UCS-2) encoding form.

Contract ( )

TPtrC8 Contract()[pure virtual]
Getter for contract, which is typically some URI.
Since
Series60 3.0

Returns: the Contract

DescriptionClassType ( )

TDescriptionClassType 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.
Since
Series60 3.0

Returns: TDescriptionClassType enumeration identifying the class.

Endpoint ( )

TPtrC8 Endpoint()[pure virtual]
Getter for endpoint.
Since
Series60 3.0

Returns: The endpoint.

FacetValue ( TDesC8 &, HBufC8 *& )

TInt FacetValue(TDesC8 &aURI,
HBufC8 *&aValueTo
)[pure virtual]

FacetsL ( RFacetArray & )

TInt 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".
Since
Series60 3.0
ParameterDescription
aFacetArrayis 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.

FrameworkId ( )

TPtrC8 FrameworkId()[pure virtual]
Getter for the framework ID.
Since
Series60 3.0

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

FrameworkVersion ( )

TPtrC8 FrameworkVersion()[pure virtual]
Getter for the framework version.
Since
Series60 3.0

Returns: The framework version or KNullDesC8 if not set.

HasFacetL ( const TDesC8 &, TBool & )

TInt HasFacetL(const TDesC8 &aURI,
TBool &aHasFacet
)[pure virtual]
Method for checking if service description has a certain facet.
Since
Series60 3.0
ParameterDescription
aURIthe facet to check, typically some URI.
aHasFacetis ETrue if facet is found and EFalse, if not.

Returns: KErrNone or other system-wide Symbian error codes.

Matches ( MSenServiceDescription & )

TBool 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.
Since
Series60 3.0
ParameterDescription
aPatternis 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).

RemoveFacet ( const TDesC8 & )

TInt RemoveFacet(const TDesC8 &aURI)[pure virtual]
Removes a characteristic (Facet) from the description
Since
Series60 3.0
ParameterDescription
aURIof 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.

ScoreMatchL ( MSenServiceDescription & )

TInt ScoreMatchL(MSenServiceDescription &aPattern)[pure virtual]

This leaving variant of ScoreMatch() always returns a positive integer if this service description matches with the given pattern in at least one aspect. Higher numbers mean closer match.

In case of system error, method leaves.

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.
Since
Series60 3.0
ParameterDescription
aPatterna ServiceDescription, typically with partial information.

Returns: the score. If nothing matches, returns 0

SetContractL ( const TDesC8 & )

voidSetContractL(const TDesC8 &aContract)[pure virtual]
Setter for contract.
Since
Series60 3.0
ParameterDescription
aContractthe contract to be set.

SetEndPointL ( const TDesC8 & )

voidSetEndPointL(const TDesC8 &aEndPoint)[pure virtual]
Setter for endpoint.
Since
Series60 3.0

SetFacetL ( const CSenFacet & )

TInt 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.
Since
Series60 3.0
ParameterDescription
aFacetto 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.

WriteAsXMLToL ( RWriteStream & )

voidWriteAsXMLToL(RWriteStream &aWriteStream)[pure virtual]
Writes this service description as XML, in UTF-8 form to a stream
Since
Series60 3.0
ParameterDescription
aWriteStreamto write into.