Class EOS_Platform_Interface

java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.EOS_Platform_Interface
All Implemented Interfaces:
com.sun.jna.NativeMapped

public class EOS_Platform_Interface extends com.sun.jna.PointerType
Since:
8/6/2023
  • 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

      public EOS_Connect_Interface getConnectInterface()
      Get a handle to the Connect Interface.
      Returns:
      EOS_Connect_Interface handle
    • getAuthInterface

      public EOS_Auth_Interface getAuthInterface()
      Get a handle to the Auth Interface.
      Returns:
      EOS_Auth_Interface handle
    • getAntiCheatServerInterface

      public EOS_AntiCheatServer_Interface getAntiCheatServerInterface()
      Get a handle to the Anti-Cheat Server Interface.
      Returns:
      EOS_AntiCheatServer_Interface handle
    • getAntiCheatClientInterface

      public EOS_AntiCheatClient_Interface getAntiCheatClientInterface()
      Get a handle to the Anti-Cheat Client Interface.
      Returns:
      EOS_AntiCheatClient_Interface handle
    • getModsInterface

      public EOS_Mods_Interface getModsInterface()
      Get a handle to the Mods Interface.
      Returns:
      EOS_Mods_Interface handle
    • getLobbyInterface

      public EOS_Lobby_Interface getLobbyInterface()
      Get a handle to the Lobby Interface.
      Returns:
      EOS_Lobby_Interface handle
    • getReportsInterface

      public EOS_Reports_Interface getReportsInterface()
      Get a handle to the Reports Interface.
      Returns:
      EOS_Reports_Interface handle
    • getSanctionsInterface

      public EOS_Sanctions_Interface getSanctionsInterface()
      Get a handle to the Sanctions Interface.
      Returns:
      EOS_Sanctions_Interface handle
    • getAchievementsInterface

      public EOS_Achievements_Interface getAchievementsInterface()
      Get a handle to the Achievements Interface.
      Returns:
      EOS_Achievements_Interface handle
    • getCustomInvitesInterface

      public EOS_CustomInvites_Interface getCustomInvitesInterface()
      Get a handle to the Custom Invites Interface.
      Returns:
      EOS_CustomInvites_Interface handle
    • getEcomInterface

      public EOS_Ecom_Interface getEcomInterface()
      Get a handle to the Ecom Interface.
      Returns:
      EOS_Ecom_Interface handle
    • getFriendsInterface

      public EOS_Friends_Interface getFriendsInterface()
      Get a handle to the Friends Interface.
      Returns:
      EOS_Friends_Interface handle
    • getIntegratedPlatformInterface

      public EOS_IntegratedPlatform_Interface getIntegratedPlatformInterface()
      Get a handle to the Integrated Platform Interface.
      Returns:
      EOS_IntegratedPlatform_Interface handle
    • getKWSInterface

      public EOS_KWS_Interface getKWSInterface()
      Get a handle to the Kids Web Service Interface.
      Returns:
      EOS_KWS_Interface handle
    • getLeaderboardsInterface

      public EOS_Leaderboards_Interface getLeaderboardsInterface()
      Get a handle to the Leaderboards Interface.
      Returns:
      EOS_Leaderboards_Interface handle
    • getMetricsInterface

      public EOS_Metrics_Interface getMetricsInterface()
      Get a handle to the Metrics Interface.
      Returns:
      EOS_Metrics_Interface handle
    • getP2PInterface

      public EOS_P2P_Interface getP2PInterface()
      Get a handle to the Peer-to-Peer Networking Interface.
      Returns:
      EOS_P2P handle
    • getPlayerDataStorageInterface

      public EOS_PlayerDataStorage_Interface getPlayerDataStorageInterface()
      Get a handle to the PlayerDataStorage Interface.
      Returns:
      EOS_PlayerDataStoragev handle
    • getPresenceInterface

      public EOS_Presence_Interface getPresenceInterface()
      Get a handle to the Presence Interface.
      Returns:
      EOS_Presence_Interface handle
    • getProgressionSnapshotInterface

      public EOS_ProgressionSnapshot_Interface 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

      public EOS_Stats_Interface getStatsInterface()
      Get a handle to the Stats Interface.
      Returns:
      EOS_Stats handle
    • getTitleStorageInterface

      public EOS_TitleStorage_Interface getTitleStorageInterface()
      Get a handle to the TitleStorage Interface.
      Returns:
      EOS_TitleStorage_Interface handle
    • getUserInfoInterface

      public EOS_UserInfo_Interface getUserInfoInterface()
      Get a handle to the UserInfo Interface.
      Returns:
      EOS_UserInfo_Interface handle
    • getSessionsInterface

      public EOS_Sessions_Interface getSessionsInterface()
      Get a handle to the Sessions Interface.
      Returns:
      EOS_Sessions_Interface handle
    • getUIInterface

      public EOS_UI_Interface getUIInterface()
      Get a handle to the UI Interface.
      Returns:
      EOS_UI_Interface handle
    • getActiveCountryCode

      public String getActiveCountryCode(EOS_EpicAccountId localUserId) throws EOSException
      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 parameter
      EOSNotFoundException - if there is not an override country code for the user
      EOSLimitExceededException - 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

      public String getActiveLocaleCode(EOS_EpicAccountId localUserId) throws EOSException
      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 parameter
      EOSNotFoundException - if there is neither an override nor an available locale code for the user
      EOSLimitExceededException - if there is neither an override nor an available locale code for the user
      EOSException
      See Also:
    • getOverrideCountryCode

      public String getOverrideCountryCode() throws EOSException
      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 parameter
      EOSLimitExceededException - 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

      public String getOverrideLocaleCode() throws EOSException
      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 string
      EOSLimitExceededException - 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

      public EOS_EResult setOverrideCountryCode(String newCountryCode)
      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_Success if the country code was overridden
      EOS_EResult.EOS_InvalidParameters if you pass an invalid country code
      See Also:
    • setOverrideLocaleCode

      public EOS_EResult setOverrideLocaleCode(String newLocaleCode)
      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_Success if the locale code was overridden
      EOS_EResult.EOS_InvalidParameters if you pass an invalid locale code
      See Also:
    • checkForLauncherAndRestart

      public EOS_EResult 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_Success is returned if the app is being restarted. You should quit your process as soon as possible.
      EOS_EResult.EOS_NoChange is returned if the app was already launched through the Epic Launcher, and no action needs to be taken.
      EOS_EResult.EOS_UnexpectedError is 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_NotImplemented is returned on non-Windows platforms.
    • setApplicationStatus

      public EOS_EResult 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.
      Parameters:
      newStatus - The new status for the application.
      Returns:
      An EOS_EResult that indicates whether we changed the application status successfully.
      EOS_EResult.EOS_Success if the application was changed successfully.
      EOS_EResult.EOS_InvalidParameters if the value of NewStatus is invalid.v EOS_EResult.EOS_NotImplemented if EOS_AS_BackgroundConstrained or EOS_AS_BackgroundUnconstrained are attempted to be set on platforms that do not have such application states.
    • getApplicationStatus

      public EOS_EApplicationStatus getApplicationStatus()
      Retrieves the current application state as told to the SDK by the application.
      Returns:
      The current application status.
    • setNetworkStatus

      public EOS_EResult setNetworkStatus(EOS_ENetworkStatus newStatus)
      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_Success if the network was changed successfully.
      EOS_EResult.EOS_InvalidParameters if the value of NewStatus is invalid.
    • getNetworkStatus

      public EOS_ENetworkStatus getNetworkStatus()
      Retrieves the current network state as told to the SDK by the application.
      Returns:
      The current network status.