-rw-r--r-- | core/obex/obexsend.cpp | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp index 45754e3..d58b4e9 100644 --- a/core/obex/obexsend.cpp +++ b/core/obex/obexsend.cpp @@ -6,6 +6,10 @@ #include "obex.h" +#ifdef BLUETOOTH #include "btobex.h" +#endif #include "obexsend.h" using namespace OpieObex; +#ifdef BLUETOOTH using namespace OpieTooth; +#endif @@ -16,4 +20,6 @@ using namespace OpieTooth; #include <qpe/version.h> +#ifdef BLUETOOTH #include <devicehandler.h> #include "remotedevice.h" +#endif @@ -54,2 +60,3 @@ void SendWidget::initUI() { +#ifdef BLUETOOTH m_btobex = new BtObex(this, "btobex"); @@ -65,3 +72,3 @@ void SendWidget::initUI() { this, SLOT(dispatchBt(const QCString&,const QByteArray&) ) ); - +#endif } @@ -75,3 +82,5 @@ void SendWidget::send( const QString& file, const QString& desc ) { m_irDa.clear(); +#ifdef BLUETOOTH m_bt.clear(); +#endif m_start = 0; @@ -90,2 +99,3 @@ void SendWidget::send( const QString& file, const QString& desc ) { } +#ifdef BLUETOOTH if ( !QCopChannel::isRegistered("QPE/Bluetooth") ) @@ -101,2 +111,3 @@ void SendWidget::send( const QString& file, const QString& desc ) { read_receivers(); +#endif } @@ -136,2 +147,3 @@ void SendWidget::slotIrDaDevices( const QStringList& list) { void SendWidget::slotBTDevices( const QMap<QString, QString>& str ) { +#ifdef BLUETOOTH for(QMap<QString, QString>::ConstIterator it = str.begin(); @@ -144,2 +156,5 @@ void SendWidget::slotBTDevices( const QMap<QString, QString>& str ) { +#else + (void)str; +#endif } @@ -165,2 +180,3 @@ void SendWidget::slotIrError( int ) { void SendWidget::slotIrSent( bool b) { +#ifdef BLUETOOTH QString text = b ? tr("Sent") : tr("Failure"); @@ -169,2 +185,5 @@ void SendWidget::slotIrSent( bool b) { slotStartIrda(); +#else + (void)b; +#endif } @@ -198,2 +217,3 @@ void SendWidget::slotBtError( int ) { void SendWidget::slotBtSent( bool b) { +#ifdef BLUETOOTH QString text = b ? tr("Sent") : tr("Failure"); @@ -202,7 +222,15 @@ void SendWidget::slotBtSent( bool b) { slotStartBt(); +#else + (void)b; +#endif } void SendWidget::slotBtTry(unsigned int trI) { +#ifdef BLUETOOTH setReceiverStatus( m_btIt.key(), tr("Try %1").arg( QString::number( trI ) ) ); +#else + (void)trI; +#endif } void SendWidget::slotStartBt() { +#ifdef BLUETOOTH // skip past unselected receivers @@ -220,2 +248,3 @@ void SendWidget::slotStartBt() { m_btobex->send( m_file, m_btIt.data().second() ); +#endif } @@ -223,3 +252,5 @@ void SendWidget::slotStartBt() { void SendWidget::send_to_receivers() { +#ifdef BLUETOOTH slotStartBt(); +#endif slotStartIrda(); @@ -227,2 +258,3 @@ void SendWidget::send_to_receivers() { +#ifdef BLUETOOTH /** @@ -255,3 +287,3 @@ void SendWidget::read_receivers() } - +#endif @@ -263,4 +295,5 @@ void SendWidget::scan_for_receivers() m_irDa.clear(); +#ifdef BLUETOOTH m_bt.clear(); - +#endif if ( QCopChannel::isRegistered("QPE/IrDaApplet") ) @@ -272,2 +305,3 @@ void SendWidget::scan_for_receivers() +#ifdef BLUETOOTH if ( QCopChannel::isRegistered("QPE/Bluetooth") ) @@ -278,2 +312,3 @@ void SendWidget::scan_for_receivers() } +#endif } @@ -295,4 +330,6 @@ void SendWidget::closeEvent( QCloseEvent* evt) { m_obex = NULL; +#ifdef BLUETOOTH delete m_btobex; m_btobex = NULL; +#endif obexSendBase::closeEvent(evt); @@ -301,2 +338,3 @@ void SendWidget::closeEvent( QCloseEvent* evt) { } +#ifdef BLUETOOTH { @@ -304,2 +342,3 @@ void SendWidget::closeEvent( QCloseEvent* evt) { } +#endif } |