summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/wellenreiter.cpp
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 79773b3..dcf796f 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -468,55 +468,63 @@ void Wellenreiter::timerEvent( QTimerEvent* )
468 { 468 {
469 receivePacket( p ); 469 receivePacket( p );
470 delete p; 470 delete p;
471 } 471 }
472} 472}
473 473
474 474
475void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) 475void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p )
476{ 476{
477 if ( action == "TouchSound" ) 477 if ( action == "TouchSound" )
478 ODevice::inst()->touchSound(); 478 ODevice::inst()->touchSound();
479 else if ( action == "AlarmSound" ) 479 else if ( action == "AlarmSound" )
480 ODevice::inst()->alarmSound(); 480 ODevice::inst()->alarmSound();
481 else if ( action == "KeySound" ) 481 else if ( action == "KeySound" )
482 ODevice::inst()->keySound(); 482 ODevice::inst()->keySound();
483 else if ( action == "LedOn" ) 483 else if ( action == "LedOn" )
484 ODevice::inst()->setLedState( Led_Mail, Led_On ); 484 ODevice::inst()->setLedState( Led_Mail, Led_On );
485 else if ( action == "LedOff" ) 485 else if ( action == "LedOff" )
486 ODevice::inst()->setLedState( Led_Mail, Led_Off ); 486 ODevice::inst()->setLedState( Led_Mail, Led_Off );
487 else if ( action == "LogMessage" ) 487 else if ( action == "LogMessage" )
488 logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); 488 logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) );
489 else if ( action == "MessageBox" ) 489 else if ( action == "MessageBox" )
490 QMessageBox::information( this, "Notification!", 490 QMessageBox::information( this, "Notification!",
491 QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); 491 QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) );
492} 492}
493 493
494void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) 494void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr)
495{ 495{
496 if ( !iface ) 496 if ( !iface )
497 { 497 {
498 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) ); 498 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) );
499 return; 499 return;
500 } 500 }
501 501
502 if ( sniffing ) 502 if ( sniffing )
503 { 503 {
504 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) ); 504 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) );
505 return; 505 return;
506 } 506 }
507 507
508 qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s", 508 qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s",
509 (const char*) iface->name(), 509 (const char*) iface->name(),
510 (const char*) type, 510 (const char*) type,
511 (const char*) essid, 511 (const char*) essid,
512 channel, 512 channel,
513 (const char*) macaddr ); 513 (const char*) macaddr );
514 514
515 QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); 515 QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" );
516 int count = 3;
517 qDebug("sending %d messages",count);
518 msg << QString("count") << QString::number(count);
519 qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() );
516 msg << QString(iface->name()) << QString("Mode") << type; 520 msg << QString(iface->name()) << QString("Mode") << type;
521 qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1());
517 msg << QString(iface->name()) << QString("ESSID") << essid; 522 msg << QString(iface->name()) << QString("ESSID") << essid;
523 qDebug("msg >%s< channel >%d<", iface->name(),channel);
518 msg << QString(iface->name()) << QString("Channel") << channel; 524 msg << QString(iface->name()) << QString("Channel") << channel;
519 msg << QString(iface->name()) << QString("MacAddr") << macaddr; 525// qDebug("msg >%s< mac >%s<", iface->name(),macaddr);
526// msg << QString(iface->name()) << QString("MacAddr") << macaddr;
527
520 528
521} 529}
522 530