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-2021
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
54 extern "C" {
55 #endif
56 
62 TDJSON_EXPORT int td_create_client_id();
63 
69 TDJSON_EXPORT void td_send(int client_id, const char *request);
70 
77 TDJSON_EXPORT const char *td_receive(double timeout);
78 
86 TDJSON_EXPORT const char *td_execute(const char *request);
87 
96 typedef void (*td_log_message_callback_ptr)(int verbosity_level, const char *message);
97 
107 TDJSON_EXPORT void td_set_log_message_callback(int max_verbosity_level, td_log_message_callback_ptr callback);
108 
148 TDJSON_EXPORT void *td_json_client_create();
149 
155 TDJSON_EXPORT void td_json_client_send(void *client, const char *request);
156 
166 TDJSON_EXPORT const char *td_json_client_receive(void *client, double timeout);
167 
177 TDJSON_EXPORT const char *td_json_client_execute(void *client, const char *request);
178 
183 TDJSON_EXPORT void td_json_client_destroy(void *client);
184 
185 #ifdef __cplusplus
186 } // extern "C"
187 #endif
const char * td_execute(const char *request)
void td_json_client_destroy(void *client)
void(* td_log_message_callback_ptr)(int verbosity_level, const char *message)
Definition: td_json_client.h:96
const char * td_receive(double timeout)
void td_send(int client_id, const char *request)
const char * td_json_client_execute(void *client, const char *request)
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)
void * td_json_client_create()
const char * td_json_client_receive(void *client, double timeout)
int td_create_client_id()