Inherits Actor.
This is a low-level Actor interface for interaction with TDLib. The interface is a lot more flexible than the ClientManager interface, however, for most usages the ClientManager interface should be sufficient.
Classes | |
| struct | Options |
| Options for ClientActor creation. More... | |
Public Class Methods | |
| static td_api::object_ptr< td_api::Object > | execute (td_api::object_ptr< td_api::Function > request) |
Public Instance Methods | |
| ClientActor (unique_ptr< TdCallback > callback, Options options={}) | |
| void | request (uint64 id, td_api::object_ptr< td_api::Function > request) |
| ~ClientActor () final | |
| ClientActor (ClientActor &&other) noexcept | |
| ClientActor & | operator= (ClientActor &&other) noexcept |
| ClientActor (const ClientActor &)=delete | |
| ClientActor & | operator= (const ClientActor &)=delete |
|
explicit |
Creates a ClientActor using the specified callback.
| [in] | callback | Callback for outgoing notifications from TDLib. |
| [in] | options | Options to create the TDLib. |
|
final |
Destroys the ClientActor and the TDLib instance.
|
noexcept |
Move constructor.
| void request | ( | uint64 | id, |
| td_api::object_ptr< td_api::Function > | request | ||
| ) |
Sends one request to TDLib. The answer will be received via callback.
| [in] | id | Request identifier, must be positive. |
| [in] | request | The request. |
|
static |
Synchronously executes a TDLib request. Only a few requests can be executed synchronously. May be called from any thread.
| [in] | request | Request to the TDLib instance. |
|
noexcept |
Move assignment operator.