2018-12-31 20:04:05 +01:00
|
|
|
//
|
2022-01-01 01:35:39 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022
|
2018-12-31 20:04:05 +01:00
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2021-09-18 23:47:05 +02:00
|
|
|
#include "td/telegram/files/FileStats.h"
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
#include "td/actor/actor.h"
|
|
|
|
|
2019-05-01 16:15:54 +02:00
|
|
|
#include "td/utils/CancellationToken.h"
|
2022-06-27 12:30:18 +02:00
|
|
|
#include "td/utils/Promise.h"
|
2019-05-01 16:15:54 +02:00
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
namespace td {
|
|
|
|
|
2021-07-04 04:58:54 +02:00
|
|
|
class FileStatsWorker final : public Actor {
|
2018-12-31 20:04:05 +01:00
|
|
|
public:
|
2019-05-01 16:15:54 +02:00
|
|
|
FileStatsWorker(ActorShared<> parent, CancellationToken token)
|
|
|
|
: parent_(std::move(parent)), token_(std::move(token)) {
|
2018-12-31 20:04:05 +01:00
|
|
|
}
|
|
|
|
void get_stats(bool need_all_files, bool split_by_owner_dialog_id, Promise<FileStats> promise);
|
|
|
|
|
|
|
|
private:
|
|
|
|
ActorShared<> parent_;
|
2019-05-01 16:15:54 +02:00
|
|
|
CancellationToken token_;
|
2018-12-31 20:04:05 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace td
|