equal
deleted
inserted
replaced
10 // This file handles the GameList |
10 // This file handles the GameList |
11 // Also, it handles the request to a server for data about the server |
11 // Also, it handles the request to a server for data about the server |
12 |
12 |
13 extern void UpdateNetworkGameWindow(bool unselect); |
13 extern void UpdateNetworkGameWindow(bool unselect); |
14 |
14 |
15 |
15 /** Add a new item to the linked gamelist. If the IP and Port match |
|
16 * return the existing item instead of adding it again |
|
17 * @param ip the IP-address (inet_addr) of the to-be added item |
|
18 * @param port the port the server is running on |
|
19 * @return a point to the newly added or already existing item */ |
16 NetworkGameList *NetworkGameListAddItem(uint32 ip, uint16 port) |
20 NetworkGameList *NetworkGameListAddItem(uint32 ip, uint16 port) |
17 { |
21 { |
18 NetworkGameList *item, *prev_item; |
22 NetworkGameList *item, *prev_item; |
19 |
23 |
20 prev_item = NULL; |
24 prev_item = NULL; |
36 UpdateNetworkGameWindow(false); |
40 UpdateNetworkGameWindow(false); |
37 |
41 |
38 return item; |
42 return item; |
39 } |
43 } |
40 |
44 |
|
45 /** Remove an item from the gamelist linked list |
|
46 * @param remove pointer to the item to be removed */ |
41 void NetworkGameListRemoveItem(NetworkGameList *remove) |
47 void NetworkGameListRemoveItem(NetworkGameList *remove) |
42 { |
48 { |
43 NetworkGameList *item, *prev_item; |
49 NetworkGameList *item, *prev_item; |
44 |
50 |
45 prev_item = NULL; |
51 prev_item = NULL; |