32 QObject *parent =
nullptr);
40 int SetConfigure(
const rtc::Configuration& config);
52 virtual bool open(
const QString& user,
63 virtual bool open(
const QString& fromUser,
64 const QString& toUser,
65 const QString& channelId,
71 QString GetPeerUser();
72 QString GetChannelId();
75 virtual void slotSignalConnected();
76 virtual void slotSignalDisconnected();
77 virtual void slotSignalReceiverCandidate(
const QString& fromUser,
78 const QString& toUser,
79 const QString& channelId,
82 virtual void slotSignalError(
int error,
const QString& szError);
83 virtual void slotSignalReceiverDescription(
const QString& fromUser,
84 const QString& toUser,
85 const QString& channelId,
93 virtual int SetDataChannel(std::shared_ptr<rtc::DataChannel>);
94 virtual int CreateDataChannel(
bool bDataChannel);
95 QString GenerateID(
const QString& label = QString());
100 QString m_szChannelId;
101 rtc::Configuration m_Config;
102 std::shared_ptr<rtc::PeerConnection> m_peerConnection;
103 std::shared_ptr<rtc::DataChannel> m_dataChannel;
107 QLoggingCategory m_Log;
110 bool isSequential()
const;
111 qint64 writeData(
const char *data, qint64 len);
112 qint64 readData(
char *data, qint64 maxlen);