示例#1
0
void ContentDialogManager::onDialogClose()
{
    ContentDialog* dialog = qobject_cast<ContentDialog*>(sender());
    if (currentDialog == dialog) {
        currentDialog = nullptr;
    }

    removeDialog(dialog, contactDialogs);
}
示例#2
0
void PopupChatWindow::dockTab()
{
	if ((Settings->getChatFlags() & RS_CHAT_TABBED_WINDOW) && chatDialog) {
		PopupChatWindow *pcw = getWindow(false);
		if (pcw) {
			ChatDialog *pcd = chatDialog;
			removeDialog(pcd);
			pcw->addDialog(pcd);
			pcw->show();
			pcw->calculateTitle(pcd);
		}
	}
}
示例#3
0
void PopupChatWindow::undockTab()
{
	ChatDialog *cd = dynamic_cast<ChatDialog*>(ui.tabWidget->currentWidget());

	if (cd) {
		PopupChatWindow *pcw = getWindow(true);
		if (pcw) {
			removeDialog(cd);
			pcw->addDialog(cd);
			cd->show();
			pcw->show();
			pcw->calculateTitle(cd);
		}
	}
}
    bool ClientController::route_request_inside_dialog( const string& rawSipMsg, const SipMsgData_t& meta, nta_incoming_t* irq, sip_t const *sip, 
        const string& transactionId, const string& dialogId ) {
        client_ptr client = this->findClientForDialog( dialogId );
        if( !client ) {
            DR_LOG(log_warning) << "ClientController::route_request_inside_dialog - client managing dialog has disconnected: " << dialogId  ;
            
            //TODO: try to find another client providing the same service
            return false ;
        }
        this->addNetTransaction( client, transactionId ) ;
 
        m_ioservice.post( boost::bind(&Client::sendSipMessageToClient, client, transactionId, dialogId, rawSipMsg, meta) ) ;

        // if this is a BYE from the network, it ends the dialog 
        string method_name = sip->sip_request->rq_method_name ;
        if( 0 == method_name.compare("BYE") ) {
            removeDialog( dialogId ) ;
        }

        return true ;
    }
    bool ClientController::route_response_inside_transaction( const string& rawSipMsg, const SipMsgData_t& meta, nta_outgoing_t* orq, sip_t const *sip, 
        const string& transactionId, const string& dialogId ) {
        
        client_ptr client = this->findClientForAppTransaction( transactionId );
        if( !client ) {
            DR_LOG(log_warning) << "ClientController::route_response_inside_transaction - client managing transaction has disconnected: " << transactionId  ;
            return false ;
        }

        m_ioservice.post( boost::bind(&Client::sendSipMessageToClient, client, transactionId, dialogId, rawSipMsg, meta) ) ;

        string method_name = sip->sip_cseq->cs_method_name ;

        if( sip->sip_status->st_status >= 200 ) {
            removeAppTransaction( transactionId ) ;
        }

        if( 0 == method_name.compare("BYE") ) {
            removeDialog( dialogId ) ;
        }

        return true ;
    }
示例#6
0
void PopupChatWindow::dialogClose(ChatDialog *dialog)
{
	if (!tabbedWindow) {
		removeDialog(dialog);
	}
}