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

Inherits Function.

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 of 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>.

Public Fields

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.
 

Public Types

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

Public Instance Methods

 addFileToDownloads ()
 
 addFileToDownloads (int32 file_id_, int53 chat_id_, int53 message_id_, int32 priority_)
 
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 = 867533751
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ addFileToDownloads() [1/2]

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 of 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]

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 of 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.

Method Documentation

◆ 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: