diff options
Diffstat (limited to 'Swiften/Roster/SetPresence.h')
m--------- | Swiften | 0 | ||||
-rw-r--r-- | Swiften/Roster/SetPresence.h | 38 |
2 files changed, 0 insertions, 38 deletions
diff --git a/Swiften b/Swiften new file mode 160000 +Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c diff --git a/Swiften/Roster/SetPresence.h b/Swiften/Roster/SetPresence.h deleted file mode 100644 index a18ae6d..0000000 --- a/Swiften/Roster/SetPresence.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef SWIFTEN_SetPresence_H -#define SWIFTEN_SetPresence_H - -#include "Swiften/Elements/Presence.h" -#include "Swiften/JID/JID.h" -#include "Swiften/Roster/RosterItemOperation.h" -#include "Swiften/Roster/ContactRosterItem.h" - -namespace Swift { - -class RosterItem; - -class SetPresence : public RosterItemOperation { - public: - SetPresence(boost::shared_ptr<Presence> presence, JID::CompareType compareType = JID::WithoutResource) : presence_(presence), compareType_(compareType) { - } - - virtual void operator() (RosterItem* item) const { - ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(item); - if (contact && contact->getJID().equals(presence_->getFrom(), compareType_)) { - if (presence_->getType() != Presence::Available) { - contact->setStatusShow(StatusShow::None); - contact->setStatusText(presence_->getStatus()); - } else { - contact->setStatusShow(presence_->getShow()); - contact->setStatusText(presence_->getStatus()); - } - } - } - - private: - boost::shared_ptr<Presence> presence_; - JID::CompareType compareType_; -}; - -} -#endif - |