tdlib-obf API
Reference documentation for the public tdlib-obf API, generated from TDLib schemas and public headers
Loading...
Searching...
No Matches
td::td_api::optimizeStorage Class Referencefinal

#include </home/runner/work/tdlib-obf/tdlib-obf/td/generate/auto/td/telegram/td_api.h>

Inheritance diagram for td::td_api::optimizeStorage:
td::td_api::Function td::TlObject

Public Types

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

Public Member Functions

 optimizeStorage ()
 
 optimizeStorage (int53 size_, int32 ttl_, int32 count_, int32 immunity_delay_, array< object_ptr< FileType > > &&file_types_, array< int53 > &&chat_ids_, array< int53 > &&exclude_chat_ids_, bool return_deleted_file_statistics_, int32 chat_limit_)
 
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

int53 size_
 Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.
 
int32 ttl_
 Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit.
 
int32 count_
 Limit on the total number of files after deletion. Pass -1 to use the default limit.
 
int32 immunity_delay_
 The amount of time after the creation of a file during which it can&#x27;t be deleted, in seconds. Pass -1 to use the default value.
 
array< object_ptr< FileType > > file_types_
 If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted.
 
array< int53chat_ids_
 If non-empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos).
 
array< int53exclude_chat_ids_
 If non-empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos).
 
bool return_deleted_file_statistics_
 Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics.
 
int32 chat_limit_
 Same as in getStorageStatistics. Affects only returned statistics.
 

Static Public Attributes

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

Detailed Description

Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can&#x27;t be deleted.

Returns object_ptr<StorageStatistics>.

Definition at line 117816 of file td_api.h.

Member Typedef Documentation

◆ ReturnType

Typedef for the type returned by the function.

Definition at line 117873 of file td_api.h.

Constructor & Destructor Documentation

◆ optimizeStorage() [1/2]

td::td_api::optimizeStorage::optimizeStorage ( )

Default constructor for a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can&#x27;t be deleted.

Returns object_ptr<StorageStatistics>.

◆ optimizeStorage() [2/2]

td::td_api::optimizeStorage::optimizeStorage ( int53  size_,
int32  ttl_,
int32  count_,
int32  immunity_delay_,
array< object_ptr< FileType > > &&  file_types_,
array< int53 > &&  chat_ids_,
array< int53 > &&  exclude_chat_ids_,
bool  return_deleted_file_statistics_,
int32  chat_limit_ 
)

Creates a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can&#x27;t be deleted.

Returns object_ptr<StorageStatistics>.

Parameters
[in]size_Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.
[in]ttl_Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit.
[in]count_Limit on the total number of files after deletion. Pass -1 to use the default limit.
[in]immunity_delay_The amount of time after the creation of a file during which it can&#x27;t be deleted, in seconds. Pass -1 to use the default value.
[in]file_types_If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted.
[in]chat_ids_If non-empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos).
[in]exclude_chat_ids_If non-empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos).
[in]return_deleted_file_statistics_Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics.
[in]chat_limit_Same as in getStorageStatistics. Affects only returned statistics.

Member Function Documentation

◆ store()

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

Member Data Documentation

◆ chat_ids_

array<int53> td::td_api::optimizeStorage::chat_ids_

If non-empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos).

Definition at line 117837 of file td_api.h.

◆ chat_limit_

int32 td::td_api::optimizeStorage::chat_limit_

Same as in getStorageStatistics. Affects only returned statistics.

Definition at line 117843 of file td_api.h.

◆ count_

int32 td::td_api::optimizeStorage::count_

Limit on the total number of files after deletion. Pass -1 to use the default limit.

Definition at line 117831 of file td_api.h.

◆ exclude_chat_ids_

array<int53> td::td_api::optimizeStorage::exclude_chat_ids_

If non-empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos).

Definition at line 117839 of file td_api.h.

◆ file_types_

array<object_ptr<FileType> > td::td_api::optimizeStorage::file_types_

If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted.

Definition at line 117835 of file td_api.h.

◆ ID

const std::int32_t td::td_api::optimizeStorage::ID = 853186759
static

Identifier uniquely determining a type of the object.

Definition at line 117870 of file td_api.h.

◆ immunity_delay_

int32 td::td_api::optimizeStorage::immunity_delay_

The amount of time after the creation of a file during which it can&#x27;t be deleted, in seconds. Pass -1 to use the default value.

Definition at line 117833 of file td_api.h.

◆ return_deleted_file_statistics_

bool td::td_api::optimizeStorage::return_deleted_file_statistics_

Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics.

Definition at line 117841 of file td_api.h.

◆ size_

int53 td::td_api::optimizeStorage::size_

Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit.

Definition at line 117827 of file td_api.h.

◆ ttl_

int32 td::td_api::optimizeStorage::ttl_

Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit.

Definition at line 117829 of file td_api.h.


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