MSenMessage Class Reference

Link against: senmessages.lib


#include <
MSenMessage.h>

Inherited by CSenSoapEnvelope2.


Detailed Description

This is abstract interface defines set of WSF message classes, providing convenience for other components, which typically cast this to some subclass via
IsSafeToCast() method.
Dll SenMessages.lib
Since:
Series60 4.0

Public Types

enum  TClass {
  EMessageBase = 0, EHttpGetMsg = 1, EHttpPostMsg = 2, EHttpPutMsg = 3,
  EHttpDeleteMsg = 4, ESoapEnvelope = 5, ESoapMessage = 6, ESoapEnvelope2 = 7,
  ESoapMessage2 = 8, ESoapMessageDom2 = 9, EAtomMessage = 10
}
 Class Enumeration. More...
enum  TDirection { EOutbound = 0, EInbound = 1 }
 Direction Enumeration. More...

Public Member Functions

virtual TClass Type ()=0
 Gets the Message Type.
virtual TDirection Direction ()=0
 Gets the Message Direction.
virtual TInt SetContext (MSenMessageContext *apNotOwnedContext)=0
 Sets message context for this message.
virtual MSenMessageContext * Context ()=0
 Getter for message's context.
virtual TInt SetProperties (MSenProperties *apOwnedProperties)=0
 Sets properties for this message.
virtual MSenPropertiesProperties ()=0
 Getter for message specific (transport) properties.
virtual TBool IsSafeToCast (TClass aType)=0
virtual TInt TxnId ()=0
 Getter for transaction ID of this message.
virtual MSenMessageCloneL ()=0
 Clone method that duplicates this message -- including all member data in the message.

Member Enumeration Documentation

enum MSenMessage::TClass
 

Class Enumeration.

Enumerator:
EMessageBase 
EHttpGetMsg 
EHttpPostMsg 
EHttpPutMsg 
EHttpDeleteMsg 
ESoapEnvelope 
ESoapMessage 
ESoapEnvelope2 
ESoapMessage2 
ESoapMessageDom2 
EAtomMessage 
enum MSenMessage::TDirection
 

Direction Enumeration.

Enumerator:
EOutbound 
EInbound 

Member Function Documentation

virtual MSenMessage* MSenMessage::CloneL  )  [pure virtual]
 

Clone method that duplicates this message -- including all member data in the message.

For the service consumers, a typical use case for cloning the message is when there is need to preserve the received response beyond the life time of a transaction. Normally, the response messages, that are owned by service connection are de-allocated after execution returns from MSenServiceConsumer interface's HandleMessageL or HandleErrorL method, back to the service connection.

Returns:
a pointer to a new message class instance, which ownership IS transferred to a caller. Note that caller is expected to cast this pointer to a proper subclass via the use of IsSafeToCast method. In case of responses, the message type is normally equal with the type of the request message that was sent by the consumer.

Implemented in CSenSoapEnvelope2, and CSenSoapMessage2.

virtual MSenMessageContext* MSenMessage::Context  )  [pure virtual]
 

Getter for message's context.

Returns:
message context, if this message relates to (has associated with) such context, or NULL.

Implemented in CSenSoapEnvelope2.

virtual TDirection MSenMessage::Direction  )  [pure virtual]
 

Gets the Message Direction.

Implemented in CSenSoapEnvelope2.

virtual TBool MSenMessage::IsSafeToCast TClass  aType  )  [pure virtual]
 
virtual MSenProperties* MSenMessage::Properties  )  [pure virtual]
 

Getter for message specific (transport) properties.

Returns:
(transport) properties of this message, if such have been applied to this message or NULL otherwise.

Implemented in CSenSoapEnvelope2.

virtual TInt MSenMessage::SetContext MSenMessageContext *  apNotOwnedContext  )  [pure virtual]
 

Sets message context for this message.

If context already exists, it is discarded and replaced by this context (context reset is performed).

Parameters:
apNotOwnedContext is the context. Ownership is NOT transferred to this message.
Returns:
KErrNone on success KErrArgument if apOwnedContext == NULL or system-wide errorcode otherwise.

Implemented in CSenSoapEnvelope2.

virtual TInt MSenMessage::SetProperties MSenProperties apOwnedProperties  )  [pure virtual]
 

Sets properties for this message.

Most typical use case is to set message spesific transport properties.

Parameters:
apOwnedProperties pointer to the properties, which ownership is transferred to this class. This is performed in two different manners:
1. If message has context, the properties are (re)set into that context, discarding any pre-existing properties.

2. If context is NOT available, properties will be directly owned by this message.

Returns:
KErrNone on success KErrArgument if apOwnedProperties == NULL or system-wide errorcode otherwise.

Implemented in CSenSoapEnvelope2.

virtual TInt MSenMessage::TxnId  )  [pure virtual]
 

Getter for transaction ID of this message.

In case of receiving a response message from service provider, this transaction ID may be used to map the response with request that the service consumer sent via service connection. In such case, the consumer can store return value from SendL method that was invoked in order maintain this mapping.

Returns:
the transaction ID of this message

Implemented in CSenSoapEnvelope2.

virtual TClass MSenMessage::Type  )  [pure virtual]
 

Gets the Message Type.

Implemented in CSenSoapEnvelope2, and CSenSoapMessage2.


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

Copyright © Nokia Corporation 2001-2007
Back to top