Would you like to make this site your homepage? It's fast and easy...
Yes, Please make this my home page!
/***************************************************************************
*
* File: DCCUser.h
* Created: Tue Dec 14 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 DCCUSER_H
#define DCCUSER_H
#include <qobject.h>
#include <qstring.h>
#include "ClientSocket.h"
class UserData;
class Command;
class AccessData;
/**
* @author David M.
* @short Handle a DCC connection to a host.
*
*/
class DCCUser : public QObject {
Q_OBJECT
public:
DCCUser(QString nuh);
bool connectTo(const QString& host, const unsigned int port);
int getFlags() const;
QString getLogin() const;
QString getCurrentChannel() const;
unsigned int getLevel() const;
unsigned int getGlobalLevel() const;
const UserData* getUserData() const;
void disconnect();
void sendMessage(const QString& message);
static const int All = 1;
static const int JoinPart = 2;
static const int ModeKick = 4;
static const int Private = 8;
static const int Public = 16;
static const int Commands = 32;
static const int Info = 64;
static const int Warnings = 128;
static const int Errors = 256;
static const int Debug = 512;
static const int Server = 1024;
~DCCUser();
signals:
void authenticated(DCCUser* user,QString username);
void disconnect(DCCUser* user, QString username);
private slots:
void onDataWaiting(Socket* socket);
void onSocketDisconnect(Socket* socket);
private:
void handleAuthentication(const QString& text);
void handleMessage(const QString& text);
void handleCommand(const QString& text);
QString _nuh;
ClientSocket* _socket;
UserData* _userData;
int _flags;
Command* _lastComm;
QString _currentChannel;
AccessData* _currentAccess;
};
#endif
Generated by: nightsky@centauri on Sat Jan 15 23:06:10 2000, using kdoc 2.0a30. |