这篇教程C++ BELLE_SIP_OBJECT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中BELLE_SIP_OBJECT函数的典型用法代码示例。如果您正苦于以下问题:C++ BELLE_SIP_OBJECT函数的具体用法?C++ BELLE_SIP_OBJECT怎么用?C++ BELLE_SIP_OBJECT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了BELLE_SIP_OBJECT函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: linphone_xml_rpc_session_send_requestvoid linphone_xml_rpc_session_send_request(LinphoneXmlRpcSession *session, LinphoneXmlRpcRequest *request) { belle_http_request_listener_callbacks_t cbs = { 0 }; belle_http_request_listener_t *l; belle_generic_uri_t *uri; belle_http_request_t *req; belle_sip_memory_body_handler_t *bh; const char *data; linphone_xml_rpc_request_ref(request); uri = belle_generic_uri_parse(session->url); if (!uri) { ms_error("Could not send request, URL %s is invalid", session->url); process_io_error_from_post_xml_rpc_request(request, NULL); return; } req = belle_http_request_create("POST", uri, belle_sip_header_content_type_create("text", "xml"), NULL); if (!req) { belle_sip_object_unref(uri); process_io_error_from_post_xml_rpc_request(request, NULL); return; } data = linphone_xml_rpc_request_get_content(request); bh = belle_sip_memory_body_handler_new_copy_from_buffer(data, strlen(data), NULL, NULL); belle_sip_message_set_body_handler(BELLE_SIP_MESSAGE(req), BELLE_SIP_BODY_HANDLER(bh)); cbs.process_response = process_response_from_post_xml_rpc_request; cbs.process_io_error = process_io_error_from_post_xml_rpc_request; cbs.process_auth_requested = process_auth_requested_from_post_xml_rpc_request; l = belle_http_request_listener_create_from_callbacks(&cbs, request); belle_http_provider_send_request(session->core->http_provider, req, l); /*ensure that the listener object will be destroyed with the request*/ belle_sip_object_data_set(BELLE_SIP_OBJECT(request), "listener", l, belle_sip_object_unref); /*prevent destruction of the session while there are still pending http requests*/ belle_sip_object_data_set(BELLE_SIP_OBJECT(request), "session", belle_sip_object_ref(session), belle_sip_object_unref);}
开发者ID:artur,项目名称:linphone,代码行数:34,
示例2: testGenericMessagestatic void testGenericMessage(void) { const char* raw_message = "SIP/2.0 180 Ringing/r/n" "Via: SIP/2.0/UDP 192.168.1.73:5060;branch=z9hG4bK.hhdJx4~kD;rport/r/n" "Record-Route: <sip:91.121.209.194;lr>/r/n" "Record-Route: <sip:[email C++ BELLE_SIP_TRANSACTION函数代码示例 C++ BELLE_SIP_MESSAGE函数代码示例
|