mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
ref: segregate chat sytem
This commit is contained in:
27
ServerLMS/Systems/chatsystem.h
Normal file
27
ServerLMS/Systems/chatsystem.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef CHATSYSTEM_H
|
||||
#define CHATSYSTEM_H
|
||||
|
||||
#include "commonclienthandler.h"
|
||||
#include <QObject>
|
||||
#include <Data/typesDataServerClient.h>
|
||||
|
||||
class ChatSystem : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ChatSystem();
|
||||
void initialize(CommonClientHandler *commonClientHandler, DataParser *dataParser, QMap<int, ClientHandler*> *clientsMap);
|
||||
bool sendMessage(ClientMessage message);
|
||||
//логика хранения отложенных сообщений
|
||||
//хендлеры для отправки и приема
|
||||
|
||||
void sendOldMessages(QString id);
|
||||
private:
|
||||
CommonClientHandler *commonClientHandler;
|
||||
DataParser *dataParser;
|
||||
QMap<int, ClientHandler*> *clientsMap;
|
||||
QMap<QString,QStack<ClientMessage>*> *clientNotSendedMessage;
|
||||
bool sendTo(ClientMessage message);
|
||||
};
|
||||
|
||||
#endif // CHATSYSTEM_H
|
||||
Reference in New Issue
Block a user