Minor interface change.
GitOrigin-RevId: 1ab4e9a57714911fa6f88440b7ded136e6eea83f
This commit is contained in:
parent
705a57ba76
commit
8e822fd44f
@ -130,21 +130,26 @@ Status init_db(SqliteDb &db) {
|
||||
std::shared_ptr<FileDbInterface> TdDb::get_file_db_shared() {
|
||||
return file_db_;
|
||||
}
|
||||
|
||||
std::shared_ptr<SqliteConnectionSafe> &TdDb::get_sqlite_connection_safe() {
|
||||
return sql_connection_;
|
||||
}
|
||||
|
||||
ConcurrentBinlog *TdDb::get_binlog() {
|
||||
CHECK(binlog_);
|
||||
return binlog_.get();
|
||||
}
|
||||
BinlogPmc TdDb::get_binlog_pmc_shared() {
|
||||
|
||||
std::shared_ptr<KeyValueSyncInterface> TdDb::get_binlog_pmc_shared() {
|
||||
return binlog_pmc_;
|
||||
}
|
||||
BinlogPmcPtr TdDb::get_binlog_pmc() {
|
||||
|
||||
BinlogKeyValue<ConcurrentBinlog> *TdDb::get_binlog_pmc() {
|
||||
CHECK(binlog_pmc_);
|
||||
return binlog_pmc_.get();
|
||||
}
|
||||
BinlogPmcPtr TdDb::get_config_pmc() {
|
||||
|
||||
BinlogKeyValue<ConcurrentBinlog> *TdDb::get_config_pmc() {
|
||||
CHECK(config_pmc_);
|
||||
return config_pmc_.get();
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "td/db/binlog/ConcurrentBinlog.h"
|
||||
#include "td/db/BinlogKeyValue.h"
|
||||
#include "td/db/DbKey.h"
|
||||
#include "td/db/Pmc.h"
|
||||
#include "td/db/KeyValueSyncInterface.h"
|
||||
|
||||
#include "td/actor/PromiseFuture.h"
|
||||
|
||||
@ -68,9 +68,9 @@ class TdDb {
|
||||
std::shared_ptr<SqliteConnectionSafe> &get_sqlite_connection_safe();
|
||||
ConcurrentBinlog *get_binlog();
|
||||
|
||||
BinlogPmc get_binlog_pmc_shared();
|
||||
BinlogPmcPtr get_binlog_pmc();
|
||||
BinlogPmcPtr get_config_pmc();
|
||||
std::shared_ptr<KeyValueSyncInterface> get_binlog_pmc_shared();
|
||||
BinlogKeyValue<ConcurrentBinlog> *get_binlog_pmc();
|
||||
BinlogKeyValue<ConcurrentBinlog> *get_config_pmc();
|
||||
|
||||
SqliteKeyValue *get_sqlite_sync_pmc();
|
||||
SqliteKeyValueAsyncInterface *get_sqlite_pmc();
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <utility>
|
||||
|
||||
namespace td {
|
||||
|
||||
enum class TopDialogCategory : int32 { Correspondent, BotPM, BotInline, Group, Channel, Call, Size };
|
||||
|
||||
inline TopDialogCategory top_dialog_category_from_td_api(const td_api::TopChatCategory &category) {
|
||||
@ -133,4 +134,5 @@ class TopDialogManager : public NetQueryCallback {
|
||||
void start_up() override;
|
||||
void loop() override;
|
||||
};
|
||||
|
||||
} // namespace td
|
||||
|
@ -178,6 +178,7 @@ class BinlogKeyValue : public KeyValueSyncInterface {
|
||||
void force_sync(Promise<> &&promise) {
|
||||
binlog_->force_sync(std::move(promise));
|
||||
}
|
||||
|
||||
void lazy_sync(Promise<> &&promise) {
|
||||
binlog_->lazy_sync(std::move(promise));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user