Module: TDLib

Extended by:
FFI::Library
Defined in:
lib/tdlib.rb,
lib/tdlib/version.rb

Constant Summary collapse

VERSION =
"1.0.4"

Class Method Summary collapse

Class Method Details

.loadLibrary(path = 'libtdjson.so') ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/tdlib.rb', line 7

def TDLib.loadLibrary(path = 'libtdjson.so')
  ffi_lib path
  attach_function :td_json_client_create, [], :pointer
  attach_function :td_json_client_receive, [:pointer, :double], :string
  attach_function :td_json_client_send, [:pointer, :string], :pointer
  attach_function :td_json_client_execute, [:pointer, :string], :string
  attach_function :td_json_client_destroy, [:pointer], :void
  attach_function :td_set_log_file_path, [:string], :int
  attach_function :td_set_log_max_file_size, [:long_long], :void
  attach_function :td_set_log_verbosity_level, [:int], :void
end