KIO
slaveinterface_p.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2000 David Faure <faure@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef KIO_SLAVEINTERFACEPRIVATE_H 00020 #define KIO_SLAVEINTERFACEPRIVATE_H 00021 00022 #include "global.h" 00023 #include "connection.h" 00024 #include <QtCore/QTimer> 00025 #include <QtNetwork/QHostInfo> 00026 00027 static const unsigned int max_nums = 8; 00028 00029 class KIO::SlaveInterfacePrivate 00030 { 00031 public: 00032 SlaveInterfacePrivate() 00033 : connection(0), filesize(0), offset(0), last_time(0), 00034 nums(0), slave_calcs_speed(false) 00035 { 00036 start_time.tv_sec = 0; 00037 start_time.tv_usec = 0; 00038 } 00039 ~SlaveInterfacePrivate() 00040 { 00041 delete connection; 00042 } 00043 00044 Connection *connection; 00045 QTimer speed_timer; 00046 00047 // We need some metadata here for our SSL code in messageBox() and for sslMetaData(). 00048 MetaData sslMetaData; 00049 00050 KIO::filesize_t sizes[max_nums]; 00051 long times[max_nums]; 00052 00053 KIO::filesize_t filesize, offset; 00054 size_t last_time; 00055 struct timeval start_time; 00056 uint nums; 00057 bool slave_calcs_speed; 00058 00059 int messageBox(int type, const QString &text, const QString &caption, 00060 const QString &buttonYes, const QString &buttonNo, const QString &dontAskAgainName); 00061 00062 void slotHostInfo(const QHostInfo& info); 00063 }; 00064 00065 #endif
KDE 4.6 API Reference