Beispiel #1
0
VCardReply *VCardManager::fetch(const JID &jid)
{
	Q_D(VCardManager);
	VCardReply *reply = d->hash.value(jid);
	if (!reply) {
		IQ iq(IQ::Get, jid);
		iq.addExtension(new VCard);
		reply = new VCardReply(jid, this, d_func()->client->send(iq));
		connect(reply, SIGNAL(vCardFetched(Jreen::VCard::Ptr,Jreen::JID)),
				this, SIGNAL(vCardFetched(Jreen::VCard::Ptr,Jreen::JID)));
		d->hash.insert(jid, reply);
	}
	return reply;
}
Beispiel #2
0
void JInfoRequest::doRequest(const QSet<QString> &hints)
{
	Q_D(JInfoRequest);
	Q_UNUSED(hints);
	Jreen::VCardReply *reply = d->manager->fetch(d->jid);
	connect(reply, SIGNAL(vCardFetched(Jreen::VCard::Ptr,Jreen::JID)),
	        SLOT(setFetchedVCard(Jreen::VCard::Ptr)));
	setState(InfoRequest::Requesting);
}