Class EOS_AntiCheatServer_Interface

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

public class EOS_AntiCheatServer_Interface extends com.sun.jna.PointerType
Since:
8/9/2023
  • Constructor Details

    • EOS_AntiCheatServer_Interface

      public EOS_AntiCheatServer_Interface(com.sun.jna.Pointer address)
    • EOS_AntiCheatServer_Interface

      public EOS_AntiCheatServer_Interface()
  • Method Details

    • addNotifyMessageToClient

      public EOS_NotificationId addNotifyMessageToClient(com.sun.jna.Pointer clientData, EOS_AntiCheatServer_OnMessageToClientCallback notificationFn)
      Add a callback issued when a new message must be dispatched to a connected client. The bound function will only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
      Parameters:
      clientData - This value is returned to the caller when NotificationFn is invoked
      notificationFn - The callback to be fired
      Returns:
      A valid notification ID if successfully bound, or EOS_NotificationId.EOS_INVALID_NOTIFICATIONID otherwise
    • removeNotifyMessageToClient

      public void removeNotifyMessageToClient(EOS_NotificationId notificationId)
      Remove a previously bound EOS_AntiCheatServer_AddNotifyMessageToClient handler.
      Parameters:
      notificationId - The previously bound notification ID
    • addNotifyClientActionRequired

      public EOS_NotificationId addNotifyClientActionRequired(com.sun.jna.Pointer clientData, EOS_AntiCheatServer_OnClientActionRequiredCallback notificationFn)
      Add a callback issued when an action must be applied to a connected client. The bound function will only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
      Parameters:
      clientData - This value is returned to the caller when NotificationFn is invoked
      notificationFn - The callback to be fired
      Returns:
      A valid notification ID if successfully bound, or EOS_NotificationId.EOS_INVALID_NOTIFICATIONID otherwise
    • removeNotifyClientActionRequired

      public void removeNotifyClientActionRequired(EOS_NotificationId notificationId)
      Remove a previously bound EOS_AntiCheatServer_AddNotifyClientActionRequired handler.
      Parameters:
      notificationId - The previously bound notification ID
    • addNotifyClientAuthStatusChanged

      public EOS_NotificationId addNotifyClientAuthStatusChanged(com.sun.jna.Pointer clientData, EOS_AntiCheatServer_OnClientAuthStatusChangedCallback notificationFn)
      Add an optional callback issued when a connected client's authentication status changes. The bound function will only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
      Parameters:
      clientData - This value is returned to the caller when NotificationFn is invoked
      notificationFn - The callback to be fired
      Returns:
      A valid notification ID if successfully bound, or EOS_NotificationId.EOS_INVALID_NOTIFICATIONID otherwise
    • removeNotifyClientAuthStatusChanged

      public void removeNotifyClientAuthStatusChanged(EOS_NotificationId notificationId)
      Remove a previously bound EOS_AntiCheatServer_AddNotifyClientAuthStatusChanged handler.
      Parameters:
      notificationId - The previously bound notification ID
    • beginSession

      Begin the gameplay session. Event callbacks must be configured with EOS_AntiCheatServer_AddNotifyMessageToClient and EOS_AntiCheatServer_AddNotifyClientActionRequired before calling this function.
      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the initialization succeeded EOS_EResult.EOS_InvalidParameters - If input data was invalid
    • endSession

      public EOS_EResult endSession()
      End the gameplay session. Should be called when the server is shutting down or entering an idle state.
      Returns:
      EOS_EResult.EOS_Success - If the initialization succeeded EOS_EResult.EOS_InvalidParameters - If input data was invalid
    • registerClient

      public EOS_EResult registerClient(EOS_AntiCheatServer_RegisterClientOptions options)
      Register a connected client. Must be paired with a call to UnregisterClient.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the player was registered successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid
    • unregisterClient

      public EOS_EResult unregisterClient(@NotNull @NotNull EOS_AntiCheatCommon_ClientHandle clientHandle)
      Unregister a disconnected client.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      clientHandle - Locally unique value describing the remote user, as previously passed to RegisterClient
      Returns:
      EOS_EResult.EOS_Success - If the player was unregistered successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid
    • receiveMessageFromClient

      public EOS_EResult receiveMessageFromClient(@NotNull @NotNull EOS_AntiCheatCommon_ClientHandle clientHandle, byte @NotNull [] data)
      Call when an anti-cheat message is received from a client.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      clientHandle - Locally unique value describing the corresponding remote user, as previously passed to RegisterClient
      data - The data received
      Returns:
      EOS_EResult.EOS_Success - If the message was processed successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_InvalidRequest - If message contents were corrupt and could not be processed
    • setClientDetails

      public EOS_EResult setClientDetails(EOS_AntiCheatCommon_SetClientDetailsOptions options)
      Optional. Sets or updates client details including input device and admin status.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the flags were updated successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid
    • setGameSessionId

      public EOS_EResult setGameSessionId(String gameSessionId)
      Optional. Sets or updates a game session identifier which can be attached to other data for reference. The identifier can be updated at any time for currently and subsequently registered clients.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      gameSessionId - Game session identifier
      Returns:
      EOS_EResult.EOS_Success - If the game session identifier was set successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid
    • setClientNetworkState

      public EOS_EResult setClientNetworkState(EOS_AntiCheatCommon_ClientHandle clientHandle, boolean isNetworkActive)
      Optional. Can be used to indicate that a client is legitimately known to be temporarily unable to communicate, for example as a result of loading a new level.

      The IsNetworkActive flag must be set back to true when users enter normal gameplay, otherwise anti-cheat enforcement will not work correctly.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      clientHandle - Locally unique value describing the remote user (e.g. a player object pointer)
      isNetworkActive - true if the network is functioning normally, false if temporarily interrupted
      Returns:
      EOS_EResult.EOS_Success - If the network state was updated successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid
    • getProtectMessageOutputLength

      public int getProtectMessageOutputLength(int dataSize) throws EOSException
      Optional NetProtect feature for game message encryption. Calculates the required decrypted buffer size for a given input data length. This will not change for a given SDK version, and allows one time allocation of reusable buffers.
      Parameters:
      dataSize - input data size
      Returns:
      On success, the OutBuffer length in bytes that is required to call ProtectMessage on the given input size.
      Throws:
      EOSInvalidParametersException - If input data was invalid
      EOSException
    • protectMessage

      public ByteBuffer protectMessage(EOS_AntiCheatCommon_ClientHandle clientHandle, byte[] data, int outBufferSizeBytes) throws EOSException
      Optional NetProtect feature for game message encryption. Encrypts an arbitrary message that will be sent to a game client and decrypted on the other side.

      Options.Data and OutBuffer may refer to the same buffer to encrypt in place.

      Parameters:
      clientHandle - Locally unique value describing the remote user to whom the message will be sent
      data - The data to encrypt
      outBufferSizeBytes - The size in bytes of OutBuffer
      Returns:
      buffer with an encrypted data message
      Throws:
      EOSInvalidParametersException - If input data was invalid
      EOSInvalidUserException - If the specified ClientHandle was invalid or not currently registered. See registerClient(EOS_AntiCheatServer_RegisterClientOptions)
      EOSException
    • unprotectMessage

      public ByteBuffer unprotectMessage(EOS_AntiCheatCommon_ClientHandle clientHandle, byte[] data) throws EOSException
      Optional NetProtect feature for game message encryption. Decrypts an encrypted message received from a game client.

      Options.Data and OutBuffer may refer to the same buffer to decrypt in place.

      Parameters:
      clientHandle - Locally unique value describing the remote user from whom the message was received
      data - The data to decrypt
      Returns:
      buffer with a decrypted data message
      Throws:
      EOSInvalidParametersException - If input data was invalid
      EOSException
    • registerEvent

      public EOS_EResult registerEvent(EOS_AntiCheatCommon_RegisterEventOptions options)
      Optional Cerberus feature for gameplay data collection. Registers a custom gameplay event.

      All custom game events must be registered before EOS_AntiCheatServer_BeginSession is called for the first time. After the first call to EOS_AntiCheatServer_BeginSession, this function cannot be called any longer.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was registered successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid
    • logEvent

      Optional Cerberus feature for gameplay data collection. Logs a custom gameplay event.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries
    • logGameRoundStart

      public EOS_EResult logGameRoundStart(EOS_AntiCheatCommon_LogGameRoundStartOptions options)
      Optional Cerberus feature for gameplay data collection. Logs a new game round start.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries
    • logGameRoundEnd

      public EOS_EResult logGameRoundEnd(int winningTeamId)
      Optional Cerberus feature for gameplay data collection. Logs a game round's end and outcome.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      winningTeamId - Optional identifier for the winning team
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries
    • logPlayerSpawn

      public EOS_EResult logPlayerSpawn(EOS_AntiCheatCommon_LogPlayerSpawnOptions options)
      Optional Cerberus feature for gameplay data collection. Logs a player spawning into the game.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries
    • logPlayerDespawn

      public EOS_EResult logPlayerDespawn(EOS_AntiCheatCommon_LogPlayerDespawnOptions options)
      Optional Cerberus feature for gameplay data collection. Logs a player despawning in the game, for example as a result of the character's death, switching to spectator mode, etc.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries
    • logPlayerRevive

      public EOS_EResult logPlayerRevive(EOS_AntiCheatCommon_LogPlayerReviveOptions options)
      Optional Cerberus feature for gameplay data collection. Logs a player being revived after being downed (see EOS_AntiCheatServer_LogPlayerTakeDamage options).

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries
    • logPlayerTick

      public EOS_EResult logPlayerTick(EOS_AntiCheatCommon_LogPlayerTickOptions options)
      Optional Cerberus feature for gameplay data collection. Logs a player's general state including position and view direction.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries
    • logPlayerUseWeapon

      public EOS_EResult logPlayerUseWeapon(EOS_AntiCheatCommon_LogPlayerUseWeaponOptions options)
      Optional Cerberus feature for gameplay data collection. Logs that a player has used a weapon, for example firing one bullet or making one melee attack.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries
    • logPlayerUseAbility

      public EOS_EResult logPlayerUseAbility(EOS_AntiCheatCommon_LogPlayerUseAbilityOptions options)
      Optional Cerberus feature for gameplay data collection. Logs that a player has used a special ability or item which affects their character's capabilities, for example temporarily increasing their speed or allowing them to see nearby players behind walls.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries
    • logPlayerTakeDamage

      public EOS_EResult logPlayerTakeDamage(EOS_AntiCheatCommon_LogPlayerTakeDamageOptions options)
      Optional Cerberus feature for gameplay data collection. Logs that a player has taken damage.

      This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.

      Parameters:
      options - Structure containing input data.
      Returns:
      EOS_EResult.EOS_Success - If the event was logged successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_NotConfigured - If called outside of BeginSession/EndSession boundaries