kcmpureftpd

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

FTPSessionItem Class Reference

Store pure-ftpd session data grabbed from an XML structure. More...

#include <ftpsession.h>

List of all members.

Public Types

enum  Status {
  Idle, Download, Upload, Error,
  Unknown
}

Public Methods

 FTPSessionItem ()
 FTPSessionItem (const FTPSessionItem &item)
 FTPSessionItem (int percentage, pid_t pid, Status state, unsigned long time, unsigned long bandwidth, unsigned long long resume, unsigned long long current_size, unsigned long long total_size, const QString &account, const QString &file, const QString &host, const QString &localhost, const QString &port)
 ~FTPSessionItem ()
int percentage ()
pid_t pid ()
unsigned long time ()
unsigned long bandwidth ()
QString account ()
Status state ()
QString file ()
QString host ()
QString localhost ()
QString port ()
unsigned long long resume ()
unsigned long long current_size ()
unsigned long long total_size ()

Private Attributes

int _percentage
pid_t _pid
Status _state
unsigned long _time
unsigned long _bandwidth
unsigned long long _resume
unsigned long long _current_size
unsigned long long _total_size
QString _account
QString _file
QString _host
QString _localhost
QString _port


Detailed Description

Store pure-ftpd session data grabbed from an XML structure.

Author:
Claudiu Costin <claudiuc@kde.org>
Version:
$Id: classFTPSessionItem.html,v 1.3 2003/07/26 20:14:19 claudiuc Exp $

Definition at line 33 of file ftpsession.h.


Member Enumeration Documentation

enum FTPSessionItem::Status
 

Posible states for an FTP session, as is reported by pure-ftpwho

Enumeration values:
Idle  User connected to pure-ftpd but doesn't authenticated yet
Download  User download a file from server
Upload  User upload a file to server
Error  Error condition in FTP session. Session will close soon.
Unknown  Unknow FTP state from pure-ftpwho. Normaly should not happen at all.

Definition at line 38 of file ftpsession.h.


Constructor & Destructor Documentation

FTPSessionItem::FTPSessionItem  
 

Build an empty FTP session item with attributes set to 0 or null string

Definition at line 20 of file ftpsession.cpp.

FTPSessionItem::FTPSessionItem const FTPSessionItem &    item
 

Copy constructor FTP session item.

Definition at line 29 of file ftpsession.cpp.

FTPSessionItem::FTPSessionItem int    percentage,
pid_t    pid,
Status    state,
unsigned long    time,
unsigned long    bandwidth,
unsigned long long    resume,
unsigned long long    current_size,
unsigned long long    total_size,
const QString &    account,
const QString &    file,
const QString &    host,
const QString &    localhost,
const QString &    port
 

Make a new FTP session item from parameters values

Parameters:
percentage  upload or download session completion as percent
pid  pure-ftpd server process PID which manage this session
state  type of current session
time  elapsed time from the moment when user connected
bandwidth  transfer rate for current upload or download operation
resume  byte position from which user restarted the transfer. It's 0 if not restarted.
current_size  amount of bytes transfered so far
total_size  size for uploaded or downloaded file
account  user account is set only after authentication
file  current transfered file name
host  host name from which FTP connection was made
localhost  where the pure-ftpd server is bind to serve current session
port  where the pure-ftpd server listen to serve current session

Definition at line 40 of file ftpsession.cpp.

FTPSessionItem::~FTPSessionItem  
 

Destroy an FTP session object.

Definition at line 57 of file ftpsession.cpp.


Member Function Documentation

int FTPSessionItem::percentage   [inline]
 

Return the completion percentage for current download or upload operation.

Definition at line 91 of file ftpsession.h.

References _percentage.


Member Data Documentation

QString FTPSessionItem::_account [private]
 

User account for which FTP connection is authorized. It is null before authentication is made.

Definition at line 137 of file ftpsession.h.

unsigned long FTPSessionItem::_bandwidth [private]
 

Transfer rate for current upload or download operation. Represented as bytes/s.

Definition at line 119 of file ftpsession.h.

unsigned long long FTPSessionItem::_current_size [private]
 

Amount of bytes transfered so far

Definition at line 126 of file ftpsession.h.

QString FTPSessionItem::_file [private]
 

Current transfered file name

Definition at line 137 of file ftpsession.h.

QString FTPSessionItem::_host [private]
 

Host name or IP from which FTP connection come

Definition at line 137 of file ftpsession.h.

QString FTPSessionItem::_localhost [private]
 

Host name or IP where the pure-ftpd server is bind to serve current session

Definition at line 137 of file ftpsession.h.

int FTPSessionItem::_percentage [private]
 

Percentage of current download or upload operation

Definition at line 109 of file ftpsession.h.

Referenced by percentage().

pid_t FTPSessionItem::_pid [private]
 

Pure-ftpd server process PID which manage this session

Definition at line 112 of file ftpsession.h.

QString FTPSessionItem::_port [private]
 

Port where the pure-ftpd server listen to serve current session

Definition at line 137 of file ftpsession.h.

unsigned long long FTPSessionItem::_resume [private]
 

Byte position from which user restarted the transfer; 0 if not restarted

Definition at line 126 of file ftpsession.h.

Status FTPSessionItem::_state [private]
 

State type of current session

Definition at line 115 of file ftpsession.h.

unsigned long FTPSessionItem::_time [private]
 

Elapsed time from the moment when user connected. Represented as seconds.

Definition at line 119 of file ftpsession.h.

unsigned long long FTPSessionItem::_total_size [private]
 

Size for uploaded or downloaded file

Definition at line 126 of file ftpsession.h.


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 01:57:14 2003 by doxygen 1.2.15.