123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #ifndef MainServer_H
- #define MainServer_H
- #include <Server.h>
- #include <Thread.h>
- #include <InitDatei.h>
- #include "Datenbank.h"
- #include <AsynchronCall.h>
- using namespace Framework;
- using namespace Network;
- class MainServer : public Thread
- {
- private:
- Server* server;
- SSLServer* aServer;
- SSLServer* serverSSL;
- InitDatei* dat;
- MSDatenbank* db;
- CRITICAL_SECTION cs;
- int empfangen;
- int gesendet;
- int clients;
- bool end;
- public:
- // Konstruktor
- MainServer(InitDatei* zDat);
- // Destruktor
- virtual ~MainServer();
- // nicht constant
- void runn();
- void thread();
- void close();
- bool serverStarten();
- void serverBeenden();
- void addGesendet(int bytes);
- void addEmpfangen(int bytes);
- void clientTrennung();
- // constant
- Server* zServer() const;
- MSDatenbank* zDB() const;
- bool hatClients() const;
- InitDatei* zInit() const;
- };
- class MSAKlient : public Thread
- {
- private:
- SSLSKlient* klient;
- Text* name;
- Text* passwort;
- int adminId;
- MainServer* ms;
- public:
- // Konstruktor
- MSAKlient(SSLSKlient* klient, MainServer* ms);
- // Destruktor
- virtual ~MSAKlient();
- // nicht constant
- void thread();
- void errorZuKlient(const char* nachricht) const; // sendet eine Fehlernachricht zum AKlient
- };
- class MSKlient : public Thread
- {
- private:
- SKlient* klient;
- unsigned int klientNummer;
- MainServer* ms;
- bool encrypted;
- public:
- // Konstruktor
- MSKlient(SKlient* klient, MainServer* ms);
- // Destruktor
- virtual ~MSKlient();
- // nicht constant
- void thread();
- void errorZuKlient(const char* nachricht) const; // sendet eine Fehlernachricht zum Klient
- };
- class MSKlientSSL : public Thread
- {
- private:
- SSLSKlient* klient;
- unsigned int klientNummer;
- MainServer* ms;
- public:
- // Konstruktor
- MSKlientSSL(SSLSKlient* klient, MainServer* ms);
- // Destruktor
- virtual ~MSKlientSSL();
- // nicht constant
- void thread();
- void errorZuKlient(const char* nachricht) const; // sendet eine Fehlernachricht zum Klient
- };
- class MSGWeiterleitung : public virtual ReferenceCounter
- {
- private:
- MainServer* ms;
- public:
- // Konstruktor
- MSGWeiterleitung(MainServer* ms);
- // Destruktor
- ~MSGWeiterleitung();
- // 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 newsServerKlientAbsturz(int klientId);
- bool historieServerKlientAbsturz(int klientId);
- bool kartenServerKlientAbsturz(int klientId);
- bool editorServerKlientAbsturz(int klientId);
- bool minigameServerKlientAbsturz(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);
- };
- #endif
|