author | benmeyer <benmeyer> | 2003-01-21 16:17:11 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2003-01-21 16:17:11 (UTC) |
commit | f31a6c629738a813f53a61656c88a4c5062db195 (patch) (unidiff) | |
tree | 9fefcb1ad61888162a6704d04da7ca5aed7fb1f5 | |
parent | f1530bc4a34aa1ae4963029536e435deeae67d33 (diff) | |
download | opie-f31a6c629738a813f53a61656c88a4c5062db195.zip opie-f31a6c629738a813f53a61656c88a4c5062db195.tar.gz opie-f31a6c629738a813f53a61656c88a4c5062db195.tar.bz2 |
Added replaces
-rw-r--r-- | noncore/settings/networksettings/interfaces/interface.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/opie-networksettings.control | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp index 032819b..cc45525 100644 --- a/noncore/settings/networksettings/interfaces/interface.cpp +++ b/noncore/settings/networksettings/interfaces/interface.cpp | |||
@@ -1,101 +1,99 @@ | |||
1 | /** | 1 | /** |
2 | * $Author$ | 2 | * $Author$ |
3 | * $Date$ | 3 | * $Date$ |
4 | * $Id$ | ||
5 | * $Source$ | ||
6 | */ | 4 | */ |
7 | 5 | ||
8 | #include "interface.h" | 6 | #include "interface.h" |
9 | #include <qdatetime.h> | 7 | #include <qdatetime.h> |
10 | #include <qfile.h> | 8 | #include <qfile.h> |
11 | #include <qdir.h> | 9 | #include <qdir.h> |
12 | #include <qfileinfo.h> | 10 | #include <qfileinfo.h> |
13 | #include <qtextstream.h> | 11 | #include <qtextstream.h> |
14 | 12 | ||
15 | #define IFCONFIG "/sbin/ifconfig" | 13 | #define IFCONFIG "/sbin/ifconfig" |
16 | #define DHCP_INFO_DIR "/etc/dhcpc" | 14 | #define DHCP_INFO_DIR "/etc/dhcpc" |
17 | 15 | ||
18 | #include <stdio.h> | 16 | #include <stdio.h> |
19 | #include <stdlib.h> | 17 | #include <stdlib.h> |
20 | 18 | ||
21 | Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), hardwareName("Unknown"), moduleOwner(NULL), status(newSatus), attached(false), dhcp(false), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"){ | 19 | Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), hardwareName("Unknown"), moduleOwner(NULL), status(newSatus), attached(false), dhcp(false), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"){ |
22 | refresh(); | 20 | refresh(); |
23 | } | 21 | } |
24 | 22 | ||
25 | /** | 23 | /** |
26 | * Set status | 24 | * Set status |
27 | * @param newStatus - the new status | 25 | * @param newStatus - the new status |
28 | * emit updateInterface | 26 | * emit updateInterface |
29 | */ | 27 | */ |
30 | void Interface::setStatus(bool newStatus){ | 28 | void Interface::setStatus(bool newStatus){ |
31 | if(status != newStatus){ | 29 | if(status != newStatus){ |
32 | status = newStatus; | 30 | status = newStatus; |
33 | refresh(); | 31 | refresh(); |
34 | } | 32 | } |
35 | }; | 33 | }; |
36 | 34 | ||
37 | /** | 35 | /** |
38 | * Set if attached or not (802.11 card pulled out for example) | 36 | * Set if attached or not (802.11 card pulled out for example) |
39 | * @param isAttached - if attached | 37 | * @param isAttached - if attached |
40 | * emit updateInterface | 38 | * emit updateInterface |
41 | */ | 39 | */ |
42 | void Interface::setAttached(bool isAttached){ | 40 | void Interface::setAttached(bool isAttached){ |
43 | attached = isAttached; | 41 | attached = isAttached; |
44 | emit(updateInterface(this)); | 42 | emit(updateInterface(this)); |
45 | }; | 43 | }; |
46 | 44 | ||
47 | /** | 45 | /** |
48 | * Set Hardware name | 46 | * Set Hardware name |
49 | * @param name - the new name | 47 | * @param name - the new name |
50 | * emit updateInterface | 48 | * emit updateInterface |
51 | */ | 49 | */ |
52 | void Interface::setHardwareName(const QString &name){ | 50 | void Interface::setHardwareName(const QString &name){ |
53 | hardwareName = name; | 51 | hardwareName = name; |
54 | emit(updateInterface(this)); | 52 | emit(updateInterface(this)); |
55 | }; | 53 | }; |
56 | 54 | ||
57 | /** | 55 | /** |
58 | * Set Module owner | 56 | * Set Module owner |
59 | * @param owner - the new owner | 57 | * @param owner - the new owner |
60 | * emit updateInterface | 58 | * emit updateInterface |
61 | */ | 59 | */ |
62 | void Interface::setModuleOwner(Module *owner){ | 60 | void Interface::setModuleOwner(Module *owner){ |
63 | moduleOwner = owner; | 61 | moduleOwner = owner; |
64 | emit(updateInterface(this)); | 62 | emit(updateInterface(this)); |
65 | }; | 63 | }; |
66 | 64 | ||
67 | 65 | ||
68 | /** | 66 | /** |
69 | * Try to start the interface. | 67 | * Try to start the interface. |
70 | */ | 68 | */ |
71 | void Interface::start(){ | 69 | void Interface::start(){ |
72 | // check to see if we are already running. | 70 | // check to see if we are already running. |
73 | if(true == status){ | 71 | if(true == status){ |
74 | emit (updateMessage("Unable to start interface,\n already started")); | 72 | emit (updateMessage("Unable to start interface,\n already started")); |
75 | return; | 73 | return; |
76 | } | 74 | } |
77 | 75 | ||
78 | int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(this->name()).latin1()); | 76 | int ret = system(QString("%1 %2 up").arg(IFCONFIG).arg(this->name()).latin1()); |
79 | // See if it was successfull... | 77 | // See if it was successfull... |
80 | if(ret != 0){ | 78 | if(ret != 0){ |
81 | emit (updateMessage("Starting interface failed")); | 79 | emit (updateMessage("Starting interface failed")); |
82 | return; | 80 | return; |
83 | } | 81 | } |
84 | 82 | ||
85 | status = true; | 83 | status = true; |
86 | refresh(); | 84 | refresh(); |
87 | emit (updateMessage("Start successfull")); | 85 | emit (updateMessage("Start successfull")); |
88 | } | 86 | } |
89 | 87 | ||
90 | /** | 88 | /** |
91 | * Try to stop the interface. | 89 | * Try to stop the interface. |
92 | */ | 90 | */ |
93 | void Interface::stop(){ | 91 | void Interface::stop(){ |
94 | // check to see if we are already stopped. | 92 | // check to see if we are already stopped. |
95 | if(false == status){ | 93 | if(false == status){ |
96 | emit (updateMessage("Unable to stop interface,\n already stopped")); | 94 | emit (updateMessage("Unable to stop interface,\n already stopped")); |
97 | return; | 95 | return; |
98 | } | 96 | } |
99 | 97 | ||
100 | int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1()); | 98 | int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1()); |
101 | if(ret != 0){ | 99 | if(ret != 0){ |
diff --git a/noncore/settings/networksettings/opie-networksettings.control b/noncore/settings/networksettings/opie-networksettings.control index 8fa40c7..7635cd1 100644 --- a/noncore/settings/networksettings/opie-networksettings.control +++ b/noncore/settings/networksettings/opie-networksettings.control | |||
@@ -1,8 +1,9 @@ | |||
1 | Files: bin/networksettings apps/Settings/networksettings.desktop plugins/networksettings/* pics/networksettings/* pics/Network/PPPConnect.png $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 root/usr/bin/changedns bin/getprofile | 1 | Files: bin/networksettings apps/Settings/networksettings.desktop plugins/networksettings/* pics/networksettings/* pics/Network/PPPConnect.png $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 root/usr/bin/changedns bin/getprofile |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/settings | 3 | Section: opie/settings |
4 | Maintainer: Ben Meyer <meyerb@sharpsec.com> | 4 | Maintainer: Ben Meyer <meyerb@sharpsec.com> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: $QPE_VERSION-$SUB_VERSION | 6 | Version: $QPE_VERSION-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION) |
8 | Description: Network settings | 8 | Description: Network settings. |
9 | Replaces: opie-networksetup | ||