forked from reallyjoel/Ludosity-s-Steamworks-Wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MatchmakingServers.cs
154 lines (138 loc) · 7.54 KB
/
MatchmakingServers.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
using System;
using System.Collections.Generic;
using System.Text;
using ManagedSteam.SteamTypes;
namespace ManagedSteam
{
public interface IMatchmakingServers
{
/// <summary>
/// Request a new list of servers of the interney type.
/// Each call allocates a new asynchronous request object.
/// Request object must be released by calling ReleaseRequest( hServerListRequest )
/// </summary>
/// <param name="appID"></param>
/// <param name="filters"></param>
/// <param name="requestServersResponse"></param>
/// <returns></returns>
ServerListRequestHandle RequestInternetServerList(AppID appID, MatchMakingKeyValuePair[] filters,
MatchmakingServerListResponse requestServersResponse);
/// <summary>
/// Request a new list of servers of the interney type.
/// Each call allocates a new asynchronous request object.
/// Request object must be released by calling ReleaseRequest( hServerListRequest )
/// </summary>
/// <param name="appID"></param>
/// <param name="requestServersResponse"></param>
/// <returns></returns>
ServerListRequestHandle RequestLANServerList(AppID appID, MatchmakingServerListResponse requestServersResponse);
/// <summary>
/// Request a new list of servers of the interney type.
/// Each call allocates a new asynchronous request object.
/// Request object must be released by calling ReleaseRequest( hServerListRequest )
/// </summary>
/// <param name="appID"></param>
/// <param name="filters"></param>
/// <param name="requestServersResponse"></param>
/// <returns></returns>
ServerListRequestHandle RequestFriendsServerList(AppID appID, MatchMakingKeyValuePair[] filters, MatchmakingServerListResponse requestServersResponse);
/// <summary>
/// Request a new list of servers of the interney type.
/// Each call allocates a new asynchronous request object.
/// Request object must be released by calling ReleaseRequest( hServerListRequest )
/// </summary>
/// <param name="appID"></param>
/// <param name="filters"></param>
/// <param name="requestServersResponse"></param>
/// <returns></returns>
ServerListRequestHandle RequestFavoritesServerList(AppID appID, MatchMakingKeyValuePair[] filters, MatchmakingServerListResponse requestServersResponse);
/// <summary>
/// Request a new list of servers of the interney type.
/// Each call allocates a new asynchronous request object.
/// Request object must be released by calling ReleaseRequest( hServerListRequest )
/// </summary>
/// <param name="appID"></param>
/// <param name="filters"></param>
/// <param name="requestServersResponse"></param>
/// <returns></returns>
ServerListRequestHandle RequestHistoryServerList(AppID appID, MatchMakingKeyValuePair[] filters, MatchmakingServerListResponse requestServersResponse);
/// <summary>
/// Request a new list of servers of the interney type.
/// Each call allocates a new asynchronous request object.
/// Request object must be released by calling ReleaseRequest( hServerListRequest )
/// </summary>
/// <param name="appID"></param>
/// <param name="filters"></param>
/// <param name="requestServersResponse"></param>
/// <returns></returns>
ServerListRequestHandle RequestSpectatorServerList(AppID appID, MatchMakingKeyValuePair[] filters, MatchmakingServerListResponse requestServersResponse);
/// <summary>
/// Releases the asynchronous request object and cancels any pending query on it if there's a pending query in progress.
/// RefreshComplete callback is not posted when request is released.
/// </summary>
/// <param name="serverListRequest"></param>
void ReleaseRequest(ServerListRequestHandle serverListRequest);
/// <summary>
/// Get details on a given server in the list, you can get the valid range of index
/// values by calling GetServerCount(). You will also receive index values in
/// ISteamMatchmakingServerListResponse::ServerResponded() callbacks
/// </summary>
/// <param name="request"></param>
/// <param name="server"></param>
/// <returns></returns>
GameServerItem GetServerDetails(ServerListRequestHandle request, int server);
/// <summary>
/// Cancel an request which is operation on the given list type. You should call this to cancel
/// any in-progress requests before destructing a callback object that may have been passed
/// to one of the above list request calls. Not doing so may result in a crash when a callback
/// occurs on the destructed object.
/// Canceling a query does not release the allocated request handle.
/// The request handle must be released using ReleaseRequest( hRequest )
/// </summary>
/// <param name="request"></param>
void CancelQuery(ServerListRequestHandle request);
/// <summary>
/// Ping every server in your list again but don't update the list of servers
/// Query callback installed when the server list was requested will be used
/// again to post notifications and RefreshComplete, so the callback must remain
/// valid until another RefreshComplete is called on it or the request
/// is released with ReleaseRequest( hRequest )
/// </summary>
/// <param name="request"></param>
void RefreshQuery(ServerListRequestHandle request);
bool IsRefreshing(ServerListRequestHandle request);
int GetServerCount(ServerListRequestHandle request);
void RefreshServer(ServerListRequestHandle request, int server);
/// <summary>
/// Request updated ping time and other details from a single server
/// </summary>
/// <param name="ip"></param>
/// <param name="port"></param>
/// <param name="requestServersResponse"></param>
/// <returns></returns>
ServerQueryHandle PingServer(uint ip, ushort port, MatchmakingPingResponse requestServersResponse);
/// <summary>
/// Request the list of players currently playing on a server
/// </summary>
/// <param name="ip"></param>
/// <param name="port"></param>
/// <param name="requestServersResponse"></param>
/// <returns></returns>
ServerQueryHandle PlayerDetails(uint ip, ushort port, MatchmakingPlayersResponse requestServersResponse);
/// <summary>
/// Request the list of rules that the server is running (See ISteamGameServer::SetKeyValue() to set the rules server side)
/// </summary>
/// <param name="ip"></param>
/// <param name="port"></param>
/// <param name="requestServersResponse"></param>
/// <returns></returns>
ServerQueryHandle ServerRules(uint ip, ushort port, MatchmakingRulesResponse requestServersResponse);
/// <summary>
/// Cancel an outstanding Ping/Players/Rules query from above. You should call this to cancel
/// any in-progress requests before destructing a callback object that may have been passed
/// to one of the above calls to avoid crashing when callbacks occur.
/// </summary>
/// <param name="hServerQuery"></param>
void CancelServerQuery(ServerQueryHandle serverQuery);
}
}