Nakama C++ Client SDK 2.5.1
Client for Nakama Server
NSessionInterface Class Referenceabstract

#include <NSessionInterface.h>

Public Member Functions

virtual ~NSessionInterface ()
 
virtual const std::string & getAuthToken () const =0
 
virtual bool isCreated () const =0
 
virtual const std::string & getUsername () const =0
 
virtual const std::string & getUserId () const =0
 
virtual NTimestamp getCreateTime () const =0
 
virtual NTimestamp getExpireTime () const =0
 
virtual bool isExpired () const =0
 
virtual bool isExpired (NTimestamp now) const =0
 
virtual const NStringMapgetVariables () const =0
 
virtual std::string getVariable (const std::string &name) const =0
 

Constructor & Destructor Documentation

◆ ~NSessionInterface()

virtual NSessionInterface::~NSessionInterface ( )
inlinevirtual

Member Function Documentation

◆ getAuthToken()

virtual const std::string & NSessionInterface::getAuthToken ( ) const
pure virtual
Returns
The authentication token used to construct this session.

◆ getCreateTime()

virtual NTimestamp NSessionInterface::getCreateTime ( ) const
pure virtual
Returns
The timestamp in milliseconds when this session object was created.

◆ getExpireTime()

virtual NTimestamp NSessionInterface::getExpireTime ( ) const
pure virtual
Returns
The timestamp in milliseconds when this session will expire.

◆ getUserId()

virtual const std::string & NSessionInterface::getUserId ( ) const
pure virtual
Returns
The ID of the user who owns this session.

◆ getUsername()

virtual const std::string & NSessionInterface::getUsername ( ) const
pure virtual
Returns
The username of the user who owns this session.

◆ getVariable()

virtual std::string NSessionInterface::getVariable ( const std::string &  name) const
pure virtual

Get session variable value by name.

Returns
variable value.

◆ getVariables()

virtual const NStringMap & NSessionInterface::getVariables ( ) const
pure virtual

Get session variables.

Returns
NStringMap.

◆ isCreated()

virtual bool NSessionInterface::isCreated ( ) const
pure virtual
Returns
True if the user account for this session was just created.

◆ isExpired() [1/2]

virtual bool NSessionInterface::isExpired ( ) const
pure virtual
Returns
True if the session has expired against the current time.

◆ isExpired() [2/2]

virtual bool NSessionInterface::isExpired ( NTimestamp  now) const
pure virtual

Check if the session has expired against the input time.

Parameters
nowThe time to compare against the session. Use getUnixTimestampMs() to get current time.
Returns
true if the session has expired.

The documentation for this class was generated from the following file: