summaryrefslogtreecommitdiff
path: root/core/obex/obexsend.h
authorzecke <zecke>2003-02-16 15:49:02 (UTC)
committer zecke <zecke>2003-02-16 15:49:02 (UTC)
commit30a098530260176ac20d75ba6cb7abfb3d998c13 (patch) (side-by-side diff)
treeee5c08ca67fa00574414153921ab2de654c60421 /core/obex/obexsend.h
parent7fab90d46144843d32e476ada8d0a5f40f50aa60 (diff)
downloadopie-30a098530260176ac20d75ba6cb7abfb3d998c13.zip
opie-30a098530260176ac20d75ba6cb7abfb3d998c13.tar.gz
opie-30a098530260176ac20d75ba6cb7abfb3d998c13.tar.bz2
disable snd in IrDaApplet it hangs on my machine..
Remove the hacky OBEX Implementation Add a more cleaned up more appealing (not yet working) version which will even be able to do OBEX over Bluetooth in the future -It handles receive better let's you choose what to do with custom files and created a DocLnk -Send lets you beam to multiple devices this needs the IrDa Applet to be present
Diffstat (limited to 'core/obex/obexsend.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obexsend.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/core/obex/obexsend.h b/core/obex/obexsend.h
new file mode 100644
index 0000000..fd819bc
--- a/dev/null
+++ b/core/obex/obexsend.h
@@ -0,0 +1,99 @@
+#ifndef OPIE_OBEX_SEND_WIDGET_H
+#define OPIE_OBEX_SEND_WIDGET_H
+
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qwidget.h>
+#include <qvbox.h>
+#include <qmap.h>
+#include <qtextbrowser.h>
+
+class QLabel;
+class QVBoxLayout;
+/**
+ * This is the new sending widget for Obex
+ * It will attemp to smart and be able to send
+ * it to multiple devices.
+ * It'll support BT + IrDa
+ */
+namespace OpieObex {
+ class DeviceBox;
+ class Obex;
+ class SendWidget : public QWidget{
+ Q_OBJECT
+ public:
+ SendWidget( QWidget* parent = 0, const char* name = 0);
+ ~SendWidget();
+
+ QString file()const;
+
+ public slots:
+ void send( const QString& file, const QString& desc );
+
+ signals:
+ void done();
+
+ private slots: // QCOP slots
+ /* IrDa Names*/
+ void slotIrDaDevices( const QStringList& );
+ /* Bt Names + BD-Addr */
+ void slotBTDevices( const QMap<QString, QString>& );
+ void slotSelectedDevice( const QString& name, int dev );
+ void dispatchIrda( const QCString& str, const QByteArray& ar );
+ void dispatchBt( const QCString& str, const QByteArray& ar );
+
+ void slotIrError( int );
+ void slotIrSent(bool);
+ void slotIrTry(unsigned int );
+ void slotStartIrda();
+ void slotDone();
+ private:
+ void initUI();
+ QLabel* m_lblFile;
+ DeviceBox* m_devBox;
+ QVBoxLayout* m_lay;
+ int m_start;
+ QStringList m_irDa;
+ QMap<QString, QString> m_bt;
+ QString m_file;
+ Obex* m_obex;
+ };
+ class DeviceItem {
+ public:
+ DeviceItem( const QString& name = QString::null,
+ const QString& status = QString::null, int dev = 3);
+ ~DeviceItem();
+ void setStatus( const QString& text );
+
+ QString name()const;
+ QString status()const;
+ QString pixmap()const;
+ int device()const;
+ QString toString()const;
+ private:
+ QString m_name;
+ QString m_status;
+ int m_dev;
+ };
+ class DeviceBox : public QTextBrowser {
+ Q_OBJECT
+ public:
+ enum Device { IrDa, BT, Search, Error };
+ DeviceBox( QWidget* parent );
+ ~DeviceBox();
+
+ void setSource( const QString& str );
+ void addDevice( const QString& name, int dev,
+ const QString& status = QString::null );
+ void removeDevice( const QString& name );
+ void setStatus( const QString& name, const QString& );
+ signals:
+ void selectedDevice( const QString& name, int dev );
+ private:
+ QMap<QString, DeviceItem> m_dev;
+ QStringList m_devices;
+
+ };
+}
+
+#endif