S60 3rd Edition API Reference: CSIPConnection Class Reference

CSIPConnection Class Reference

API published in: S60 2nd Ed

Link against: sipclient.lib

Capability Information

Required Capabilities

Location NetworkControl NetworkServices ReadDeviceData WriteDeviceData


#include <sipconnection.h>

Detailed Description

PublishedAll
Released
Class for monitoring connection's state and sending SIP requests outside the dialog associations. Class must not be used

Note that the user can have only one instance of the class per same IAP-id.


Public Types

enum  TState {
  EInit = 1, EActive, ESuspended, EInactive,
  EUnavailable
}
 Connection states. More...

Public Member Functions

IMPORT_C ~CSIPConnection ()
 Destructor NetworkServices.
IMPORT_C TState State () const
 Gets current state of the connection.
IMPORT_C CSIPClientTransactionSendRequestL (CSIPRequestElements *aElements, const MSIPRegistrationContext &aContext)
 Creates SIP request and sends it to the given destination.
IMPORT_C CSIPClientTransactionSendRequestL (CSIPRequestElements *aElements, const MSIPRegistrationContext &aContext, CSIPRefresh &aRefresh)
 Creates SIP request and sends it to the given destination.
IMPORT_C CSIPClientTransactionSendRequestL (CSIPRequestElements *aElements)
 Creates SIP request and sends it to the given destination.
IMPORT_C CSIPClientTransactionSendRequestL (CSIPRequestElements *aElements, CSIPRefresh &aRefresh)
 Creates SIP request and sends it to the given destination.
IMPORT_C CSIPClientTransactionFetchRegistrationsL (CSIPRequestElements *aElements)
 Creates SIP REGISTER request and sends it to the given destination.
IMPORT_C TUint32 IapId () const
 Gets Iap-id used for this connection.
IMPORT_C CSIPSIP ()
 Gets SIP server handle.
IMPORT_C const CSIPSIP () const
 Gets SIP server handle.
IMPORT_C void SetOptL (TUint aOptionName, TUint aOptionLevel, const TDesC8 &aOption=KNullDesC8)
 Sets a RSocket option used for all the sockets used for sending SIP requests and responses in this CSIPConnection.
IMPORT_C void SetOptL (TUint aOptionName, TUint aOptionLevel, TInt aOption)
 Sets a RSocket option used for all the sockets used for sending SIP requests and responses in this CSIPConnection.
IMPORT_C void GetLocalAddrL (TInetAddr &aAddr) const
 Gets the local IP address of this CSIPConnection that is used by the SIP implementation.
CSIPConnectionImplementation & Implementation ()
 Returns the implementation instance.

Static Public Member Functions

static IMPORT_C CSIPConnectionNewL (CSIP &aSIP, TUint32 aIapId, MSIPConnectionObserver &aObserver)
 Two-phased constructor.
static IMPORT_C CSIPConnectionNewLC (CSIP &aSIP, TUint32 aIapId, MSIPConnectionObserver &aObserver)
 Two-phased constructor.

Member Enumeration Documentation

enum CSIPConnection::TState
 

Connection states.

Enumerator:
EInit  Connection initializing.
EActive  Connection active.
ESuspended  Connection suspended.
EInactive  Connection is inactive.
EUnavailable  Connection is permanently unavailable.

Constructor & Destructor Documentation

IMPORT_C CSIPConnection::~CSIPConnection  ) 
 

Destructor NetworkServices.


Member Function Documentation

IMPORT_C CSIPClientTransaction* CSIPConnection::FetchRegistrationsL CSIPRequestElements aElements  ) 
 

Creates SIP REGISTER request and sends it to the given destination.

User must no define any Contact or Expires-headers in the provided elements.

Precondition:
State() == EActive

aElements != 0

aElements->Method().DesC().Length()==0

Parameters:
aElements contains local and remote addresses, optional SIP message headers and body. User must not set any expires values to aElements. The ownership is transferred.
Returns:
SIP REGISTER client transaction, ownership is transferred
Leave:
KErrArgument if aElements == 0 or if the request method has been defined in aElements NetworkServices
IMPORT_C void CSIPConnection::GetLocalAddrL TInetAddr &  aAddr  )  const
 

Gets the local IP address of this CSIPConnection that is used by the SIP implementation.

The user should re-new the call whenever the connection state changes to the CSIPConnection::EActive in order to verify the correctness of the previously retrieved local IP address. The local IP address might be different as a result of the connection state change.

Precondition:
State() == CSIPConnection::EActive
Parameters:
aAddr on return filled with local IP address
Leave:
a system-wide error code
IMPORT_C TUint32 CSIPConnection::IapId  )  const
 

Gets Iap-id used for this connection.

Returns:
Iap-id
CSIPConnectionImplementation& CSIPConnection::Implementation  ) 
 

Returns the implementation instance.

Returns:
CSIPConnectionImplementation
static IMPORT_C CSIPConnection* CSIPConnection::NewL CSIP aSIP,
TUint32  aIapId,
MSIPConnectionObserver aObserver
[static]
 

Two-phased constructor.

Parameters:
aSip a handle to the SIP server
aIapId IAP-id
aObserver a observer for receiving asynchonous events on this connection
Returns:
New object, ownership is transferred NetworkServices
static IMPORT_C CSIPConnection* CSIPConnection::NewLC CSIP aSIP,
TUint32  aIapId,
MSIPConnectionObserver aObserver
[static]
 

Two-phased constructor.

Constructs an object and adds the pointer to the cleanup stack;

Parameters:
aSip a handle to the SIP server
aIapId IAP-id
aObserver a observer for receiving asynchonous events on this connection
Returns:
New object, ownership is transferred NetworkServices
IMPORT_C CSIPClientTransaction* CSIPConnection::SendRequestL CSIPRequestElements aElements,
CSIPRefresh aRefresh
 

Creates SIP request and sends it to the given destination.

The function must not be used with SIP requests that creates SIP dialog associations or must be sent within SIP dialog association. This invokes the Non-invite state machine.

Precondition:
State() == EActive.

aElements.FromHeader() != 0

Parameters:
aElements contains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
aRefresh indicates that transaction will be refreshed
Returns:
SIP client transaction, ownership is transferred
Leave:
KErrArgument if aElements == 0 or if From-header is not present in aElements NetworkServices
IMPORT_C CSIPClientTransaction* CSIPConnection::SendRequestL CSIPRequestElements aElements  ) 
 

Creates SIP request and sends it to the given destination.

The function must not be used with SIP requests that creates SIP dialog associations or must be sent within SIP dialog association. This invokes the Non-invite state machine.

Precondition:
State() == EActive.

aElements.FromHeader() != 0

Parameters:
aElements contains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
Returns:
SIP client transaction, ownership is transferred
Leave:
KErrArgument if aElements == 0 or if From-header is not present in aElements NetworkServices
IMPORT_C CSIPClientTransaction* CSIPConnection::SendRequestL CSIPRequestElements aElements,
const MSIPRegistrationContext aContext,
CSIPRefresh aRefresh
 

Creates SIP request and sends it to the given destination.

The function must not be used with SIP requests that creates SIP dialog associations or must be sent within SIP dialog association. This provokes the Non-invite state machine. This function must be used if the user has created the registration binding.

Precondition:
State() == EActive.

aContext.IsContextActive() == ETrue

Parameters:
aElements contains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
aContext defines outbound proxy to be used. If the user does not provide from-address it will be constucted using user's AOR used during the registration.
aRefresh defines the refresh interval for this transaction.
Returns:
SIP client transaction, ownership is transferred
Leave:
KErrArgument if aElements == 0
Leave:
KErrSIPInvalidRegistrationState if aContext.IsContextActive() == EFalse NetworkServices
IMPORT_C CSIPClientTransaction* CSIPConnection::SendRequestL CSIPRequestElements aElements,
const MSIPRegistrationContext aContext
 

Creates SIP request and sends it to the given destination.

The function must not be used with SIP requests that creates SIP dialog associations or must be sent within SIP dialog association. This provokes the Non-invite state machine. This function must be used if the user has created the registration binding.

Precondition:
State() == EActive.

aContext.IsContextActive() == ETrue

Parameters:
aElements contains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
aContext defines outbound proxy to be used. If the user does not provide from-address it will be constucted using user's AOR used during the registration.
Returns:
SIP client transaction, ownership is transferred
Leave:
KErrArgument if aElements == 0
Leave:
KErrSIPInvalidRegistrationState if aContext.IsContextActive() == EFalse NetworkServices
IMPORT_C void CSIPConnection::SetOptL TUint  aOptionName,
TUint  aOptionLevel,
TInt  aOption
 

Sets a RSocket option used for all the sockets used for sending SIP requests and responses in this CSIPConnection.

Precondition:
State() == EActive
Parameters:
aOptionName An integer constant which identifies an option.
aOptionLevel An integer constant which identifies level of an option.
aOption Option value as an integer.
Leave:
A system-wide error codes NetworkControl NetworkServices Location ReadDeviceData WriteDeviceData
IMPORT_C void CSIPConnection::SetOptL TUint  aOptionName,
TUint  aOptionLevel,
const TDesC8 &  aOption = KNullDesC8
 

Sets a RSocket option used for all the sockets used for sending SIP requests and responses in this CSIPConnection.

Precondition:
State() == EActive
Parameters:
aOptionName An integer constant which identifies an option.
aOptionLevel An integer constant which identifies level of an option.
aOption Option value packaged in a descriptor.
Leave:
A system-wide error code NetworkControl NetworkServices Location ReadDeviceData WriteDeviceData
IMPORT_C const CSIP* CSIPConnection::SIP  )  const
 

Gets SIP server handle.

Returns:
handle to SIP server, or 0-pointer if SIP server does not exist any more
IMPORT_C CSIP* CSIPConnection::SIP  ) 
 

Gets SIP server handle.

Returns:
handle to SIP server, or 0-pointer if SIP server does not exist any more
IMPORT_C TState CSIPConnection::State  )  const
 

Gets current state of the connection.

Returns:
current state of the connection

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

Copyright © Nokia Corporation 2001-2007
Back to top