CSIPConnection Class Reference

class CSIPConnection : public CBase
Class for monitoring connection's state and sending SIP requests outside the dialog associations. Class must not be used
  • for sending requests to which received non-failure response creates a dialog

  • for sending requests that must be sent within SIP dialog

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

Inherits from

Public Member Functions
~CSIPConnection()
IMPORT_C CSIPClientTransaction *FetchRegistrationsL(CSIPRequestElements *)
IMPORT_C voidGetConnectionErrorL(TInt &)
IMPORT_C voidGetLocalAddrL(TInetAddr &)
IMPORT_C TUint32IapId()
CSIPConnectionImplementation &Implementation()
IMPORT_C CSIPConnection *NewL(CSIP &, TUint32, MSIPConnectionObserver &)
IMPORT_C CSIPConnection *NewLC(CSIP &, TUint32, MSIPConnectionObserver &)
IMPORT_C voidRefreshConnection()
IMPORT_C CSIP *SIP()
IMPORT_C const CSIP *SIP()
IMPORT_C CSIPClientTransaction *SendRequestL(CSIPRequestElements *, const MSIPRegistrationContext &)
IMPORT_C CSIPClientTransaction *SendRequestL(CSIPRequestElements *, const MSIPRegistrationContext &, CSIPRefresh &)
IMPORT_C CSIPClientTransaction *SendRequestL(CSIPRequestElements *)
IMPORT_C CSIPClientTransaction *SendRequestL(CSIPRequestElements *, CSIPRefresh &)
IMPORT_C voidSetOptL(TUint, TUint, const TDesC8 &)
IMPORT_C voidSetOptL(TUint, TUint, TInt)
IMPORT_C TStateState()
Private Member Functions
CSIPConnection()
voidConstructL(CSIP &, TUint32, MSIPConnectionObserver &)
void__DbgTestInvariant()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTState { EInit = 1, EActive, ESuspended, EInactive, EUnavailable }
Private Attributes
CSIPConnectionImplementation *iImplementation

Constructor & Destructor Documentation

CSIPConnection()

CSIPConnection()[private]

~CSIPConnection()

IMPORT_C~CSIPConnection()
Destructor
capability
NetworkServices

Member Functions Documentation

ConstructL(CSIP &, TUint32, MSIPConnectionObserver &)

voidConstructL(CSIP &aSIP,
TUint32aIapId,
MSIPConnectionObserver &aObserver
)[private]

Parameters

CSIP & aSIP
TUint32 aIapId
MSIPConnectionObserver & aObserver

FetchRegistrationsL(CSIPRequestElements *)

IMPORT_C CSIPClientTransaction *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.
Pre-condition
State() == EActive
aElements != 0
aElements->Method().DesC().Length()==0
leave
KErrArgument if aElements == 0 or if the request method has been defined in aElements
capability
NetworkServices

Parameters

CSIPRequestElements * aElementscontains local and remote addresses, optional SIP message headers and body. User must not set any expires values to aElements. The ownership is transferred.

GetConnectionErrorL(TInt &)

IMPORT_C voidGetConnectionErrorL(TInt &aError)const
Gets the connection error code
leave
a system-wide error code
capability
NetworkServices.

Parameters

TInt & aErrorwill be filled with the error code

GetLocalAddrL(TInetAddr &)

IMPORT_C voidGetLocalAddrL(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.
Pre-condition
State() == CSIPConnection::EActive
leave
a system-wide error code

Parameters

TInetAddr & aAddron return filled with local IP address

IapId()

IMPORT_C TUint32IapId()const

Gets Iap-id used for this connection

Implementation()

CSIPConnectionImplementation &Implementation()

Returns the implementation instance.

NewL(CSIP &, TUint32, MSIPConnectionObserver &)

IMPORT_C CSIPConnection *NewL(CSIP &aSIP,
TUint32aIapId,
MSIPConnectionObserver &aObserver
)[static]
Two-phased constructor.
capability
NetworkServices

Parameters

CSIP & aSIP
TUint32 aIapIdIAP-id
MSIPConnectionObserver & aObservera observer for receiving asynchonous events on this connection

NewLC(CSIP &, TUint32, MSIPConnectionObserver &)

IMPORT_C CSIPConnection *NewLC(CSIP &aSIP,
TUint32aIapId,
MSIPConnectionObserver &aObserver
)[static]
Two-phased constructor. Constructs an object and adds the pointer to the cleanup stack;
capability
NetworkServices

Parameters

CSIP & aSIP
TUint32 aIapIdIAP-id
MSIPConnectionObserver & aObservera observer for receiving asynchonous events on this connection

RefreshConnection()

IMPORT_C voidRefreshConnection()const
Refreshes the connection. This will retrieve the Bearer Monitor Instance if any, is available for this CSIPConnection and issue a Connection Refresh Request to it. The state of the Connection can be retrieved from State() to check if there is any change after Refreshing the connection.
capability
NetworkServices.

SIP()

IMPORT_C CSIP *SIP()

Gets SIP server handle

SIP()

IMPORT_C const CSIP *SIP()const

Gets SIP server handle

SendRequestL(CSIPRequestElements *, const MSIPRegistrationContext &)

IMPORT_C CSIPClientTransaction *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.
Pre-condition
State() == EActive.
aContext.IsContextActive() == ETrue
leave
KErrArgument if aElements == 0
leave
KErrSIPInvalidRegistrationState if aContext.IsContextActive() == EFalse
capability
NetworkServices

Parameters

CSIPRequestElements * aElementscontains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
const MSIPRegistrationContext & aContextdefines 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.

SendRequestL(CSIPRequestElements *, const MSIPRegistrationContext &, CSIPRefresh &)

IMPORT_C CSIPClientTransaction *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.
Pre-condition
State() == EActive.
aContext.IsContextActive() == ETrue
leave
KErrArgument if aElements == 0
leave
KErrSIPInvalidRegistrationState if aContext.IsContextActive() == EFalse
capability
NetworkServices

Parameters

CSIPRequestElements * aElementscontains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
const MSIPRegistrationContext & aContextdefines 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.
CSIPRefresh & aRefreshdefines the refresh interval for this transaction.

SendRequestL(CSIPRequestElements *)

IMPORT_C CSIPClientTransaction *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.
Pre-condition
State() == EActive.
aElements.FromHeader() != 0
leave
KErrArgument if aElements == 0 or if From-header is not present in aElements
capability
NetworkServices

Parameters

CSIPRequestElements * aElementscontains local and remote addresses, optional SIP message headers and body. The ownership is transferred.

SendRequestL(CSIPRequestElements *, CSIPRefresh &)

IMPORT_C CSIPClientTransaction *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.
Pre-condition
State() == EActive.
aElements.FromHeader() != 0
leave
KErrArgument if aElements == 0 or if From-header is not present in aElements
capability
NetworkServices

Parameters

CSIPRequestElements * aElementscontains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
CSIPRefresh & aRefreshindicates that transaction will be refreshed

SetOptL(TUint, TUint, const TDesC8 &)

IMPORT_C voidSetOptL(TUintaOptionName,
TUintaOptionLevel,
const TDesC8 &aOption =  KNullDesC8
)
Sets a RSocket option used for all the sockets used for sending SIP requests and responses in this CSIPConnection.
Pre-condition
State() == EActive
leave
A system-wide error code
capability
NetworkControl
capability
NetworkServices
capability
Location
capability
ReadDeviceData
capability
WriteDeviceData

Parameters

TUint aOptionNameAn integer constant which identifies an option.
TUint aOptionLevelAn integer constant which identifies level of an option.
const TDesC8 & aOption =  KNullDesC8 Option value packaged in a descriptor.

SetOptL(TUint, TUint, TInt)

IMPORT_C voidSetOptL(TUintaOptionName,
TUintaOptionLevel,
TIntaOption
)
Sets a RSocket option used for all the sockets used for sending SIP requests and responses in this CSIPConnection.
Pre-condition
State() == EActive
leave
A system-wide error codes
capability
NetworkControl
capability
NetworkServices
capability
Location
capability
ReadDeviceData
capability
WriteDeviceData

Parameters

TUint aOptionNameAn integer constant which identifies an option.
TUint aOptionLevelAn integer constant which identifies level of an option.
TInt aOptionOption value as an integer.

State()

IMPORT_C TStateState()const

Gets current state of the connection

__DbgTestInvariant()

void__DbgTestInvariant()const [private]

Member Enumerations Documentation

Enum TState

Connection states

Enumerators

EInit = 1

Connection initializing

EActive

Connection active

ESuspended

Connection suspended

EInactive

Connection is inactive

EUnavailable

Connection is permanently unavailable

Member Data Documentation

CSIPConnectionImplementation * iImplementation

CSIPConnectionImplementation *iImplementation[private]