亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? osip_negotiation.h

?? SIP協議棧實現
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*  The oSIP library implements the Session Initiation Protocol (SIP -rfc2543-)  Copyright (C) 2001  Aymeric MOIZARD jack@atosc.org    This library is free software; you can redistribute it and/or  modify it under the terms of the GNU Lesser General Public  License as published by the Free Software Foundation; either  version 2.1 of the License, or (at your option) any later version.    This library is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public  License along with this library; if not, write to the Free Software  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#ifndef _SDP_NEGOC_H_#define _SDP_NEGOC_H_#include <osipparser2/sdp_message.h>/** * @file sdp_negoc.h * @brief oSIP and SDP offer/answer model Routines * * The SDP offer/answer model is where most SIP interoperability issue * comes from.  The SDP specification (rfc2327.txt) is often not fully * respected. As an example, most SIP applications forget to add the * mandatory 's' field in the SDP packet. Another mistake is to assume * that an SDP packet don't need a 'p' and a 'e' field. Even if they * are both optional, at least of those is mandatory! I have never * seen ONE implementation that send at least one 'p' or 'e' field!! * <BR>For all the reasons, that make negotiation a hard task, I have * decided to provide a helpful facility to build SDP answer from an * SDP offer. (This facility does not help to build the compliant offer) * Of course, after the SDP negotiator has been executed and produced * a valid response, you can still modify your SDP answer to add * attributes or modify anything. You always keep the entire control * over it. * <H2>Do you need the negotiator</H2> * If you are planning a simple application, I advise you to use it. * Advanced applications may find it inappropriate, but as you can * modify the SDP answer after running the negotiation, I see no reason * why you should not use it. The only goal of the SDP negotiator is * to make sure only one line of audio codec is accepted (the first one) * and only one line of video codec is accepted (the first one). It * also remove from the media lines, the codec that you don't support * without asking you. (Also, you can still refuse the codec you support.) * <BR>Using the negotiator, your only task is to check/add/remove * the media attributes.  *  * <H2>How-To</H2> * Using the SDP negotiator is simple. An example is provided in the * test directory as 'torture_sdp.c'. It parses a SDP packet from * a file (a sample is available in conf/) and produce the answer * that would be made with a basic configuration where 4 audio codecs * are supported. * <BR>When starting your application, you simply configure the global * osip_negotiation_t element: you'll set you username, ip address and some * general informations about you that every SDP packet must contain. * As a second action, you will register all the codec you support. * (audio, video and 'other' codecs). * <BR>After that, you will also register a set of method used to * accept the codec. The return code of those method will accept or * refused the supported codec for this specific session. * <pre><code> *  osip_negotiation_set_fcn_accept_audio_codec(&application_accept_audio_codec); *  osip_negotiation_set_fcn_accept_video_codec(&application_accept_video_codec); *  osip_negotiation_set_fcn_accept_other_codec(&application_accept_other_codec); *  osip_negotiation_set_fcn_get_audio_port(&application_get_audio_port); * </pre></code> * <BR>When you need to create an answer, the following code will create * the SDP packet: * <pre><code> *  osip_negotiation_ctx_t *context; *   *  sdp_message_t *dest; *  i = osip_negotiation_ctx_init(&context); *  i = osip_negotiation_ctx_set_mycontext(context, (void *)ua_context); *  i = osip_negotiation_ctx_set_remote_sdp(context, sdp); *  if (i!=0) { *    fprintf(stdout, "Initialisation of context failed. Could not negociate"); *  } else { *    fprintf(stdout, "Trying to execute a SIP negotiation:"); *    i = osip_negotiation_ctx_execute_negotiation(context); *    fprintf(stdout, "return code: %i",i); *    if (i==200) *     { *       dest = osip_negotiation_ctx_get_local_sdp(context); *       fprintf(stdout, "SDP answer:"); *       i = sdp_message_to_str(dest, &result); *       if (i!=0) *         fprintf(stdout, "Error found in SDP answer while printing"); *       else *         fprintf(stdout, "%s", result); *       osip_free(result); *     } *    osip_negotiation_ctx_free(context); *    osip_free(context); *    return 0; *  } * </pre></code> * <BR>Notice the presence of osip_negotiation_ctx_set_mycontext() which can add * a store the address of your own context (probably related to your call). * This is very useful if you need to know inside the callback which call * this negotiation belongs to. *//** * @defgroup oSIP_OAM oSIP and SDP offer/answer model Handling * @ingroup oSIP * @{ */#ifdef __cplusplusextern "C"{#endif/** * Structure for applying the SDP offer/answer negotiation. * The goal is simply to give: *      1.  A configuration (osip_negotiation_t) *      2.  A remote SDP packet (generally from the INVITE) * The result is the creation of a local answer to * the remote SDP packet. * @defvar osip_negotiation_ctx_t */  typedef struct osip_negotiation_ctx osip_negotiation_ctx_t;  struct osip_negotiation_ctx  {    void *mycontext;		/* add the pointer to your personal context */    sdp_message_t *remote;    sdp_message_t *local;  };/** * Allocate a negotiation context. * @param ctx The element to work on. */  int osip_negotiation_ctx_init (osip_negotiation_ctx_t ** ctx);/** * Free a negotiation context. * @param ctx The element to work on. */  void osip_negotiation_ctx_free (osip_negotiation_ctx_t * ctx);/** * Set the context associated to this negotiation. * @param ctx The element to work on. * @param value A pointer to your personal context. */  int osip_negotiation_ctx_set_mycontext (osip_negotiation_ctx_t * ctx, void *value);/** * Get the context associated to this negotiation. * @param ctx The element to work on. */  void *osip_negotiation_ctx_get_mycontext (osip_negotiation_ctx_t * ctx);/** * Set the local SDP packet associated to this negotiation. * NOTE: This is done by the 'negotiator'. (You only need to give * the remote SDP packet) * @param ctx The element to work on. * @param sdp The local SDP packet. */  int osip_negotiation_ctx_set_local_sdp (osip_negotiation_ctx_t * ctx, sdp_message_t * sdp);/** * Get the local SDP packet associated to this negotiation. * @param ctx The element to work on. */  sdp_message_t *osip_negotiation_ctx_get_local_sdp (osip_negotiation_ctx_t * ctx);/** * Set the remote SDP packet associated to this negotiation. * @param ctx The element to work on. * @param sdp The remote SDP packet. */  int osip_negotiation_ctx_set_remote_sdp (osip_negotiation_ctx_t * ctx, sdp_message_t * sdp);/** * Get the remote SDP packet associated to this negotiation. * @param ctx The element to work on. */  sdp_message_t *osip_negotiation_ctx_get_remote_sdp (osip_negotiation_ctx_t * ctx);/** * Structure for storing the global configuration management. * The information you store here is used when computing a * remote SDP packet to build a compliant answer. * The main objectives is to: *    * automaticly refuse unknown media. *    * accept some of the known media. *    * make sure the SDP answer match the SDP offer. *    * simplify the SDP offer/answer model, as all unknown media *      are refused without any indication to the application layer. *    * In any case, you can still modify the entire SDP packet after *      a negotiation if you are not satisfied by the negotiation result. * @defvar osip_negotiation_t */  typedef struct osip_negotiation osip_negotiation_t;  struct osip_negotiation  {    char *o_username;    char *o_session_id;    char *o_session_version;    char *o_nettype;    char *o_addrtype;    char *o_addr;    char *c_nettype;    char *c_addrtype;    char *c_addr;    char *c_addr_multicast_ttl;    char *c_addr_multicast_int;    osip_list_t *audio_codec;    osip_list_t *video_codec;    osip_list_t *other_codec;    int (*fcn_set_info) (void *, sdp_message_t *);    int (*fcn_set_uri) (void *, sdp_message_t *);    int (*fcn_set_emails) (void *, sdp_message_t *);    int (*fcn_set_phones) (void *, sdp_message_t *);    int (*fcn_set_attributes) (void *, sdp_message_t *, int);    int (*fcn_accept_audio_codec) (void *, char *, char *, int, char *);    int (*fcn_accept_video_codec) (void *, char *, char *, int, char *);    int (*fcn_accept_other_codec) (void *, char *, char *, char *, char *);    char *(*fcn_get_audio_port) (void *, int);    char *(*fcn_get_video_port) (void *, int);    char *(*fcn_get_other_port) (void *, int);  };/** * Initialise (and Allocate) a sdp_config element (this element is global). * Stores the initialized structure to conf_out. */  int osip_negotiation_init (osip_negotiation_t **conf_out);/** * Free resource stored by a sdp_config element. * This method must be called once when the application is stopped. */  void osip_negotiation_free (osip_negotiation_t *conf);/**

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91网站视频在线观看| 国产精品夜夜嗨| 色88888久久久久久影院按摩| 精品国产三级a在线观看| 日韩国产欧美在线观看| 欧美另类变人与禽xxxxx| 亚洲一二三四在线| 欧美三级中文字幕在线观看| 亚洲h动漫在线| 久久婷婷综合激情| 国产91精品精华液一区二区三区 | 日韩小视频在线观看专区| 五月天激情综合网| 久久精品一区二区三区不卡| 99这里只有精品| 美女在线一区二区| 日韩视频免费观看高清完整版在线观看| 亚洲日本欧美天堂| 99久久久精品| 极品少妇xxxx精品少妇偷拍| 国产精品久久精品日日| 这里只有精品电影| 色哟哟日韩精品| 日本va欧美va精品发布| 久久久影院官网| 日韩精品一区在线观看| 在线精品视频一区二区三四| 天堂成人免费av电影一区| 日韩一区二区免费电影| 成人午夜在线免费| 一区二区免费在线| 精品99一区二区三区| 国产91富婆露脸刺激对白| 婷婷一区二区三区| 亚洲综合另类小说| 亚洲精品成人悠悠色影视| 中文字幕精品在线不卡| 欧美videos中文字幕| 日韩无一区二区| 日韩一区二区麻豆国产| 精品国产伦一区二区三区观看体验| 欧美私人免费视频| 欧美高清一级片在线| 欧美理论电影在线| 日韩精品一区国产麻豆| 久久久99精品久久| 国产精品夫妻自拍| 一区二区在线电影| 日本成人在线电影网| 国产一区二区三区不卡在线观看| 精品制服美女久久| www.66久久| 欧美久久久久久久久中文字幕| 91免费国产在线| 狠狠色综合色综合网络| 国产真实乱对白精彩久久| 亚洲成av人影院在线观看网| 一区二区三区日本| 青青草国产成人99久久| 国产美女精品一区二区三区| 91福利在线观看| 国产欧美一区二区精品仙草咪| 亚洲欧美日韩精品久久久久| 久久超级碰视频| 成人丝袜18视频在线观看| 国产一区啦啦啦在线观看| 色婷婷av一区二区三区大白胸| 欧美美女一区二区三区| 精品福利在线导航| 国产精品毛片高清在线完整版| 五月激情综合网| 在线精品视频免费播放| 国产精品伦理在线| 国产一区二区在线看| 欧美大片在线观看| 国内成人精品2018免费看| 欧美久久久久免费| 首页亚洲欧美制服丝腿| 91免费国产在线观看| 国产精品久久久久婷婷二区次| 五月天婷婷综合| 7777精品久久久大香线蕉 | 欧美一个色资源| 偷窥少妇高潮呻吟av久久免费| 91亚洲男人天堂| 91麻豆精品国产自产在线观看一区 | 欧美成人官网二区| 国产一区二区按摩在线观看| 亚洲欧洲日韩女同| 7777精品伊人久久久大香线蕉最新版 | 国产 欧美在线| 午夜精品视频一区| 欧美国产乱子伦 | 欧美三级电影精品| 国产大陆a不卡| 免费美女久久99| 亚洲精品乱码久久久久| 久久久噜噜噜久久人人看| 在线观看91视频| 91免费看片在线观看| 国产不卡视频在线观看| 蜜桃视频在线观看一区| 亚洲色图一区二区| 国产日韩成人精品| 精品国产凹凸成av人网站| 欧美乱熟臀69xxxxxx| 91成人网在线| 91精彩视频在线观看| 91麻豆高清视频| 色噜噜久久综合| 色欧美乱欧美15图片| 欧美中文字幕一二三区视频| 色综合久久六月婷婷中文字幕| 不卡视频在线观看| 色网站国产精品| 欧美在线高清视频| 欧美二区乱c少妇| 日韩欧美中文字幕一区| 精品免费国产二区三区| 日韩欧美中文字幕制服| 欧美变态口味重另类| 久久综合久久综合久久综合| 久久精品人人做人人爽人人| 欧美高清在线精品一区| 国产精品免费视频一区| 亚洲精品乱码久久久久久黑人| 亚洲在线免费播放| 精品一区精品二区高清| 成人毛片老司机大片| 欧美区一区二区三区| 国产日韩欧美制服另类| 一区在线观看免费| 日韩电影在线观看电影| 成人激情文学综合网| 欧美欧美午夜aⅴ在线观看| 久久久久久免费毛片精品| 亚洲精品亚洲人成人网在线播放| 免费在线看成人av| 色视频一区二区| 国产亚洲综合av| 奇米在线7777在线精品| 99久久99久久精品免费观看| 日韩精品在线看片z| 亚洲电影中文字幕在线观看| 国产福利一区二区三区| 欧美日韩国产另类一区| 亚洲激情男女视频| 91麻豆产精品久久久久久| 久久久久久综合| 国产美女一区二区三区| 日韩一区二区免费视频| 视频一区二区三区入口| 欧美日韩久久久久久| 亚洲主播在线观看| 91黄视频在线| 亚洲男人的天堂一区二区| 欧美羞羞免费网站| 亚洲成a人片在线不卡一二三区| 91色porny蝌蚪| 中文一区二区在线观看| 欧美视频一区在线观看| 午夜精品久久久久久久| 日韩一级大片在线| 国产成a人亚洲精品| 亚洲免费观看高清完整| 欧美精品 国产精品| 国产做a爰片久久毛片| 国产精品久久影院| 欧美美女视频在线观看| 精品伊人久久久久7777人| 欧美国产1区2区| 欧美伦理影视网| 91在线精品秘密一区二区| 亚洲成人免费视频| 久久久久久久久久久久久女国产乱 | 91精品国产综合久久精品性色| 日韩福利电影在线观看| 亚洲国产精品传媒在线观看| 欧美性猛交xxxxxxxx| 久久激五月天综合精品| 亚洲免费在线视频一区 二区| 日韩一区二区三| 欧美在线观看一二区| 成人18视频日本| 国产精品1区二区.| 午夜电影一区二区三区| 亚洲人快播电影网| 久久久久久亚洲综合| 日韩欧美国产系列| 欧美日韩国产精品成人| 91福利资源站| 91成人免费在线| 91啪在线观看| 色综合久久中文综合久久97| 成人avav影音| 99精品偷自拍| 在线视频国内自拍亚洲视频| 91麻豆国产精品久久| 色综合久久综合中文综合网| 91麻豆蜜桃一区二区三区|