2018-06-07 21:42:17 +03:00
|
|
|
//
|
2024-01-01 03:07:21 +03:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
|
2018-06-07 21:42:17 +03: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 17:32:09 +03:00
|
|
|
#include "td/telegram/td_api.h"
|
|
|
|
#include "td/telegram/telegram_api.h"
|
2018-06-07 21:42:17 +03:00
|
|
|
|
|
|
|
#include "td/utils/common.h"
|
2018-06-26 02:43:11 +03:00
|
|
|
#include "td/utils/Slice.h"
|
2018-06-07 21:42:17 +03: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 13:24:05 +03:00
|
|
|
td_api::object_ptr<td_api::termsOfService> get_terms_of_service_object() const;
|
2018-06-07 21:42:17 +03:00
|
|
|
|
2019-02-21 20:54:20 +03:00
|
|
|
template <class StorerT>
|
2024-08-01 13:33:24 +03:00
|
|
|
void store(StorerT &storer) const;
|
2018-06-07 21:42:17 +03:00
|
|
|
|
2019-02-21 20:54:20 +03:00
|
|
|
template <class ParserT>
|
2024-08-01 13:33:24 +03:00
|
|
|
void parse(ParserT &parser);
|
2018-06-07 21:42:17 +03:00
|
|
|
};
|
|
|
|
|
2018-06-08 01:19:34 +03:00
|
|
|
} // namespace td
|