Esempio n. 1
0
		void handleSwiftVCardReceived(const std::string &user, unsigned int id, Swift::VCard::ref vcard, Swift::ErrorPayload::ref error) {
			if (error || !vcard) {
				LOG4CXX_INFO(logger, user << ": error fetching VCard with id=" << id);
				handleVCard(user, id, "", "", "", "");
				return;
			}
			LOG4CXX_INFO(logger, user << ": VCard fetched - id=" << id);
			std::string photo((const char *)&vcard->getPhoto()[0], vcard->getPhoto().size());
			handleVCard(user, id, vcard->getFullName(), vcard->getFullName(), vcard->getNickname(), photo);
		}
void QtProfileWindow::setVCard(Swift::VCard::ref vcard) {
	this->vcard = vcard;
	nickname->setText(P2QSTRING(vcard->getNickname()));
	avatar->setAvatar(vcard->getPhoto(), vcard->getPhotoType());
}