Datenbank.h 941 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef Datenbank_H
  2. #define Datenbank_H
  3. #include <sql.h>
  4. #include <Text.h>
  5. #include <Array.h>
  6. #include <InitDatei.h>
  7. using namespace Framework;
  8. using namespace sql;
  9. namespace Admin_Recht
  10. {
  11. const int NSStarten = 45;
  12. const int NSBeenden = 46;
  13. const int NSPausieren = 47;
  14. const int NSMCChange = 48;
  15. }
  16. class NSDatenbank : public virtual ReferenceCounter
  17. {
  18. private:
  19. Datenbank* datenbank;
  20. CRITICAL_SECTION cs;
  21. public:
  22. // Konstruktor
  23. NSDatenbank(InitDatei* zIni);
  24. // Destruktor
  25. ~NSDatenbank();
  26. // nicht constant
  27. void lock();
  28. void unlock();
  29. int istAdministrator(const char* name, const char* passwort);
  30. bool adminHatRecht(int id, int recht);
  31. bool proveKlient(int num, int sNum);
  32. Text* getKlientKey(int cId);
  33. void unregisterKlient(int num, int sNum);
  34. bool setServerStatus(int id, int status);
  35. bool setMaxClients(int id, int maxC);
  36. bool serverIstNichtPausiert(int id);
  37. // constant
  38. Text* getLetzterFehler() const;
  39. };
  40. #endif