#include <mw/MSenMessage.h>
class MSenMessage |
Public Member Enumerations | |
---|---|
enum | TClass { EMessageBase, EHttpGetMsg, EHttpPostMsg, EHttpPutMsg, ..., EAtomMessage } |
enum | TDirection { EOutbound, EInbound } |
Public Member Functions | |
---|---|
pure virtual MSenMessage * | CloneL() |
pure virtual MSenMessageContext * | Context() |
pure virtual TDirection | Direction() |
pure virtual TBool | IsSafeToCast(TClass) |
pure virtual MSenProperties * | Properties() |
pure virtual TInt | SetContext(MSenMessageContext *) |
pure virtual TInt | SetProperties(MSenProperties *) |
pure virtual TInt | TxnId() |
pure virtual TClass | Type() |
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.
MSenMessageContext * | Context | ( | ) | [pure virtual] |
Getter for message's context
Returns: message context, if this message relates to (has associated with) such context, or NULL.
MSenProperties * | 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.
TInt | 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).
Parameter | Description |
---|---|
apNotOwnedContext | is the context. Ownership is NOT transferred to this message. |
Returns: KErrNone on success KErrArgument if apOwnedContext == NULL or system-wide errorcode otherwise.
TInt | SetProperties | ( | MSenProperties * | apOwnedProperties | ) | [pure virtual] |
Sets properties for this message. Most typical use case is to set message spesific transport properties. 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.
Parameter | Description |
---|---|
apOwnedProperties | pointer to the properties, which ownership is transferred to this class. This is performed in two different manners: |
Returns: KErrNone on success KErrArgument if apOwnedProperties == NULL or system-wide errorcode otherwise.
TInt | 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