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

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

?? calldialog.cxx

?? 這是一個開源碼的sip用戶代理 寫的都很清楚是用C++語言開發的 對于研究sip協議的朋友絕對是有很好的參考價值
?? CXX
?? 第 1 頁 / 共 2 頁
字號:
/* *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program 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 Library General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *//* Copyright (C) 2004  * * Authors: Erik Eliasson <eliasson@it.kth.se> *          Johan Bilien <jobi@via.ecp.fr>*/#include"CallDialog.h"#include<libmsip/SipSMCommand.h>#include<libmsip/SipCommandString.h>#include<libmsip/SipMessageTransport.h>#include"../../../sip/SipSoftPhoneConfiguration.h"#include"../../../sip/DefaultDialogHandler.h"#include"MinisipMainWindowWidget.h"#include<qmessagebox.h>#define config mainWidget->getSipSoftPhoneConfiguration()#ifdef EMBEDDED_CALLDIALOGSCallDialog::CallDialog(string callId, MinisipMainWindowWidget *main, TimeoutProvider<string> *tp): QWidget(0,"Call"), callId(callId), mainWidget(main),#elseCallDialog::CallDialog(string callId, MinisipMainWindowWidget *main, TimeoutProvider<string> *tp): QDialog(0,"Call",FALSE, WDestructiveClose), callId(callId), mainWidget(main),#endif		vlayout(this),		buttonlayout(),		status("Connecting...", this), 		security_status("", this),		checkRecord("Record call", this),		acceptButton("OK", this),		rejectButton("Hang up", this),		timeoutProvider(tp),		bell(NULL){	vlayout.addWidget(&status);	status.setAlignment(AlignCenter);		vlayout.addWidget(&security_status);	security_status.setAlignment(AlignCenter);		vlayout.addWidget(&checkRecord);	buttonlayout.addWidget(&acceptButton);	buttonlayout.addWidget(&rejectButton);	vlayout.addLayout(&buttonlayout);	connect(&acceptButton,SIGNAL(clicked()), this, SLOT(acceptClicked()) );	connect(&rejectButton,SIGNAL(clicked()), this, SLOT(rejectClicked()) );		hideAcceptButton();	//status.setMinimumWidth(250);	bell=NULL;}#ifdef EMBEDDED_CALLDIALOGSCallDialog::CallDialog(string callId, MinisipMainWindowWidget *main, TimeoutProvider<string> *tp,string incomingFrom, string secured): QWidget(0,"Call"), callId(callId), mainWidget(main),#elseCallDialog::CallDialog(string callId, MinisipMainWindowWidget *main, TimeoutProvider<string> *tp,string incomingFrom, string secured): QDialog(0,"Call",FALSE,WDestructiveClose), callId(callId), mainWidget(main),#endif		vlayout(this),		buttonlayout(),		status("Connecting...", this), 		security_status("The call is ", this),		checkRecord("Record call", this),		acceptButton("OK", this),		rejectButton("Hang up", this),		timeoutProvider(tp){	status.setText(("Incoming call\nfrom "+ incomingFrom).c_str());	bell = new Bell(timeoutProvider);        if( bell != NULL ){ 	        bell->start();        }		vlayout.addWidget(&status);	status.setAlignment(AlignCenter);	security_status.setText(("The call is <b>"+secured+"</b>").c_str());	vlayout.addWidget(&security_status);	security_status.setAlignment(AlignCenter);	vlayout.addWidget(&checkRecord);	buttonlayout.addWidget(&acceptButton);	buttonlayout.addWidget(&rejectButton);	vlayout.addLayout(&buttonlayout);	connect(&acceptButton,SIGNAL(clicked()), this, SLOT(acceptClicked()) );	connect(&rejectButton,SIGNAL(clicked()), this, SLOT(rejectClicked()) );}void CallDialog::hideAcceptButton(){	acceptButton.hide();}string CallDialog::getCallId(){	return callId;}void CallDialog::timeout(string c){	mainWidget->handleCommand(CommandString(callId,c));}void CallDialog::acceptClicked(){	CommandString accept(callId, SipCommandString::accept_invite);//        SipSMCommand cmd(accept,SipSMCommand::remote, SipSMCommand::TU);	mainWidget->getCallback()->guicb_handleCommand(/*cmd*/ accept);        if( bell != NULL ){	        bell->stop();	        delete bell;	        bell = NULL;        }}void CallDialog::rejectClicked(){//	cerr << "CallDialog::rejectClicked: clicked"<< endl;	if (rejectButton.text()=="Close"){		timeoutProvider->cancel_request(this, SipCommandString::close_window);		mainWidget->removeCallDialog(callId);		done(0);		return;	}	if (rejectButton.text()=="Hang up"){		mainWidget->removeCallDialog(callId);//		if (status.text()=="Ringing..."){//			SMCommand cncl(callId, SMCommand::cancel);//			mainWidget->log(LOG_INFO, "Sending cancel command for call id " +callId);//			mainWidget->getSipPhone()->doCommand(cncl);////		}else{		CommandString hup(callId, SipCommandString::hang_up);//		mainWidget->log(LOG_INFO, "Sending hang up command for call id " +callId);                //SipSMCommand cmd(hup, SipSMCommand::remote, SipSMCommand::TU);		mainWidget->getCallback()->guicb_handleCommand(/*cmd*/hup);		if( bell != NULL ){			bell->stop();			delete bell;			bell = NULL;		}//		}		done(0);		return;	}	/* Moved to Accept button		if (rejectButton.text()=="Answer"){		CommandString accept(callId, SipCommandString::accept_invite);		mainWidget->getSipPhone()->enqueueCommand(SipSMCommand(accept,SipSMCommand::remote, SipSMCommand::TU));		cerr <<"stopping bell..."<< endl;		bell->stop();		cerr << "deleteing bell"<< endl;		delete bell;	}*/}bool CallDialog::handleCommand(CommandString command){	if (callId == command.getDestinationId()){		if (command.getOp()==SipCommandString::remote_user_not_found){			hideAcceptButton();			status.setText("<b>User not found</b>");			checkRecord.setChecked(false);			checkRecord.setEnabled(false);			rejectButton.setText("Close");//			repaint();//			mainWidget->removeCallDialog(callId); 	// Dialog will still exist until close is 								// clicked - just not receive any SIP commands		}		if (command.getOp()==SipCommandString::invite_ok){			string who;			if (command.getParam().length()>0)				who = " with " + command.getParam();						status.setText(("In call"+who).c_str());						security_status.setText(("The call is "+command.getParam2()).c_str());			hideAcceptButton();			rejectButton.setText("Hang up");//			repaint();					}		if (command.getOp()==SipCommandString::authentication_failed){			status.setText("<b>Authentication failed</b>");			checkRecord.setChecked(false);			checkRecord.setEnabled(false);			rejectButton.setText("Close");			//repaint();			timeoutProvider->request_timeout(5000, this, SipCommandString::close_window);//			mainWidget->removeCallDialog(callId); 	// Dialog will still exist until close is 								// clicked - just not receive any SIP commands		}				if (command.getOp()==SipCommandString::invite_no_reply){			status.setText("No reply");			checkRecord.setChecked(false);			checkRecord.setEnabled(false);			hideAcceptButton();			rejectButton.setText("Close");//			repaint();			timeoutProvider->request_timeout(5000, this, SipCommandString::close_window);//			mainWidget->removeCallDialog(callId); 	// Dialog will still exist until close is 								// clicked - just not receive any SIP commands		}				if (command.getOp()==SipCommandString::transport_error){			status.setText("The call failed due to a network error");			checkRecord.setChecked(false);			checkRecord.setEnabled(false);			rejectButton.setText("Close");//			repaint();			timeoutProvider->request_timeout(5000, this, SipCommandString::close_window);//			mainWidget->removeCallDialog(callId); 	// Dialog will still exist until close is 								// clicked - just not receive any SIP commands		}		if (command.getOp()==SipCommandString::remote_hang_up){			status.setText("Call ended");//			status.repaint();//			checkRecord.setChecked(false);//			checkRecord.setEnabled(false);			security_status.setText("");			rejectButton.setText("Close");//			repaint();			timeoutProvider->request_timeout(5000, this, SipCommandString::close_window);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久久久久久久久 | 欧美大片顶级少妇| 99re在线精品| 99精品1区2区| 91美女在线看| 91国偷自产一区二区开放时间| 成人精品国产福利| 91蝌蚪porny| 欧美性一二三区| 欧美高清激情brazzers| 欧美日韩国产欧美日美国产精品| 69p69国产精品| 精品少妇一区二区三区在线视频| 久久综合色之久久综合| 国产精品日日摸夜夜摸av| 中文字幕一区三区| 午夜久久久久久久久| 免费观看30秒视频久久| 激情欧美一区二区三区在线观看| 国产麻豆成人精品| 99久久精品免费精品国产| 欧美午夜片在线观看| 精品91自产拍在线观看一区| 欧美激情一区二区三区在线| 亚洲一二三专区| 韩国视频一区二区| 色综合久久久久久久久久久| 欧美精品乱码久久久久久按摩 | 国产精品中文有码| 成人aa视频在线观看| 欧美日韩亚州综合| 26uuuu精品一区二区| 亚洲精品乱码久久久久久黑人 | 亚洲综合免费观看高清完整版在线| 亚洲自拍偷拍综合| 国产麻豆视频精品| 欧洲亚洲精品在线| 国产欧美一区二区三区在线看蜜臀 | 波多野结衣精品在线| 欧美日韩国产系列| 国产精品福利一区二区三区| 日韩成人免费电影| 9i在线看片成人免费| 欧美一区二区三区免费视频| 欧美激情一区二区在线| 美国欧美日韩国产在线播放| 99久久久久久| 久久精品亚洲乱码伦伦中文| 亚洲国产精品精华液网站| 国产成人精品免费| 日韩一级免费一区| 亚洲一级二级三级在线免费观看| 国产成a人无v码亚洲福利| 日韩天堂在线观看| 亚洲综合一二区| 91香蕉视频在线| 欧美国产禁国产网站cc| 久久国产精品一区二区| 欧美三级韩国三级日本三斤| 国产精品嫩草99a| 国产一区二区成人久久免费影院 | 一级特黄大欧美久久久| 成人教育av在线| 久久夜色精品一区| 麻豆一区二区三| 欧美三级资源在线| 亚洲你懂的在线视频| 成人不卡免费av| 欧美精彩视频一区二区三区| 精品一区二区精品| 精品国产自在久精品国产| 日韩中文字幕av电影| 欧美网站大全在线观看| 一区二区三区高清| 欧美日免费三级在线| 亚洲最大色网站| 色88888久久久久久影院按摩| 国产精品久久久一区麻豆最新章节| 国产一区二区三区电影在线观看| 日韩美女一区二区三区四区| 免费观看日韩电影| 久久综合狠狠综合久久激情| 韩国一区二区三区| 亚洲国产精品二十页| 成人av在线影院| 亚洲欧美日韩精品久久久久| 在线一区二区视频| 午夜精品免费在线| 日韩欧美电影一二三| 国产九色sp调教91| 亚洲天堂成人在线观看| 色吧成人激情小说| 婷婷丁香久久五月婷婷| 欧美一级欧美三级在线观看 | 亚洲精品国产高清久久伦理二区| 91丨porny丨户外露出| 亚洲一区二区视频| 欧美电影免费观看完整版| 国产精品一区二区视频| 亚洲欧美一区二区在线观看| 欧美日韩中文字幕一区| 另类的小说在线视频另类成人小视频在线 | 欧美吞精做爰啪啪高潮| 免费观看久久久4p| 国产精品美女久久久久久久久| 91亚洲精品乱码久久久久久蜜桃| 天堂av在线一区| 久久九九全国免费| 欧美系列一区二区| 国产乱人伦偷精品视频不卡| 依依成人精品视频| 日韩欧美在线123| www.亚洲精品| 麻豆91免费观看| 亚洲人成伊人成综合网小说| 91精品国产乱| 色综合天天综合网国产成人综合天| 性做久久久久久久免费看| 久久精品一区二区三区不卡| 欧美中文字幕亚洲一区二区va在线| 日本欧美一区二区在线观看| 专区另类欧美日韩| 久久久欧美精品sm网站| 欧美日本一区二区在线观看| 国产精品综合二区| 视频一区二区三区入口| 亚洲视频一区在线| 国产情人综合久久777777| 91精品国产欧美一区二区18| 91久久精品国产91性色tv| 成人性视频免费网站| 免费观看在线色综合| 亚洲国产精品欧美一二99| 国产精品理伦片| 国产欧美精品一区二区色综合朱莉| 欧美高清视频一二三区| 在线一区二区三区做爰视频网站| 国产精品一区不卡| 久久精品国产在热久久| 亚洲成av人片观看| 亚洲免费看黄网站| 亚洲欧洲成人精品av97| 亚洲国产精品传媒在线观看| 久久久久久久久久久久电影 | 欧美日韩国产高清一区二区三区 | 欧美日韩国产首页| 欧美吞精做爰啪啪高潮| 91黄视频在线| 色综合欧美在线视频区| 91在线观看免费视频| 成人精品一区二区三区四区| 狠狠色丁香久久婷婷综合丁香| 全部av―极品视觉盛宴亚洲| 五月婷婷激情综合网| 亚洲成av人片在www色猫咪| 亚洲444eee在线观看| 婷婷综合五月天| 日韩电影网1区2区| 精品亚洲国产成人av制服丝袜| 久久精品国产久精国产爱| 美女在线一区二区| 精品一区二区精品| 国产91在线看| 99久久99久久精品免费看蜜桃| av中文字幕亚洲| 色婷婷狠狠综合| 欧美日韩精品免费| 亚洲欧洲日韩一区二区三区| 中国色在线观看另类| 亚洲欧美自拍偷拍色图| 一区二区三区四区在线| 天堂久久一区二区三区| 麻豆精品国产传媒mv男同 | 一区二区三区在线视频观看| 悠悠色在线精品| 午夜影院久久久| 久久99蜜桃精品| 成人激情午夜影院| 欧美无乱码久久久免费午夜一区| 欧美喷水一区二区| 久久综合九色综合久久久精品综合| 欧美激情一区在线观看| 亚洲国产美国国产综合一区二区| 日本成人中文字幕在线视频| 国产乱码精品一区二区三| 91小视频免费观看| 精品三级av在线| 亚洲桃色在线一区| 男人操女人的视频在线观看欧美| 高清av一区二区| 欧美精品三级在线观看| 亚洲国产精品成人综合| 午夜影院久久久| 成人午夜av电影| 7777精品伊人久久久大香线蕉超级流畅 | 床上的激情91.| 欧美片在线播放| 国产精品久久一级| 麻豆91免费观看| 欧洲激情一区二区|