summaryrefslogtreecommitdiff
path: root/core/applets/obex/obeximpl.cc
Unidiff
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, 10 insertions, 2 deletions
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() );