summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.cpp
Unidiff
Diffstat (limited to 'libopie2/opienet/onetwork.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index e916c44..73b543b 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -340,24 +340,25 @@ bool OChannelHopper::isActive() const
340} 340}
341 341
342 342
343int OChannelHopper::channel() const 343int OChannelHopper::channel() const
344{ 344{
345 return *_channel; 345 return *_channel;
346} 346}
347 347
348 348
349void OChannelHopper::timerEvent( QTimerEvent* ) 349void OChannelHopper::timerEvent( QTimerEvent* )
350{ 350{
351 _iface->setChannel( *_channel ); 351 _iface->setChannel( *_channel );
352 emit( hopped( *_channel ) );
352 qDebug( "OChannelHopper::timerEvent(): set channel %d on interface '%s'", 353 qDebug( "OChannelHopper::timerEvent(): set channel %d on interface '%s'",
353 *_channel, (const char*) _iface->name() ); 354 *_channel, (const char*) _iface->name() );
354 if ( ++_channel == _channels.end() ) _channel = _channels.begin(); 355 if ( ++_channel == _channels.end() ) _channel = _channels.begin();
355} 356}
356 357
357 358
358void OChannelHopper::setInterval( int interval ) 359void OChannelHopper::setInterval( int interval )
359{ 360{
360 if ( interval == _interval ) 361 if ( interval == _interval )
361 return; 362 return;
362 363
363 if ( _interval ) 364 if ( _interval )
@@ -584,24 +585,30 @@ void OWirelessNetworkInterface::setChannelHopping( int interval )
584 _hopper->setInterval( interval ); 585 _hopper->setInterval( interval );
585 //FIXME: When and by whom will the channel hopper be deleted? 586 //FIXME: When and by whom will the channel hopper be deleted?
586 //TODO: rely on QObject hierarchy 587 //TODO: rely on QObject hierarchy
587} 588}
588 589
589 590
590int OWirelessNetworkInterface::channelHopping() const 591int OWirelessNetworkInterface::channelHopping() const
591{ 592{
592 return _hopper->interval(); 593 return _hopper->interval();
593} 594}
594 595
595 596
597OChannelHopper* OWirelessNetworkInterface::channelHopper() const
598{
599 return _hopper;
600}
601
602
596void OWirelessNetworkInterface::setMonitorMode( bool b ) 603void OWirelessNetworkInterface::setMonitorMode( bool b )
597{ 604{
598 if ( _mon ) 605 if ( _mon )
599 _mon->setEnabled( b ); 606 _mon->setEnabled( b );
600 else 607 else
601 qDebug( "ONetwork(): can't switch monitor mode without installed monitoring interface" ); 608 qDebug( "ONetwork(): can't switch monitor mode without installed monitoring interface" );
602} 609}
603 610
604 611
605bool OWirelessNetworkInterface::monitorMode() const 612bool OWirelessNetworkInterface::monitorMode() const
606{ 613{
607 qDebug( "dataLinkType = %d", dataLinkType() ); 614 qDebug( "dataLinkType = %d", dataLinkType() );