summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp4
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index ca53471..48fe89c 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -298,50 +298,50 @@ void WellenreiterConfigWindow::performAction( const QString& type,
298 action = newNetworkAction->currentItem(); 298 action = newNetworkAction->currentItem();
299 script = newNetworkScript->text(); 299 script = newNetworkScript->text();
300 } 300 }
301 else if ( type == "managed" || type == "adhoc" ) 301 else if ( type == "managed" || type == "adhoc" )
302 { 302 {
303 action = newClientAction->currentItem(); 303 action = newClientAction->currentItem();
304 script = newClientScript->text(); 304 script = newClientScript->text();
305 } 305 }
306 else if ( type == "station" ) 306 else if ( type == "station" )
307 { 307 {
308 action = newStationAction->currentItem(); 308 action = newStationAction->currentItem();
309 script = newStationScript->text(); 309 script = newStationScript->text();
310 } 310 }
311 else 311 else
312 { 312 {
313 qWarning( "WellenreiterConfigWindow::performAction(): unknown type '%s'", (const char*) type ); 313 qWarning( "WellenreiterConfigWindow::performAction(): unknown type '%s'", (const char*) type );
314 return; 314 return;
315 } 315 }
316 316
317 qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script ); 317 qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script );
318 318
319 switch( action ) 319 switch( action )
320 { 320 {
321 case 0: /* Ignore */ return; 321 case 0: /* Ignore */ return;
322 case 1: /* Play Alarm */ ODevice::inst()->alarmSound(); return; 322 case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return;
323 case 2: /* Play Click */ ODevice::inst()->touchSound(); return; 323 case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return;
324 case 3: /* Blink LED */ break; //FIXME: Implement this 324 case 3: /* Blink LED */ break; //FIXME: Implement this
325 case 4: /* Run Script */ 325 case 4: /* Run Script */
326 { 326 {
327 /** 327 /**
328 * 328 *
329 * Script Substitution Information: 329 * Script Substitution Information:
330 * 330 *
331 * $SSID = SSID 331 * $SSID = SSID
332 * $MAC = MAC 332 * $MAC = MAC
333 * $WEP = Wep 333 * $WEP = Wep
334 * $CHAN = Channel 334 * $CHAN = Channel
335 * 335 *
336 **/ 336 **/
337 script = script.replace( QRegExp( "$SSID" ), essid ); 337 script = script.replace( QRegExp( "$SSID" ), essid );
338 script = script.replace( QRegExp( "$MAC" ), mac ); 338 script = script.replace( QRegExp( "$MAC" ), mac );
339 script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); 339 script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) );
340 script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); 340 script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) );
341 341
342 qDebug( "going to call script '%s'", (const char*) script ); 342 qDebug( "going to call script '%s'", (const char*) script );
343 ::system( script ); 343 ::system( script );
344 qDebug( "script returned." ); 344 qDebug( "script returned." );
345 return; 345 return;
346 } 346 }
347 default: assert( false ); 347 default: assert( false );
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 43a04e3..db68e5b 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -633,53 +633,53 @@ void Wellenreiter::startClicked()
633 } 633 }
634} 634}
635 635
636 636
637void Wellenreiter::timerEvent( QTimerEvent* ) 637void Wellenreiter::timerEvent( QTimerEvent* )
638{ 638{
639 qDebug( "Wellenreiter::timerEvent()" ); 639 qDebug( "Wellenreiter::timerEvent()" );
640 OPacket* p = pcap->next(); 640 OPacket* p = pcap->next();
641 if ( !p ) // no more packets available 641 if ( !p ) // no more packets available
642 { 642 {
643 stopClicked(); 643 stopClicked();
644 } 644 }
645 else 645 else
646 { 646 {
647 receivePacket( p ); 647 receivePacket( p );
648 delete p; 648 delete p;
649 } 649 }
650} 650}
651 651
652 652
653void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) 653void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p )
654{ 654{
655 #ifdef QWS 655 #ifdef QWS
656 if ( action == "TouchSound" ) 656 if ( action == "TouchSound" )
657 ODevice::inst()->touchSound(); 657 ODevice::inst()->playTouchSound();
658 else if ( action == "AlarmSound" ) 658 else if ( action == "AlarmSound" )
659 ODevice::inst()->alarmSound(); 659 ODevice::inst()->playAlarmSound();
660 else if ( action == "KeySound" ) 660 else if ( action == "KeySound" )
661 ODevice::inst()->keySound(); 661 ODevice::inst()->playKeySound();
662 else if ( action == "LedOn" ) 662 else if ( action == "LedOn" )
663 ODevice::inst()->setLedState( Led_Mail, Led_On ); 663 ODevice::inst()->setLedState( Led_Mail, Led_On );
664 else if ( action == "LedOff" ) 664 else if ( action == "LedOff" )
665 ODevice::inst()->setLedState( Led_Mail, Led_Off ); 665 ODevice::inst()->setLedState( Led_Mail, Led_Off );
666 else if ( action == "LogMessage" ) 666 else if ( action == "LogMessage" )
667 logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); 667 logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) );
668 else if ( action == "MessageBox" ) 668 else if ( action == "MessageBox" )
669 QMessageBox::information( this, "Notification!", 669 QMessageBox::information( this, "Notification!",
670 QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); 670 QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) );
671 #else 671 #else
672 #warning Actions do not work with Qt/X11 yet 672 #warning Actions do not work with Qt/X11 yet
673 #endif 673 #endif
674} 674}
675 675
676void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) 676void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr)
677{ 677{
678 #ifdef QWS 678 #ifdef QWS
679 if ( !iface ) 679 if ( !iface )
680 { 680 {
681 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) ); 681 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) );
682 return; 682 return;
683 } 683 }
684 684
685 if ( sniffing ) 685 if ( sniffing )