author | ar <ar> | 2004-02-07 23:00:09 (UTC) |
---|---|---|
committer | ar <ar> | 2004-02-07 23:00:09 (UTC) |
commit | 3f261fa6eac46b8d0d4ac8b8bb95b385435004da (patch) (side-by-side diff) | |
tree | 3ce8d25b96a287e2df7b194513f2c3c0a27ecd0a | |
parent | 83a8f6fd9db949943d58d2f2a80304d516cf45d3 (diff) | |
download | opie-3f261fa6eac46b8d0d4ac8b8bb95b385435004da.zip opie-3f261fa6eac46b8d0d4ac8b8bb95b385435004da.tar.gz opie-3f261fa6eac46b8d0d4ac8b8bb95b385435004da.tar.bz2 |
correct sound calls for use with libopie2
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 6 |
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 @@ -274,98 +274,98 @@ const QString WellenreiterConfigWindow::gpsHost() const return useGPS() ? gpsdHost->currentText() : QString::null; } int WellenreiterConfigWindow::gpsPort() const { bool ok; return useGPS() ? gpsdPort->value() : -1; } void WellenreiterConfigWindow::performAction( const QString& type, const QString& essid, const QString& mac, bool wep, int channel, int signal /* , const GpsLocation& loc */ ) { int action; QString script; if ( type == "network" ) { action = newNetworkAction->currentItem(); script = newNetworkScript->text(); } else if ( type == "managed" || type == "adhoc" ) { action = newClientAction->currentItem(); script = newClientScript->text(); } else if ( type == "station" ) { action = newStationAction->currentItem(); script = newStationScript->text(); } else { qWarning( "WellenreiterConfigWindow::performAction(): unknown type '%s'", (const char*) type ); return; } qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script ); switch( action ) { case 0: /* Ignore */ return; - case 1: /* Play Alarm */ ODevice::inst()->alarmSound(); return; - case 2: /* Play Click */ ODevice::inst()->touchSound(); return; + case 1: /* Play Alarm */ ODevice::inst()->playAlarmSound(); return; + case 2: /* Play Click */ ODevice::inst()->playTouchSound(); return; case 3: /* Blink LED */ break; //FIXME: Implement this case 4: /* Run Script */ { /** * * Script Substitution Information: * * $SSID = SSID * $MAC = MAC * $WEP = Wep * $CHAN = Channel * **/ script = script.replace( QRegExp( "$SSID" ), essid ); script = script.replace( QRegExp( "$MAC" ), mac ); script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); qDebug( "going to call script '%s'", (const char*) script ); ::system( script ); qDebug( "script returned." ); return; } default: assert( false ); } } void WellenreiterConfigWindow::load() { #ifdef Q_WS_X11 #warning Persistent Configuration not yet implemented for standalone X11 build performAutodetection(); #else qDebug( "loading configuration settings..." ); /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ OConfig* c = oApp->config(); c->setGroup( "Interface" ); QString interface = c->readEntry( "name", "<none>" ); if ( interface != "<none>" ) { #if QT_VERSION < 300 interfaceName->insertItem( interface, 0 ); interfaceName->setCurrentItem( 0 ); 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 @@ -609,101 +609,101 @@ void Wellenreiter::startClicked() else { // start timer for reading packets startTimer( 100 ); } logwindow->log( "(i) Started Scanning." ); sniffing = true; #ifdef QWS if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() ) { QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable; } #else #warning FIXME: setScreenSaverMode is not operational on the X11 build #endif emit( startedSniffing() ); if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title else { assert( parent() ); ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); } } void Wellenreiter::timerEvent( QTimerEvent* ) { qDebug( "Wellenreiter::timerEvent()" ); OPacket* p = pcap->next(); if ( !p ) // no more packets available { stopClicked(); } else { receivePacket( p ); delete p; } } void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) { #ifdef QWS if ( action == "TouchSound" ) - ODevice::inst()->touchSound(); + ODevice::inst()->playTouchSound(); else if ( action == "AlarmSound" ) - ODevice::inst()->alarmSound(); + ODevice::inst()->playAlarmSound(); else if ( action == "KeySound" ) - ODevice::inst()->keySound(); + ODevice::inst()->playKeySound(); else if ( action == "LedOn" ) ODevice::inst()->setLedState( Led_Mail, Led_On ); else if ( action == "LedOff" ) ODevice::inst()->setLedState( Led_Mail, Led_Off ); else if ( action == "LogMessage" ) logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); else if ( action == "MessageBox" ) QMessageBox::information( this, "Notification!", QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); #else #warning Actions do not work with Qt/X11 yet #endif } void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) { #ifdef QWS if ( !iface ) { QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) ); return; } if ( sniffing ) { QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) ); return; } qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s", (const char*) iface->name(), (const char*) type, (const char*) essid, channel, (const char*) macaddr ); QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); int count = 3; qDebug("sending %d messages",count); msg << QString("count") << QString::number(count); qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() ); msg << QString(iface->name()) << QString("Mode") << type; qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1()); msg << QString(iface->name()) << QString("ESSID") << essid; qDebug("msg >%s< channel >%d<", iface->name(),channel); msg << QString(iface->name()) << QString("Channel") << channel; // qDebug("msg >%s< mac >%s<", iface->name(),macaddr); // msg << QString(iface->name()) << QString("MacAddr") << macaddr; |