summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/PreviousStatusStore.h')
-rw-r--r--Swift/Controllers/PreviousStatusStore.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/Swift/Controllers/PreviousStatusStore.h b/Swift/Controllers/PreviousStatusStore.h
new file mode 100644
index 0000000..476febe
--- /dev/null
+++ b/Swift/Controllers/PreviousStatusStore.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <utility> /* std::pair */
+#include <vector>
+
+#include "Swiften/Base/String.h"
+#include "Swiften/Elements/StatusShow.h"
+
+namespace Swift {
+ typedef std::pair<StatusShow::Type, String> TypeStringPair;
+ class PreviousStatusStore {
+ public:
+ PreviousStatusStore();
+ ~PreviousStatusStore();
+ void addStatus(StatusShow::Type status, const String& message);
+ std::vector<TypeStringPair> getSuggestions(const String& message);
+
+ private:
+ std::vector<TypeStringPair> exactMatchSuggestions(StatusShow::Type status, const String& message);
+ std::vector<TypeStringPair> store_;
+ };
+}