Issue #262: function GetQuotes load data from MT instead of using cached quotes

This commit is contained in:
Viacheslav Demydiuk
2025-12-05 23:43:27 +02:00
parent 0c874773e5
commit 249b0f9fbb
8 changed files with 88 additions and 60 deletions
+11 -11
View File
@@ -14,12 +14,12 @@ enum MessageType
EXPERT_LIST = 3,
EXPERT_ADDED = 4,
EXPERT_REMOVED = 5,
NOTIFICATION = 6
SERVICE_REQUEST = 6
};
enum NotificationType
enum ServiceRequestType
{
CLIENT_READY = 0
EXPERTS = 0
};
class MtMessage
@@ -111,25 +111,25 @@ private:
std::string payload_;
};
class MtNotification : public MtMessage
class MtServiceRequest : public MtMessage
{
public:
MtNotification(NotificationType type)
: notification_type_(type)
MtServiceRequest(ServiceRequestType type)
: request_type_(type)
{
}
NotificationType GetNotificationType() const
ServiceRequestType GetServiceRequestType() const
{
return notification_type_;
return request_type_;
}
static std::unique_ptr<MtNotification> Parse(const std::string& msg);
static std::unique_ptr<MtServiceRequest> Parse(const std::string& msg);
private:
MessageType GetType() const override
{
return MessageType::NOTIFICATION;
return MessageType::SERVICE_REQUEST;
}
std::string GetBody() const override
@@ -137,7 +137,7 @@ private:
return "";
}
NotificationType notification_type_;
ServiceRequestType request_type_;
};
class MtEvent : public MtMessage