tdlight/td/telegram/files/FileLoadManager.h

35 lines
1.0 KiB
C
Raw Normal View History

//
2024-01-01 01:07:21 +01:00
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
//
// 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/telegram/files/FileLoaderUtils.h"
#include "td/telegram/files/FileLocation.h"
2021-09-18 23:47:05 +02:00
#include "td/actor/actor.h"
#include "td/utils/buffer.h"
2022-06-21 01:55:53 +02:00
#include "td/utils/common.h"
2022-06-27 12:30:18 +02:00
#include "td/utils/Promise.h"
namespace td {
class FileLoadManager final : public Actor {
public:
2022-06-15 20:40:23 +02:00
void get_content(string file_path, Promise<BufferSlice> promise);
void read_file_part(string file_path, int64 offset, int64 count, Promise<string> promise);
void unlink_file(string file_path, Promise<Unit> promise);
void check_full_local_location(FullLocalLocationInfo local_info, bool skip_file_size_checks,
Promise<FullLocalLocationInfo> promise);
void check_partial_local_location(PartialLocalFileLocation partial, Promise<Unit> promise);
};
} // namespace td