summaryrefslogtreecommitdiffstats
path: root/LogReceiver/logreceiver.h
diff options
context:
space:
mode:
authorNiklas2011-09-23 14:08:55 +0200
committerNiklas2011-09-23 14:08:55 +0200
commit0216e9aadb7e794037d3cf553b05474de8322a74 (patch)
treefb4c699a56a459d9f4b628a5f66b19796de23f5c /LogReceiver/logreceiver.h
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
Diffstat (limited to 'LogReceiver/logreceiver.h')
-rw-r--r--LogReceiver/logreceiver.h98
1 files changed, 0 insertions, 98 deletions
diff --git a/LogReceiver/logreceiver.h b/LogReceiver/logreceiver.h
deleted file mode 100644
index 7cd12d8..0000000
--- a/LogReceiver/logreceiver.h
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef LOGRECEIVER_H
-#define LOGRECEIVER_H
-
-//#include <QMap>
-#include <QtNetwork>
-#include <QtCore>
-//#include <QProcess>
-
-#include <arpa/inet.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <syslog.h>
-#include <sysfs/libsysfs.h>
-
-#include "interfaceconfiguration.h"
-#include "routemanager.h"
-//#include <qlocalserver.h>
-//#include <qlocalsocket.h>
-#include "status.h"
-#include "dhcp.h"
-#include "interface.h"
-
-//#include <QProcess>
-//#include <QLocalSocket>
-//#include <QLocalServer>
-//#include <QTcpSocket>
-//#include <QSsl>
-#include <QNetworkConfigurationManager>
-//#include <QNetworkAccessManager>
-#include <QWidget>
-
-
-#define DEFAULT_QTSOCKETADDRESS "/var/tmp/qt_c_socket_default"
-#define DEFAULT_PATHTODHCPCDEXE "/home/niklas/fbgui/customdhcpcd/src/customdhcpcd"
-#define DEFAULT_GATEWAY_INFO_LOCATION "/var/tmp/gateways_"
-#define ACK_SIZE 4
-
-class LogReceiver: public QObject {
-Q_OBJECT
-
-public:
- LogReceiver(QObject *parent=0);
- ~LogReceiver();
-
- void initAndRun(QString serverPath = DEFAULT_QTSOCKETADDRESS,
- QString pathToExe = DEFAULT_PATHTODHCPCDEXE,
- QStringList* args = NULL);
- int replaceDefaultRoute(QString &ifName, QString &gateway, int af, int mss);
-
-private slots:
- void handleNewConnection();
- void handleNewInput();
- void handleNewInputLine(QLocalSocket * client, QString data);
- void handleProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
- void handleProcessStarted();
- void handleClientDisconnect();
-
-signals:
- void addInterface(const QString &ifName);
- void changeProgressBarValue(const QString & ifName, const int $newValue);
- void connectionEstablished(interfaceconfiguration *ifConf);
- void abortBoot(QString msg);
- void updateStatusLabel(QString ifName, QString status);
- void allProcessesFinished();
- void continueBoot(QString ifName, bool userChoice);
-
-private:
- QLocalServer *server;
- quint16 blockSize;
- //QMap<int, QNetworkInterface > interfacesMap;
- //QMap<QString, int> indexToIfaceNameMap;
- QMap<QLocalSocket *, QLocalSocket *> clients;
- QLocalSocket * client;
- QMap<QString, QLocalSocket*> ifNameToClient;
- QMap<QProcess*, QString> clientProcessToIfNameMap;
- QString pathToDhcpcdExe;
- QStringList dhcpcdArguments;
- QNetworkConfigurationManager configurationManager;
- QNetworkAccessManager *accessManager;
- int numberOfProcesses;
- routemanager rm;
- bool _userChoice;
- bool _blocked;
-
- void handleNewInput(QLocalSocket * client);
-
- void runDHCPCD(QList<QString> &interfaces);
- void runDHCPCD(QString interface);
- QList<QString>checkCarrierState(QList<QString> &interfaces);
- bool checkCarrierState(QString interface);
- bool checkConnectivity(QString ifName);
- QList<QString> getListOfNetworkInterfaces();
- bool checkBlackList(QString i);
-
-};
-
-#endif // LOGRECEIVER_H