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.

126 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.Lobby
{
public class RTCRoomConnectionChangedCallbackInfo : ICallbackInfo, ISettable
{
/// <summary>
/// Context that was passed into <see cref="LobbyInterface.AddNotifyRTCRoomConnectionChanged" />
/// </summary>
public object ClientData { get; private set; }
/// <summary>
/// The ID of the lobby which had a RTC Room connection state change
/// </summary>
public string LobbyId { get; private set; }
/// <summary>
/// The Product User ID of the local user who is in the lobby and registered for notifications
/// </summary>
public ProductUserId LocalUserId { get; private set; }
/// <summary>
/// The new connection state of the room
/// </summary>
public bool IsConnected { get; private set; }
/// <summary>
/// <see cref="Result.Success" />: The room was left locally. This may be because: the associated lobby was Left or Destroyed, the connection to the lobby was interrupted, or because the SDK is being shutdown. If the lobby connection returns (lobby did not permanently go away), we will reconnect.
/// <see cref="Result.NoConnection" />: There was a network issue connecting to the server. We will attempt to reconnect soon.
/// <see cref="Result.UserKicked" />: The user has been kicked by the server. We will not reconnect.
/// <see cref="Result.UserBanned" />: The user has been banned by the server. We will not reconnect.
/// <see cref="Result.ServiceFailure" />: A known error occurred during interaction with the server. We will attempt to reconnect soon.
/// <see cref="Result.UnexpectedError" />: Unexpected error. We will attempt to reconnect soon.
/// </summary>
public Result DisconnectReason { get; private set; }
public Result? GetResultCode()
{
return null;
}
internal void Set(RTCRoomConnectionChangedCallbackInfoInternal? other)
{
if (other != null)
{
ClientData = other.Value.ClientData;
LobbyId = other.Value.LobbyId;
LocalUserId = other.Value.LocalUserId;
IsConnected = other.Value.IsConnected;
DisconnectReason = other.Value.DisconnectReason;
}
}
public void Set(object other)
{
Set(other as RTCRoomConnectionChangedCallbackInfoInternal?);
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct RTCRoomConnectionChangedCallbackInfoInternal : ICallbackInfoInternal
{
private System.IntPtr m_ClientData;
private System.IntPtr m_LobbyId;
private System.IntPtr m_LocalUserId;
private int m_IsConnected;
private Result m_DisconnectReason;
public object ClientData
{
get
{
object value;
Helper.TryMarshalGet(m_ClientData, out value);
return value;
}
}
public System.IntPtr ClientDataAddress
{
get
{
return m_ClientData;
}
}
public string LobbyId
{
get
{
string value;
Helper.TryMarshalGet(m_LobbyId, out value);
return value;
}
}
public ProductUserId LocalUserId
{
get
{
ProductUserId value;
Helper.TryMarshalGet(m_LocalUserId, out value);
return value;
}
}
public bool IsConnected
{
get
{
bool value;
Helper.TryMarshalGet(m_IsConnected, out value);
return value;
}
}
public Result DisconnectReason
{
get
{
return m_DisconnectReason;
}
}
}
}