diff options
author | George Hazan <ghazan@miranda.im> | 2022-11-30 17:48:47 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-11-30 17:48:47 +0300 |
commit | 0ece30dc7c0e34b4c5911969b8fa99c33c6d023c (patch) | |
tree | 671325d3fec09b999411e4e3ab84ef8259261818 /protocols/Telegram/tdlib/td/td/telegram/DhConfig.h | |
parent | 46c53ffc6809c67e4607e99951a2846c382b63b2 (diff) |
Telegram: update for TDLIB
Diffstat (limited to 'protocols/Telegram/tdlib/td/td/telegram/DhConfig.h')
-rw-r--r-- | protocols/Telegram/tdlib/td/td/telegram/DhConfig.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/Telegram/tdlib/td/td/telegram/DhConfig.h b/protocols/Telegram/tdlib/td/td/telegram/DhConfig.h index a8a07e2e5a..1b01874fc4 100644 --- a/protocols/Telegram/tdlib/td/td/telegram/DhConfig.h +++ b/protocols/Telegram/tdlib/td/td/telegram/DhConfig.h @@ -1,27 +1,32 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2018 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022 // // 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/utils/common.h" namespace td { + class DhConfig { public: int32 version = 0; string prime; int32 g = 0; + bool empty() const { return prime.empty(); } + template <class StorerT> void store(StorerT &storer) const { storer.store_int(version); storer.store_string(prime); storer.store_int(g); } + template <class ParserT> void parse(ParserT &parser) { version = parser.fetch_int(); @@ -29,4 +34,5 @@ class DhConfig { g = parser.fetch_int(); } }; + } // namespace td |