diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2015-06-03 22:05:58 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2015-06-03 22:05:58 +0200 |
| commit | c9c45371e8eb4f500593a089a6087a26649e0456 (patch) | |
| tree | 36da0512b1576ce2330207daef9fae300bd3ba40 /src/event.hh | |
| parent | 41c45d4a4d6f8bea9b45d76ddef5d8bac71cfc5a (diff) | |
Improved
Diffstat (limited to 'src/event.hh')
| -rw-r--r-- | src/event.hh | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/event.hh b/src/event.hh index 425a70f..8919429 100644 --- a/src/event.hh +++ b/src/event.hh @@ -2,7 +2,6 @@ #define EVENT_HH #include <memory> -#include <set> #include <string> #include <vector> @@ -12,8 +11,22 @@ class DB; class Event { public: + struct Going { + std::string name; + bool is_going; + std::string note; + time_t added; + + Going(const std::string& name, bool is_going, const std::string& note, + time_t added) + : name(name), is_going(is_going), note(note), added(added) { + } + }; + virtual ~Event() {} + virtual int64_t id() const = 0; + virtual const std::string& name() const = 0; virtual void set_name(const std::string& name) = 0; @@ -23,11 +36,11 @@ public: virtual time_t start() const = 0; virtual void set_start(time_t start) = 0; - virtual void going(std::set<std::string>* going, - std::set<std::string>* not_going) const = 0; + virtual void going(std::vector<Going>* going) const = 0; virtual bool is_going(const std::string& name) const = 0; - virtual void update_going(const std::string& name, bool going) = 0; + virtual void update_going(const std::string& name, bool is_going, + const std::string& note = std::string()) = 0; virtual bool store() = 0; |
