HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

Working with SIP Messages 151
SIP Stack Message API
SIP STACK
M
ESSAGE API
SIP Stack Message API functions can be categorized as follows:
CONSTRUCTORS
You use constructors to create new objects.
GET AND SET FUNCTIONS
Get and Set functions are the only way to access object fields. The following
rules apply to Get and Set functions:
Setting parameters
The parameter you supply is always copied into the object.
Getting string parameters
You must supply a buffer. The Get function will copy the string
into this buffer. You can use a special GetSize function to find
out the required buffer size before performing the Get
operation.
Getting non-string parameters
The actual value of the parameter is returned.
ENCODE AND PARSE FUNCTIONS
SIP is a text-based protocol. RFC 3261 defines the syntax for each message and
message part. You can use the encode functions to receive text strings that an
object represents. The parse functions enable you to initialize an object from a
formatted text string.
COPY FUNCTIONS
Use the copy functions to create two similar objects. The copy functions copy
all fields from one object to another.
WORKING WITH
H
EADERS
SIP Header API functions provide a set of access functions (including Get and
Set) for reading and modifying various parameters of the headers.
Sample Code
The following code demonstrates how to get and set parameters in a Party
header.