summaryrefslogtreecommitdiff
path: root/core/obex/receiver.cpp
authorkorovkin <korovkin>2006-07-06 16:28:08 (UTC)
committer korovkin <korovkin>2006-07-06 16:28:08 (UTC)
commit43cd66c08de4447998028179d20fd4817aaf16ca (patch) (side-by-side diff)
tree87888aadc3398c3c633e332cda46d92bb0522d6a /core/obex/receiver.cpp
parentadcfc6f4afe184a9eb6fbf458616494dfe0dadda (diff)
downloadopie-43cd66c08de4447998028179d20fd4817aaf16ca.zip
opie-43cd66c08de4447998028179d20fd4817aaf16ca.tar.gz
opie-43cd66c08de4447998028179d20fd4817aaf16ca.tar.bz2
Added OBEX Push functionality for Bluetooth.
- Added ObexBase - asic class for IR and BT Obex - Added ObexServer - OBEX Push server.
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,54 +1,59 @@
#include "obex.h"
+#include "btobex.h"
+#include "obexbase.h"
#include "receiver.h"
using namespace OpieObex;
/* OPIE */
#include <opie2/odebug.h>
#include <qpe/applnk.h>
#include <qpe/qpeapplication.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/filemanager.h>
using namespace Opie::Core;
/* QT */
#include <qfileinfo.h>
#include <qlabel.h>
#include <qtextview.h>
#include <qpushbutton.h>
/* STD */
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <stdlib.h> // int system
#include <unistd.h>
#include <fcntl.h>
/* TRANSLATOR OpieObex::Receiver */
-Receiver::Receiver() {
+Receiver::Receiver(RecType type) {
+ if (type == REC_IRDA)
m_obex = new Obex(this, "Receiver");
+ else
+ m_obex = new BtObex(this, "Receiver");
connect(m_obex, SIGNAL(receivedFile(const QString&) ),
this, SLOT(slotReceived(const QString&) ) );
m_obex->receive();
}
Receiver::~Receiver() {
m_obex->setReceiveEnabled( false );
delete m_obex;
}
void Receiver::slotReceived( const QString& _file ) {
QString file = _file;
int check = checkFile(file);
if ( check == AddressBook )
handleAddr( file );
else if ( check == Datebook )
handleDateTodo( file );
else
handleOther( file );
}
void Receiver::handleAddr( const QString& str ) {
QCopEnvelope e("QPE/Application/addressbook", "setDocument(QString)" );
e << str;
}
/* we can not say for sure if it's a VEevent ot VTodo */
void Receiver::handleDateTodo( const QString& str ) {