»
Symbian OS v6.1 Edition for C++ »
API Reference »
WAP Stack »
RWSPCOTrans
Location:
wapcli.h
Link against: wapstkcli.lib
RWSPCOTrans
Support
Supported from 6.0
Description
WSP connection-orientated transaction. Objects of this type are
returned by RWSPCOConn::CreateTransaction()
, and are used to
manage an individual transaction.
For error codes, see RWSPCOConn::TReturnCodes
.
Derivation
RSubSessionBase | Client-side handle to a sub-session |
RWSPCOTrans | WSP connection-orientated transaction |
|
Defined in RWSPCOTrans
:
Abort()
, Acknowledge()
, EAbortReason
, EAborted
, EAckHeaders
, EDone
, EInit
, EInvokeBody
, EInvokeHeaders
, EInvokeMethod
, EInvokeUri
, EPushBody
, EPushHeaders
, EPushing
, EReplying
, ERequesting
, EResultBody
, EResultHeaders
, EResultStatus
, GetData()
, GetState()
, RWSPCOTrans()
, Release()
, TAbortReason
, TDataType
, TState
, ~RWSPCOTrans()
Inherited from RSubSessionBase
:
CloseSubSession()
,
CreateSubSession()
,
Send()
,
SendReceive()
,
SubSessionHandle()
,
operator=()
See also:
Construction and destruction
RWSPCOTrans();
Description
Default constructor.
RWSPCOTrans(const RSubSessionBase& aSubSession);
Description
Constructor with initialisation from existing sub-session.
Parameters
const RSubSessionBase& aSubSession |
Sub-session to initialise new subsession with |
|
~RWSPCOTrans();
Description
Destructor.
TInt Abort(TAbortReason aReason);
Description
Aborts a method invoke or push transaction. This can be used when the
state of transaction is EInit
or ERequesting
.
Always call Release()
after this function to release the
transaction's resources.
Parameters
TAbortReason aReason |
Reason for abort |
|
Return value
TInt Acknowledge(const TDesC8& aAckHeaders);
Description
Acknowledges a transaction. This must be used to accept a confirmed
push from the server. If the protocol option "Acknowledgement Headers" is
enabled for the session, then all method requests are in EReplying
state and the application must call this function to acknowledge the
transaction.
Parameters
const TDesC8& aAckHeaders |
Acknowledgement headers. This can be empty. |
|
Return value
TInt GetData(TDes8& aBuffer, TDataType aDataType) const;
Description
Gets the data associated with a transaction. If the passed buffer is
smaller than the available data, then the function returns
EMoreData
and the remaining data can be read with successive
calls.
Parameters
TDes8& aBuffer |
On return, the data obtained |
TDataType aDataType |
Type of data to get |
|
Return value
TInt GetState(TState& aState) const;
Description
Gets the state the transaction is in.
Parameters
TState& aState |
On return, the state |
|
Return value
TInt Release();
Description
Releases the transaction. This must be called for completed or aborted
transactions to release the associated resources.
The function succeeds only if the state of the transaction is
EInit
, EAborted
or EDone
. If the
transaction is in any other state, the transaction should be first
aborted.
Note that the transaction can be still alive for a short period after
calling this function to be able to finish its last operations. This call
causes no network traffic.
Return value
TInt |
KErrNone on success, otherwise Error code |
|
typedef TUint8 TAbortReason;
Description
Abort reason.
See also:
TDataType
Description
Transaction data types.
See also:
TState
Description
Transaction states.
See also:
EInit |
State after transaction creation
|
ERequesting |
Transaction begun
|
EReplying |
This state is only used if the "Acknowledgement headers" protocol
capability is set for the session. In that case all transactions go from
ERequesting state to EReplying state. Otherwise all
transactions go from ERequesting to the EDone state
directly.
|
EDone |
Transaction complete
|
EAborted |
State after abort indication
|
EPushing |
State after confirmed push indication
|
|