2018-06-07 20:42:17 +02:00
|
|
|
//
|
2024-01-01 01:07:21 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
|
2018-06-07 20:42:17 +02: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/MessageEntity.h"
|
2021-10-27 16:32:09 +02:00
|
|
|
#include "td/telegram/td_api.h"
|
|
|
|
#include "td/telegram/telegram_api.h"
|
2018-06-07 20:42:17 +02:00
|
|
|
|
|
|
|
#include "td/utils/common.h"
|
2018-06-26 01:43:11 +02:00
|
|
|
#include "td/utils/Slice.h"
|
2018-06-07 20:42:17 +02:00
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
|
|
|
class TermsOfService {
|
|
|
|
string id_;
|
|
|
|
FormattedText text_;
|
|
|
|
int32 min_user_age_ = 0;
|
|
|
|
bool show_popup_ = true;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit TermsOfService(telegram_api::object_ptr<telegram_api::help_termsOfService> terms = nullptr);
|
|
|
|
|
|
|
|
Slice get_id() const {
|
|
|
|
return id_;
|
|
|
|
}
|
|
|
|
|
2024-08-01 12:24:05 +02:00
|
|
|
td_api::object_ptr<td_api::termsOfService> get_terms_of_service_object() const;
|
2018-06-07 20:42:17 +02:00
|
|
|
|
2019-02-21 18:54:20 +01:00
|
|
|
template <class StorerT>
|
2024-08-01 12:33:24 +02:00
|
|
|
void store(StorerT &storer) const;
|
2018-06-07 20:42:17 +02:00
|
|
|
|
2019-02-21 18:54:20 +01:00
|
|
|
template <class ParserT>
|
2024-08-01 12:33:24 +02:00
|
|
|
void parse(ParserT &parser);
|
2018-06-07 20:42:17 +02:00
|
|
|
};
|
|
|
|
|
2018-06-08 00:19:34 +02:00
|
|
|
} // namespace td
|