CSIPRefresh Class Reference

#include <mw/siprefresh.h>

Link against: sipclient.lib

class CSIPRefresh : public CBase

Inherits from

  • CSIPRefresh

    Detailed Description

    Class for managing SIP refresh. It provides functions for getting associated sip transaction and state. Class also provides functions for updating and terminating stand-alone refreshes.

    Note that only stand-alone refreshes (i.e. refreshes that are not associated with registration binding or dialog associations) can be terminated or updated using functions defined in this class.

    Member Enumeration Documentation

    Enum TState

    SIP refresh states

    EnumeratorValueDescription
    EInactive

    SIP refresh is inactive

    EActive

    SIP refresh active

    ETerminated

    SIP refresh is terminated

    EConstructing

    Object is being constructed and is not yet ready for use

    Constructor & Destructor Documentation

    ~CSIPRefresh ( )

    IMPORT_C~CSIPRefresh()

    Destructor

    Member Function Documentation

    AddTransaction ( CSIPClientTransaction & )

    voidAddTransaction(CSIPClientTransaction &aTransaction)

    ChangeState ( CSIPRefresh::TState )

    voidChangeState(CSIPRefresh::TStateaNextState)

    DoesMatch ( TUint32 )

    TBool DoesMatch(TUint32aRefreshId)const

    IntervalL ( )

    IMPORT_C TUintIntervalL()const
    Gets current refresh interval
    Pre-condition
    State()==CSIPRefreshEActive
    leave
    KErrSIPResourceNotAvailable if SIP server can't be contacted because a required resource has been deleted.

    Returns: current refresh interval in seconds

    IsStandAlone ( )

    IMPORT_C TBoolIsStandAlone()const

    Tests if the refresh is a stand-alone refresh

    Returns: ETrue if refresh is a stand-alone; EFalse otherwise

    NewL ( )

    IMPORT_C CSIPRefresh *NewL()[static]

    Two-phased constructor

    Returns: New object. Ownership is transferred.

    NewLC ( )

    IMPORT_C CSIPRefresh *NewLC()[static]

    Two-phased constructor

    Returns: New object. Ownership is transferred.

    RefreshId ( )

    TUint32 RefreshId()const

    RemoveRefreshOwner ( const MSIPRefreshAssociation & )

    voidRemoveRefreshOwner(const MSIPRefreshAssociation &aAssoc)

    RemoveTransaction ( )

    voidRemoveTransaction()

    RequestType ( )

    RStringF RequestType()const

    SIPTransaction ( )

    IMPORT_C const CSIPClientTransaction *SIPTransaction()const

    Gets the associated SIP transaction with this refresh.

    Returns: Associated SIP transaction or 0-pointer. Ownership is not transferred.

    SetIntervalL ( TUint )

    IMPORT_C voidSetIntervalL(TUintaInterval)
    Sets refresh interval. Note that SIP server choses the refresh interval. This function should be used only if SIP server has indicated new refresh interval using SIP messages that are not associated to the refresh needing the update.
    Pre-condition
    State()==CSIPRefreshEActive

    aInterval > 0

    leave
    KErrArgument if aInterval == 0
    leave
    KErrSIPInvalidTransactionState if State() is not EActive
    leave
    KErrSIPResourceNotAvailable if SIP server can't be contacted because a required resource has been deleted.
    ParameterDescription
    aIntervala new interval in seconds

    SetRefreshIdIfEmpty ( TUint32 )

    voidSetRefreshIdIfEmpty(TUint32aRefreshId)

    SetRefreshOwner ( MSIPRefreshAssociation & )

    voidSetRefreshOwner(MSIPRefreshAssociation &aAssoc)

    Associate the CSIPRefresh with another object.

    ParameterDescription
    aAssocObject associated with the CSIPRefresh

    Returns: ETrue if the objects are equal otherwise EFalse

    SetRequestType ( RStringF )

    voidSetRequestType(RStringFaType)

    State ( )

    IMPORT_C CSIPRefresh::TStateState()const

    Gets the state of the refresh

    Returns: refresh state

    TerminateL ( CSIPMessageElements * )

    IMPORT_C CSIPClientTransaction *TerminateL(CSIPMessageElements *aElements = 0)
    Terminates the refresh by sending SIP request to the remote destination. The new client transactation will be of the same type as the first transaction associated with this request.
    Pre-condition
    State()==EActive

    IsStandAlone()==ETrue

    leave
    KErrSIPInvalidTransactionState if State() is not EActive KErrNotFound if the CSIPRefresh is no longer associated to anything KSIPErrInvalidRegistrationState if trying to terminate a REGISTER refresh. KErrSIPInvalidDialogState if trying to terminate a dialog association being refreshed.
    capability
    NetworkServices
    ParameterDescription
    aElementscontains optional SIP message headers and body. Ownership is transferred.

    Returns: SIP client transaction. Ownership is transferred.

    Transaction ( )

    CSIPClientTransaction *Transaction()

    UpdateL ( CSIPMessageElements * )

    IMPORT_C CSIPClientTransaction *UpdateL(CSIPMessageElements *aElements = 0)
    Updates the refresh by sending SIP request to the remote destination. The new client transactation will be of the same type as the first transaction associated with this request.
    Pre-condition
    State()==EActive

    IsStandAlone()==ETrue

    leave
    KErrSIPInvalidTransactionState if State() is not EActive KErrNotFound if the CSIPRefresh is no longer associated to anything KErrSIPInvalidRegistrationState if trying to update a REGISTER refresh. KSIPErrInvalidDialogState if trying to update a dialog association being refreshed.
    capability
    NetworkServices
    ParameterDescription
    aElementscontains optional SIP message headers and body. Ownership is transferred.

    Returns: SIP client transaction. Ownership is transferred.

    UpdateRefreshState ( TUint )

    voidUpdateRefreshState(TUintaStatusCode)

    operator== ( const CSIPRefresh & )

    IMPORT_C TBooloperator==(const CSIPRefresh &aRefresh)const

    Compares this object to another object

    ParameterDescription
    aRefresha CSIPRefresh type object to compare

    Returns: ETrue if the objects are equal otherwise EFalse