My Project
webserver.hpp
1 #ifndef __WEBSERVER_HPP__
2 #define __WEBSERVER_HPP__
3 
4 #include <Wt/WApplication>
5 #include <Wt/WBreak>
6 #include <Wt/WContainerWidget>
7 #include <Wt/WLineEdit>
8 #include <Wt/WPushButton>
9 #include <Wt/WText>
10 #include <iostream>
11 #include <string>
12 #include <fstream>
13 #include <sqlite3.h>
14 #include <thread>
15 
16 #include "db.hpp"
17 #include "PassCheck.hpp"
18 #include "Globals.hpp"
19 
23 class Webserver : public Wt::WApplication {
24 
25 public:
26 
30  Webserver(const Wt::WEnvironment& env);
31 
32 private:
33  Wt::WLineEdit *username;
34  Wt::WLineEdit *password;
35  Wt::WLineEdit *url;
36  Wt::WText *response;
38  std::ofstream pipeline;
40  Db *db;
45  void upvoteSong();
46 
50  void downvoteSong();
51 
55  void submitSong();
56 
60  void createNewUser(void);
61 
69  bool authUser(std::string username, std::string pass);
70 
78  void createUser(std::string username, std::string pass);
79 };
80 
81 #endif /* __WEBSERVER_HPP__ */
Definition: db.hpp:16
Definition: webserver.hpp:23
Webserver(const Wt::WEnvironment &env)
Definition: webserver.cpp:9