summaryrefslogtreecommitdiff
path: root/core
authorharlekin <harlekin>2002-06-14 10:30:25 (UTC)
committer harlekin <harlekin>2002-06-14 10:30:25 (UTC)
commita014866573fc86bf63544d1f692ccdd94c0d104f (patch) (unidiff)
tree26c91e69d84aed959b8163bb853966f67041063b /core
parentcf54bc85d0e9846d64ca2a2af55fffc3d4e2f4ad (diff)
downloadopie-a014866573fc86bf63544d1f692ccdd94c0d104f.zip
opie-a014866573fc86bf63544d1f692ccdd94c0d104f.tar.gz
opie-a014866573fc86bf63544d1f692ccdd94c0d104f.tar.bz2
fixed type and getting closer to finish
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/obex/.cvsignore1
-rw-r--r--core/applets/obex/obex.cc9
-rw-r--r--core/applets/obex/obex.h2
-rw-r--r--core/applets/obex/obeximpl.cc12
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,4 +1,5 @@
1Makefile 1Makefile
2Makefile.in
2moc* 3moc*
3obexdlg.cpp 4obexdlg.cpp
4obexdlg.h 5obexdlg.h
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
@@ -96,23 +96,24 @@ void Obex::sendNow(){
96} 96}
97 97
98void Obex::slotExited(OProcess* proc ){ 98void Obex::slotExited(OProcess* proc ){
99 if (proc == m_rec ) { // recieve process 99 if (proc == m_rec ) { // receive process
100 recieved(); 100 received();
101 }else if ( proc == m_send ) { 101 }else if ( proc == m_send ) {
102 sendEnd(); 102 sendEnd();
103 } 103 }
104} 104}
105void Obex::slotStdOut(OProcess* proc, char* buf, int len){ 105void Obex::slotStdOut(OProcess* proc, char* buf, int len){
106 if ( proc == m_rec ) { // only recieve 106 if ( proc == m_rec ) { // only receive
107 QCString cstring( buf, len ); 107 QCString cstring( buf, len );
108 m_outp.append( cstring.data() ); 108 m_outp.append( cstring.data() );
109 } 109 }
110} 110}
111 111
112void Obex::recieved() { 112void Obex::received() {
113 if (m_rec->normalExit() ) { 113 if (m_rec->normalExit() ) {
114 if ( m_rec->exitStatus() == 0 ) { // we got one 114 if ( m_rec->exitStatus() == 0 ) { // we got one
115 QString filename = parseOut(); 115 QString filename = parseOut();
116 qWarning("ACHTUNG");
116 emit receivedFile( filename ); 117 emit receivedFile( filename );
117 } 118 }
118 }else{ 119 }else{
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
@@ -75,7 +75,7 @@ private slots:
75 private: 75 private:
76 void sendNow(); 76 void sendNow();
77 QString parseOut(); 77 QString parseOut();
78 void recieved(); 78 void received();
79 void sendEnd(); 79 void sendEnd();
80 80
81 }; 81 };
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
@@ -28,11 +28,13 @@ ObexImpl::ObexImpl( )
28 connect(m_obex, SIGNAL(receivedFile(const QString& ) ), 28 connect(m_obex, SIGNAL(receivedFile(const QString& ) ),
29 this, SLOT(slotReceivedFile(const QString& ) ) ); 29 this, SLOT(slotReceivedFile(const QString& ) ) );
30} 30}
31
31ObexImpl::~ObexImpl() { 32ObexImpl::~ObexImpl() {
32 delete m_obex; 33 delete m_obex;
33 delete m_chan; 34 delete m_chan;
34 delete m_sendgui; 35 delete m_sendgui;
35} 36}
37
36QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { 38QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) {
37 *iface = 0; 39 *iface = 0;
38 if( uuid == IID_QUnknown ) 40 if( uuid == IID_QUnknown )
@@ -44,8 +46,8 @@ QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
44 if(*iface ) 46 if(*iface )
45 (*iface)->addRef(); 47 (*iface)->addRef();
46 return QS_OK; 48 return QS_OK;
47
48} 49}
50
49void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) { 51void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) {
50 QDataStream stream( data, IO_ReadOnly ); 52 QDataStream stream( data, IO_ReadOnly );
51 qWarning("Message %s", msg.data() ); 53 qWarning("Message %s", msg.data() );
@@ -64,7 +66,7 @@ void ObexImpl::slotMessage( const QCString& msg, const QByteArray&data ) {
64 connect( (QObject*)m_obex, SIGNAL( error(int) ), this, 66 connect( (QObject*)m_obex, SIGNAL( error(int) ), this,
65 SLOT( slotSent() ) ); 67 SLOT( slotSent() ) );
66 }else if(msg == "receive(int)" ) { // open a GUI 68 }else if(msg == "receive(int)" ) { // open a GUI
67 m_recvgui->showMaximized(); 69 //m_recvgui->showMaximized();
68 int receiveD = 0; 70 int receiveD = 0;
69 stream >> receiveD; 71 stream >> receiveD;
70 if ( receiveD == 1) 72 if ( receiveD == 1)
@@ -105,6 +107,7 @@ void ObexImpl::slotError( int errorCode) {
105 qDebug("Error: " + errorString); 107 qDebug("Error: " + errorString);
106 m_sendgui->hide(); 108 m_sendgui->hide();
107} 109}
110
108// Received a file via beam 111// Received a file via beam
109// check for mime type and then either 112// check for mime type and then either
110// add to App via setDocument 113// add to App via setDocument
@@ -121,6 +124,11 @@ void ObexImpl::slotReceivedFile( const QString &fileName ) {
121 exec = "datebook"; 124 exec = "datebook";
122 } 125 }
123 } // now prompt and then add it 126 } // now prompt and then add it
127
128 m_recvgui->PixmapLabel->setPixmap(lnk.pixmap());
129 m_recvgui->TextLabel1_2->setText(lnk.name());
130 m_recvgui->showMaximized();
131
124 QCString str= "QPE/Application/"; 132 QCString str= "QPE/Application/";
125 str += exec.latin1(); 133 str += exec.latin1();
126 qWarning("channel %s", str.data() ); 134 qWarning("channel %s", str.data() );