TdPlugin class abstract
TDLib Library Instance.
- Implementers
Constructors
- TdPlugin()
-
constructor
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeLogMessageCallback(
) → void - Removes the log message callback.
-
setLogMessageCallback(
int maxVerbosityLevel, dynamic callback) → void - Sets the callback that will be called when a message is added to the internal TDLib log. None of the TDLib methods can be called from the callback. By default the callback is not set.
-
tdCreate(
) → int - Returns client id for the created instance of TDLib. The TDLib instance will not send updates until the first request is sent to it. 0 mean No client instance.
-
tdExecute(
String event) → String? -
Synchronously executes a TDLib request.
A request can be executed synchronously, only if it is documented with "Can be called synchronously".
event
is JSON-serialized null-terminated request to TDLib. -
tdGetTimeout(
) → num - Returns timeout for receiving events.
-
tdJsonClientCreate(
) → int - Creates a new instance of TDLib. Returns client id for the created instance of TDLib.
-
tdJsonClientDestroy(
int clientId) → void -
Destroys the TDLib client instance by
clientId
identifier. After this is called the client instance must not be used anymore. -
tdJsonClientExecute(
String event) → String? -
Synchronously executes TDLib
event
. May be called from any thread. Only a few requests can be executed synchronously. -
tdJsonClientReceive(
int clientId, [double timeout = 8]) → String? -
Receives incoming updates and request responses from the TDLib client by
clientId
identifier andtimeout
. May be called from any thread, but shouldn't be called simultaneously from two different threads. -
tdJsonClientSend(
int clientId, String event) → void -
Sends
event
to the TDLib client byclientId
identifier. May be called from any thread. -
tdReceive(
[double timeout = 8]) → String? -
Receives incoming updates and request responses from the TDLib with
timeout
. -
tdSend(
int clientId, String event) → void -
Sends request to the TDLib client. May be called from any thread.
clientId
is TDLib client identifier.event
is JSON-serialized null-terminated request to TDLib. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
initialize
↔ Future<
void> Function([String? libPath]) -
This method loads TDLib library.
getter/setter pair
- instance ↔ TdPlugin
-
TdPlugin instance.
getter/setter pair