Include SqliteKeyValue only in cpp.
GitOrigin-RevId: b89c988f6da1d480f68ecb71ef5390e9376faac1
This commit is contained in:
parent
34bfa6af75
commit
46ebd1b240
@ -6,8 +6,6 @@
|
|||||||
//
|
//
|
||||||
#include "td/telegram/AnimationsManager.h"
|
#include "td/telegram/AnimationsManager.h"
|
||||||
|
|
||||||
#include "td/actor/PromiseFuture.h"
|
|
||||||
|
|
||||||
#include "td/telegram/AuthManager.h"
|
#include "td/telegram/AuthManager.h"
|
||||||
#include "td/telegram/DialogId.h"
|
#include "td/telegram/DialogId.h"
|
||||||
#include "td/telegram/DocumentsManager.h"
|
#include "td/telegram/DocumentsManager.h"
|
||||||
@ -21,6 +19,10 @@
|
|||||||
#include "td/telegram/td_api.h"
|
#include "td/telegram/td_api.h"
|
||||||
#include "td/telegram/telegram_api.h"
|
#include "td/telegram/telegram_api.h"
|
||||||
|
|
||||||
|
#include "td/actor/PromiseFuture.h"
|
||||||
|
|
||||||
|
#include "td/db/SqliteKeyValueAsync.h"
|
||||||
|
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/misc.h"
|
#include "td/utils/misc.h"
|
||||||
#include "td/utils/Random.h"
|
#include "td/utils/Random.h"
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "td/actor/SleepActor.h"
|
#include "td/actor/SleepActor.h"
|
||||||
|
|
||||||
#include "td/db/binlog/BinlogHelper.h"
|
#include "td/db/binlog/BinlogHelper.h"
|
||||||
|
#include "td/db/SqliteKeyValueAsync.h"
|
||||||
|
|
||||||
#include "td/telegram/AuthManager.h"
|
#include "td/telegram/AuthManager.h"
|
||||||
#include "td/telegram/ConfigShared.h"
|
#include "td/telegram/ConfigShared.h"
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
#include "td/actor/PromiseFuture.h"
|
#include "td/actor/PromiseFuture.h"
|
||||||
|
|
||||||
|
#include "td/db/Pmc.h"
|
||||||
|
|
||||||
#include "td/utils/format.h"
|
#include "td/utils/format.h"
|
||||||
#include "td/utils/port/Clocks.h"
|
#include "td/utils/port/Clocks.h"
|
||||||
#include "td/utils/tl_helpers.h"
|
#include "td/utils/tl_helpers.h"
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
#include "td/actor/PromiseFuture.h"
|
#include "td/actor/PromiseFuture.h"
|
||||||
#include "td/actor/SchedulerLocalStorage.h"
|
#include "td/actor/SchedulerLocalStorage.h"
|
||||||
|
|
||||||
#include "td/db/binlog/ConcurrentBinlog.h"
|
|
||||||
#include "td/db/BinlogKeyValue.h"
|
|
||||||
#include "td/db/Pmc.h"
|
|
||||||
|
|
||||||
#include "td/net/NetStats.h"
|
#include "td/net/NetStats.h"
|
||||||
|
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "td/telegram/HashtagHints.h"
|
#include "td/telegram/HashtagHints.h"
|
||||||
|
|
||||||
#include "td/db/Pmc.h"
|
#include "td/db/Pmc.h"
|
||||||
|
#include "td/db/SqliteKeyValueAsync.h"
|
||||||
#include "td/telegram/Global.h"
|
#include "td/telegram/Global.h"
|
||||||
|
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
#include "td/actor/SleepActor.h"
|
#include "td/actor/SleepActor.h"
|
||||||
|
|
||||||
#include "td/db/binlog/BinlogHelper.h"
|
#include "td/db/binlog/BinlogHelper.h"
|
||||||
|
#include "td/db/SqliteKeyValueAsync.h"
|
||||||
|
|
||||||
#include "td/utils/format.h"
|
#include "td/utils/format.h"
|
||||||
#include "td/utils/HttpUrl.h"
|
#include "td/utils/HttpUrl.h"
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "td/db/KeyValueSyncInterface.h"
|
#include "td/db/KeyValueSyncInterface.h"
|
||||||
#include "td/db/Pmc.h"
|
|
||||||
#include "td/db/SqliteDb.h"
|
|
||||||
|
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/Status.h"
|
#include "td/utils/Status.h"
|
||||||
@ -17,6 +15,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
class SecretChatDb {
|
class SecretChatDb {
|
||||||
public:
|
public:
|
||||||
SecretChatDb(std::shared_ptr<KeyValueSyncInterface> pmc, int32 chat_id);
|
SecretChatDb(std::shared_ptr<KeyValueSyncInterface> pmc, int32 chat_id);
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
#include "td/telegram/td_api.h"
|
#include "td/telegram/td_api.h"
|
||||||
#include "td/telegram/telegram_api.h"
|
#include "td/telegram/telegram_api.h"
|
||||||
|
|
||||||
#include "td/actor/MultiPromise.h"
|
|
||||||
#include "td/actor/PromiseFuture.h"
|
|
||||||
|
|
||||||
#include "td/telegram/AccessRights.h"
|
#include "td/telegram/AccessRights.h"
|
||||||
#include "td/telegram/AuthManager.h"
|
#include "td/telegram/AuthManager.h"
|
||||||
#include "td/telegram/ConfigShared.h"
|
#include "td/telegram/ConfigShared.h"
|
||||||
@ -28,6 +25,11 @@
|
|||||||
#include "td/telegram/StickersManager.hpp"
|
#include "td/telegram/StickersManager.hpp"
|
||||||
#include "td/telegram/Td.h"
|
#include "td/telegram/Td.h"
|
||||||
|
|
||||||
|
#include "td/actor/MultiPromise.h"
|
||||||
|
#include "td/actor/PromiseFuture.h"
|
||||||
|
|
||||||
|
#include "td/db/SqliteKeyValueAsync.h"
|
||||||
|
|
||||||
#include "td/utils/format.h"
|
#include "td/utils/format.h"
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/misc.h"
|
#include "td/utils/misc.h"
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
#include "td/actor/MultiPromise.h"
|
#include "td/actor/MultiPromise.h"
|
||||||
|
|
||||||
#include "td/db/BinlogKeyValue.h"
|
#include "td/db/BinlogKeyValue.h"
|
||||||
|
#include "td/db/SqliteKeyValue.h"
|
||||||
|
#include "td/db/SqliteKeyValueAsync.h"
|
||||||
|
#include "td/db/SqliteKeyValueSafe.h"
|
||||||
|
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/port/path.h"
|
#include "td/utils/port/path.h"
|
||||||
@ -144,7 +147,7 @@ BinlogPmcPtr TdDb::get_config_pmc() {
|
|||||||
return config_pmc_.get();
|
return config_pmc_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
BigPmcPtr TdDb::get_sqlite_sync_pmc() {
|
SqliteKeyValue *TdDb::get_sqlite_sync_pmc() {
|
||||||
CHECK(common_kv_safe_);
|
CHECK(common_kv_safe_);
|
||||||
return &common_kv_safe_->get();
|
return &common_kv_safe_->get();
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,6 @@
|
|||||||
#include "td/db/BinlogKeyValue.h"
|
#include "td/db/BinlogKeyValue.h"
|
||||||
#include "td/db/DbKey.h"
|
#include "td/db/DbKey.h"
|
||||||
#include "td/db/Pmc.h"
|
#include "td/db/Pmc.h"
|
||||||
#include "td/db/SqliteKeyValue.h"
|
|
||||||
#include "td/db/SqliteKeyValueAsync.h"
|
|
||||||
#include "td/db/SqliteKeyValueSafe.h"
|
|
||||||
|
|
||||||
#include "td/telegram/TdParameters.h"
|
#include "td/telegram/TdParameters.h"
|
||||||
|
|
||||||
@ -77,7 +74,7 @@ class TdDb {
|
|||||||
BinlogPmcPtr get_binlog_pmc();
|
BinlogPmcPtr get_binlog_pmc();
|
||||||
BinlogPmcPtr get_config_pmc();
|
BinlogPmcPtr get_config_pmc();
|
||||||
|
|
||||||
BigPmcPtr get_sqlite_sync_pmc();
|
SqliteKeyValue *get_sqlite_sync_pmc();
|
||||||
SqliteKeyValueAsyncInterface *get_sqlite_pmc();
|
SqliteKeyValueAsyncInterface *get_sqlite_pmc();
|
||||||
CSlice binlog_path() const;
|
CSlice binlog_path() const;
|
||||||
CSlice sqlite_path() const;
|
CSlice sqlite_path() const;
|
||||||
|
@ -9,10 +9,6 @@
|
|||||||
#include "td/telegram/secret_api.h"
|
#include "td/telegram/secret_api.h"
|
||||||
#include "td/telegram/telegram_api.hpp"
|
#include "td/telegram/telegram_api.hpp"
|
||||||
|
|
||||||
#include "td/actor/PromiseFuture.h"
|
|
||||||
|
|
||||||
#include "td/db/binlog/BinlogHelper.h"
|
|
||||||
|
|
||||||
#include "td/telegram/AnimationsManager.h"
|
#include "td/telegram/AnimationsManager.h"
|
||||||
#include "td/telegram/AnimationsManager.hpp"
|
#include "td/telegram/AnimationsManager.hpp"
|
||||||
#include "td/telegram/AudiosManager.h"
|
#include "td/telegram/AudiosManager.h"
|
||||||
@ -40,6 +36,11 @@
|
|||||||
#include "td/telegram/VoiceNotesManager.h"
|
#include "td/telegram/VoiceNotesManager.h"
|
||||||
#include "td/telegram/VoiceNotesManager.hpp"
|
#include "td/telegram/VoiceNotesManager.hpp"
|
||||||
|
|
||||||
|
#include "td/actor/PromiseFuture.h"
|
||||||
|
|
||||||
|
#include "td/db/binlog/BinlogHelper.h"
|
||||||
|
#include "td/db/SqliteKeyValueAsync.h"
|
||||||
|
|
||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/misc.h"
|
#include "td/utils/misc.h"
|
||||||
|
@ -8,9 +8,6 @@
|
|||||||
|
|
||||||
#include "td/db/binlog/ConcurrentBinlog.h"
|
#include "td/db/binlog/ConcurrentBinlog.h"
|
||||||
#include "td/db/BinlogKeyValue.h"
|
#include "td/db/BinlogKeyValue.h"
|
||||||
#include "td/db/SqliteKeyValue.h"
|
|
||||||
|
|
||||||
#include "td/utils/common.h"
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@ -20,8 +17,4 @@ using BinlogPmcBase = BinlogKeyValue<ConcurrentBinlog>;
|
|||||||
using BinlogPmc = std::shared_ptr<BinlogPmcBase>;
|
using BinlogPmc = std::shared_ptr<BinlogPmcBase>;
|
||||||
using BinlogPmcPtr = BinlogPmcBase *;
|
using BinlogPmcPtr = BinlogPmcBase *;
|
||||||
|
|
||||||
using BigPmcBase = SqliteKeyValue;
|
|
||||||
using BigPmc = std::unique_ptr<BigPmcBase>;
|
|
||||||
using BigPmcPtr = BigPmcBase *;
|
|
||||||
|
|
||||||
}; // namespace td
|
}; // namespace td
|
||||||
|
Reference in New Issue
Block a user