summaryrefslogtreecommitdiff
authorsimon <simon>2003-04-20 10:19:39 (UTC)
committer simon <simon>2003-04-20 10:19:39 (UTC)
commitb2583563a61e1ac1d9207fb3c008443a5fc7dc3c (patch) (unidiff)
treebd9543d81221f036aceed53e666ae1a43e26eb84
parente24ed721e823232876a266cd78cd7341675b4378 (diff)
downloadopie-b2583563a61e1ac1d9207fb3c008443a5fc7dc3c.zip
opie-b2583563a61e1ac1d9207fb3c008443a5fc7dc3c.tar.gz
opie-b2583563a61e1ac1d9207fb3c008443a5fc7dc3c.tar.bz2
- removed those:
-#ifdef QT_NO_DEBUG -inline -#endif <some method here not marked inline in the header file> it makes little sense to inline a method in the .cpp file for non-debug builds, apart from that it causes the method not to be emitted for non-debug builds, causing undefined references in apps referencing them
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetutils.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/libopie2/opienet/onetutils.cpp b/libopie2/opienet/onetutils.cpp
index 236f108..e05efc2 100644
--- a/libopie2/opienet/onetutils.cpp
+++ b/libopie2/opienet/onetutils.cpp
@@ -109,113 +109,101 @@ OMacAddress OMacAddress::fromString( const QString& str )
109 return (const unsigned char*) &buf; 109 return (const unsigned char*) &buf;
110} 110}
111 111
112 112
113QString OMacAddress::toString( bool substitute ) const 113QString OMacAddress::toString( bool substitute ) const
114{ 114{
115 QString manu; 115 QString manu;
116 manu.sprintf( "%.2X:%.2X:%.2X", _bytes[0]&0xff, _bytes[1]&0xff, _bytes[2]&0xff ); 116 manu.sprintf( "%.2X:%.2X:%.2X", _bytes[0]&0xff, _bytes[1]&0xff, _bytes[2]&0xff );
117 QString serial; 117 QString serial;
118 serial.sprintf( ":%.2X:%.2X:%.2X", _bytes[3]&0xff, _bytes[4]&0xff, _bytes[5]&0xff ); 118 serial.sprintf( ":%.2X:%.2X:%.2X", _bytes[3]&0xff, _bytes[4]&0xff, _bytes[5]&0xff );
119 if ( !substitute ) return manu+serial; 119 if ( !substitute ) return manu+serial;
120 // fallback - if no vendor is found, just use the number 120 // fallback - if no vendor is found, just use the number
121 QString textmanu = OManufacturerDB::instance()->lookup( manu ); 121 QString textmanu = OManufacturerDB::instance()->lookup( manu );
122 return textmanu.isNull() ? manu+serial : textmanu + serial; 122 return textmanu.isNull() ? manu+serial : textmanu + serial;
123} 123}
124 124
125 125
126QString OMacAddress::manufacturer() const 126QString OMacAddress::manufacturer() const
127{ 127{
128 return OManufacturerDB::instance()->lookup( toString() ); 128 return OManufacturerDB::instance()->lookup( toString() );
129} 129}
130 130
131bool operator==( const OMacAddress &m1, const OMacAddress &m2 ) 131bool operator==( const OMacAddress &m1, const OMacAddress &m2 )
132{ 132{
133 return memcmp( &m1._bytes, &m2._bytes, 6 ) == 0; 133 return memcmp( &m1._bytes, &m2._bytes, 6 ) == 0;
134} 134}
135 135
136 136
137/*====================================================================================== 137/*======================================================================================
138 * OHostAddress 138 * OHostAddress
139 *======================================================================================*/ 139 *======================================================================================*/
140 140
141 141
142/*====================================================================================== 142/*======================================================================================
143 * OPrivateIOCTL 143 * OPrivateIOCTL
144 *======================================================================================*/ 144 *======================================================================================*/
145 145
146OPrivateIOCTL::OPrivateIOCTL( QObject* parent, const char* name, int cmd, int getargs, int setargs ) 146OPrivateIOCTL::OPrivateIOCTL( QObject* parent, const char* name, int cmd, int getargs, int setargs )
147 :QObject( parent, name ), _ioctl( cmd ), _getargs( getargs ), _setargs( setargs ) 147 :QObject( parent, name ), _ioctl( cmd ), _getargs( getargs ), _setargs( setargs )
148{ 148{
149} 149}
150 150
151 151
152OPrivateIOCTL::~OPrivateIOCTL() 152OPrivateIOCTL::~OPrivateIOCTL()
153{ 153{
154} 154}
155 155
156 156
157#ifdef QT_NO_DEBUG
158inline
159#endif
160int OPrivateIOCTL::numberGetArgs() const 157int OPrivateIOCTL::numberGetArgs() const
161{ 158{
162 return _getargs & IW_PRIV_SIZE_MASK; 159 return _getargs & IW_PRIV_SIZE_MASK;
163} 160}
164 161
165 162
166#ifdef QT_NO_DEBUG
167inline
168#endif
169int OPrivateIOCTL::typeGetArgs() const 163int OPrivateIOCTL::typeGetArgs() const
170{ 164{
171 return _getargs & IW_PRIV_TYPE_MASK >> 12; 165 return _getargs & IW_PRIV_TYPE_MASK >> 12;
172} 166}
173 167
174 168
175#ifdef QT_NO_DEBUG
176inline
177#endif
178int OPrivateIOCTL::numberSetArgs() const 169int OPrivateIOCTL::numberSetArgs() const
179{ 170{
180 return _setargs & IW_PRIV_SIZE_MASK; 171 return _setargs & IW_PRIV_SIZE_MASK;
181} 172}
182 173
183 174
184#ifdef QT_NO_DEBUG
185inline
186#endif
187int OPrivateIOCTL::typeSetArgs() const 175int OPrivateIOCTL::typeSetArgs() const
188{ 176{
189 return _setargs & IW_PRIV_TYPE_MASK >> 12; 177 return _setargs & IW_PRIV_TYPE_MASK >> 12;
190} 178}
191 179
192 180
193void OPrivateIOCTL::invoke() const 181void OPrivateIOCTL::invoke() const
194{ 182{
195 ( (OWirelessNetworkInterface*) parent() )->wioctl( _ioctl ); 183 ( (OWirelessNetworkInterface*) parent() )->wioctl( _ioctl );
196} 184}
197 185
198 186
199void OPrivateIOCTL::setParameter( int num, u_int32_t value ) 187void OPrivateIOCTL::setParameter( int num, u_int32_t value )
200{ 188{
201 u_int32_t* arglist = (u_int32_t*) &( (OWirelessNetworkInterface*) parent() )->_iwr.u.name; 189 u_int32_t* arglist = (u_int32_t*) &( (OWirelessNetworkInterface*) parent() )->_iwr.u.name;
202 arglist[num] = value; 190 arglist[num] = value;
203} 191}
204 192
205/*====================================================================================== 193/*======================================================================================
206 * assorted functions 194 * assorted functions
207 *======================================================================================*/ 195 *======================================================================================*/
208 196
209void dumpBytes( const unsigned char* data, int num ) 197void dumpBytes( const unsigned char* data, int num )
210{ 198{
211 printf( "Dumping %d bytes @ %0x", num, data ); 199 printf( "Dumping %d bytes @ %0x", num, data );
212 printf( "-------------------------------------------\n" ); 200 printf( "-------------------------------------------\n" );
213 201
214 for ( int i = 0; i < num; ++i ) 202 for ( int i = 0; i < num; ++i )
215 { 203 {
216 printf( "%02x ", data[i] ); 204 printf( "%02x ", data[i] );
217 if ( !((i+1) % 32) ) printf( "\n" ); 205 if ( !((i+1) % 32) ) printf( "\n" );
218 } 206 }
219 printf( "\n\n" ); 207 printf( "\n\n" );
220} 208}
221 209