Diffstat (limited to 'noncore/settings/networksettings/interfaces/interfaces.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfaces.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfaces.h b/noncore/settings/networksettings/interfaces/interfaces.h index e09ea71..26abb73 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.h +++ b/noncore/settings/networksettings/interfaces/interfaces.h | |||
@@ -20,52 +20,52 @@ | |||
20 | * See the interfaces man page for the syntax rules. | 20 | * See the interfaces man page for the syntax rules. |
21 | */ | 21 | */ |
22 | class Interfaces { | 22 | class Interfaces { |
23 | 23 | ||
24 | public: | 24 | public: |
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(QString interface); | 28 | bool isAuto(const QString &interface); |
29 | bool setAuto(QString interface, bool setAuto); | 29 | bool setAuto(const QString &interface, bool setAuto); |
30 | 30 | ||
31 | bool removeInterface(); | 31 | bool removeInterface(); |
32 | bool addInterface(QString interface, QString family, QString method); | 32 | bool addInterface(const QString &interface, const QString &family, const QString &method); |
33 | bool copyInterface(QString oldInterface, QString newInterface); | 33 | bool copyInterface(const QString &oldInterface, const QString &newInterface); |
34 | bool setInterface(QString interface); | 34 | bool setInterface(QString interface); |
35 | bool isInterfaceSet(); | 35 | inline bool isInterfaceSet(); |
36 | QString getInterfaceName(bool &error); | 36 | QString getInterfaceName(bool &error); |
37 | bool setInterfaceName(QString newName); | 37 | bool setInterfaceName(const QString &newName); |
38 | QString getInterfaceFamily(bool &error); | 38 | QString getInterfaceFamily(bool &error); |
39 | bool setInterfaceFamily(QString newName); | 39 | bool setInterfaceFamily(const QString &newName); |
40 | QString getInterfaceMethod(bool &error); | 40 | QString getInterfaceMethod(bool &error); |
41 | bool setInterfaceMethod(QString newName); | 41 | bool setInterfaceMethod(const QString &newName); |
42 | QString getInterfaceOption(QString option, bool &error); | 42 | inline QString getInterfaceOption(const QString &option, bool &error); |
43 | bool setInterfaceOption(QString option, QString value); | 43 | inline bool setInterfaceOption(const QString &option, const QString &value); |
44 | bool removeInterfaceOption(QString option, QString value); | 44 | inline bool removeInterfaceOption(const QString &option, const QString &value); |
45 | bool removeAllInterfaceOptions(); | 45 | inline bool removeAllInterfaceOptions(); |
46 | 46 | ||
47 | bool setMapping(QString interface); | 47 | bool setMapping(const QString &interface); |
48 | bool removeMapping(); | 48 | bool removeMapping(); |
49 | void addMapping(QString options); | 49 | inline void addMapping(const QString &options); |
50 | bool setMap(QString map, QString value); | 50 | inline bool setMap(const QString &map, const QString &value); |
51 | bool removeMap(QString map, QString value); | 51 | inline bool removeMap(const QString &map, const QString &value); |
52 | QString getMap(QString map, bool &error); | 52 | inline QString getMap(const QString &map, bool &error); |
53 | bool setScript(QString); | 53 | inline bool setScript(const QString &argument); |
54 | QString getScript(bool &error); | 54 | inline QString getScript(bool &error); |
55 | 55 | ||
56 | bool write(); | 56 | bool write(); |
57 | 57 | ||
58 | private: | 58 | private: |
59 | bool setStanza(QString stanza, QString option,QStringList::Iterator &iterator); | 59 | bool setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator); |
60 | bool setOption(QStringList::Iterator start, QString option, QString value); | 60 | bool setOption(const QStringList::Iterator &start, const QString &option, const QString &value); |
61 | bool removeOption(QStringList::Iterator start, QString option, QString value); | 61 | bool removeOption(const QStringList::Iterator &start, const QString &option, const QString &value); |
62 | QString getOption(QStringList::Iterator start, QString option, bool &error); | 62 | QString getOption(const QStringList::Iterator &start, const QString &option, bool &error); |
63 | bool removeAllOptions(QStringList::Iterator start); | 63 | bool removeAllOptions(const QStringList::Iterator &start); |
64 | 64 | ||
65 | QString interfacesFile; | 65 | QString interfacesFile; |
66 | QStringList interfaces; | 66 | QStringList interfaces; |
67 | QStringList::Iterator currentIface; | 67 | QStringList::Iterator currentIface; |
68 | QStringList::Iterator currentMapping; | 68 | QStringList::Iterator currentMapping; |
69 | 69 | ||
70 | QStringList acceptedFamily; | 70 | QStringList acceptedFamily; |
71 | }; | 71 | }; |