CSenServicePattern Class Reference

#include <mw/SenServicePattern.h>

Link against: SenServDesc.lib

class CSenServicePattern : public CSenXmlServiceDescription

Inherits from

Protected Attributes
CSenConsumerPolicy *iConsumerPolicy
Public Member Functions
virtual ~CSenServicePattern()
virtual IMPORT_C TBoolAcceptsConsumerPolicy(MSenConsumerPolicy &)
virtual IMPORT_C TIntAddConsumerIdentityProviderIdL(const TDesC8 &)
virtual IMPORT_C TIntConsumerIapId(TUint32 &)
virtual IMPORT_C const CSenIdentityProviderIdArray8 &ConsumerIdentityProviderIds8L()
IMPORT_C HBufC8 *ConsumerPolicyAsXmlL()
IMPORT_C TIntConsumerSnapId(TUint32 &)
IMPORT_C TBoolMatches(MSenServiceDescription &)
IMPORT_C CSenServicePattern *NewL()
IMPORT_C CSenServicePattern *NewL(const TDesC8 &)
IMPORT_C CSenServicePattern *NewL(const TDesC8 &, const TDesC8 &)
IMPORT_C CSenServicePattern *NewLC()
IMPORT_C CSenServicePattern *NewLC(const TDesC8 &)
IMPORT_C CSenServicePattern *NewLC(const TDesC8 &, const TDesC8 &)
virtual IMPORT_C TIntRebuildFromConsumerPolicy(MSenConsumerPolicy &)
virtual IMPORT_C voidSetConsumerIapIdL(TUint32)
virtual IMPORT_C voidSetConsumerIdentityProviderIdsL(CSenIdentityProviderIdArray8 &)
IMPORT_C voidSetConsumerSnapIdL(TUint32)
IMPORT_C voidStartElementL(const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &)
Protected Member Functions
CSenServicePattern(MSenServiceDescription::TDescriptionClassType)
IMPORT_C voidBaseConstructL()
IMPORT_C voidBaseConstructL(const TDesC8 &)
IMPORT_C voidBaseConstructL(const TDesC8 &, const TDesC8 &)
Inherited Attributes
CSenBaseFragment::iState
CSenBaseFragment::iWs
CSenBaseFragment::iXmlReader
CSenBaseFragment::ipElement
CSenBaseFragment::ipOwner
CSenDomFragment::ipDomDelegate
CSenXmlServiceDescription::iType
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CSenBaseFragment::AllocContentSaverL()
CSenBaseFragment::AsElement()
CSenBaseFragment::BuildFrom(const TDesC8 &)
CSenBaseFragment::CSenBaseFragment()
CSenBaseFragment::ConsistsOfL(MSenFragment &)
CSenBaseFragment::Content()
CSenBaseFragment::ContentOf(const TDesC8 &)
CSenBaseFragment::DelegateParsingL(MSenFragment &)
CSenBaseFragment::DelegateParsingL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenBaseFragment::DetachL()
CSenBaseFragment::EnsureNamespace(const TDesC8 &)
CSenBaseFragment::ExtractElement()
CSenBaseFragment::LocalName()const
CSenBaseFragment::Namespace(const TDesC8 &)
CSenBaseFragment::NsPrefix()const
CSenBaseFragment::NsUri()const
CSenBaseFragment::ParseL(const TDesC8 &)
CSenBaseFragment::Reader()
CSenBaseFragment::ResetContentL()
CSenBaseFragment::SaveNamespacesL(const RAttributeArray &,TBool)
CSenBaseFragment::SetContentOfL(const TDesC8 &,const TDesC8 &)
CSenBaseFragment::SetOwner(MSenFragment &)
CSenBaseFragment::SetReader(CSenXmlReader &)
CSenBaseFragment::StartEntity(TDesC8 &)
CSenBaseFragment::~CSenBaseFragment()
CSenDomFragment::BaseConstructL(CSenXmlReader &)
CSenDomFragment::BaseConstructL(const CSenElement &)
CSenDomFragment::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenDomFragment::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenDomFragment::BaseConstructL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &,CSenElement &)
CSenDomFragment::CSenDomFragment()
CSenDomFragment::CharactersL(const TDesC8 &,TInt,TInt)
CSenDomFragment::ExpandL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenDomFragment::NewL(const CSenElement &)
CSenDomFragment::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenDomFragment::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenDomFragment::NewL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &,CSenElement &)
CSenDomFragment::ParseWithL(CSenXmlReader &)
CSenDomFragment::WriteEndElementL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenDomFragment::WriteStartElementL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenDomFragment::~CSenDomFragment()
CSenXmlServiceDescription::Accepts(MSenProviderPolicy &)
CSenXmlServiceDescription::AddFacetL(const CSenFacet &)
CSenXmlServiceDescription::AddIdentityProviderIdL(TDesC8 &)
CSenXmlServiceDescription::AsXmlL()
CSenXmlServiceDescription::AsXmlUnicodeL()
CSenXmlServiceDescription::CSenXmlServiceDescription(TDescriptionClassType)
CSenXmlServiceDescription::ConstructL()
CSenXmlServiceDescription::ConstructL(const TDesC8 &)
CSenXmlServiceDescription::ConstructL(const TDesC8 &,const TDesC8 &)
CSenXmlServiceDescription::Contract()
CSenXmlServiceDescription::Credentials()
CSenXmlServiceDescription::DescriptionClassType()
CSenXmlServiceDescription::EndElementL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenXmlServiceDescription::Endpoint()
CSenXmlServiceDescription::FacetValue(TDesC8 &,HBufC8 *&)
CSenXmlServiceDescription::FacetsL(RFacetArray &)
CSenXmlServiceDescription::FrameworkId()
CSenXmlServiceDescription::FrameworkVersion()
CSenXmlServiceDescription::HasEqualPrimaryKeysL(MSenServiceDescription &)
CSenXmlServiceDescription::HasFacetL(const TDesC8 &,TBool &)
CSenXmlServiceDescription::IapId(TUint32 &)
CSenXmlServiceDescription::IdentityProviderIds8L()
CSenXmlServiceDescription::IsLocalL()
CSenXmlServiceDescription::NewElementName()
CSenXmlServiceDescription::PromptUserInfo()
CSenXmlServiceDescription::ProviderId()
CSenXmlServiceDescription::RebuildFrom(MSenProviderPolicy &)
CSenXmlServiceDescription::RemoveFacet(const TDesC8 &)
CSenXmlServiceDescription::ResumeParsingFromL(const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenXmlServiceDescription::ScoreMatchL(MSenServiceDescription &)
CSenXmlServiceDescription::ServicePolicy()
CSenXmlServiceDescription::SetAttributesL(const RAttributeArray &)
CSenXmlServiceDescription::SetContractL(const TDesC8 &)
CSenXmlServiceDescription::SetEndPointL(const TDesC8 &)
CSenXmlServiceDescription::SetFacetL(const CSenFacet &)
CSenXmlServiceDescription::SetFrameworkIdL(const TDesC8 &)
CSenXmlServiceDescription::SetIapIdL(TUint32)
CSenXmlServiceDescription::SetIdentityProviderIdsL(CSenIdentityProviderIdArray8 &)
CSenXmlServiceDescription::SetPolicyL(const TDesC8 &)
CSenXmlServiceDescription::SetPolicyL(const TDesC8 &,const TDesC8 &)
CSenXmlServiceDescription::SetPolicyL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const TDesC8 &)
CSenXmlServiceDescription::SetPromptUserInfoL(TBool)
CSenXmlServiceDescription::SetProviderIdL(const TDesC8 &)
CSenXmlServiceDescription::SetSnapIdL(TUint32)
CSenXmlServiceDescription::SetTransportCueL(const TDesC8 &)
CSenXmlServiceDescription::SetTransportPropertiesL(const TDesC8 &)
CSenXmlServiceDescription::SnapId(TUint32 &)
CSenXmlServiceDescription::StartElementL(const TDesC8 &,const TDesC8 &,const TDesC8 &,const RAttributeArray &)
CSenXmlServiceDescription::TransportCue()
CSenXmlServiceDescription::TransportPropertiesL(HBufC8 *&)
CSenXmlServiceDescription::WriteAsXMLToL(RWriteStream &)
CSenXmlServiceDescription::~CSenXmlServiceDescription()

Detailed Description

Class derives the XML service description and further extends it by implementing consumer policy interface.

Service pattern is typically used by Basic Web Service consumers, which often know, which policy to use in the communication with certain Web Service Provider (WSP).

For example, a Basic Web Service consumer application might want strictly define certain Internet Access Point (IAP) to be used when initializing new service connection. Such an application can simply instantiate new ServicePattern and set pre-known IAP ID into it.

The main purpose of this class is to simplify the initialization of service connections for Basic Web Services.

It is important to note, that all the consumer policy information entered via ServicePattern extending the MSenConsumerPolicy is treated in "policy-per-client" terms. In other words, any consumer policy information will not be stored for latter use of other applications (even they might happen to use same WSP and contract!).

This is due the nature of Service Pattern: it acts as a consumer originated filter, after which a service will be resolved.

Any service which "meets" the Service Pattern "constraints", is considered as a "match", because such service accepts this (search) pattern.

Since
Series60 3.0

Member Attribute Documentation

iConsumerPolicy

CSenConsumerPolicy *iConsumerPolicy[protected]

Constructor & Destructor Documentation

CSenServicePattern ( MSenServiceDescription::TDescriptionClassType )

IMPORT_CCSenServicePattern(MSenServiceDescription::TDescriptionClassTypeaType)[protected]
C++ constructor.
Since
Series60 3.0
ParameterDescription
aTypeenumeration defininng the type of this class.

~CSenServicePattern ( )

IMPORT_C~CSenServicePattern()[virtual]

Destructor.

Member Function Documentation

AcceptsConsumerPolicy ( MSenConsumerPolicy & )

IMPORT_C TBoolAcceptsConsumerPolicy(MSenConsumerPolicy &aPolicyPattern)[virtual]

AddConsumerIdentityProviderIdL ( const TDesC8 & )

IMPORT_C TIntAddConsumerIdentityProviderIdL(const TDesC8 &aProviderId)[virtual]

BaseConstructL ( )

IMPORT_C voidBaseConstructL()[protected]
Base constructor offered to sub class implementations.
Since
Series60 3.0

BaseConstructL ( const TDesC8 & )

IMPORT_C voidBaseConstructL(const TDesC8 &aNamespaceURI)[protected]
Base constructor offered to sub class implementations.
Since
Series60 3.0
ParameterDescription
aNamespaceURIthe localname for XML element representation of this class.

BaseConstructL ( const TDesC8 &, const TDesC8 & )

IMPORT_C voidBaseConstructL(const TDesC8 &aEndPoint,
const TDesC8 &aContract
)[protected]
Base constructor offered to sub class implementations.
Since
Series60 3.0
ParameterDescription
aEndPointis the actual endpoint to the service
aContractof the service, typically some URI

ConsumerIapId ( TUint32 & )

IMPORT_C TIntConsumerIapId(TUint32 &aCurrentIapId)[virtual]

ConsumerIdentityProviderIds8L ( )

IMPORT_C const CSenIdentityProviderIdArray8 &ConsumerIdentityProviderIds8L()[virtual]

ConsumerPolicyAsXmlL ( )

IMPORT_C HBufC8 *ConsumerPolicyAsXmlL()
Convenience method for writing out the consumer policy as XML in UTF-8 form.
Since
Series60 3.0

Returns: consumer policy as UTF-8 form XML.

ConsumerSnapId ( TUint32 & )

IMPORT_C TIntConsumerSnapId(TUint32 &aCurrentSnapId)

Gets the Consumer SNAP ID.

ParameterDescription
aCurrentSnapIdA TUint32 reference to be filled in with the value of the SNAP ID.

Returns: KErrNone if no error, or some of the system wide error codes.

Matches ( MSenServiceDescription & )

IMPORT_C TBoolMatches(MSenServiceDescription &aServicePattern)
Compares that both service description and possible policy inside of it matches with this instance.
Since
Series60 3.0

Returns: ETrue both service description and policy information matches, otherwise EFalse. If some value is not set in current instance, it is not compared.

NewL ( )

IMPORT_C CSenServicePattern *NewL()[static]

Standard 2 phase constructors

NewL ( const TDesC8 & )

IMPORT_C CSenServicePattern *NewL(const TDesC8 &aNamespaceURI)[static]

Standard 2 phase constructor

ParameterDescription
aNamespaceURInamespace URI for the service pattern.

NewL ( const TDesC8 &, const TDesC8 & )

IMPORT_C CSenServicePattern *NewL(const TDesC8 &aEndPoint,
const TDesC8 &aContract
)[static]

Standard 2 phase constructor.

ParameterDescription
aEndPointservice pattern endpoint.
aContractservice pattern contract.

NewLC ( )

IMPORT_C CSenServicePattern *NewLC()[static]

Standard 2 phase constructors

NewLC ( const TDesC8 & )

IMPORT_C CSenServicePattern *NewLC(const TDesC8 &aNamespaceURI)[static]

Standard 2 phase constructor

ParameterDescription
aNamespaceURInamespace URI for the service pattern.

NewLC ( const TDesC8 &, const TDesC8 & )

IMPORT_C CSenServicePattern *NewLC(const TDesC8 &aEndPoint,
const TDesC8 &aContract
)[static]

Standard 2 phase constructor.

ParameterDescription
aEndPointservice pattern endpoint.
aContractservice pattern contract.

RebuildFromConsumerPolicy ( MSenConsumerPolicy & )

IMPORT_C TIntRebuildFromConsumerPolicy(MSenConsumerPolicy &aTemplate)[virtual]

SetConsumerIapIdL ( TUint32 )

IMPORT_C voidSetConsumerIapIdL(TUint32aIapId)[virtual]

SetConsumerIdentityProviderIdsL ( CSenIdentityProviderIdArray8 & )

IMPORT_C voidSetConsumerIdentityProviderIdsL(CSenIdentityProviderIdArray8 &aList)[virtual]

SetConsumerSnapIdL ( TUint32 )

IMPORT_C voidSetConsumerSnapIdL(TUint32aSnapId)

Sets the Consumer SNAP ID.

ParameterDescription
aSnapIdA TUint32 Snap ID

StartElementL ( const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray & )

IMPORT_C voidStartElementL(const TDesC8 &aNsUri,
const TDesC8 &aLocalName,
const TDesC8 &aQName,
const RAttributeArray &aAttributes
)
Callback function which implements the XML content handler interface. Parses the consumer policies independently.
Since
Series60 3.0
ParameterDescription
aNsUriThe namespace URI of the new element
aLocalNameThe local name of the new element
aQNameThe qualified name of the new element
aAttributesThe attributes of the new element