summaryrefslogtreecommitdiff
path: root/core/obex/obexsend.cpp
Side-by-side diff
Diffstat (limited to 'core/obex/obexsend.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obexsend.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp
index f3dd11c..675c5e4 100644
--- a/core/obex/obexsend.cpp
+++ b/core/obex/obexsend.cpp
@@ -96,68 +96,64 @@ void SendWidget::send( const QString& file, const QString& desc ) {
m_start++;
}else
m_btDeSearch = m_devBox->addDevice( tr("Searching for bluetooth Devices."), DeviceBox::Search );
if (m_start != 2 ) {
QCopEnvelope e0("QPE/IrDaApplet", "enableIrda()");
QCopEnvelope e1("QPE/Bluetooth", "enableBluetooth()");
QCopEnvelope e2("QPE/IrDaApplet", "listDevices()");
QCopEnvelope e3("QPE/Bluetooth", "listDevices()");
}
}
void SendWidget::slotIrDaDevices( const QStringList& list) {
- owarn << "slot it irda devices " << oendl;
for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
int id = m_devBox->addDevice( (*it), DeviceBox::IrDa, tr("Scheduling for beam.") );
m_irDa.insert( id, (*it) );
}
m_devBox->removeDevice( m_irDeSearch );
m_irDaIt = m_irDa.begin();
slotStartIrda();
}
void SendWidget::slotBTDevices( const QMap<QString, QString>& str ) {
for(QMap<QString, QString>::ConstIterator it = str.begin(); it != str.end(); ++it ) {
int id = m_devBox->addDevice( it.key(), DeviceBox::BT, tr("Click to beam") );
m_bt.insert( id, Pair( it.key(), it.data() ) );
}
m_devBox->removeDevice( m_btDeSearch );
}
-void SendWidget::slotSelectedDevice( int name, int dev ) {
- owarn << "Start beam? " << name << " " << dev << "" << oendl;
+void SendWidget::slotSelectedDevice( int name, int ) {
if ( name == m_irDeSearch ) {
for (QMap<int, QString>::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it )
m_devBox->removeDevice( it.key() );
QCopEnvelope e2("QPE/IrDaApplet", "listDevices()");
}
}
void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) {
- owarn << "dispatch irda " << str.data() << "" << oendl;
if ( str == "devices(QStringList)" ) {
QDataStream stream( ar, IO_ReadOnly );
QStringList list;
stream >> list;
slotIrDaDevices( list );
}
}
void SendWidget::dispatchBt( const QCString&, const QByteArray& ) {
}
void SendWidget::slotIrError( int ) {
}
void SendWidget::slotIrSent( bool b) {
- owarn << "irda sent!!" << oendl;
QString text = b ? tr("Sent") : tr("Failure");
m_devBox->setStatus( m_irDaIt.key(), text );
++m_irDaIt;
slotStartIrda();
}
void SendWidget::slotIrTry(unsigned int trI) {
m_devBox->setStatus( m_irDaIt.key(), tr("Try %1").arg( QString::number( trI ) ) );
}
void SendWidget::slotStartIrda() {
if (m_irDaIt == m_irDa.end() ) {
m_irDeSearch = m_devBox->addDevice(tr("Search again for IrDa."), DeviceBox::Search );
return;
@@ -196,25 +192,24 @@ int DeviceBox::addDevice( const QString& name, int dev, const QString& status )
void DeviceBox::removeDevice( int id ) {
if (!m_dev.contains(id) ) return;
m_dev.remove( id );
setText( allText() );
}
void DeviceBox::setStatus( int id, const QString& status ) {
if ( !m_dev.contains(id) ) return;
m_dev[id].setStatus(status );
setText( allText() );
}
void DeviceBox::setSource( const QString& str ) {
- owarn << "SetSource:" << str.toInt() << "" << oendl;
int id = str.toInt();
emit selectedDevice( id, m_dev[id].device() );
}
int DeviceBox::idFor ( int id ) {
static int irId = 1501;
static int irBT = 1001;
static int irSr = 501;
static int irEr = 0;
int ret = -1;
switch(id ) {
case IrDa: