List of all members | Classes | Public Class Methods | Public Instance Methods
ClientActor Class Referencefinal

Inherits Actor.

Description

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::Objectexecute (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
 
ClientActoroperator= (ClientActor &&other) noexcept
 
 ClientActor (const ClientActor &other)=delete
 
ClientActoroperator= (const ClientActor &other)=delete
 

Constructor & Destructor Documentation

◆ ClientActor() [1/2]

ClientActor ( unique_ptr< TdCallback callback,
Options  options = {} 
)
explicit

Creates a ClientActor using the specified callback.

Parameters
[in]callbackCallback for outgoing notifications from TDLib.
[in]optionsOptions to create the TDLib.

◆ ~ClientActor()

~ClientActor ( )
final

Destroys the ClientActor and the TDLib instance.

◆ ClientActor() [2/2]

ClientActor ( ClientActor &&  other)
noexcept

Move constructor.

Method Documentation

◆ request()

void request ( uint64  id,
td_api::object_ptr< td_api::Function request 
)

Sends one request to TDLib. The answer will be received via callback.

Parameters
[in]idRequest identifier, must be positive.
[in]requestThe request.

◆ execute()

static td_api::object_ptr<td_api::Object> execute ( td_api::object_ptr< td_api::Function request)
static

Synchronously executes a TDLib request. Only a few requests can be executed synchronously. May be called from any thread.

Parameters
[in]requestRequest to the TDLib instance.
Returns
The request response.

◆ operator=()

ClientActor& operator= ( ClientActor &&  other)
noexcept

Move assignment operator.


The documentation for this class was generated from the following file: