MSenHostlet Class Reference

Link against: senhostconn.lib


#include <
MSenHostlet.h>

Public Member Functions

virtual TInt ServiceL (MSenHostletRequest &aRequest, MSenHostletResponse &aResponse)=0
 Main method for receiving incoming messages, which are typically SOAP / XML, and for providing service for these requests.
virtual TPtrC8 Endpoint () const =0
 Defines the service endpoint for this hostlet.
virtual TPtrC8 Contract () const =0
 Defines the service constract URI for this hostlet.
virtual TPtrC8 FrameworkId () const
 Defines the framework for this hostlet.
virtual void DescribeServiceL (CSenXmlServiceDescription &aSD)
 Each Hostlet implementation may further describes its service via this callback.
virtual void OnServiceCompleteL (TInt, TInt, const TDesC8 &)
 This callback function is invoked each time when any hostlet connection's asynchronous RespondL is completed.
virtual TAny * GetInterfaceByUid (TUid)
 Hostlet connection calls this method several times, passing a different UID per each call.

Member Function Documentation

virtual TPtrC8 MSenHostlet::Contract  )  const [pure virtual]
 

Defines the service constract URI for this hostlet.

Returns:
the URI identifier for the provided service, for example "urn:liberty:id-sis-pp:2003-08". Note that there might be multiple hostlets (local service providers) which all share common service type, that is, they all have same service contract URI.
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
virtual void MSenHostlet::DescribeServiceL CSenXmlServiceDescription aSD  )  [inline, virtual]
 

Each Hostlet implementation may further describes its service via this callback.

Parameters:
aSD is the description, where service specific attributes can be defined. Default, inline implementation sets the endpoint, contract and framework ID by calling the other, more simple callbacks.
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:
aSD is 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.
virtual TPtrC8 MSenHostlet::Endpoint  )  const [pure virtual]
 

Defines the service endpoint for this hostlet.

Returns:
endpoint that this hostlet has specified. If hostlet implementation does not wish to define any endpoint, but to use contract only, it should return KNullDesC8 (zero-length descriptor). In such case, CSenHostletConnection constructor will attempt to resolve secure identifier (UID3) of the application, and use that to generate a locally unique endpoint. If the UID3 is not available, then the constructor of CSenHostletConnection will leave with the following error code: KErrSenNoContractNoEndPoint
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).

virtual TPtrC8 MSenHostlet::FrameworkId  )  const [inline, virtual]
 

Defines the framework for this hostlet.

Returns:
the framework ID. Default inline implementation returns RESTful service invocation framework ID, KDefaultRestServicesFrameworkID, as defined in SenServiceConnection.h
virtual TAny* MSenHostlet::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:
aUID is the unique identifier of some interface
Returns:
value should be a valid (void) pointer to any interface implemented by the application. NULL signalizes that application does not provide interface for give UID.
virtual void MSenHostlet::OnServiceCompleteL 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:
aTxnId identifies what transaction (service message) was completed
aCompletionCode indicates whether transaction completed ok (KErrNone) or not (error code).
aDesc may provide additional information about completed transaction, typically this description is provided, if an error has occured. It is optional for hostlet implementation to implement this method.
virtual TInt MSenHostlet::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:
aRequestUtf8 the request that needs to be be processed by the hostlet application (local service provider).
aResponse is where response data is to be set. CSenHostletConnection::ResponsdL should be called in order to send the response back to the requester (service consumer).

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2007
Back to top