UnrealModFramework
Mod framework API
Loading...
Searching...
No Matches
UModAPIHostSubsystem Class Reference

Owns the generated API registry for one game instance. More...

#include <ModAPIHostSubsystem.h>

Inheritance diagram for UModAPIHostSubsystem:

Public Member Functions

MODAPI_API TModResult< Mod::API::FRegistration > RegisterWorldProvider (FName TypeId, UObject *Instance)
 Registers a live world provider on the game thread.
MODAPI_API TModResult< Mod::API::FWorldCaller > OpenWorldCaller (UWorld *World, FName TypeId, const TCHAR *Signature, TSet< FName > Permissions)
 Issues a caller and provider token on the game thread.
 DECLARE_DELEGATE_RetVal_TwoParams (TModResult< Mod::API::FWorldAPIGrant >, FAuthorizeWorldCaller, const UModInstance &, FName)
 Handles a game-thread request for a mounted mod's native API caller.
MODAPI_API void SetWorldCallerPolicy (FAuthorizeWorldCaller Policy)
 Sets the Mod authorization policy on the game thread.
MODAPI_API TModResult< Mod::API::FLocalPlayerCaller > OpenLocalPlayer (ULocalPlayer *Player, FName TypeId, const TCHAR *Signature, TSet< FName > Permissions)
 Binds a generated local-player service.
template<class T>
TModResult< Mod::API::FLocalPlayerCaller > OpenLocalPlayer (ULocalPlayer *Player, TSet< FName > Permissions)
 Binds a typed local-player service.
MODAPI_API TModResult< void > RevokeCaller (const Mod::API::FCaller &Caller)
 Revokes one caller and all of its bindings.
MODAPI_API bool EndExtensionSession ()
 Releases the selected Mod set on the game thread.

Detailed Description

Owns the generated API registry for one game instance.

Member Function Documentation

◆ EndExtensionSession()

MODAPI_API bool UModAPIHostSubsystem::EndExtensionSession ( )

Releases the selected Mod set on the game thread.

Returns
Whether all extension Worlds have drained and the set can change.

◆ OpenLocalPlayer() [1/2]

MODAPI_API TModResult< Mod::API::FLocalPlayerCaller > UModAPIHostSubsystem::OpenLocalPlayer ( ULocalPlayer * Player,
FName TypeId,
const TCHAR * Signature,
TSet< FName > Permissions )

Binds a generated local-player service.

Parameters
PlayerThe local player in this game instance.
TypeIdThe generated type identity.
SignatureThe generated table signature.
PermissionsThe host-approved permissions.
Returns
The caller, binding and native tokens, or an error.

◆ OpenLocalPlayer() [2/2]

template<class T>
TModResult< Mod::API::FLocalPlayerCaller > UModAPIHostSubsystem::OpenLocalPlayer ( ULocalPlayer * Player,
TSet< FName > Permissions )
inline

Binds a typed local-player service.

Template Parameters
TThe exported subsystem type.
Parameters
PlayerThe local player in this game instance.
PermissionsThe host-approved permissions.
Returns
The caller, binding and native tokens, or an error.

◆ OpenWorldCaller()

MODAPI_API TModResult< Mod::API::FWorldCaller > UModAPIHostSubsystem::OpenWorldCaller ( UWorld * World,
FName TypeId,
const TCHAR * Signature,
TSet< FName > Permissions )

Issues a caller and provider token on the game thread.

Parameters
WorldThe active world of the caller.
TypeIdThe registered provider type.
SignatureThe generated calling table signature.
PermissionsExact permissions granted by the host.
Returns
Caller and tokens, or a binding error.

◆ RegisterWorldProvider()

MODAPI_API TModResult< Mod::API::FRegistration > UModAPIHostSubsystem::RegisterWorldProvider ( FName TypeId,
UObject * Instance )

Registers a live world provider on the game thread.

Parameters
TypeIdGenerated type to expose.
InstanceGame-owned instance, ready to receive calls.
Returns
A registration to retain until the provider is removed.

◆ RevokeCaller()

MODAPI_API TModResult< void > UModAPIHostSubsystem::RevokeCaller ( const Mod::API::FCaller & Caller)

Revokes one caller and all of its bindings.

Parameters
CallerThe identity issued by this subsystem.
Returns
Success or a lifecycle error.

◆ SetWorldCallerPolicy()

MODAPI_API void UModAPIHostSubsystem::SetWorldCallerPolicy ( FAuthorizeWorldCaller Policy)

Sets the Mod authorization policy on the game thread.

Parameters
PolicyThe delegate that selects a world and permissions.

The documentation for this class was generated from the following file: