// Copyright Epic Games, Inc. All Rights Reserved.
// This file is automatically generated. Changes to this file may be overwritten.
namespace Epic.OnlineServices.Sessions
{
public sealed partial class SessionModification : Handle
{
public SessionModification()
{
}
public SessionModification(System.IntPtr innerHandle) : base(innerHandle)
{
}
///
/// The most recent version of the API.
///
public const int SessionmodificationAddattributeApiLatest = 1;
///
/// Maximum length of the name of the attribute associated with the session
///
public const int SessionmodificationMaxSessionAttributeLength = 64;
///
/// Maximum number of attributes allowed on the session
///
public const int SessionmodificationMaxSessionAttributes = 64;
///
/// Maximum number of characters allowed in the session id override
///
public const int SessionmodificationMaxSessionidoverrideLength = 64;
///
/// Minimum number of characters allowed in the session id override
///
public const int SessionmodificationMinSessionidoverrideLength = 16;
///
/// The most recent version of the API.
///
public const int SessionmodificationRemoveattributeApiLatest = 1;
///
/// The most recent version of the API.
///
public const int SessionmodificationSetbucketidApiLatest = 1;
///
/// The most recent version of the API.
///
public const int SessionmodificationSethostaddressApiLatest = 1;
///
/// The most recent version of the API.
///
public const int SessionmodificationSetinvitesallowedApiLatest = 1;
///
/// The most recent version of the API.
///
public const int SessionmodificationSetjoininprogressallowedApiLatest = 1;
///
/// The most recent version of the API.
///
public const int SessionmodificationSetmaxplayersApiLatest = 1;
///
/// The most recent version of the API.
///
public const int SessionmodificationSetpermissionlevelApiLatest = 1;
///
/// Associate an attribute with this session
/// An attribute is something that may or may not be advertised with the session.
/// If advertised, it can be queried for in a search, otherwise the data remains local to the client
///
/// Options to set the attribute and its advertised state
///
/// if setting this parameter was successful
/// if the attribution is missing information or otherwise invalid
/// if the API version passed in is incorrect
///
public Result AddAttribute(SessionModificationAddAttributeOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_SessionModification_AddAttribute(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Release the memory associated with session modification.
/// This must be called on data retrieved from or
///
///
///
/// - The session modification handle to release
public void Release()
{
Bindings.EOS_SessionModification_Release(InnerHandle);
}
///
/// Remove an attribute from this session
///
/// Specify the key of the attribute to remove
///
/// if removing this parameter was successful
/// if the key is null or empty
/// if the API version passed in is incorrect
///
public Result RemoveAttribute(SessionModificationRemoveAttributeOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_SessionModification_RemoveAttribute(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Set the bucket ID associated with this session.
/// Values such as region, game mode, etc can be combined here depending on game need.
/// Setting this is strongly recommended to improve search performance.
///
/// Options associated with the bucket ID of the session
///
/// if setting this parameter was successful
/// if the bucket ID is invalid or null
/// if the API version passed in is incorrect
///
public Result SetBucketId(SessionModificationSetBucketIdOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_SessionModification_SetBucketId(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Set the host address associated with this session
/// Setting this is optional, if the value is not set the SDK will fill the value in from the service.
/// It is useful to set if other addressing mechanisms are desired or if LAN addresses are preferred during development
///
/// @note No validation of this value occurs to allow for flexibility in addressing methods
///
/// Options associated with the host address of the session
///
/// if setting this parameter was successful
/// if the host ID is an empty string
/// if the API version passed in is incorrect
///
public Result SetHostAddress(SessionModificationSetHostAddressOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_SessionModification_SetHostAddress(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Allows enabling or disabling invites for this session.
/// The session will also need to have `bPresenceEnabled` true.
///
/// Options associated with invites allowed flag for this session.
///
/// if setting this parameter was successful
/// if the API version passed in is incorrect
///
public Result SetInvitesAllowed(SessionModificationSetInvitesAllowedOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_SessionModification_SetInvitesAllowed(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Set whether or not join in progress is allowed
/// Once a session is started, it will no longer be visible to search queries unless this flag is set or the session returns to the pending or ended state
///
/// Options associated with setting the join in progress state the session
///
/// if setting this parameter was successful
/// if the API version passed in is incorrect
///
public Result SetJoinInProgressAllowed(SessionModificationSetJoinInProgressAllowedOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_SessionModification_SetJoinInProgressAllowed(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Set the maximum number of players allowed in this session.
/// When updating the session, it is not possible to reduce this number below the current number of existing players
///
/// Options associated with max number of players in this session
///
/// if setting this parameter was successful
/// if the API version passed in is incorrect
///
public Result SetMaxPlayers(SessionModificationSetMaxPlayersOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_SessionModification_SetMaxPlayers(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Set the session permissions associated with this session.
/// The permissions range from "public" to "invite only" and are described by
///
/// Options associated with the permission level of the session
///
/// if setting this parameter was successful
/// if the API version passed in is incorrect
///
public Result SetPermissionLevel(SessionModificationSetPermissionLevelOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_SessionModification_SetPermissionLevel(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
}
}