⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 osip_negotiation.h

📁 SIP协议栈实现
💻 H
📖 第 1 页 / 共 2 页
字号:
 * Set the local username ('o' field) of all local SDP packet. * @param tmp The username. */  int osip_negotiation_set_o_username (osip_negotiation_t *, char *tmp);/** * Set the local session id ('o' field) of all local SDP packet. * WARNING: this field should be updated for each new SDP packet? * @param tmp The session id. */  int osip_negotiation_set_o_session_id (osip_negotiation_t *, char *tmp);/** * Set the local session version ('o' field) of all local SDP packet. * WARNING: this field should be updated for each new SDP packet? * @param tmp The session version. */  int osip_negotiation_set_o_session_version (osip_negotiation_t *, char *tmp);/** * Set the local network type ('o' field) of all local SDP packet. * @param tmp The network type. */  int osip_negotiation_set_o_nettype (osip_negotiation_t *, char *tmp);/** * Set the local address type ('o' field) of all local SDP packet. * @param tmp The address type. */  int osip_negotiation_set_o_addrtype (osip_negotiation_t *, char *tmp);/** * Set the local IP address ('o' field) of all local SDP packet. * @param tmp The IP address. */  int osip_negotiation_set_o_addr (osip_negotiation_t *, char *tmp);/** * Set the local network type ('c' field) of all local SDP packet. * @param tmp The network type. */  int osip_negotiation_set_c_nettype (osip_negotiation_t *, char *tmp);/** * Set the local address type ('c' field) of all local SDP packet. * @param tmp The address type. */  int osip_negotiation_set_c_addrtype (osip_negotiation_t *, char *tmp);/** * Set the local IP address ('c' field) of all local SDP packet. * @param tmp The IP address. */  int osip_negotiation_set_c_addr (osip_negotiation_t *, char *tmp);/** * Set the local ttl for multicast address ('c' field) of all local SDP packet. * @param tmp The ttl for multicast address. */  int osip_negotiation_set_c_addr_multicast_ttl (osip_negotiation_t *, char *tmp);/** * Set the local int for multicast address ('c' field) of all local SDP packet. * @param tmp The int for multicast address. */  int osip_negotiation_set_c_addr_multicast_int (osip_negotiation_t *, char *tmp);/** * Add a supported audio codec. * Those codecs will be accepted as long as you return 0 when * the callback 'fcn_accept_audio_codec' is called with the specific payload. * @param payload The payload. * @param number_of_port The number of port (channel) for this codec. * @param proto The protocol. * @param c_nettype The network type in the 'c' field. * @param c_addrtype The address type in the 'c' field. * @param c_addr The address in the 'c' field. * @param c_addr_multicast_ttl The ttl for multicast address in the 'c' field. * @param c_addr_multicast_int The int for multicast address in the 'c' field. * @param a_rtpmap The rtpmap attribute in the 'a' field. */  int osip_negotiation_add_support_for_audio_codec (osip_negotiation_t *, char *payload,					      char *number_of_port,					      char *proto, char *c_nettype,					      char *c_addrtype, char *c_addr,					      char *c_addr_multicast_ttl,					      char *c_addr_multicast_int,					      char *a_rtpmap);/** * Add a supported video codec. * Those codecs will be accepted as long as you return 0 when * the callback 'fcn_accept_video_codec' is called with the specific payload. * @param payload The payload. * @param number_of_port The number of port (channel) for this codec. * @param proto The protocol. * @param c_nettype The network type in the 'c' field. * @param c_addrtype The address type in the 'c' field. * @param c_addr The address in the 'c' field. * @param c_addr_multicast_ttl The ttl for multicast address in the 'c' field. * @param c_addr_multicast_int The int for multicast address in the 'c' field. * @param a_rtpmap The rtpmap attribute in the 'a' field. */  int osip_negotiation_add_support_for_video_codec (osip_negotiation_t *, char *payload,					      char *number_of_port,					      char *proto, char *c_nettype,					      char *c_addrtype, char *c_addr,					      char *c_addr_multicast_ttl,					      char *c_addr_multicast_int,					      char *a_rtpmap);/** * Add a supported (non-audio and non-video) codec. * Those codecs will be accepted as long as you return 0 when * the callback 'fcn_accept_other_codec' is called with the specific payload. * @param payload The payload. * @param number_of_port The number of port (channel) for this codec. * @param proto The protocol. * @param c_nettype The network type in the 'c' field. * @param c_addrtype The address type in the 'c' field. * @param c_addr The address in the 'c' field. * @param c_addr_multicast_ttl The ttl for multicast address in the 'c' field. * @param c_addr_multicast_int The int for multicast address in the 'c' field. * @param a_rtpmap The rtpmap attribute in the 'a' field. */  int osip_negotiation_add_support_for_other_codec (osip_negotiation_t *, char *payload,					      char *number_of_port,					      char *proto, char *c_nettype,					      char *c_addrtype, char *c_addr,					      char *c_addr_multicast_ttl,					      char *c_addr_multicast_int,					      char *a_rtpmap);#ifndef DOXYGEN/** * Free resource in the global sdp_config.. */  int osip_negotiation_remove_audio_payloads ();/** * Free resource in the global sdp_config.. */  int osip_negotiation_remove_video_payloads ();/** * Free resource in the global sdp_config.. */  int osip_negotiation_remove_other_payloads ();#endif/** * Set the callback for setting info ('i' field) in a local SDP packet. * This callback is called once each time we need an 'i' field. * @param fcn The callback. */  int osip_negotiation_set_fcn_set_info (osip_negotiation_t *,					int (*fcn) (osip_negotiation_ctx_t *, sdp_message_t *));/** * Set the callback for setting a URI ('u' field) in a local SDP packet. * This callback is called once each time we need an 'u' field. * @param fcn The callback. */  int osip_negotiation_set_fcn_set_uri (osip_negotiation_t *,				       int (*fcn) (osip_negotiation_ctx_t *, sdp_message_t *));/** * Set the callback for setting an email ('e' field) in a local SDP packet. * This callback is called once each time we need an 'e' field. * @param fcn The callback. */  int osip_negotiation_set_fcn_set_emails (osip_negotiation_t *,					  int (*fcn) (osip_negotiation_ctx_t *, sdp_message_t *));/** * Set the callback for setting a phone ('p' field) in a local SDP packet. * This callback is called once each time we need an 'p' field. * @param fcn The callback. */  int osip_negotiation_set_fcn_set_phones (osip_negotiation_t *,					  int (*fcn) (osip_negotiation_ctx_t *, sdp_message_t *));/** * Set the callback for setting an attribute ('a' field) in a local SDP packet. * This callback is called once each time we need an 'a' field. * @param fcn The callback. */  int    osip_negotiation_set_fcn_set_attributes (osip_negotiation_t *,					    int (*fcn) (osip_negotiation_ctx_t *, sdp_message_t *, int));/** * Set the callback used to accept a codec during a negotiation. * This callback is called once each time we need to accept a codec. * @param fcn The callback. */  int    osip_negotiation_set_fcn_accept_audio_codec (osip_negotiation_t *,						int (*fcn) (osip_negotiation_ctx_t *, char *, char *, int, char *));/** * Set the callback used to accept a codec during a negotiation. * This callback is called once each time we need to accept a codec. * @param fcn The callback. */  int    osip_negotiation_set_fcn_accept_video_codec (osip_negotiation_t *,						int (*fcn) (osip_negotiation_ctx_t *, char *, char *, int, char *));/** * Set the callback used to accept a codec during a negotiation. * This callback is called once each time we need to accept a codec. * @param fcn The callback. */  int    osip_negotiation_set_fcn_accept_other_codec (osip_negotiation_t *,						int (*fcn) (osip_negotiation_ctx_t *, char *, char *, char *, char *));/** * Set the callback for setting the port number ('m' field) in a local SDP packet. * This callback is called once each time a 'm' line is accepted. * @param fcn The callback. */  int osip_negotiation_set_fcn_get_audio_port (osip_negotiation_t *, char *(*fcn) (osip_negotiation_ctx_t *, int));/** * Set the callback for setting the port number ('m' field) in a local SDP packet. * This callback is called once each time a 'm' line is accepted. * @param fcn The callback. */  int osip_negotiation_set_fcn_get_video_port (osip_negotiation_t *, char *(*fcn) (osip_negotiation_ctx_t *, int));/** * Set the callback for setting the port number ('m' field) in a local SDP packet. * This callback is called once each time a 'm' line is accepted. * @param fcn The callback. */  int osip_negotiation_set_fcn_get_other_port (osip_negotiation_t *, char *(*fcn) (osip_negotiation_ctx_t *, int));/** * Start the automatic negotiation for a UA * NOTE: You can previously set context->mycontext to point to your * personal context. This way you'll get access to your personal context * in the callback and you can easily take the correct decisions. * After this method is called, the negotiation will happen and * callbacks will be called. You can modify, add, remove SDP fields, * and accept and refuse the codec from your preferred list by using * those callbacks. * Of course, after the negotiation happen, you can modify the * SDP packet if you wish to improve it or just refine some attributes. * @param ctx The context holding the remote SDP offer. */  int osip_negotiation_ctx_execute_negotiation (osip_negotiation_t *,						osip_negotiation_ctx_t * ctx);  int osip_negotiation_sdp_build_offer (osip_negotiation_t *,					osip_negotiation_ctx_t * con,					sdp_message_t ** sdp,					char *audio_port,					char *video_port);  int __osip_negotiation_sdp_build_offer (osip_negotiation_t *,			 osip_negotiation_ctx_t * con, sdp_message_t ** sdp, char *audio_port,			 char *video_port, char *audio_codec, char *video_codec);  /* for non "on-hold sdp" in outgoing invite */  int osip_negotiation_sdp_message_put_on_hold (sdp_message_t * sdp);  /* for an "on hold sdp" in outgoing invite */  int osip_negotiation_sdp_message_put_off_hold (sdp_message_t * sdp);/** @} */#ifdef __cplusplus}#endif#endif /*_SDP_NEGOC_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -