Refresh both AGENTS guides and clarify module purpose, usage, ownership, threading, return values and wire formats in headers. Remove the unused timeout_heap freed_count field and unimplemented getter.
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
/* Диалог входа в канал по utun://: проверяет ссылку, отправляет запрос ядру и ждёт CONNECT_RESULT.
|
|
* joined сообщает об успешном входе, а не только о создании транспорта к connection-узлу. */
|
|
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <QLineEdit>
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
#include <QTimer>
|
|
#include <cstdint>
|
|
|
|
class UtunNode;
|
|
class DbManager;
|
|
|
|
class JoinDialog : public QDialog {
|
|
Q_OBJECT
|
|
public:
|
|
explicit JoinDialog(UtunNode* node, DbManager* db, QWidget* parent = nullptr,
|
|
const QString& autoJoinLink = QString());
|
|
~JoinDialog() override;
|
|
|
|
signals:
|
|
void joined(const QString& channelId);
|
|
|
|
private slots:
|
|
void onConnectClicked();
|
|
void onLinkTextChanged();
|
|
|
|
private:
|
|
void setStatus(const QString& text, bool isError = false);
|
|
void onConnectResult(uint64_t nodeId, uint64_t channelId, int result);
|
|
|
|
UtunNode* m_node;
|
|
DbManager* m_db;
|
|
QLineEdit* m_linkEdit;
|
|
QLabel* m_statusLabel;
|
|
QPushButton* m_connectBtn;
|
|
QPushButton* m_cancelBtn;
|
|
QTimer* m_decodeTimer;
|
|
bool m_connecting = false;
|
|
uint64_t m_pendingNodeId = 0;
|
|
uint64_t m_pendingChannelId = 0;
|
|
};
|