Module tdlight.api

Class TdApi.Session

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Session
Enclosing class:
TdApi

public static final class TdApi.Session extends TdApi.Object
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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    Telegram API identifier, as provided by the application.
    Name of the application, as provided by the application.
    The version of the application, as provided by the application.
    boolean
    True, if incoming calls can be accepted by the session.
    boolean
    True, if incoming secret chats can be accepted by the session.
    static final int
     
    A two-letter country code for the country from which the session was created, based on the IP address.
    Model of the device the application has been run or is running on, as provided by the application.
    long
    Session identifier.
    IP address from which the session was created, in human-readable format.
    boolean
    True, if this session is the current session.
    boolean
    True, if the application is an official application or uses the apiId of an official application.
    boolean
    True, if a 2-step verification password is needed to complete authorization of the session.
    int
    Point in time (Unix timestamp) when the session was last used.
    int
    Point in time (Unix timestamp) when the user has logged in.
    Operating system the application has been run or is running on, as provided by the application.
    Region code from which the session was created, based on the IP address.
    Version of the operating system the application has been run or is running on, as provided by the application.
    Session type based on the system and application version, which can be used to display a corresponding icon.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Contains information about one session in a Telegram application used by the current user.
    Session(long id, boolean isCurrent, boolean isPasswordPending, boolean canAcceptSecretChats, boolean canAcceptCalls, TdApi.SessionType type, int apiId, String applicationName, String applicationVersion, boolean isOfficialApplication, String deviceModel, String platform, String systemVersion, int logInDate, int lastActiveDate, String ip, String country, String region)
    Contains information about one session in a Telegram application used by the current user.
    Contains information about one session in a Telegram application used by the current user.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    int
     
    void
     

    Methods inherited from class it.tdlight.jni.TdApi.Object

    serialize, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • id

      public long id
      Session identifier.
    • isCurrent

      public boolean isCurrent
      True, if this session is the current session.
    • isPasswordPending

      public boolean isPasswordPending
      True, if a 2-step verification password is needed to complete authorization of the session.
    • canAcceptSecretChats

      public boolean canAcceptSecretChats
      True, if incoming secret chats can be accepted by the session.
    • canAcceptCalls

      public boolean canAcceptCalls
      True, if incoming calls can be accepted by the session.
    • type

      public TdApi.SessionType type
      Session type based on the system and application version, which can be used to display a corresponding icon.
    • apiId

      public int apiId
      Telegram API identifier, as provided by the application.
    • applicationName

      public String applicationName
      Name of the application, as provided by the application.
    • applicationVersion

      public String applicationVersion
      The version of the application, as provided by the application.
    • isOfficialApplication

      public boolean isOfficialApplication
      True, if the application is an official application or uses the apiId of an official application.
    • deviceModel

      public String deviceModel
      Model of the device the application has been run or is running on, as provided by the application.
    • platform

      public String platform
      Operating system the application has been run or is running on, as provided by the application.
    • systemVersion

      public String systemVersion
      Version of the operating system the application has been run or is running on, as provided by the application.
    • logInDate

      public int logInDate
      Point in time (Unix timestamp) when the user has logged in.
    • lastActiveDate

      public int lastActiveDate
      Point in time (Unix timestamp) when the session was last used.
    • ip

      public String ip
      IP address from which the session was created, in human-readable format.
    • country

      public String country
      A two-letter country code for the country from which the session was created, based on the IP address.
    • region

      public String region
      Region code from which the session was created, based on the IP address.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      See Also:
  • Constructor Details

    • Session

      public 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

      public Session(long id, boolean isCurrent, boolean isPasswordPending, boolean canAcceptSecretChats, boolean canAcceptCalls, TdApi.SessionType type, int apiId, String applicationName, String applicationVersion, boolean isOfficialApplication, String deviceModel, String platform, String systemVersion, int logInDate, int lastActiveDate, String ip, String country, String 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:
      id - long Session identifier.
      isCurrent - boolean True, if this session is the current session.
      isPasswordPending - boolean True, if a 2-step verification password is needed to complete authorization of the session.
      canAcceptSecretChats - boolean True, if incoming secret chats can be accepted by the session.
      canAcceptCalls - boolean True, if incoming calls can be accepted by the session.
      type - SessionType Session type based on the system and application version, which can be used to display a corresponding icon.
      apiId - int Telegram API identifier, as provided by the application.
      applicationName - String Name of the application, as provided by the application.
      applicationVersion - String The version of the application, as provided by the application.
      isOfficialApplication - boolean True, if the application is an official application or uses the apiId of an official application.
      deviceModel - String Model of the device the application has been run or is running on, as provided by the application.
      platform - String Operating system the application has been run or is running on, as provided by the application.
      systemVersion - String Version of the operating system the application has been run or is running on, as provided by the application.
      logInDate - int Point in time (Unix timestamp) when the user has logged in.
      lastActiveDate - int Point in time (Unix timestamp) when the session was last used.
      ip - String IP address from which the session was created, in human-readable format.
      country - String A two-letter country code for the country from which the session was created, based on the IP address.
      region - String Region code from which the session was created, based on the IP address.
    • Session

      public Session(DataInput input) throws IOException
      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.
      Throws:
      IOException
  • Method Details