Changeset 8937 for code/trunk/src/libraries/network/ServerList.h
- Timestamp:
- Nov 16, 2011, 2:55:40 PM (12 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/masterserverfix merged: 8935
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/network/ServerList.h
r8351 r8937 37 37 namespace orxonox 38 38 { 39 /* HELPER STRUCTURES */ 40 struct ServerListElem 41 { 42 /* server information (name, IP, etc) */ 43 packet::ServerInformation ServerInfo; 44 45 /* peer pointer */ 46 ENetPeer* peer; 47 }; 48 49 struct ServerListSearchResult 50 { 51 /* list element found */ 52 ServerListElem result; 53 54 /* successful search */ 55 bool success; 56 }; 57 58 59 60 61 39 62 /** This class is keeps a list of game servers 40 63 * and some info about them. … … 54 77 * Add server to the game server list 55 78 */ 56 int addServer( packet::ServerInformation toadd ); 79 int addServer( packet::ServerInformation toadd, 80 ENetPeer *peer ); 57 81 58 82 /** \param name Name of the server to remove … … 69 93 70 94 71 /* SORTING (to be implemented) */72 95 96 97 /* SEARCHING */ 98 /* \param address The address of the server that is to be 99 * found 100 * \return A struct containing a result of the search and a boolean 101 * that is only true if the search was successful 102 * 103 * Find and return the list handle of a given address. 104 */ 105 ServerListSearchResult 106 findServerByAddress( std::string address ); 107 108 109 /* \param name The name of the server that is to be 110 * found 111 * \return The struct containing the list entry of the server 112 * 113 * Find and return the list handle of a given name. 114 */ 115 ServerListSearchResult 116 findServerByName( std::string name ); 117 118 119 /* SORTING */ 73 120 /** sort by name */ 74 121 void sortByName(); … … 78 125 79 126 /** the list of servers for internal storage */ 80 std::list< packet::ServerInformation> serverlist;127 std::list<ServerListElem> serverlist; 81 128 private: 82 129 };
Note: See TracChangeset
for help on using the changeset viewer.