diff options
Diffstat (limited to 'Swiften/Presence/DirectedPresenceSender.h')
-rw-r--r-- | Swiften/Presence/DirectedPresenceSender.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Swiften/Presence/DirectedPresenceSender.h b/Swiften/Presence/DirectedPresenceSender.h new file mode 100644 index 0000000..b63a50e --- /dev/null +++ b/Swiften/Presence/DirectedPresenceSender.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include <set> + +#include "Swiften/Elements/Presence.h" +#include "Swiften/Presence/PresenceSender.h" + +namespace Swift { + class DirectedPresenceSender : public PresenceSender { + public: + DirectedPresenceSender(PresenceSender*); + + void addDirectedPresenceReceiver(const JID&); + void removeDirectedPresenceReceiver(const JID&); + + void sendPresence(Presence::ref); + + Presence::ref getLastSentUndirectedPresence(); + + bool isAvailable() const; + + private: + Presence::ref lastSentUndirectedPresence; + PresenceSender* sender; + std::set<JID> directedPresenceReceivers; + }; +} |