Would you like to make this site your homepage? It's fast and easy...
Yes, Please make this my home page!
// **************************************************************************
// *
// * File: AccessData.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 ACCESSDATA_H
#define ACCESSDATA_H
#include <qobject.h>
#include <qstring.h>
#include <qdatetime.h>
/**
* @author David M.
* @short Contain information on a user's access.
*
* This class encapsulates data retrieved from the database about
* a user's access.
*/
class AccessData : public QObject {
public:
/**
* Construct a new AccessData object. All the parameters can usually be obtained
* from the database.
*
* @param accessIdx The internal access index.
* @param userIdx The internal user index of the user having this access.
* @param chanIdx The internal channel index of the channel concerned by the access.
* @param chanName The channel name of the channel concerned by the access.
* @param level The level of the access.
* @param autoOp true if the access is set to auto op, false otherwise.
* @param suspBy Username of the user who suspended the access, if it is suspended.
* @param suspTS DateTime on which the access was suspended.
* @param suspReason Comment given by the user suspending the access.
* @param suspExpire Expiration time of the suspension on the access.
*/
AccessData(unsigned int accessIdx,unsigned int userIdx, unsigned int chanIdx, QString chanName,
unsigned int level, bool autoOp, QString suspBy, QDateTime suspTS,QString suspReason,
QDateTime suspExpire);
~AccessData();
/**
* Get the internal access index of this access.
* @return The internal access index.
*/
unsigned int getAccessIdx() const;
/**
* Get the internal user index of this access.
* @return The internal user index.
*/
unsigned int getUserIdx() const;
/**
* Get the internal channel index of this access.
* @return The internal channel index.
*/
unsigned int getChanIdx() const;
/**
* Get the channel name of this access.
* @return The name of the channel this access applies to.
*/
const QString& getChannelName() const;
/**
* Get the level of this access.
* @return The level of this access.
*/
unsigned int getLevel() const;
/**
* Determine wether the access has autoOp turned on.
* @return true if the access is set to autoOp, false otherwise.
*/
bool getAutoOp() const;
/**
* Determine wether the access is suspended.
* @return true if the access is suspended, false otherwise.
*/
bool isSuspended() const;
/**
* Get the username of the user who suspended the access.
* @return The username of the user who suspended the access.
*/
const QString& getSuspendBy() const;
/**
* Get the date and time on which the access was suspended.
* @return The date and time of the access suspension.
*/
const QDateTime& getSuspendTS() const;
/**
* Get the reason given to suspend the access.
* @return The reason the access was suspended.
*/
const QString& getSuspendReason() const;
/**
* Get the expiration date time of the suspension.
* @return The date and time on which the access' suspension will expire.
*/
const QDateTime& getSuspendExpire() const;
private:
unsigned int _accessIdx;
unsigned int _userIdx;
unsigned int _chanIdx;
QString _chanName;
unsigned int _level;
bool _autoOp;
QString _suspBy;
QDateTime _suspTS;
QString _suspReason;
QDateTime _suspExpire;
};
#endif
Generated by: nightsky@centauri on Sat Jan 15 23:06:10 2000, using kdoc 2.0a30. |