Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: sipmessageelements.h
Link against: sipclient.lib

Class CSIPMessageElements

class CSIPMessageElements : public CBase;

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".

sipclient.lib

Derivation

Members

Defined in CSIPMessageElements:
Content(), ContentType(), ExtractContent(), NewL(), NewLC(), SetContentL(), SetUserHeadersL(), UserHeaders(), ~CSIPMessageElements()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

static IMPORT_C CSIPMessageElements *NewL();

Description

Two-phased constructor.

Return value

CSIPMessageElements *


NewLC()

static IMPORT_C CSIPMessageElements *NewLC();

Description

Two-phased constructor.

Return value

CSIPMessageElements *


~CSIPMessageElements()

IMPORT_C ~CSIPMessageElements();

Description

Destructor.

[Top]


Member functions


SetUserHeadersL()

IMPORT_C void SetUserHeadersL(RPointerArray< CSIPHeaderBase > &aHeaders);

Description

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.

Parameters

RPointerArray< CSIPHeaderBase > &aHeaders

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


UserHeaders()

IMPORT_C const RPointerArray< CSIPHeaderBase > &UserHeaders() const;

Description

Gets all user SIP headers this class contains

Return value

const RPointerArray< CSIPHeaderBase > &

SIP headers. Ownership is not transferred.


SetContentL()

IMPORT_C void SetContentL(HBufC8 *aContent, CSIPContentTypeHeader *aContentType);

Pre-Condition

aContent != 0 && aContentType != 0

Description

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).

Parameters

HBufC8 *aContent

the content of a SIP message, the ownership is transferred

CSIPContentTypeHeader *aContentType

the SIP message content type, the ownership is transferred

Leave codes

KErrArgument

if aContent == 0 or aContentType == 0


Content()

IMPORT_C const TDesC8 &Content() const;

Description

Gets the SIP message content

Return value

const TDesC8 &

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


ContentType()

IMPORT_C const CSIPContentTypeHeader *ContentType() const;

Description

Gets the content type

Return value

const CSIPContentTypeHeader *

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


ExtractContent()

IMPORT_C HBufC8 *ExtractContent();

Description

Return value

HBufC8 *