QXmppPresence QXmppRosterManager::getPresence(const QString& bareJid, const QString& resource) const { if(m_presences.contains(bareJid) && m_presences[bareJid].contains(resource)) return m_presences[bareJid][resource]; else return QXmppPresence(); }
void SelfContact::RemoveVariant (const QString& resource) { Prio2Status_.remove (Prio2Status_.key (resource)); CurrentStatus_.remove (resource); EntryBase::SetStatus (EntryStatus (SOffline, QString ()), resource, QXmppPresence (QXmppPresence::Unavailable)); }
void SelfContact::RemoveVariant (const QString& resource, bool thisInstance) { if (thisInstance) for (const auto& otherResource : Status2Prio_.keys ()) if (otherResource != resource) RemoveVariant (otherResource, false); Status2Prio_.remove (resource); CurrentStatus_.remove (resource); EntryBase::SetStatus (EntryStatus (SOffline, QString ()), resource, QXmppPresence (QXmppPresence::Unavailable)); }