summaryrefslogtreecommitdiff
path: root/core/obex/receiver.cpp
Unidiff
Diffstat (limited to 'core/obex/receiver.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/obex/receiver.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/obex/receiver.cpp b/core/obex/receiver.cpp
index 7d9a42a..e153152 100644
--- a/core/obex/receiver.cpp
+++ b/core/obex/receiver.cpp
@@ -1,13 +1,15 @@
1#include "obex.h" 1#include "obex.h"
2#include "btobex.h"
3#include "obexbase.h"
2#include "receiver.h" 4#include "receiver.h"
3using namespace OpieObex; 5using namespace OpieObex;
4 6
5/* OPIE */ 7/* OPIE */
6#include <opie2/odebug.h> 8#include <opie2/odebug.h>
7#include <qpe/applnk.h> 9#include <qpe/applnk.h>
8#include <qpe/qpeapplication.h> 10#include <qpe/qpeapplication.h>
9#include <qpe/qcopenvelope_qws.h> 11#include <qpe/qcopenvelope_qws.h>
10#include <qpe/filemanager.h> 12#include <qpe/filemanager.h>
11using namespace Opie::Core; 13using namespace Opie::Core;
12 14
13/* QT */ 15/* QT */
@@ -17,26 +19,29 @@ using namespace Opie::Core;
17#include <qpushbutton.h> 19#include <qpushbutton.h>
18 20
19/* STD */ 21/* STD */
20#include <sys/types.h> 22#include <sys/types.h>
21#include <sys/stat.h> 23#include <sys/stat.h>
22#include <sys/mman.h> 24#include <sys/mman.h>
23#include <stdlib.h> // int system 25#include <stdlib.h> // int system
24#include <unistd.h> 26#include <unistd.h>
25#include <fcntl.h> 27#include <fcntl.h>
26 28
27/* TRANSLATOR OpieObex::Receiver */ 29/* TRANSLATOR OpieObex::Receiver */
28 30
29Receiver::Receiver() { 31Receiver::Receiver(RecType type) {
32 if (type == REC_IRDA)
30 m_obex = new Obex(this, "Receiver"); 33 m_obex = new Obex(this, "Receiver");
34 else
35 m_obex = new BtObex(this, "Receiver");
31 connect(m_obex, SIGNAL(receivedFile(const QString&) ), 36 connect(m_obex, SIGNAL(receivedFile(const QString&) ),
32 this, SLOT(slotReceived(const QString&) ) ); 37 this, SLOT(slotReceived(const QString&) ) );
33 m_obex->receive(); 38 m_obex->receive();
34} 39}
35Receiver::~Receiver() { 40Receiver::~Receiver() {
36 m_obex->setReceiveEnabled( false ); 41 m_obex->setReceiveEnabled( false );
37 delete m_obex; 42 delete m_obex;
38} 43}
39void Receiver::slotReceived( const QString& _file ) { 44void Receiver::slotReceived( const QString& _file ) {
40 QString file = _file; 45 QString file = _file;
41 int check = checkFile(file); 46 int check = checkFile(file);
42 if ( check == AddressBook ) 47 if ( check == AddressBook )