/// <summary>
 /// <para> Request the list of rules that the server is running (See ISteamGameServer::SetKeyValue() to set the rules server side)</para>
 /// </summary>
 public static HServerQuery ServerRules(uint unIP, ushort usPort, ISteamMatchmakingRulesResponse pRequestServersResponse)
 {
     InteropHelp.TestIfAvailableClient();
     return((HServerQuery)NativeMethods.ISteamMatchmakingServers_ServerRules(CSteamAPIContext.GetSteamMatchmakingServers(), unIP, usPort, (IntPtr)pRequestServersResponse));
 }
 /// <summary>
 /// <para> Cancel an outstanding Ping/Players/Rules query from above.  You should call this to cancel</para>
 /// <para> any in-progress requests before destructing a callback object that may have been passed</para>
 /// <para> to one of the above calls to avoid crashing when callbacks occur.</para>
 /// </summary>
 public static void CancelServerQuery(HServerQuery hServerQuery)
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamMatchmakingServers_CancelServerQuery(CSteamAPIContext.GetSteamMatchmakingServers(), hServerQuery);
 }
 /// <summary>
 /// <para> How many servers in the given list, GetServerDetails above takes 0... GetServerCount() - 1</para>
 /// </summary>
 public static int GetServerCount(HServerListRequest hRequest)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamMatchmakingServers_GetServerCount(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest));
 }
 /// <summary>
 /// <para> Refresh a single server inside of a query (rather than all the servers )</para>
 /// </summary>
 public static void RefreshServer(HServerListRequest hRequest, int iServer)
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamMatchmakingServers_RefreshServer(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest, iServer);
 }
 /// <summary>
 /// <para> Returns true if the list is currently refreshing its server list</para>
 /// </summary>
 public static bool IsRefreshing(HServerListRequest hRequest)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamMatchmakingServers_IsRefreshing(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest));
 }
 /// <summary>
 /// <para> the filter operation codes that go in the key part of MatchMakingKeyValuePair_t should be one of these:</para>
 /// <para>		"map"</para>
 /// <para>			- Server passes the filter if the server is playing the specified map.</para>
 /// <para>		"gamedataand"</para>
 /// <para>			- Server passes the filter if the server's game data (ISteamGameServer::SetGameData) contains all of the</para>
 /// <para>			specified strings.  The value field is a comma-delimited list of strings to match.</para>
 /// <para>		"gamedataor"</para>
 /// <para>			- Server passes the filter if the server's game data (ISteamGameServer::SetGameData) contains at least one of the</para>
 /// <para>			specified strings.  The value field is a comma-delimited list of strings to match.</para>
 /// <para>		"gamedatanor"</para>
 /// <para>			- Server passes the filter if the server's game data (ISteamGameServer::SetGameData) does not contain any</para>
 /// <para>			of the specified strings.  The value field is a comma-delimited list of strings to check.</para>
 /// <para>		"gametagsand"</para>
 /// <para>			- Server passes the filter if the server's game tags (ISteamGameServer::SetGameTags) contains all</para>
 /// <para>			of the specified strings.  The value field is a comma-delimited list of strings to check.</para>
 /// <para>		"gametagsnor"</para>
 /// <para>			- Server passes the filter if the server's game tags (ISteamGameServer::SetGameTags) does not contain any</para>
 /// <para>			of the specified strings.  The value field is a comma-delimited list of strings to check.</para>
 /// <para>		"and" (x1 &amp;&amp; x2 &amp;&amp; ... &amp;&amp; xn)</para>
 /// <para>		"or" (x1 || x2 || ... || xn)</para>
 /// <para>		"nand" !(x1 &amp;&amp; x2 &amp;&amp; ... &amp;&amp; xn)</para>
 /// <para>		"nor" !(x1 || x2 || ... || xn)</para>
 /// <para>			- Performs Boolean operation on the following filters.  The operand to this filter specifies</para>
 /// <para>			the "size" of the Boolean inputs to the operation, in Key/value pairs.  (The keyvalue</para>
 /// <para>			pairs must immediately follow, i.e. this is a prefix logical operator notation.)</para>
 /// <para>			In the simplest case where Boolean expressions are not nested, this is simply</para>
 /// <para>			the number of operands.</para>
 /// <para>			For example, to match servers on a particular map or with a particular tag, would would</para>
 /// <para>			use these filters.</para>
 /// <para>				( server.map == "cp_dustbowl" || server.gametags.contains("payload") )</para>
 /// <para>				"or", "2"</para>
 /// <para>				"map", "cp_dustbowl"</para>
 /// <para>				"gametagsand", "payload"</para>
 /// <para>			If logical inputs are nested, then the operand specifies the size of the entire</para>
 /// <para>			"length" of its operands, not the number of immediate children.</para>
 /// <para>				( server.map == "cp_dustbowl" || ( server.gametags.contains("payload") &amp;&amp; !server.gametags.contains("payloadrace") ) )</para>
 /// <para>				"or", "4"</para>
 /// <para>				"map", "cp_dustbowl"</para>
 /// <para>				"and", "2"</para>
 /// <para>				"gametagsand", "payload"</para>
 /// <para>				"gametagsnor", "payloadrace"</para>
 /// <para>			Unary NOT can be achieved using either "nand" or "nor" with a single operand.</para>
 /// <para>		"addr"</para>
 /// <para>			- Server passes the filter if the server's query address matches the specified IP or IP:port.</para>
 /// <para>		"gameaddr"</para>
 /// <para>			- Server passes the filter if the server's game address matches the specified IP or IP:port.</para>
 /// <para>		The following filter operations ignore the "value" part of MatchMakingKeyValuePair_t</para>
 /// <para>		"dedicated"</para>
 /// <para>			- Server passes the filter if it passed true to SetDedicatedServer.</para>
 /// <para>		"secure"</para>
 /// <para>			- Server passes the filter if the server is VAC-enabled.</para>
 /// <para>		"notfull"</para>
 /// <para>			- Server passes the filter if the player count is less than the reported max player count.</para>
 /// <para>		"hasplayers"</para>
 /// <para>			- Server passes the filter if the player count is greater than zero.</para>
 /// <para>		"noplayers"</para>
 /// <para>			- Server passes the filter if it doesn't have any players.</para>
 /// <para>		"linux"</para>
 /// <para>			- Server passes the filter if it's a linux server</para>
 /// <para> Get details on a given server in the list, you can get the valid range of index</para>
 /// <para> values by calling GetServerCount().  You will also receive index values in</para>
 /// <para> ISteamMatchmakingServerListResponse::ServerResponded() callbacks</para>
 /// </summary>
 public static gameserveritem_t GetServerDetails(HServerListRequest hRequest, int iServer)
 {
     InteropHelp.TestIfAvailableClient();
     return((gameserveritem_t)Marshal.PtrToStructure(NativeMethods.ISteamMatchmakingServers_GetServerDetails(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest, iServer), typeof(gameserveritem_t)));
 }
 /// <summary>
 /// <para> Releases the asynchronous request object and cancels any pending query on it if there's a pending query in progress.</para>
 /// <para> RefreshComplete callback is not posted when request is released.</para>
 /// </summary>
 public static void ReleaseRequest(HServerListRequest hServerListRequest)
 {
     InteropHelp.TestIfAvailableClient();
     NativeMethods.ISteamMatchmakingServers_ReleaseRequest(CSteamAPIContext.GetSteamMatchmakingServers(), hServerListRequest);
 }
 public static HServerListRequest RequestSpectatorServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse)
 {
     InteropHelp.TestIfAvailableClient();
     return((HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestSpectatorServerList(CSteamAPIContext.GetSteamMatchmakingServers(), iApp, new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr)pRequestServersResponse));
 }
 public static HServerListRequest RequestLANServerList(AppId_t iApp, ISteamMatchmakingServerListResponse pRequestServersResponse)
 {
     InteropHelp.TestIfAvailableClient();
     return((HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestLANServerList(CSteamAPIContext.GetSteamMatchmakingServers(), iApp, (IntPtr)pRequestServersResponse));
 }