+// --------------------------------------------------------------------------------------------------------------------
+
+/**
+ * Class representing a set of supported core/client features.
+ *
+ * @sa Quassel::Feature
+ */
+class Quassel::Features
+{
+public:
+ /**
+ * Default constructor.
+ *
+ * Creates a Feature instance with all known features (i.e., all values declared in the Quassel::Feature enum) set.
+ * This is useful for easily creating a Feature instance that represent the current version's capabilities.
+ */
+ Features();
+
+ /**
+ * Constructs a Feature instance holding the given list of features.
+ *
+ * Both the @a features and the @a legacyFeatures arguments are considered (additively).
+ * This is useful when receiving a list of features from another peer.
+ *
+ * @param features A list of strings matching values in the Quassel::Feature enum. Strings that don't match are
+ * can be accessed after construction via unknownFeatures(), but are otherwise ignored.
+ * @param legacyFeatures Holds a bit-wise combination of LegacyFeature flag values, which are each added to the list of
+ * features represented by this Features instance.
+ */
+ Features(const QStringList &features, LegacyFeatures legacyFeatures);
+
+ /**
+ * Check if a given feature is marked as enabled in this Features instance.
+ *
+ * @param feature The feature to be queried
+ * @returns Whether the given feature is marked as enabled
+ */
+ bool isEnabled(Feature feature) const;
+
+ /**
+ * Provides a list of all features marked as either enabled or disabled (as indicated by the @a enabled argument) as strings.
+ *
+ * @param enabled Whether to return the enabled or the disabled features
+ * @return A string list containing all enabled or disabled features
+ */
+ QStringList toStringList(bool enabled = true) const;
+
+ /**
+ * Provides a list of all enabled legacy features (i.e. features defined prior to v0.13) as bit-wise combination in a
+ * LegacyFeatures type.
+ *
+ * @note Extended features cannot be represented this way, and are thus ignored even if set.
+ * @return A LegacyFeatures type holding the bit-wise combination of all legacy features enabled in this Features instance
+ */
+ LegacyFeatures toLegacyFeatures() const;