Skip to content

Commit

Permalink
Tonlib: add exported function tonlib_client_set_verbosity_level (#406)
Browse files Browse the repository at this point in the history
Co-authored-by: ms <[email protected]>
Co-authored-by: dungeon-master-666 <[email protected]>
  • Loading branch information
3 people authored Jun 17, 2022
1 parent 8537dd6 commit 09236fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tonlib/tonlib/tonlib_client_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include "td/utils/Slice.h"

#include "tonlib/Logging.h"

extern "C" int tonlib_client_json_square(int x, const char *str) {
return x * x;
}
Expand All @@ -30,6 +32,10 @@ void *tonlib_client_json_create() {
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) {
delete static_cast<tonlib::ClientJson *>(client);
}
Expand Down
2 changes: 2 additions & 0 deletions tonlib/tonlib/tonlib_client_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ extern "C" {

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 const char *tonlib_client_json_receive(void *client, double timeout);
Expand Down
1 change: 1 addition & 0 deletions tonlib/tonlibclientjson_export_list
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ _tonlib_client_json_destroy
_tonlib_client_json_send
_tonlib_client_json_receive
_tonlib_client_json_execute
_tonlib_client_set_verbosity_level

0 comments on commit 09236fb

Please sign in to comment.