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:
parent
8537dd60e6
commit
09236fba09
3 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue