chat_sync: новый протокол синхронизации чата вместо ChatPropagator
- gui_bridge.h/cpp — кросс-поточные асинхронные коллбэки uasync↔GUI - chat_sync.h/c — протокол синхронизации (INIT_SYNC/RESP, SEND_DATA, PUSH/ACK, SYNC_DONE) - DbManager полностью переписан: per-channel таблицы msg_<ch> + peers_<ch>, 4 ключа в channels, signature, protocol/rtt в node_addresses, sync-методы - ChatPropagator удалён, заменён на chat_sync - db_sync_stub.c — заглушки для сборки chatgui без LMDB-версии db_sync - db_schema.md актуализирован под новую схему
This commit is contained in:
1 parent
46f5ff7eca
commit
19a4505a03
17 files changed
+2023
-605
No files matched your search
@@ -7,7 +7,7 @@
|
||||
#include "../db/db_manager.h"
|
||||
#include "../transport/utun_node.h"
|
||||
#include "../transport/node_config.h"
|
||||
#include "../transport/chat_propagator.h"
|
||||
#include "../transport/gui_bridge.h"
|
||||
#include <QSplitter>
|
||||
#include <QCloseEvent>
|
||||
#include <QApplication>
|
||||
@@ -109,11 +109,11 @@ void MainWindow::setupNode() {
|
||||
|
||||
void MainWindow::setupMessaging() {
|
||||
if (!m_node || !m_node->isRunning()) return;
|
||||
m_propagator = new ChatPropagator(m_node, m_db, this);
|
||||
m_messageList->setPropagator(m_propagator);
|
||||
|
||||
connect(m_propagator, &ChatPropagator::messageReceived,
|
||||
m_messageList, &MessageList::addMessage);
|
||||
/* Initialize gui_bridge */
|
||||
gui_bridge_init(NULL, NULL, this);
|
||||
gui_bridge_set_db(m_db);
|
||||
m_db->setUasyncInstance(NULL); /* будет обновлён при необходимости */
|
||||
}
|
||||
|
||||
void MainWindow::setupTray() {
|
||||
|
||||
Reference in new issue
Block a user