Skip to content

Class: MockLoginManager ​

Mock of the X-Ray engine multiplayer login_manager.

Implements ​

  • login_manager

Constructors ​

Constructor ​

ts
new MockLoginManager(): MockLoginManager;

Returns ​

MockLoginManager

Methods ​

create() ​

ts
static create(): MockLoginManager;

Returns ​

MockLoginManager


mock() ​

ts
static mock(): login_manager;

Returns ​

login_manager

Properties ​

email ​

ts
email: string = "";

forgot_password ​

ts
forgot_password: Mock<UnknownFunction>;

Open the password recovery URL through the engine.

Param ​

url

Recovery page URL.

Implementation of ​

ts
login_manager.forgot_password

get_current_profile ​

ts
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 ​

ts
login_manager.get_current_profile

get_email_from_registry ​

ts
get_email_from_registry: Mock<() => string>;

Returns ​

Saved email from registry.

Implementation of ​

ts
login_manager.get_email_from_registry

get_nick_from_registry ​

ts
get_nick_from_registry: Mock<() => string>;

Returns ​

Saved nick from registry.

Implementation of ​

ts
login_manager.get_nick_from_registry

get_password_from_registry ​

ts
get_password_from_registry: Mock<() => string>;

Returns ​

Saved password from registry.

Implementation of ​

ts
login_manager.get_password_from_registry

get_remember_me_from_registry ​

ts
get_remember_me_from_registry: Mock<() => boolean>;

Returns ​

Saved remember-me flag.

Implementation of ​

ts
login_manager.get_remember_me_from_registry

login ​

ts
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 ​

mail

Account email.

Param ​

profile

Profile nick.

Param ​

password

Account password.

Param ​

cb

Completion callback.

Implementation of ​

ts
login_manager.login

login_offline ​

ts
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 ​

ts
login_manager.login_offline

logout ​

ts
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 ​

ts
login_manager.logout

nick ​

ts
nick: string = "";

password ​

ts
password: string = "";

rememberMe ​

ts
rememberMe: boolean = false;

save_email_to_registry ​

ts
save_email_to_registry: Mock<(email: string) => void>;

Save account email to registry.

Implementation of ​

ts
login_manager.save_email_to_registry

save_nick_to_registry ​

ts
save_nick_to_registry: Mock<(nick: string) => void>;

Save nick to registry.

Implementation of ​

ts
login_manager.save_nick_to_registry

save_password_to_registry ​

ts
save_password_to_registry: Mock<(password: string) => void>;

Save password to registry.

Implementation of ​

ts
login_manager.save_password_to_registry

save_remember_me_to_registry ​

ts
save_remember_me_to_registry: Mock<(rememberMe: boolean) => void>;

Save remember-me flag to registry.

Implementation of ​

ts
login_manager.save_remember_me_to_registry

set_unique_nick ​

ts
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 ​

ts
login_manager.set_unique_nick

stop_login ​

ts
stop_login: Mock<UnknownFunction>;

Stop the active login request.

Remarks ​

Safe to call when no login is active.

Implementation of ​

ts
login_manager.stop_login

stop_setting_unique_nick ​

ts
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 ​

ts
login_manager.stop_setting_unique_nick