TDLib
Loading...
Searching...
No Matches
td::td_api::addFileToDownloads Class Referencefinal

Inherits td::td_api::Function.

Public Types

using ReturnType = object_ptr< file >
 Typedef for the type returned by the function.
 

Public Member Functions

 addFileToDownloads ()
 
 addFileToDownloads (int32 file_id_, int53 chat_id_, int53 message_id_, int32 priority_)
 
std::int32_t get_id () const final
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Member Functions inherited from td::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
 

Public Attributes

int32 file_id_
 Identifier of the file to download.
 
int53 chat_id_
 Chat identifier of the message with the file.
 
int53 message_id_
 Message identifier.
 
int32 priority_
 Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.
 

Static Public Attributes

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

Detailed Description

Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent from download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.

Returns object_ptr<File>.

Constructor & Destructor Documentation

◆ addFileToDownloads() [1/2]

td::td_api::addFileToDownloads::addFileToDownloads ( )

Default constructor for a function, which adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent from download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.

Returns object_ptr<File>.

◆ addFileToDownloads() [2/2]

td::td_api::addFileToDownloads::addFileToDownloads ( int32  file_id_,
int53  chat_id_,
int53  message_id_,
int32  priority_ 
)

Creates a function, which adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent from download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.

Returns object_ptr<File>.

Parameters
[in]file_id_Identifier of the file to download.
[in]chat_id_Chat identifier of the message with the file.
[in]message_id_Message identifier.
[in]priority_Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.

Member Function Documentation

◆ get_id()

std::int32_t td::td_api::addFileToDownloads::get_id ( ) const
inlinefinalvirtual

Returns identifier uniquely determining a type of the object.

Returns
this->ID.

Implements td::TlObject.

◆ store()

void td::td_api::addFileToDownloads::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 td::TlObject.


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