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.
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
/* Диалог выдачи invite-ссылки и QR: запрашивает кандидатов и зарегистрированную ссылку у ядра.
|
|
* requestId связывает асинхронный ответ с текущим запросом; URL отображается после LINK_READY. */
|
|
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <QString>
|
|
#include <stdint.h>
|
|
|
|
class DbManager;
|
|
class QComboBox;
|
|
class QLineEdit;
|
|
class QLabel;
|
|
|
|
class ShareInviteDialog : public QDialog {
|
|
Q_OBJECT
|
|
public:
|
|
explicit ShareInviteDialog(const QString& channelId, DbManager* db, QWidget* parent = nullptr);
|
|
~ShareInviteDialog();
|
|
|
|
private slots:
|
|
void onNodeSelected(int index);
|
|
|
|
private:
|
|
void requestLink(uint64_t targetNodeId);
|
|
void setLink(const QString& link);
|
|
void onCandidates(const char* chId, int chIdLen, const uint8_t* data, int len);
|
|
void onLinkReady(const char* chId, int chIdLen, uint64_t requestId, const char* link);
|
|
|
|
uint64_t m_requestId = 0;
|
|
QString m_channelId;
|
|
DbManager* m_db;
|
|
QComboBox* m_nodeCombo;
|
|
QLineEdit* m_linkEdit;
|
|
QLabel* m_qrLabel;
|
|
};
|