// This file is provided under The MIT License as part of Steamworks.NET. // Copyright (c) 2013-2022 Riley Labrecque // Please see the included LICENSE.txt for additional information. // This file is automatically generated. // Changes to this file will be reverted when you update Steamworks.NET #if !(UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX) #define DISABLESTEAMWORKS #endif #if !DISABLESTEAMWORKS using System.Runtime.InteropServices; using IntPtr = System.IntPtr; namespace Steamworks { public static class SteamRemotePlay { /// /// Get the number of currently connected Steam Remote Play sessions /// public static uint GetSessionCount() { InteropHelp.TestIfAvailableClient(); return NativeMethods.ISteamRemotePlay_GetSessionCount(CSteamAPIContext.GetSteamRemotePlay()); } /// /// Get the currently connected Steam Remote Play session ID at the specified index. Returns zero if index is out of bounds. /// public static RemotePlaySessionID_t GetSessionID(int iSessionIndex) { InteropHelp.TestIfAvailableClient(); return (RemotePlaySessionID_t)NativeMethods.ISteamRemotePlay_GetSessionID(CSteamAPIContext.GetSteamRemotePlay(), iSessionIndex); } /// /// Get the SteamID of the connected user /// public static CSteamID GetSessionSteamID(RemotePlaySessionID_t unSessionID) { InteropHelp.TestIfAvailableClient(); return (CSteamID)NativeMethods.ISteamRemotePlay_GetSessionSteamID(CSteamAPIContext.GetSteamRemotePlay(), unSessionID); } /// /// Get the name of the session client device /// This returns NULL if the sessionID is not valid /// public static string GetSessionClientName(RemotePlaySessionID_t unSessionID) { InteropHelp.TestIfAvailableClient(); return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamRemotePlay_GetSessionClientName(CSteamAPIContext.GetSteamRemotePlay(), unSessionID)); } /// /// Get the form factor of the session client device /// public static ESteamDeviceFormFactor GetSessionClientFormFactor(RemotePlaySessionID_t unSessionID) { InteropHelp.TestIfAvailableClient(); return NativeMethods.ISteamRemotePlay_GetSessionClientFormFactor(CSteamAPIContext.GetSteamRemotePlay(), unSessionID); } /// /// Get the resolution, in pixels, of the session client device /// This is set to 0x0 if the resolution is not available /// public static bool BGetSessionClientResolution(RemotePlaySessionID_t unSessionID, out int pnResolutionX, out int pnResolutionY) { InteropHelp.TestIfAvailableClient(); return NativeMethods.ISteamRemotePlay_BGetSessionClientResolution(CSteamAPIContext.GetSteamRemotePlay(), unSessionID, out pnResolutionX, out pnResolutionY); } /// /// Invite a friend to Remote Play Together, or create a guest invite if steamIDFriend is empty /// This returns false if the invite can't be sent /// public static bool BSendRemotePlayTogetherInvite(CSteamID steamIDFriend) { InteropHelp.TestIfAvailableClient(); return NativeMethods.ISteamRemotePlay_BSendRemotePlayTogetherInvite(CSteamAPIContext.GetSteamRemotePlay(), steamIDFriend); } } } #endif // !DISABLESTEAMWORKS