CSIPMessageElements Class Reference

class CSIPMessageElements : public CBase

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

Inherits from

Public Member Functions
~CSIPMessageElements ()
void AddHeaderL ( CSIPHeaderBase *)
const CSIPCSeqHeader * CSeq ()
IMPORT_C const TDesC8 & Content ()
IMPORT_C const CSIPContentTypeHeader * ContentType ()
void DetachContent ()
void DetachUserHeader ( CSIPHeaderBase *)
void ExternalizeL ( RWriteStream &)
IMPORT_C HBufC8 * ExtractContent ()
const CSIPFromHeader * From ()
CSIPMessageElements * InternalizeL ( RReadStream &)
IMPORT_C CSIPMessageElements * NewL ()
IMPORT_C CSIPMessageElements * NewLC ()
TInt RemoveHeaders ( RStringF )
void SetContent ( HBufC8 *)
IMPORT_C void SetContentL ( HBufC8 *, CSIPContentTypeHeader *)
void SetFromL ( CSIPFromHeader *)
void SetToL ( CSIPToHeader *)
IMPORT_C void SetUserHeadersL ( RPointerArray < CSIPHeaderBase > &)
const CSIPToHeader * To ()
TInt UserHeaderCount ( RStringF )
IMPORT_C const RPointerArray < CSIPHeaderBase > & UserHeaders ()
const RPointerArray < CSIPHeaderBase > UserHeadersL ( RStringF )
Private Member Functions
CSIPMessageElements ()
void CheckUserHeaderL (const CSIPHeaderBase *)
void ConstructL ()
void DoInternalizeL ( RReadStream &)
void ExternalizeL (const CSIPExtensionHeader *, RWriteStream &)
void ExternalizeUserHeadersL ( RWriteStream &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CSIPCSeqHeader * iCSeqHeader
HBufC8 * iContent
CSIPContentTypeHeader * iContentTypeHeader
CSIPFromHeader * iFromHeader
TBool iHeaderLookupOpen
CSIPToHeader * iToHeader
RPointerArray < CSIPHeaderBase > iUserHeaders

Constructor & Destructor Documentation

CSIPMessageElements()

CSIPMessageElements ( ) [private]

~CSIPMessageElements()

IMPORT_C ~CSIPMessageElements ( )

Destructor.

Member Functions Documentation

AddHeaderL(CSIPHeaderBase *)

void AddHeaderL ( CSIPHeaderBase * aHeader )

Parameters

CSIPHeaderBase * aHeader

CSeq()

const CSIPCSeqHeader * CSeq ( ) const

CheckUserHeaderL(const CSIPHeaderBase *)

void CheckUserHeaderL ( const CSIPHeaderBase * aHeader ) const [private]

Parameters

const CSIPHeaderBase * aHeader

ConstructL()

void ConstructL ( ) [private]

Content()

IMPORT_C const TDesC8 & Content ( ) const

Gets the SIP message content

ContentType()

IMPORT_C const CSIPContentTypeHeader * ContentType ( ) const

Gets the content type

DetachContent()

void DetachContent ( )

DetachUserHeader(CSIPHeaderBase *)

void DetachUserHeader ( CSIPHeaderBase * aHeader )

Parameters

CSIPHeaderBase * aHeader

DoInternalizeL(RReadStream &)

void DoInternalizeL ( RReadStream & aReadStream ) [private]

Parameters

RReadStream & aReadStream

ExternalizeL(RWriteStream &)

void ExternalizeL ( RWriteStream & aWriteStream ) const

Parameters

RWriteStream & aWriteStream

ExternalizeL(const CSIPExtensionHeader *, RWriteStream &)

void ExternalizeL ( const CSIPExtensionHeader * aHeader,
RWriteStream & aWriteStream
) const [private]

Parameters

const CSIPExtensionHeader * aHeader
RWriteStream & aWriteStream

ExternalizeUserHeadersL(RWriteStream &)

void ExternalizeUserHeadersL ( RWriteStream & aWriteStream ) const [private]

Parameters

RWriteStream & aWriteStream

ExtractContent()

IMPORT_C HBufC8 * ExtractContent ( )

From()

const CSIPFromHeader * From ( ) const

InternalizeL(RReadStream &)

CSIPMessageElements * InternalizeL ( RReadStream & aReadStream ) [static]

Parameters

RReadStream & aReadStream

NewL()

IMPORT_C CSIPMessageElements * NewL ( ) [static]

Two-phased constructor.

NewLC()

IMPORT_C CSIPMessageElements * NewLC ( ) [static]

Two-phased constructor.

RemoveHeaders(RStringF)

TInt RemoveHeaders ( RStringF aName )

Parameters

RStringF aName

SetContent(HBufC8 *)

void SetContent ( HBufC8 * aContent )

Parameters

HBufC8 * aContent

SetContentL(HBufC8 *, CSIPContentTypeHeader *)

IMPORT_C void SetContentL ( 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

Parameters

HBufC8 * aContent the content of a SIP message, the ownership is transferred
CSIPContentTypeHeader * aContentType the SIP message content type, the ownership is transferred

SetFromL(CSIPFromHeader *)

void SetFromL ( CSIPFromHeader * aFrom )

Parameters

CSIPFromHeader * aFrom

SetToL(CSIPToHeader *)

void SetToL ( CSIPToHeader * aTo )

Parameters

CSIPToHeader * aTo

SetUserHeadersL(RPointerArray< CSIPHeaderBase > &)

IMPORT_C void SetUserHeadersL ( 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.

Parameters

RPointerArray < CSIPHeaderBase > & aHeaders an array of SIP headers. The ownership of objects in the array is transferred.

To()

const CSIPToHeader * To ( ) const

UserHeaderCount(RStringF)

TInt UserHeaderCount ( RStringF aName ) const

Parameters

RStringF aName

UserHeaders()

IMPORT_C const RPointerArray < CSIPHeaderBase > & UserHeaders ( ) const

Gets all user SIP headers this class contains

UserHeadersL(RStringF)

const RPointerArray < CSIPHeaderBase > UserHeadersL ( RStringF aName ) const

Parameters

RStringF aName

Member Data Documentation

CSIPCSeqHeader * iCSeqHeader

CSIPCSeqHeader * iCSeqHeader [private]

HBufC8 * iContent

HBufC8 * iContent [private]

CSIPContentTypeHeader * iContentTypeHeader

CSIPContentTypeHeader * iContentTypeHeader [private]

CSIPFromHeader * iFromHeader

CSIPFromHeader * iFromHeader [private]

TBool iHeaderLookupOpen

TBool iHeaderLookupOpen [private]

CSIPToHeader * iToHeader

CSIPToHeader * iToHeader [private]

RPointerArray< CSIPHeaderBase > iUserHeaders

RPointerArray < CSIPHeaderBase > iUserHeaders [private]