// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Platform { public sealed partial class PlatformInterface : Handle { public PlatformInterface() { } public PlatformInterface(System.IntPtr innerHandle) : base(innerHandle) { } public const int CountrycodeMaxBufferLen = (CountrycodeMaxLength + 1); public const int CountrycodeMaxLength = 4; /// /// The most recent version of the API. /// public const int InitializeApiLatest = 4; /// /// The most recent version of the API. /// public const int InitializeThreadaffinityApiLatest = 1; public const int LocalecodeMaxBufferLen = (LocalecodeMaxLength + 1); public const int LocalecodeMaxLength = 9; public const int OptionsApiLatest = 11; /// /// The most recent version of the API. /// public const int RtcoptionsApiLatest = 1; /// /// Checks if the app was launched through the Epic Launcher, and relaunches it through the Epic Launcher if it wasn't. /// /// /// An is returned to indicate success or an error. /// is returned if the app is being restarted. You should quit your process as soon as possible. /// is returned if the app was already launched through the Epic Launcher, and no action needs to be taken. /// is returned if the LauncherCheck module failed to initialize, or the module tried and failed to restart the app. /// public Result CheckForLauncherAndRestart() { var funcResult = Bindings.EOS_Platform_CheckForLauncherAndRestart(InnerHandle); return funcResult; } /// /// Create a single Epic Online Services Platform Instance. /// /// The platform instance is used to gain access to the various Epic Online Services. /// /// This function returns an opaque handle to the platform instance, and that handle must be passed to to release the instance. /// /// /// An opaque handle to the platform instance. /// public static PlatformInterface Create(Options options) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var funcResult = Bindings.EOS_Platform_Create(optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); PlatformInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Achievements Interface. /// eos_achievements.h /// eos_achievements_types.h /// /// /// handle /// public Achievements.AchievementsInterface GetAchievementsInterface() { var funcResult = Bindings.EOS_Platform_GetAchievementsInterface(InnerHandle); Achievements.AchievementsInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// This only will return the value set as the override otherwise is returned. /// This is not currently used for anything internally. /// eos_ecom.h /// /// /// The account to use for lookup if no override exists. /// The buffer into which the character data should be written. The buffer must be long enough to hold a string of . /// /// The size of the OutBuffer in characters. /// The input buffer should include enough space to be null-terminated. /// When the function returns, this parameter will be filled with the length of the string copied into OutBuffer. /// /// /// An that indicates whether the active country code string was copied into the OutBuffer. /// if the information is available and passed out in OutBuffer /// if you pass a null pointer for the out parameter /// if there is not an override country code for the user. /// - The OutBuffer is not large enough to receive the country code string. InOutBufferLength contains the required minimum length to perform the operation successfully. /// public Result GetActiveCountryCode(EpicAccountId localUserId, out string outBuffer) { var localUserIdInnerHandle = System.IntPtr.Zero; Helper.TryMarshalSet(ref localUserIdInnerHandle, localUserId); System.IntPtr outBufferAddress = System.IntPtr.Zero; int inOutBufferLength = CountrycodeMaxLength + 1; Helper.TryMarshalAllocate(ref outBufferAddress, inOutBufferLength); var funcResult = Bindings.EOS_Platform_GetActiveCountryCode(InnerHandle, localUserIdInnerHandle, outBufferAddress, ref inOutBufferLength); Helper.TryMarshalGet(outBufferAddress, out outBuffer); Helper.TryMarshalDispose(ref outBufferAddress); return funcResult; } /// /// 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. /// eos_ecom.h /// /// /// The account to use for lookup if no override exists. /// The buffer into which the character data should be written. The buffer must be long enough to hold a string of . /// /// The size of the OutBuffer in characters. /// The input buffer should include enough space to be null-terminated. /// When the function returns, this parameter will be filled with the length of the string copied into OutBuffer. /// /// /// An that indicates whether the active locale code string was copied into the OutBuffer. /// if the information is available and passed out in OutBuffer /// if you pass a null pointer for the out parameter /// if there is neither an override nor an available locale code for the user. /// - The OutBuffer is not large enough to receive the locale code string. InOutBufferLength contains the required minimum length to perform the operation successfully. /// public Result GetActiveLocaleCode(EpicAccountId localUserId, out string outBuffer) { var localUserIdInnerHandle = System.IntPtr.Zero; Helper.TryMarshalSet(ref localUserIdInnerHandle, localUserId); System.IntPtr outBufferAddress = System.IntPtr.Zero; int inOutBufferLength = LocalecodeMaxLength + 1; Helper.TryMarshalAllocate(ref outBufferAddress, inOutBufferLength); var funcResult = Bindings.EOS_Platform_GetActiveLocaleCode(InnerHandle, localUserIdInnerHandle, outBufferAddress, ref inOutBufferLength); Helper.TryMarshalGet(outBufferAddress, out outBuffer); Helper.TryMarshalDispose(ref outBufferAddress); return funcResult; } /// /// Get a handle to the Anti-Cheat Client Interface. /// eos_anticheatclient.h /// eos_anticheatclient_types.h /// /// /// handle /// public AntiCheatClient.AntiCheatClientInterface GetAntiCheatClientInterface() { var funcResult = Bindings.EOS_Platform_GetAntiCheatClientInterface(InnerHandle); AntiCheatClient.AntiCheatClientInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Anti-Cheat Server Interface. /// eos_anticheatserver.h /// eos_anticheatserver_types.h /// /// /// handle /// public AntiCheatServer.AntiCheatServerInterface GetAntiCheatServerInterface() { var funcResult = Bindings.EOS_Platform_GetAntiCheatServerInterface(InnerHandle); AntiCheatServer.AntiCheatServerInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Auth Interface. /// eos_auth.h /// eos_auth_types.h /// /// /// handle /// public Auth.AuthInterface GetAuthInterface() { var funcResult = Bindings.EOS_Platform_GetAuthInterface(InnerHandle); Auth.AuthInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Connect Interface. /// eos_connect.h /// eos_connect_types.h /// /// /// handle /// public Connect.ConnectInterface GetConnectInterface() { var funcResult = Bindings.EOS_Platform_GetConnectInterface(InnerHandle); Connect.ConnectInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Ecom Interface. /// eos_ecom.h /// eos_ecom_types.h /// /// /// handle /// public Ecom.EcomInterface GetEcomInterface() { var funcResult = Bindings.EOS_Platform_GetEcomInterface(InnerHandle); Ecom.EcomInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Friends Interface. /// eos_friends.h /// eos_friends_types.h /// /// /// handle /// public Friends.FriendsInterface GetFriendsInterface() { var funcResult = Bindings.EOS_Platform_GetFriendsInterface(InnerHandle); Friends.FriendsInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Kids Web Service Interface. /// eos_kws.h /// eos_kws_types.h /// /// /// handle /// public KWS.KWSInterface GetKWSInterface() { var funcResult = Bindings.EOS_Platform_GetKWSInterface(InnerHandle); KWS.KWSInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Leaderboards Interface. /// eos_leaderboards.h /// eos_leaderboards_types.h /// /// /// handle /// public Leaderboards.LeaderboardsInterface GetLeaderboardsInterface() { var funcResult = Bindings.EOS_Platform_GetLeaderboardsInterface(InnerHandle); Leaderboards.LeaderboardsInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Lobby Interface. /// eos_lobby.h /// eos_lobby_types.h /// /// /// handle /// public Lobby.LobbyInterface GetLobbyInterface() { var funcResult = Bindings.EOS_Platform_GetLobbyInterface(InnerHandle); Lobby.LobbyInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Metrics Interface. /// eos_metrics.h /// eos_metrics_types.h /// /// /// handle /// public Metrics.MetricsInterface GetMetricsInterface() { var funcResult = Bindings.EOS_Platform_GetMetricsInterface(InnerHandle); Metrics.MetricsInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Mods Interface. /// eos_mods.h /// eos_mods_types.h /// /// /// handle /// public Mods.ModsInterface GetModsInterface() { var funcResult = Bindings.EOS_Platform_GetModsInterface(InnerHandle); Mods.ModsInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get the override country code that the SDK will send to services which require it. /// This is not currently used for anything internally. /// eos_ecom.h /// /// /// The buffer into which the character data should be written. The buffer must be long enough to hold a string of . /// /// The size of the OutBuffer in characters. /// The input buffer should include enough space to be null-terminated. /// When the function returns, this parameter will be filled with the length of the string copied into OutBuffer. /// /// /// An that indicates whether the override country code string was copied into the OutBuffer. /// if the information is available and passed out in OutBuffer /// if you pass a null pointer for the out parameter /// - The OutBuffer is not large enough to receive the country code string. InOutBufferLength contains the required minimum length to perform the operation successfully. /// public Result GetOverrideCountryCode(out string outBuffer) { System.IntPtr outBufferAddress = System.IntPtr.Zero; int inOutBufferLength = CountrycodeMaxLength + 1; Helper.TryMarshalAllocate(ref outBufferAddress, inOutBufferLength); var funcResult = Bindings.EOS_Platform_GetOverrideCountryCode(InnerHandle, outBufferAddress, ref inOutBufferLength); Helper.TryMarshalGet(outBufferAddress, out outBuffer); Helper.TryMarshalDispose(ref outBufferAddress); return funcResult; } /// /// Get the override locale code that the SDK will send to services which require it. /// This is used for localization. This follows ISO 639. /// eos_ecom.h /// /// /// The buffer into which the character data should be written. The buffer must be long enough to hold a string of . /// /// The size of the OutBuffer in characters. /// The input buffer should include enough space to be null-terminated. /// When the function returns, this parameter will be filled with the length of the string copied into OutBuffer. /// /// /// An that indicates whether the override locale code string was copied into the OutBuffer. /// if the information is available and passed out in OutBuffer /// if you pass a null pointer for the out parameter /// - The OutBuffer is not large enough to receive the locale code string. InOutBufferLength contains the required minimum length to perform the operation successfully. /// public Result GetOverrideLocaleCode(out string outBuffer) { System.IntPtr outBufferAddress = System.IntPtr.Zero; int inOutBufferLength = LocalecodeMaxLength + 1; Helper.TryMarshalAllocate(ref outBufferAddress, inOutBufferLength); var funcResult = Bindings.EOS_Platform_GetOverrideLocaleCode(InnerHandle, outBufferAddress, ref inOutBufferLength); Helper.TryMarshalGet(outBufferAddress, out outBuffer); Helper.TryMarshalDispose(ref outBufferAddress); return funcResult; } /// /// Get a handle to the Peer-to-Peer Networking Interface. /// eos_p2p.h /// eos_p2p_types.h /// /// /// handle /// public P2P.P2PInterface GetP2PInterface() { var funcResult = Bindings.EOS_Platform_GetP2PInterface(InnerHandle); P2P.P2PInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the PlayerDataStorage Interface. /// eos_playerdatastorage.h /// eos_playerdatastorage_types.h /// /// /// handle /// public PlayerDataStorage.PlayerDataStorageInterface GetPlayerDataStorageInterface() { var funcResult = Bindings.EOS_Platform_GetPlayerDataStorageInterface(InnerHandle); PlayerDataStorage.PlayerDataStorageInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Presence Interface. /// eos_presence.h /// eos_presence_types.h /// /// /// handle /// public Presence.PresenceInterface GetPresenceInterface() { var funcResult = Bindings.EOS_Platform_GetPresenceInterface(InnerHandle); Presence.PresenceInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the RTC Admin interface /// eos_rtc_admin.h /// eos_admin_types.h /// /// /// handle /// public RTCAdmin.RTCAdminInterface GetRTCAdminInterface() { var funcResult = Bindings.EOS_Platform_GetRTCAdminInterface(InnerHandle); RTCAdmin.RTCAdminInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Real Time Communications Interface (RTC). /// From the RTC interface you can retrieve the handle to the audio interface (RTCAudio), which is a component of RTC. /// /// eos_rtc.h /// eos_rtc_types.h /// /// /// handle /// public RTC.RTCInterface GetRTCInterface() { var funcResult = Bindings.EOS_Platform_GetRTCInterface(InnerHandle); RTC.RTCInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Reports Interface. /// eos_reports.h /// eos_reports_types.h /// /// /// handle /// public Reports.ReportsInterface GetReportsInterface() { var funcResult = Bindings.EOS_Platform_GetReportsInterface(InnerHandle); Reports.ReportsInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Sanctions Interface. /// eos_sanctions.h /// eos_sanctions_types.h /// /// /// handle /// public Sanctions.SanctionsInterface GetSanctionsInterface() { var funcResult = Bindings.EOS_Platform_GetSanctionsInterface(InnerHandle); Sanctions.SanctionsInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Sessions Interface. /// eos_sessions.h /// eos_sessions_types.h /// /// /// handle /// public Sessions.SessionsInterface GetSessionsInterface() { var funcResult = Bindings.EOS_Platform_GetSessionsInterface(InnerHandle); Sessions.SessionsInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the Stats Interface. /// eos_stats.h /// eos_stats_types.h /// /// /// handle /// public Stats.StatsInterface GetStatsInterface() { var funcResult = Bindings.EOS_Platform_GetStatsInterface(InnerHandle); Stats.StatsInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the TitleStorage Interface. /// eos_titlestorage.h /// eos_titlestorage_types.h /// /// /// handle /// public TitleStorage.TitleStorageInterface GetTitleStorageInterface() { var funcResult = Bindings.EOS_Platform_GetTitleStorageInterface(InnerHandle); TitleStorage.TitleStorageInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the UI Interface. /// eos_ui.h /// eos_ui_types.h /// /// /// handle /// public UI.UIInterface GetUIInterface() { var funcResult = Bindings.EOS_Platform_GetUIInterface(InnerHandle); UI.UIInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Get a handle to the UserInfo Interface. /// eos_userinfo.h /// eos_userinfo_types.h /// /// /// handle /// public UserInfo.UserInfoInterface GetUserInfoInterface() { var funcResult = Bindings.EOS_Platform_GetUserInfoInterface(InnerHandle); UserInfo.UserInfoInterface funcResultReturn; Helper.TryMarshalGet(funcResult, out funcResultReturn); return funcResultReturn; } /// /// Initialize the Epic Online Services SDK. /// /// Before calling any other function in the SDK, clients must call this function. /// /// This function must only be called one time and must have a corresponding call. /// /// - The initialization options to use for the SDK. /// /// An is returned to indicate success or an error. /// is returned if the SDK successfully initializes. /// is returned if the function has already been called. /// is returned if the provided options are invalid. /// public static Result Initialize(InitializeOptions options) { var optionsAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref optionsAddress, options); var funcResult = Bindings.EOS_Initialize(optionsAddress); Helper.TryMarshalDispose(ref optionsAddress); return funcResult; } /// /// Release an Epic Online Services platform instance previously returned from . /// /// This function should only be called once per instance returned by . 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 function. /// public void Release() { Bindings.EOS_Platform_Release(InnerHandle); } /// /// Set the override country code that the SDK will send to services which require it. /// This is not currently used for anything internally. /// eos_ecom.h /// /// /// /// An that indicates whether the override country code string was saved. /// if the country code was overridden /// if you pass an invalid country code /// public Result SetOverrideCountryCode(string newCountryCode) { var newCountryCodeAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref newCountryCodeAddress, newCountryCode); var funcResult = Bindings.EOS_Platform_SetOverrideCountryCode(InnerHandle, newCountryCodeAddress); Helper.TryMarshalDispose(ref newCountryCodeAddress); return funcResult; } /// /// Set the override locale code that the SDK will send to services which require it. /// This is used for localization. This follows ISO 639. /// eos_ecom.h /// /// /// /// An that indicates whether the override locale code string was saved. /// if the locale code was overridden /// if you pass an invalid locale code /// public Result SetOverrideLocaleCode(string newLocaleCode) { var newLocaleCodeAddress = System.IntPtr.Zero; Helper.TryMarshalSet(ref newLocaleCodeAddress, newLocaleCode); var funcResult = Bindings.EOS_Platform_SetOverrideLocaleCode(InnerHandle, newLocaleCodeAddress); Helper.TryMarshalDispose(ref newLocaleCodeAddress); return funcResult; } /// /// Tear down the Epic Online Services SDK. /// /// Once this function has been called, no more SDK calls are permitted; calling anything after will result in undefined behavior. /// /// /// An is returned to indicate success or an error. /// is returned if the SDK is successfully torn down. /// is returned if a successful call to has not been made. /// is returned if has already been called. /// public static Result Shutdown() { var funcResult = Bindings.EOS_Shutdown(); return funcResult; } /// /// 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 desireable to call this once per-tick. /// public void Tick() { Bindings.EOS_Platform_Tick(InnerHandle); } } }