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

Inherits Object.

Description

Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.

Public Fields

int64 id_
 Session identifier.
 
bool is_current_
 True, if this session is the current session.
 
bool is_password_pending_
 True, if a 2-step verification password is needed to complete authorization of the session.
 
bool is_unconfirmed_
 True, if the session wasn't confirmed from another session.
 
bool can_accept_secret_chats_
 True, if incoming secret chats can be accepted by the session.
 
bool can_accept_calls_
 True, if incoming calls can be accepted by the session.
 
object_ptr< SessionTypetype_
 Session type based on the system and application version, which can be used to display a corresponding icon.
 
int32 api_id_
 Telegram API identifier, as provided by the application.
 
string application_name_
 Name of the application, as provided by the application.
 
string application_version_
 The version of the application, as provided by the application.
 
bool is_official_application_
 True, if the application is an official application or uses the api_id of an official application.
 
string device_model_
 Model of the device the application has been run or is running on, as provided by the application.
 
string platform_
 Operating system the application has been run or is running on, as provided by the application.
 
string system_version_
 Version of the operating system the application has been run or is running on, as provided by the application.
 
int32 log_in_date_
 Point in time (Unix timestamp) when the user has logged in.
 
int32 last_active_date_
 Point in time (Unix timestamp) when the session was last used.
 
string ip_address_
 IP address from which the session was created, in human-readable format.
 
string location_
 A human-readable description of the location from which the session was created, based on the IP address.
 

Public Instance Methods

 session ()
 
 session (int64 id_, bool is_current_, bool is_password_pending_, bool is_unconfirmed_, bool can_accept_secret_chats_, bool can_accept_calls_, object_ptr< SessionType > &&type_, int32 api_id_, string const &application_name_, string const &application_version_, bool is_official_application_, string const &device_model_, string const &platform_, string const &system_version_, int32 log_in_date_, int32 last_active_date_, string const &ip_address_, string const &location_)
 
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 = 158702140
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ session() [1/2]

session ( )

Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.

◆ session() [2/2]

session ( int64  id_,
bool  is_current_,
bool  is_password_pending_,
bool  is_unconfirmed_,
bool  can_accept_secret_chats_,
bool  can_accept_calls_,
object_ptr< SessionType > &&  type_,
int32  api_id_,
string const &  application_name_,
string const &  application_version_,
bool  is_official_application_,
string const &  device_model_,
string const &  platform_,
string const &  system_version_,
int32  log_in_date_,
int32  last_active_date_,
string const &  ip_address_,
string const &  location_ 
)

Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.

Parameters
[in]id_Session identifier.
[in]is_current_True, if this session is the current session.
[in]is_password_pending_True, if a 2-step verification password is needed to complete authorization of the session.
[in]is_unconfirmed_True, if the session wasn't confirmed from another session.
[in]can_accept_secret_chats_True, if incoming secret chats can be accepted by the session.
[in]can_accept_calls_True, if incoming calls can be accepted by the session.
[in]type_Session type based on the system and application version, which can be used to display a corresponding icon.
[in]api_id_Telegram API identifier, as provided by the application.
[in]application_name_Name of the application, as provided by the application.
[in]application_version_The version of the application, as provided by the application.
[in]is_official_application_True, if the application is an official application or uses the api_id of an official application.
[in]device_model_Model of the device the application has been run or is running on, as provided by the application.
[in]platform_Operating system the application has been run or is running on, as provided by the application.
[in]system_version_Version of the operating system the application has been run or is running on, as provided by the application.
[in]log_in_date_Point in time (Unix timestamp) when the user has logged in.
[in]last_active_date_Point in time (Unix timestamp) when the session was last used.
[in]ip_address_IP address from which the session was created, in human-readable format.
[in]location_A human-readable description of the location from which the session was created, based on the IP address.

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: