mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
28 lines
819 B
C++
28 lines
819 B
C++
#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
|