summaryrefslogtreecommitdiff
path: root/core/obex/obexsend.h
Unidiff
Diffstat (limited to 'core/obex/obexsend.h') (more/less context) (show whitespace changes)
-rw-r--r--core/obex/obexsend.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/obex/obexsend.h b/core/obex/obexsend.h
index f9ba340..cc27354 100644
--- a/core/obex/obexsend.h
+++ b/core/obex/obexsend.h
@@ -12,88 +12,97 @@
12#include "obexsendbase.h" 12#include "obexsendbase.h"
13 13
14class QLabel; 14class QLabel;
15class QVBoxLayout; 15class QVBoxLayout;
16/** 16/**
17 * This is the new sending widget for Obex 17 * This is the new sending widget for Obex
18 * It will attemp to smart and be able to send 18 * It will attemp to smart and be able to send
19 * it to multiple (selected) devices. 19 * it to multiple (selected) devices.
20 * It'll support BT + IrDa 20 * It'll support BT + IrDa
21 */ 21 */
22namespace OpieObex { 22namespace OpieObex {
23 class Obex; 23 class Obex;
24#ifdef BLUETOOTH
24 class BtObex; 25 class BtObex;
26#endif
25 27
26 struct Pair { 28 struct Pair {
27 Pair(const QString& first = QString::null, 29 Pair(const QString& first = QString::null,
28 const QString& second = QString::null) 30 const QString& second = QString::null)
29 : m_first(first), m_second(second ) { 31 : m_first(first), m_second(second ) {
30 } 32 }
31 QString first()const{ return m_first; } 33 QString first()const{ return m_first; }
32 QString second()const { return m_second; } 34 QString second()const { return m_second; }
33 private: 35 private:
34 QString m_first; 36 QString m_first;
35 QString m_second; 37 QString m_second;
36 }; 38 };
37 class SendWidget : public obexSendBase { 39 class SendWidget : public obexSendBase {
38 Q_OBJECT 40 Q_OBJECT
39 public: 41 public:
40 SendWidget( QWidget* parent = 0, const char* name = 0); 42 SendWidget( QWidget* parent = 0, const char* name = 0);
41 ~SendWidget(); 43 ~SendWidget();
42 44
43 QString file()const; 45 QString file()const;
44 46
45 protected: 47 protected:
46 void closeEvent( QCloseEvent* ); 48 void closeEvent( QCloseEvent* );
49#ifdef BLUETOOTH
47 void read_receivers(); 50 void read_receivers();
51#endif
48 52
49 public slots: 53 public slots:
50 void send( const QString& file, const QString& desc ); 54 void send( const QString& file, const QString& desc );
51 55
52 signals: 56 signals:
53 void done(); 57 void done();
54 58
55 protected slots: 59 protected slots:
56 virtual void userDone(); 60 virtual void userDone();
57 virtual void send_to_receivers(); 61 virtual void send_to_receivers();
58 virtual void scan_for_receivers(); 62 virtual void scan_for_receivers();
59 virtual void toggle_receiver(QListViewItem* item); 63 virtual void toggle_receiver(QListViewItem* item);
60 64
61 private slots: // QCOP slots 65 private slots: // QCOP slots
62 /* IrDa Names*/ 66 /* IrDa Names*/
63 void slotIrDaDevices( const QStringList& ); 67 void slotIrDaDevices( const QStringList& );
64 /* Bt Names + BD-Addr */ 68 /* Bt Names + BD-Addr */
65 void slotBTDevices( const QMap<QString, QString>& ); 69 void slotBTDevices( const QMap<QString, QString>& );
70
66 void slotSelectedDevice( int id, int dev ); 71 void slotSelectedDevice( int id, int dev );
67 72
68 void dispatchIrda( const QCString& str, const QByteArray& ar ); 73 void dispatchIrda( const QCString& str, const QByteArray& ar );
69 74
70 void slotIrError( int ); 75 void slotIrError( int );
71 void slotIrSent(bool); 76 void slotIrSent(bool);
72 void slotIrTry(unsigned int ); 77 void slotIrTry(unsigned int );
73 void slotStartIrda(); 78 void slotStartIrda();
74 79
75 void dispatchBt( const QCString& str, const QByteArray& ar ); 80 void dispatchBt( const QCString& str, const QByteArray& ar );
76 void slotBtError( int ); 81 void slotBtError( int );
77 void slotBtSent(bool); 82 void slotBtSent(bool);
78 void slotBtTry(unsigned int ); 83 void slotBtTry(unsigned int );
79 void slotStartBt(); 84 void slotStartBt();
80 85
81 private: 86 private:
82 void initUI(); 87 void initUI();
83 int addReceiver(const QString& str, const char *icon); 88 int addReceiver(const QString& str, const char *icon);
84 void setReceiverStatus( int id, const QString& status ); 89 void setReceiverStatus( int id, const QString& status );
85 bool receiverSelected(int id); 90 bool receiverSelected(int id);
86 91
87 int m_start; 92 int m_start;
88 QMap<int, QString> m_irDa; 93 QMap<int, QString> m_irDa;
89 QMap<int, QString>::Iterator m_irDaIt; 94 QMap<int, QString>::Iterator m_irDaIt;
95#ifdef BLUETOOTH
90 QMap<int, Pair > m_bt; 96 QMap<int, Pair > m_bt;
91 QMap<int, Pair>::Iterator m_btIt; 97 QMap<int, Pair>::Iterator m_btIt;
98#endif
92 QMap<int, QListViewItem *> receivers; 99 QMap<int, QListViewItem *> receivers;
93 QString m_file; 100 QString m_file;
94 Obex* m_obex; 101 Obex* m_obex;
102#ifdef BLUETOOTH
95 BtObex* m_btobex; 103 BtObex* m_btobex;
104#endif
96 }; 105 };
97} 106}
98 107
99#endif 108#endif