📄 sip_msg.h
字号:
* @return The header instance, which points to the same memory
* location as the mem argument.
*/
PJ_DECL(pjsip_rr_hdr*) pjsip_rr_hdr_init( pj_pool_t *pool,
void *mem );
/**
* Create new Route header from the pool.
*
* @param pool The pool.
* @return A new instance of "Route" header.
*/
PJ_DECL(pjsip_route_hdr*) pjsip_route_hdr_create( pj_pool_t *pool );
/**
* Initialize a preallocated memory with the header structure. This function
* should only be called when application uses its own memory allocation to
* allocate memory block for the specified header (e.g. in C++, when the
* header is allocated with "new" operator).
* For normal applications, they should use pjsip_xxx_hdr_create() instead,
* which allocates memory and initialize it in one go.
*
* @param pool Pool for additional memory allocation if required.
* @param mem Pre-allocated memory to be initialized as the header.
*
* @return The header instance, which points to the same memory
* location as the mem argument.
*/
PJ_DECL(pjsip_route_hdr*) pjsip_route_hdr_init( pj_pool_t *pool,
void *mem );
/**
* Convert generic routing header to Record-Route header.
*
* @param r The generic routing header, or a "Routing" header.
* @return Record-Route header.
*/
PJ_DECL(pjsip_rr_hdr*) pjsip_routing_hdr_set_rr( pjsip_routing_hdr *r );
/**
* Convert generic routing header to "Route" header.
*
* @param r The generic routing header, or a "Record-Route" header.
* @return "Route" header.
*/
PJ_DECL(pjsip_route_hdr*) pjsip_routing_hdr_set_route( pjsip_routing_hdr *r );
/* **************************************************************************/
/**
* Require header.
*/
typedef pjsip_generic_array_hdr pjsip_require_hdr;
/**
* Create new Require header instance.
*
* @param pool The pool.
*
* @return New Require header instance.
*/
PJ_DECL(pjsip_require_hdr*) pjsip_require_hdr_create(pj_pool_t *pool);
/**
* Initialize a preallocated memory with the header structure. This function
* should only be called when application uses its own memory allocation to
* allocate memory block for the specified header (e.g. in C++, when the
* header is allocated with "new" operator).
* For normal applications, they should use pjsip_xxx_hdr_create() instead,
* which allocates memory and initialize it in one go.
*
* @param pool Pool for additional memory allocation if required.
* @param mem Pre-allocated memory to be initialized as the header.
*
* @return The header instance, which points to the same memory
* location as the mem argument.
*/
PJ_DECL(pjsip_require_hdr*) pjsip_require_hdr_init( pj_pool_t *pool,
void *mem );
/* **************************************************************************/
/**
* Retry-After header.
*/
typedef pjsip_generic_int_hdr pjsip_retry_after_hdr;
/**
* Create new Retry-After header instance.
*
* @param pool The pool.
* @param value The Retry-After value.
*
* @return New Retry-After header instance.
*/
PJ_DECL(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_create(pj_pool_t *pool,
int value);
/**
* Initialize a preallocated memory with the header structure.
*
* @param pool Pool for additional memory allocation if required.
* @param mem Pre-allocated memory to be initialized as the header.
* @param value The Retry-After value.
*
* @return The header instance, which points to the same memory
* location as the mem argument.
*/
PJ_DECL(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_init( pj_pool_t *pool,
void *mem,
int value );
/* **************************************************************************/
/**
* Supported header.
*/
typedef pjsip_generic_array_hdr pjsip_supported_hdr;
/**
* Create new Supported header instance.
*
* @param pool The pool.
*
* @return New Supported header instance.
*/
PJ_DECL(pjsip_supported_hdr*) pjsip_supported_hdr_create(pj_pool_t *pool);
/**
* Initialize a preallocated memory with the header structure.
*
* @param pool Pool for additional memory allocation if required.
* @param mem Pre-allocated memory to be initialized as the header.
*
* @return The header instance, which points to the same memory
* location as the mem argument.
*/
PJ_DECL(pjsip_supported_hdr*) pjsip_supported_hdr_init( pj_pool_t *pool,
void *mem );
/* **************************************************************************/
/**
* Unsupported header.
*/
typedef pjsip_generic_array_hdr pjsip_unsupported_hdr;
/**
* Create new Unsupported header instance.
*
* @param pool The pool.
*
* @return New Unsupported header instance.
*/
PJ_DECL(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_create(pj_pool_t *pool);
/**
* Initialize a preallocated memory with the header structure.
*
* @param pool Pool for additional memory allocation if required.
* @param mem Pre-allocated memory to be initialized as the header.
*
* @return The header instance, which points to the same memory
* location as the mem argument.
*/
PJ_DECL(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_init( pj_pool_t *pool,
void *mem );
/* **************************************************************************/
/**
* SIP Via header.
* In this implementation, Via header can only have one element in each header.
* If a message arrives with multiple elements in a single Via, then they will
* be split up into multiple Via headers.
*/
typedef struct pjsip_via_hdr
{
PJSIP_DECL_HDR_MEMBER(struct pjsip_via_hdr);
pj_str_t transport; /**< Transport type. */
pjsip_host_port sent_by; /**< Host and optional port */
int ttl_param; /**< TTL parameter, or -1 if it's not specified. */
int rport_param; /**< "rport" parameter, 0 to specify without
port number, -1 means doesn't exist. */
pj_str_t maddr_param; /**< "maddr" parameter. */
pj_str_t recvd_param; /**< "received" parameter. */
pj_str_t branch_param; /**< "branch" parameter. */
pjsip_param other_param; /**< Other parameters, concatenated as single string. */
pj_str_t comment; /**< Comment. */
} pjsip_via_hdr;
/**
* Create a new Via header.
*
* @param pool The pool.
* @return A new "Via" header instance.
*/
PJ_DECL(pjsip_via_hdr*) pjsip_via_hdr_create( pj_pool_t *pool );
/**
* Initialize a preallocated memory with the header structure.
*
* @param pool Pool for additional memory allocation if required.
* @param mem Pre-allocated memory to be initialized as the header.
*
* @return The header instance, which points to the same memory
* location as the mem argument.
*/
PJ_DECL(pjsip_via_hdr*) pjsip_via_hdr_init( pj_pool_t *pool,
void *mem );
/* **************************************************************************/
/**
* SIP Warning header.
* In this version, Warning header is just a typedef for generic string
* header.
*/
typedef pjsip_generic_string_hdr pjsip_warning_hdr;
/**
* Create a warning header with the specified contents.
*
* @param pool Pool to allocate memory from.
* @param code Warning code, 300-399.
* @param host The host portion of the Warning header.
* @param text The warning text, which MUST not be quoted with
* double quote.
*
* @return The Warning header field.
*/
PJ_DECL(pjsip_warning_hdr*) pjsip_warning_hdr_create( pj_pool_t *pool,
int code,
const pj_str_t *host,
const pj_str_t *text);
/**
* Create a warning header and initialize the contents from the error
* message for the specified status code. The warning code will be
* set to 399.
*
* @param pool Pool to allocate memory from.
* @param host The host portion of the Warning header.
* @param status The error status code, which error text will be
* put in as the Warning text.
*
* @return The Warning header field.
*/
PJ_DECL(pjsip_warning_hdr*)
pjsip_warning_hdr_create_from_status( pj_pool_t *pool,
const pj_str_t *host,
pj_status_t status);
/* **************************************************************************/
/** Accept-Encoding header. */
typedef pjsip_generic_string_hdr pjsip_accept_encoding_hdr;
/** Create Accept-Encoding header. */
#define pjsip_accept_encoding_hdr_create pjsip_generic_string_hdr_create
/** Accept-Language header. */
typedef pjsip_generic_string_hdr pjsip_accept_lang_hdr;
/** Create Accept-Language header. */
#define pjsip_accept_lang_hdr_create pjsip_generic_string_hdr_create
/** Alert-Info header. */
typedef pjsip_generic_string_hdr pjsip_alert_info_hdr;
/** Create Alert-Info header. */
#define pjsip_alert_info_hdr_create pjsip_generic_string_hdr_create
/** Authentication-Info header. */
typedef pjsip_generic_string_hdr pjsip_auth_info_hdr;
/** Create Authentication-Info header. */
#define pjsip_auth_info_hdr_create pjsip_generic_string_hdr_create
/** Call-Info header. */
typedef pjsip_generic_string_hdr pjsip_call_info_hdr;
/** Create Call-Info header. */
#define pjsip_call_info_hdr_create pjsip_generic_string_hdr_create
/** Content-Disposition header. */
typedef pjsip_generic_string_hdr pjsip_content_disposition_hdr;
/** Create Content-Disposition header. */
#define pjsip_content_disposition_hdr_create pjsip_generic_string_hdr_create
/** Content-Encoding header. */
typedef pjsip_generic_string_hdr pjsip_content_encoding_hdr;
/** Create Content-Encoding header. */
#define pjsip_content_encoding_hdr_create pjsip_generic_string_hdr_create
/** Content-Language header. */
typedef pjsip_generic_string_hdr pjsip_content_lang_hdr;
/** Create Content-Language header. */
#define pjsip_content_lang_hdr_create pjsip_generic_string_hdr_create
/** Date header. */
typedef pjsip_generic_string_hdr pjsip_date_hdr;
/** Create Date header. */
#define pjsip_date_hdr_create pjsip_generic_string_hdr_create
/** Error-Info header. */
typedef pjsip_generic_string_hdr pjsip_err_info_hdr;
/** Create Error-Info header. */
#define pjsip_err_info_hdr_create pjsip_generic_string_hdr_create
/** In-Reply-To header. */
typedef pjsip_generic_string_hdr pjsip_in_reply_to_hdr;
/** Create In-Reply-To header. */
#define pjsip_in_reply_to_hdr_create pjsip_generic_string_hdr_create
/** MIME-Version header. */
typedef pjsip_generic_string_hdr pjsip_mime_version_hdr;
/** Create MIME-Version header. */
#define pjsip_mime_version_hdr_create pjsip_generic_string_hdr_create
/** Organization header. */
typedef pjsip_generic_string_hdr pjsip_organization_hdr;
/** Create Organization header. */
#define pjsip_organization_hdr_create pjsip_genric_string_hdr_create
/** Priority header. */
typedef pjsip_generic_string_hdr pjsip_priority_hdr;
/** Create Priority header. */
#define pjsip_priority_hdr_create pjsip_generic_string_hdr_create
/** Proxy-Require header. */
typedef pjsip_generic_string_hdr pjsip_proxy_require_hdr;
/** Reply-To header. */
typedef pjsip_generic_string_hdr pjsip_reply_to_hdr;
/** Create Reply-To header. */
#define pjsip_reply_to_hdr_create pjsip_generic_string_hdr_create
/** Server header. */
typedef pjsip_generic_string_hdr pjsip_server_hdr;
/** Create Server header. */
#define pjsip_server_hdr_create pjsip_generic_string_hdr_create
/** Subject header. */
typedef pjsip_generic_string_hdr pjsip_subject_hdr;
/** Create Subject header. */
#define pjsip_subject_hdr_create pjsip_generic_string_hdr_create
/** Timestamp header. */
typedef pjsip_generic_string_hdr pjsip_timestamp_hdr;
/** Create Timestamp header. */
#define pjsip_timestamp_hdr_create pjsip_generic_string_hdr_create
/** User-Agent header. */
typedef pjsip_generic_string_hdr pjsip_user_agent_hdr;
/** Create User-Agent header. */
#define pjsip_user_agent_hdr_create pjsip_generic_string_hdr_create
/**
* @}
*/
/**
* @} PJSIP_MSG
*/
PJ_END_DECL
#endif /* __PJSIP_SIP_MSG_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -