update for TDLib v1.5.0

This commit is contained in:
Aleksandr Zelenin 2019-09-10 15:36:54 +03:00
parent 7f5ecc75f7
commit bb283b57fc
10 changed files with 3191 additions and 689 deletions

View file

@ -3,7 +3,6 @@ package client
/*
#include <stdlib.h>
#include <td/telegram/td_json_client.h>
#include <td/telegram/td_log.h>
*/
import "C"
@ -94,31 +93,6 @@ func (jsonClient *JsonClient) Destroy() {
C.td_json_client_destroy(jsonClient.jsonClient)
}
// Sets the path to the file where the internal TDLib log will be written.
// By default TDLib writes logs to stderr or an OS specific log.
// Use this method to write the log to a file instead.
// Deprecated
func SetLogFilePath(filePath string) {
query := C.CString(filePath)
defer C.free(unsafe.Pointer(query))
C.td_set_log_file_path(query)
}
// Sets maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated.
// Unused if log is not written to a file. Defaults to 10 MB.
// Deprecated
func SetLogMaxFileSize(maxFileSize int64) {
C.td_set_log_max_file_size(C.longlong(maxFileSize))
}
// Sets the verbosity level of the internal logging of TDLib.
// By default the TDLib uses a log verbosity level of 5
// Deprecated
func SetLogVerbosityLevel(newVerbosityLevel int) {
C.td_set_log_verbosity_level(C.int(newVerbosityLevel))
}
type meta struct {
Type string `json:"@type"`
Extra string `json:"@extra"`