1
/***************************************************************************
2
* Copyright (C) 2008-2011 by Francesco Cecconi *
3
* francesco.cecconi@gmail.com *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License. *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program; if not, write to the *
16
* Free Software Foundation, Inc., *
17
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
18
***************************************************************************/
20
#ifndef QPROCESSTHREAD_H
21
#define QPROCESSTHREAD_H
23
#include <QtCore/QThread>
24
#include <QtCore/QByteArray>
25
#include <QtCore/QStringList>
26
#include <QtCore/QProcess>
27
#include <QtCore/QMetaType>
28
#include <QtCore/QPointer>
29
#include <QtCore/QDebug>
32
#include "nmapsi4Debug.h"
34
class QProcessThread : public QThread
37
* nmap thread class, start nmap with a QProcess and return
38
* QByteArray result with a signal.
44
* Create a nmap QThread and start QProcess for nmap
47
QProcessThread(const QString& programName, const QStringList& parameters);
51
* Return nmap QThread output with a Signal.
53
void threadEnd(const QStringList parameters, QByteArray dataBuffer, QByteArray errorBuffer);
55
* Return nmap QThread stdout for ETC and remaining scan time.
57
void flowFromThread(const QString parameters, const QString data);
71
QPointer<QProcess> _process;