Beispiel #1
0
void Conversation::setJid(const QString &jid)
{
    if (jid != m_jid) {
        m_jid = jid;
        m_historyModel->setJid(jid);
        emit jidChanged(jid);
    }
}
Beispiel #2
0
void MessageSession::setJid(const JID &jid)
{
	if(m_jid != jid)
	{
		emit jidChanged(m_jid, jid);
		if(m_manager)
		{
			MessageSessionManagerPrivate *manager = m_manager->d_func();
			manager->fullSessions.remove(m_jid, this);
			manager->bareSessions.remove(m_jid.bare(), this);
			manager->fullSessions.insert(jid.full(), this);
			manager->bareSessions.insert(jid.bare(), this);
		}
		m_jid = jid;
	}
}
Beispiel #3
0
void XmppStream::setStreamJid(const Jid &AJid)
{
	if (FStreamJid!=AJid && (FStreamState==SS_OFFLINE || FStreamState==SS_FEATURES))
	{
		LogDetail(QString("[XmppStream][%1] XMPP stream JID changing from '%2' to '%3'").arg(FStreamJid.bare(),FStreamJid.full(),AJid.full()));

		if (FStreamState==SS_FEATURES && !FOfflineJid.isValid())
			FOfflineJid = FStreamJid;

		if (!(FStreamJid && AJid))
			FSessionPassword.clear();

		Jid befour = FStreamJid;
		emit jidAboutToBeChanged(AJid);

		FStreamJid = AJid;
		emit jidChanged(befour);
	}
}
Beispiel #4
0
void ChatClient::_q_connected()
{
    const QString domain = configuration().domain();

    // notify jid change
    emit jidChanged(jid());

    // get server time
    d->timeQueue = d->timeManager->requestTime(domain);

    // get info for root item
    const QString id = d->discoManager->requestInfo(domain);
    if (!id.isEmpty())
        d->discoQueue.append(id);

    // lookup TURN server
    debug(QString("Looking up STUN server for domain %1").arg(domain));
    d->dns.setType(QDnsLookup::SRV);
    d->dns.setName("_turn._udp." + domain);
    d->dns.lookup();
}