void L2tpIPsecVpnApplication::onMessageReceived(const QString& strMessage)
{
   if (strMessage.startsWith(CONNECTION_ADDED_MSG_PREFIX))
      emit connectionAdded(strMessage.mid(strMessage.indexOf(':') + 1));
   else if (strMessage.startsWith(CONNECTION_REMOVED_MSG_PREFIX))
      emit connectionRemoved(strMessage.mid(strMessage.indexOf(':') + 1));
}
Esempio n. 2
0
void WindowScriptingInterface::makeConnection(bool success, const QString& userNameOrError) {
    if (success) {
        emit connectionAdded(userNameOrError);
    } else {
        emit connectionError(userNameOrError);
    }
}
Esempio n. 3
0
void RyTableModel::addItem(RyPipeData_ptr p){
    if(pipesVector.size() > _maxRequestSize){
        beginRemoveRows(QModelIndex(),0,0);
        RyPipeData_ptr itemToRemove = pipesVector.at(0);
        pipesVector.remove(0);
        pipesMap.remove(itemToRemove->id);
        endRemoveRows();
        qDebug()<<"removing..";
    }

    //qDebug()<<"addItem...."<<p->getRequestHeader(QByteArray("Host"))<<pipesVector.count();
    RyPipeData_ptr p1 = p;
    ++_pipeNumber;
    int l = pipesVector.size();
    /*
    if(l==0){
        _pipeNumber = 1;
    }
    */
    p1->number=_pipeNumber;
    this->beginInsertRows(index(l, 0),l,l);

    //TODO thread safe?
	pipesMap[p1->id] = p1;
	pipesVector.append(p1);


    this->endInsertRows();
	emit connectionAdded(p);
}
Esempio n. 4
0
 /**
  * Adds connection to the end of list
  */
 void SettingsManager::addConnection(ConnectionSettings *connection)
 {
     _connections.append(connection);
     emit connectionAdded(connection);
 }