handleVCardReceived - not connected to libpurple yet...
This commit is contained in:
parent
125264c226
commit
35e56d515d
4 changed files with 14 additions and 0 deletions
|
@ -105,6 +105,10 @@ class Buddy {
|
|||
|
||||
void buddyChanged();
|
||||
|
||||
void handleVCardReceived(const std::string &id, const Swift::JID &to, Swift::VCard::ref vcard);
|
||||
|
||||
virtual void getVCard(const std::string &id, const Swift::JID &to) = 0;
|
||||
|
||||
/// Returns legacy network username of this buddy. (for example UIN for ICQ,
|
||||
/// JID for Jabber, ...).
|
||||
/// \return legacy network username
|
||||
|
|
|
@ -132,3 +132,7 @@ std::vector<std::string> SpectrumBuddy::getGroups() {
|
|||
return groups;
|
||||
}
|
||||
|
||||
void SpectrumBuddy::getVCard(const std::string &id, const Swift::JID &to) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ class SpectrumBuddy : public Buddy {
|
|||
void addBuddy(PurpleBuddy *buddy) { m_buddies.push_back(buddy); }
|
||||
void removeBuddy(PurpleBuddy *buddy) { m_buddies.remove(buddy); }
|
||||
int getBuddiesCount() { return m_buddies.size(); }
|
||||
void getVCard(const std::string &id, const Swift::JID &to);
|
||||
|
||||
PurpleBuddy *getBuddy() { return m_buddy; }
|
||||
|
||||
|
|
|
@ -153,6 +153,11 @@ void Buddy::buddyChanged() {
|
|||
}
|
||||
}
|
||||
|
||||
void Buddy::handleVCardReceived(const std::string &id, const Swift::JID &to, Swift::VCard::ref vcard) {
|
||||
boost::shared_ptr<Swift::GenericRequest<Swift::VCard> > request(new Swift::GenericRequest<Swift::VCard>(Swift::IQ::Result, m_rosterManager->getUser()->getJID(), vcard, m_rosterManager->getUser()->getComponent()->getIQRouter()));
|
||||
request->send();
|
||||
}
|
||||
|
||||
std::string Buddy::JIDToLegacyName(const Swift::JID &jid) {
|
||||
std::string name;
|
||||
if (jid.getUnescapedNode() == jid.getNode()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue