aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/push_rule.h
diff options
context:
space:
mode:
authorBlack Hat <bhat@encom.eu.org>2019-09-26 22:22:36 -0700
committerBlack Hat <bhat@encom.eu.org>2019-09-26 22:22:36 -0700
commit363cf452bcdbaf6ff1cf94a83ca66cbb31122346 (patch)
treec64c8fda885e4e1785130e8ee3e7c47fd18cbf67 /lib/csapi/definitions/push_rule.h
parent412e2cf19449e73aa7da729e9c5de6502687aade (diff)
parent944653463fe4134c82d85e2d01e2bc0fa43fd727 (diff)
downloadlibquotient-363cf452bcdbaf6ff1cf94a83ca66cbb31122346.tar.gz
libquotient-363cf452bcdbaf6ff1cf94a83ca66cbb31122346.zip
Merge branch 'master' of https://github.com/quotient-im/libQuotient into
bhat-libqtolm-update
Diffstat (limited to 'lib/csapi/definitions/push_rule.h')
-rw-r--r--lib/csapi/definitions/push_rule.h63
1 files changed, 33 insertions, 30 deletions
diff --git a/lib/csapi/definitions/push_rule.h b/lib/csapi/definitions/push_rule.h
index bea13e96..e64d6ba8 100644
--- a/lib/csapi/definitions/push_rule.h
+++ b/lib/csapi/definitions/push_rule.h
@@ -7,37 +7,40 @@
#include "converters.h"
#include "csapi/definitions/push_condition.h"
+
#include <QtCore/QJsonObject>
-#include <QtCore/QVector>
#include <QtCore/QVariant>
-#include "converters.h"
+#include <QtCore/QVector>
+
+namespace Quotient
+{
+
+// Data structures
-namespace QMatrixClient
+struct PushRule
{
- // Data structures
-
- struct PushRule
- {
- /// The actions to perform when this rule is matched.
- QVector<QVariant> actions;
- /// Whether this is a default rule, or has been set explicitly.
- bool isDefault;
- /// Whether the push rule is enabled or not.
- bool enabled;
- /// The ID of this rule.
- QString ruleId;
- /// The conditions that must hold true for an event in order for a rule to be
- /// applied to an event. A rule with no conditions always matches. Only
- /// applicable to ``underride`` and ``override`` rules.
- QVector<PushCondition> conditions;
- /// The glob-style pattern to match against. Only applicable to ``content``
- /// rules.
- QString pattern;
- };
- template <> struct JsonObjectConverter<PushRule>
- {
- static void dumpTo(QJsonObject& jo, const PushRule& pod);
- static void fillFrom(const QJsonObject& jo, PushRule& pod);
- };
-
-} // namespace QMatrixClient
+ /// The actions to perform when this rule is matched.
+ QVector<QVariant> actions;
+ /// Whether this is a default rule, or has been set explicitly.
+ bool isDefault;
+ /// Whether the push rule is enabled or not.
+ bool enabled;
+ /// The ID of this rule.
+ QString ruleId;
+ /// The conditions that must hold true for an event in order for a rule to
+ /// beapplied to an event. A rule with no conditions always matches.
+ /// Onlyapplicable to ``underride`` and ``override`` rules.
+ QVector<PushCondition> conditions;
+ /// The glob-style pattern to match against. Only applicable to
+ /// ``content``rules.
+ QString pattern;
+};
+
+template <>
+struct JsonObjectConverter<PushRule>
+{
+ static void dumpTo(QJsonObject& jo, const PushRule& pod);
+ static void fillFrom(const QJsonObject& jo, PushRule& pod);
+};
+
+} // namespace Quotient