/// API asynchronous call results /// can be used directly, but more commonly used via the callback dispatch API (see steam_api.h) public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed) { pbFailed = false; return(false); }
/// <summary> /// <para> API asynchronous call results</para> /// <para> can be used directly, but more commonly used via the callback dispatch API (see steam_api.h)</para> /// </summary> public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamGameServerUtils_IsAPICallCompleted(hSteamAPICall, out pbFailed)); }
public static bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamGameServerUtils_GetAPICallResult(hSteamAPICall, pCallback, cubCallback, iCallbackExpected, out pbFailed)); }
/// <summary> /// <para> API asynchronous call results</para> /// <para> can be used directly, but more commonly used via the callback dispatch API (see steam_api.h)</para> /// </summary> public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamUtils_IsAPICallCompleted(CSteamAPIContext.GetSteamUtils(), hSteamAPICall, out pbFailed)); }
public static bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamUtils_GetAPICallResult(CSteamAPIContext.GetSteamUtils(), hSteamAPICall, pCallback, cubCallback, iCallbackExpected, out pbFailed)); }
private static extern bool _FileReadAsyncComplete(IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead);
internal bool FileReadAsyncComplete(SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead) { return(_FileReadAsyncComplete(Self, hReadCall, pvBuffer, cubToRead)); }
internal SteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) { var returnValue = _GetAPICallFailureReason(Self, hSteamAPICall); return(returnValue); }
private static extern bool _GetAPICallResult(IntPtr self, SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs(UnmanagedType.U1)] ref bool pbFailed);
internal bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, [MarshalAs(UnmanagedType.U1)] ref bool pbFailed) { var returnValue = _IsAPICallCompleted(Self, hSteamAPICall, ref pbFailed); return(returnValue); }
private static extern SteamAPICallFailure _GetAPICallFailureReason(IntPtr self, SteamAPICall_t hSteamAPICall);
private static extern bool _IsAPICallCompleted(IntPtr self, SteamAPICall_t hSteamAPICall, [MarshalAs(UnmanagedType.U1)] ref bool pbFailed);
public static bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed) { pbFailed = false; return(false); }
public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) { return((ESteamAPICallFailure)0); }
public void Set(SteamAPICall_t hAPICall) { }
internal bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs(UnmanagedType.U1)] ref bool pbFailed) { var returnValue = _GetAPICallResult(Self, hSteamAPICall, pCallback, cubCallback, iCallbackExpected, ref pbFailed); return(returnValue); }
private IEnumerator UpdateLeaderboard(int timeInMilliseconds, string leaderboardName) { Debug.Log("updating leaderboard"); if (!SteamManager.Initialized) { Debug.Log("steammanager not initialized"); yield break; } bool findLeaderboardCallCompleted = false; bool error = false; bool uploadedScoreCallCompleted = false; Steamworks.SteamLeaderboard_t speedrunLeaderboard = new Steamworks.SteamLeaderboard_t(); Steamworks.LeaderboardScoreUploaded_t leaderboardScore = new Steamworks.LeaderboardScoreUploaded_t(); Steamworks.SteamAPICall_t speedrunLeaderboardSearch = Steamworks.SteamUserStats.FindLeaderboard(leaderboardName); Steamworks.CallResult <Steamworks.LeaderboardFindResult_t> findLeaderboardCallResult = Steamworks.CallResult <Steamworks.LeaderboardFindResult_t> .Create(); findLeaderboardCallResult.Set(speedrunLeaderboardSearch, (leaderboardFindResult, failure) => { if (!failure && leaderboardFindResult.m_bLeaderboardFound == 1) { speedrunLeaderboard = leaderboardFindResult.m_hSteamLeaderboard; Debug.Log("speedrunLeaderboard found"); } else { error = true; } findLeaderboardCallCompleted = true; }); while (!findLeaderboardCallCompleted) { yield return(null); } if (error) { Debug.Log("Error finding High Score leaderboard."); yield break; } Steamworks.SteamAPICall_t uploadedScoreCall = Steamworks.SteamUserStats.UploadLeaderboardScore(speedrunLeaderboard, Steamworks.ELeaderboardUploadScoreMethod.k_ELeaderboardUploadScoreMethodKeepBest, timeInMilliseconds, new int[0], 0); Steamworks.CallResult <Steamworks.LeaderboardScoreUploaded_t> leaderboardScoreUploadedCallResult = Steamworks.CallResult <Steamworks.LeaderboardScoreUploaded_t> .Create(); leaderboardScoreUploadedCallResult.Set(uploadedScoreCall, (scoreUploadedResult, failure) => { if (!failure && scoreUploadedResult.m_bSuccess == 1) { leaderboardScore = scoreUploadedResult; Debug.Log("leaderboardScore found"); } else { error = true; } uploadedScoreCallCompleted = true; }); while (!uploadedScoreCallCompleted) { yield return(null); } if (error) { Debug.Log("Error uploading to High Score leaderboard."); yield break; } if (leaderboardScore.m_bScoreChanged == 1) { Debug.Log(String.Format("New high score! Global rank #{0}.", leaderboardScore.m_nGlobalRankNew)); } else { Debug.Log(String.Format("A previous score was better. Global rank #{0}.", leaderboardScore.m_nGlobalRankNew)); } }
internal static void RunStub(IntPtr self, IntPtr param, bool failure, SteamAPICall_t call) { throw new Exception("Something changed in the Steam API and now CCallbackBack is calling the CallResult function [Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )]"); }
internal bool FileReadAsyncComplete(SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead) { var returnValue = _FileReadAsyncComplete(Self, hReadCall, pvBuffer, cubToRead); return(returnValue); }
public static bool FileReadAsyncComplete(SteamAPICall_t hReadCall, byte[] pvBuffer, uint cubToRead) { return(false); }
public static bool FileReadAsyncComplete(SteamAPICall_t hReadCall, byte[] pvBuffer, uint cubToRead) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamRemoteStorage_FileReadAsyncComplete(hReadCall, pvBuffer, cubToRead)); }
/// <summary> /// <para> Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on</para> /// <para> asynchronous response via callback.</para> /// <para> Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control</para> /// <para> header and only do a local cache lookup rather than sending any actual remote request.</para> /// </summary> public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamHTTP_SendHTTPRequest(CSteamAPIContext.GetSteamHTTP(), hRequest, out pCallHandle)); }
public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamUtils_GetAPICallFailureReason(CSteamAPIContext.GetSteamUtils(), hSteamAPICall)); }
public static bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, string pchParamName, string pchParamValue) => default; // 0x0000000180954E70-0x0000000180955030 public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) { pCallHandle = default; return(default);
/// <summary> /// <para> Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on</para> /// <para> asynchronous response via callback.</para> /// <para> Note: If the user is in offline mode in Steam, then this will add a only-if-cached cache-control</para> /// <para> header and only do a local cache lookup rather than sending any actual remote request.</para> /// </summary> public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamGameServerHTTP_SendHTTPRequest(hRequest, out pCallHandle)); }
public static bool SendHTTPRequestAndStreamResponse(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamHTTP_SendHTTPRequestAndStreamResponse(hRequest, out pCallHandle)); }
public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamGameServerUtils_GetAPICallFailureReason(hSteamAPICall)); }
public void Set(SteamAPICall_t hAPICall, APIDispatchDelegate func = null) { }
/// <summary> /// <para> Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on</para> /// <para> asynchronous response via callback for completion, and listen for HTTPRequestHeadersReceived_t and</para> /// <para> HTTPRequestDataReceived_t callbacks while streaming.</para> /// </summary> public static bool SendHTTPRequestAndStreamResponse(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamGameServerHTTP_SendHTTPRequestAndStreamResponse(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, out pCallHandle)); }
public bool SendHTTPRequest(HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle) { var returnValue = _SendHTTPRequest(Self, hRequest, ref pCallHandle); return(returnValue); }