RPnPServiceDiscovery Class Reference

class RPnPServiceDiscovery

A generic class which provides the functionality to provision the applications who want to discover services and listen for service related notifications. The service discovery and related notification are technology specific.

Public Member Functions
RPnPServiceDiscovery()
IMPORT_C voidCancel(const RPnPParameterBundle &)
IMPORT_C voidClose()
IMPORT_C voidDescribe(const RPnPParameterBundle &)
IMPORT_C voidDiscover(const RPnPParameterBundle &)
IMPORT_C TIntInitiateControl(RControlChannel &, const TDesC8 &)
IMPORT_C TIntOpen(TUint)
IMPORT_C voidRegisterNotify(const RPnPParameterBundle &)
IMPORT_C voidSubscribe(const RPnPParameterBundle &)
Private Attributes
CPnPServiceDiscoveryBase *iPnPServiceDiscoveryImpl

Constructor & Destructor Documentation

RPnPServiceDiscovery()

IMPORT_CRPnPServiceDiscovery()

Constructor

Member Functions Documentation

Cancel(const RPnPParameterBundle &)

IMPORT_C voidCancel(const RPnPParameterBundle &aServiceInfo)

Issues a cancel request to ongoing discoveries, describe , subscribe requests .This also cancels notify of previously registered events from remote service. The technology specific discovery cancellation information is packed in aServiceInfo.

Parameters

const RPnPParameterBundle & aServiceInfo

Close()

IMPORT_C voidClose()

Close technology specific session.

Describe(const RPnPParameterBundle &)

IMPORT_C voidDescribe(const RPnPParameterBundle &aServiceInfo)

Retrieves the description of the remote service. The technology specific description information is packed in aServiceInfo parameter. The caller should set a callback function of type MPnPObserver in aServiceInfo to retrieve description responses. When the responses are received MPnPObserver OnPnPEventL is called for each response and calling clients must provide the implementation to handle the responses.

In case invalid input is provided in the form of corrupted uris for describe or low memory conditions,the application returns synchronously with MPnPObserver::OnPnPError.However application is not able to filter out all invalid URLs

Parameters

const RPnPParameterBundle & aServiceInfo

Discover(const RPnPParameterBundle &)

IMPORT_C voidDiscover(const RPnPParameterBundle &aServiceInfo)

Issues a discovery request. The technology specific discovery information is packed in aServiceInfo parameter. The caller should set a callback function of type MPnPCallBack in aServiceInfo to retrieve discovery responses. When the responses are received, MPnPObserver::OnPnPEventL is called for each response and calling clients must provide the implementation to handle the responses.

In case of invalid input is provided in the form of corrupted uris for searching or low memory conditions,the application returns synchronously with MPnPObserver::OnPnPError

Parameters

const RPnPParameterBundle & aServiceInfoParameter bundle contains the discovery information.

InitiateControl(RControlChannel &, const TDesC8 &)

IMPORT_C TIntInitiateControl(RControlChannel &aControlChannel,
const TDesC8 &aUri
)

It enables to send and receive messages.

Parameters

RControlChannel & aControlChannel
const TDesC8 & aUri

Open(TUint)

IMPORT_C TIntOpen(TUintaTierID)

Resolves the technology.

Parameters

TUint aTierIDimplementation UID. Identifies technology for which service discovery is requested.

RegisterNotify(const RPnPParameterBundle &)

IMPORT_C voidRegisterNotify(const RPnPParameterBundle &aServiceInfo)

Registers for events of remote service. The technology specific registration information is packed in aServiceInfo. The caller can set a callback function of type MPnPObserver in aServiceInfo to retrieve response of registration.

In case invalid input is provided in the form of corrupted uris for registration or low memory conditions,the application returns synchronously with MPnPObserver::OnPnPError.

Parameters

const RPnPParameterBundle & aServiceInfo

Subscribe(const RPnPParameterBundle &)

IMPORT_C voidSubscribe(const RPnPParameterBundle &aServiceInfo)

Subscribes for event notifications to the remote service or device . The technology specific description information is packed in aServiceInfo parameter. The caller should set a callback function of type MPnPObserver in aServiceInfo to retrieve description responses. When the responses are received MPnPObserver OnPnPEventL is called for each response and calling clients must provide the implementation to handle the responses.

In case invalid input is provided in the form of corrupted uris for subscribe or low memory conditions,the application returns synchronously with MPnPObserver::OnPnPError.However application is not able to filter out all invalid URLs

Parameters

const RPnPParameterBundle & aServiceInfo

Member Data Documentation

CPnPServiceDiscoveryBase * iPnPServiceDiscoveryImpl

CPnPServiceDiscoveryBase *iPnPServiceDiscoveryImpl[private]