Module tdlight.api

Class TdApi.SetTdlibParameters

Enclosing class:
TdApi

public static final class TdApi.SetTdlibParameters extends TdApi.Function<TdApi.Ok>
Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters. Returns Ok
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.
    int
    Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.
    Application version; must be non-empty.
    static final int
     
    The path to the directory for the persistent database; if empty, the current working directory will be used.
    byte[]
    Encryption key for the database.
    Model of the device the application is being run on; must be non-empty.
    boolean
    Pass true to automatically delete old files in background.
    The path to the directory for storing files; if empty, databaseDirectory will be used.
    boolean
    Pass true to ignore original file names for downloaded files.
    IETF language tag of the user's operating system language; must be non-empty.
    Version of the operating system the application is being run on.
    boolean
    Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts.
    boolean
    Pass true to keep information about downloaded and uploaded files between application restarts.
    boolean
    Pass true to keep cache of chats and messages between restarts.
    boolean
    Pass true to enable support for secret chats.
    boolean
    Pass true to use Telegram test environment instead of the production environment.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Sets the parameters for TDLib initialization.
    SetTdlibParameters(boolean useTestDc, String databaseDirectory, String filesDirectory, byte[] databaseEncryptionKey, boolean useFileDatabase, boolean useChatInfoDatabase, boolean useMessageDatabase, boolean useSecretChats, int apiId, String apiHash, String systemLanguageCode, String deviceModel, String systemVersion, String applicationVersion, boolean enableStorageOptimizer, boolean ignoreFileNames)
    Sets the parameters for TDLib initialization.
    Sets the parameters for TDLib initialization.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    int
     
    void
     

    Methods inherited from class it.tdlight.jni.TdApi.Function

    toString

    Methods inherited from class it.tdlight.jni.TdApi.Object

    serialize

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • useTestDc

      public boolean useTestDc
      Pass true to use Telegram test environment instead of the production environment.
    • databaseDirectory

      public String databaseDirectory
      The path to the directory for the persistent database; if empty, the current working directory will be used.
    • filesDirectory

      public String filesDirectory
      The path to the directory for storing files; if empty, databaseDirectory will be used.
    • databaseEncryptionKey

      public byte[] databaseEncryptionKey
      Encryption key for the database.
    • useFileDatabase

      public boolean useFileDatabase
      Pass true to keep information about downloaded and uploaded files between application restarts.
    • useChatInfoDatabase

      public boolean useChatInfoDatabase
      Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies useFileDatabase.
    • useMessageDatabase

      public boolean useMessageDatabase
      Pass true to keep cache of chats and messages between restarts. Implies useChatInfoDatabase.
    • useSecretChats

      public boolean useSecretChats
      Pass true to enable support for secret chats.
    • apiId

      public int apiId
      Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.
    • apiHash

      public String apiHash
      Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.
    • systemLanguageCode

      public String systemLanguageCode
      IETF language tag of the user's operating system language; must be non-empty.
    • deviceModel

      public String deviceModel
      Model of the device the application is being run on; must be non-empty.
    • systemVersion

      public String systemVersion
      Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib.
    • applicationVersion

      public String applicationVersion
      Application version; must be non-empty.
    • enableStorageOptimizer

      public boolean enableStorageOptimizer
      Pass true to automatically delete old files in background.
    • ignoreFileNames

      public boolean ignoreFileNames
      Pass true to ignore original file names for downloaded files. Otherwise, downloaded files are saved under names as close as possible to the original name.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      See Also:
  • Constructor Details

    • SetTdlibParameters

      public SetTdlibParameters()
      Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters. Returns Ok
    • SetTdlibParameters

      public SetTdlibParameters(boolean useTestDc, String databaseDirectory, String filesDirectory, byte[] databaseEncryptionKey, boolean useFileDatabase, boolean useChatInfoDatabase, boolean useMessageDatabase, boolean useSecretChats, int apiId, String apiHash, String systemLanguageCode, String deviceModel, String systemVersion, String applicationVersion, boolean enableStorageOptimizer, boolean ignoreFileNames)
      Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters. Returns Ok
      Parameters:
      useTestDc - boolean Pass true to use Telegram test environment instead of the production environment.
      databaseDirectory - String The path to the directory for the persistent database; if empty, the current working directory will be used.
      filesDirectory - String The path to the directory for storing files; if empty, databaseDirectory will be used.
      databaseEncryptionKey - byte[] Encryption key for the database.
      useFileDatabase - boolean Pass true to keep information about downloaded and uploaded files between application restarts.
      useChatInfoDatabase - boolean Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies useFileDatabase.
      useMessageDatabase - boolean Pass true to keep cache of chats and messages between restarts. Implies useChatInfoDatabase.
      useSecretChats - boolean Pass true to enable support for secret chats.
      apiId - int Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.
      apiHash - String Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.
      systemLanguageCode - String IETF language tag of the user's operating system language; must be non-empty.
      deviceModel - String Model of the device the application is being run on; must be non-empty.
      systemVersion - String Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib.
      applicationVersion - String Application version; must be non-empty.
      enableStorageOptimizer - boolean Pass true to automatically delete old files in background.
      ignoreFileNames - boolean Pass true to ignore original file names for downloaded files. Otherwise, downloaded files are saved under names as close as possible to the original name.
    • SetTdlibParameters

      public SetTdlibParameters(DataInput input) throws IOException
      Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters. Returns Ok
      Throws:
      IOException
  • Method Details