Source: ServerData.h


Annotated List
Files
Globals
Hierarchy
Index
/***************************************************************************
 *
 * File:    ServerData.h
 * Created: Thu Jan 6 2000
 * (C) 2000 by David M. <captjay@superlink.net>
 *
 ***************************************************************************/
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/


#ifndef SERVERDATA_H
#define SERVERDATA_H

#include <qobject.h>
#include <qstring.h>

/**
* @author David M.
* @short Represent information about a server.
*
* This class encapsulates information necessary to connect to a server.
*/
class ServerData : public QObject  {
public:
  /**
  * Create a new ServerData object.
  *
  * @param serverIdx Internal server index.
  * @param name Name (host) of the server.
  * @param port Connection port on the server.
  */
	ServerData(const unsigned int serverIdx, const QString& name, const unsigned int port);
	/**
	* Get the server's internal index.
	* @return The internal server index of this server.
	*/
	unsigned int getServerIdx() const;
	/**
	* Get the server's host or IP.
	* @return A string containing the server's host, or IP address.
	*/
	const QString& getHost() const;
	/**
	* Get the server's port.
	* @return The server's port to connect on.
	*/
	unsigned int getPort() const;
private:
  unsigned int _serverIdx;
  QString _host;
  unsigned int _port;
};

#endif

Generated by: nightsky@centauri on Sat Jan 15 23:06:10 2000, using kdoc 2.0a30.