- debug_ui.h: remove NDEBUG guard so GUI_ERROR works in Release builds - invite_link.h/cpp: add error field to InviteData with specific failure reason - joindialog: show exact decode error in QLabel instead of generic message - chat_sync: implement invite connect flow (CHANNEL_INFO_REQ/RESP, JOIN, WELCOME) - topo_node_sqlite: node/address table init and lookup - utun_node: getInviteAddresses fallback from ETCP sockets - minor fixes in mainwindow, chat_core, gui_bridge
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
#ifndef TOPO_NODE_SQLITE_H
|
|
#define TOPO_NODE_SQLITE_H
|
|
|
|
#include <sqlite3.h>
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
struct TOPO_NODEQ;
|
|
|
|
#define PEERS_JOIN_SIG_SIZE 64
|
|
|
|
int topo_node_sqlite_init(sqlite3* db);
|
|
|
|
int topo_node_sqlite_node_put(sqlite3* db, struct TOPO_NODEQ* nq);
|
|
|
|
int topo_node_sqlite_channel_put(sqlite3* db, const char* channel_id,
|
|
const char* name, int is_dm, uint64_t owner_node_id,
|
|
const uint8_t* x25519_pub, const uint8_t* x25519_priv,
|
|
const uint8_t* ed25519_pub, const uint8_t* ed25519_priv,
|
|
const uint8_t* signature);
|
|
|
|
int topo_node_sqlite_member_put(sqlite3* db, const char* channel_id, uint64_t node_id,
|
|
const uint8_t* join_sig, const uint8_t* creator_sig);
|
|
|
|
int topo_node_sqlite_member_del(sqlite3* db, const char* channel_id, uint64_t node_id);
|
|
|
|
int topo_node_sqlite_channel_get(sqlite3* db, const char* channel_id,
|
|
char* name_out, int name_sz, int* is_dm, uint64_t* owner_node_id,
|
|
uint8_t* x25519_pub, uint8_t* ed25519_pub, uint8_t* signature);
|
|
|
|
int topo_node_sqlite_channel_peers_all(sqlite3* db, const char* channel_id,
|
|
uint8_t* buf, size_t buf_sz, size_t* out_len);
|
|
|
|
#endif
|