»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Multimedia Protocols SIP_COM »
CSIPConnection
Location:
sipconnection.h
Link against: sipclient.lib
class CSIPConnection : public CBase;
Description
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.
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CSIPConnection
- Class for monitoring connection's state and sending SIP requests outside the dialog associations
Members
Defined in CSIPConnection
:
EActive
, EInactive
, EInit
, ESuspended
, EUnavailable
, FetchRegistrationsL()
, GetLocalAddrL()
, IapId()
, NewL()
, NewLC()
, SIP()
, SIP()
, SendRequestL()
, SendRequestL()
, SendRequestL()
, SendRequestL()
, SetOptL()
, SetOptL()
, State()
, TState
, ~CSIPConnection()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Construction and destruction
Capability: |
NetworkServices |
|
static IMPORT_C CSIPConnection *NewL(CSIP &aSIP, TUint32 aIapId, MSIPConnectionObserver &aObserver);
Description
Two-phased constructor.
Parameters
Return value
Capability: |
NetworkServices |
|
static IMPORT_C CSIPConnection *NewLC(CSIP &aSIP, TUint32 aIapId, MSIPConnectionObserver &aObserver);
Description
Two-phased constructor. Constructs an object and adds the pointer to the cleanup stack;
Parameters
Return value
Capability: |
NetworkServices |
|
IMPORT_C ~CSIPConnection();
Description
Destructor
IMPORT_C TState State() const;
Description
Gets current state of the connection
Return value
TState
|
current state of the connection
|
|
Capability: |
NetworkServices |
|
IMPORT_C CSIPClientTransaction *SendRequestL(CSIPRequestElements *aElements, const MSIPRegistrationContext &aContext);
Pre-Condition
State()
== EActive.
aContext.IsContextActive() == ETrue
Description
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.
Parameters
CSIPRequestElements *aElements |
contains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
|
const MSIPRegistrationContext &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.
|
|
Return value
Leave codes
KErrArgument |
if aElements == 0
|
KErrSIPInvalidRegistrationState |
if aContext.IsContextActive() == EFalse
|
|
Capability: |
NetworkServices |
|
IMPORT_C CSIPClientTransaction *SendRequestL(CSIPRequestElements *aElements, const MSIPRegistrationContext &aContext, CSIPRefresh
&aRefresh);
Pre-Condition
State()
== EActive.
aContext.IsContextActive() == ETrue
Description
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.
Parameters
CSIPRequestElements *aElements |
contains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
|
const MSIPRegistrationContext &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.
|
CSIPRefresh &aRefresh |
defines the refresh interval for this transaction.
|
|
Return value
Leave codes
KErrArgument |
if aElements == 0
|
KErrSIPInvalidRegistrationState |
if aContext.IsContextActive() == EFalse
|
|
Capability: |
NetworkServices |
|
IMPORT_C CSIPClientTransaction *SendRequestL(CSIPRequestElements *aElements);
Pre-Condition
State()
== EActive.
aElements.FromHeader() != 0
Description
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.
Parameters
CSIPRequestElements *aElements |
contains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
|
|
Return value
Leave codes
KErrArgument |
if aElements == 0 or if From-header is not present in aElements
|
|
Capability: |
NetworkServices |
|
IMPORT_C CSIPClientTransaction *SendRequestL(CSIPRequestElements *aElements, CSIPRefresh &aRefresh);
Pre-Condition
State()
== EActive.
aElements.FromHeader() != 0
Description
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.
Parameters
CSIPRequestElements *aElements |
contains local and remote addresses, optional SIP message headers and body. The ownership is transferred.
|
CSIPRefresh &aRefresh |
indicates that transaction will be refreshed
|
|
Return value
Leave codes
KErrArgument |
if aElements == 0 or if From-header is not present in aElements
|
|
Capability: |
NetworkServices |
|
IMPORT_C CSIPClientTransaction *FetchRegistrationsL(CSIPRequestElements *aElements);
Pre-Condition
State()
== EActive
aElements != 0
aElements->Method().DesC().Length()==0
Description
Creates SIP REGISTER request and sends it to the given destination. User
must no define any Contact or Expires-headers in the provided elements.
Parameters
CSIPRequestElements *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.
|
|
Return value
Leave codes
KErrArgument |
if aElements == 0 or if the request method has been defined in aElements
|
|
IMPORT_C TUint32 IapId() const;
Description
Gets Iap-id used for this connection
Return value
IMPORT_C CSIP *SIP();
Description
Gets SIP server handle
Return value
CSIP *
|
handle to SIP server, or 0-pointer if SIP server does not exist any more
|
|
IMPORT_C const CSIP *SIP() const;
Description
Gets SIP server handle
Return value
const CSIP * |
handle to SIP server, or 0-pointer if SIP server does not exist any more
|
|
Capability: |
Location |
|
Capability: |
NetworkControl |
|
Capability: |
NetworkServices |
|
Capability: |
ReadDeviceData |
|
Capability: |
WriteDeviceData |
|
IMPORT_C void SetOptL(TUint aOptionName, TUint aOptionLevel, const TDesC8 &aOption=KNullDesC8);
Pre-Condition
State()
== EActive
Description
Sets a RSocket
option used for all the sockets used for sending SIP requests and responses in this CSIPConnection.
Parameters
TUint aOptionName |
An integer constant which identifies an option.
|
TUint aOptionLevel |
An integer constant which identifies level of an option.
|
const TDesC8 &aOption |
Option value packaged in a descriptor.
|
|
Leave codes
Capability: |
Location |
|
Capability: |
NetworkControl |
|
Capability: |
NetworkServices |
|
Capability: |
ReadDeviceData |
|
Capability: |
WriteDeviceData |
|
IMPORT_C void SetOptL(TUint aOptionName, TUint aOptionLevel, TInt aOption);
Pre-Condition
State()
== EActive
Description
Sets a RSocket
option used for all the sockets used for sending SIP requests and responses in this CSIPConnection.
Parameters
TUint aOptionName |
An integer constant which identifies an option.
|
TUint aOptionLevel |
An integer constant which identifies level of an option.
|
TInt aOption |
Option value as an integer.
|
|
Leave codes
A |
system-wide error codes
|
|
IMPORT_C void GetLocalAddrL(TInetAddr &aAddr) const;
Pre-Condition
State()
== CSIPConnection::EActive
Description
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.
Parameters
TInetAddr &aAddr |
on return filled with local IP address
|
|
Leave codes
TState
Description
Connection states