2020-05-13 00:56:26 +02:00
|
|
|
#ifndef SESSION_MANAGER_H
|
|
|
|
#define SESSION_MANAGER_H
|
|
|
|
|
|
|
|
#include "conexion.h"
|
|
|
|
|
|
|
|
#include <string>
|
2020-05-19 20:34:51 +02:00
|
|
|
#include <list>
|
2020-05-13 00:56:26 +02:00
|
|
|
|
|
|
|
class session_manager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
session_manager(conexion* con);
|
|
|
|
conexion* con;
|
|
|
|
bool loggin(std::string username, std::string passwd);
|
2020-05-26 18:47:14 +02:00
|
|
|
bool admin();
|
2020-05-13 00:56:26 +02:00
|
|
|
int install_command(std::string package);
|
2020-05-16 20:52:10 +02:00
|
|
|
int remove_command(std::string package);
|
2020-05-19 20:34:51 +02:00
|
|
|
std::list<std::string> get_packages_info();
|
2020-05-20 00:09:18 +02:00
|
|
|
std::list<std::string> get_users_info();
|
2020-05-23 19:59:55 +02:00
|
|
|
void create_user(std::string username, std::string password, bool admin);
|
2020-05-26 01:37:11 +02:00
|
|
|
void remove_user(std::string username);
|
2020-05-13 00:56:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SESSION_MANAGER_H
|