summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obex.cc5
-rw-r--r--core/obex/obexhandler.cpp2
-rw-r--r--core/obex/obexsend.cpp19
3 files changed, 15 insertions, 11 deletions
diff --git a/core/obex/obex.cc b/core/obex/obex.cc
index 83d1faf..92cd317 100644
--- a/core/obex/obex.cc
+++ b/core/obex/obex.cc
@@ -1,4 +1,5 @@
#include <qapplication.h>
+#include <qfile.h>
#include <qmessagebox.h>
#include <qpe/qcopenvelope_qws.h>
@@ -49,5 +50,5 @@ void Obex::send( const QString& fileName) { // if currently receiving stop it se
m_count = 0;
m_file = fileName;
- qWarning("send");
+ qWarning("send %s", fileName.latin1() );
if (m_rec != 0 ) {
qWarning("running");
@@ -76,5 +77,5 @@ void Obex::sendNow(){
m_send = new OProcess();
*m_send << "irobex_palm3";
- *m_send << m_file;
+ *m_send << QFile::encodeName(m_file);
// connect to slots Exited and and StdOut
diff --git a/core/obex/obexhandler.cpp b/core/obex/obexhandler.cpp
index f71a233..16e1c2f 100644
--- a/core/obex/obexhandler.cpp
+++ b/core/obex/obexhandler.cpp
@@ -57,5 +57,5 @@ void ObexHandler::irdaMessage( const QCString& msg, const QByteArray& data) {
m_wasRec = (m_receiver != 0 );
doReceive( false );
- doSend(name, desc);
+ doSend(desc, name);
}else if (msg == "receive(int)") {
int rec;
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp
index a2e4c16..d5ebd81 100644
--- a/core/obex/obexsend.cpp
+++ b/core/obex/obexsend.cpp
@@ -33,9 +33,9 @@ void SendWidget::initUI() {
QCopChannel* chan = new QCopChannel("QPE/IrDaAppletBack", this );
connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
- this, SLOT(dispatchBt(const QCString&, const QByteArray& ) ) );
+ this, SLOT(dispatchIrda(const QCString&, const QByteArray& ) ) );
chan = new QCopChannel("QPE/BluetoothBack", this );
connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
- this, SLOT(dispatchIrda(const QCString&, const QByteArray& ) ) );
+ this, SLOT(dispatchBt(const QCString&, const QByteArray& ) ) );
QVBoxLayout* lay = new QVBoxLayout(this);
@@ -104,12 +104,13 @@ void SendWidget::send( const QString& file, const QString& desc ) {
QCopEnvelope e3("QPE/Bluetooth", "listDevices()");
}
- QTimer::singleShot(5000, this, SLOT(testIt() ) );
}
void SendWidget::slotIrDaDevices( const QStringList& list) {
+ qWarning("slot it irda devices ");
m_irDa = list;
m_start = 0;
for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it )
m_devBox->addDevice( (*it), DeviceBox::IrDa, tr("Scheduling for beam.") );
- m_devBox->removeDevice( tr("Search for IrDa Devices.") );
+
+ m_devBox->removeDevice( tr("Searching for IrDa Devices.") );
slotStartIrda();
@@ -127,4 +128,5 @@ void SendWidget::slotSelectedDevice( const QString& name, int dev ) {
for (QStringList::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it )
m_devBox->removeDevice( (*it) );
+
QCopEnvelope e2("QPE/IrDaApplet", "listDevices()");
}
@@ -132,5 +134,5 @@ void SendWidget::slotSelectedDevice( const QString& name, int dev ) {
void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) {
qWarning("dispatch irda %s", str.data() );
- if ( str == "listDevices(QStringList)" ) {
+ if ( str == "devices(QStringList)" ) {
QDataStream stream( ar, IO_ReadOnly );
QStringList list;
@@ -146,11 +148,12 @@ void SendWidget::slotIrError( int ) {
}
void SendWidget::slotIrSent( bool b) {
+ qWarning("irda sent!!");
QString text = b ? tr("Sent") : tr("Failure");
- m_devBox->setStatus( m_irDa[m_start], text );
+// m_devBox->setStatus( m_irDa[m_start], text );
m_start++;
slotStartIrda();
}
void SendWidget::slotIrTry(unsigned int trI) {
- m_devBox->setStatus( m_irDa[m_start], tr("Try %1").arg( QString::number( trI ) ) );
+// m_devBox->setStatus( m_irDa[m_start], tr("Try %1").arg( QString::number( trI ) ) );
}
void SendWidget::slotStartIrda() {
@@ -159,5 +162,5 @@ void SendWidget::slotStartIrda() {
return;
}
- m_devBox->setStatus( m_irDa[m_start], tr("Start sending") );
+// m_devBox->setStatus( m_irDa[m_start], tr("Start sending") );
m_obex->send( m_file );
}