+ -
当前位置:首页 → 问答吧 → C语言的结构转体转C# 引用sip的dll,高手进

C语言的结构转体转C# 引用sip的dll,高手进

时间:2011-12-05

来源:互联网

struct osip_message
  {
  char *sip_version; /**< SIP version (SIP request only) */
  osip_uri_t *req_uri; /**< Request-Uri (SIP request only) */
  char *sip_method; /**< METHOD (SIP request only) */

  int status_code; /**< Status Code (SIP answer only) */
  char *reason_phrase; /**< Reason Phrase (SIP answer only) */

  osip_list_t accepts; /**< Accept headers */
  osip_list_t accept_encodings; /**< Accept-Encoding headers */
  osip_list_t accept_languages; /**< Accept-Language headers */
  osip_list_t alert_infos; /**< Alert-Info headers */
  osip_list_t allows; /**< Allows headers */
  osip_list_t authentication_infos;/**< authentication_info headers */
  osip_list_t authorizations; /**< Authorizations headers */
  osip_call_id_t *call_id; /**< Call-ID header */
  osip_list_t call_infos; /**< Call-Infos header */
  osip_list_t contacts; /**< Contacts headers */
  osip_list_t content_encodings; /**< Content-Encodings headers */
  osip_content_length_t *content_length; /**< Content-Length header */
  osip_content_type_t *content_type; /**< Content-Type header */
  osip_cseq_t *cseq; /**< CSeq header */
  osip_list_t error_infos; /**< Error-Info headers */
  osip_from_t *from; /**< From header */
  osip_mime_version_t *mime_version;/**< Mime-Version header */
  osip_list_t proxy_authenticates; /**< Proxy-Authenticate headers */
  osip_list_t proxy_authentication_infos; /**< P-Authentication-Info headers */
  osip_list_t proxy_authorizations;/**< Proxy-authorization headers */
  osip_list_t record_routes; /**< Record-Route headers */
  osip_list_t routes; /**< Route headers */
  osip_to_t *to; /**< To header */
  osip_list_t vias; /**< Vias headers */
  osip_list_t www_authenticates; /**< WWW-Authenticate headers */

  osip_list_t headers; /**< Other headers */

  osip_list_t bodies; /**< List of attachements */

  /*
  1: structure and buffer "message" are identical.
  2: buffer "message" is not up to date with the structure info (call osip_message_to_str to update it).
  */
  int message_property; /**@internal */
  char *message; /**@internal */
  size_t message_length; /**@internal */

  void *application_data; /**can be used by upper layer*/
  };

以上结构转C#,_t结尾的为另外的结构
另外还有这几个方法也要转:
int eXosip_message_build_request (osip_message_t ** message, const char *method,const char *to, const char *from, const char *route)

int osip_message_set_body (osip_message_t * sip, const char *buf, size_t length);

int osip_message_set_content_type (osip_message_t * sip, const char *hvalue);

int eXosip_message_send_request(osip_message_t *message);
困扰好几天了,谢谢各位高手!

作者: wei023   发布时间: 2011-12-05

期待高手~

作者: woshisadshiwo   发布时间: 2011-12-05