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.

255 lines
7.9 KiB

// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Lobby
{
/// <summary>
/// Input parameters for the <see cref="LobbyInterface.CreateLobby" /> function.
/// </summary>
public struct CreateLobbyOptions
{
/// <summary>
/// The Product User ID of the local user creating the lobby; this user will automatically join the lobby as its owner
/// </summary>
public ProductUserId LocalUserId { get; set; }
/// <summary>
/// The maximum number of users who can be in the lobby at a time
/// </summary>
public uint MaxLobbyMembers { get; set; }
/// <summary>
/// The initial permission level of the lobby
/// </summary>
public LobbyPermissionLevel PermissionLevel { get; set; }
/// <summary>
/// If true, this lobby will be associated with presence information. A user's presence can only be associated with one lobby at a time.
/// This affects the ability of the Social Overlay to show game related actions to take in the user's social graph.
/// The Social Overlay can handle only one of the following three options at a time:
/// using the bPresenceEnabled flags within the Sessions interface
/// using the bPresenceEnabled flags within the Lobby interface
/// using EOS_PresenceModification_SetJoinInfo
/// <seealso cref="Presence.PresenceModificationSetJoinInfoOptions" />
/// <seealso cref="JoinLobbyOptions" />
/// <seealso cref="JoinLobbyByIdOptions" />
/// <seealso cref="Sessions.CreateSessionModificationOptions" />
/// <seealso cref="Sessions.JoinSessionOptions" />
/// </summary>
public bool PresenceEnabled { get; set; }
/// <summary>
/// Are members of the lobby allowed to invite others
/// </summary>
public bool AllowInvites { get; set; }
/// <summary>
/// Bucket ID associated with the lobby
/// </summary>
public Utf8String BucketId { get; set; }
/// <summary>
/// Is host migration allowed (will the lobby stay open if the original host leaves?)
/// NOTE: <see cref="LobbyInterface.PromoteMember" /> is still allowed regardless of this setting
/// </summary>
public bool DisableHostMigration { get; set; }
/// <summary>
/// Creates a real-time communication (RTC) room for all members of this lobby. All members of the lobby will automatically join the RTC
/// room when they connect to the lobby and they will automatically leave the RTC room when they leave or are removed from the lobby.
/// While the joining and leaving of the RTC room is automatic, applications will still need to use the EOS RTC interfaces to handle all
/// other functionality for the room.
/// <seealso cref="LobbyInterface.GetRTCRoomName" />
/// <seealso cref="LobbyInterface.AddNotifyRTCRoomConnectionChanged" />
/// </summary>
public bool EnableRTCRoom { get; set; }
/// <summary>
/// (Optional) Allows the local application to set local audio options for the RTC Room if it is enabled. Set this to <see langword="null" /> if the RTC
/// RTC room is disabled or you would like to use the defaults.
/// </summary>
public LocalRTCOptions? LocalRTCOptions { get; set; }
/// <summary>
/// (Optional) Set to a globally unique value to override the backend assignment
/// If not specified the backend service will assign one to the lobby. Do not mix and match override and non override settings.
/// This value can be of size [<see cref="LobbyInterface.MinLobbyidoverrideLength" />, <see cref="LobbyInterface.MaxLobbyidoverrideLength" />]
/// </summary>
public Utf8String LobbyId { get; set; }
/// <summary>
/// Is <see cref="LobbyInterface.JoinLobbyById" /> allowed.
/// This is provided to support cases where an integrated platform's invite system is used.
/// In these cases the game should provide the lobby ID securely to the invited player. Such as by attaching the
/// lobby ID to the integrated platform's session data or sending the lobby ID within the invite data.
/// </summary>
public bool EnableJoinById { get; set; }
/// <summary>
/// Does rejoining after being kicked require an invite?
/// When this is set, a kicked player cannot return to the session even if the session was set with
/// <see cref="LobbyPermissionLevel.Publicadvertised" />. When this is set, a player with invite privileges must use <see cref="LobbyInterface.SendInvite" /> to
/// allow the kicked player to return to the session.
/// </summary>
public bool RejoinAfterKickRequiresInvite { get; set; }
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)]
internal struct CreateLobbyOptionsInternal : ISettable<CreateLobbyOptions>, System.IDisposable
{
private int m_ApiVersion;
private System.IntPtr m_LocalUserId;
private uint m_MaxLobbyMembers;
private LobbyPermissionLevel m_PermissionLevel;
private int m_PresenceEnabled;
private int m_AllowInvites;
private System.IntPtr m_BucketId;
private int m_DisableHostMigration;
private int m_EnableRTCRoom;
private System.IntPtr m_LocalRTCOptions;
private System.IntPtr m_LobbyId;
private int m_EnableJoinById;
private int m_RejoinAfterKickRequiresInvite;
public ProductUserId LocalUserId
{
set
{
Helper.Set(value, ref m_LocalUserId);
}
}
public uint MaxLobbyMembers
{
set
{
m_MaxLobbyMembers = value;
}
}
public LobbyPermissionLevel PermissionLevel
{
set
{
m_PermissionLevel = value;
}
}
public bool PresenceEnabled
{
set
{
Helper.Set(value, ref m_PresenceEnabled);
}
}
public bool AllowInvites
{
set
{
Helper.Set(value, ref m_AllowInvites);
}
}
public Utf8String BucketId
{
set
{
Helper.Set(value, ref m_BucketId);
}
}
public bool DisableHostMigration
{
set
{
Helper.Set(value, ref m_DisableHostMigration);
}
}
public bool EnableRTCRoom
{
set
{
Helper.Set(value, ref m_EnableRTCRoom);
}
}
public LocalRTCOptions? LocalRTCOptions
{
set
{
Helper.Set<LocalRTCOptions, LocalRTCOptionsInternal>(ref value, ref m_LocalRTCOptions);
}
}
public Utf8String LobbyId
{
set
{
Helper.Set(value, ref m_LobbyId);
}
}
public bool EnableJoinById
{
set
{
Helper.Set(value, ref m_EnableJoinById);
}
}
public bool RejoinAfterKickRequiresInvite
{
set
{
Helper.Set(value, ref m_RejoinAfterKickRequiresInvite);
}
}
public void Set(ref CreateLobbyOptions other)
{
m_ApiVersion = LobbyInterface.CreatelobbyApiLatest;
LocalUserId = other.LocalUserId;
MaxLobbyMembers = other.MaxLobbyMembers;
PermissionLevel = other.PermissionLevel;
PresenceEnabled = other.PresenceEnabled;
AllowInvites = other.AllowInvites;
BucketId = other.BucketId;
DisableHostMigration = other.DisableHostMigration;
EnableRTCRoom = other.EnableRTCRoom;
LocalRTCOptions = other.LocalRTCOptions;
LobbyId = other.LobbyId;
EnableJoinById = other.EnableJoinById;
RejoinAfterKickRequiresInvite = other.RejoinAfterKickRequiresInvite;
}
public void Set(ref CreateLobbyOptions? other)
{
if (other.HasValue)
{
m_ApiVersion = LobbyInterface.CreatelobbyApiLatest;
LocalUserId = other.Value.LocalUserId;
MaxLobbyMembers = other.Value.MaxLobbyMembers;
PermissionLevel = other.Value.PermissionLevel;
PresenceEnabled = other.Value.PresenceEnabled;
AllowInvites = other.Value.AllowInvites;
BucketId = other.Value.BucketId;
DisableHostMigration = other.Value.DisableHostMigration;
EnableRTCRoom = other.Value.EnableRTCRoom;
LocalRTCOptions = other.Value.LocalRTCOptions;
LobbyId = other.Value.LobbyId;
EnableJoinById = other.Value.EnableJoinById;
RejoinAfterKickRequiresInvite = other.Value.RejoinAfterKickRequiresInvite;
}
}
public void Dispose()
{
Helper.Dispose(ref m_LocalUserId);
Helper.Dispose(ref m_BucketId);
Helper.Dispose(ref m_LocalRTCOptions);
Helper.Dispose(ref m_LobbyId);
}
}
}