author | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
commit | a9c188235c97e07b0eb96b13adbcdfd4bad64767 (patch) (unidiff) | |
tree | 13f6ae5c499dc0c1d1bd4b763a1973a0fa8635cf /noncore/settings/networksettings2/lancard | |
parent | 48b6cd5966ec6cc0b968edf10ba1a1ad96ef165f (diff) | |
download | opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.zip opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.gz opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.bz2 |
CONTROL files : changed version string
NS2 many changes and first release of OT2
Diffstat (limited to 'noncore/settings/networksettings2/lancard') (more/less context) (ignore whitespace changes)
6 files changed, 60 insertions, 99 deletions
diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.cpp b/noncore/settings/networksettings2/lancard/lancard_NN.cpp index 20ae7f6..e36f757 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NN.cpp +++ b/noncore/settings/networksettings2/lancard/lancard_NN.cpp | |||
@@ -1,71 +1,77 @@ | |||
1 | #include "lancard_NN.h" | 1 | #include "lancard_NN.h" |
2 | #include "lancard_NNI.h" | 2 | #include "lancard_NNI.h" |
3 | 3 | ||
4 | static const char * LanCardNeeds[] = | 4 | static const char * LanCardNeeds[] = |
5 | { 0 }; | 5 | { 0 |
6 | }; | ||
7 | |||
8 | static const char * LanCardProvides[] = | ||
9 | { "device", | ||
10 | 0 | ||
11 | }; | ||
6 | 12 | ||
7 | /** | 13 | /** |
8 | * Constructor, find all of the possible interfaces | 14 | * Constructor, find all of the possible interfaces |
9 | */ | 15 | */ |
10 | LanCardNetNode::LanCardNetNode() : ANetNode(tr("LAN card")), NICMACAddresses() { | 16 | LanCardNetNode::LanCardNetNode() : ANetNode(tr("LAN card")), NICMACAddresses() { |
11 | InstanceCount = 2; | 17 | InstanceCount = 2; |
12 | } | 18 | } |
13 | 19 | ||
14 | /** | 20 | /** |
15 | * Delete any interfaces that we own. | 21 | * Delete any interfaces that we own. |
16 | */ | 22 | */ |
17 | LanCardNetNode::~LanCardNetNode(){ | 23 | LanCardNetNode::~LanCardNetNode(){ |
18 | } | 24 | } |
19 | 25 | ||
20 | const QString LanCardNetNode::nodeDescription(){ | 26 | const QString LanCardNetNode::nodeDescription(){ |
21 | return tr("\ | 27 | return tr("\ |
22 | <p>Sets up a wired regular LAN card.</p>\ | 28 | <p>Sets up a wired regular LAN card.</p>\ |
23 | <p>Use this to set up 10/100/1000 MBit LAN cards.</p>\ | 29 | <p>Use this to set up 10/100/1000 MBit LAN cards.</p>\ |
24 | " | 30 | " |
25 | ); | 31 | ); |
26 | } | 32 | } |
27 | 33 | ||
28 | ANetNodeInstance * LanCardNetNode::createInstance( void ) { | 34 | ANetNodeInstance * LanCardNetNode::createInstance( void ) { |
29 | return new ALanCard( this ); | 35 | return new ALanCard( this ); |
30 | } | 36 | } |
31 | 37 | ||
32 | 38 | ||
33 | const char ** LanCardNetNode::needs( void ) { | 39 | const char ** LanCardNetNode::needs( void ) { |
34 | return LanCardNeeds; | 40 | return LanCardNeeds; |
35 | } | 41 | } |
36 | 42 | ||
37 | const char * LanCardNetNode::provides( void ) { | 43 | const char ** LanCardNetNode::provides( void ) { |
38 | return "device"; | 44 | return LanCardProvides; |
39 | } | 45 | } |
40 | 46 | ||
41 | QString LanCardNetNode::genNic( long nr ) { | 47 | QString LanCardNetNode::genNic( long nr ) { |
42 | QString S; | 48 | QString S; |
43 | return S.sprintf( "eth%ld", nr ); | 49 | return S.sprintf( "eth%ld", nr ); |
44 | } | 50 | } |
45 | 51 | ||
46 | void LanCardNetNode::setSpecificAttribute( QString & A, QString & V ) { | 52 | void LanCardNetNode::setSpecificAttribute( QString & A, QString & V ) { |
47 | if( A == "interfacecount" ) { | 53 | if( A == "interfacecount" ) { |
48 | InstanceCount = V.toLong(); | 54 | InstanceCount = V.toLong(); |
49 | } else if ( A == "macaddress" ) { | 55 | } else if ( A == "macaddress" ) { |
50 | NICMACAddresses.append( V ); | 56 | NICMACAddresses.append( V ); |
51 | } | 57 | } |
52 | } | 58 | } |
53 | 59 | ||
54 | void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) { | 60 | void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) { |
55 | TS << "interfacecount=" | 61 | TS << "interfacecount=" |
56 | << InstanceCount | 62 | << InstanceCount |
57 | << endl; | 63 | << endl; |
58 | for( QStringList::Iterator it = NICMACAddresses.begin(); | 64 | for( QStringList::Iterator it = NICMACAddresses.begin(); |
59 | it != NICMACAddresses.end(); | 65 | it != NICMACAddresses.end(); |
60 | ++it ) { | 66 | ++it ) { |
61 | TS << "macaddress=" | 67 | TS << "macaddress=" |
62 | << (*it) | 68 | << (*it) |
63 | << endl; | 69 | << endl; |
64 | } | 70 | } |
65 | } | 71 | } |
66 | 72 | ||
67 | extern "C" { | 73 | extern "C" { |
68 | void create_plugin( QList<ANetNode> & PNN ) { | 74 | void create_plugin( QList<ANetNode> & PNN ) { |
69 | PNN.append( new LanCardNetNode() ); | 75 | PNN.append( new LanCardNetNode() ); |
70 | } | 76 | } |
71 | } | 77 | } |
diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.h b/noncore/settings/networksettings2/lancard/lancard_NN.h index 6882af7..dc7566a 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NN.h +++ b/noncore/settings/networksettings2/lancard/lancard_NN.h | |||
@@ -1,50 +1,50 @@ | |||
1 | #ifndef LANCARD_NETNODE_H | 1 | #ifndef LANCARD_NETNODE_H |
2 | #define LANCARD_NETNODE_H | 2 | #define LANCARD_NETNODE_H |
3 | 3 | ||
4 | #include <qstringlist.h> | 4 | #include <qstringlist.h> |
5 | #include "netnode.h" | 5 | #include "netnode.h" |
6 | 6 | ||
7 | class ALanCard; | 7 | class ALanCard; |
8 | 8 | ||
9 | class LanCardNetNode : public ANetNode{ | 9 | class LanCardNetNode : public ANetNode{ |
10 | 10 | ||
11 | Q_OBJECT | 11 | Q_OBJECT |
12 | 12 | ||
13 | public: | 13 | public: |
14 | 14 | ||
15 | LanCardNetNode(); | 15 | LanCardNetNode(); |
16 | virtual ~LanCardNetNode(); | 16 | virtual ~LanCardNetNode(); |
17 | 17 | ||
18 | virtual const QString pixmapName() | 18 | virtual const QString pixmapName() |
19 | { return "Devices/card"; } | 19 | { return "Devices/card"; } |
20 | 20 | ||
21 | virtual QString genNic( long ); | 21 | virtual QString genNic( long ); |
22 | virtual long instanceCount( void ) | 22 | virtual long instanceCount( void ) |
23 | { return InstanceCount; } | 23 | { return InstanceCount; } |
24 | 24 | ||
25 | virtual const QString nodeDescription() ; | 25 | virtual const QString nodeDescription() ; |
26 | virtual ANetNodeInstance * createInstance( void ); | 26 | virtual ANetNodeInstance * createInstance( void ); |
27 | virtual const char ** needs( void ); | 27 | virtual const char ** needs( void ); |
28 | virtual const char * provides( void ); | 28 | virtual const char ** provides( void ); |
29 | 29 | ||
30 | QStringList & addressesOfNIC( void ) | 30 | QStringList & addressesOfNIC( void ) |
31 | { return NICMACAddresses; } | 31 | { return NICMACAddresses; } |
32 | 32 | ||
33 | private: | 33 | private: |
34 | 34 | ||
35 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); | 35 | virtual void setSpecificAttribute( QString & Attr, QString & Value ); |
36 | virtual void saveSpecificAttribute( QTextStream & TS ); | 36 | virtual void saveSpecificAttribute( QTextStream & TS ); |
37 | 37 | ||
38 | // number of interfaces for this device | 38 | // number of interfaces for this device |
39 | long InstanceCount; | 39 | long InstanceCount; |
40 | 40 | ||
41 | QStringList NICMACAddresses; | 41 | QStringList NICMACAddresses; |
42 | 42 | ||
43 | }; | 43 | }; |
44 | 44 | ||
45 | extern "C" | 45 | extern "C" |
46 | { | 46 | { |
47 | void create_plugin( QList<ANetNode> & PNN ); | 47 | void create_plugin( QList<ANetNode> & PNN ); |
48 | }; | 48 | }; |
49 | 49 | ||
50 | #endif | 50 | #endif |
diff --git a/noncore/settings/networksettings2/lancard/lancarddata.h b/noncore/settings/networksettings2/lancard/lancarddata.h index c76767f..8f5e2b5 100644 --- a/noncore/settings/networksettings2/lancard/lancarddata.h +++ b/noncore/settings/networksettings2/lancard/lancarddata.h | |||
@@ -1,13 +1,14 @@ | |||
1 | #ifndef LANCARD_DATA_H | 1 | #ifndef LANCARD_DATA_H |
2 | #define LANCARD_DATA_H | 2 | #define LANCARD_DATA_H |
3 | 3 | ||
4 | #include <qstringlist.h> | 4 | #include <qstringlist.h> |
5 | #include <qstring.h> | 5 | #include <qstring.h> |
6 | 6 | ||
7 | typedef struct LanCardData { | 7 | class LanCardData { |
8 | public : | ||
8 | bool AnyLanCard; | 9 | bool AnyLanCard; |
9 | QStringList HWAddresses; | 10 | QStringList HWAddresses; |
10 | 11 | ||
11 | } LanCardData_t; | 12 | } ; |
12 | 13 | ||
13 | #endif | 14 | #endif |
diff --git a/noncore/settings/networksettings2/lancard/lancardrun.cpp b/noncore/settings/networksettings2/lancard/lancardrun.cpp index 1544ddc..470b797 100644 --- a/noncore/settings/networksettings2/lancard/lancardrun.cpp +++ b/noncore/settings/networksettings2/lancard/lancardrun.cpp | |||
@@ -1,192 +1,148 @@ | |||
1 | #include <qfile.h> | 1 | #include <qfile.h> |
2 | #include <qtextstream.h> | 2 | #include <qtextstream.h> |
3 | #include <qstringlist.h> | 3 | #include <qstringlist.h> |
4 | #include <resources.h> | 4 | #include <resources.h> |
5 | #include "lancardrun.h" | 5 | #include "lancardrun.h" |
6 | 6 | ||
7 | void LanCardRun::detectState( NodeCollection * NC ) { | 7 | State_t LanCardRun::detectState( void ) { |
8 | 8 | ||
9 | // unavailable : no card found | 9 | // unavailable : no card found |
10 | // available : card found and assigned to us or free | 10 | // available : card found and assigned to us or free |
11 | // up : card found and assigned to us and up | 11 | // up : card found and assigned to us and up |
12 | 12 | ||
13 | QString S = QString( "/tmp/profile-%1.up" ).arg(NC->number()); | 13 | NodeCollection * NC = nodeCollection(); |
14 | QString S = QString( "/tmp/profile-%1.up" ). | ||
15 | arg( NC->number()); | ||
14 | System & Sys = NSResources->system(); | 16 | System & Sys = NSResources->system(); |
15 | InterfaceInfo * Run; | 17 | InterfaceInfo * Run; |
16 | 18 | ||
17 | QFile F( S ); | 19 | QFile F( S ); |
18 | 20 | ||
19 | if( F.open( IO_ReadOnly ) ) { | 21 | if( F.open( IO_ReadOnly ) ) { |
20 | // could open file -> read interface and assign | 22 | // could open file -> read interface and assign |
21 | QString X; | 23 | QString X; |
22 | QTextStream TS(&F); | 24 | QTextStream TS(&F); |
23 | X = TS.readLine(); | 25 | X = TS.readLine(); |
24 | // find interface | 26 | // find interface |
25 | if( handlesInterface( X ) ) { | 27 | if( handlesInterface( X ) ) { |
26 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); | 28 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); |
27 | It.current(); | 29 | It.current(); |
28 | ++It ) { | 30 | ++It ) { |
29 | Run = It.current(); | 31 | Run = It.current(); |
30 | if( X == Run->Name ) { | 32 | if( X == Run->Name ) { |
31 | Run->assignNode( netNode() ); | 33 | NC->assignInterface( Run ); |
32 | assignInterface( Run ); | 34 | return IsUp; |
33 | NC->setCurrentState( IsUp ); | ||
34 | return; | ||
35 | } | 35 | } |
36 | } | 36 | } |
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | if( ( Run = assignedInterface() ) ) { | 40 | if( ( Run = NC->assignedInterface() ) ) { |
41 | // we already have an interface assigned -> still present ? | 41 | // we already have an interface assigned -> still present ? |
42 | if( ! Run->IsUp ) { | 42 | if( ! Run->IsUp ) { |
43 | // usb is still free -> keep assignment | 43 | // usb is still free -> keep assignment |
44 | NC->setCurrentState( Available ); | 44 | return Available; |
45 | return; | ||
46 | } // else interface is up but NOT us -> some other profile | 45 | } // else interface is up but NOT us -> some other profile |
47 | } | 46 | } |
48 | 47 | ||
49 | // nothing (valid) assigned to us | 48 | // nothing (valid) assigned to us |
50 | assignInterface( 0 ); | 49 | NC->assignInterface( 0 ); |
51 | 50 | ||
52 | // find possible interface | 51 | // find possible interface |
53 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); | 52 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); |
54 | It.current(); | 53 | It.current(); |
55 | ++It ) { | 54 | ++It ) { |
56 | Run = It.current(); | 55 | Run = It.current(); |
57 | if( handlesInterface( *Run ) && | 56 | if( handlesInterface( *Run ) && |
58 | ( Run->CardType == ARPHRD_ETHER | 57 | ( Run->CardType == ARPHRD_ETHER |
59 | #ifdef ARPHRD_IEEE1394 | 58 | #ifdef ARPHRD_IEEE1394 |
60 | || Run->CardType == ARPHRD_IEEE1394 | 59 | || Run->CardType == ARPHRD_IEEE1394 |
61 | #endif | 60 | #endif |
62 | ) && | 61 | ) && |
63 | ! Run->IsUp | 62 | ! Run->IsUp |
64 | ) { | 63 | ) { |
65 | // proper type, and Not UP -> free | 64 | // proper type, and Not UP -> free |
66 | NC->setCurrentState( Off ); | 65 | return Off; |
67 | return; | ||
68 | } | 66 | } |
69 | } | 67 | } |
70 | // no free found | 68 | // no free found |
71 | 69 | ||
72 | NC->setCurrentState( Unavailable ); | 70 | return Unavailable; |
73 | |||
74 | } | 71 | } |
75 | 72 | ||
76 | bool LanCardRun::setState( NodeCollection * NC, Action_t A, bool ) { | 73 | QString LanCardRun::setMyState( NodeCollection * NC, Action_t A, bool ) { |
77 | 74 | ||
78 | // we only handle activate and deactivate | 75 | if( A == Activate ) { |
79 | switch( A ) { | 76 | InterfaceInfo * N = getInterface(); |
80 | case Activate : | 77 | |
81 | { | 78 | if( ! N ) { |
82 | if( NC->currentState() != Off ) { | 79 | // no interface available |
83 | return 0; | 80 | NC->setCurrentState( Unavailable ); |
84 | } | 81 | return tr("No interface found"); |
85 | InterfaceInfo * N = getInterface(); | 82 | } |
86 | if( ! N ) { | 83 | |
87 | // no interface available | 84 | // because we were OFF the interface |
88 | NC->setCurrentState( Unavailable ); | 85 | // we get back is NOT assigned |
89 | return 0; | 86 | NC->assignInterface( N ); |
90 | } | 87 | NC->setCurrentState( Available ); |
91 | // because we were OFF the interface | 88 | return QString(); |
92 | // we get back is NOT assigned | ||
93 | N->assignNode( netNode() ); | ||
94 | assignInterface( N ); | ||
95 | NC->setCurrentState( Available ); | ||
96 | return 1; | ||
97 | } | ||
98 | case Deactivate : | ||
99 | if( NC->currentState() == IsUp ) { | ||
100 | // bring down first | ||
101 | if( ! connection()->setState( Down ) ) | ||
102 | // could not ... | ||
103 | return 0; | ||
104 | } else if( NC->currentState() != Available ) { | ||
105 | return 1; | ||
106 | } | ||
107 | assignedInterface()->assignNode( 0 ); // release | ||
108 | assignInterface( 0 ); | ||
109 | NC->setCurrentState( Off ); | ||
110 | return 1; | ||
111 | default : | ||
112 | // FT | ||
113 | break; | ||
114 | } | 89 | } |
115 | return 0; | ||
116 | } | ||
117 | 90 | ||
118 | bool LanCardRun::canSetState( State_t Curr, Action_t A ) { | 91 | if( A == Deactivate ) { |
119 | // we only handle up down activate and deactivate | 92 | NC->assignInterface( 0 ); |
120 | switch( A ) { | 93 | NC->setCurrentState( Off ); |
121 | case Activate : | ||
122 | { // at least available | ||
123 | if( Curr == Available ) { | ||
124 | return 1; | ||
125 | } | ||
126 | // or we can make one available | ||
127 | InterfaceInfo * N = getInterface(); | ||
128 | if( ! N || N->assignedNode() != 0 ) { | ||
129 | // non available or assigned | ||
130 | return 0; | ||
131 | } | ||
132 | return 1; | ||
133 | } | ||
134 | case Deactivate : | ||
135 | return ( Curr >= Available ); | ||
136 | default : | ||
137 | // FT | ||
138 | break; | ||
139 | } | 94 | } |
140 | return 0; | 95 | |
96 | return QString(); | ||
141 | } | 97 | } |
142 | 98 | ||
143 | // get interface that is free or assigned to us | 99 | // get interface that is free or assigned to us |
144 | InterfaceInfo * LanCardRun::getInterface( void ) { | 100 | InterfaceInfo * LanCardRun::getInterface( void ) { |
145 | 101 | ||
146 | System & S = NSResources->system(); | 102 | System & S = NSResources->system(); |
147 | InterfaceInfo * best = 0, * Run; | 103 | InterfaceInfo * best = 0, * Run; |
148 | 104 | ||
149 | for( QDictIterator<InterfaceInfo> It(S.interfaces()); | 105 | for( QDictIterator<InterfaceInfo> It(S.interfaces()); |
150 | It.current(); | 106 | It.current(); |
151 | ++It ) { | 107 | ++It ) { |
152 | Run = It.current(); | 108 | Run = It.current(); |
153 | if( handlesInterface( *Run ) && | 109 | if( handlesInterface( *Run ) && |
154 | ( Run->CardType == ARPHRD_ETHER | 110 | ( Run->CardType == ARPHRD_ETHER |
155 | #ifdef ARPHRD_IEEE1394 | 111 | #ifdef ARPHRD_IEEE1394 |
156 | || Run->CardType == ARPHRD_IEEE1394 | 112 | || Run->CardType == ARPHRD_IEEE1394 |
157 | #endif | 113 | #endif |
158 | ) | 114 | ) |
159 | ) { | 115 | ) { |
160 | // this is a LAN card | 116 | // this is a LAN card |
161 | if( Run->assignedNode() == netNode() ) { | 117 | if( Run->assignedConnection() == netNode()->connection() ) { |
162 | // assigned to us | 118 | // assigned to us |
163 | return Run; | 119 | return Run; |
164 | } else if( Run->assignedNode() == 0 ) { | 120 | } else if( Run->assignedConnection() == 0 ) { |
165 | // free | 121 | // free |
166 | best = Run; | 122 | best = Run; |
167 | } | 123 | } |
168 | } | 124 | } |
169 | } | 125 | } |
170 | return best; // can be 0 | 126 | return best; // can be 0 |
171 | } | 127 | } |
172 | 128 | ||
173 | bool LanCardRun::handlesInterface( const QString & S ) { | 129 | bool LanCardRun::handlesInterface( const QString & S ) { |
174 | InterfaceInfo * II; | 130 | InterfaceInfo * II; |
175 | II = NSResources->system().interface( S ); | 131 | II = NSResources->system().interface( S ); |
176 | if( ( II = NSResources->system().interface( S ) ) ) { | 132 | if( ( II = NSResources->system().interface( S ) ) ) { |
177 | return handlesInterface( *II ); | 133 | return handlesInterface( *II ); |
178 | } | 134 | } |
179 | return Pat.match( S ) >= 0; | 135 | return Pat.match( S ) >= 0; |
180 | } | 136 | } |
181 | 137 | ||
182 | bool LanCardRun::handlesInterface( const InterfaceInfo & II ) { | 138 | bool LanCardRun::handlesInterface( const InterfaceInfo & II ) { |
183 | if( Pat.match( II.Name ) < 0 ) | 139 | if( Pat.match( II.Name ) < 0 ) |
184 | return 0; | 140 | return 0; |
185 | 141 | ||
186 | if( Data->AnyLanCard ) { | 142 | if( Data->AnyLanCard ) { |
187 | return 1; | 143 | return 1; |
188 | } | 144 | } |
189 | 145 | ||
190 | // must also match hardware address | 146 | // must also match hardware address |
191 | return ( Data->HWAddresses.findIndex( II.MACAddress ) >= 0 ); | 147 | return ( Data->HWAddresses.findIndex( II.MACAddress ) >= 0 ); |
192 | } | 148 | } |
diff --git a/noncore/settings/networksettings2/lancard/lancardrun.h b/noncore/settings/networksettings2/lancard/lancardrun.h index b28dda7..57ef3fb 100644 --- a/noncore/settings/networksettings2/lancard/lancardrun.h +++ b/noncore/settings/networksettings2/lancard/lancardrun.h | |||
@@ -1,39 +1,37 @@ | |||
1 | #ifndef LANCARDRUN_H | 1 | #ifndef LANCARDRUN_H |
2 | #define LANCARDRUN_H | 2 | #define LANCARDRUN_H |
3 | 3 | ||
4 | #include <asdevice.h> | 4 | #include <netnode.h> |
5 | #include <qregexp.h> | 5 | #include <qregexp.h> |
6 | #include "lancarddata.h" | 6 | #include "lancarddata.h" |
7 | 7 | ||
8 | class LanCardRun : public AsDevice { | 8 | class LanCardRun : public RuntimeInfo { |
9 | 9 | ||
10 | public : | 10 | public : |
11 | 11 | ||
12 | LanCardRun( ANetNodeInstance * NNI, | 12 | LanCardRun( ANetNodeInstance * NNI, |
13 | LanCardData & D ) : AsDevice( NNI ), | 13 | LanCardData & D ) : RuntimeInfo( NNI ), |
14 | Pat( "eth[0-9]" ) | 14 | Pat( "eth[0-9]" ) { |
15 | { Data = &D; } | 15 | Data = &D; |
16 | } | ||
16 | 17 | ||
17 | virtual AsDevice * device( void ) | 18 | virtual RuntimeInfo * device( void ) |
18 | { return (AsDevice *)this; } | 19 | { return this; } |
19 | 20 | ||
20 | virtual AsDevice * asDevice( void ) | 21 | bool handlesInterface( const QString & I ); |
21 | { return (AsDevice *)this; } | 22 | bool handlesInterface( const InterfaceInfo & II ); |
22 | 23 | ||
23 | protected : | 24 | State_t detectState( void ); |
24 | 25 | ||
25 | void detectState( NodeCollection * NC ); | 26 | protected : |
26 | bool setState( NodeCollection * NC, Action_t A, bool Force ); | ||
27 | bool canSetState( State_t Curr, Action_t A ); | ||
28 | 27 | ||
29 | bool handlesInterface( const QString & I ); | 28 | QString setMyState( NodeCollection * , Action_t, bool ); |
30 | bool handlesInterface( const InterfaceInfo & II ); | ||
31 | 29 | ||
32 | private : | 30 | private : |
33 | 31 | ||
34 | InterfaceInfo * getInterface( void ); | 32 | InterfaceInfo * getInterface( void ); |
35 | QRegExp Pat; | 33 | QRegExp Pat; |
36 | LanCardData * Data; | 34 | LanCardData * Data; |
37 | 35 | ||
38 | }; | 36 | }; |
39 | #endif | 37 | #endif |
diff --git a/noncore/settings/networksettings2/lancard/opie-networksettings2plugin-lancard.control b/noncore/settings/networksettings2/lancard/opie-networksettings2plugin-lancard.control index d5aca66..4f87d04 100644 --- a/noncore/settings/networksettings2/lancard/opie-networksettings2plugin-lancard.control +++ b/noncore/settings/networksettings2/lancard/opie-networksettings2plugin-lancard.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Package: opie-networksettingsplugin2-lancard | 1 | Package: opie-networksettings2plugin-lancard |
2 | Files: plugins/networksettings2/liblancard.so* | 2 | Files: plugins/networksettings2/liblancard.so* |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/settings | 4 | Section: opie/settings |
5 | Maintainer: Wim Delvaux <wimpie@handhelds.org> | 5 | Maintainer: Wim Delvaux <wimpie@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: opie-networksettings2, libopiecore2, libopienet2 | 7 | Depends: opie-networksettings2, libopiecore2, libopienet2 |
8 | Description: Network settings lancard plugin. | 8 | Description: Network settings lancard plugin. |
9 | Version: $QPE_VERSION$EXTRAVERSION | 9 | Version: $QPE_VERSION$EXTRAVERSION |