|
||||||||||||||||||||||||||||||||||||||
Detailed DescriptionGeneric abstraction to message body. When an incoming message is parsed (pjsip_parse_msg()), the parser fills in all members with the appropriate value. The 'data' and 'len' member will describe portion of incoming packet which denotes the message body. When application needs to attach message body to outgoing SIP message, it must fill in all members of this structure. Forward declaration for message body (sip_msg.h). Field DocumentationMIME content type. For incoming messages, the parser will fill in this member with the content type found in Content-Type header. For outgoing messages, application may fill in this member with appropriate value, because the stack will generate Content-Type header based on the value specified here. If the content_type is empty, no Content-Type AND Content-Length header will be added to the message. The stack assumes that application adds these headers themselves.
Pointer to buffer which holds the message body data. For incoming messages, the parser will fill in this member with the pointer to the body string. When sending outgoing message, this member doesn't need to point to the actual message body string. It can be assigned with arbitrary pointer, because the value will only need to be understood by the print_body() function. The stack itself will not try to interpret this value, but instead will always call the print_body() whenever it needs to get the actual body string.
The length of the data. For incoming messages, the parser will fill in this member with the actual length of message body. When sending outgoing message, again just like the "data" member, the "len" member doesn't need to point to the actual length of the body string.
Pointer to function to print this message body. Application must set a proper function here when sending outgoing message.
Clone the data part only of this message body. Note that this only duplicates the data part of the body instead of the whole message body. If application wants to duplicate the entire message body structure, it must call pjsip_msg_body_clone().
The documentation for this struct was generated from the following file:
Copyright (C) 2006-2008 Teluu Inc.
| |
|||||||||||||||||||||||||||||||||||||