16 QObject* parent =
nullptr);
18 int port_running()
const;
19 std::pair<QString, int> peerInfo()
const;
21 SessionInfo remoteName()
const {
return remoteInfo; }
23 void sendText(
const QString& text);
24 void sendImage(
const QImage& image);
25 void sendFile(
const QString& filePath);
27 QString sessionID()
const;
30 void textReceived(
const QString& text);
31 void imageReceived(
const QImage& okImage);
32 void fileReceived(
const QString& fileSaveAt);
37 void error(
Session* s,
const QString& disp,
int code);
39 void sendProgress(
Session* s, quint64 sent, quint64 total);
40 void receiveProgress(
Session* s,
const QString& fileId, quint64 received, quint64 total);
44 void onDisconnected();
48 void shake_hands_to_peers();
49 void attempt_parse_hello(
const QByteArray& e);
56 bool communicate_ready {
false };