-
Notifications
You must be signed in to change notification settings - Fork 0
/
Router.h
32 lines (31 loc) · 770 Bytes
/
Router.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef ROUTER_H
#define ROUTER_H
#include <ctime> // add this line to include the ctime library
#include <regex>
#include <curl/curl.h>
#include "include/crow_all.h"
#include "API.h"
#include "Voice.h"
#include "Database.h"
#include "VoiceAPI.h"
#include <time.h>
#include <future>
class Router {
public:
Router();
~Router();
int enroute(crow::SimpleApp& app);
crow::json::wvalue handleQuery(std::string query);
std::string urlDecode(const std::string &encoded);
private:
crow::SimpleApp& app;
API api;
Voice voice;
Database db;
std::string currRoute;
std::string prevRoute;
std::string id;
crow::mustache::context ctx;
VoiceAPI voiceAPI;
};
#endif