summaryrefslogtreecommitdiff
path: root/core/obex/btobex.h
authorzecke <zecke>2006-05-14 14:34:43 (UTC)
committer zecke <zecke>2006-05-14 14:34:43 (UTC)
commit273ffc42b3f0ce593e0d20874a7f224328416445 (patch) (unidiff)
tree04203fc463a711de981fc40ba390fcec8838d1eb /core/obex/btobex.h
parent89efebff8f5a00089f02397aa0778dd0dbbacdbb (diff)
downloadopie-273ffc42b3f0ce593e0d20874a7f224328416445.zip
opie-273ffc42b3f0ce593e0d20874a7f224328416445.tar.gz
opie-273ffc42b3f0ce593e0d20874a7f224328416445.tar.bz2
core/obex: Patch from Dmitry Korovkin to use opietooth's OBEX implementation
for sending
Diffstat (limited to 'core/obex/btobex.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/btobex.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/obex/btobex.h b/core/obex/btobex.h
index ba50064..9c1ab70 100644
--- a/core/obex/btobex.h
+++ b/core/obex/btobex.h
@@ -1,32 +1,33 @@
1 1
2 2
3#ifndef OpieBtObex_H 3#ifndef OpieBtObex_H
4#define OpieBtObex_H 4#define OpieBtObex_H
5 5
6#include <qobject.h> 6#include <qobject.h>
7#include <opietooth/services.h> 7#include <services.h>
8#include <opietooth/manager.h> 8#include <manager.h>
9#include <obexpush.h>
9 10
10namespace Opie {namespace Core {class OProcess;}} 11namespace Opie {namespace Core {class OProcess;}}
11class QCopChannel; 12class QCopChannel;
12using namespace OpieTooth; 13using namespace OpieTooth;
13namespace OpieObex { 14namespace OpieObex {
14 // Maybe this should be derved from Obex. 15 // Maybe this should be derved from Obex.
15 class BtObex : public QObject { 16 class BtObex : public QObject {
16 Q_OBJECT 17 Q_OBJECT
17 public: 18 public:
18 /** 19 /**
19 * BtObex c'tor look 20 * BtObex c'tor look
20 */ 21 */
21 BtObex( QObject *parent, const char* name); 22 BtObex( QObject *parent, const char* name);
22 /** 23 /**
23 * d'tor 24 * d'tor
24 */ 25 */
25 ~BtObex(); 26 ~BtObex();
26 27
27 /** TODO mbhaynie -- Maybe opd would be a better way to receive. 28 /** TODO mbhaynie -- Maybe opd would be a better way to receive.
28 * Starting listening to Bluetooth after enabled by the applet 29 * Starting listening to Bluetooth after enabled by the applet
29 * a signal gets emitted when received a file 30 * a signal gets emitted when received a file
30 */ 31 */
31 void receive(); 32 void receive();
32 void send( const QString&, const QString& ); 33 void send( const QString&, const QString& );
@@ -38,49 +39,52 @@ namespace OpieObex {
38 * @param path The path to the received file 39 * @param path The path to the received file
39 */ 40 */
40 void receivedFile( const QString& path); 41 void receivedFile( const QString& path);
41 /** 42 /**
42 * error signal if the program couldn't be started or the 43 * error signal if the program couldn't be started or the
43 * the connection timed out 44 * the connection timed out
44 */ 45 */
45 void error( int ); 46 void error( int );
46 /** 47 /**
47 * The current try to receive data 48 * The current try to receive data
48 */ 49 */
49 void currentTry(unsigned int); 50 void currentTry(unsigned int);
50 /** 51 /**
51 * signal sent The file got beamed to the remote location 52 * signal sent The file got beamed to the remote location
52 */ 53 */
53 void sent(bool); 54 void sent(bool);
54 void done(bool); 55 void done(bool);
55 56
56 private: 57 private:
57 uint m_count; 58 uint m_count;
58 QString m_file; 59 QString m_file;
59 QString m_outp; 60 QString m_outp;
60 QString m_bdaddr; 61 QString m_bdaddr;
61 int m_port; 62 int m_port;
62 Opie::Core::OProcess *m_send; 63 ObexPush* m_send;
63 Opie::Core::OProcess *m_rec; 64 Opie::Core::OProcess *m_rec;
64 bool m_receive : 1; 65 bool m_receive : 1;
65 OpieTooth::Manager* btManager; 66 OpieTooth::Manager* btManager;
66 void shutDownReceive(); 67 void shutDownReceive();
67 68
68private slots: 69private slots:
69 70
71 // Push process slots
72 void slotPushStatus(QCString&);
73 void slotPushComplete(int);
74 void slotPushError(int);
75
70 // the process exited 76 // the process exited
71 void slotExited(Opie::Core::OProcess*) ; 77 void slotExited(Opie::Core::OProcess*) ;
72 void slotStdOut(Opie::Core::OProcess*, char*, int); 78 void slotStdOut(Opie::Core::OProcess*, char*, int);
73 void slotError(); 79 void slotError();
74 void slotFoundServices(const QString&, Services::ValueList); 80 void slotFoundServices(const QString&, Services::ValueList);
75 81
76 private: 82 private:
77 void sendNow(); 83 void sendNow();
78 QString parseOut(); 84 QString parseOut();
79 void received(); 85 void received();
80 void sendEnd();
81
82 }; 86 };
83}; 87};
84 88
85 89
86#endif 90#endif