30 lines
779 B
C++
30 lines
779 B
C++
#ifndef MSQL_ACCES_H
|
|
#define MSQL_ACCES_H
|
|
#include "data_acces.h"
|
|
|
|
#include <cppconn/driver.h>
|
|
#include <cppconn/exception.h>
|
|
#include <cppconn/resultset.h>
|
|
#include <cppconn/statement.h>
|
|
#include <cppconn/prepared_statement.h>
|
|
|
|
class msql_acces : public data_acces
|
|
{
|
|
public:
|
|
msql_acces();
|
|
std::string get_passwd(std::string username);
|
|
bool get_admin(std::string);
|
|
std::list<std::string> get_pinfo();
|
|
std::list<std::string> get_uinfo();
|
|
void write_install(std::string package, std::string user);
|
|
void write_remove(std::string);
|
|
bool get_package_exists(std::string package);
|
|
void create_user(std::string user, std::string pass, bool admin);
|
|
void remove_user(std::string user);
|
|
private:
|
|
sql::Connection *con;
|
|
sql::Driver *driver;
|
|
};
|
|
|
|
#endif // MSQL_ACCES_H
|