diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-12-22 21:00:48 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-12-22 21:15:38 (GMT) |
commit | 308ff634379e73a0c8668ffb0593d23f95b4dfa5 (patch) | |
tree | 21b0dd5fd9cbd90e141fd32449e298b65a40e04c /Swift/Controllers/PreviousStatusStore.h | |
parent | 333136df0bf355ef3ae3566f12bbdaf2795bcdaf (diff) | |
download | swift-contrib-308ff634379e73a0c8668ffb0593d23f95b4dfa5.zip swift-contrib-308ff634379e73a0c8668ffb0593d23f95b4dfa5.tar.bz2 |
Add a PreviousStatusStore.
Diffstat (limited to 'Swift/Controllers/PreviousStatusStore.h')
-rw-r--r-- | Swift/Controllers/PreviousStatusStore.h | 22 |
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_; + }; +} |