WinterGram/Telegram/WatchApp/Packages/TDShim/Sources/TDShim/Generated/API/TdClient.swift
2026-06-01 17:23:05 +02:00

35 lines
821 B
Swift

//
// TdClient.swift
// tl2swift
//
// Generated automatically. Any changes will be lost!
// Based on TDLib 1.8.64-49b3bcbb-49b3bcbb
// https://github.com/tdlib/td/tree/49b3bcbb
//
import Foundation
/// Basic protocol for communicate with TdLib.
public protocol TdClient {
/// Receives incoming updates and request responses from the TDLib client
func run(updateHandler: @escaping (Data) -> Void)
/// Sends request to the TDLib client.
func send(query: TdQuery, completion: ((Data) -> Void)?) throws
/// Synchronously executes TDLib request. Only a few requests can be executed synchronously.
func execute(query: TdQuery) throws -> [String:Any]?
/// Close connection with TDLib.
func close()
}
public protocol TdQuery {
func make(with extra: String?) throws -> Data
}