58 lines
1.7 KiB
C
58 lines
1.7 KiB
C
|
//
|
||
|
// 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/td_api.h"
|
||
|
#include "td/telegram/telegram_api.h"
|
||
|
#include "td/telegram/UserId.h"
|
||
|
|
||
|
#include "td/utils/common.h"
|
||
|
#include "td/utils/StringBuilder.h"
|
||
|
|
||
|
namespace td {
|
||
|
|
||
|
class Td;
|
||
|
|
||
|
class BusinessRecipients {
|
||
|
public:
|
||
|
explicit BusinessRecipients(telegram_api::object_ptr<telegram_api::businessRecipients> recipients);
|
||
|
|
||
|
explicit BusinessRecipients(td_api::object_ptr<td_api::businessRecipients> recipients);
|
||
|
|
||
|
td_api::object_ptr<td_api::businessRecipients> get_business_recipients_object(Td *td) const;
|
||
|
|
||
|
telegram_api::object_ptr<telegram_api::inputBusinessRecipients> get_input_business_recipients(Td *td) const;
|
||
|
|
||
|
template <class StorerT>
|
||
|
void store(StorerT &storer) const;
|
||
|
|
||
|
template <class ParserT>
|
||
|
void parse(ParserT &parser);
|
||
|
|
||
|
private:
|
||
|
vector<UserId> user_ids_;
|
||
|
bool existing_chats_ = false;
|
||
|
bool new_chats_ = false;
|
||
|
bool contacts_ = false;
|
||
|
bool non_contacts_ = false;
|
||
|
bool exclude_selected_ = false;
|
||
|
|
||
|
friend bool operator==(const BusinessRecipients &lhs, const BusinessRecipients &rhs);
|
||
|
|
||
|
friend StringBuilder &operator<<(StringBuilder &string_builder, const BusinessRecipients &recipients);
|
||
|
};
|
||
|
|
||
|
bool operator==(const BusinessRecipients &lhs, const BusinessRecipients &rhs);
|
||
|
|
||
|
inline bool operator!=(const BusinessRecipients &lhs, const BusinessRecipients &rhs) {
|
||
|
return !(lhs == rhs);
|
||
|
}
|
||
|
|
||
|
StringBuilder &operator<<(StringBuilder &string_builder, const BusinessRecipients &recipients);
|
||
|
|
||
|
} // namespace td
|