#ifndef HistorieServer_H #define HistorieServer_H #include #include #include #include #include #include "Datenbank.h" using namespace Framework; using namespace Network; class HSKlient; class HistorieServer : public Thread { private: Server *server; SSLServer *aServer; InitDatei *ini; HSDatenbank *db; CRITICAL_SECTION cs; RCArray< HSKlient > *klients; Text *fehler; int klientAnzahl; int id; bool nichtPausiert; int empfangen; int gesendet; bool end; int ref; public: // Konstruktor HistorieServer( InitDatei *zIni ); // Destruktor virtual ~HistorieServer(); // nicht constant void runn(); void thread(); void close(); bool serverStarten(); bool serverPause(); bool serverFortsetzen(); bool serverBeenden(); bool setMaxSpiele( int ms ); bool absturzKlient( int klientId ); bool removeKlient( HSKlient *zKlient ); void addGesendet( int bytes ); void addEmpfangen( int bytes ); // conatant bool istAn() const; Server *zServer() const; HSDatenbank *zDB() const; bool hatClients() const; int getId() const; char *getLetzterFehler() const; InitDatei *zIni() const; // Reference Counting HistorieServer *getThis(); HistorieServer *release(); }; class HSAKlient : public Thread { private: SSLSKlient *klient; Text *name; Text *passwort; int adminId; HistorieServer *hs; int version; public: // Konstruktor HSAKlient( SSLSKlient *klient, HistorieServer *hs ); // Destruktor virtual ~HSAKlient(); // nicht constant void thread(); void errorZuKlient( const char *nachricht ) const; // sendet eine Fehlernachricht zum AKlient }; class HSKlient : public Thread { private: SKlient *klient; unsigned int klientNummer; HistorieServer *hs; int ref; // privat void sendeVerzeichnis( char *pfad, int gpl ); public: // Konstruktor HSKlient( SKlient *klient, HistorieServer *hs ); // Destruktor virtual ~HSKlient(); // nicht constant void absturz(); void thread(); // constant void errorZuKlient( const char *nachricht ) const; // sendet eine Fehlernachricht zum Klient int getKlientNummer() const; // Reference Counting HSKlient *getThis(); HSKlient *release(); }; #endif