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()
voidAddHeaderL(CSIPHeaderBase *)
const CSIPCSeqHeader *CSeq()
IMPORT_C const TDesC8 &Content()
IMPORT_C const CSIPContentTypeHeader *ContentType()
voidDetachContent()
voidDetachUserHeader(CSIPHeaderBase *)
voidExternalizeL(RWriteStream &)
IMPORT_C HBufC8 *ExtractContent()
const CSIPFromHeader *From()
CSIPMessageElements *InternalizeL(RReadStream &)
IMPORT_C CSIPMessageElements *NewL()
IMPORT_C CSIPMessageElements *NewLC()
TInt RemoveHeaders(RStringF)
voidSetContent(HBufC8 *)
IMPORT_C voidSetContentL(HBufC8 *, CSIPContentTypeHeader *)
voidSetFromL(CSIPFromHeader *)
voidSetToL(CSIPToHeader *)
IMPORT_C voidSetUserHeadersL(RPointerArray< CSIPHeaderBase > &)
const CSIPToHeader *To()
TInt UserHeaderCount(RStringF)
IMPORT_C const RPointerArray< CSIPHeaderBase > &UserHeaders()
const RPointerArray< CSIPHeaderBase >UserHeadersL(RStringF)
Private Member Functions
CSIPMessageElements()
voidCheckUserHeaderL(const CSIPHeaderBase *)
voidConstructL()
voidDoInternalizeL(RReadStream &)
voidExternalizeL(const CSIPExtensionHeader *, RWriteStream &)
voidExternalizeUserHeadersL(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 *)

voidAddHeaderL(CSIPHeaderBase *aHeader)

Parameters

CSIPHeaderBase * aHeader

CSeq()

const CSIPCSeqHeader *CSeq()const

CheckUserHeaderL(const CSIPHeaderBase *)

voidCheckUserHeaderL(const CSIPHeaderBase *aHeader)const [private]

Parameters

const CSIPHeaderBase * aHeader

ConstructL()

voidConstructL()[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()

voidDetachContent()

DetachUserHeader(CSIPHeaderBase *)

voidDetachUserHeader(CSIPHeaderBase *aHeader)

Parameters

CSIPHeaderBase * aHeader

DoInternalizeL(RReadStream &)

voidDoInternalizeL(RReadStream &aReadStream)[private]

Parameters

RReadStream & aReadStream

ExternalizeL(RWriteStream &)

voidExternalizeL(RWriteStream &aWriteStream)const

Parameters

RWriteStream & aWriteStream

ExternalizeL(const CSIPExtensionHeader *, RWriteStream &)

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

Parameters

const CSIPExtensionHeader * aHeader
RWriteStream & aWriteStream

ExternalizeUserHeadersL(RWriteStream &)

voidExternalizeUserHeadersL(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(RStringFaName)

Parameters

RStringF aName

SetContent(HBufC8 *)

voidSetContent(HBufC8 *aContent)

Parameters

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

Parameters

HBufC8 * aContentthe content of a SIP message, the ownership is transferred
CSIPContentTypeHeader * aContentTypethe SIP message content type, the ownership is transferred

SetFromL(CSIPFromHeader *)

voidSetFromL(CSIPFromHeader *aFrom)

Parameters

CSIPFromHeader * aFrom

SetToL(CSIPToHeader *)

voidSetToL(CSIPToHeader *aTo)

Parameters

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.

Parameters

RPointerArray< CSIPHeaderBase > & 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

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(RStringFaName)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]