Добавил:
korayakov
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:
/*
netFileCopyer
Copyright (C) 2004 Dmitry S. Vasilchenko.
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The GNU GPL is contained in /usr/doc/copyright/GPL on a Debian
system and in the file COPYING in the Linux kernel source.
*/
#ifndef _U_THREADS_H
#define _U_THREADS_H
#include <qthread.h>
#include <time.h>
class ThMain : public QThread
{
public:
ThMain();
void setParams(const QString &pip, const int pport,
const QString &pfile, const int pstate);
void run();
void stop();
void *pdialog; /* pointer to dialog object */
QString oi_last_error();
int oi_estate();
private:
int stage; /* transfer stage - CONNECT|SENDFILE| etc. */
size_t file_size;
size_t file_progress;
time_t start_time; /* transfer start time */
class oi_connect *oi;
QString ip;
int port;
QString file; /* FILE|FOLDER */
QString file_name;
int state; /* SEND|RECEIVE */
int fd;
int sd; /* socket descriptor */
volatile bool stopped;
};
#endif