summaryrefslogtreecommitdiffstats
path: root/src/networkinterface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/networkinterface.h')
-rw-r--r--src/networkinterface.h81
1 files changed, 41 insertions, 40 deletions
diff --git a/src/networkinterface.h b/src/networkinterface.h
index 99e71b9..83bf25a 100644
--- a/src/networkinterface.h
+++ b/src/networkinterface.h
@@ -20,14 +20,14 @@
#ifndef NETWORKINTERFACE_H
#define NETWORKINTERFACE_H
-#include <qwidget.h>
-#include <qprocess.h>
-#include <qstringlist.h>
-#include <qobject.h>
-#include <qapplication.h>
+#include <tqwidget.h>
+#include <tqprocess.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
+#include <tqapplication.h>
#include <ktempfile.h>
-#include <qhttp.h>
-#include <qstringlist.h>
+#include <tqhttp.h>
+#include <tqstringlist.h>
#include "kvpncconfig.h"
/**
@@ -35,9 +35,10 @@ Class for interaction with network interface
@author Christoph Thielecke
*/
-class NetworkInterface : public QObject
+class NetworkInterface : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -46,7 +47,7 @@ public:
* @param name Name of the object
* @return nothing
*/
- NetworkInterface( KVpncConfig* config,QApplication *app, QObject *parent = 0, const char *name = 0 );
+ NetworkInterface( KVpncConfig* config,TQApplication *app, TQObject *parent = 0, const char *name = 0 );
/**
* Destruktor
@@ -59,50 +60,50 @@ public:
* @param Interface The interface to test
* @return True if interface exist
*/
- bool interfaceExist(QString Interface);
+ bool interfaceExist(TQString Interface);
/**
* Retrieves a list of all availiable interfaces
* @return List with all interfaces
*/
- QStringList getAllNetworkInterfaces();
+ TQStringList getAllNetworkInterfaces();
/**
* Gets the IP from a given interface
* @param Interface The interface from which the IP whould be given
* @return The IP
*/
- QString getInterfaceIP(QString Interface);
+ TQString getInterfaceIP(TQString Interface);
- QString getInterfaceIP2(QString Interface); // old style
+ TQString getInterfaceIP2(TQString Interface); // old style
/**
* Gets the device from a given IP
* @param IP The IP which the target interface has
* @return The interface where the IP is set
*/
- QString getInterfaceAddress(QString IP);
+ TQString getInterfaceAddress(TQString IP);
/**
* Gets the interface where the default route points
* @return The interface
*/
- QString getDefaultInterface();
+ TQString getDefaultInterface();
/**
* Gets the gateway of a given interface
* @return The interface
*/
- QString getGatewayOfInterface(QString interface);
+ TQString getGatewayOfInterface(TQString interface);
- QString getNetmaskOfInterface(QString interface);
+ TQString getNetmaskOfInterface(TQString interface);
- bool inSameNetwork(QString ip1,QString Netmask1,QString ip2,QString Netmask2);
+ bool inSameNetwork(TQString ip1,TQString Netmask1,TQString ip2,TQString Netmask2);
/**
* Gets the gateway of the default route
* @return The interface
*/
- QString getGatewayOfDefaultInterface();
+ TQString getGatewayOfDefaultInterface();
/**
* Gets the count of default route entries
@@ -114,9 +115,9 @@ public:
* Gets the IP address which is used for communication with internet connections (same as local address if not behind router)
* @return The external IP address
*/
- QString getExternalIpAddress();
+ TQString getExternalIpAddress();
- bool inSameNetwork(QString ip1,QString ip2);
+ bool inSameNetwork(TQString ip1,TQString ip2);
public slots:
void readFromStdout();
@@ -124,33 +125,33 @@ public slots:
void processHasFinished();
void readFromStdout_interfaceip();
void readFromStderr_interfaceip();
- void externalIpDataRecieved(const QHttpResponseHeader & resp);
+ void externalIpDataRecieved(const TQHttpResponseHeader & resp);
protected:
- QProcess *proc; //< The process for starting external programs
- QProcess *InterfaceExitsProc;
- QProcess *InterfaceIpProc;
+ TQProcess *proc; //< The process for starting external programs
+ TQProcess *InterfaceExitsProc;
+ TQProcess *InterfaceIpProc;
bool interfaceTest; //< True if interface test is running
bool retrieveInterfaceIP; //< True if retrieve interface IP is running
bool retrieveInterfaceAddress; //< True if retrieve interface address is running
- QStringList InterfaceList; //< List with interfaces
- QString InterfaceIP; //< IP for interface
- QString InterfaceAddress; //< Device for IP
- QString GatewayAddress; //< Gateway of Device
- QString GatewayOfInterfaceAddress;
- QString GatewayOfDefaultInterfaceAddress; //< Gateway of Device
+ TQStringList InterfaceList; //< List with interfaces
+ TQString InterfaceIP; //< IP for interface
+ TQString InterfaceAddress; //< Device for IP
+ TQString GatewayAddress; //< Gateway of Device
+ TQString GatewayOfInterfaceAddress;
+ TQString GatewayOfDefaultInterfaceAddress; //< Gateway of Device
bool interfaceExists; //< True if interface exists
- QString ifconfigbin; //< Path to ifconfig
- QString routebin; //< Path to route
- QString defaultinterface; //< Interface with defaultroute
- QString IPforInterface; //< The Ip for interface
- QString tmpInterface; //< Interface for getting devname
- QApplication *app;
+ TQString ifconfigbin; //< Path to ifconfig
+ TQString routebin; //< Path to route
+ TQString defaultinterface; //< Interface with defaultroute
+ TQString IPforInterface; //< The Ip for interface
+ TQString tmpInterface; //< Interface for getting devname
+ TQApplication *app;
bool readOutput,getExternalIpAddressRunning;
KTempFile *tmpfile;
- QHttp *http;
- QString ExternalIpAddress;
- QStringList *env;
+ TQHttp *http;
+ TQString ExternalIpAddress;
+ TQStringList *env;
KVpncConfig *GlobalConfig;
};