public static bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, string pchParamName, string pchParamValue) { InteropHelp.TestIfAvailableClient(); using (InteropHelp.UTF8StringHandle pchParamName2 = new InteropHelp.UTF8StringHandle(pchParamName)) { using (InteropHelp.UTF8StringHandle pchParamValue2 = new InteropHelp.UTF8StringHandle(pchParamValue)) { return(NativeMethods.ISteamHTTP_SetHTTPRequestGetOrPostParameter(hRequest, pchParamName2, pchParamValue2)); } } }
public static bool SetCookie(HTTPCookieContainerHandle hCookieContainer, string pchHost, string pchUrl, string pchCookie) { InteropHelp.TestIfAvailableGameServer(); using (InteropHelp.UTF8StringHandle pchHost2 = new InteropHelp.UTF8StringHandle(pchHost)) { using (InteropHelp.UTF8StringHandle pchUrl2 = new InteropHelp.UTF8StringHandle(pchUrl)) { using (InteropHelp.UTF8StringHandle pchCookie2 = new InteropHelp.UTF8StringHandle(pchCookie)) { return(NativeMethods.ISteamGameServerHTTP_SetCookie(hCookieContainer, pchHost2, pchUrl2, pchCookie2)); } } } }
public bool ShowGamepadTextInput(string Description, string InitialText, uint MaxCharacters, Action <bool> OnGamepadInputEnd) { s_OnGamepadInputEnd = OnGamepadInputEnd; //marshal_context context; // char pchDescription = context.marshal_as< char >( Description ); // char pchInitialText = context.marshal_as< char >( InitialText ); UInt64 unCharMax = (UInt64)(MaxCharacters); using (var pchDescription = new InteropHelp.UTF8StringHandle(Description)) using (var pchInitialText = new InteropHelp.UTF8StringHandle(InitialText)) { bool val = false; // delete this line after the REMOVE is taken out //REMOVE//bool val = SteamGameServerUtils_ShowGamepadTextInput(EGamepadTextInputMode.k_EGamepadTextInputModeNormal, EGamepadTextInputLineMode.k_EGamepadTextInputLineModeSingleLine, pchDescription, unCharMax, pchInitialText); return(val); } }
public static bool Init(uint unIP, ushort usSteamPort, ushort usGamePort, ushort usQueryPort, EServerMode eServerMode, string pchVersionString) { InteropHelp.TestIfPlatformSupported(); bool flag; using (InteropHelp.UTF8StringHandle pchVersionString2 = new InteropHelp.UTF8StringHandle(pchVersionString)) { flag = NativeMethods.SteamGameServer_Init(unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, pchVersionString2); } if (flag) { flag = CSteamGameServerAPIContext.Init(); } if (flag) { CallbackDispatcher.Initialize(); } return(flag); }
public static bool RegisterSteamMusicRemote(string pchName) { InteropHelp.TestIfAvailableClient(); using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); return(NativeMethods.ISteamMusicRemote_RegisterSteamMusicRemote(CSteamAPIContext.GetSteamMusicRemote(), pchName2)); }
public static bool SetPlaylistEntry(int nID, int nPosition, string pchEntryText) { InteropHelp.TestIfAvailableClient(); using InteropHelp.UTF8StringHandle pchEntryText2 = new InteropHelp.UTF8StringHandle(pchEntryText); return(NativeMethods.ISteamMusicRemote_SetPlaylistEntry(CSteamAPIContext.GetSteamMusicRemote(), nID, nPosition, pchEntryText2)); }
public static bool UpdateCurrentEntryText(string pchText) { InteropHelp.TestIfAvailableClient(); using InteropHelp.UTF8StringHandle pchText2 = new InteropHelp.UTF8StringHandle(pchText); return(NativeMethods.ISteamMusicRemote_UpdateCurrentEntryText(CSteamAPIContext.GetSteamMusicRemote(), pchText2)); }
public static void SetMapName(string pszMapName) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pszMapName2 = new InteropHelp.UTF8StringHandle(pszMapName); NativeMethods.ISteamGameServer_SetMapName(CSteamGameServerAPIContext.GetSteamGameServer(), pszMapName2); }
public static void SetGameData(string pchGameData) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pchGameData2 = new InteropHelp.UTF8StringHandle(pchGameData); NativeMethods.ISteamGameServer_SetGameData(CSteamGameServerAPIContext.GetSteamGameServer(), pchGameData2); }
public static void SetGameDescription(string pszGameDescription) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pszGameDescription2 = new InteropHelp.UTF8StringHandle(pszGameDescription); NativeMethods.ISteamGameServer_SetGameDescription(CSteamGameServerAPIContext.GetSteamGameServer(), pszGameDescription2); }
public static bool GetHTTPResponseHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, byte[] pHeaderValueBuffer, uint unBufferSize) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pchHeaderName2 = new InteropHelp.UTF8StringHandle(pchHeaderName); return(NativeMethods.ISteamHTTP_GetHTTPResponseHeaderValue(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pchHeaderName2, pHeaderValueBuffer, unBufferSize)); }
public static HTTPRequestHandle CreateHTTPRequest(EHTTPMethod eHTTPRequestMethod, string pchAbsoluteURL) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pchAbsoluteURL2 = new InteropHelp.UTF8StringHandle(pchAbsoluteURL); return((HTTPRequestHandle)NativeMethods.ISteamHTTP_CreateHTTPRequest(CSteamGameServerAPIContext.GetSteamHTTP(), eHTTPRequestMethod, pchAbsoluteURL2)); }
public static bool SetHTTPRequestUserAgentInfo(HTTPRequestHandle hRequest, string pchUserAgentInfo) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pchUserAgentInfo2 = new InteropHelp.UTF8StringHandle(pchUserAgentInfo); return(NativeMethods.ISteamHTTP_SetHTTPRequestUserAgentInfo(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pchUserAgentInfo2)); }
public static bool SetHTTPRequestRawPostBody(HTTPRequestHandle hRequest, string pchContentType, byte[] pubBody, uint unBodyLen) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pchContentType2 = new InteropHelp.UTF8StringHandle(pchContentType); return(NativeMethods.ISteamHTTP_SetHTTPRequestRawPostBody(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pchContentType2, pubBody, unBodyLen)); }
// Returns false if invalid length public bool SetGenericString(string pszString) { using (var pszString2 = new InteropHelp.UTF8StringHandle(pszString)) { return NativeMethods.SteamAPI_SteamNetworkingIdentity_SetGenericString(ref this, pszString2); } }
/// Parse back a string that was generated using ToString. If we don't understand the /// string, but it looks "reasonable" (it matches the pattern type:<type-data> and doesn't /// have any funky characters, etc), then we will return true, and the type is set to /// k_ESteamNetworkingIdentityType_UnknownType. false will only be returned if the string /// looks invalid. public bool ParseString(string pszStr) { using (var pszStr2 = new InteropHelp.UTF8StringHandle(pszStr)) { return NativeMethods.SteamAPI_SteamNetworkingIdentity_ParseString(ref this, pszStr2); } }
public static bool BUpdateUserData(CSteamID steamIDUser, string pchPlayerName, uint uScore) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pchPlayerName2 = new InteropHelp.UTF8StringHandle(pchPlayerName); return(NativeMethods.ISteamGameServer_BUpdateUserData(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDUser, pchPlayerName2, uScore)); }
// Initialize ISteamGameServer interface object, and set server properties which may not be changed. // // After calling this function, you should set any additional server parameters, and then // call ISteamGameServer::LogOnAnonymous() or ISteamGameServer::LogOn() // // - usSteamPort is the local port used to communicate with the steam servers. // - usGamePort is the port that clients will connect to for gameplay. // - usQueryPort is the port that will manage server browser related duties and info // pings from clients. If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE for usQueryPort, then it // will use "GameSocketShare" mode, which means that the game is responsible for sending and receiving // UDP packets for the master server updater. See references to GameSocketShare in isteamgameserver.h. // - The version string is usually in the form x.x.x.x, and is used by the master server to detect when the // server is out of date. (Only servers with the latest version will be listed.) public static bool Init(uint unIP, ushort usSteamPort, ushort usGamePort, ushort usQueryPort, EServerMode eServerMode, string pchVersionString) { InteropHelp.TestIfPlatformSupported(); using(var pchVersionString2 = new InteropHelp.UTF8StringHandle(pchVersionString)) { return NativeMethods.SteamGameServer_Init(unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, pchVersionString2); } }
public static void LogOn(string pszToken) { InteropHelp.TestIfAvailableGameServer(); using InteropHelp.UTF8StringHandle pszToken2 = new InteropHelp.UTF8StringHandle(pszToken); NativeMethods.ISteamGameServer_LogOn(CSteamGameServerAPIContext.GetSteamGameServer(), pszToken2); }