CSIPConnection Class Reference
#include
<mw/sipconnection.h>
Link against: sipclient.lib
class CSIPConnection : public CBase |
Public Member Functions |
---|
| ~CSIPConnection() |
IMPORT_C CSIPClientTransaction * | FetchRegistrationsL(CSIPRequestElements *) |
IMPORT_C void | GetConnectionErrorL(TInt &) |
IMPORT_C void | GetLocalAddrL(TInetAddr &) |
IMPORT_C TUint32 | IapId() |
CSIPConnectionImplementation & | Implementation() |
IMPORT_C CSIPConnection * | NewL(CSIP &, TUint32, MSIPConnectionObserver &) |
IMPORT_C CSIPConnection * | NewLC(CSIP &, TUint32, MSIPConnectionObserver &) |
IMPORT_C void | RefreshConnection() |
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 void | SetOptL(TUint, TUint, const TDesC8 &) |
IMPORT_C void | SetOptL(TUint, TUint, TInt) |
IMPORT_C TState | State() |
Detailed 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.
Member Enumeration Documentation
Enum TState
Enumerator | Value | Description |
---|
EInit | 1 |
Connection initializing
|
EActive | |
Connection active
|
ESuspended | |
Connection suspended
|
EInactive | |
Connection is inactive
|
EUnavailable | |
Connection is permanently unavailable
|
Constructor & Destructor Documentation
~CSIPConnection ( )
IMPORT_C | ~CSIPConnection | ( | ) | |
Destructor
- capability
- NetworkServices
Member Function Documentation
FetchRegistrationsL ( CSIPRequestElements * )
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
Parameter | Description | 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
GetConnectionErrorL ( TInt & )
IMPORT_C void | GetConnectionErrorL | ( | TInt & | aError | ) | const |
Gets the connection error code
- leave
- a system-wide error code
- capability
- NetworkServices.
Parameter | Description | aError | will be filled with the error code |
GetLocalAddrL ( TInetAddr & )
IMPORT_C void | 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.
- Pre-condition
- State() == CSIPConnection::EActive
- leave
- a system-wide error code
Parameter | Description | aAddr | on return filled with local IP address |
IapId ( )
Gets Iap-id used for this connection
Implementation ( )
Returns the implementation instance.
Returns: CSIPConnectionImplementation
NewL ( CSIP &, TUint32, MSIPConnectionObserver & )
Two-phased constructor.
- capability
- NetworkServices
Parameter | Description | aIapId | IAP-id |
aObserver | a observer for receiving asynchonous events on this connection |
Returns: New object, ownership is transferred
NewLC ( CSIP &, TUint32, MSIPConnectionObserver & )
Two-phased constructor. Constructs an object and adds the pointer to the cleanup stack;
- capability
- NetworkServices
Parameter | Description | aIapId | IAP-id |
aObserver | a observer for receiving asynchonous events on this connection |
Returns: New object, ownership is transferred
RefreshConnection ( )
IMPORT_C void | RefreshConnection | ( | ) | 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 ( )
Returns: handle to SIP server, or 0-pointer if SIP server does not exist any more
SIP ( )
IMPORT_C const CSIP * | SIP | ( | ) | const |
Returns: handle to SIP server, or 0-pointer if SIP server does not exist any more
SendRequestL ( CSIPRequestElements *, const MSIPRegistrationContext & )
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
Parameter | Description | 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
SendRequestL ( CSIPRequestElements *, const MSIPRegistrationContext &, CSIPRefresh & )
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
Parameter | Description | 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
SendRequestL ( CSIPRequestElements * )
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
Parameter | Description | aElements | contains local and remote addresses, optional SIP message headers and body. The ownership is transferred. |
Returns: SIP client transaction, ownership is transferred
SendRequestL ( CSIPRequestElements *, CSIPRefresh & )
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
Parameter | Description | 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
SetOptL ( TUint, TUint, const TDesC8 & )
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
Parameter | Description | 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. |
SetOptL ( TUint, TUint, TInt )
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.
- Pre-condition
- State() == EActive
- leave
- A system-wide error codes
- capability
- NetworkControl
- capability
- NetworkServices
- capability
- Location
- capability
- ReadDeviceData
- capability
- WriteDeviceData
Parameter | Description | aOptionName | An integer constant which identifies an option. |
aOptionLevel | An integer constant which identifies level of an option. |
aOption | Option value as an integer. |
State ( )
Gets current state of the connection
Returns: current state of the connection