Esempio n. 1
0
VCard::ref VCardManager::getVCardAndRequestWhenNeeded(const JID& jid, const boost::posix_time::time_duration& allowedAge) {
	VCard::ref vcard = storage->getVCard(jid);
	boost::posix_time::ptime vcardFetchedTime = storage->getVCardWriteTime(jid);
	bool vcardTooOld = vcard && (vcardFetchedTime.is_special() || ((boost::posix_time::second_clock::universal_time() - vcardFetchedTime) > allowedAge));
	if (!vcard || vcardTooOld) {
		requestVCard(jid);
	}
	return vcard;
}
Esempio n. 2
0
/// This function requests the server for vCard of the connected user itself.
/// Once received the signal clientVCardReceived() is emitted. Received vCard
/// can be get using clientVCard().
QString QXmppVCardManager::requestClientVCard()
{
    return requestVCard();
}
Esempio n. 3
0
void VCardManager::requestOwnVCard() {
	requestVCard(JID());
}