summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
Unidiff
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index 2348bbc..f052317 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -104,25 +104,25 @@ class ONetwork : public QObject
104 */ 104 */
105 // FIXME QString? -zecke 105 // FIXME QString? -zecke
106 bool isWirelessInterface( const char* interface ) const; 106 bool isWirelessInterface( const char* interface ) const;
107 /** 107 /**
108 * @returns a pointer to the @ref ONetworkInterface object for the specified @p interface or 0, if not found 108 * @returns a pointer to the @ref ONetworkInterface object for the specified @p interface or 0, if not found
109 * @see ONetworkInterface 109 * @see ONetworkInterface
110 */ 110 */
111 // FIXME: const QString& is prefered over QString!!! -zecke 111 // FIXME: const QString& is prefered over QString!!! -zecke
112 ONetworkInterface* interface( const QString& interface ) const; 112 ONetworkInterface* interface( const QString& interface ) const;
113 /** 113 /**
114 * @internal Rebuild the internal interface database 114 * @internal Rebuild the internal interface database
115 * @note Sometimes it might be useful to call this from client code, 115 * @note Sometimes it might be useful to call this from client code,
116 * e.g. after cardctl insert 116 * e.g. after issuing a cardctl insert
117 */ 117 */
118 void synchronize(); 118 void synchronize();
119 119
120 protected: 120 protected:
121 ONetwork(); 121 ONetwork();
122 122
123 private: 123 private:
124 static ONetwork* _instance; 124 static ONetwork* _instance;
125 InterfaceMap _interfaces; 125 InterfaceMap _interfaces;
126}; 126};
127 127
128 128
@@ -244,35 +244,59 @@ class ONetworkInterface : public QObject
244 * 244 *
245 * This class provides a channel hopper for radio frequencies. A channel hopper frequently 245 * This class provides a channel hopper for radio frequencies. A channel hopper frequently
246 * changes the radio frequency channel of its associated @ref OWirelessNetworkInterface. 246 * changes the radio frequency channel of its associated @ref OWirelessNetworkInterface.
247 * This is necessary when in monitoring mode and scanning for other devices, because 247 * This is necessary when in monitoring mode and scanning for other devices, because
248 * the radio frequency hardware can only detect packets sent on the same frequency. 248 * the radio frequency hardware can only detect packets sent on the same frequency.
249 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> 249 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
250 */ 250 */
251class OChannelHopper : public QObject 251class OChannelHopper : public QObject
252{ 252{
253 Q_OBJECT 253 Q_OBJECT
254 254
255 public: 255 public:
256 /**
257 * Constructor.
258 */
256 OChannelHopper( OWirelessNetworkInterface* ); 259 OChannelHopper( OWirelessNetworkInterface* );
260 /**
261 * Destructor.
262 */
257 virtual ~OChannelHopper(); 263 virtual ~OChannelHopper();
264 /**
265 * @returns true, if the channel hopper is hopping channels
266 */
258 bool isActive() const; 267 bool isActive() const;
268 /**
269 * @returns the last hopped channel
270 */
259 int channel() const; 271 int channel() const;
260 virtual void timerEvent( QTimerEvent* ); 272 /**
261 void setInterval( int ); 273 * Set the channel hopping @a interval.
274 * An interval of 0 deactivates the channel hopper.
275 */
276 void setInterval( int interval );
277 /**
278 * @returns the channel hopping interval
279 */
262 int interval() const; 280 int interval() const;
263 281
264 signals: 282 signals:
283 /**
284 * This signal is emitted right after the channel hopper performed a hop
285 */
265 void hopped( int ); 286 void hopped( int );
266 287
288 protected:
289 virtual void timerEvent( QTimerEvent* );
290
267 private: 291 private:
268 OWirelessNetworkInterface* _iface; 292 OWirelessNetworkInterface* _iface;
269 int _interval; 293 int _interval;
270 int _tid; 294 int _tid;
271 QValueList<int> _channels; 295 QValueList<int> _channels;
272 QValueList<int>::Iterator _channel; 296 QValueList<int>::Iterator _channel;
273}; 297};
274 298
275 299
276/*====================================================================================== 300/*======================================================================================
277 * OWirelessNetworkInterface 301 * OWirelessNetworkInterface
278 *======================================================================================*/ 302 *======================================================================================*/