author | harlekin <harlekin> | 2002-06-14 10:30:25 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-06-14 10:30:25 (UTC) |
commit | a014866573fc86bf63544d1f692ccdd94c0d104f (patch) (side-by-side diff) | |
tree | 26c91e69d84aed959b8163bb853966f67041063b /core | |
parent | cf54bc85d0e9846d64ca2a2af55fffc3d4e2f4ad (diff) | |
download | opie-a014866573fc86bf63544d1f692ccdd94c0d104f.zip opie-a014866573fc86bf63544d1f692ccdd94c0d104f.tar.gz opie-a014866573fc86bf63544d1f692ccdd94c0d104f.tar.bz2 |
fixed type and getting closer to finish
-rw-r--r-- | core/applets/obex/.cvsignore | 1 | ||||
-rw-r--r-- | core/applets/obex/obex.cc | 9 | ||||
-rw-r--r-- | core/applets/obex/obex.h | 2 | ||||
-rw-r--r-- | core/applets/obex/obeximpl.cc | 12 |
4 files changed, 17 insertions, 7 deletions
diff --git a/core/applets/obex/.cvsignore b/core/applets/obex/.cvsignore index c7899af..8fde018 100644 --- a/core/applets/obex/.cvsignore +++ b/core/applets/obex/.cvsignore @@ -1,5 +1,6 @@ Makefile +Makefile.in moc* obexdlg.cpp obexdlg.h obexinc.cpp diff --git a/core/applets/obex/obex.cc b/core/applets/obex/obex.cc index fc0be3b..43041f5 100644 --- a/core/applets/obex/obex.cc +++ b/core/applets/obex/obex.cc @@ -95,25 +95,26 @@ void Obex::sendNow(){ emit currentTry( m_count ); } void Obex::slotExited(OProcess* proc ){ - if (proc == m_rec ) { // recieve process - recieved(); + if (proc == m_rec ) { // receive process + received(); }else if ( proc == m_send ) { sendEnd(); } } void Obex::slotStdOut(OProcess* proc, char* buf, int len){ - if ( proc == m_rec ) { // only recieve + if ( proc == m_rec ) { // only receive QCString cstring( buf, len ); m_outp.append( cstring.data() ); } } -void Obex::recieved() { +void Obex::received() { if (m_rec->normalExit() ) { if ( m_rec->exitStatus() == 0 ) { // we got one QString filename = parseOut(); + qWarning("ACHTUNG"); emit receivedFile( filename ); } }else{ emit done(false); diff --git a/core/applets/obex/obex.h b/core/applets/obex/obex.h index 2ce44f2..781fca2 100644 --- a/core/applets/obex/obex.h +++ b/core/applets/obex/obex.h @@ -74,9 +74,9 @@ private slots: private: void sendNow(); QString parseOut(); - void recieved(); + void received(); void sendEnd(); }; }; diff --git a/core/applets/obex/obeximpl.cc b/core/applets/obex/obeximpl.cc index 1a1c922..7df933a 100644 --- a/core/applets/obex/obeximpl.cc +++ b/core/applets/obex/obeximpl.cc @@ -27,13 +27,15 @@ ObexImpl::ObexImpl( ) this, SLOT(slotMessage(const QCString&, const QByteArray&) ) ); connect(m_obex, SIGNAL(receivedFile(const QString& ) ), this, SLOT(slotReceivedFile(const QString& ) ) ); } + ObexImpl::~ObexImpl() { delete m_obex; delete m_chan; delete m_sendgui; } + QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if( uuid == IID_QUnknown ) *iface = this; @@ -43,10 +45,10 @@ QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) qWarning("query" ); if(*iface ) (*iface)->addRef(); return QS_OK; - } + void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { QDataStream stream( data, IO_ReadOnly ); qWarning("Message %s", msg.data() ); if(msg == "send(QString,QString,QString)" ) { @@ -63,9 +65,9 @@ void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { SLOT( slotSent() ) ); connect( (QObject*)m_obex, SIGNAL( error(int) ), this, SLOT( slotSent() ) ); }else if(msg == "receive(int)" ) { // open a GUI - m_recvgui->showMaximized(); + //m_recvgui->showMaximized(); int receiveD = 0; stream >> receiveD; if ( receiveD == 1) m_obex->receive(); @@ -104,8 +106,9 @@ void ObexImpl::slotError( int errorCode) { } qDebug("Error: " + errorString); m_sendgui->hide(); } + // Received a file via beam // check for mime type and then either // add to App via setDocument void ObexImpl::slotReceivedFile( const QString &fileName ) { @@ -120,8 +123,13 @@ void ObexImpl::slotReceivedFile( const QString &fileName ) { else if ( fileName.right(4) == ".vcs" ) { exec = "datebook"; } } // now prompt and then add it + + m_recvgui->PixmapLabel->setPixmap(lnk.pixmap()); + m_recvgui->TextLabel1_2->setText(lnk.name()); + m_recvgui->showMaximized(); + QCString str= "QPE/Application/"; str += exec.latin1(); qWarning("channel %s", str.data() ); QCopEnvelope e(str , "setDocument(QString)" ); |