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.

143 lines
3.4 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>
/// Intermediate data needed to complete the <see cref="LoginCredentialType.DeviceCode" /> and <see cref="LoginCredentialType.ExternalAuth" /> login flows, returned by <see cref="LoginCallbackInfo" />.
/// The data inside should be exposed to the user for entry on a secondary device.
/// All data must be copied out before the completion of this callback.
/// </summary>
public struct PinGrantInfo
{
/// <summary>
/// Code the user must input on an external device to activate the login
/// </summary>
public Utf8String UserCode { get; set; }
/// <summary>
/// The end-user verification URI. Users can be asked to manually type this into their browser.
/// </summary>
public Utf8String VerificationURI { get; set; }
/// <summary>
/// Time the user has, in seconds, to complete the process or else timeout
/// </summary>
public int ExpiresIn { get; set; }
/// <summary>
/// A verification URI that includes the user code. Useful for non-textual transmission.
/// </summary>
public Utf8String VerificationURIComplete { get; set; }
internal void Set(ref PinGrantInfoInternal other)
{
UserCode = other.UserCode;
VerificationURI = other.VerificationURI;
ExpiresIn = other.ExpiresIn;
VerificationURIComplete = other.VerificationURIComplete;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct PinGrantInfoInternal : IGettable<PinGrantInfo>, ISettable<PinGrantInfo>, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_UserCode;
private System.IntPtr m_VerificationURI;
private int m_ExpiresIn;
private System.IntPtr m_VerificationURIComplete;
public Utf8String UserCode
{
get
{
Utf8String value;
Helper.Get(m_UserCode, out value);
return value;
}
set
{
Helper.Set(value, ref m_UserCode);
}
}
public Utf8String VerificationURI
{
get
{
Utf8String value;
Helper.Get(m_VerificationURI, out value);
return value;
}
set
{
Helper.Set(value, ref m_VerificationURI);
}
}
public int ExpiresIn
{
get
{
return m_ExpiresIn;
}
set
{
m_ExpiresIn = value;
}
}
public Utf8String VerificationURIComplete
{
get
{
Utf8String value;
Helper.Get(m_VerificationURIComplete, out value);
return value;
}
set
{
Helper.Set(value, ref m_VerificationURIComplete);
}
}
public void Set(ref PinGrantInfo other)
{
m_ApiVersion = AuthInterface.PingrantinfoApiLatest;
UserCode = other.UserCode;
VerificationURI = other.VerificationURI;
ExpiresIn = other.ExpiresIn;
VerificationURIComplete = other.VerificationURIComplete;
}
public void Set(ref PinGrantInfo? other)
{
if (other.HasValue)
{
m_ApiVersion = AuthInterface.PingrantinfoApiLatest;
UserCode = other.Value.UserCode;
VerificationURI = other.Value.VerificationURI;
ExpiresIn = other.Value.ExpiresIn;
VerificationURIComplete = other.Value.VerificationURIComplete;
}
}
public void Dispose()
{
Helper.Dispose(ref m_UserCode);
Helper.Dispose(ref m_VerificationURI);
Helper.Dispose(ref m_VerificationURIComplete);
}
public void Get(out PinGrantInfo output)
{
output = new PinGrantInfo();
output.Set(ref this);
}
}
}