MSenHostlet Class Reference

class MSenHostlet

Member Functions Documentation

Contract()

TPtrC8 Contract()const [pure virtual]

Defines the service constract URI for this hostlet Note: Hostlets, which don't provide endpoint and don't have UID3, cannot create hostlet connection: instead, CSenHostletConnection constructor will leave with the following error code: KErrSenNoContractNoEndPoint

DescribeServiceL(CSenXmlServiceDescription &)

voidDescribeServiceL(CSenXmlServiceDescription &aSD)[inline, virtual]

Each Hostlet implementation may further describes its service via this callback. It is mandatory for each hostlet to define either endpoint or contract. Otherwise, the constuctor of CSenHostletConnection will leave with the following error code: KErrSenNoContractNoEndPoint - neither endpoint or contract was specified. This is illegal, since the service would lack an identifier.

Parameters

CSenXmlServiceDescription & aSDis the service description into which this hostlet may further define other service specific information, like facets. Note that this call back is "stronger" than Endpoint() and Contract(), and thus any value specified in this method will be in effect for the hostlet connection.

Endpoint()

TPtrC8 Endpoint()const [pure virtual]

Defines the service endpoint for this hostlet Note: Hostlets, which don't provide endpoint and don't have UID3, cannot create hostlet connection: instead, CSenHostletConnection constructor will leave with the following code: KErrSenNoContractNoEndPoint

If endpoint is not specified, hostlet connection itself will generate an endpoint from applications secure ID (UID3) if such is available, and consumers can invoke the service via the provided contract ("service type" identifier).

FrameworkId()

TPtrC8 FrameworkId()const [inline, virtual]

Defines the framework for this hostlet.

GetInterfaceByUid(TUid)

TAny *GetInterfaceByUid(TUid)[inline, virtual]

Hostlet connection calls this method several times, passing a different UID per each call. If application wants to provide particular interface to hostlet connection (web services stack), it needs to return a pointer to such M-class as a return value of this method. For any interface, that application has not implemented, it is supposed to return NULL.

Parameters

TUid

OnServiceCompleteL(TInt, TInt, const TDesC8 &)

voidOnServiceCompleteL(TInt,
TInt,
const TDesC8 &
)[inline, virtual]

This callback function is invoked each time when any hostlet connection's asynchronous RespondL is completed. Method can be used to trigger the release of some response releated system resources, as it is invoked after the response has been delivered to the consumer (application may wish to close handles to reserved file or memory).

Parameters

TInt
TInt
const TDesC8 &

ServiceL(MSenHostletRequest &, MSenHostletResponse &)

TInt ServiceL(MSenHostletRequest &aRequest,
MSenHostletResponse &aResponse
)[pure virtual]

Main method for receiving incoming messages, which are typically SOAP / XML, and for providing service for these requests.

Parameters

MSenHostletRequest & aRequest
MSenHostletResponse & aResponseis where response data is to be set. CSenHostletConnection::ResponsdL should be called in order to send the response back to the requester (service consumer).