ServidorTFG
msql_acces.h
1 #ifndef MSQL_ACCES_H
2 #define MSQL_ACCES_H
3 #include "data_acces.h"
4 
5 #include <cppconn/driver.h>
6 #include <cppconn/exception.h>
7 #include <cppconn/resultset.h>
8 #include <cppconn/statement.h>
9 #include <cppconn/prepared_statement.h>
10 
11 class msql_acces : public data_acces
12 {
13 public:
14  msql_acces();
15  std::string get_passwd(std::string username);
16  bool get_admin(std::string);
17  std::list<std::string> get_pinfo();
18  std::list<std::string> get_uinfo();
19  void write_install(std::string package, std::string user);
20  void write_remove(std::string);
21  bool get_package_exists(std::string package);
22  void create_user(std::string user, std::string pass, bool admin);
23  void remove_user(std::string user);
24 private:
25  sql::Connection *con;
26  sql::Driver *driver;
27 };
28 
29 #endif // MSQL_ACCES_H
msql_acces::write_remove
void write_remove(std::string)
write_remove Remove the information about generated package
Definition: msql_acces.cpp:95
data_acces
Definition: data_acces.h:7
msql_acces::get_uinfo
std::list< std::string > get_uinfo()
get_uinfo Get a list of the users and if they are admins or not
Definition: msql_acces.cpp:64
msql_acces::get_admin
bool get_admin(std::string)
get_admin Get if the user is a admin or not
Definition: msql_acces.cpp:27
msql_acces::get_package_exists
bool get_package_exists(std::string package)
get_package_exists Search if the package exists
Definition: msql_acces.cpp:103
msql_acces::create_user
void create_user(std::string user, std::string pass, bool admin)
create_user Create a new user with the passed data
Definition: msql_acces.cpp:115
msql_acces::get_passwd
std::string get_passwd(std::string username)
get_passwd Get the hash of the password that use the user
Definition: msql_acces.cpp:15
msql_acces
Definition: msql_acces.h:11
msql_acces::get_pinfo
std::list< std::string > get_pinfo()
get_pinfo Get a list of the generated packages and the information about that
Definition: msql_acces.cpp:39
msql_acces::remove_user
void remove_user(std::string user)
remove_user Remove a user
Definition: msql_acces.cpp:124
msql_acces::write_install
void write_install(std::string package, std::string user)
write_install Store information about package generation
Definition: msql_acces.cpp:86