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

Working with SIP Messages 181
Working With Multipart MIME
if (RV_OK != rv)
{
printf("Failed to get body part");
return;
}
while (NULL != hBodyPart)
{
/*Do something with the body part ... */
/*Gets the next body part in the list.*/
rv = RvSipBodyGetBodyPart(hBody, RVSIP_NEXT_ELEMENT, hBodyPart,
&hBodyPart);
if (RV_OK != rv)
{
printf("Failed to get body part");
return;
}
}
}
/*==================================================================================*/
CREATING A
M
ULTIPART BODY
The SIP Stack allows you to build a multipart Body from several Body Part
objects. You use the function, RvSipBodyPushBodyPart(), to add a new Body
Part to the list of Body Parts in the Body object.
Sample Code
The following code demonstrates how to create a Body object from Body Parts
that are given as strings.