summaryrefslogtreecommitdiff
path: root/MessageFilterLogic.hpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-09-26 23:24:28 +0200
committerChristoph Berg <myon@debian.org>2026-09-26 23:24:28 +0200
commit69344560ea394c06ca94acac46a2e4c3e8b7b229 (patch)
treeebc98370a697a9bbd6b973a14fa5113c475c6db7 /MessageFilterLogic.hpp
parent3e9d10a67671d0bd5c7b8c3ca8088f1818322eff (diff)
parent059831534c7e884f0a607ed86b582fd00d821731 (diff)
Update upstream source from tag 'upstream/3.2.0_rc1+dfsg'
Update to upstream version '3.2.0~rc1+dfsg' with Debian dir dbff457fd2c3616d5c77b863c7bfb2186ed86047
Diffstat (limited to 'MessageFilterLogic.hpp')
-rw-r--r--MessageFilterLogic.hpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/MessageFilterLogic.hpp b/MessageFilterLogic.hpp
new file mode 100644
index 00000000..32cc2d6b
--- /dev/null
+++ b/MessageFilterLogic.hpp
@@ -0,0 +1,63 @@
+#ifndef MESSAGEFILTERLOGIC_HPP
+#define MESSAGEFILTERLOGIC_HPP
+
+#include <QString>
+#include <QStringList>
+
+#include "AutoRespondPolicy.hpp"
+#include "SpecialOperatingActivity.hpp"
+
+class DecodedText;
+class LogBook;
+
+class MessageFilterLogic
+{
+public:
+ struct FilterContext {
+ SpecialOperatingActivity specOp {SpecialOperatingActivity::NONE};
+ bool bypass {false};
+ bool filtersForWord2 {false};
+ bool filtersForWaitAndPounceOnly {false};
+ bool alwaysPass {false};
+ bool blacklisted {false};
+ bool whitelisted {false};
+ QStringList passKeywords;
+ QStringList blacklistKeywords;
+ QStringList whitelistKeywords;
+
+ // Geographical/B4 filters
+ bool hideTerritory1 {false};
+ bool hideTerritory2 {false};
+ bool hideTerritory3 {false};
+ bool hideTerritory4 {false};
+ bool hideB4 {false};
+ bool hideEU {false};
+ bool hideAS {false};
+ bool hideNA {false};
+ bool hideSA {false};
+ bool hideAF {false};
+ bool hideOC {false};
+ bool hideAN {false};
+
+ QString territory1;
+ QString territory2;
+ QString territory3;
+ QString territory4;
+
+ QString currentBand;
+ QString mode;
+
+ bool pounce {false};
+ AutoRespondPolicy respondPolicy {AutoRespondPolicy::None};
+ };
+
+ struct FilterResult {
+ bool filtered {false};
+ bool shouldReturn {false};
+ bool resetPoints {false};
+ };
+
+ static FilterResult evaluateMSK144(const DecodedText& decodedtext, const FilterContext& ctx, LogBook* logbook);
+};
+
+#endif // MESSAGEFILTERLOGIC_HPP