Class: MockLoginManager
Mock of the X-Ray engine multiplayer login_manager.
Implements
login_manager
Constructors
Constructor
new MockLoginManager(): MockLoginManager;Returns
MockLoginManager
Methods
create()
static create(): MockLoginManager;Returns
MockLoginManager
mock()
static mock(): login_manager;Returns
login_manager
Properties
email
email: string = "";forgot_password
forgot_password: Mock<UnknownFunction>;Open the password recovery URL through the engine.
Param
url
Recovery page URL.
Implementation of
login_manager.forgot_passwordget_current_profile
get_current_profile: Mock<() => null>;Get the current logged-in profile.
Remarks
Offline login also creates a profile object, but it is not an online GameSpy session.
Returns
Current logged-in profile, or null when offline.
Implementation of
login_manager.get_current_profileget_email_from_registry
get_email_from_registry: Mock<() => string>;Returns
Saved email from registry.
Implementation of
login_manager.get_email_from_registryget_nick_from_registry
get_nick_from_registry: Mock<() => string>;Returns
Saved nick from registry.
Implementation of
login_manager.get_nick_from_registryget_password_from_registry
get_password_from_registry: Mock<() => string>;Returns
Saved password from registry.
Implementation of
login_manager.get_password_from_registryget_remember_me_from_registry
get_remember_me_from_registry: Mock<() => boolean>;Returns
Saved remember-me flag.
Implementation of
login_manager.get_remember_me_from_registrylogin
login: Mock<UnknownFunction>;Log in to a GameSpy account.
Remarks
Starts an asynchronous login. If another profile is already active, native code reports that logout is needed first.
Param
Account email.
Param
profile
Profile nick.
Param
password
Account password.
Param
cb
Completion callback.
Implementation of
login_manager.loginlogin_offline
login_offline: Mock<UnknownFunction>;Create an offline login profile.
Remarks
Rejects empty or whitespace-only nicknames. Does not contact GameSpy.
Param
nick
Offline nick.
Param
cb
Completion callback.
Implementation of
login_manager.login_offlinelogout
logout: Mock<UnknownFunction>;Log out and clear current profile state.
Remarks
Online profiles disconnect from GameSpy. Any account-manager requests tied to the session may need to be restarted afterward.
Implementation of
login_manager.logoutnick
nick: string = "";password
password: string = "";rememberMe
rememberMe: boolean = false;save_email_to_registry
save_email_to_registry: Mock<(email: string) => void>;Save account email to registry.
Implementation of
login_manager.save_email_to_registrysave_nick_to_registry
save_nick_to_registry: Mock<(nick: string) => void>;Save nick to registry.
Implementation of
login_manager.save_nick_to_registrysave_password_to_registry
save_password_to_registry: Mock<(password: string) => void>;Save password to registry.
Implementation of
login_manager.save_password_to_registrysave_remember_me_to_registry
save_remember_me_to_registry: Mock<(rememberMe: boolean) => void>;Save remember-me flag to registry.
Implementation of
login_manager.save_remember_me_to_registryset_unique_nick
set_unique_nick: Mock<UnknownFunction>;Change the unique nick for the current profile.
Remarks
Requires a current profile and a non-empty unique nick. Offline profiles update locally; online profiles send a GameSpy request.
Param
nick
New unique nick.
Param
cb
Completion callback.
Implementation of
login_manager.set_unique_nickstop_login
stop_login: Mock<UnknownFunction>;Stop the active login request.
Remarks
Safe to call when no login is active.
Implementation of
login_manager.stop_loginstop_setting_unique_nick
stop_setting_unique_nick: Mock<UnknownFunction>;Stop the active unique-nick change request.
Remarks
Safe to call when no unique-nick request is active.
Implementation of
login_manager.stop_setting_unique_nick