Source: ChanUser.h


Annotated List
Files
Globals
Hierarchy
Index
/***************************************************************************
 *
 * File:    ChanUser.h
 * Created: Sat Dec 4 1999
 * (C) 1999 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 CHANUSER_H
#define CHANUSER_H

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

/**
* @short Represents a channel user's information.
*
* An instance of ChanUser is created for every user on a
* channel, and destroyed when the user leaves.
* @see Channel
*/
class ChanUser : QObject {
public:
  ChanUser();
  /**
  * Construct a new ChanUser object with the specified nick and userhost.
  *
  * @param nick The nickname of the user on the channel.
  * @param userHost The user@host information of the user.
  */
  explicit ChanUser(const QString& nick, const QString& userHost = "");
  ~ChanUser();

  /**
  * Get the user's nickname.
  *
  * @return The nickname of the channel user.
  */
  const QString getNick() const;

  /**
  * Change the user's nickname.
  *
  * @param value The new nickname for the user.
  */
  void setNick(const QString value);


  /**
  * Get the user's user@host.
  *
  * @return The user@host of the channel user.
  */
  const QString getUserHost() const;

  /**
  * Change the user's user@host information.
  *
  * @param value The new user@host for the user.
  */
  void setUserHost(const QString value);


  /**
  * Determine if the user is oped on the channel.
  * @return true if the user is oped, false otherwise.
  */
  const bool getOped() const;

  /**
  * Change the op status of the user on the channel.
  * Set to true to indicate the user is oped, false
  * if he/she is deoped.
  *
  * @param value The op status of the user.
  */
  void setOped(const bool value);

  /**
  * Determine if the user is voiced on the channel.
  * @return true if the user is voiced, false otherwise.
  */
  const bool getVoiced() const;

  /*
  * Change the voiced status of the user on the channel.
  * Set to true to indicate the user is voiced, false
  * if he/she is not voiced.
  *
  * @param value The voiced status of the user.
  */
  void setVoiced(const bool value);

private:
 QString _nick;
 QString _userHost;
 bool _oped;
 bool _voiced;
};



#endif





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