summaryrefslogtreecommitdiffstats
path: root/src/utils.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-06 14:15:01 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-06 14:15:01 -0600
commit1b89319fd93b88313cab40f1e9de24c067b04efb (patch)
tree80132996de993c3dcab4040864d7729842875b2d /src/utils.h
parentd08a0ede1d2cb15bb14b0ff75eacf5c682b1fa0a (diff)
downloadkvpnc-1b89319fd93b88313cab40f1e9de24c067b04efb.tar.gz
kvpnc-1b89319fd93b88313cab40f1e9de24c067b04efb.zip
Initial TQt conversion
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h157
1 files changed, 79 insertions, 78 deletions
diff --git a/src/utils.h b/src/utils.h
index 50492e0..a4a3d9d 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -20,13 +20,13 @@
#ifndef __UTILS_H____
#define __UTILS_H____
-#include <qobject.h>
-#include <qprocess.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqprocess.h>
+#include <tqvaluelist.h>
#include "kvpncconfig.h"
#include "kvpnc.h"
#include "toolinfo.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <ktempfile.h>
/**
@@ -34,48 +34,49 @@ Provides various help functions.
@author Christoph Thielecke
*/
-class Utils : public QObject
+class Utils : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- Utils(KVpncConfig* config,QObject *parent = 0, const char *name = 0);
+ Utils(KVpncConfig* config,TQObject *parent = 0, const char *name = 0);
~Utils();
- bool isValidIPv4Address(QString Address);
- bool isValidIPv4NetworkAddress(QString Address);
- bool isValidIPv4BroadcastAddress(QString Address);
- bool isValidIPv4Netmask(QString Netmask);
+ bool isValidIPv4Address(TQString Address);
+ bool isValidIPv4NetworkAddress(TQString Address);
+ bool isValidIPv4BroadcastAddress(TQString Address);
+ bool isValidIPv4Netmask(TQString Netmask);
bool tunDevExists();
bool createTunDev();
- bool loadKernelModule(QString Name,QApplication *app);
- bool unloadKernelModule(QString Name,QApplication *app, bool force=true);
- bool doChmod(QString file, QString mode);
+ bool loadKernelModule(TQString Name,TQApplication *app);
+ bool unloadKernelModule(TQString Name,TQApplication *app, bool force=true);
+ bool doChmod(TQString file, TQString mode);
bool resolvConfAvailable();
- QStringList getOpenvpnCiphers();
- QStringList getOpenvpnDigests();
- QPtrList<ToolInfo>* getToolList();
- ToolInfo* getToolInfo( QString name);
- QString resolveName(QString Name);
- QString removeSpecialCharsForFilename(QString filename);
- QString getNameAndPidOfProgramListen(int port);
- QString getEmailAddressOfCert(QString cert);
- QString getHostname();
- QStringList getSmartcardSlots(QString ProviderLib);
- QStringList getSmartcardCertsFromSlot(QString slot,QString IdType,QString ProviderLib);
- QStringList getOpenvpnPkcs11Ids(QString ProviderLib);
- bool getNeedsPassphrase(QString key);
- QStringList getCertsFromCiscoCertStore(QString type="user");
- QString dec2bin(int n);
- int dottedIpv4Netmask2NetmaskBytes(QString dottedIpv4Netmask);
- QString IpsecAlgoCurrent;
+ TQStringList getOpenvpnCiphers();
+ TQStringList getOpenvpnDigests();
+ TQPtrList<ToolInfo>* getToolList();
+ ToolInfo* getToolInfo( TQString name);
+ TQString resolveName(TQString Name);
+ TQString removeSpecialCharsForFilename(TQString filename);
+ TQString getNameAndPidOfProgramListen(int port);
+ TQString getEmailAddressOfCert(TQString cert);
+ TQString getHostname();
+ TQStringList getSmartcardSlots(TQString ProviderLib);
+ TQStringList getSmartcardCertsFromSlot(TQString slot,TQString IdType,TQString ProviderLib);
+ TQStringList getOpenvpnPkcs11Ids(TQString ProviderLib);
+ bool getNeedsPassphrase(TQString key);
+ TQStringList getCertsFromCiscoCertStore(TQString type="user");
+ TQString dec2bin(int n);
+ int dottedIpv4Netmask2NetmaskBytes(TQString dottedIpv4Netmask);
+ TQString IpsecAlgoCurrent;
struct IpsecAlgos {
- QStringList IpsecIkeEncryptionAlgorithms;
- QStringList IpsecIkeHashAlgorithms;
- QStringList IpsecIkeDhGroups;
- QStringList IpsecEspEncryptionAlgorithms;
- QStringList IpsecEspAuthenticationAlgorithms;
- QStringList IpsecCompressionAlgorithms;
+ TQStringList IpsecIkeEncryptionAlgorithms;
+ TQStringList IpsecIkeHashAlgorithms;
+ TQStringList IpsecIkeDhGroups;
+ TQStringList IpsecEspEncryptionAlgorithms;
+ TQStringList IpsecEspAuthenticationAlgorithms;
+ TQStringList IpsecCompressionAlgorithms;
};
struct PppdCapabilities {
@@ -86,20 +87,20 @@ public:
/* options for pppd depending on pppd version */
// MPPE
- QString RequireMppeOption;
- QString Require128BitMppeOption;
- QString RefuseMppeOption;
- QString Refuse40BitMppeOption;
- QString Refuse128BitMppeOption;
- QString RequireStatelessOption;
- QString RequireStatefulOption;
+ TQString RequireMppeOption;
+ TQString Require128BitMppeOption;
+ TQString RefuseMppeOption;
+ TQString Refuse40BitMppeOption;
+ TQString Refuse128BitMppeOption;
+ TQString RequireStatelessOption;
+ TQString RequireStatefulOption;
bool MppeOptionsInALine; // older pppd need all in one line
// AUTH
- QString RequireAuthChapOption;
- QString RequireAuthMschapOption;
- QString RequireAuthMschapv2Option;
- QString RequireAuthPapOption;
+ TQString RequireAuthChapOption;
+ TQString RequireAuthMschapOption;
+ TQString RequireAuthMschapv2Option;
+ TQString RequireAuthPapOption;
bool pppdHasMppeSupport; //< true if pppd has mppe support
bool oldPppdStyle; //< true if old style was found ('mppe require')
@@ -154,44 +155,44 @@ private:
bool testPppdRequireMppe;
bool testPppdMppeRequired;
- QString tooltest_logfile;
- QProcess *ModprobeProcess;
- QProcess *createProcess;
- QProcess *NetworkDeviceTestProcess;
- QProcess *toolsTestProcess;
- QProcess *OpenvpnCiphersProcess;
- QProcess *OpenvpnDigestProcess;
- QProcess *NameAndPidOfProgramListenProcess;
- QProcess *GetEmailAddressOfCertProcess;
+ TQString tooltest_logfile;
+ TQProcess *ModprobeProcess;
+ TQProcess *createProcess;
+ TQProcess *NetworkDeviceTestProcess;
+ TQProcess *toolsTestProcess;
+ TQProcess *OpenvpnCiphersProcess;
+ TQProcess *OpenvpnDigestProcess;
+ TQProcess *NameAndPidOfProgramListenProcess;
+ TQProcess *GetEmailAddressOfCertProcess;
KProcess *GetSmartcardSlotsProcess;
- QProcess *GetSmartcardCertsFromSlotProcess;
- QProcess *OpenvpnPkcs11IdsProcess;
- QProcess *GetCertsFromCiscoCertStoreProcess;
- QProcess *NeedsPassphraseProcess;
- QProcess *IpsecAlgosProcess;
- QProcess *TestPppdProcess;
- QProcess *GetHostnameProcess;
+ TQProcess *GetSmartcardCertsFromSlotProcess;
+ TQProcess *OpenvpnPkcs11IdsProcess;
+ TQProcess *GetCertsFromCiscoCertStoreProcess;
+ TQProcess *NeedsPassphraseProcess;
+ TQProcess *IpsecAlgosProcess;
+ TQProcess *TestPppdProcess;
+ TQProcess *GetHostnameProcess;
- QString resolvedIP;
+ TQString resolvedIP;
bool resolveFinished;
- QValueList<QHostAddress> list;
- QStringList *env;
+ TQValueList<TQHostAddress> list;
+ TQStringList *env;
KVpncConfig *config;
KTempFile *tmpfile;
bool retrieveValidNetworkdevice;
bool Pkcs11CertFound;
- QStringList OpenvpnCiphers;
- QStringList OpenvpnDigests;
- QStringList KernelCrypto;
- QString NameAndPidOfProgramListen;
- QString EmailAddressOfCert;
- QString OpenvpnDigestString;
- QString IdType;
- QString Hostname;
- QStringList SmartcardSlots;
- QStringList SmartcardCertsFromSlot;
- QStringList CertsFromCiscoCertStore;
- QStringList OpenvpnPkcs11Ids;
+ TQStringList OpenvpnCiphers;
+ TQStringList OpenvpnDigests;
+ TQStringList KernelCrypto;
+ TQString NameAndPidOfProgramListen;
+ TQString EmailAddressOfCert;
+ TQString OpenvpnDigestString;
+ TQString IdType;
+ TQString Hostname;
+ TQStringList SmartcardSlots;
+ TQStringList SmartcardCertsFromSlot;
+ TQStringList CertsFromCiscoCertStore;
+ TQStringList OpenvpnPkcs11Ids;
int CertsFromCiscoCertPos;
int ListenPort;