123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- #ifndef ErhaltungServer_H
- #define ErhaltungServer_H
- #include <Server.h>
- #include <Thread.h>
- #include <Datei.h>
- #include <Text.h>
- #include <InitDatei.h>
- #include <Zeit.h>
- #ifdef WIN32
- #include "..\Datenbank\Datenbank.h"
- #else
- #include "Datenbank.h"
- #endif
- using namespace Network;
- class ErhaltungServer : public Thread
- {
- private:
- Server *server;
- Server *aServer;
- InitDatei *ini;
- ESDatenbank *db;
- Text *fehler;
- int clients;
- int id;
- bool nichtPausiert;
- int empfangen;
- int gesendet;
- bool end;
- int ref;
- public:
- // Konstruktor
- ErhaltungServer( InitDatei *zIni );
- // Destruktor
- virtual ~ErhaltungServer();
- // nicht constant
- void runn();
- void thread();
- void close();
- bool serverStarten();
- bool serverPause();
- bool serverFortsetzen();
- bool serverBeenden();
- bool setMaxKlients( unsigned char mc );
- void addGesendet( int bytes );
- void addEmpfangen( int bytes );
- void clientTrennung();
- // constant
- bool istAn() const;
- Server *zServer() const;
- ESDatenbank *zDB() const;
- bool hatClients() const;
- int getId() const;
- char *getLetzterFehler() const;
- // Reference Counting
- ErhaltungServer *getThis();
- ErhaltungServer *release();
- };
- class ESAKlient : public Thread
- {
- private:
- SKlient *klient;
- Text *name;
- Text *passwort;
- int adminId;
- ErhaltungServer *es;
- int version;
- public:
- // Konstruktor
- ESAKlient( SKlient *klient, ErhaltungServer *es );
- // Destruktor
- virtual ~ESAKlient();
- // nicht constant
- void thread();
- void errorZuKlient( const char *nachricht ) const; // sendet eine Fehlernachricht zum AKlient
- };
- class ESKlient;
- class ESKThread : public Thread
- {
- private:
- ESKlient *zKlient;
- int ref;
- public:
- // Konstruktor
- ESKThread( ESKlient *zKlient );
- // Destruktor
- virtual ~ESKThread();
- // nicht constant
- virtual void thread();
- // constant
- // Reference Counting
- ESKThread *getThis();
- ESKThread *release();
- };
- class ESKlient : public Thread
- {
- private:
- ESKThread *th;
- SKlient *klient;
- ZeitMesser *zeit;
- double sekunden;
- double letzteErhaltung;
- bool abgemeldet;
- unsigned int klientNummer;
- ErhaltungServer *es;
- bool encrypted;
- public:
- // Konstruktor
- ESKlient( SKlient *klient, ErhaltungServer *es );
- // Destruktor
- virtual ~ESKlient();
- // nicht constant
- bool erhalten();
- virtual void thread();
- // constant
- void errorZuKlient( const char *nachricht ) const;
- };
- class ESGWeiterleitung
- {
- private:
- ErhaltungServer *es;
- int ref;
- public:
- // Konstruktor
- ESGWeiterleitung( ErhaltungServer *es );
- // Destruktor
- ~ESGWeiterleitung();
- // nicht constant
- bool patchServerKlientAbsturz( int klientId );
- bool registerServerKlientAbsturz( int klientId );
- bool loginServerKlientAbsturz( int klientId );
- bool informationServerKlientAbsturz( int klientId );
- bool chatServerKlientAbsturz( int klientId );
- bool anmeldungServerKlientAbsturz( int klientId );
- bool spielServerKlientAbsturz( int klientId );
- bool shopServerKlientAbsturz( int klientId );
- bool historieServerKlientAbsturz( int klientId );
- bool newsServerKlientAbsturz( int klientId );
- bool kartenServerKlientAbsturz( int klientId );
- bool editorServerKlientAbsturz( int klientId );
- bool spielErstelltAbbrechen( int spielErstelltId );
- bool spielerLeavesGruppe( int gruppeId, int accountId );
- bool setGruppeAdmin( int gruppeId, int adminId );
- bool spielerLeavesChatroom( int chatroomId, int accountId );
- bool setChatroomAdmin( int chatroomId, int adminId );
- bool kickSpielerAusGruppe( int gruppeId );
- // constant
- // Reference Counting
- ESGWeiterleitung *getThis();
- ESGWeiterleitung *release();
- };
- #endif
|