Ejemplo n.º 1
0
	void after_connected()
	{
		// when retrying, pool will be non-null because we reuse it
		if(!udp && !pool)
		{
			pool = new StunTransactionPool(StunTransaction::Tcp, this);
			connect(pool, SIGNAL(outgoingMessage(const QByteArray &, const QHostAddress &, int)), SLOT(pool_outgoingMessage(const QByteArray &, const QHostAddress &, int)));
			connect(pool, SIGNAL(needAuthParams()), SLOT(pool_needAuthParams()));

			pool->setLongTermAuthEnabled(true);
			if(!user.isEmpty())
			{
				pool->setUsername(user);
				pool->setPassword(pass);
				if(!realm.isEmpty())
					pool->setRealm(realm);
			}
		}

		allocate = new StunAllocate(pool);
		connect(allocate, SIGNAL(started()), SLOT(allocate_started()));
		connect(allocate, SIGNAL(stopped()), SLOT(allocate_stopped()));
		connect(allocate, SIGNAL(error(XMPP::StunAllocate::Error)), SLOT(allocate_error(XMPP::StunAllocate::Error)));
		connect(allocate, SIGNAL(permissionsChanged()), SLOT(allocate_permissionsChanged()));
		connect(allocate, SIGNAL(channelsChanged()), SLOT(allocate_channelsChanged()));

		allocate->setClientSoftwareNameAndVersion(clientSoftware);

		allocateStarted = false;
		emit q->debugLine("Allocating...");
		allocate->start();
	}
void FacebookConnection::setPermissions(const QStringList &permissions)
{
    if (m_permissions != permissions) {
        m_permissions = permissions;
        emit permissionsChanged(permissions);
    }
}
Ejemplo n.º 3
0
void FileInfo::readFile()
{
    m_errorMessage = "";

    m_fileInfo = QFileInfo(m_file);
    if (!m_fileInfo.exists())
        m_errorMessage = tr("File does not exist");

    emit fileChanged();
    emit kindChanged();
    emit iconChanged();
    emit permissionsChanged();
    emit sizeChanged();
    emit modifiedChanged();
    emit createdChanged();
    emit absolutePathChanged();
    emit nameChanged();
    emit suffixChanged();
    emit symLinkTargetChanged();
    emit errorMessageChanged();
}