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
@@ -110,13 +110,13 @@ class ONetwork : public QObject
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
@@ -250,23 +250,47 @@ class ONetworkInterface : public QObject
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;