summaryrefslogtreecommitdiff
path: root/core/obex/btobex.h
authormickeyl <mickeyl>2005-08-22 09:36:38 (UTC)
committer mickeyl <mickeyl>2005-08-22 09:36:38 (UTC)
commit7202ac536ac98e7e433984d98cb9236330b25cc8 (patch) (unidiff)
treec8b5d4e57dd4b9b302999d1f88a89c28e4ee0e5e /core/obex/btobex.h
parent140e4dc44a29678de1ae8b2cef5b1d081993223e (diff)
downloadopie-7202ac536ac98e7e433984d98cb9236330b25cc8.zip
opie-7202ac536ac98e7e433984d98cb9236330b25cc8.tar.gz
opie-7202ac536ac98e7e433984d98cb9236330b25cc8.tar.bz2
Replace the existing, apparently non-working, OBEX Send form with a
completely new implementation. The new implementation supports selective send over both IrDA and Bluetooth, to selected receivers (which are discovered as the form pops up). The form also indicates transfer status as the transfers progress. There is a new QT Designer UI form file, integrated into the build. There are also two new source files for the form to supply the abstract methods (typical of QT2). Patch courtesy Michael Haynie - thanks!
Diffstat (limited to 'core/obex/btobex.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/btobex.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/core/obex/btobex.h b/core/obex/btobex.h
new file mode 100644
index 0000000..5ab591c
--- a/dev/null
+++ b/core/obex/btobex.h
@@ -0,0 +1,80 @@
1
2
3#ifndef OpieBtObex_H
4#define OpieBtObex_H
5
6#include <qobject.h>
7
8namespace Opie {namespace Core {class OProcess;}}
9class QCopChannel;
10namespace OpieObex {
11 // Maybe this should be derved from Obex.
12 class BtObex : public QObject {
13 Q_OBJECT
14 public:
15 /**
16 * BtObex c'tor look
17 */
18 BtObex( QObject *parent, const char* name);
19 /**
20 * d'tor
21 */
22 ~BtObex();
23
24 /** TODO mbhaynie -- Maybe opd would be a better way to receive.
25 * Starting listening to Bluetooth after enabled by the applet
26 * a signal gets emitted when received a file
27 */
28 void receive();
29 void send( const QString&, const QString& );
30 void setReceiveEnabled( bool = false );
31 signals:
32
33 /**
34 * a signal
35 * @param path The path to the received file
36 */
37 void receivedFile( const QString& path);
38 /**
39 * error signal if the program couldn't be started or the
40 * the connection timed out
41 */
42 void error( int );
43 /**
44 * The current try to receive data
45 */
46 void currentTry(unsigned int);
47 /**
48 * signal sent The file got beamed to the remote location
49 */
50 void sent(bool);
51 void done(bool);
52
53 private:
54 uint m_count;
55 QString m_file;
56 QString m_outp;
57 QString m_bdaddr;
58 Opie::Core::OProcess *m_send;
59 Opie::Core::OProcess *m_rec;
60 bool m_receive : 1;
61 void shutDownReceive();
62
63private slots:
64
65 // the process exited
66 void slotExited(Opie::Core::OProcess* proc) ;
67 void slotStdOut(Opie::Core::OProcess*, char*, int);
68 void slotError();
69
70 private:
71 void sendNow();
72 QString parseOut();
73 void received();
74 void sendEnd();
75
76 };
77};
78
79
80#endif