PlatformUnrealSDK
FOnlineIdentityPico Class Reference

OnlineIdentityPico class inherited from IOnlineIdentity(Unreal Engine) More...

#include <OnlineIdentityPico.h>

Public Member Functions

virtual bool Login (int32 LocalUserNum, const FOnlineAccountCredentials &AccountCredentials) override
 Gets the account login information for the current device. More...
 
virtual bool Logout (int32 LocalUserNum) override
 Signs the player out of the online service. More...
 
virtual bool AutoLogin (int32 LocalUserNum) override
 Auto login. More...
 
virtual TSharedPtr< FUserOnlineAccount > GetUserAccount (const FUniqueNetId &UserId) const override
 Obtains online account info for a user that has been registered. More...
 
virtual TArray< TSharedPtr< FUserOnlineAccount > > GetAllUserAccounts () const override
 Obtains the list of all known/registered user accounts. More...
 
virtual FUniqueNetIdPtr GetUniquePlayerId (int32 LocalUserNum) const override
 Gets the platform-specific unique ID for the specified player. More...
 
virtual FUniqueNetIdPtr CreateUniquePlayerId (uint8 *Bytes, int32 Size) override
 Creates a unique ID from binary data (used during replication). More...
 
virtual FUniqueNetIdPtr CreateUniquePlayerId (const FString &Str) override
 Creates a unique ID from string. More...
 
virtual ELoginStatus::Type GetLoginStatus (int32 LocalUserNum) const override
 Gets the login status for a given player. More...
 
virtual ELoginStatus::Type GetLoginStatus (const FUniqueNetId &UserId) const override
 Gets the login status for a given player. More...
 
virtual FString GetPlayerNickname (int32 LocalUserNum) const override
 Reads the player's nickname from the online service. More...
 
virtual FString GetPlayerNickname (const FUniqueNetId &UserId) const override
 Reads the player's nickname from the online service. More...
 
virtual FString GetAuthType () const override
 Gets the auth type associated with accounts for this platform. More...
 
 FOnlineIdentityPico (FOnlineSubsystemPico &InSubsystem)
 The constructor. More...
 
virtual ~FOnlineIdentityPico ()=default
 The default destructor.
 

Private Attributes

FOnlineSubsystemPico & PicoSubsystem
 Reference to the main Pico subsystem.
 
TMap< int32, FUniqueNetIdRef > UserIds
 IDs mapped to locally registered users.
 
TUniqueNetIdMap< TSharedRef< FUserOnlineAccountPico > > UserAccounts
 IDs mapped to locally registered user accounts.
 

Detailed Description

OnlineIdentityPico class inherited from IOnlineIdentity(Unreal Engine)

Constructor & Destructor Documentation

◆ FOnlineIdentityPico()

FOnlineIdentityPico ( FOnlineSubsystemPico &  InSubsystem)

The constructor.

Parameters
InSubsystemThe online subsystem being used.

Member Function Documentation

◆ AutoLogin()

virtual bool AutoLogin ( int32  LocalUserNum)
overridevirtual

Auto login.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
Bool:
  • true: success
  • false: failure

◆ CreateUniquePlayerId() [1/2]

virtual FUniqueNetIdPtr CreateUniquePlayerId ( const FString &  Str)
overridevirtual

Creates a unique ID from string.

Parameters
StrThe string that holds the textual representation of an ID.
Returns
  • The unique ID from the given data
  • NULL: otherwise

◆ CreateUniquePlayerId() [2/2]

virtual FUniqueNetIdPtr CreateUniquePlayerId ( uint8 *  Bytes,
int32  Size 
)
overridevirtual

Creates a unique ID from binary data (used during replication).

Parameters
BytesThe opaque data from the appropriate platform.
SizeThe size of opaque data.
Returns
  • The unique ID from the given data
  • NULL: otherwise

◆ GetAllUserAccounts()

virtual TArray< TSharedPtr< FUserOnlineAccount > > GetAllUserAccounts ( ) const
overridevirtual

Obtains the list of all known/registered user accounts.

Returns
  • The info about the user if found
  • NULL: otherwise

◆ GetAuthType()

virtual FString GetAuthType ( ) const
overridevirtual

Gets the auth type associated with accounts for this platform.

Returns
The auth type associated with accounts for this platform.

◆ GetLoginStatus() [1/2]

virtual ELoginStatus::Type GetLoginStatus ( const FUniqueNetId &  UserId) const
overridevirtual

Gets the login status for a given player.

Parameters
UserIdThe unique net ID of the associated user.
Returns
The enum value of the player's status.

◆ GetLoginStatus() [2/2]

virtual ELoginStatus::Type GetLoginStatus ( int32  LocalUserNum) const
overridevirtual

Gets the login status for a given player.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
The enum value of that player's status.

◆ GetPlayerNickname() [1/2]

virtual FString GetPlayerNickname ( const FUniqueNetId &  UserId) const
overridevirtual

Reads the player's nickname from the online service.

Parameters
UserIdThe unique net ID of the associated user.
Returns
A string containing the player's nickname.

◆ GetPlayerNickname() [2/2]

virtual FString GetPlayerNickname ( int32  LocalUserNum) const
overridevirtual

Reads the player's nickname from the online service.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
A string containing the player's nickname.

◆ GetUniquePlayerId()

virtual FUniqueNetIdPtr GetUniquePlayerId ( int32  LocalUserNum) const
overridevirtual

Gets the platform-specific unique ID for the specified player.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
  • The valid player ID object if the call succeeded
  • NULL: otherwise

◆ GetUserAccount()

virtual TSharedPtr< FUserOnlineAccount > GetUserAccount ( const FUniqueNetId &  UserId) const
overridevirtual

Obtains online account info for a user that has been registered.

Parameters
UserIdThe ID of the user to search for.
Returns
  • The info about the user if found
  • NULL: otherwise

◆ Login()

virtual bool Login ( int32  LocalUserNum,
const FOnlineAccountCredentials &  AccountCredentials 
)
overridevirtual

Gets the account login information for the current device.

Will call OnLoginComplete() delegate when async task completes.

Parameters
LocalUserNumThe controller number of the associated user.
AccountCredentialsThe user account credentials needed to sign in to the online service.
Returns
Bool:
  • true: if login task was started
  • false: otherwise

◆ Logout()

virtual bool Logout ( int32  LocalUserNum)
overridevirtual

Signs the player out of the online service.

Will call the OnLogoutComplete() delegate when async task completes.

Parameters
LocalUserNumThe controller number of the associated user.
Returns
Bool:
  • true: if logout task was started
  • false: otherwise