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.

231 lines
5.8 KiB

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.RTC
{
/// <summary>
/// This struct is passed in with a call to <see cref="RTCInterface.AddNotifyParticipantStatusChanged" /> registered event.
/// </summary>
public struct ParticipantStatusChangedCallbackInfo : ICallbackInfo
{
/// <summary>
/// Client-specified data passed into <see cref="RTCInterface.AddNotifyParticipantStatusChanged" />.
/// </summary>
public object ClientData { get; set; }
/// <summary>
/// The Product User ID of the user who initiated this request.
/// </summary>
public ProductUserId LocalUserId { get; set; }
/// <summary>
/// The room associated with this event.
/// </summary>
public Utf8String RoomName { get; set; }
/// <summary>
/// The participant whose status changed.
/// </summary>
public ProductUserId ParticipantId { get; set; }
/// <summary>
/// What status change occurred
/// </summary>
public RTCParticipantStatus ParticipantStatus { get; set; }
/// <summary>
/// The participant metadata items.
/// This is only set for the first notification where ParticipantStatus is <see cref="RTCParticipantStatus.Joined" />. Subsequent notifications
/// such as when bParticipantInBlocklist changes will not contain any metadata.
/// </summary>
public ParticipantMetadata[] ParticipantMetadata { get; set; }
/// <summary>
/// The participant's block list status, if ParticipantStatus is <see cref="RTCParticipantStatus.Joined" />.
/// This is set to true if the participant is in any of the local user's applicable block lists,
/// such Epic block list or any of the current platform's block lists.
/// It can be used to detect when an internal automatic RTC block is applied because of trust and safety restrictions.
/// </summary>
public bool ParticipantInBlocklist { get; set; }
public Result? GetResultCode()
{
return null;
}
internal void Set(ref ParticipantStatusChangedCallbackInfoInternal other)
{
ClientData = other.ClientData;
LocalUserId = other.LocalUserId;
RoomName = other.RoomName;
ParticipantId = other.ParticipantId;
ParticipantStatus = other.ParticipantStatus;
ParticipantMetadata = other.ParticipantMetadata;
ParticipantInBlocklist = other.ParticipantInBlocklist;
}
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct ParticipantStatusChangedCallbackInfoInternal : ICallbackInfoInternal, IGettable<ParticipantStatusChangedCallbackInfo>, ISettable<ParticipantStatusChangedCallbackInfo>, System.IDisposable
{
private System.IntPtr m_ClientData;
private System.IntPtr m_LocalUserId;
private System.IntPtr m_RoomName;
private System.IntPtr m_ParticipantId;
private RTCParticipantStatus m_ParticipantStatus;
private uint m_ParticipantMetadataCount;
private System.IntPtr m_ParticipantMetadata;
private int m_ParticipantInBlocklist;
public object ClientData
{
get
{
object value;
Helper.Get(m_ClientData, out value);
return value;
}
set
{
Helper.Set(value, ref m_ClientData);
}
}
public System.IntPtr ClientDataAddress
{
get
{
return m_ClientData;
}
}
public ProductUserId LocalUserId
{
get
{
ProductUserId value;
Helper.Get(m_LocalUserId, out value);
return value;
}
set
{
Helper.Set(value, ref m_LocalUserId);
}
}
public Utf8String RoomName
{
get
{
Utf8String value;
Helper.Get(m_RoomName, out value);
return value;
}
set
{
Helper.Set(value, ref m_RoomName);
}
}
public ProductUserId ParticipantId
{
get
{
ProductUserId value;
Helper.Get(m_ParticipantId, out value);
return value;
}
set
{
Helper.Set(value, ref m_ParticipantId);
}
}
public RTCParticipantStatus ParticipantStatus
{
get
{
return m_ParticipantStatus;
}
set
{
m_ParticipantStatus = value;
}
}
public ParticipantMetadata[] ParticipantMetadata
{
get
{
ParticipantMetadata[] value;
Helper.Get<ParticipantMetadataInternal, ParticipantMetadata>(m_ParticipantMetadata, out value, m_ParticipantMetadataCount);
return value;
}
set
{
Helper.Set<ParticipantMetadata, ParticipantMetadataInternal>(ref value, ref m_ParticipantMetadata, out m_ParticipantMetadataCount);
}
}
public bool ParticipantInBlocklist
{
get
{
bool value;
Helper.Get(m_ParticipantInBlocklist, out value);
return value;
}
set
{
Helper.Set(value, ref m_ParticipantInBlocklist);
}
}
public void Set(ref ParticipantStatusChangedCallbackInfo other)
{
ClientData = other.ClientData;
LocalUserId = other.LocalUserId;
RoomName = other.RoomName;
ParticipantId = other.ParticipantId;
ParticipantStatus = other.ParticipantStatus;
ParticipantMetadata = other.ParticipantMetadata;
ParticipantInBlocklist = other.ParticipantInBlocklist;
}
public void Set(ref ParticipantStatusChangedCallbackInfo? other)
{
if (other.HasValue)
{
ClientData = other.Value.ClientData;
LocalUserId = other.Value.LocalUserId;
RoomName = other.Value.RoomName;
ParticipantId = other.Value.ParticipantId;
ParticipantStatus = other.Value.ParticipantStatus;
ParticipantMetadata = other.Value.ParticipantMetadata;
ParticipantInBlocklist = other.Value.ParticipantInBlocklist;
}
}
public void Dispose()
{
Helper.Dispose(ref m_ClientData);
Helper.Dispose(ref m_LocalUserId);
Helper.Dispose(ref m_RoomName);
Helper.Dispose(ref m_ParticipantId);
Helper.Dispose(ref m_ParticipantMetadata);
}
public void Get(out ParticipantStatusChangedCallbackInfo output)
{
output = new ParticipantStatusChangedCallbackInfo();
output.Set(ref this);
}
}
}