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

Inherits Object.

Description

Describes a link preview.

Public Member Functions

 linkPreview ()
 linkPreview (string const &url_, string const &display_url_, string const &site_name_, string const &title_, object_ptr< formattedText > &&description_, string const &author_, object_ptr< LinkPreviewType > &&type_, bool has_large_media_, bool show_large_media_, bool show_media_above_description_, bool skip_confirmation_, bool show_above_text_, int32 instant_view_version_)
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

string author_
 Author of the content.
object_ptr< formattedText > description_
 Description of the content.
string display_url_
 URL to display.
bool has_large_media_
 True, if size of media in the preview can be changed.
int32 instant_view_version_
 Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.
bool show_above_text_
 True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.
bool show_large_media_
 True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos.
bool show_media_above_description_
 True, if media must be shown above link preview description; otherwise, the media must be shown below the description.
string site_name_
 Short name of the website (e.g., Google Docs, App Store).
bool skip_confirmation_
 True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear.
string title_
 Title of the content.
object_ptr< LinkPreviewType > type_
 Type of the link preview.
string url_
 Original URL of the link.

Static Public Attributes

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

Constructor & Destructor Documentation

◆ linkPreview() [1/2]

linkPreview ( )

Describes a link preview.

◆ linkPreview() [2/2]

linkPreview ( string const & url_,
string const & display_url_,
string const & site_name_,
string const & title_,
object_ptr< formattedText > && description_,
string const & author_,
object_ptr< LinkPreviewType > && type_,
bool has_large_media_,
bool show_large_media_,
bool show_media_above_description_,
bool skip_confirmation_,
bool show_above_text_,
int32 instant_view_version_ )

Describes a link preview.

Parameters
[in]url_Original URL of the link.
[in]display_url_URL to display.
[in]site_name_Short name of the website (e.g., Google Docs, App Store).
[in]title_Title of the content.
[in]description_Description of the content.
[in]author_Author of the content.
[in]type_Type of the link preview.
[in]has_large_media_True, if size of media in the preview can be changed.
[in]show_large_media_True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos.
[in]show_media_above_description_True, if media must be shown above link preview description; otherwise, the media must be shown below the description.
[in]skip_confirmation_True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear.
[in]show_above_text_True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.
[in]instant_view_version_Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.

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: