CSenServicePattern Class Reference

class CSenServicePattern : public CSenXmlServiceDescription

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.

SenServDesc.lib
Since
Series60 3.0
Public Member Functions
~CSenServicePattern()
IMPORT_C TBoolAcceptsConsumerPolicy(MSenConsumerPolicy &)
IMPORT_C TIntAddConsumerIdentityProviderIdL(const TDesC8 &)
IMPORT_C TIntConsumerIapId(TUint32 &)
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 &)
IMPORT_C TIntRebuildFromConsumerPolicy(MSenConsumerPolicy &)
IMPORT_C voidSetConsumerIapIdL(TUint32)
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 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()
Protected Attributes
CSenConsumerPolicy *iConsumerPolicy
Inherited Attributes
CSenBaseFragment::iState
CSenBaseFragment::iWs
CSenBaseFragment::iXmlReader
CSenBaseFragment::ipElement
CSenBaseFragment::ipOwner
CSenDomFragment::ipDomDelegate
CSenXmlServiceDescription::iType

Constructor & Destructor Documentation

CSenServicePattern(MSenServiceDescription::TDescriptionClassType)

IMPORT_CCSenServicePattern(MSenServiceDescription::TDescriptionClassTypeaType)[protected]
C++ constructor.
Since
Series60 3.0

Parameters

MSenServiceDescription::TDescriptionClassType aTypeenumeration defininng the type of this class.

~CSenServicePattern()

IMPORT_C~CSenServicePattern()[virtual]

Destructor.

Member Functions Documentation

AcceptsConsumerPolicy(MSenConsumerPolicy &)

IMPORT_C TBoolAcceptsConsumerPolicy(MSenConsumerPolicy &aPolicyPattern)[virtual]

Parameters

MSenConsumerPolicy & aPolicyPattern

AddConsumerIdentityProviderIdL(const TDesC8 &)

IMPORT_C TIntAddConsumerIdentityProviderIdL(const TDesC8 &aProviderId)[virtual]

Parameters

const TDesC8 & aProviderId

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

Parameters

const TDesC8 & 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

Parameters

const TDesC8 & aEndPointis the actual endpoint to the service
const TDesC8 & aContractof the service, typically some URI

ConsumerIapId(TUint32 &)

IMPORT_C TIntConsumerIapId(TUint32 &aCurrentIapId)[virtual]

Parameters

TUint32 & aCurrentIapId

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

ConsumerSnapId(TUint32 &)

IMPORT_C TIntConsumerSnapId(TUint32 &aCurrentSnapId)

Gets the Consumer SNAP ID.

Parameters

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

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

Parameters

MSenServiceDescription & aServicePattern

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

Parameters

const TDesC8 & 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.

Parameters

const TDesC8 & aEndPointservice pattern endpoint.
const TDesC8 & 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

Parameters

const TDesC8 & 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.

Parameters

const TDesC8 & aEndPointservice pattern endpoint.
const TDesC8 & aContractservice pattern contract.

RebuildFromConsumerPolicy(MSenConsumerPolicy &)

IMPORT_C TIntRebuildFromConsumerPolicy(MSenConsumerPolicy &aTemplate)[virtual]

Parameters

MSenConsumerPolicy & aTemplate

SetConsumerIapIdL(TUint32)

IMPORT_C voidSetConsumerIapIdL(TUint32aIapId)[virtual]

Parameters

TUint32 aIapId

SetConsumerIdentityProviderIdsL(CSenIdentityProviderIdArray8 &)

IMPORT_C voidSetConsumerIdentityProviderIdsL(CSenIdentityProviderIdArray8 &aList)[virtual]

Parameters

CSenIdentityProviderIdArray8 & aList

SetConsumerSnapIdL(TUint32)

IMPORT_C voidSetConsumerSnapIdL(TUint32aSnapId)

Sets the Consumer SNAP ID.

Parameters

TUint32 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

Parameters

const TDesC8 & aNsUriThe namespace URI of the new element
const TDesC8 & aLocalNameThe local name of the new element
const TDesC8 & aQNameThe qualified name of the new element
const RAttributeArray & aAttributesThe attributes of the new element

Member Data Documentation

CSenConsumerPolicy * iConsumerPolicy

CSenConsumerPolicy *iConsumerPolicy[protected]