您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ BELLE_SIP_MESSAGE函数代码示例

51自学网 2021-06-01 19:49:27
  C++
这篇教程C++ BELLE_SIP_MESSAGE函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中BELLE_SIP_MESSAGE函数的典型用法代码示例。如果您正苦于以下问题:C++ BELLE_SIP_MESSAGE函数的具体用法?C++ BELLE_SIP_MESSAGE怎么用?C++ BELLE_SIP_MESSAGE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了BELLE_SIP_MESSAGE函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: sal_process_authentication

void sal_process_authentication(SalOp *op) {	belle_sip_request_t* initial_request=belle_sip_transaction_get_request((belle_sip_transaction_t*)op->pending_auth_transaction);	belle_sip_request_t* new_request;	bool_t is_within_dialog=FALSE;	belle_sip_list_t* auth_list=NULL;	belle_sip_auth_event_t* auth_event;	belle_sip_response_t *response=belle_sip_transaction_get_response((belle_sip_transaction_t*)op->pending_auth_transaction);	belle_sip_header_from_t *from=belle_sip_message_get_header_by_type(initial_request,belle_sip_header_from_t);	belle_sip_uri_t *from_uri=belle_sip_header_address_get_uri((belle_sip_header_address_t*)from);	if (strcasecmp(belle_sip_uri_get_host(from_uri),"anonymous.invalid")==0){		/*prefer using the from from the SalOp*/		from_uri=belle_sip_header_address_get_uri((belle_sip_header_address_t*)sal_op_get_from_address(op));	}	if (op->dialog && belle_sip_dialog_get_state(op->dialog)==BELLE_SIP_DIALOG_CONFIRMED) {		new_request = belle_sip_dialog_create_request_from(op->dialog,initial_request);		if (!new_request)			new_request = belle_sip_dialog_create_queued_request_from(op->dialog,initial_request);		is_within_dialog=TRUE;	} else {		new_request=initial_request;		belle_sip_message_remove_header(BELLE_SIP_MESSAGE(new_request),BELLE_SIP_AUTHORIZATION);		belle_sip_message_remove_header(BELLE_SIP_MESSAGE(new_request),BELLE_SIP_PROXY_AUTHORIZATION);	}	if (new_request==NULL) {		ms_error("sal_process_authentication() op=[%p] cannot obtain new request from dialog.",op);		return;	}	if (belle_sip_provider_add_authorization(op->base.root->prov,new_request,response,from_uri,&auth_list,op->base.realm)) {		if (is_within_dialog) {			sal_op_send_request(op,new_request);		} else {			sal_op_resend_request(op,new_request);		}		sal_remove_pending_auth(op->base.root,op);	}else {		belle_sip_header_from_t *from=belle_sip_message_get_header_by_type(response,belle_sip_header_from_t);		char *tmp=belle_sip_object_to_string(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(from)));		ms_message("No auth info found for [%s]",tmp);		belle_sip_free(tmp);		sal_add_pending_auth(op->base.root,op);		if (is_within_dialog) {			belle_sip_object_unref(new_request);		}	}	/*always store auth info, for case of wrong credential*/	if (op->auth_info) {		sal_auth_info_delete(op->auth_info);		op->auth_info=NULL;	}	if (auth_list){		auth_event=(belle_sip_auth_event_t*)(auth_list->data);		op->auth_info=sal_auth_info_create(auth_event);		belle_sip_list_free_with_data(auth_list,(void (*)(void*))belle_sip_auth_event_destroy);	}}
开发者ID:CTA,项目名称:linphone,代码行数:59,


示例2: sal_notify_close

int sal_notify_close(SalOp *op){	belle_sip_request_t* notify;	if (!op->dialog) return -1;	if (!(notify=belle_sip_dialog_create_queued_request(op->dialog,"NOTIFY"))) return -1;	if (op->event) belle_sip_message_add_header(BELLE_SIP_MESSAGE(notify),op->event);	belle_sip_message_add_header(BELLE_SIP_MESSAGE(notify)		,BELLE_SIP_HEADER(belle_sip_header_subscription_state_create(BELLE_SIP_SUBSCRIPTION_STATE_TERMINATED,-1)));	return sal_op_send_request(op,notify);}
开发者ID:Gui13,项目名称:linphone,代码行数:9,


示例3: sal_op_build_request

belle_sip_request_t* sal_op_build_request(SalOp *op,const char* method) {	belle_sip_header_from_t* from_header;	belle_sip_header_to_t* to_header;	belle_sip_provider_t* prov=op->base.root->prov;	belle_sip_request_t *req;	belle_sip_uri_t* req_uri;	char token[10];	if (strcmp("REGISTER",method)==0 || op->privacy==SalPrivacyNone) {		from_header = belle_sip_header_from_create(BELLE_SIP_HEADER_ADDRESS(sal_op_get_from_address(op))												,belle_sip_random_token(token,sizeof(token)));	} else {		from_header=belle_sip_header_from_create2("Anonymous <sip:[email
C++ BELLE_SIP_OBJECT函数代码示例
C++ BELLE_SIP_HEADER_ADDRESS函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。