001 /**
002 * Jetrix TetriNET Server
003 * Copyright (C) 2005 Emmanuel Bourg
004 *
005 * This program is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU General Public License
007 * as published by the Free Software Foundation; either version 2
008 * of the License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013 * GNU General Public License for more details.
014 *
015 * You should have received a copy of the GNU General Public License
016 * along with this program; if not, write to the Free Software
017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
018 */
019
020 package net.jetrix.agent;
021
022 import java.util.List;
023
024 /**
025 * Information about a tetrinet server retrieved through the query protocol.
026 *
027 * @author Emmanuel Bourg
028 * @version $Revision: 794 $, $Date: 2009-02-17 20:08:39 +0100 (Tue, 17 Feb 2009) $
029 */
030 public class QueryInfo
031 {
032 private String hostname;
033 private String version;
034 private List<PlayerInfo> players;
035 private List<ChannelInfo> channels;
036 private long ping;
037
038 public String getHostname()
039 {
040 return hostname;
041 }
042
043 public void setHostname(String hostname)
044 {
045 this.hostname = hostname;
046 }
047
048 /**
049 * Return the version of the server.
050 */
051 public String getVersion()
052 {
053 return version;
054 }
055
056 public void setVersion(String version)
057 {
058 this.version = version;
059 }
060
061 public List<PlayerInfo> getPlayers()
062 {
063 return players;
064 }
065
066 public void setPlayers(List<PlayerInfo> players)
067 {
068 this.players = players;
069 }
070
071 /**
072 * Return the list of players in the specified channel.
073 *
074 * @param channel the name of the channel
075 */
076 public List getPlayers(String channel)
077 {
078 // todo
079 return players;
080 }
081
082 public List<ChannelInfo> getChannels()
083 {
084 return channels;
085 }
086
087 public void setChannels(List<ChannelInfo> channels)
088 {
089 this.channels = channels;
090 }
091
092 public long getPing()
093 {
094 return ping;
095 }
096
097 public void setPing(long ping)
098 {
099 this.ping = ping;
100 }
101 }