This commit is contained in:
2025-12-05 12:20:47 +03:00
parent 57673d0ee4
commit 05fce073f1
450 changed files with 58 additions and 58 deletions

View 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,QQueue<ClientMessage>*> *clientNotSendedMessage;
bool sendTo(ClientMessage message);
};
#endif // CHATSYSTEM_H