8872fbf6ac
GitOrigin-RevId: 5b9a863e405a9e3782157570156fda71bf2bb589
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
//
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2020
|
|
//
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
//
|
|
#pragma once
|
|
|
|
#include "td/actor/PromiseFuture.h"
|
|
|
|
#include "td/db/binlog/BinlogEvent.h"
|
|
#include "td/db/binlog/BinlogInterface.h"
|
|
|
|
#include "td/utils/common.h"
|
|
#include "td/utils/StorerBase.h"
|
|
|
|
namespace td {
|
|
|
|
inline uint64 binlog_add(BinlogInterface *binlog_ptr, int32 type, const Storer &storer,
|
|
Promise<> promise = Promise<>()) {
|
|
return binlog_ptr->add(type, storer, std::move(promise));
|
|
}
|
|
|
|
inline uint64 binlog_rewrite(BinlogInterface *binlog_ptr, uint64 logevent_id, int32 type, const Storer &storer,
|
|
Promise<> promise = Promise<>()) {
|
|
return binlog_ptr->rewrite(logevent_id, type, storer, std::move(promise));
|
|
}
|
|
|
|
inline uint64 binlog_erase(BinlogInterface *binlog_ptr, uint64 logevent_id, Promise<> promise = Promise<>()) {
|
|
return binlog_ptr->erase(logevent_id, std::move(promise));
|
|
}
|
|
|
|
} // namespace td
|