2018-12-31 20:04:05 +01:00
|
|
|
//
|
2024-01-01 01:07:21 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
|
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
|
|
|
|
|
|
|
|
#include "td/telegram/DialogId.h"
|
2019-01-19 22:54:29 +01:00
|
|
|
#include "td/telegram/files/FileType.h"
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
#include "td/utils/common.h"
|
2018-11-15 22:25:08 +01:00
|
|
|
#include "td/utils/StringBuilder.h"
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
|
|
|
struct FileGcParameters {
|
|
|
|
FileGcParameters() : FileGcParameters(-1, -1, -1, -1, {}, {}, {}, 0) {
|
|
|
|
}
|
|
|
|
FileGcParameters(int64 size, int32 ttl, int32 count, int32 immunity_delay, vector<FileType> file_types,
|
|
|
|
vector<DialogId> owner_dialog_ids, vector<DialogId> exclude_owner_dialog_ids, int32 dialog_limit);
|
|
|
|
|
2021-12-11 21:03:11 +01:00
|
|
|
int64 max_files_size_;
|
|
|
|
uint32 max_time_from_last_access_;
|
|
|
|
uint32 max_file_count_;
|
|
|
|
uint32 immunity_delay_;
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2021-12-11 21:03:11 +01:00
|
|
|
vector<FileType> file_types_;
|
|
|
|
vector<DialogId> owner_dialog_ids_;
|
|
|
|
vector<DialogId> exclude_owner_dialog_ids_;
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2021-12-11 21:03:11 +01:00
|
|
|
int32 dialog_limit_;
|
2018-12-31 20:04:05 +01:00
|
|
|
};
|
|
|
|
|
2018-11-15 22:25:08 +01:00
|
|
|
StringBuilder &operator<<(StringBuilder &string_builder, const FileGcParameters ¶meters);
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
} // namespace td
|