diff options
Diffstat (limited to 'Swiften/Elements/DiscoInfo.cpp')
| -rw-r--r-- | Swiften/Elements/DiscoInfo.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/Elements/DiscoInfo.cpp b/Swiften/Elements/DiscoInfo.cpp index f0e728e..5b2bb04 100644 --- a/Swiften/Elements/DiscoInfo.cpp +++ b/Swiften/Elements/DiscoInfo.cpp @@ -6,12 +6,15 @@  #include "Swiften/Elements/DiscoInfo.h" +#include <algorithm> +  namespace Swift {  const std::string DiscoInfo::ChatStatesFeature = std::string("http://jabber.org/protocol/chatstates");  const std::string DiscoInfo::SecurityLabelsFeature = std::string("urn:xmpp:sec-label:0");  const std::string DiscoInfo::SecurityLabelsCatalogFeature = std::string("urn:xmpp:sec-label:catalog:2");  const std::string DiscoInfo::JabberSearchFeature = std::string("jabber:iq:search"); +const std::string DiscoInfo::CommandsFeature = std::string("http://jabber.org/protocol/commands");  bool DiscoInfo::Identity::operator<(const Identity& other) const { @@ -33,4 +36,8 @@ bool DiscoInfo::Identity::operator<(const Identity& other) const {  	}  } +bool DiscoInfo::hasFeature(const std::string& feature) const { +	return std::find(features_.begin(), features_.end(), feature) != features_.end(); +} +  }  | 
 Swift