TDLib
Loading...
Searching...
No Matches
linkPreviewOptions Class Referencefinal

Inherits Object.

Description

Options to be used for generation of a link preview.

Public Member Functions

 linkPreviewOptions ()
 linkPreviewOptions (bool is_disabled_, string const &url_, bool force_small_media_, bool force_large_media_, bool show_above_text_)
void store (TlStorerToString &s, const char *field_name) const final
Public Member Functions inherited from TlObject
TlObject & operator= (const TlObject &)=delete
TlObject & operator= (TlObject &&)=default
virtual void store (TlStorerCalcLength &s) const
virtual void store (TlStorerUnsafe &s) const
 TlObject ()=default
 TlObject (const TlObject &)=delete
 TlObject (TlObject &&)=default
virtual ~TlObject ()=default

Public Attributes

bool force_large_media_
 True, if shown media preview must be large; ignored in secret chats or if the URL isn't explicitly specified.
bool force_small_media_
 True, if shown media preview must be small; ignored in secret chats or if the URL isn't explicitly specified.
bool is_disabled_
 True, if link preview must be disabled.
bool show_above_text_
 True, if link preview must be shown above message text; otherwise, the link preview will be shown below the message text; ignored in secret chats.
string url_
 URL to use for link preview. If empty, then the first URL found in the message text will be used.

Static Public Attributes

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

Constructor & Destructor Documentation

◆ linkPreviewOptions() [1/2]

linkPreviewOptions ( )

Options to be used for generation of a link preview.

◆ linkPreviewOptions() [2/2]

linkPreviewOptions ( bool is_disabled_,
string const & url_,
bool force_small_media_,
bool force_large_media_,
bool show_above_text_ )

Options to be used for generation of a link preview.

Parameters
[in]is_disabled_True, if link preview must be disabled.
[in]url_URL to use for link preview. If empty, then the first URL found in the message text will be used.
[in]force_small_media_True, if shown media preview must be small; ignored in secret chats or if the URL isn't explicitly specified.
[in]force_large_media_True, if shown media preview must be large; ignored in secret chats or if the URL isn't explicitly specified.
[in]show_above_text_True, if link preview must be shown above message text; otherwise, the link preview will be shown below the message text; ignored in secret chats.

Member Function 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: