12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #ifndef Datenbank_H
- #define Datenbank_H
- #include <sql.h>
- #include <Text.h>
- #include <InitDatei.h>
- using namespace Framework;
- using namespace sql;
- namespace Admin_Recht
- {
- const int PSStarten = 3;
- const int PSBeenden = 4;
- const int PSPausieren = 5;
- const int PSMCChange = 6;
- const int KSGCUpdate = 7;
- }
- struct FileGroupInfo
- {
- int id;
- Text name;
- Text status;
- Text pfad;
- int version;
- };
- class PSDatenbank : public virtual ReferenceCounter
- {
- private:
- Datenbank* datenbank;
- CRITICAL_SECTION cs;
- public:
- // Konstruktor
- PSDatenbank(InitDatei* zIni);
- // Destruktor
- ~PSDatenbank();
- // nicht constant
- void lock();
- void unlock();
- int istAdministrator(const char* name, const char* passwort);
- bool adminHatRecht(int id, int recht);
- bool proveKlient(int num, int sNum);
- Text* getKlientKey(int cId);
- void unregisterKlient(int num, int sNum);
- bool setServerStatus(int id, int status);
- bool setMaxClients(int id, int maxC);
- bool serverIstNichtPausiert(int id);
- Result getSystemListe();
- Result getDateiListe(int system, int gruppe);
- Result getDateiListeSMP(int system, int gruppe);
- Result getDateiListeOhneOrdner(int system, int gruppe);
- Result getDeletedFiles(int system, int gruppe);
- Text* getSystemName(int system);
- Text* getDateiGruppeName(int gruppe);
- bool supportedDateiGruppe(int server, int gruppe);
- bool istDateigruppeStatusUpdate(int server, int gruppe);
- bool setDateiGruppe(int server, int gruppe, int version);
- bool setDateiGruppe(int server, int gruppe, bool update);
- bool dateiGruppeUpdateFertig(int server, int gruppe);
- int getDateiGruppePatchServer(int client, int gruppe);
- bool getPatchServerPortIp(int server, int* port, Text* zIp);
- Result getGruppeIds();
- Result getDateiGruppeListe();
- int getDateiGruppeVersion(int gruppe);
- int getDateiVersion(const char* pfad, int system, int gruppe);
- bool getFileGroupInfoList(int serverId, Array< FileGroupInfo* >* list);
- bool updateDatei(const char* pfad, char status, char* letzteAEnderung, int system, int gruppe);
- bool dateiGruppeUpdate(int gruppe);
- // constant
- Text* getLetzterFehler() const;
- };
- #endif
|