-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Bidings to the tdlib json interface
--
-- Please see the README on GitHub at
-- https://github.com/poscat0x04/tdlib#readme
@package tdlib
@version 0.1.0
module Paths_tdlib
version :: Version
getBinDir :: IO FilePath
getLibDir :: IO FilePath
getDynLibDir :: IO FilePath
getDataDir :: IO FilePath
getLibexecDir :: IO FilePath
getDataFileName :: FilePath -> IO FilePath
getSysconfDir :: IO FilePath
-- | Bindings to TDLib Json interface
module TDLib.TDJson
-- | Logging verbosity
data Verbosity
Fatal :: Verbosity
Error :: Verbosity
Warning :: Verbosity
Info :: Verbosity
Debug :: Verbosity
Verbose :: Verbosity
-- | TDLib client, will be automacially destroyed as soon as there are no
-- references pointing to it (backed by ForeignPtr)
data Client
-- | Creates a new instance of TDLib.
newClient :: IO Client
-- | Destroys the TDLib client instance. After this is called the client
-- instance shouldn't be used anymore.
destroyClient :: Client -> IO ()
-- | Receives incoming updates and request responses from the TDLib client.
-- May be called from any thread, but shouldn't be called simultaneously
-- from two different threads. Returned pointer will be deallocated by
-- TDLib during next call to clientReceive or clientExecute
-- in the same thread, so it can't be used after that.
clientReceive :: Client -> Double -> IO ByteString
-- | Sends request to the TDLib client. May be called from any thread.
clientSend :: Client -> ByteString -> IO ()
-- | Synchronously executes TDLib request. May be called from any thread.
-- Only a few requests can be executed synchronously. Returned pointer
-- will be deallocated by TDLib during next call to clientReceive
-- or clientExecute in the same thread, so it can't be used after
-- that.
clientExecute :: Client -> ByteString -> IO ()
-- | 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.
setLogFilePath :: ByteString -> IO Bool
-- | Sets the 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.
setLogMaxFileSize :: Int64 -> IO ()
-- | Sets the verbosity level of the internal logging of TDLib. By default
-- the TDLib uses a log verbosity level of Verbose.
setLogVerbosityLevel :: Verbosity -> IO ()
-- | Sets the callback that will be called when a fatal error happens. None
-- of the TDLib methods can be called from the callback. The TDLib will
-- crash as soon as callback returns. By default the callback is not set.
setLogFatalErrorCallback :: (ByteString -> IO ()) -> IO ()
instance GHC.Enum.Enum TDLib.TDJson.Verbosity
instance GHC.Classes.Eq TDLib.TDJson.Verbosity
instance GHC.Show.Show TDLib.TDJson.Verbosity
instance GHC.Show.Show TDLib.TDJson.Client
instance GHC.Classes.Ord TDLib.TDJson.Client
instance GHC.Classes.Eq TDLib.TDJson.Client