Example #1
0
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();
}
Example #2
0
	void SelfContact::RemoveVariant (const QString& resource)
	{
		Prio2Status_.remove (Prio2Status_.key (resource));
		CurrentStatus_.remove (resource);

		EntryBase::SetStatus (EntryStatus (SOffline, QString ()),
				resource,
				QXmppPresence (QXmppPresence::Unavailable));
	}
Example #3
0
	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));
	}