TDLib
Loading...
Searching...
No Matches
td_json_client.h
Go to the documentation of this file.
1//
2// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023
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
51#include "td/telegram/tdjson_export.h"
52
53#ifdef __cplusplus
54extern "C" {
55#endif
56
62TDJSON_EXPORT int td_create_client_id();
63
69TDJSON_EXPORT void td_send(int client_id, const char *request);
70
77TDJSON_EXPORT const char *td_receive(double timeout);
78
86TDJSON_EXPORT const char *td_execute(const char *request);
87
96typedef void (*td_log_message_callback_ptr)(int verbosity_level, const char *message);
97
107TDJSON_EXPORT void td_set_log_message_callback(int max_verbosity_level, td_log_message_callback_ptr callback);
108
148TDJSON_EXPORT void *td_json_client_create();
149
155TDJSON_EXPORT void td_json_client_send(void *client, const char *request);
156
166TDJSON_EXPORT const char *td_json_client_receive(void *client, double timeout);
167
177TDJSON_EXPORT const char *td_json_client_execute(void *client, const char *request);
178
183TDJSON_EXPORT void td_json_client_destroy(void *client);
184
185#ifdef __cplusplus
186} // extern "C"
187#endif
void td_set_log_message_callback(int max_verbosity_level, td_log_message_callback_ptr callback)
void td_json_client_send(void *client, const char *request)
const char * td_execute(const char *request)
const char * td_json_client_execute(void *client, const char *request)
const char * td_receive(double timeout)
void td_json_client_destroy(void *client)
int td_create_client_id()
void(* td_log_message_callback_ptr)(int verbosity_level, const char *message)
Definition td_json_client.h:96
const char * td_json_client_receive(void *client, double timeout)
void * td_json_client_create()
void td_send(int client_id, const char *request)