summaryrefslogtreecommitdiff
path: root/core/applets/obex/obeximpl.cc
authorzecke <zecke>2002-06-13 19:04:05 (UTC)
committer zecke <zecke>2002-06-13 19:04:05 (UTC)
commited10b73df98c1b4c41a0b940e4f8729fe28c2b8a (patch) (unidiff)
tree9fe7679c82a41b21de3378090ce211c00a8bc178 /core/applets/obex/obeximpl.cc
parent9939c618389465ef5837bf510186d583891e65e3 (diff)
downloadopie-ed10b73df98c1b4c41a0b940e4f8729fe28c2b8a.zip
opie-ed10b73df98c1b4c41a0b940e4f8729fe28c2b8a.tar.gz
opie-ed10b73df98c1b4c41a0b940e4f8729fe28c2b8a.tar.bz2
Stop receiving when wanting to send
Diffstat (limited to 'core/applets/obex/obeximpl.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/obex/obeximpl.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/applets/obex/obeximpl.cc b/core/applets/obex/obeximpl.cc
index 856f100..0c137af 100644
--- a/core/applets/obex/obeximpl.cc
+++ b/core/applets/obex/obeximpl.cc
@@ -46,22 +46,28 @@ void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) {
46 qWarning("Message %s", msg.data() ); 46 qWarning("Message %s", msg.data() );
47 if(msg == "send(QString,QString,QString)" ) { 47 if(msg == "send(QString,QString,QString)" ) {
48 QString desc; 48 QString desc;
49 stream >> desc; 49 stream >> desc;
50 QString filename; 50 QString filename;
51 stream >> filename; 51 stream >> filename;
52 m_sendgui->raise(); // should be on top
52 m_sendgui->showMaximized(); 53 m_sendgui->showMaximized();
53 m_sendgui->lblPath->setText(filename); 54 m_sendgui->lblPath->setText(filename);
54 connect( (QObject*)m_sendgui->PushButton2, SIGNAL(clicked()), 55 connect( (QObject*)m_sendgui->PushButton2, SIGNAL(clicked()),
55 this, SLOT(slotCancelSend())); 56 this, SLOT(slotCancelSend()));
56 m_obex->send(filename ); 57 m_obex->send(filename );
57 connect( (QObject*)m_obex, SIGNAL( sent() ), this, 58 connect( (QObject*)m_obex, SIGNAL( sent() ), this,
58 SLOT( slotSent() ) ); 59 SLOT( slotSent() ) );
59 }else if(msg == "receive(bool)" ) { // open a GUI 60 }else if(msg == "receive(int)" ) { // open a GUI
60 m_recvgui->showMaximized(); 61 m_recvgui->showMaximized();
61 m_obex->receive(); 62 int receiveD = 0;
63 stream >> receiveD;
64 if ( receiveD == 1)
65 m_obex->receive();
66 else
67 m_obex->setReceiveEnabled( false );
62 68
63 } else if (msg =="done(QString)") { 69 } else if (msg =="done(QString)") {
64 QString text; 70 QString text;
65 stream >> text; 71 stream >> text;
66 m_sendgui->lblPath->setText(tr("Done transfering " + text)); 72 m_sendgui->lblPath->setText(tr("Done transfering " + text));
67 73
@@ -84,13 +90,13 @@ void ObexImpl::slotSent() {
84 m_sendgui->hide(); 90 m_sendgui->hide();
85} 91}
86 92
87void ObexImpl::slotError( int errorCode) { 93void ObexImpl::slotError( int errorCode) {
88 94
89 QString errorString = ""; 95 QString errorString = "";
90 if (errorCode = -1) { 96 if (errorCode == -1) {
91 errorString = "test"; 97 errorString = "test";
92 } 98 }
93 qDebug("Error: " + errorString); 99 qDebug("Error: " + errorString);
94 m_sendgui->hide(); 100 m_sendgui->hide();
95} 101}
96 102