CSIPMessage Class Reference
class CSIPMessage : public CBase |
A base class for SIP messages that provides functions for setting and getting headers and SIP version of a SIP message.
sipcodec.lib
Constructor & Destructor Documentation
~CSIPMessage()
IMPORT_C | ~CSIPMessage | ( | ) | [virtual] |
Member Functions Documentation
AddHeaderL(CSIPHeaderBase *)
Adds a header to the SIP message. Note that the first header inserted within a group of headers with the same name (for example "Route") is also guaranteed to appear first in the encoded message.
- Pre-condition
- aSIPHeader != 0
- !(aSIPHeader->MoreThanOneAllowed()&&HasHeader (aSIPHeader->Name())
Parameters
CSIPHeaderBase * aSIPHeader | a SIP header to be added, ownership is transferred. |
AddHeaderL(const CSIPHeaderBase &)
Adds a deep copy of a given header to the SIP message. Note that the first header inserted within a group of headers with the same name (for example "Route") is also guaranteed to appear first in the encoded message.
- Pre-condition
- !(aSIPHeader.MoreThanOneAllowed()&&HasHeader(aSIPHeader->Name())
AllHeadersL()
Creates copies of the pointers to all the headers in the SIP message. Note that the caller must not delete any of the headers returned.
AnnouncedContentLength()
IMPORT_C TUint | AnnouncedContentLength | ( | ) | const |
Gets the value of "Content-Length"-header that was present when the message was decoded. This might be different than the actual length of the message content.
- Pre-condition
- HasAnnouncedContentLength() == ETrue
CSeq()
Gets the CSeq-header in the message.
CallID()
Gets the Call-ID-header in the message.
ConstructL()
void | ConstructL | ( | ) | [protected] |
Content()
IMPORT_C const TDesC8 & | Content | ( | ) | const |
DeleteHeaders(RStringF)
Removes and deletes all the headers with name aName
- Pre-condition
- HasHeader(aName)==ETrue
Parameters
RStringF aName | the full or compact name of the headers to delete. |
EncodedHeaderPartLengthL()
IMPORT_C TInt | EncodedHeaderPartLengthL | ( | ) | |
Using this function the user can get the length of the encoded header part without actually encoding the whole header part. Note that this function only saves memory, but not necessarily processing time compared to the actual encoding.
ExternalizeHeadersL(RWriteStream &)
IMPORT_C void | ExternalizeHeadersL | ( | RWriteStream & | aWriteStream | ) | |
Externalizes all the headers that support serialization to a write stream.
Parameters
RWriteStream & aWriteStream | a stream where the objects will be externalized |
FindHeaderListIndex(RStringF)
FindHeaderListIndex(const CSIPHeaderBase &)
From()
Gets the From-header in the message.
GetEncodedContentLengthHeaderSizeL(TInt &)
void | GetEncodedContentLengthHeaderSizeL | ( | TInt & | aSize | ) | const [private] |
GetEncodedFirstLineSizeL(TInt &)
void | GetEncodedFirstLineSizeL | ( | TInt & | aSize | ) | const [private] |
HasAnnouncedContentLength()
IMPORT_C TBool | HasAnnouncedContentLength | ( | ) | const |
Checks if "Content-Length"-header was present when the message was decoded.
HasHeader(RStringF)
Checks if a one or more headers with aName are present
Parameters
RStringF aName | the full or compact name of the header |
Header(RStringF, TInt)
Gets a header with aName and an index in list of header with aName Note that using HeaderCount(...) and this function to loop through the headers with a given name is MUCH less efficient than using iterators through Headers(...).
- Pre-condition
- aIndex < HeaderCount(aName)
Parameters
RStringF aName | the full or compact name of the header to get |
TInt aIndex | the index in the header list |
HeaderCount(RStringF)
Get a count of headers with a given name in this SIP message.
Parameters
RStringF aName | the full or compact name of the header |
HeaderOrder(const TSglQue< CSIPHeaderBase > &, const TSglQue< CSIPHeaderBase > &)
Headers(RStringF)
Gets an iterator to a list of headers with aName
- Pre-condition
- HasHeader(aName) == ETrue
Parameters
RStringF aName | the full or compact name of the headers to get |
InsertL(TSglQue< CSIPHeaderBase > &)
InternalizeHeadersL(RReadStream &)
IMPORT_C void | InternalizeHeadersL | ( | RReadStream & | aReadStream | ) | |
Parameters
RReadStream & aReadStream | a stream containing the values of the externalized SIP header objects |
IsContentLengthHeader(const CSIPHeaderBase &)
IsRequest()
IMPORT_C TBool | IsRequest | ( | ) | const [pure virtual] |
ReadFromStreamL(RReadStream &)
RemoveHeader(const CSIPHeaderBase *)
Removes a header from the SIP message based on pointer comparison
Parameters
const CSIPHeaderBase * aSIPHeader | the header to be removed, ownership is NOT transferred, the caller is supposed to do the deletion |
ReplaceHeaderL(CSIPHeaderBase *, CSIPHeaderBase *)
Replaces a header to the SIP message based on pointer comparison. The updated header has to have the same type. This means that a Contact-header cannot replace a To-header. Note that the new header will be placed last in the list of headers.
- Pre-condition
- aOldSIPHeader != 0
- aNewSIPHeader != 0
- aOldSIPHeader->Name() == aNewSIPHeader->Name()
Parameters
CSIPHeaderBase * aOldSIPHeader | the header to be replaced. Deleted if the function returns without leaving. |
CSIPHeaderBase * aNewSIPHeader | the header that replaces the old header. The ownership is transferred. |
ReplaceHeadersL(RPointerArray< CSIPHeaderBase > &)
Replaces all the headers with a common name. All the headers must be of same type.
- Pre-condition
- aNewHeaders.Count() > 0
Parameters
RPointerArray< CSIPHeaderBase > & aNewHeaders | the headers that will replace the old headers. The ownership of the headers is transferred and the array is resetted on return. |
SetContent(HBufC8 *)
IMPORT_C void | SetContent | ( | HBufC8 * | aContent | ) | |
SetSIPVersionL(const TDesC8 &)
void | SetSIPVersionL | ( | const TDesC8 & | aSIPVersion | ) | |
TakeContentOwnershipL()
IMPORT_C HBufC8 * | TakeContentOwnershipL | ( | ) | |
Gets the ownership to the content
To()
Gets the To-header in the message.
ToTextContentLengthLC()
HBufC8 * | ToTextContentLengthLC | ( | ) | const [private] |
ToTextFirstLineLC()
HBufC8 * | ToTextFirstLineLC | ( | ) | const [protected, pure virtual] |
ToTextHeaderPartL()
Encodes the header part of the SIP message object into its textual representation..
ToTextHeaderPartLC()
Encodes the header part of the SIP message object into its textual representation and pushes it to the CleanupStack.
ToTextL()
Encodes the SIP message object into its textual representation.
ToTextLC()
Encodes the SIP message object into its textual representation and pushes it to the CleanupStack.
Member Data Documentation
TInt
iAnnouncedContentLength
TInt
| iAnnouncedContentLength | [private] |
TBool
iAnnouncedContentLengthSet
TBool
| iAnnouncedContentLengthSet | [private] |
RArray< TSglQue< CSIPHeaderBase > > iSIPHeaderListArray
RPointerArray< CSIPHeaderBase > iTmpAllHeaders
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.