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() {
|
std::shared_ptr<FileDbInterface> TdDb::get_file_db_shared() {
|
||||||
return file_db_;
|
return file_db_;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<SqliteConnectionSafe> &TdDb::get_sqlite_connection_safe() {
|
std::shared_ptr<SqliteConnectionSafe> &TdDb::get_sqlite_connection_safe() {
|
||||||
return sql_connection_;
|
return sql_connection_;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConcurrentBinlog *TdDb::get_binlog() {
|
ConcurrentBinlog *TdDb::get_binlog() {
|
||||||
CHECK(binlog_);
|
CHECK(binlog_);
|
||||||
return binlog_.get();
|
return binlog_.get();
|
||||||
}
|
}
|
||||||
BinlogPmc TdDb::get_binlog_pmc_shared() {
|
|
||||||
|
std::shared_ptr<KeyValueSyncInterface> TdDb::get_binlog_pmc_shared() {
|
||||||
return binlog_pmc_;
|
return binlog_pmc_;
|
||||||
}
|
}
|
||||||
BinlogPmcPtr TdDb::get_binlog_pmc() {
|
|
||||||
|
BinlogKeyValue<ConcurrentBinlog> *TdDb::get_binlog_pmc() {
|
||||||
CHECK(binlog_pmc_);
|
CHECK(binlog_pmc_);
|
||||||
return binlog_pmc_.get();
|
return binlog_pmc_.get();
|
||||||
}
|
}
|
||||||
BinlogPmcPtr TdDb::get_config_pmc() {
|
|
||||||
|
BinlogKeyValue<ConcurrentBinlog> *TdDb::get_config_pmc() {
|
||||||
CHECK(config_pmc_);
|
CHECK(config_pmc_);
|
||||||
return config_pmc_.get();
|
return config_pmc_.get();
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#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/DbKey.h"
|
#include "td/db/DbKey.h"
|
||||||
#include "td/db/Pmc.h"
|
#include "td/db/KeyValueSyncInterface.h"
|
||||||
|
|
||||||
#include "td/actor/PromiseFuture.h"
|
#include "td/actor/PromiseFuture.h"
|
||||||
|
|
||||||
@ -68,9 +68,9 @@ class TdDb {
|
|||||||
std::shared_ptr<SqliteConnectionSafe> &get_sqlite_connection_safe();
|
std::shared_ptr<SqliteConnectionSafe> &get_sqlite_connection_safe();
|
||||||
ConcurrentBinlog *get_binlog();
|
ConcurrentBinlog *get_binlog();
|
||||||
|
|
||||||
BinlogPmc get_binlog_pmc_shared();
|
std::shared_ptr<KeyValueSyncInterface> get_binlog_pmc_shared();
|
||||||
BinlogPmcPtr get_binlog_pmc();
|
BinlogKeyValue<ConcurrentBinlog> *get_binlog_pmc();
|
||||||
BinlogPmcPtr get_config_pmc();
|
BinlogKeyValue<ConcurrentBinlog> *get_config_pmc();
|
||||||
|
|
||||||
SqliteKeyValue *get_sqlite_sync_pmc();
|
SqliteKeyValue *get_sqlite_sync_pmc();
|
||||||
SqliteKeyValueAsyncInterface *get_sqlite_pmc();
|
SqliteKeyValueAsyncInterface *get_sqlite_pmc();
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
enum class TopDialogCategory : int32 { Correspondent, BotPM, BotInline, Group, Channel, Call, Size };
|
enum class TopDialogCategory : int32 { Correspondent, BotPM, BotInline, Group, Channel, Call, Size };
|
||||||
|
|
||||||
inline TopDialogCategory top_dialog_category_from_td_api(const td_api::TopChatCategory &category) {
|
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 start_up() override;
|
||||||
void loop() override;
|
void loop() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace td
|
} // namespace td
|
||||||
|
@ -178,6 +178,7 @@ class BinlogKeyValue : public KeyValueSyncInterface {
|
|||||||
void force_sync(Promise<> &&promise) {
|
void force_sync(Promise<> &&promise) {
|
||||||
binlog_->force_sync(std::move(promise));
|
binlog_->force_sync(std::move(promise));
|
||||||
}
|
}
|
||||||
|
|
||||||
void lazy_sync(Promise<> &&promise) {
|
void lazy_sync(Promise<> &&promise) {
|
||||||
binlog_->lazy_sync(std::move(promise));
|
binlog_->lazy_sync(std::move(promise));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user