コード例 #1
0
ファイル: client.cpp プロジェクト: j0wl/licq
void Client::handleVCard(const gloox::JID& jid, const gloox::VCard* vcard)
{
  TRACE();

  if (vcard != NULL)
  {
    VCardToUser user(vcard);
    myHandler.onUserInfo(jid.bare(), user);

    if (jid.bare() == myClient.jid().bare())
      broadcastPhotoHash(user.pictureSha1());
  }
}
コード例 #2
0
ファイル: client.cpp プロジェクト: j0wl/licq
bool Client::handleSubscriptionRequest(
    const gloox::JID& jid, const string& msg)
{
  TRACE();

  myHandler.onUserAuthorizationRequest(jid.bare(), msg);
  return false; // Ignored by gloox
}
コード例 #3
0
ファイル: client.cpp プロジェクト: j0wl/licq
void Client::handleVCardResult(gloox::VCardHandler::VCardContext context,
                               const gloox::JID& jid, gloox::StanzaError error)
{
  TRACE();

  if (error != gloox::StanzaErrorUndefined)
  {
    gLog.warning("%s vCard for user %s failed with error %u",
        context == gloox::VCardHandler::StoreVCard ? "Storing" : "Fetching",
        jid ? jid.bare().c_str() : myClient.jid().bare().c_str(), error);
  }

  if (!jid && context == gloox::VCardHandler::StoreVCard)
  {
    if (error == gloox::StanzaErrorUndefined)
      broadcastPhotoHash(myPendingPhotoHash);
    else
      broadcastPhotoHash(boost::none);

    myPendingPhotoHash = boost::none;
  }
}
コード例 #4
0
ファイル: client.cpp プロジェクト: j0wl/licq
void Client::handleItemUnsubscribed(const gloox::JID& jid)
{
  TRACE("%s", jid.full().c_str());

  gLog.info("No longer authorized for %s", jid.bare().c_str());
}
コード例 #5
0
ファイル: client.cpp プロジェクト: j0wl/licq
void Client::handleItemRemoved(const gloox::JID& jid)
{
  TRACE("%s", jid.full().c_str());

  myHandler.onUserRemoved(jid.bare());
}