summaryrefslogtreecommitdiff
path: root/server/src/journal.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/journal.h')
-rw-r--r--server/src/journal.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/server/src/journal.h b/server/src/journal.h
index 573f252..d098756 100644
--- a/server/src/journal.h
+++ b/server/src/journal.h
@@ -33,22 +33,31 @@
#include "transaction.h"
#include "template.h"
+#include "luaoncommit.h"
class SessionSerialiser;
class Journal {
friend class SessionSerialiser;
public:
+ class Exception {
+ public:
+ Exception(std::string m) : msg(m) {}
+ std::string msg;
+ };
+
Journal();
virtual ~Journal() {}
void addEntry(Transaction &transaction, Commit &commit,
- std::string resume, Template *templ);
+ std::string resume, Template *templ, LUAOnCommit *oncommit);
void addEntry(std::string resume, std::string macro,
- std::string user, int index);
+ std::string user, int index, LUAOnCommit *oncommit);
+
+ void runOnCommitScripts() throw(LUAScript::Exception);
- virtual void commit() = 0;
+ virtual void commit() throw(Exception) = 0;
std::string getEntry(std::string macro);
void removeEntry(std::string macro);
@@ -65,6 +74,7 @@ protected:
std::string resume;
std::string macro;
std::string user;
+ LUAOnCommit *oncommit;
bool dirty;
};