CSIPMessageElements Class Reference

#include <mw/sipmessageelements.h>

Link against: sipclient.lib

class CSIPMessageElements : public CBase

Inherits from

  • CSIPMessageElements

    Detailed Description

    Class for creation and manipulation optional elements in a SIP message.

    Class provides functions for setting and getting optional elements in a SIP message. Optional elements include user SIP message headers, content and content type. Following headers are not considered to be user SIP message headers and cannot be set or retrieved using functions of this class: "Authentication-Info", "Call-Id", "CSeq", "From" "Max-Forwards", "Min-Expires", "Record-Route", "Security-Verify", "Service-Route", "To", "Via", "Security-Server" and "Proxy-Authorization".

    Constructor & Destructor Documentation

    ~CSIPMessageElements ( )

    IMPORT_C~CSIPMessageElements()

    Destructor.

    Member Function Documentation

    AddHeaderL ( CSIPHeaderBase * )

    voidAddHeaderL(CSIPHeaderBase *aHeader)

    CSeq ( )

    const CSIPCSeqHeader *CSeq()const

    Content ( )

    IMPORT_C const TDesC8 &Content()const

    Gets the SIP message content

    Returns: SIP message content. If content does not exist, an empty descriptor is returned.

    ContentType ( )

    IMPORT_C const CSIPContentTypeHeader *ContentType()const

    Gets the content type

    Returns: Content-Type-header or a 0-pointer if not present; the ownership is not transferred.

    DetachContent ( )

    voidDetachContent()

    DetachUserHeader ( CSIPHeaderBase * )

    voidDetachUserHeader(CSIPHeaderBase *aHeader)

    ExternalizeL ( RWriteStream & )

    voidExternalizeL(RWriteStream &aWriteStream)const

    ExtractContent ( )

    IMPORT_C HBufC8 *ExtractContent()

    From ( )

    const CSIPFromHeader *From()const

    InternalizeL ( RReadStream & )

    CSIPMessageElements *InternalizeL(RReadStream &aReadStream)[static]

    NewL ( )

    IMPORT_C CSIPMessageElements *NewL()[static]

    Two-phased constructor.

    NewLC ( )

    IMPORT_C CSIPMessageElements *NewLC()[static]

    Two-phased constructor.

    RemoveHeaders ( RStringF )

    TInt RemoveHeaders(RStringFaName)

    SetContent ( HBufC8 * )

    voidSetContent(HBufC8 *aContent)

    SetContentL ( HBufC8 *, CSIPContentTypeHeader * )

    IMPORT_C voidSetContentL(HBufC8 *aContent,
    CSIPContentTypeHeader *aContentType
    )
    Sets the SIP message content and its type. A zero length content can be set by providing a pointer to a zero length HBufC8 instance (the ownership is transferred).
    Pre-condition
    aContent != 0 && aContentType != 0
    leave
    KErrArgument if aContent == 0 or aContentType == 0
    ParameterDescription
    aContentthe content of a SIP message, the ownership is transferred
    aContentTypethe SIP message content type, the ownership is transferred

    SetFromL ( CSIPFromHeader * )

    voidSetFromL(CSIPFromHeader *aFrom)

    SetToL ( CSIPToHeader * )

    voidSetToL(CSIPToHeader *aTo)

    SetUserHeadersL ( RPointerArray< CSIPHeaderBase > & )

    IMPORT_C voidSetUserHeadersL(RPointerArray< CSIPHeaderBase > &aHeaders)

    Sets an array of user headers i.e. headers that user is allowed manipulate to a SIP message. An empty array resets the user headers. Note that the Content-Type header must be set using SetContentL.

    ParameterDescription
    aHeadersan array of SIP headers. The ownership of objects in the array is transferred.

    To ( )

    const CSIPToHeader *To()const

    UserHeaderCount ( RStringF )

    TInt UserHeaderCount(RStringFaName)const

    UserHeaders ( )

    IMPORT_C const RPointerArray< CSIPHeaderBase > &UserHeaders()const

    Gets all user SIP headers this class contains

    Returns: SIP headers. Ownership is not transferred.

    UserHeadersL ( RStringF )

    const RPointerArray< CSIPHeaderBase >UserHeadersL(RStringFaName)const