1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 11:12:16 +00:00

Tonlib: add exported function tonlib_client_set_verbosity_level (#406)

Co-authored-by: ms <98183742+dungeon-master-666@users.noreply.github.com>
Co-authored-by: dungeon-master-666 <dungeon666master@protonmail.com>
This commit is contained in:
EmelyanenkoK 2022-06-17 10:01:19 +03:00 committed by GitHub
parent 8537dd60e6
commit 09236fba09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -22,6 +22,8 @@
#include "td/utils/Slice.h" #include "td/utils/Slice.h"
#include "tonlib/Logging.h"
extern "C" int tonlib_client_json_square(int x, const char *str) { extern "C" int tonlib_client_json_square(int x, const char *str) {
return x * x; return x * x;
} }
@ -30,6 +32,10 @@ void *tonlib_client_json_create() {
return new tonlib::ClientJson(); return new tonlib::ClientJson();
} }
void tonlib_client_set_verbosity_level(int verbosity_level) {
tonlib::Logging::set_verbosity_level(verbosity_level);
}
void tonlib_client_json_destroy(void *client) { void tonlib_client_json_destroy(void *client) {
delete static_cast<tonlib::ClientJson *>(client); delete static_cast<tonlib::ClientJson *>(client);
} }

View file

@ -26,6 +26,8 @@ extern "C" {
TONLIBJSON_EXPORT void *tonlib_client_json_create(); TONLIBJSON_EXPORT void *tonlib_client_json_create();
TONLIBJSON_EXPORT void tonlib_client_set_verbosity_level(int verbosity_level);
TONLIBJSON_EXPORT void tonlib_client_json_send(void *client, const char *request); TONLIBJSON_EXPORT void tonlib_client_json_send(void *client, const char *request);
TONLIBJSON_EXPORT const char *tonlib_client_json_receive(void *client, double timeout); TONLIBJSON_EXPORT const char *tonlib_client_json_receive(void *client, double timeout);

View file

@ -3,3 +3,4 @@ _tonlib_client_json_destroy
_tonlib_client_json_send _tonlib_client_json_send
_tonlib_client_json_receive _tonlib_client_json_receive
_tonlib_client_json_execute _tonlib_client_json_execute
_tonlib_client_set_verbosity_level