#ifndef Datenbank_H #define Datenbank_H #include #include #include #include using namespace Framework; using namespace sql; namespace Admin_Recht { const int ASStarten = 28; const int ASBeenden = 29; const int ASPausieren = 30; const int ASMCChange = 31; } class ASDatenbank { private: Datenbank *datenbank; CRITICAL_SECTION cs; int ref; public: // Konstruktor ASDatenbank( InitDatei *zIni ); // Destruktor ~ASDatenbank(); // 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 ); bool getChatServer( int accountId, Text *ip, int *port ); int gruppeErstellen( int accountId, int karteId, int *gruppe_id ); bool gruppeAnmelden( int accountId, int gruppeId ); bool gruppeAbmelden( int accountId, int gruppeId ); bool setGruppeSpielStarten( int accountId, int gruppeId, bool starten ); bool getGruppeSpielStarten( int gruppeId ); bool proveEinladung( int vonAccount, int zuAccount, int gruppeId ); int gruppeBetreten( int accountId, int gruppeId ); int gruppeVerlassen( int accountId, int gruppeId ); bool spielerKannKicken( int accountId, int gruppeId ); bool getSpielerInGruppe( int gruppeId, Array< int > *accountId, int *anzahl ); int getSpielerInGruppeAnzahl( int gruppeId ); int getGruppeAdminId( int gruppeId ); bool gruppeSpielerEinladen( int vonAccount, int zuAccount, int gruppeId ); bool gruppeEinladungAbbrechen( int admin, int gruppeId, int accountId ); bool gruppeSpielerIstEingeladen( int gruppeId, int accountId ); bool gruppeIstInWarteschlange( int gruppeId ); int getAccountId( int clientId ); int accountAnmelden( int accountId, int karteId ); void accountAbmelden( int accountId ); bool spielerBesitztKarte( int accountId, int karteId ); int getGruppenKarte( int gruppeId ); Text *getAccountRufName( int accountId ); // constant Text *getLetzterFehler() const; // Reference Counting ASDatenbank *getThis(); ASDatenbank *release(); }; #endif