39 typedef std::list<MessagePtr> AllMessages;
40 typedef Protocol::MessagesList MessagesList;
42 typedef Message::Type MsgType;
51 SocketPtr getSocket() const;
52 ProtocolPtr getProtocol() const;
53 void setRecvEnabled(
bool enabled);
55 void deleteMsg(MessagePtr msg);
56 void deleteMsgs(const MessagesList& msgs);
59 void sendMsgs(MessagesList&& msgs);
61 const AllMessages& getAllMsgs() const;
62 void addMsgs(const MessagesList& msgs,
bool reportAdded = true);
64 void setSocket(SocketPtr socket);
65 void setProtocol(ProtocolPtr protocol);
66 void addFilter(FilterPtr filter);
68 typedef std::function<
void (MessagePtr msg)> MsgAddedCallbackFunc;
69 typedef std::function<
void (const QString& error)> ErrorReportCallbackFunc;
70 typedef std::function<
void (
bool connected)> SocketConnectionStatusReportCallbackFunc;
72 void setMsgAddedCallbackFunc(MsgAddedCallbackFunc&& func);
73 void setErrorReportCallbackFunc(ErrorReportCallbackFunc&& func);
74 void setSocketConnectionStatusReportCallbackFunc(SocketConnectionStatusReportCallbackFunc&& func);
77 std::unique_ptr<MsgMgrImpl> m_impl;