Files
RRJServer/ServerLMS/ServerLMS/providerdblms.h

45 lines
1.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef PROVIDERDBLMS_H
#define PROVIDERDBLMS_H
#include <QObject>
#include "interfacedatabaselms.h"
class ProviderDBLMS : public QObject
{
Q_OBJECT
public:
explicit ProviderDBLMS(QWidget *parentWidget, QObject *parent = nullptr);
~ProviderDBLMS();
public:
QString getMainInstructorName();
//Авторизация обучаемого на клиенте
bool authorizationTrainee(QString login, QString password, QString classroom_name = QStringLiteral(""), QString computer_name = QStringLiteral(""));
bool deAuthorizationTrainee(QString login);
QString getNameTraineeByLogin(QString login);
//Авторизация инструктора на клиенте
bool authorizationInstructor(QString login, QString password);
bool deAuthorizationInstructor(QString login);
QString getNameInstructorByLogin(QString login);
//
QList<Instructor> GetListAllInstructors();
QList<Trainee> GetListAllTrainees();
QList<Group> GetListAllGroups();
Q_SIGNALS:
//сигнал о блокировке авторизации
void signal_BlockAutorization(bool block);
public:
void ConnectionToDB();
void DisConnectionFromDB();
private:
InterfaceDataBaseLMS* dbLMS;
QMutex mtxAccess;
};
#endif // PROVIDERDBLMS_H