author | simon <simon> | 2003-01-03 21:24:40 (UTC) |
---|---|---|
committer | simon <simon> | 2003-01-03 21:24:40 (UTC) |
commit | e483d88ee4158ba13d8c28b020d0e93b62e86d85 (patch) (side-by-side diff) | |
tree | 2c4ac27cf05428ad58257869c90a9ce51c4e43d3 /noncore/net/networksetup/interfaces/interfaces.h | |
parent | 91395e6cd4d104b05f962ae8833767bbbd094163 (diff) | |
download | opie-e483d88ee4158ba13d8c28b020d0e93b62e86d85.zip opie-e483d88ee4158ba13d8c28b020d0e93b62e86d85.tar.gz opie-e483d88ee4158ba13d8c28b020d0e93b62e86d85.tar.bz2 |
- these have been renamed to networksettings
Diffstat (limited to 'noncore/net/networksetup/interfaces/interfaces.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/interfaces/interfaces.h | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/noncore/net/networksetup/interfaces/interfaces.h b/noncore/net/networksetup/interfaces/interfaces.h deleted file mode 100644 index bac2a7e..0000000 --- a/noncore/net/networksetup/interfaces/interfaces.h +++ b/dev/null @@ -1,77 +0,0 @@ -#ifndef INTERFACES_H -#define INTERFACES_H - -#include <qstring.h> -#include <qstringlist.h> - -#define INTERFACES_LOOPBACK "loopback" - -#define INTERFACES_FAMILY_INET "inet" -#define INTERFACES_FAMILY_IPX "ipx" -#define INTERFACES_FAMILY_INET6 "inet6" - -#define INTERFACES_METHOD_DHCP "dhcp" -#define INTERFACES_METHOD_STATIC "static" -#define INTERFACES_METHOD_PPP "ppp" - -/** - * This class provides a clean frontend for parsing the network interfaces file. - * It provides helper functions to minipulate the options within the file. - * See the interfaces man page for the syntax rules. - */ -class Interfaces { - -public: - Interfaces(QString useInterfacesFile = "/etc/network/interfaces"); - QStringList getInterfaceList(); - - bool isAuto(const QString &interface) const ; - bool setAuto(const QString &interface, bool setAuto); - - bool removeInterface(); - bool addInterface(const QString &interface, const QString &family, const QString &method); - bool copyInterface(const QString &oldInterface, const QString &newInterface); - bool setInterface(QString interface); - bool isInterfaceSet() const ; - QString getInterfaceName(bool &error); - bool setInterfaceName(const QString &newName); - QString getInterfaceFamily(bool &error); - bool setInterfaceFamily(const QString &newName); - QString getInterfaceMethod(bool &error); - bool setInterfaceMethod(const QString &newName); - QString getInterfaceOption(const QString &option, bool &error); - bool setInterfaceOption(const QString &option, const QString &value); - bool removeInterfaceOption(const QString &option, const QString &value); - bool removeAllInterfaceOptions(); - - bool setMapping(const QString &interface); - bool removeMapping(); - void addMapping(const QString &options); - bool setMap(const QString &map, const QString &value); - bool removeMap(const QString &map, const QString &value); - QString getMap(const QString &map, bool &error); - bool setScript(const QString &argument); - QString getScript(bool &error); - - bool write(); - -private: - bool setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator); - bool removeStanza(QStringList::Iterator &stanza); - bool setOption(const QStringList::Iterator &start, const QString &option, const QString &value); - bool removeAllOptions(const QStringList::Iterator &start); - bool removeOption(const QStringList::Iterator &start, const QString &option, const QString &value); - QString getOption(const QStringList::Iterator &start, const QString &option, bool &error); - - QString interfacesFile; - QStringList interfaces; - QStringList::Iterator currentIface; - QStringList::Iterator currentMapping; - - QStringList acceptedFamily; -}; - -#endif - -// interfaces - |