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.

95 lines
2.0 KiB

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Connect
{
/// <summary>
/// A structure that contains external login credentials.
///
/// This is part of the input structure <see cref="LoginOptions" />.
/// <seealso cref="ExternalCredentialType" />
/// <seealso cref="ConnectInterface.Login" />
/// </summary>
public struct Credentials
{
/// <summary>
/// External token associated with the user logging in.
/// </summary>
public Utf8String Token { get; set; }
/// <summary>
/// Type of external login; identifies the auth method to use.
/// </summary>
public ExternalCredentialType Type { get; set; }
internal void Set(ref CredentialsInternal other)
{
Token = other.Token;
Type = other.Type;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CredentialsInternal : IGettable<Credentials>, ISettable<Credentials>, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_Token;
private ExternalCredentialType m_Type;
public Utf8String Token
{
get
{
Utf8String value;
Helper.Get(m_Token, out value);
return value;
}
set
{
Helper.Set(value, ref m_Token);
}
}
public ExternalCredentialType Type
{
get
{
return m_Type;
}
set
{
m_Type = value;
}
}
public void Set(ref Credentials other)
{
m_ApiVersion = ConnectInterface.CredentialsApiLatest;
Token = other.Token;
Type = other.Type;
}
public void Set(ref Credentials? other)
{
if (other.HasValue)
{
m_ApiVersion = ConnectInterface.CredentialsApiLatest;
Token = other.Value.Token;
Type = other.Value.Type;
}
}
public void Dispose()
{
Helper.Dispose(ref m_Token);
}
public void Get(out Credentials output)
{
output = new Credentials();
output.Set(ref this);
}
}
}