You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.1 KiB

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Auth
{
/// <summary>
/// Input parameters for the <see cref="AuthInterface.LinkAccount" /> function.
/// </summary>
public class LinkAccountOptions
{
/// <summary>
/// Combination of the enumeration flags to specify how the account linking operation will be performed.
/// </summary>
public LinkAccountFlags LinkAccountFlags { get; set; }
/// <summary>
/// Continuance token received from a previous call to the <see cref="AuthInterface.Login" /> API.
///
/// A continuance token is received in the case when the external account used for login was not found to be linked
/// against any existing Epic Account. In such case, the application needs to proceed with an account linking operation in which case
/// the user is first asked to create a new account or login into their existing Epic Account, and then link their external account to it.
/// Alternatively, the application may suggest the user to login using another external account that they have already linked to their existing Epic Account.
/// In this flow, the external account is typically the currently logged in local platform user account.
/// It can also be another external user account that the user is offered to login with.
/// </summary>
public ContinuanceToken ContinuanceToken { get; set; }
/// <summary>
/// The Epic Online Services Account ID of the logged in local user whose Epic Account will be linked with the local Nintendo NSA ID Account. By default set to NULL.
///
/// This parameter is only used and required to be set when <see cref="LinkAccountFlags" />::<see cref="LinkAccountFlags.NintendoNsaId" /> is specified.
/// Otherwise, set to NULL, as the standard account linking and login flow using continuance token will handle logging in the user to their Epic Account.
/// </summary>
public EpicAccountId LocalUserId { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct LinkAccountOptionsInternal : ISettable, System.IDisposable
{
private int m_ApiVersion;
private LinkAccountFlags m_LinkAccountFlags;
private System.IntPtr m_ContinuanceToken;
private System.IntPtr m_LocalUserId;
public LinkAccountFlags LinkAccountFlags
{
set
{
m_LinkAccountFlags = value;
}
}
public ContinuanceToken ContinuanceToken
{
set
{
Helper.TryMarshalSet(ref m_ContinuanceToken, value);
}
}
public EpicAccountId LocalUserId
{
set
{
Helper.TryMarshalSet(ref m_LocalUserId, value);
}
}
public void Set(LinkAccountOptions other)
{
if (other != null)
{
m_ApiVersion = AuthInterface.LinkaccountApiLatest;
LinkAccountFlags = other.LinkAccountFlags;
ContinuanceToken = other.ContinuanceToken;
LocalUserId = other.LocalUserId;
}
}
public void Set(object other)
{
Set(other as LinkAccountOptions);
}
public void Dispose()
{
Helper.TryMarshalDispose(ref m_ContinuanceToken);
Helper.TryMarshalDispose(ref m_LocalUserId);
}
}
}