List of all members | Public Fields | Public Instance Methods | Static Public Attributes
tdlibParameters Class Referencefinal

Inherits Object.

Description

Contains parameters for TDLib initialization.

Public Fields

bool use_test_dc_
 If set to true, the Telegram test environment will be used 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.
 
bool use_file_database_
 If set to true, information about downloaded and uploaded files will be saved between application restarts.
 
bool use_chat_info_database_
 If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database.
 
bool use_message_database_
 If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database.
 
bool use_secret_chats_
 If set to true, support for secret chats will be enabled.
 
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_
 If set to true, old files will automatically be deleted.
 
bool ignore_file_names_
 If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name.
 

Public Instance Methods

 tdlibParameters ()
 
 tdlibParameters (bool use_test_dc_, string const &database_directory_, string const &files_directory_, 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
 
- Public Instance Methods inherited from TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Static Public Attributes

static const std::int32_t ID = -761520773
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ tdlibParameters() [1/2]

Contains parameters for TDLib initialization.

◆ tdlibParameters() [2/2]

tdlibParameters ( bool  use_test_dc_,
string const &  database_directory_,
string const &  files_directory_,
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_ 
)

Contains parameters for TDLib initialization.

Parameters
[in]use_test_dc_If set to true, the Telegram test environment will be used 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]use_file_database_If set to true, information about downloaded and uploaded files will be saved between application restarts.
[in]use_chat_info_database_If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database.
[in]use_message_database_If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database.
[in]use_secret_chats_If set to true, support for secret chats will be enabled.
[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_If set to true, old files will automatically be deleted.
[in]ignore_file_names_If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name.

Method Documentation

◆ get_id()

std::int32_t get_id ( ) const
inlinefinalvirtual

Returns identifier uniquely determining a type of the object.

Returns
this->ID.

Implements TlObject.

◆ store()

void 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]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: