S60 3rd Edition API Reference: CSIPServerTransaction Class Reference

CSIPServerTransaction Class Reference

API published in: S60 2nd Ed

Link against: sipclient.lib

Capability Information

Required Capabilities

Location NetworkControl NetworkServices ReadDeviceData WriteDeviceData


#include <sipservertransaction.h>

Inherits CSIPTransactionBase.


Detailed Description

PublishedAll
Released
Class for managing SIP server transactions. It provides services for creating, ending and getting SIP transaction parameters. Client cannot instantiate this class.

Public Member Functions

IMPORT_C ~CSIPServerTransaction ()
 Destructor.
IMPORT_C void SendResponseL (CSIPResponseElements *aElements)
 Sends response and ends the transaction; The user must not send 100 Trying response.
IMPORT_C const CSIPRequestElementsRequestElements () const
 Gets the request elements.
IMPORT_C TBool ResponseAllowed () const
 Checks if the response sending is allowed for this server transaction.
void SetResponseSender (MSIPResponseSender *aSender)
 Sets a new respose sender, replacing the current sender.
CSIPDialogImplementation * Dialog () const
 If the request was received inside a dialog, returns the dialog.
CSIPConnectionSIPConnectionL ()
 Obtains the associated CSIPConnection instance.
void ReAssociateL (MTransactionAssociation &aAssociation)
 Update the MTransactionAssociation to point to aAssociation.

Static Public Member Functions

static void DetachRequestElements (TAny *aServerTransaction)
 Removes, but does not delete, request elements from aServerTransaction.
static CSIPServerTransactionNewL (TUint32 aRequestId, MTransactionAssociation &aAssociation, CSIPRequestElements *aElements)
 Creates a server transaction.
static CSIPServerTransactionNewLC (TUint32 aRequestId, MTransactionAssociation &aAssociation, CSIPRequestElements *aElements)
 Creates a server transaction and pushes it to cleanup stack.

Constructor & Destructor Documentation

IMPORT_C CSIPServerTransaction::~CSIPServerTransaction  ) 
 

Destructor.


Member Function Documentation

static void CSIPServerTransaction::DetachRequestElements TAny *  aServerTransaction  )  [static]
 

Removes, but does not delete, request elements from aServerTransaction.

Parameters:
aServerTransaction Server transaction from which response elements are removed. Ownership is not transferred.
CSIPDialogImplementation* CSIPServerTransaction::Dialog  )  const
 

If the request was received inside a dialog, returns the dialog.

Returns:
CSIPDialogImplementation* The dialog inside which the request was received, or NULL. Ownership is not transferred.
static CSIPServerTransaction* CSIPServerTransaction::NewL TUint32  aRequestId,
MTransactionAssociation &  aAssociation,
CSIPRequestElements aElements
[static]
 

Creates a server transaction.

Parameters:
aRequestId RequestId for the transaction to use
aAssociation Object with which the transaction is associated
aElements Request elements. Ownership is transferred.
Returns:
New object. Ownership is transferred.
static CSIPServerTransaction* CSIPServerTransaction::NewLC TUint32  aRequestId,
MTransactionAssociation &  aAssociation,
CSIPRequestElements aElements
[static]
 

Creates a server transaction and pushes it to cleanup stack.

Parameters:
aRequestId RequestId for the transaction to use
aAssociation Object with which the transaction is associated
aElements Request elements. Ownership is transferred.
Returns:
New object. Ownership is transferred.
void CSIPServerTransaction::ReAssociateL MTransactionAssociation &  aAssociation  ) 
 

Update the MTransactionAssociation to point to aAssociation.

Parameters:
aAssociation Associated object
IMPORT_C const CSIPRequestElements* CSIPServerTransaction::RequestElements  )  const
 

Gets the request elements.

Returns:
Request elements. Ownership is not transferred.
IMPORT_C TBool CSIPServerTransaction::ResponseAllowed  )  const
 

Checks if the response sending is allowed for this server transaction.

For instance response is not allowed in ACK transaction.

Returns:
ETrue if response sending is allowed, EFalse otherwise
IMPORT_C void CSIPServerTransaction::SendResponseL CSIPResponseElements aElements  ) 
 

Sends response and ends the transaction; The user must not send 100 Trying response.

Leaves on failure.

Precondition:
aElements!=0

State()==ETrying || State()==EProceeding

CSIPConnection::State()==EActive

ResponseAllowed()==ETrue

Parameters:
aElements contains Status Code, optional Reason Phrase and optional SIP message headers and body. Ownership is transferred.
Leave:
KErrArgument if aElements == NULL
Leave:
KErrGeneral if ResponseAllowed() == EFalse
Leave:
KErrSIPInvalidTransactionState if State()!=ETrying and State()!=EProceeding
Leave:
KErrSIPInvalidDialogState if sending response to a request within dialog, and the dialog is in terminated state.
Leave:
KErrSIPResourceNotAvailable if a required SIP Client API object has been deleted NetworkServices
void CSIPServerTransaction::SetResponseSender MSIPResponseSender *  aSender  ) 
 

Sets a new respose sender, replacing the current sender.

Parameters:
aSender Response sender to be used from now on. Ownership is transferred.
CSIPConnection& CSIPServerTransaction::SIPConnectionL  ) 
 

Obtains the associated CSIPConnection instance.

If connection can't be accessed anymore, this function leaves.

Returns:
CSIPConnection

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

Copyright © Nokia Corporation 2001-2007
Back to top