java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Session
- Enclosing class:
- TdApi
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
Modifier and TypeFieldDescriptionint
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
Identifier uniquely determining type of the object.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.boolean
True, if the session wasn't confirmed from another session.int
Point in time (Unix timestamp) when the session was last used.A human-readable description of the location from which the session was created, based on the IP address.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.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
ConstructorDescriptionSession()
Contains information about one session in a Telegram application used by the current user.Session
(long id, boolean isCurrent, boolean isPasswordPending, boolean isUnconfirmed, 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 ipAddress, String location) 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 TypeMethodDescriptionboolean
int
Returns an identifier uniquely determining type of the object.int
hashCode()
void
serialize
(DataOutput output) Serialize the TDLib classMethods inherited from class it.tdlight.jni.TdApi.Object
serialize, toString
-
Field Details
-
id
public long idSession identifier. -
isCurrent
public boolean isCurrentTrue, if this session is the current session. -
isPasswordPending
public boolean isPasswordPendingTrue, if a 2-step verification password is needed to complete authorization of the session. -
isUnconfirmed
public boolean isUnconfirmedTrue, if the session wasn't confirmed from another session. -
canAcceptSecretChats
public boolean canAcceptSecretChatsTrue, if incoming secret chats can be accepted by the session. -
canAcceptCalls
public boolean canAcceptCallsTrue, if incoming calls can be accepted by the session. -
type
Session type based on the system and application version, which can be used to display a corresponding icon. -
apiId
public int apiIdTelegram API identifier, as provided by the application. -
applicationName
Name of the application, as provided by the application. -
applicationVersion
The version of the application, as provided by the application. -
isOfficialApplication
public boolean isOfficialApplicationTrue, if the application is an official application or uses the apiId of an official application. -
deviceModel
Model of the device the application has been run or is running on, as provided by the application. -
platform
Operating system the application has been run or is running on, as provided by the application. -
systemVersion
Version of the operating system the application has been run or is running on, as provided by the application. -
logInDate
public int logInDatePoint in time (Unix timestamp) when the user has logged in. -
lastActiveDate
public int lastActiveDatePoint in time (Unix timestamp) when the session was last used. -
ipAddress
IP address from which the session was created, in human-readable format. -
location
A human-readable description of the location from which the session was created, based on the IP address. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- 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 isUnconfirmed, 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 ipAddress, String 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:
id
- Session identifier.isCurrent
- True, if this session is the current session.isPasswordPending
- True, if a 2-step verification password is needed to complete authorization of the session.isUnconfirmed
- True, if the session wasn't confirmed from another session.canAcceptSecretChats
- True, if incoming secret chats can be accepted by the session.canAcceptCalls
- True, if incoming calls can be accepted by the session.type
- Session type based on the system and application version, which can be used to display a corresponding icon.apiId
- Telegram API identifier, as provided by the application.applicationName
- Name of the application, as provided by the application.applicationVersion
- The version of the application, as provided by the application.isOfficialApplication
- True, if the application is an official application or uses the apiId of an official application.deviceModel
- Model of the device the application has been run or is running on, as provided by the application.platform
- Operating system the application has been run or is running on, as provided by the application.systemVersion
- Version of the operating system the application has been run or is running on, as provided by the application.logInDate
- Point in time (Unix timestamp) when the user has logged in.lastActiveDate
- Point in time (Unix timestamp) when the session was last used.ipAddress
- IP address from which the session was created, in human-readable format.location
- A human-readable description of the location from which the session was created, based on the IP address.
-
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.- Parameters:
input
- Serialized input- Throws:
IOException
- the deserialization failed
-
-
Method Details
-
getConstructor
public int getConstructor()Description copied from class:TdApi.Object
Returns an identifier uniquely determining type of the object.- Specified by:
getConstructor
in classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-
serialize
Serialize the TDLib class- Specified by:
serialize
in classTdApi.Object
- Parameters:
output
- output data stream- Throws:
IOException
- the serialization failed
-
equals
-
hashCode
public int hashCode()
-