summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas2011-09-23 14:08:55 +0200
committerNiklas2011-09-23 14:08:55 +0200
commit0216e9aadb7e794037d3cf553b05474de8322a74 (patch)
treefb4c699a56a459d9f4b628a5f66b19796de23f5c
parentchanged the css file for the networkdiscovery. now it looks a bit nicer (diff)
downloadfbgui-0216e9aadb7e794037d3cf553b05474de8322a74.tar.gz
fbgui-0216e9aadb7e794037d3cf553b05474de8322a74.tar.xz
fbgui-0216e9aadb7e794037d3cf553b05474de8322a74.zip
renamed the logreceiver to networkdiscovery and deleted the abortbootdialog and chooseinterfacedialog since this is now implemented via html/css/jquery
-rw-r--r--LogReceiver/LogReceiver.pro16
-rw-r--r--LogReceiver/abortbootdialog.cpp98
-rw-r--r--LogReceiver/abortbootdialog.h46
-rw-r--r--LogReceiver/chooseinterfacedialog.cpp98
-rw-r--r--LogReceiver/chooseinterfacedialog.h44
-rw-r--r--LogReceiver/ndgui.cpp16
-rw-r--r--LogReceiver/ndgui.h8
-rw-r--r--LogReceiver/networkdiscovery.cpp (renamed from LogReceiver/logreceiver.cpp)56
-rw-r--r--LogReceiver/networkdiscovery.h (renamed from LogReceiver/logreceiver.h)12
9 files changed, 50 insertions, 344 deletions
diff --git a/LogReceiver/LogReceiver.pro b/LogReceiver/LogReceiver.pro
index 2eea3bd..eaa7001 100644
--- a/LogReceiver/LogReceiver.pro
+++ b/LogReceiver/LogReceiver.pro
@@ -7,18 +7,14 @@ LIBS += -lsysfs \
-L/home/niklas/fbgui/customdhcpcd/src/build \
-llibcustomdhcpcd
INCLUDEPATH += /home/niklas/fbgui/customdhcpcd/src
-HEADERS += routemanager.h \
+HEADERS += networkdiscovery.h \
+ routemanager.h \
interfaceconfiguration.h \
- ndgui.h \
- logreceiver.h \
- abortbootdialog.h \
- chooseinterfacedialog.h
-SOURCES += routemanager.cpp \
+ ndgui.h
+SOURCES += networkdiscovery.cpp \
+ routemanager.cpp \
interfaceconfiguration.cpp \
ndgui.cpp \
- main.cpp \
- logreceiver.cpp \
- abortbootdialog.cpp \
- chooseinterfacedialog.cpp
+ main.cpp
FORMS += ndgui.ui
RESOURCES += nd.qrc
diff --git a/LogReceiver/abortbootdialog.cpp b/LogReceiver/abortbootdialog.cpp
deleted file mode 100644
index 1614f6b..0000000
--- a/LogReceiver/abortbootdialog.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-#include <QtGui>
-
-#include "abortbootdialog.h"
-
-AbortBootDialog::AbortBootDialog(QWidget *parent) :
- QDialog(parent)
-{
- oneMinuteCountdown = 60;
-
- createContentGroupBox();
- createButtonGroupBox();
-
- createTimer();
-
- mainLayout = new QVBoxLayout;
- mainLayout->addWidget(contentGroupBox);
- mainLayout->addWidget(buttonGroupBox);
-
- setLayout(mainLayout);
- setWindowTitle(tr("Abort Boot"));
-}
-void AbortBootDialog::createContentGroupBox()
-{
- contentGroupBox = new QGroupBox;
- timerLabel = new QLabel(QString::number(oneMinuteCountdown));
- QHBoxLayout *layout = new QHBoxLayout;
-
-
- layout->addWidget(new QLabel(tr("test")));
- layout->addWidget(timerLabel);
- contentGroupBox->setLayout(layout);
-}
-
-void AbortBootDialog::createButtonGroupBox()
-{
- buttonGroupBox = new QGroupBox;
- QHBoxLayout *layout = new QHBoxLayout;
-
- QPushButton *shutDownButton = new QPushButton(tr("Shut Down"));
- shutDownButton->setDefault(true);
- QPushButton *restartButton = new QPushButton(tr("Restart"));
- restartButton->setAutoDefault(false);
- QPushButton *showLogButton = new QPushButton(tr("Show Log"));
- showLogButton->setAutoDefault(false);
-
- connect(showLogButton, SIGNAL(clicked()),this, SLOT(showLogButtonClicked()));
- connect(shutDownButton, SIGNAL(clicked()), this, SLOT(shutDownButtonClicked()));
- connect(restartButton, SIGNAL(clicked()), this, SLOT(restartButtonClicked()));
-
- layout->addWidget(showLogButton);
- layout->addWidget(restartButton);
- layout->addWidget(shutDownButton);
- buttonGroupBox->setLayout(layout);
-}
-
-void AbortBootDialog::createTimer()
-{
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()),this, SLOT(timerLabelUpdate()));
- timer->start(1000);
-}
-
-void AbortBootDialog::showLogButtonClicked()
-{
- qDebug() << "show log button clicked";
- emit showLogSignal();
-}
-
-void AbortBootDialog::shutDownButtonClicked()
-{
- qDebug() << "shut down button clicked";
- emit shutDownSignal();
-}
-
-void AbortBootDialog::restartButtonClicked()
-{
- qDebug() << "restart button clicked";
- emit restartSignal();
-}
-
-void AbortBootDialog::timerLabelUpdate()
-{
- oneMinuteCountdown = oneMinuteCountdown -1;
- timerLabel->setText(QString::number(oneMinuteCountdown));
- if(oneMinuteCountdown <= 0)
- {
- timer->stop();
- emit shutDownSignal();
- }
-
-}
-
-void AbortBootDialog::closeDialog()
-{
- this->hide();
- this->killTimer(timer->timerId());
- this->close();
-}
diff --git a/LogReceiver/abortbootdialog.h b/LogReceiver/abortbootdialog.h
deleted file mode 100644
index 157331b..0000000
--- a/LogReceiver/abortbootdialog.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef ABORTBOOTDIALOG_H
-#define ABORTBOOTDIALOG_H
-
-#include <QDialog>
-#include "qboxlayout.h"
-#include "qgroupbox.h"
-#include "qcombobox.h"
-#include "qlabel.h"
-
-
-class AbortBootDialog : public QDialog
-{
- Q_OBJECT
-public:
- explicit AbortBootDialog(QWidget *parent = 0);
-
- void closeDialog();
-private slots:
- void showLogButtonClicked();
- void shutDownButtonClicked();
- void restartButtonClicked();
- void timerLabelUpdate();
-
-private:
- QVBoxLayout *mainLayout;
- QGroupBox *contentGroupBox;
- QGroupBox *buttonGroupBox;
- QLabel *timerLabel;
- QTimer *timer;
- int oneMinuteCountdown;
-
- void createContentGroupBox();
- void createButtonGroupBox();
- void createTimer();
-
-
-signals:
- void showLogSignal();
- void shutDownSignal();
- void restartSignal();
-
-public slots:
-
-};
-
-#endif // ABORTBOOTDIALOG_H
diff --git a/LogReceiver/chooseinterfacedialog.cpp b/LogReceiver/chooseinterfacedialog.cpp
deleted file mode 100644
index b7a37e8..0000000
--- a/LogReceiver/chooseinterfacedialog.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-#include <QtGui>
-
-#include "chooseinterfacedialog.h"
-
-ChooseInterfaceDialog::ChooseInterfaceDialog(QStringList &interfaces, QWidget *parent) :
- QDialog(parent)
-{
- oneMinuteCountdown = 60;
-
- createContentGroupBox(interfaces);
- createButtonGroupBox();
-
- createTimer();
-
- mainLayout = new QVBoxLayout;
- mainLayout->addWidget(contentGroupBox);
- mainLayout->addWidget(buttonGroupBox);
-
- setLayout(mainLayout);
- setWindowTitle(tr("Choose Interface"));
-}
-
-void ChooseInterfaceDialog::createContentGroupBox(QStringList &interfaces)
-{
- contentGroupBox = new QGroupBox;
- timerLabel = new QLabel(QString::number(oneMinuteCountdown));
- QVBoxLayout *groupBoxLayout = new QVBoxLayout;
- QHBoxLayout *layout = new QHBoxLayout;
-
- comboBox = new QComboBox;
- comboBox->addItems(interfaces);
-
- layout->addWidget(new QLabel(tr("test")));
- layout->addWidget(comboBox);
-
- groupBoxLayout->addWidget(timerLabel);
- groupBoxLayout->addLayout(layout);
- contentGroupBox->setLayout(groupBoxLayout);
-}
-
-void ChooseInterfaceDialog::createButtonGroupBox()
-{
- buttonGroupBox = new QGroupBox;
- QHBoxLayout *layout = new QHBoxLayout;
-
- QPushButton *continueButton = new QPushButton(tr("Continue"));
- continueButton->setDefault(true);
- QPushButton *shutDownButton = new QPushButton(tr("Shut Down"));
- shutDownButton->setAutoDefault(false);
- QPushButton *restartButton = new QPushButton(tr("Restart"));
- restartButton->setAutoDefault(false);
-
- connect(continueButton, SIGNAL(clicked()),this, SLOT(continueButtonClicked()));
- connect(shutDownButton, SIGNAL(clicked()), this, SLOT(shutDownButtonClicked()));
- connect(restartButton, SIGNAL(clicked()), this, SLOT(restartButtonClicked()));
-
- layout->addWidget(restartButton);
- layout->addWidget(shutDownButton);
- layout->addWidget(continueButton);
- buttonGroupBox->setLayout(layout);
-}
-
-void ChooseInterfaceDialog::createTimer()
-{
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()),this, SLOT(timerLabelUpdate()));
- timer->start(1000);
-}
-
-void ChooseInterfaceDialog::continueButtonClicked()
-{
- qDebug() << "continue button clicked";
- emit continueSignal(comboBox->currentText());
-}
-
-void ChooseInterfaceDialog::shutDownButtonClicked()
-{
- qDebug() << "shut down button clicked";
- emit shutDownSignal();
-}
-
-void ChooseInterfaceDialog::restartButtonClicked()
-{
- qDebug() << "restart button clicked";
- emit restartSignal();
-}
-
-void ChooseInterfaceDialog::timerLabelUpdate()
-{
- oneMinuteCountdown = oneMinuteCountdown -1;
- timerLabel->setText(QString::number(oneMinuteCountdown));
- if(oneMinuteCountdown <= 0)
- {
- timer->stop();
- emit continueSignal(comboBox->currentText());
- }
-
-}
diff --git a/LogReceiver/chooseinterfacedialog.h b/LogReceiver/chooseinterfacedialog.h
deleted file mode 100644
index 48ee038..0000000
--- a/LogReceiver/chooseinterfacedialog.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef CHOOSEINTERFACEDIALOG_H
-#define CHOOSEINTERFACEDIALOG_H
-
-#include <QDialog>
-#include "qboxlayout.h"
-#include "qgroupbox.h"
-#include "qcombobox.h"
-#include "qlabel.h"
-
-class ChooseInterfaceDialog : public QDialog
-{
- Q_OBJECT
-public:
- explicit ChooseInterfaceDialog(QStringList &interfaces, QWidget *parent = 0);
-private slots:
- void continueButtonClicked();
- void shutDownButtonClicked();
- void restartButtonClicked();
- void timerLabelUpdate();
-
-private:
- QVBoxLayout *mainLayout;
- QGroupBox *contentGroupBox;
- QGroupBox *buttonGroupBox;
- QComboBox *comboBox;
- QLabel *timerLabel;
- QTimer *timer;
- int oneMinuteCountdown;
-
- void createContentGroupBox(QStringList &interfaces);
- void createButtonGroupBox();
- void createTimer();
-
-signals:
- void continueSignal(QString ifName);
- void shutDownSignal();
- void restartSignal();
-
-
-public slots:
-
-};
-
-#endif // CHOOSEINTERFACEDIALOG_H
diff --git a/LogReceiver/ndgui.cpp b/LogReceiver/ndgui.cpp
index 0394926..624bbde 100644
--- a/LogReceiver/ndgui.cpp
+++ b/LogReceiver/ndgui.cpp
@@ -3,13 +3,13 @@
ndgui::ndgui(QMainWindow *parent) :
QMainWindow(parent) {
- connect(&logReceiver, SIGNAL(addInterface(const QString &)), this, SLOT(addInterface( const QString &)));
- connect(&logReceiver, SIGNAL(changeProgressBarValue(const QString & , const int& )), this, SLOT(updateIfProgressBar(const QString & , const int&)));
- //connect(&logReceiver, SIGNAL(connectionEstablished(interfaceconfiguration*)), this, SLOT(handleConnectionEstablished(interfaceconfiguration*)));
- connect(&logReceiver, SIGNAL(abortBoot(QString)), this, SLOT(abortBoot(const QString)));
- connect(&logReceiver, SIGNAL(updateStatusLabel(QString,QString)), this, SLOT(updateIfStatus(const QString &, const QString &)));
- //connect(&logReceiver, SIGNAL(allProcessesFinished()), this, SLOT(handleAllProcessesFinished()));
- connect(&logReceiver, SIGNAL(continueBoot(QString, bool)), this, SLOT(continueBoot(QString, bool)));
+ connect(&networkDiscovery, SIGNAL(addInterface(const QString &)), this, SLOT(addInterface( const QString &)));
+ connect(&networkDiscovery, SIGNAL(changeProgressBarValue(const QString & , const int& )), this, SLOT(updateIfProgressBar(const QString & , const int&)));
+ //connect(&networkDiscovery, SIGNAL(connectionEstablished(interfaceconfiguration*)), this, SLOT(handleConnectionEstablished(interfaceconfiguration*)));
+ connect(&networkDiscovery, SIGNAL(abortBoot(QString)), this, SLOT(abortBoot(const QString)));
+ connect(&networkDiscovery, SIGNAL(updateStatusLabel(QString,QString)), this, SLOT(updateIfStatus(const QString &, const QString &)));
+ //connect(&networkDiscovery, SIGNAL(allProcessesFinished()), this, SLOT(handleAllProcessesFinished()));
+ connect(&networkDiscovery, SIGNAL(continueBoot(QString, bool)), this, SLOT(continueBoot(QString, bool)));
_started = false;
@@ -37,7 +37,7 @@ ndgui::~ndgui() {
void ndgui::startNetworkDiscovery(){
if(!_started) {
_started = true;
- logReceiver.initAndRun("/var/tmp/qt_c_socket_custom");
+ networkDiscovery.initAndRun("/var/tmp/qt_c_socket_custom");
}
else {
qDebug() << "NetworkDiscovery already started";
diff --git a/LogReceiver/ndgui.h b/LogReceiver/ndgui.h
index 7cbfb20..21217ec 100644
--- a/LogReceiver/ndgui.h
+++ b/LogReceiver/ndgui.h
@@ -8,9 +8,7 @@
#include <QGroupBox>
#include <QBoxLayout>
-#include "logreceiver.h"
-#include "chooseinterfacedialog.h"
-#include "abortbootdialog.h"
+#include "networkdiscovery.h"
#include "ui_ndgui.h"
@@ -50,12 +48,10 @@ private:
QWebView * _webView;
- LogReceiver logReceiver;
+ NetworkDiscovery networkDiscovery;
QMap<QString, interfaceconfiguration*> finalUsableIntefacesMap; // maps interfaceName to its gateway
- ChooseInterfaceDialog *cID;
- AbortBootDialog *aBD;
};
diff --git a/LogReceiver/logreceiver.cpp b/LogReceiver/networkdiscovery.cpp
index 7f8c7f3..cd77ee1 100644
--- a/LogReceiver/logreceiver.cpp
+++ b/LogReceiver/networkdiscovery.cpp
@@ -1,17 +1,17 @@
-#include "logreceiver.h"
+#include "networkdiscovery.h"
#include "../common/fbgui.h"
-LogReceiver::LogReceiver(QObject *parent) {
+NetworkDiscovery::NetworkDiscovery(QObject *parent) {
server = new QLocalServer(this);
}
-LogReceiver::~LogReceiver() {
+NetworkDiscovery::~NetworkDiscovery() {
}
-void LogReceiver::initAndRun(QString serverPath, QString pathToExe,
+void NetworkDiscovery::initAndRun(QString serverPath, QString pathToExe,
QStringList* args) {
_userChoice = false;
@@ -23,13 +23,13 @@ void LogReceiver::initAndRun(QString serverPath, QString pathToExe,
}
if (!server->listen(serverPath)) {
/*
- QMessageBox::critical(this, tr("LogReceiver"), tr(
+ QMessageBox::critical(this, tr("NetworkDiscovery"), tr(
"Unable to start the server: %1.") .arg(server->errorString()));
close();
*/
// emit signal to the gui that a critial error occoured
QString errorInfo("Unable to start server: ");
- qDebug() << "--- \t [LogReceiver::initAndRun] " + errorInfo
+ qDebug() << "--- \t [NetworkDiscovery::initAndRun] " + errorInfo
<< server->errorString();
emit
abortBoot(errorInfo + server->errorString());
@@ -51,7 +51,7 @@ void LogReceiver::initAndRun(QString serverPath, QString pathToExe,
}
if (args != NULL && !args->isEmpty()) {
- qDebug() << "--- \t [LogReceiver::initAndRun] added additional args";
+ qDebug() << "--- \t [NetworkDiscovery::initAndRun] added additional args";
dhcpcdArguments.append(*args);
}
@@ -79,11 +79,11 @@ void LogReceiver::initAndRun(QString serverPath, QString pathToExe,
}
-int LogReceiver::replaceDefaultRoute(QString &ifName, QString &gateway, int af, int mss) {
+int NetworkDiscovery::replaceDefaultRoute(QString &ifName, QString &gateway, int af, int mss) {
rm.replaceDefaultRoute(ifName, gateway, mss, AF_INET);
}
-QList<QString> LogReceiver::getListOfNetworkInterfaces() {
+QList<QString> NetworkDiscovery::getListOfNetworkInterfaces() {
QList<QNetworkInterface> nIList = QNetworkInterface::allInterfaces();
QList<QString> result;
@@ -108,7 +108,7 @@ QList<QString> LogReceiver::getListOfNetworkInterfaces() {
return result;
}
-QList<QString> LogReceiver::checkCarrierState(QList<QString> &interfaces) {
+QList<QString> NetworkDiscovery::checkCarrierState(QList<QString> &interfaces) {
QList<QString> result;
foreach(QString nI, interfaces)
{
@@ -122,7 +122,7 @@ QList<QString> LogReceiver::checkCarrierState(QList<QString> &interfaces) {
return result;
}
-bool LogReceiver::checkCarrierState(QString interface) {
+bool NetworkDiscovery::checkCarrierState(QString interface) {
qDebug() << "check carrier state for interface " << interface;
QByteArray ba = interface.toAscii();
@@ -162,14 +162,14 @@ bool LogReceiver::checkCarrierState(QString interface) {
return true;
}
-void LogReceiver::runDHCPCD(QList<QString> &interfaces) {
+void NetworkDiscovery::runDHCPCD(QList<QString> &interfaces) {
foreach(QString nI, interfaces)
{
runDHCPCD(nI);
}
}
-void LogReceiver::runDHCPCD(QString interface) {
+void NetworkDiscovery::runDHCPCD(QString interface) {
emit updateStatusLabel(interface, "start DHCP");
dhcpcdArguments.append(interface);
QProcess * p = new QProcess(this);
@@ -185,7 +185,7 @@ void LogReceiver::runDHCPCD(QString interface) {
dhcpcdArguments.removeLast();
}
-bool LogReceiver::checkConnectivity(QString ifName) {
+bool NetworkDiscovery::checkConnectivity(QString ifName) {
int metric = 0;
// get gateway address
@@ -224,7 +224,7 @@ bool LogReceiver::checkConnectivity(QString ifName) {
/**
*
*/
-void LogReceiver::handleNewConnection() {
+void NetworkDiscovery::handleNewConnection() {
qDebug() << "New Connection arrived";
/*QLocalSocket **/
@@ -238,7 +238,7 @@ void LogReceiver::handleNewConnection() {
/**
*
*/
-void LogReceiver::handleClientDisconnect() {
+void NetworkDiscovery::handleClientDisconnect() {
QLocalSocket* socket = qobject_cast<QLocalSocket *> (QObject::sender());
QLocalSocket * client = clients.value(socket);
@@ -251,7 +251,7 @@ void LogReceiver::handleClientDisconnect() {
/**
*
*/
-void LogReceiver::handleNewInput(QLocalSocket * client) {
+void NetworkDiscovery::handleNewInput(QLocalSocket * client) {
qDebug() << "last read before exit";
while (client->canReadLine()) {
QString data(client->readLine());
@@ -272,7 +272,7 @@ void LogReceiver::handleNewInput(QLocalSocket * client) {
* client.
* send an ACK to the client with every received message.
*/
-void LogReceiver::handleNewInput() {
+void NetworkDiscovery::handleNewInput() {
QLocalSocket* socket = qobject_cast<QLocalSocket *> (QObject::sender());
QLocalSocket * client = clients.value(socket);
@@ -308,7 +308,7 @@ void LogReceiver::handleNewInput() {
* @param data
* the message. (format <interfaceName>;<state>;<subState>;<msg> )
*/
-void LogReceiver::handleNewInputLine(QLocalSocket * client, QString data) {
+void NetworkDiscovery::handleNewInputLine(QLocalSocket * client, QString data) {
QString logMsg(data);
QString interface = logMsg.section(";", 0, 0);
@@ -389,7 +389,7 @@ void LogReceiver::handleNewInputLine(QLocalSocket * client, QString data) {
* Normal exit:
* emit changeProgressBar() to 100%
* emit updateStatusLabel() to check connection
- * checkConnectivity() @see LogReceiver::checkConnectivity()
+ * checkConnectivity() @see NetworkDiscovery::checkConnectivity()
* Unexpected exit:
* emit updateStatusLabel() to process exited unexpected
* TODO:: the reason for the unexpected exit should be presented in the logfile.
@@ -403,17 +403,17 @@ void LogReceiver::handleNewInputLine(QLocalSocket * client, QString data) {
*
* returns false: else
*
- * @see LogReceiver::getListOfNetworkInterfaces()
+ * @see NetworkDiscovery::getListOfNetworkInterfaces()
*/
/*
-void LogReceiver::handleProcessFinished(int exitCode,
+void NetworkDiscovery::handleProcessFinished(int exitCode,
QProcess::ExitStatus exitStatus) {
QProcess* p = qobject_cast<QProcess *> (QObject::sender());
QString ifName = clientProcessToIfNameMap.value(p, "ifName");
if (ifName.compare("ifName") == 0) {
qDebug()
- << "--- \t [LogReceiver::handleProcessFinished] haven't found process!";
+ << "--- \t [NetworkDiscovery::handleProcessFinished] haven't found process!";
} else {
qDebug() << "process for interface" << ifName << "finished" << exitCode
<< exitStatus;
@@ -440,7 +440,7 @@ void LogReceiver::handleProcessFinished(int exitCode,
}
}
*/
-void LogReceiver::handleProcessFinished(int exitCode,
+void NetworkDiscovery::handleProcessFinished(int exitCode,
QProcess::ExitStatus exitStatus) {
QProcess* p = qobject_cast<QProcess *> (QObject::sender());
@@ -448,7 +448,7 @@ void LogReceiver::handleProcessFinished(int exitCode,
if (!_blocked) { //_blocked becomes true, if _userChoice is false and we found a usable interface
if (ifName.compare("ifName") == 0) {
qDebug()
- << "--- \t [LogReceiver::handleProcessFinished] haven't found process!";
+ << "--- \t [NetworkDiscovery::handleProcessFinished] haven't found process!";
} else {
qDebug() << "process for interface" << ifName << "finished"
<< exitCode << exitStatus;
@@ -483,7 +483,7 @@ void LogReceiver::handleProcessFinished(int exitCode,
* This Method is called when a process is started.
* It prints the message: "process started for interface: <interfaceName>".
*/
-void LogReceiver::handleProcessStarted() {
+void NetworkDiscovery::handleProcessStarted() {
QProcess* p = qobject_cast<QProcess *> (QObject::sender());
QString ifName = clientProcessToIfNameMap.value(p, "ifName");
qDebug() << "process started for interface:" << ifName;
@@ -505,9 +505,9 @@ void LogReceiver::handleProcessStarted() {
*
* returns false: else
*
- * @see LogReceiver::getListOfNetworkInterfaces()
+ * @see NetworkDiscovery::getListOfNetworkInterfaces()
*/
-bool LogReceiver::checkBlackList(QString i) {
+bool NetworkDiscovery::checkBlackList(QString i) {
if (i.startsWith("v", Qt::CaseInsensitive)) {
return true;
} else if (i.startsWith("d", Qt::CaseInsensitive)) {
diff --git a/LogReceiver/logreceiver.h b/LogReceiver/networkdiscovery.h
index 7cd12d8..9a1441d 100644
--- a/LogReceiver/logreceiver.h
+++ b/LogReceiver/networkdiscovery.h
@@ -1,5 +1,5 @@
-#ifndef LOGRECEIVER_H
-#define LOGRECEIVER_H
+#ifndef NetworkDiscovery_H
+#define NetworkDiscovery_H
//#include <QMap>
#include <QtNetwork>
@@ -36,12 +36,12 @@
#define DEFAULT_GATEWAY_INFO_LOCATION "/var/tmp/gateways_"
#define ACK_SIZE 4
-class LogReceiver: public QObject {
+class NetworkDiscovery: public QObject {
Q_OBJECT
public:
- LogReceiver(QObject *parent=0);
- ~LogReceiver();
+ NetworkDiscovery(QObject *parent=0);
+ ~NetworkDiscovery();
void initAndRun(QString serverPath = DEFAULT_QTSOCKETADDRESS,
QString pathToExe = DEFAULT_PATHTODHCPCDEXE,
@@ -95,4 +95,4 @@ private:
};
-#endif // LOGRECEIVER_H
+#endif // NetworkDiscovery_H