- Enclosing class:
- TdApi
Sets the parameters for TDLib initialization. Works only when the
current authorization state is authorizationStateWaitTdlibParameters.
Returns Ok
-
Field Summary
Modifier and TypeFieldDescriptionApplication 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
Identifier uniquely determining type of the object.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
ConstructorDescriptionSets 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.SetTdlibParameters
(DataInput input) Sets the parameters for TDLib initialization. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns an identifier uniquely determining type of the object.int
hashCode()
void
serialize
(DataOutput output) Serialize the TDLib classMethods inherited from class it.tdlight.jni.TdApi.Function
toString
Methods inherited from class it.tdlight.jni.TdApi.Object
serialize
-
Field Details
-
useTestDc
public boolean useTestDcPass true to use Telegram test environment instead of the production environment. -
databaseDirectory
The path to the directory for the persistent database; if empty, the current working directory will be used. -
filesDirectory
The path to the directory for storing files; if empty, databaseDirectory will be used. -
databaseEncryptionKey
public byte[] databaseEncryptionKeyEncryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned. -
useFileDatabase
public boolean useFileDatabasePass true to keep information about downloaded and uploaded files between application restarts. -
useChatInfoDatabase
public boolean useChatInfoDatabasePass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies useFileDatabase. -
useMessageDatabase
public boolean useMessageDatabasePass true to keep cache of chats and messages between restarts. Implies useChatInfoDatabase. -
useSecretChats
public boolean useSecretChatsPass true to enable support for secret chats. -
apiId
public int apiIdApplication identifier for Telegram API access, which can be obtained at https://my.telegram.org. -
apiHash
Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org. -
systemLanguageCode
IETF language tag of the user's operating system language; must be non-empty. -
deviceModel
Model of the device the application is being run on; must be non-empty. -
systemVersion
Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib. -
applicationVersion
Application version; must be non-empty. -
enableStorageOptimizer
public boolean enableStorageOptimizerPass true to automatically delete old files in background. -
ignoreFileNames
public boolean ignoreFileNamesPass 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 CONSTRUCTORIdentifier uniquely determining type of the object.- 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
- Pass true to use Telegram test environment instead of the production environment.databaseDirectory
- The path to the directory for the persistent database; if empty, the current working directory will be used.filesDirectory
- The path to the directory for storing files; if empty, databaseDirectory will be used.databaseEncryptionKey
- Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned.useFileDatabase
- Pass true to keep information about downloaded and uploaded files between application restarts.useChatInfoDatabase
- Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies useFileDatabase.useMessageDatabase
- Pass true to keep cache of chats and messages between restarts. Implies useChatInfoDatabase.useSecretChats
- Pass true to enable support for secret chats.apiId
- Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.apiHash
- Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.systemLanguageCode
- IETF language tag of the user's operating system language; must be non-empty.deviceModel
- Model of the device the application is being run on; must be non-empty.systemVersion
- Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib.applicationVersion
- Application version; must be non-empty.enableStorageOptimizer
- Pass true to automatically delete old files in background.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.Returns
Ok
-
SetTdlibParameters
Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters.Returns
Ok
- Parameters:
input
- Serialized input- Throws:
IOException
- the deserialization failed
-
-
Method Details
-
getConstructor
public int getConstructor()Description copied from class:TdApi.Object
Returns an identifier uniquely determining type of the object.- Specified by:
getConstructor
in classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-
serialize
Serialize the TDLib class- Specified by:
serialize
in classTdApi.Object
- Parameters:
output
- output data stream- Throws:
IOException
- the serialization failed
-
equals
-
hashCode
public int hashCode()
-