kcmpureftpd

  Main Page   Compound List   File List   Compound Members
Main Page   Compound List   File List   Compound Members  

ftpsession.h

00001 /***************************************************************************
00002                          ftpsession.h  -  pure-ftpd FTP session data
00003                          -------------------
00004     begin                : Wed Feb 6 2002
00005     copyright            : (C) 2002-2003 by Claudiu Costin
00006     email                : claudiuc@kde.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef FTPSESSION_H
00019 #define FTPSESSION_H
00020 
00021 #include <sys/types.h>
00022 
00023 #include <qstring.h>
00024 #include <qvaluelist.h>
00025 
00033 class FTPSessionItem {
00034   public:
00038     enum  Status {
00041       Idle, 
00044       Download, 
00047       Upload, 
00050       Error, 
00053       Unknown
00054     };
00055     
00059     FTPSessionItem();
00062     FTPSessionItem(const FTPSessionItem &item);
00078     FTPSessionItem(int percentage, pid_t pid, Status state, unsigned long time,
00079                unsigned long bandwidth,
00080                unsigned long long resume, unsigned long long current_size,
00081                unsigned long long total_size,
00082                const QString &account,
00083                const QString &file, const QString &host,
00084                const QString &localhost, const QString &port);
00087     ~FTPSessionItem();
00088     
00091     int percentage()          { return _percentage; }
00092     pid_t pid()               { return _pid; }
00093     unsigned long time()      { return _time; }
00094     unsigned long bandwidth() { return _bandwidth; }
00095     QString account()         { return _account; }
00096     Status state()            { return _state; }
00097     QString file()            { return _file; }
00098     QString host()            { return _host; }
00099     QString localhost()       { return _localhost; }
00100     QString port()            { return _port; }
00101     unsigned long long resume()       { return _resume; }
00102     unsigned long long current_size() { return _current_size; }
00103     unsigned long long total_size()   { return _total_size; }
00104     
00105 
00106   private:  
00109     int _percentage;
00112     pid_t _pid;
00115     Status _state;
00116     unsigned long 
00119     _time, 
00122     _bandwidth;
00123     unsigned long long 
00126     _resume, 
00129     _current_size, 
00132     _total_size;
00133     QString 
00137     _account, 
00140     _file, 
00143     _host, 
00146     _localhost, 
00149     _port;
00150 };
00151 
00152 
00153 #endif
Generated on Thu Jul 24 01:57:07 2003 by doxygen 1.2.15.