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

Inherits Function.

Description

Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.

Returns object_ptr<File>.

Public Fields

int32 file_id_
 Identifier of the file to download.
 
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 was called will be downloaded first.
 
int32 offset_
 The starting position from which the file needs to be downloaded.
 
int32 limit_
 Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit.
 
bool synchronous_
 If false, this request returns file state just after the download has been started. If true, this request returns file state only after the download has succeeded, has failed, has been canceled or a new downloadFile request with different offset/limit parameters was sent.
 

Public Types

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

Public Instance Methods

 downloadFile ()
 
 downloadFile (int32 file_id_, int32 priority_, int32 offset_, int32 limit_, bool synchronous_)
 
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 = -1102026662
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ downloadFile() [1/2]

Default constructor for a function, which downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.

Returns object_ptr<File>.

◆ downloadFile() [2/2]

downloadFile ( int32  file_id_,
int32  priority_,
int32  offset_,
int32  limit_,
bool  synchronous_ 
)

Creates a function, which downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.

Returns object_ptr<File>.

Parameters
[in]file_id_Identifier of the file to download.
[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 was called will be downloaded first.
[in]offset_The starting position from which the file needs to be downloaded.
[in]limit_Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit.
[in]synchronous_If false, this request returns file state just after the download has been started. If true, this request returns file state only after the download has succeeded, has failed, has been canceled or a new downloadFile request with different offset/limit parameters was sent.

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: