// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.UserInfo
{
public sealed partial class UserInfoInterface : Handle
{
public UserInfoInterface()
{
}
public UserInfoInterface(System.IntPtr innerHandle) : base(innerHandle)
{
}
///
/// The most recent version of the struct.
///
public const int CopyexternaluserinfobyaccountidApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int CopyexternaluserinfobyaccounttypeApiLatest = 1;
///
/// The most recent version of the struct.
///
public const int CopyexternaluserinfobyindexApiLatest = 1;
///
/// The most recent version of the API.
///
public const int CopyuserinfoApiLatest = 3;
///
/// The most recent version of the struct.
///
public const int ExternaluserinfoApiLatest = 2;
///
/// The most recent version of the API.
///
public const int GetexternaluserinfocountApiLatest = 1;
///
/// The maximum length of display names, in displayable characters
///
public const int MaxDisplaynameCharacters = 16;
///
/// The maximum length of display names when encoded as UTF-8 as returned by . This length does not include the null terminator.
///
public const int MaxDisplaynameUtf8Length = 64;
///
/// The most recent version of the API.
///
public const int QueryuserinfoApiLatest = 1;
///
/// The most recent version of the API.
///
public const int QueryuserinfobydisplaynameApiLatest = 1;
///
/// The most recent version of the API.
///
public const int QueryuserinfobyexternalaccountApiLatest = 1;
///
/// Fetches an external user info for a given external account ID.
///
///
/// Structure containing the account ID being accessed
/// The external user info. If it exists and is valid, use when finished
///
/// if the information is available and passed out in OutExternalUserInfo
/// if you pass a null pointer for the out parameter
/// if the external user info is not found
///
public Result CopyExternalUserInfoByAccountId(ref CopyExternalUserInfoByAccountIdOptions options, out ExternalUserInfo? outExternalUserInfo)
{
CopyExternalUserInfoByAccountIdOptionsInternal optionsInternal = new CopyExternalUserInfoByAccountIdOptionsInternal();
optionsInternal.Set(ref options);
var outExternalUserInfoAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_UserInfo_CopyExternalUserInfoByAccountId(InnerHandle, ref optionsInternal, ref outExternalUserInfoAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get(outExternalUserInfoAddress, out outExternalUserInfo);
if (outExternalUserInfo != null)
{
Bindings.EOS_UserInfo_ExternalUserInfo_Release(outExternalUserInfoAddress);
}
return funcResult;
}
///
/// Fetches an external user info for a given external account type.
///
///
/// Structure containing the account type being accessed
/// The external user info. If it exists and is valid, use when finished
///
/// if the information is available and passed out in OutExternalUserInfo
/// if you pass a null pointer for the out parameter
/// if the external user info is not found
///
public Result CopyExternalUserInfoByAccountType(ref CopyExternalUserInfoByAccountTypeOptions options, out ExternalUserInfo? outExternalUserInfo)
{
CopyExternalUserInfoByAccountTypeOptionsInternal optionsInternal = new CopyExternalUserInfoByAccountTypeOptionsInternal();
optionsInternal.Set(ref options);
var outExternalUserInfoAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_UserInfo_CopyExternalUserInfoByAccountType(InnerHandle, ref optionsInternal, ref outExternalUserInfoAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get(outExternalUserInfoAddress, out outExternalUserInfo);
if (outExternalUserInfo != null)
{
Bindings.EOS_UserInfo_ExternalUserInfo_Release(outExternalUserInfoAddress);
}
return funcResult;
}
///
/// Fetches an external user info from a given index.
///
///
/// Structure containing the index being accessed
/// The external user info. If it exists and is valid, use when finished
///
/// if the information is available and passed out in OutExternalUserInfo
/// if you pass a null pointer for the out parameter
/// if the external user info is not found
///
public Result CopyExternalUserInfoByIndex(ref CopyExternalUserInfoByIndexOptions options, out ExternalUserInfo? outExternalUserInfo)
{
CopyExternalUserInfoByIndexOptionsInternal optionsInternal = new CopyExternalUserInfoByIndexOptionsInternal();
optionsInternal.Set(ref options);
var outExternalUserInfoAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_UserInfo_CopyExternalUserInfoByIndex(InnerHandle, ref optionsInternal, ref outExternalUserInfoAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get(outExternalUserInfoAddress, out outExternalUserInfo);
if (outExternalUserInfo != null)
{
Bindings.EOS_UserInfo_ExternalUserInfo_Release(outExternalUserInfoAddress);
}
return funcResult;
}
///
/// is used to immediately retrieve a copy of user information based on an Epic Account ID, cached by a previous call to .
/// If the call returns an result, the out parameter, OutUserInfo, must be passed to to release the memory associated with it.
///
///
///
///
/// structure containing the input parameters
/// out parameter used to receive the structure.
///
/// if the information is available and passed out in OutUserInfo
/// if you pass a null pointer for the out parameter
/// if the API version passed in is incorrect
/// if the user info is not locally cached. The information must have been previously cached by a call to
///
public Result CopyUserInfo(ref CopyUserInfoOptions options, out UserInfoData? outUserInfo)
{
CopyUserInfoOptionsInternal optionsInternal = new CopyUserInfoOptionsInternal();
optionsInternal.Set(ref options);
var outUserInfoAddress = System.IntPtr.Zero;
var funcResult = Bindings.EOS_UserInfo_CopyUserInfo(InnerHandle, ref optionsInternal, ref outUserInfoAddress);
Helper.Dispose(ref optionsInternal);
Helper.Get(outUserInfoAddress, out outUserInfo);
if (outUserInfo != null)
{
Bindings.EOS_UserInfo_Release(outUserInfoAddress);
}
return funcResult;
}
///
/// Fetch the number of external user infos that are cached locally.
///
///
/// The options associated with retrieving the external user info count
///
/// The number of external user infos, or 0 if there is an error
///
public uint GetExternalUserInfoCount(ref GetExternalUserInfoCountOptions options)
{
GetExternalUserInfoCountOptionsInternal optionsInternal = new GetExternalUserInfoCountOptionsInternal();
optionsInternal.Set(ref options);
var funcResult = Bindings.EOS_UserInfo_GetExternalUserInfoCount(InnerHandle, ref optionsInternal);
Helper.Dispose(ref optionsInternal);
return funcResult;
}
///
/// is used to start an asynchronous query to retrieve information, such as display name, about another account.
/// Once the callback has been fired with a successful ResultCode, it is possible to call to receive an containing the available information.
///
///
///
///
///
/// structure containing the input parameters
/// arbitrary data that is passed back to you in the CompletionDelegate
/// a callback that is fired when the async operation completes, either successfully or in error
public void QueryUserInfo(ref QueryUserInfoOptions options, object clientData, OnQueryUserInfoCallback completionDelegate)
{
QueryUserInfoOptionsInternal optionsInternal = new QueryUserInfoOptionsInternal();
optionsInternal.Set(ref options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryUserInfoCallbackInternal(OnQueryUserInfoCallbackInternalImplementation);
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_UserInfo_QueryUserInfo(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
Helper.Dispose(ref optionsInternal);
}
///
/// is used to start an asynchronous query to retrieve user information by display name. This can be useful for getting the for a display name.
/// Once the callback has been fired with a successful ResultCode, it is possible to call to receive an containing the available information.
///
///
///
///
///
/// structure containing the input parameters
/// arbitrary data that is passed back to you in the CompletionDelegate
/// a callback that is fired when the async operation completes, either successfully or in error
public void QueryUserInfoByDisplayName(ref QueryUserInfoByDisplayNameOptions options, object clientData, OnQueryUserInfoByDisplayNameCallback completionDelegate)
{
QueryUserInfoByDisplayNameOptionsInternal optionsInternal = new QueryUserInfoByDisplayNameOptionsInternal();
optionsInternal.Set(ref options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryUserInfoByDisplayNameCallbackInternal(OnQueryUserInfoByDisplayNameCallbackInternalImplementation);
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_UserInfo_QueryUserInfoByDisplayName(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
Helper.Dispose(ref optionsInternal);
}
///
/// is used to start an asynchronous query to retrieve user information by external accounts.
/// This can be useful for getting the for external accounts.
/// Once the callback has been fired with a successful ResultCode, it is possible to call CopyUserInfo to receive an containing the available information.
///
///
///
///
/// structure containing the input parameters
/// arbitrary data that is passed back to you in the CompletionDelegate
/// a callback that is fired when the async operation completes, either successfully or in error
public void QueryUserInfoByExternalAccount(ref QueryUserInfoByExternalAccountOptions options, object clientData, OnQueryUserInfoByExternalAccountCallback completionDelegate)
{
QueryUserInfoByExternalAccountOptionsInternal optionsInternal = new QueryUserInfoByExternalAccountOptionsInternal();
optionsInternal.Set(ref options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnQueryUserInfoByExternalAccountCallbackInternal(OnQueryUserInfoByExternalAccountCallbackInternalImplementation);
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_UserInfo_QueryUserInfoByExternalAccount(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
Helper.Dispose(ref optionsInternal);
}
[MonoPInvokeCallback(typeof(OnQueryUserInfoByDisplayNameCallbackInternal))]
internal static void OnQueryUserInfoByDisplayNameCallbackInternalImplementation(ref QueryUserInfoByDisplayNameCallbackInfoInternal data)
{
OnQueryUserInfoByDisplayNameCallback callback;
QueryUserInfoByDisplayNameCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
{
callback(ref callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryUserInfoByExternalAccountCallbackInternal))]
internal static void OnQueryUserInfoByExternalAccountCallbackInternalImplementation(ref QueryUserInfoByExternalAccountCallbackInfoInternal data)
{
OnQueryUserInfoByExternalAccountCallback callback;
QueryUserInfoByExternalAccountCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
{
callback(ref callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnQueryUserInfoCallbackInternal))]
internal static void OnQueryUserInfoCallbackInternalImplementation(ref QueryUserInfoCallbackInfoInternal data)
{
OnQueryUserInfoCallback callback;
QueryUserInfoCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(ref data, out callback, out callbackInfo))
{
callback(ref callbackInfo);
}
}
}
}