Inherits td::td_api::Function.
|
using | ReturnType = object_ptr< ok > |
| Typedef for the type returned by the function.
|
|
|
| setTdlibParameters () |
|
| setTdlibParameters (bool use_test_dc_, string const &database_directory_, string const &files_directory_, bytes const &database_encryption_key_, bool use_file_database_, bool use_chat_info_database_, bool use_message_database_, bool use_secret_chats_, int32 api_id_, string const &api_hash_, string const &system_language_code_, string const &device_model_, string const &system_version_, string const &application_version_, bool enable_storage_optimizer_, bool ignore_file_names_) |
|
std::int32_t | get_id () const final |
|
void | store (TlStorerToString &s, const char *field_name) const final |
|
virtual void | store (TlStorerUnsafe &s) const |
|
virtual void | store (TlStorerCalcLength &s) const |
|
| TlObject ()=default |
|
| TlObject (const TlObject &)=delete |
|
TlObject & | operator= (const TlObject &)=delete |
|
| TlObject (TlObject &&)=default |
|
TlObject & | operator= (TlObject &&)=default |
|
virtual | ~TlObject ()=default |
|
|
bool | use_test_dc_ |
| Pass true to use Telegram test environment instead of the production environment.
|
|
string | database_directory_ |
| The path to the directory for the persistent database; if empty, the current working directory will be used.
|
|
string | files_directory_ |
| The path to the directory for storing files; if empty, database_directory will be used.
|
|
bytes | database_encryption_key_ |
| Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned.
|
|
bool | use_file_database_ |
| Pass true to keep information about downloaded and uploaded files between application restarts.
|
|
bool | use_chat_info_database_ |
| Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies use_file_database.
|
|
bool | use_message_database_ |
| Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database.
|
|
bool | use_secret_chats_ |
| Pass true to enable support for secret chats.
|
|
int32 | api_id_ |
| Application identifier for Telegram API access, which can be obtained at https://my.telegram.org.
|
|
string | api_hash_ |
| Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org.
|
|
string | system_language_code_ |
| IETF language tag of the user's operating system language; must be non-empty.
|
|
string | device_model_ |
| Model of the device the application is being run on; must be non-empty.
|
|
string | system_version_ |
| Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib.
|
|
string | application_version_ |
| Application version; must be non-empty.
|
|
bool | enable_storage_optimizer_ |
| Pass true to automatically delete old files in background.
|
|
bool | ignore_file_names_ |
| 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.
|
|
|
static const std::int32_t | ID = 1384743481 |
| Identifier uniquely determining a type of the object.
|
|
Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters.
Returns object_ptr<Ok>.
◆ setTdlibParameters() [1/2]
td::td_api::setTdlibParameters::setTdlibParameters |
( |
| ) |
|
Default constructor for a function, which sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters.
Returns object_ptr<Ok>.
◆ setTdlibParameters() [2/2]
td::td_api::setTdlibParameters::setTdlibParameters |
( |
bool |
use_test_dc_, |
|
|
string const & |
database_directory_, |
|
|
string const & |
files_directory_, |
|
|
bytes const & |
database_encryption_key_, |
|
|
bool |
use_file_database_, |
|
|
bool |
use_chat_info_database_, |
|
|
bool |
use_message_database_, |
|
|
bool |
use_secret_chats_, |
|
|
int32 |
api_id_, |
|
|
string const & |
api_hash_, |
|
|
string const & |
system_language_code_, |
|
|
string const & |
device_model_, |
|
|
string const & |
system_version_, |
|
|
string const & |
application_version_, |
|
|
bool |
enable_storage_optimizer_, |
|
|
bool |
ignore_file_names_ |
|
) |
| |
Creates a function, which sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters.
Returns object_ptr<Ok>.
- Parameters
-
[in] | use_test_dc_ | Pass true to use Telegram test environment instead of the production environment. |
[in] | database_directory_ | The path to the directory for the persistent database; if empty, the current working directory will be used. |
[in] | files_directory_ | The path to the directory for storing files; if empty, database_directory will be used. |
[in] | database_encryption_key_ | Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned. |
[in] | use_file_database_ | Pass true to keep information about downloaded and uploaded files between application restarts. |
[in] | use_chat_info_database_ | Pass true to keep cache of users, basic groups, supergroups, channels and secret chats between restarts. Implies use_file_database. |
[in] | use_message_database_ | Pass true to keep cache of chats and messages between restarts. Implies use_chat_info_database. |
[in] | use_secret_chats_ | Pass true to enable support for secret chats. |
[in] | api_id_ | Application identifier for Telegram API access, which can be obtained at https://my.telegram.org. |
[in] | api_hash_ | Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org. |
[in] | system_language_code_ | IETF language tag of the user's operating system language; must be non-empty. |
[in] | device_model_ | Model of the device the application is being run on; must be non-empty. |
[in] | system_version_ | Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib. |
[in] | application_version_ | Application version; must be non-empty. |
[in] | enable_storage_optimizer_ | Pass true to automatically delete old files in background. |
[in] | ignore_file_names_ | 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. |
◆ get_id()
std::int32_t td::td_api::setTdlibParameters::get_id |
( |
| ) |
const |
|
inlinefinalvirtual |
Returns identifier uniquely determining a type of the object.
- Returns
- this->ID.
Implements td::TlObject.
◆ store()
void td::td_api::setTdlibParameters::store |
( |
TlStorerToString & |
s, |
|
|
const char * |
field_name |
|
) |
| const |
|
finalvirtual |
Helper function for to_string method. Appends string representation of the object to the storer.
- Parameters
-
[in] | s | Storer to which object string representation will be appended. |
[in] | field_name | Object field_name if applicable. |
Implements td::TlObject.
The documentation for this class was generated from the following file: