Class EOS_Platform_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
- Since:
- 8/6/2023
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionChecks if the app was launched through the Epic Games Launcher, and relaunches it through the Epic Games Launcher if it wasn't.Get a handle to the Achievements Interface.getActiveCountryCode(EOS_EpicAccountId localUserId) This only will return the value set as the override otherwise EOS_NotFound is returned.getActiveLocaleCode(EOS_EpicAccountId localUserId) Get the active locale code that the SDK will send to services which require it.Get a handle to the Anti-Cheat Client Interface.Get a handle to the Anti-Cheat Server Interface.Retrieves the current application state as told to the SDK by the application.Get a handle to the Auth Interface.Get a handle to the Connect Interface.Get a handle to the Custom Invites Interface.getDesktopCrossplayStatus(EOS_Platform_GetDesktopCrossplayStatusOptions options, EOS_Platform_DesktopCrossplayStatusInfo outDesktopCrossplayStatusInfo) Windows only.Get a handle to the Ecom Interface.Get a handle to the Friends Interface.Get a handle to the Integrated Platform Interface.Get a handle to the Kids Web Service Interface.Get a handle to the Leaderboards Interface.Get a handle to the Lobby Interface.Get a handle to the Metrics Interface.Get a handle to the Mods Interface.Retrieves the current network state as told to the SDK by the application.Get the override country code that the SDK will send to services which require it.Get the override locale code that the SDK will send to services which require it.Get a handle to the Peer-to-Peer Networking Interface.Get a handle to the PlayerDataStorage Interface.Get a handle to the Presence Interface.Get the active country code that the SDK will send to services which require it.Get a handle to the Reports Interface.Get a handle to the RTC Admin Interface.Get a handle to the RTC Interface.Get a handle to the Sanctions Interface.Get a handle to the Sessions Interface.Get a handle to the Stats Interface.Get a handle to the TitleStorage Interface.Get a handle to the UI Interface.Get a handle to the UserInfo Interface.voidrelease()Release an Epic Online Services platform instance previously returned from EOS_Platform_Create.setApplicationStatus(EOS_EApplicationStatus newStatus) Notify a change in application state.
Calling SetApplicationStatus must happen before Tick when foregrounding for the cases where we won't get the background notification.setNetworkStatus(EOS_ENetworkStatus newStatus) Notify a change in network state.setOverrideCountryCode(String newCountryCode) Set the override country code that the SDK will send to services which require it.setOverrideLocaleCode(String newLocaleCode) Set the override locale code that the SDK will send to services which require it.voidtick()Notify the platform instance to do work.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_Platform_Interface
public EOS_Platform_Interface(com.sun.jna.Pointer address) -
EOS_Platform_Interface
public EOS_Platform_Interface()
-
-
Method Details
-
release
public void release()Release an Epic Online Services platform instance previously returned from EOS_Platform_Create.This function should only be called once per instance returned by EOS_Platform_Create. Undefined behavior will result in calling it with a single instance more than once. Typically only a single platform instance needs to be created during the lifetime of a game. You should release each platform instance before calling the EOS_Shutdown function.
-
tick
public void tick()Notify the platform instance to do work. This function must be called frequently in order for the services provided by the SDK to properly function. For tick-based applications, it is usually desirable to call this once per-tick. -
getConnectInterface
Get a handle to the Connect Interface.- Returns:
- EOS_Connect_Interface handle
-
getAuthInterface
Get a handle to the Auth Interface.- Returns:
- EOS_Auth_Interface handle
-
getAntiCheatServerInterface
Get a handle to the Anti-Cheat Server Interface.- Returns:
- EOS_AntiCheatServer_Interface handle
-
getAntiCheatClientInterface
Get a handle to the Anti-Cheat Client Interface.- Returns:
- EOS_AntiCheatClient_Interface handle
-
getModsInterface
Get a handle to the Mods Interface.- Returns:
- EOS_Mods_Interface handle
-
getLobbyInterface
Get a handle to the Lobby Interface.- Returns:
- EOS_Lobby_Interface handle
-
getReportsInterface
Get a handle to the Reports Interface.- Returns:
- EOS_Reports_Interface handle
-
getSanctionsInterface
Get a handle to the Sanctions Interface.- Returns:
- EOS_Sanctions_Interface handle
-
getAchievementsInterface
Get a handle to the Achievements Interface.- Returns:
- EOS_Achievements_Interface handle
-
getCustomInvitesInterface
Get a handle to the Custom Invites Interface.- Returns:
- EOS_CustomInvites_Interface handle
-
getEcomInterface
Get a handle to the Ecom Interface.- Returns:
- EOS_Ecom_Interface handle
-
getFriendsInterface
Get a handle to the Friends Interface.- Returns:
- EOS_Friends_Interface handle
-
getIntegratedPlatformInterface
Get a handle to the Integrated Platform Interface.- Returns:
- EOS_IntegratedPlatform_Interface handle
-
getKWSInterface
Get a handle to the Kids Web Service Interface.- Returns:
- EOS_KWS_Interface handle
-
getLeaderboardsInterface
Get a handle to the Leaderboards Interface.- Returns:
- EOS_Leaderboards_Interface handle
-
getMetricsInterface
Get a handle to the Metrics Interface.- Returns:
- EOS_Metrics_Interface handle
-
getP2PInterface
Get a handle to the Peer-to-Peer Networking Interface.- Returns:
- EOS_P2P handle
-
getPlayerDataStorageInterface
Get a handle to the PlayerDataStorage Interface.- Returns:
- EOS_PlayerDataStoragev handle
-
getPresenceInterface
Get a handle to the Presence Interface.- Returns:
- EOS_Presence_Interface handle
-
getProgressionSnapshotInterface
Get the active country code that the SDK will send to services which require it. This returns the override value otherwise it will use the country code of the given user. This is currently used for determining pricing. Get a handle to the ProgressionSnapshot Interface.- Returns:
- EOS_ProgressionSnapshot_Interface handle
-
getStatsInterface
Get a handle to the Stats Interface.- Returns:
- EOS_Stats handle
-
getTitleStorageInterface
Get a handle to the TitleStorage Interface.- Returns:
- EOS_TitleStorage_Interface handle
-
getUserInfoInterface
Get a handle to the UserInfo Interface.- Returns:
- EOS_UserInfo_Interface handle
-
getSessionsInterface
Get a handle to the Sessions Interface.- Returns:
- EOS_Sessions_Interface handle
-
getUIInterface
Get a handle to the UI Interface.- Returns:
- EOS_UI_Interface handle
-
getRTCInterface
Get a handle to the RTC Interface.- Returns:
- EOS_RTC_Interface handle
-
getRTCAdminInterface
Get a handle to the RTC Admin Interface.- Returns:
- EOS_RTC_Admin_Interface handle
-
getActiveCountryCode
This only will return the value set as the override otherwise EOS_NotFound is returned. This is not currently used for anything internally.- Parameters:
localUserId- The account to use for lookup if no override exists.- Returns:
- active country code string
- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if there is not an override country code for the userEOSLimitExceededException- The OutBuffer is not large enough to receive the country code string. InOutBufferLength contains the required minimum length to perform the operation successfully.EOSException- See Also:
-
getActiveLocaleCode
Get the active locale code that the SDK will send to services which require it. This returns the override value otherwise it will use the locale code of the given user. This is used for localization. This follows ISO 639.- Parameters:
localUserId- The account to use for lookup if no override exists.- Returns:
- active locale code string
- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSNotFoundException- if there is neither an override nor an available locale code for the userEOSLimitExceededException- if there is neither an override nor an available locale code for the userEOSException- See Also:
-
getOverrideCountryCode
Get the override country code that the SDK will send to services which require it. This is not currently used for anything internally.- Returns:
- override country code
- Throws:
EOSInvalidParametersException- if you pass a null pointer for the out parameterEOSLimitExceededException- The OutBuffer is not large enough to receive the country code string. InOutBufferLength contains the required minimum length to perform the operation successfully.EOSException- See Also:
-
getOverrideLocaleCode
Get the override locale code that the SDK will send to services which require it. This is used for localization. This follows ISO 639.- Returns:
- override local code string
- Throws:
EOSInvalidParametersException- override locale code stringEOSLimitExceededException- The OutBuffer is not large enough to receive the locale code string. InOutBufferLength contains the required minimum length to perform the operation successfully.EOSException- See Also:
-
setOverrideCountryCode
Set the override country code that the SDK will send to services which require it. This is not currently used for anything internally.- Parameters:
newCountryCode- country code to override- Returns:
- An EOS_EResult that indicates whether the override country code string was saved.
EOS_EResult.EOS_Successif the country code was overridden
EOS_EResult.EOS_InvalidParametersif you pass an invalid country code - See Also:
-
setOverrideLocaleCode
Set the override locale code that the SDK will send to services which require it. This is used for localization. This follows ISO 639.- Parameters:
newLocaleCode- locale code to override- Returns:
- An EOS_EResult that indicates whether the override locale code string was saved.
EOS_EResult.EOS_Successif the locale code was overridden
EOS_EResult.EOS_InvalidParametersif you pass an invalid locale code - See Also:
-
checkForLauncherAndRestart
Checks if the app was launched through the Epic Games Launcher, and relaunches it through the Epic Games Launcher if it wasn't.NOTE: During the call to EOS_Platform_Create, the command line that was used to launch the app is inspected, and if it is recognized as coming from the Epic Games Launcher, an environment variable is set to 1. The name of the environment variable is defined by EOS_PLATFORM_CHECKFORLAUNCHERANDRESTART_ENV_VAR.
You can force the EOS_Platform_CheckForLauncherAndRestart API to relaunch the title by explicitly unsetting this environment variable before calling EOS_Platform_CheckForLauncherAndRestart.
- Returns:
- An EOS_EResult is returned to indicate success or an error.
EOS_EResult.EOS_Successis returned if the app is being restarted. You should quit your process as soon as possible.
EOS_EResult.EOS_NoChangeis returned if the app was already launched through the Epic Launcher, and no action needs to be taken.
EOS_EResult.EOS_UnexpectedErroris returned if the LauncherCheck module failed to initialize, or the module tried and failed to restart the app.
-
getDesktopCrossplayStatus
public EOS_EResult getDesktopCrossplayStatus(EOS_Platform_GetDesktopCrossplayStatusOptions options, EOS_Platform_DesktopCrossplayStatusInfo outDesktopCrossplayStatusInfo) Windows only. Checks that the application is ready to use desktop crossplay functionality, with the necessary prerequisites having been met.This function verifies that the application was launched through the Bootstrapper application, the redistributable service has been installed and is running in the background, and that the overlay has been loaded successfully.
On Windows, the desktop crossplay functionality is required to use Epic accounts login with applications that are distributed outside the Epic Games Store.
- Parameters:
options- input structure that specifies the API version.outDesktopCrossplayStatusInfo- output structure to receive the desktop crossplay status information.- Returns:
- An EOS_EResult is returned to indicate success or an error.
EOS_EResult.EOS_NotImplementedis returned on non-Windows platforms.
-
setApplicationStatus
Notify a change in application state.
Calling SetApplicationStatus must happen before Tick when foregrounding for the cases where we won't get the background notification.- Parameters:
newStatus- The new status for the application.- Returns:
- An EOS_EResult that indicates whether we changed the application status successfully.
EOS_EResult.EOS_Successif the application was changed successfully.
EOS_EResult.EOS_InvalidParametersif the value of NewStatus is invalid.vEOS_EResult.EOS_NotImplementedif EOS_AS_BackgroundConstrained or EOS_AS_BackgroundUnconstrained are attempted to be set on platforms that do not have such application states.
-
getApplicationStatus
Retrieves the current application state as told to the SDK by the application.- Returns:
- The current application status.
-
setNetworkStatus
Notify a change in network state.- Parameters:
newStatus- The new network status.- Returns:
- An EOS_EResult that indicates whether we changed the network status successfully.
EOS_EResult.EOS_Successif the network was changed successfully.
EOS_EResult.EOS_InvalidParametersif the value of NewStatus is invalid.
-
getNetworkStatus
Retrieves the current network state as told to the SDK by the application.- Returns:
- The current network status.
-