aboutsummaryrefslogtreecommitdiffstats
path: root/include/GetEssen.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/GetEssen.hpp')
-rw-r--r--include/GetEssen.hpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/GetEssen.hpp b/include/GetEssen.hpp
index ff75029..adbd003 100644
--- a/include/GetEssen.hpp
+++ b/include/GetEssen.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include <queue>
#include <iostream>
#include <sys/stat.h>
@@ -11,6 +12,8 @@
#include "Handler.hpp"
#include "Response.hpp"
+#include "sqdb.hpp"
+#include "Utilities.hpp"
namespace Handler {
namespace MensaHandler {
@@ -19,7 +22,7 @@ namespace Handler {
struct MensaEssen {
int ID{191};
- string Message{"nothing got back! There was an error!!"};
+ std::string Message;
ptime Datum;
ptime LastModified;
};
@@ -29,15 +32,19 @@ namespace Handler {
};
- bool db_update_mensa_message(const int &mensaID, const ptime &mensaDatum, const string &message);
+ bool db_update_mensa_message(const int &mensaID, const ptime &mensaDatum, const std::string &message);
bool db_insert_mensa_message(const int &mensaID, const ptime &mensaDatum, const string &message);
MensaEssen db_get_mensa_message(const int &mensaID, const ptime &mensaDatum);
- string getEssen(const int mensa_ID, const int offset);
+ //std::vector<crow::json::wvalue> getEssenOnline(int mensa_ID, boost::posix_time::ptime datumEssen);
- string read_mensa_message_from_file(const int &mensa_id_file);
+ std::string getEssen(int mensa_ID, int offset);
+
+ //std::vector<crow::json::wvalue> parseEssen(MensaEssen Essen);
+
+ std::string read_mensa_message_from_file(const int &mensa_id_file);
}
json mensaHandler(std::string const &arguments, std::string const &session, void *payload);