HP-UX C SIP Stack Message Layer Reference Guide (February 2008)

14 HP C SIP Stack Message Layer Reference Guide
Get and Set Functions
RvSipMsgGetStringLength()
RvSipMsgGetStringLength()
DESCRIPTION
Some of the message parameters are kept in a string format, for example, the
reason phrase of a response message. In order to get such a parameter from the
message, your application should supply an adequate buffer to where the string
will be copied. This function provides you with the length of the string to enable
you to allocate an appropriate buffer size before calling the Get function.
Note If the message body is of the multipart type, it may be represented as a list
of body parts, and not as a string. To retrieve the body string length, the body
object must be encoded if it is presented as a list of body parts. This function will
encode the message body on a temporary memory page whenever the massage
body object contains a list of body parts (to calculate the message body string
length). If this function did not succeed to encode the message body (an error
occurred while encoding), 0 is returned and an appropriate ERROR can be found
in the log.
SYNTAX
RvUint RvSipMsgGetStringLength(
IN RvSipMsgHandle hSipMsg,
IN RvSipMessageStringName stringName);
PARAMETERS
hHeader
The handle to the message.
stringName
The enumeration of the string name for which you require the length.
RETURN VALUES
Returns the length of the specified string.