Diffstat (limited to 'noncore/settings/networksettings2/network/network_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/network/network_NN.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/noncore/settings/networksettings2/network/network_NN.cpp b/noncore/settings/networksettings2/network/network_NN.cpp index 82d0c29..2fa31bd 100644 --- a/noncore/settings/networksettings2/network/network_NN.cpp +++ b/noncore/settings/networksettings2/network/network_NN.cpp | |||
@@ -1,36 +1,32 @@ | |||
1 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
2 | #include <resources.h> | 2 | #include <resources.h> |
3 | #include <netnode.h> | 3 | #include <netnode.h> |
4 | #include "network_NN.h" | 4 | #include "network_NN.h" |
5 | #include "network_NNI.h" | 5 | #include "network_NNI.h" |
6 | 6 | ||
7 | #ifndef MYPLUGIN | ||
8 | |||
9 | #include "netnodeinterface.h" | 7 | #include "netnodeinterface.h" |
10 | 8 | ||
11 | #endif | ||
12 | |||
13 | static const char * NetworkNeeds[] = | 9 | static const char * NetworkNeeds[] = |
14 | { "device", | 10 | { "device", |
15 | 0 | 11 | 0 |
16 | }; | 12 | }; |
17 | 13 | ||
18 | static const char * NetworkProvides[] = | 14 | static const char * NetworkProvides[] = |
19 | { "connection", | 15 | { "connection", |
20 | 0 | 16 | 0 |
21 | }; | 17 | }; |
22 | 18 | ||
23 | /** | 19 | /** |
24 | * Constructor, find all of the possible interfaces | 20 | * Constructor, find all of the possible interfaces |
25 | */ | 21 | */ |
26 | NetworkNetNode::NetworkNetNode() : ANetNode(tr("IP Configuration")) { | 22 | NetworkNetNode::NetworkNetNode() : ANetNode(tr("IP Configuration")) { |
27 | 23 | ||
28 | NSResources->addSystemFile( | 24 | NSResources->addSystemFile( |
29 | "interfaces", "/etc/network/interfaces", 1 ); | 25 | "interfaces", "/etc/network/interfaces", 1 ); |
30 | } | 26 | } |
31 | 27 | ||
32 | /** | 28 | /** |
33 | * Delete any interfaces that we own. | 29 | * Delete any interfaces that we own. |
34 | */ | 30 | */ |
35 | NetworkNetNode::~NetworkNetNode(){ | 31 | NetworkNetNode::~NetworkNetNode(){ |
36 | } | 32 | } |
@@ -75,38 +71,25 @@ short NetworkNetNode::generateFile( SystemFile & SF, | |||
75 | SF << " script " | 71 | SF << " script " |
76 | << QPEApplication::qpeDir() | 72 | << QPEApplication::qpeDir() |
77 | << "bin/networksettings2-request" | 73 | << "bin/networksettings2-request" |
78 | << endl | 74 | << endl |
79 | << endl; | 75 | << endl; |
80 | return 0; | 76 | return 0; |
81 | } | 77 | } |
82 | return 1; | 78 | return 1; |
83 | } | 79 | } |
84 | 80 | ||
85 | const char ** NetworkNetNode::needs( void ) { | 81 | const char ** NetworkNetNode::needs( void ) { |
86 | return NetworkNeeds; | 82 | return NetworkNeeds; |
87 | } | 83 | } |
88 | 84 | ||
89 | const char ** NetworkNetNode::provides( void ) { | 85 | const char ** NetworkNetNode::provides( void ) { |
90 | return NetworkProvides; | 86 | return NetworkProvides; |
91 | } | 87 | } |
92 | 88 | ||
93 | void NetworkNetNode::setSpecificAttribute( QString & , QString & ) { | 89 | void NetworkNetNode::setSpecificAttribute( QString & , QString & ) { |
94 | } | 90 | } |
95 | 91 | ||
96 | void NetworkNetNode::saveSpecificAttribute( QTextStream & ) { | 92 | void NetworkNetNode::saveSpecificAttribute( QTextStream & ) { |
97 | } | 93 | } |
98 | 94 | ||
99 | #ifdef MYPLUGIN | 95 | OPIE_NS2_PLUGIN( NetNodeInterface_T<NetworkNetNode> ) |
100 | |||
101 | extern "C" { | ||
102 | void create_plugin( QList<ANetNode> & PNN ) { | ||
103 | PNN.append( new NetworkNetNode() ); | ||
104 | } | ||
105 | |||
106 | #else | ||
107 | |||
108 | OPIE_NS2_PLUGIN( NetNodeInterface<NetworkNetNode> ) | ||
109 | |||
110 | #endif | ||
111 | |||
112 | } | ||