diff options
author | Tobias Markmann <tm@ayena.de> | 2013-11-18 22:58:12 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-12-08 20:34:24 (GMT) |
commit | a0aab4b82562d58b0f1d97d42d85ba7043615f55 (patch) | |
tree | 2d5c289d501a5f933fcf53a3edb492286f521b90 /Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h | |
parent | 2b6b227ef4ae0e68709d8ad327260cb8f609909c (diff) | |
download | swift-a0aab4b82562d58b0f1d97d42d85ba7043615f55.zip swift-a0aab4b82562d58b0f1d97d42d85ba7043615f55.tar.bz2 |
Move all RosterItemOperations to Swift/Controllers/Roster/ItemOperations and cleanup related includes.
Change-Id: I20b8c347dd6f250f7ca426f8eb4e0093e226de5f
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h')
-rw-r--r-- | Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h b/Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h new file mode 100644 index 0000000..f1dff8d --- /dev/null +++ b/Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h @@ -0,0 +1,30 @@ +/* + * 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 "Swift/Controllers/Roster/RosterItem.h" + +namespace Swift { + +class RosterItemOperation { + public: + RosterItemOperation(bool requiresLookup = false, const JID& lookupJID = JID()) : requiresLookup_(requiresLookup), lookupJID_(lookupJID) {} + virtual ~RosterItemOperation() {} + bool requiresLookup() const {return requiresLookup_;} + const JID& lookupJID() const {return lookupJID_;} + /** + * This is called when iterating over possible subjects, so must check it's + * applying to the right items - even if requiresLookup() is true an item + * with the same bare JID but different full JID may be passed. + */ + virtual void operator() (RosterItem*) const = 0; + private: + bool requiresLookup_; + JID lookupJID_; +}; + +} |