summaryrefslogtreecommitdiff
authorbenmeyer <benmeyer>2002-11-08 17:42:03 (UTC)
committer benmeyer <benmeyer>2002-11-08 17:42:03 (UTC)
commit24da3ab5dd821dd552f13fa7b22f5b3c2986eecd (patch) (unidiff)
tree5403ee460b8bc628fabc1607f4d84315cddef1cd
parent56a6d067a51d741eb9be1912b69325bdd424dd84 (diff)
downloadopie-24da3ab5dd821dd552f13fa7b22f5b3c2986eecd.zip
opie-24da3ab5dd821dd552f13fa7b22f5b3c2986eecd.tar.gz
opie-24da3ab5dd821dd552f13fa7b22f5b3c2986eecd.tar.bz2
Fix compile error
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/interfaces/interfaces.h26
-rw-r--r--noncore/net/networksetup/networksetup.pro2
-rw-r--r--noncore/settings/networksettings/interfaces/interfaces.h26
-rw-r--r--noncore/settings/networksettings/networksetup.pro2
4 files changed, 28 insertions, 28 deletions
diff --git a/noncore/net/networksetup/interfaces/interfaces.h b/noncore/net/networksetup/interfaces/interfaces.h
index 5a8feb6..d662919 100644
--- a/noncore/net/networksetup/interfaces/interfaces.h
+++ b/noncore/net/networksetup/interfaces/interfaces.h
@@ -1,77 +1,77 @@
1#ifndef INTERFACES_H 1#ifndef INTERFACES_H
2#define INTERFACES_H 2#define INTERFACES_H
3 3
4#include <qstring.h> 4#include <qstring.h>
5#include <qstringlist.h> 5#include <qstringlist.h>
6 6
7#define INTERFACES_LOOPBACK "loopback" 7#define INTERFACES_LOOPBACK "loopback"
8 8
9#define INTERFACES_FAMILY_INET "inet" 9#define INTERFACES_FAMILY_INET "inet"
10#define INTERFACES_FAMILY_IPX "ipx" 10#define INTERFACES_FAMILY_IPX "ipx"
11#define INTERFACES_FAMILY_INET6 "inet6" 11#define INTERFACES_FAMILY_INET6 "inet6"
12 12
13#define INTERFACES_METHOD_DHCP "dhcp" 13#define INTERFACES_METHOD_DHCP "dhcp"
14#define INTERFACES_METHOD_STATIC "static" 14#define INTERFACES_METHOD_STATIC "static"
15#define INTERFACES_METHOD_PPP "ppp" 15#define INTERFACES_METHOD_PPP "ppp"
16 16
17/** 17/**
18 * This class provides a clean frontend for parsing the network interfaces file. 18 * This class provides a clean frontend for parsing the network interfaces file.
19 * It provides helper functions to minipulate the options within the file. 19 * It provides helper functions to minipulate the options within the file.
20 * See the interfaces man page for the syntax rules. 20 * See the interfaces man page for the syntax rules.
21 */ 21 */
22class Interfaces { 22class Interfaces {
23 23
24public: 24public:
25 Interfaces(QString useInterfacesFile = "/etc/network/interfaces"); 25 Interfaces(QString useInterfacesFile = "/etc/network/interfaces");
26 QStringList getInterfaceList(); 26 QStringList getInterfaceList();
27 27
28 bool isAuto(const QString &interface); 28 bool isAuto(const QString &interface);
29 bool setAuto(const QString &interface, bool setAuto); 29 bool setAuto(const QString &interface, bool setAuto);
30 30
31 inline bool removeInterface(); 31 bool removeInterface();
32 bool addInterface(const QString &interface, const QString &family, const QString &method); 32 bool addInterface(const QString &interface, const QString &family, const QString &method);
33 bool copyInterface(const QString &oldInterface, const QString &newInterface); 33 bool copyInterface(const QString &oldInterface, const QString &newInterface);
34 bool setInterface(QString interface); 34 bool setInterface(QString interface);
35 inline bool isInterfaceSet(); 35 bool isInterfaceSet();
36 QString getInterfaceName(bool &error); 36 QString getInterfaceName(bool &error);
37 bool setInterfaceName(const QString &newName); 37 bool setInterfaceName(const QString &newName);
38 QString getInterfaceFamily(bool &error); 38 QString getInterfaceFamily(bool &error);
39 bool setInterfaceFamily(const QString &newName); 39 bool setInterfaceFamily(const QString &newName);
40 QString getInterfaceMethod(bool &error); 40 QString getInterfaceMethod(bool &error);
41 bool setInterfaceMethod(const QString &newName); 41 bool setInterfaceMethod(const QString &newName);
42 inline QString getInterfaceOption(const QString &option, bool &error); 42 QString getInterfaceOption(const QString &option, bool &error);
43 inline bool setInterfaceOption(const QString &option, const QString &value); 43 bool setInterfaceOption(const QString &option, const QString &value);
44 inline bool removeInterfaceOption(const QString &option, const QString &value); 44 bool removeInterfaceOption(const QString &option, const QString &value);
45 inline bool removeAllInterfaceOptions(); 45 bool removeAllInterfaceOptions();
46 46
47 bool setMapping(const QString &interface); 47 bool setMapping(const QString &interface);
48 inline bool removeMapping(); 48 bool removeMapping();
49 inline void addMapping(const QString &options); 49 void addMapping(const QString &options);
50 inline bool setMap(const QString &map, const QString &value); 50 bool setMap(const QString &map, const QString &value);
51 inline bool removeMap(const QString &map, const QString &value); 51 bool removeMap(const QString &map, const QString &value);
52 inline QString getMap(const QString &map, bool &error); 52 QString getMap(const QString &map, bool &error);
53 inline bool setScript(const QString &argument); 53 bool setScript(const QString &argument);
54 inline QString getScript(bool &error); 54 QString getScript(bool &error);
55 55
56 bool write(); 56 bool write();
57 57
58private: 58private:
59 bool setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator); 59 bool setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator);
60 bool setOption(const QStringList::Iterator &start, const QString &option, const QString &value); 60 bool setOption(const QStringList::Iterator &start, const QString &option, const QString &value);
61 bool removeOption(const QStringList::Iterator &start, const QString &option, const QString &value); 61 bool removeOption(const QStringList::Iterator &start, const QString &option, const QString &value);
62 QString getOption(const QStringList::Iterator &start, const QString &option, bool &error); 62 QString getOption(const QStringList::Iterator &start, const QString &option, bool &error);
63 bool removeStanza(QStringList::Iterator &stanza); 63 bool removeStanza(QStringList::Iterator &stanza);
64 bool removeAllOptions(const QStringList::Iterator &start); 64 bool removeAllOptions(const QStringList::Iterator &start);
65 65
66 QString interfacesFile; 66 QString interfacesFile;
67 QStringList interfaces; 67 QStringList interfaces;
68 QStringList::Iterator currentIface; 68 QStringList::Iterator currentIface;
69 QStringList::Iterator currentMapping; 69 QStringList::Iterator currentMapping;
70 70
71 QStringList acceptedFamily; 71 QStringList acceptedFamily;
72}; 72};
73 73
74#endif 74#endif
75 75
76// interfaces 76// interfaces
77 77
diff --git a/noncore/net/networksetup/networksetup.pro b/noncore/net/networksetup/networksetup.pro
index cb517ce..fbf125f 100644
--- a/noncore/net/networksetup/networksetup.pro
+++ b/noncore/net/networksetup/networksetup.pro
@@ -1,11 +1,11 @@
1#DESTDIR = $(OPIEDIR)/bin 1#DESTDIR = $(OPIEDIR)/bin
2TEMPLATE = app 2TEMPLATE = app
3#CONFIG = qt warn_on debug 3#CONFIG = qt warn_on debug
4CONFIG = qt warn_on release 4CONFIG = qt warn_on release
5HEADERS = mainwindowimp.h addconnectionimp.h defaultmodule.h module.h 5HEADERS = mainwindowimp.h addconnectionimp.h defaultmodule.h module.h
6SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp 6SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp
7INCLUDEPATH += $(OPIEDIR)/include interfaces/ 7INCLUDEPATH += $(OPIEDIR)/include interfaces/
8DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan 8DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan/
9LIBS += -lqpe -L$(OPIEDIR)/plugins/networksetup -Linterfaces/ -linterfaces 9LIBS += -lqpe -L$(OPIEDIR)/plugins/networksetup -Linterfaces/ -linterfaces
10INTERFACES = mainwindow.ui addconnection.ui 10INTERFACES = mainwindow.ui addconnection.ui
11TARGET = networksetup 11TARGET = networksetup
diff --git a/noncore/settings/networksettings/interfaces/interfaces.h b/noncore/settings/networksettings/interfaces/interfaces.h
index 5a8feb6..d662919 100644
--- a/noncore/settings/networksettings/interfaces/interfaces.h
+++ b/noncore/settings/networksettings/interfaces/interfaces.h
@@ -1,77 +1,77 @@
1#ifndef INTERFACES_H 1#ifndef INTERFACES_H
2#define INTERFACES_H 2#define INTERFACES_H
3 3
4#include <qstring.h> 4#include <qstring.h>
5#include <qstringlist.h> 5#include <qstringlist.h>
6 6
7#define INTERFACES_LOOPBACK "loopback" 7#define INTERFACES_LOOPBACK "loopback"
8 8
9#define INTERFACES_FAMILY_INET "inet" 9#define INTERFACES_FAMILY_INET "inet"
10#define INTERFACES_FAMILY_IPX "ipx" 10#define INTERFACES_FAMILY_IPX "ipx"
11#define INTERFACES_FAMILY_INET6 "inet6" 11#define INTERFACES_FAMILY_INET6 "inet6"
12 12
13#define INTERFACES_METHOD_DHCP "dhcp" 13#define INTERFACES_METHOD_DHCP "dhcp"
14#define INTERFACES_METHOD_STATIC "static" 14#define INTERFACES_METHOD_STATIC "static"
15#define INTERFACES_METHOD_PPP "ppp" 15#define INTERFACES_METHOD_PPP "ppp"
16 16
17/** 17/**
18 * This class provides a clean frontend for parsing the network interfaces file. 18 * This class provides a clean frontend for parsing the network interfaces file.
19 * It provides helper functions to minipulate the options within the file. 19 * It provides helper functions to minipulate the options within the file.
20 * See the interfaces man page for the syntax rules. 20 * See the interfaces man page for the syntax rules.
21 */ 21 */
22class Interfaces { 22class Interfaces {
23 23
24public: 24public:
25 Interfaces(QString useInterfacesFile = "/etc/network/interfaces"); 25 Interfaces(QString useInterfacesFile = "/etc/network/interfaces");
26 QStringList getInterfaceList(); 26 QStringList getInterfaceList();
27 27
28 bool isAuto(const QString &interface); 28 bool isAuto(const QString &interface);
29 bool setAuto(const QString &interface, bool setAuto); 29 bool setAuto(const QString &interface, bool setAuto);
30 30
31 inline bool removeInterface(); 31 bool removeInterface();
32 bool addInterface(const QString &interface, const QString &family, const QString &method); 32 bool addInterface(const QString &interface, const QString &family, const QString &method);
33 bool copyInterface(const QString &oldInterface, const QString &newInterface); 33 bool copyInterface(const QString &oldInterface, const QString &newInterface);
34 bool setInterface(QString interface); 34 bool setInterface(QString interface);
35 inline bool isInterfaceSet(); 35 bool isInterfaceSet();
36 QString getInterfaceName(bool &error); 36 QString getInterfaceName(bool &error);
37 bool setInterfaceName(const QString &newName); 37 bool setInterfaceName(const QString &newName);
38 QString getInterfaceFamily(bool &error); 38 QString getInterfaceFamily(bool &error);
39 bool setInterfaceFamily(const QString &newName); 39 bool setInterfaceFamily(const QString &newName);
40 QString getInterfaceMethod(bool &error); 40 QString getInterfaceMethod(bool &error);
41 bool setInterfaceMethod(const QString &newName); 41 bool setInterfaceMethod(const QString &newName);
42 inline QString getInterfaceOption(const QString &option, bool &error); 42 QString getInterfaceOption(const QString &option, bool &error);
43 inline bool setInterfaceOption(const QString &option, const QString &value); 43 bool setInterfaceOption(const QString &option, const QString &value);
44 inline bool removeInterfaceOption(const QString &option, const QString &value); 44 bool removeInterfaceOption(const QString &option, const QString &value);
45 inline bool removeAllInterfaceOptions(); 45 bool removeAllInterfaceOptions();
46 46
47 bool setMapping(const QString &interface); 47 bool setMapping(const QString &interface);
48 inline bool removeMapping(); 48 bool removeMapping();
49 inline void addMapping(const QString &options); 49 void addMapping(const QString &options);
50 inline bool setMap(const QString &map, const QString &value); 50 bool setMap(const QString &map, const QString &value);
51 inline bool removeMap(const QString &map, const QString &value); 51 bool removeMap(const QString &map, const QString &value);
52 inline QString getMap(const QString &map, bool &error); 52 QString getMap(const QString &map, bool &error);
53 inline bool setScript(const QString &argument); 53 bool setScript(const QString &argument);
54 inline QString getScript(bool &error); 54 QString getScript(bool &error);
55 55
56 bool write(); 56 bool write();
57 57
58private: 58private:
59 bool setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator); 59 bool setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator);
60 bool setOption(const QStringList::Iterator &start, const QString &option, const QString &value); 60 bool setOption(const QStringList::Iterator &start, const QString &option, const QString &value);
61 bool removeOption(const QStringList::Iterator &start, const QString &option, const QString &value); 61 bool removeOption(const QStringList::Iterator &start, const QString &option, const QString &value);
62 QString getOption(const QStringList::Iterator &start, const QString &option, bool &error); 62 QString getOption(const QStringList::Iterator &start, const QString &option, bool &error);
63 bool removeStanza(QStringList::Iterator &stanza); 63 bool removeStanza(QStringList::Iterator &stanza);
64 bool removeAllOptions(const QStringList::Iterator &start); 64 bool removeAllOptions(const QStringList::Iterator &start);
65 65
66 QString interfacesFile; 66 QString interfacesFile;
67 QStringList interfaces; 67 QStringList interfaces;
68 QStringList::Iterator currentIface; 68 QStringList::Iterator currentIface;
69 QStringList::Iterator currentMapping; 69 QStringList::Iterator currentMapping;
70 70
71 QStringList acceptedFamily; 71 QStringList acceptedFamily;
72}; 72};
73 73
74#endif 74#endif
75 75
76// interfaces 76// interfaces
77 77
diff --git a/noncore/settings/networksettings/networksetup.pro b/noncore/settings/networksettings/networksetup.pro
index cb517ce..fbf125f 100644
--- a/noncore/settings/networksettings/networksetup.pro
+++ b/noncore/settings/networksettings/networksetup.pro
@@ -1,11 +1,11 @@
1#DESTDIR = $(OPIEDIR)/bin 1#DESTDIR = $(OPIEDIR)/bin
2TEMPLATE = app 2TEMPLATE = app
3#CONFIG = qt warn_on debug 3#CONFIG = qt warn_on debug
4CONFIG = qt warn_on release 4CONFIG = qt warn_on release
5HEADERS = mainwindowimp.h addconnectionimp.h defaultmodule.h module.h 5HEADERS = mainwindowimp.h addconnectionimp.h defaultmodule.h module.h
6SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp 6SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp
7INCLUDEPATH += $(OPIEDIR)/include interfaces/ 7INCLUDEPATH += $(OPIEDIR)/include interfaces/
8DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan 8DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan/
9LIBS += -lqpe -L$(OPIEDIR)/plugins/networksetup -Linterfaces/ -linterfaces 9LIBS += -lqpe -L$(OPIEDIR)/plugins/networksetup -Linterfaces/ -linterfaces
10INTERFACES = mainwindow.ui addconnection.ui 10INTERFACES = mainwindow.ui addconnection.ui
11TARGET = networksetup 11TARGET = networksetup