TdCallback.h
Go to the documentation of this file.
1 //
2 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 #pragma once
8 
10 
11 #include "td/telegram/td_api.h"
12 
13 #include <cstdint>
14 
15 namespace td {
16 
20 class TdCallback {
21  public:
27  virtual void on_result(std::uint64_t id, td_api::object_ptr<td_api::Object> result) = 0;
28 
34  virtual void on_error(std::uint64_t id, td_api::object_ptr<td_api::error> error) = 0;
35 
39  virtual ~TdCallback() = default;
40 };
41 
42 } // namespace td
::td::tl_object_ptr< Type > object_ptr
Definition: td_api.h:58
Definition: TdCallback.h:20
virtual void on_error(std::uint64_t id, td_api::object_ptr< td_api::error > error)=0
virtual void on_result(std::uint64_t id, td_api::object_ptr< td_api::Object > result)=0
virtual ~TdCallback()=default