📄 osip_parser.h
字号:
#endif/** * Set the Content-length header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_content_length (osip_message_t * sip, const char *hvalue);/** * Get one Content-length header. * @param sip The element to work on. */#ifndef MINISIZE osip_content_length_t *osip_message_get_content_length (const osip_message_t * sip);#else#define osip_message_get_content_length(sip) ((sip)->content_length)#endif/** * Set the Content-type header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_content_type (osip_message_t * sip, const char *hvalue);/** * Get one Content-type header. * @param sip The element to work on. */#ifndef MINISIZE osip_content_type_t *osip_message_get_content_type (const osip_message_t * sip);#else#define osip_message_get_content_type(sip) ((sip)->content_type)#endif/** * Set the Cseq header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_cseq (osip_message_t * sip, const char *hvalue);/** * Get one Cseq header. * @param sip The element to work on. */#ifndef MINISIZE osip_cseq_t *osip_message_get_cseq (const osip_message_t * sip);#else#define osip_message_get_cseq(sip) ((sip)->cseq)#endif/** * Set the Error-info header. * @param sip The element to work on. * @param hvalue The string describing the element. */#ifndef MINISIZE int osip_message_set_error_info (osip_message_t * sip, const char *hvalue);#else#define osip_message_set_error_info(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Error-Info",value)#endif/** * Get one Error-info header. * @param sip The element to work on. * @param pos The index of the element to get. * @param dest A pointer on the header found. */#ifndef MINISIZE int osip_message_get_error_info (const osip_message_t * sip, int pos, osip_error_info_t ** dest);#else#define osip_message_get_error_info(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"error-info",pos,(osip_header_t **)dest)#endif/** * Set the From header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_from (osip_message_t * sip, const char *hvalue);/** * Get the From header. * @param sip The element to work on. */#ifndef MINISIZE osip_from_t *osip_message_get_from (const osip_message_t * sip);#else#define osip_message_get_from(sip) ((sip)->from)#endif/** * Set the mime-version header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_mime_version (osip_message_t * sip, const char *hvalue);/** * Get the Mime-version header. * @param sip The element to work on. */#ifndef MINISIZE osip_mime_version_t *osip_message_get_mime_version (const osip_message_t * sip);#else#define osip_message_get_mime_version(sip) ((sip)->mime_version)#endif/** * Set the Proxy-authenticate header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_proxy_authenticate (osip_message_t * sip, const char *hvalue);/** * Get the Proxy-authenticate header. * @param sip The element to work on. * @param pos The index of the element to get. * @param dest A pointer on the header found. */#ifndef MINISIZE int osip_message_get_proxy_authenticate (const osip_message_t * sip, int pos, osip_proxy_authenticate_t ** dest);#else#define osip_message_get_proxy_authenticate(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->proxy_authenticates), pos, (void **)(dest)) #endif/** * Set the Proxy-authorization header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_proxy_authorization (osip_message_t * sip, const char *hvalue);/** * Get one Proxy-authorization header. * @param sip The element to work on. * @param pos The index of the element to get. * @param dest A pointer on the header found. */#ifndef MINISIZE int osip_message_get_proxy_authorization (const osip_message_t * sip, int pos, osip_proxy_authorization_t ** dest);#else#define osip_message_get_proxy_authorization(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->proxy_authorizations), pos, (void **)(dest)) #endif/** * Set the Proxy-authentication-info header. * @param sip The element to work on. * @param hvalue The string describing the element. */#ifndef MINISIZE int osip_message_set_proxy_authentication_info (osip_message_t * sip, const char *hvalue);#else#define osip_message_set_proxy_authentication_info(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Proxy-Authentication-Info",value)#endif/** * Get the Proxy-authentication-info header. * @param sip The element to work on. * @param pos The index of the element to get. * @param dest A pointer on the header found. */#ifndef MINISIZE int osip_message_get_proxy_authentication_info (const osip_message_t * sip, int pos, osip_proxy_authentication_info_t ** dest);#else#define osip_message_get_proxy_authentication_info(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"proxy-authentication-info",pos,(osip_header_t **)dest)#endif/** * Set the Record-Route header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_record_route (osip_message_t * sip, const char *hvalue);/** * Get one Record-route header. * @param sip The element to work on. * @param pos The index of the element to get. * @param dest A pointer on the header found. */#ifndef MINISIZE int osip_message_get_record_route (const osip_message_t * sip, int pos, osip_record_route_t ** dest);#else#define osip_message_get_record_route(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->record_routes), pos, (void **)(dest)) #endif/** * Set the Route header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_route (osip_message_t * sip, const char *hvalue);/** * Get one Route header. * @param sip The element to work on. * @param pos The index of the element to get. * @param dest A pointer on the header found. */#ifndef MINISIZE int osip_message_get_route (const osip_message_t * sip, int pos, osip_route_t ** dest);#else#define osip_message_get_route(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->routes), pos, (void **)(dest)) #endif/** * Set the To header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_to (osip_message_t * sip, const char *hvalue);/** * Get the To header. * @param sip The element to work on. */#ifndef MINISIZE osip_to_t *osip_message_get_to (const osip_message_t * sip);#else#define osip_message_get_to(sip) ((sip)->to)#endif/** * Set the Via header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_via (osip_message_t * sip, const char *hvalue);/** * Append a Via header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_append_via (osip_message_t * sip, const char *hvalue);/** * Get one Via header. * @param sip The element to work on. * @param pos The index of the element to get. * @param dest A pointer on the header found. */#ifndef MINISIZE int osip_message_get_via (const osip_message_t * sip, int pos, osip_via_t ** dest);#else#define osip_message_get_via(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->vias), pos, (void **)(dest)) #endif/** * Set the Www-authenticate header. * @param sip The element to work on. * @param hvalue The string describing the element. */ int osip_message_set_www_authenticate (osip_message_t * sip, const char *hvalue);/** * Get one Www-authenticate header. * @param sip The element to work on. * @param pos The index of the element to get. * @param dest A pointer on the header found. */#ifndef MINISIZE int osip_message_get_www_authenticate (const osip_message_t * sip, int pos, osip_www_authenticate_t ** dest);#else#define osip_message_get_www_authenticate(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->www_authenticates), pos, (void **)(dest)) #endif#ifndef DOXYGEN/** * Allocate and Add multiple header (not defined in oSIP). * @param sip The element to work on. * @param hname The token name. NAME MUST BE DYNAMICLY ALLOCATED * @param hvalue The token value. VALUE MUST BE DYNAMICLY ALLOCATED */ int osip_message_set_multiple_header (osip_message_t * sip, char *hname, char *hvalue);#endif/** * Allocate and Add an "unknown" header (not defined in oSIP). * @param sip The element to work on. * @param hname The token name. * @param hvalue The token value. */ int osip_message_set_header (osip_message_t * sip, const char *hname, const char *hvalue);/** * Allocate and Add/Replace an "unknown" header (not defined in oSIP). * @param sip The element to work on. * @param hname The token name. * @param hvalue The token value. */ int osip_message_replace_header (osip_message_t * sip, const char *hname, const char *hvalue);#ifndef MINISIZE/** * Allocate and Add an "unknown" header (not defined in oSIP). * The element is add on the top of the unknown header list. * @param sip The element to work on. * @param hname The token name. * @param hvalue The token value. */ int osip_message_set_topheader (osip_message_t * sip, const char *hname, const char *hvalue);#endif/** * Find an "unknown" header. (not defined in oSIP) * @param sip The element to work on. * @param hname The name of the header to find. * @param pos The index where to start searching for the header. * @param dest A pointer to the header found. */ int osip_message_header_get_byname (const osip_message_t * sip, const char *hname, int pos, osip_header_t ** dest);/** * Get one "unknown" header. * @param sip The element to work on.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -