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 password is needed to complete authorization of the 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.
 
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_
 IP address from which the session was created, in human-readable format.
 
string country_
 A two-letter country code for the country from which the session was created, based on the IP address.
 
string region_
 Region code 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 can_accept_secret_chats_, bool can_accept_calls_, 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_, string const &country_, string const &region_)
 
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 = 1068672887
 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  can_accept_secret_chats_,
bool  can_accept_calls_,
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_,
string const &  country_,
string const &  region_ 
)

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 password is needed to complete authorization of the 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]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_IP address from which the session was created, in human-readable format.
[in]country_A two-letter country code for the country from which the session was created, based on the IP address.
[in]region_Region code from which the session was created, based on the IP address.

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: