-rw-r--r-- | core/obex/btobex.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/obex/btobex.h b/core/obex/btobex.h index 5ab591c..099f04a 100644 --- a/core/obex/btobex.h +++ b/core/obex/btobex.h | |||
@@ -1,80 +1,86 @@ | |||
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 <services.h> | ||
8 | #include <manager.h> | ||
7 | 9 | ||
8 | namespace Opie {namespace Core {class OProcess;}} | 10 | namespace Opie {namespace Core {class OProcess;}} |
9 | class QCopChannel; | 11 | class QCopChannel; |
12 | using namespace OpieTooth; | ||
10 | namespace OpieObex { | 13 | namespace OpieObex { |
11 | // Maybe this should be derved from Obex. | 14 | // Maybe this should be derved from Obex. |
12 | class BtObex : public QObject { | 15 | class BtObex : public QObject { |
13 | Q_OBJECT | 16 | Q_OBJECT |
14 | public: | 17 | public: |
15 | /** | 18 | /** |
16 | * BtObex c'tor look | 19 | * BtObex c'tor look |
17 | */ | 20 | */ |
18 | BtObex( QObject *parent, const char* name); | 21 | BtObex( QObject *parent, const char* name); |
19 | /** | 22 | /** |
20 | * d'tor | 23 | * d'tor |
21 | */ | 24 | */ |
22 | ~BtObex(); | 25 | ~BtObex(); |
23 | 26 | ||
24 | /** TODO mbhaynie -- Maybe opd would be a better way to receive. | 27 | /** TODO mbhaynie -- Maybe opd would be a better way to receive. |
25 | * Starting listening to Bluetooth after enabled by the applet | 28 | * Starting listening to Bluetooth after enabled by the applet |
26 | * a signal gets emitted when received a file | 29 | * a signal gets emitted when received a file |
27 | */ | 30 | */ |
28 | void receive(); | 31 | void receive(); |
29 | void send( const QString&, const QString& ); | 32 | void send( const QString&, const QString& ); |
30 | void setReceiveEnabled( bool = false ); | 33 | void setReceiveEnabled( bool = false ); |
31 | signals: | 34 | signals: |
32 | 35 | ||
33 | /** | 36 | /** |
34 | * a signal | 37 | * a signal |
35 | * @param path The path to the received file | 38 | * @param path The path to the received file |
36 | */ | 39 | */ |
37 | void receivedFile( const QString& path); | 40 | void receivedFile( const QString& path); |
38 | /** | 41 | /** |
39 | * error signal if the program couldn't be started or the | 42 | * error signal if the program couldn't be started or the |
40 | * the connection timed out | 43 | * the connection timed out |
41 | */ | 44 | */ |
42 | void error( int ); | 45 | void error( int ); |
43 | /** | 46 | /** |
44 | * The current try to receive data | 47 | * The current try to receive data |
45 | */ | 48 | */ |
46 | void currentTry(unsigned int); | 49 | void currentTry(unsigned int); |
47 | /** | 50 | /** |
48 | * signal sent The file got beamed to the remote location | 51 | * signal sent The file got beamed to the remote location |
49 | */ | 52 | */ |
50 | void sent(bool); | 53 | void sent(bool); |
51 | void done(bool); | 54 | void done(bool); |
52 | 55 | ||
53 | private: | 56 | private: |
54 | uint m_count; | 57 | uint m_count; |
55 | QString m_file; | 58 | QString m_file; |
56 | QString m_outp; | 59 | QString m_outp; |
57 | QString m_bdaddr; | 60 | QString m_bdaddr; |
61 | int m_port; | ||
58 | Opie::Core::OProcess *m_send; | 62 | Opie::Core::OProcess *m_send; |
59 | Opie::Core::OProcess *m_rec; | 63 | Opie::Core::OProcess *m_rec; |
60 | bool m_receive : 1; | 64 | bool m_receive : 1; |
65 | OpieTooth::Manager* btManager; | ||
61 | void shutDownReceive(); | 66 | void shutDownReceive(); |
62 | 67 | ||
63 | private slots: | 68 | private slots: |
64 | 69 | ||
65 | // the process exited | 70 | // the process exited |
66 | void slotExited(Opie::Core::OProcess* proc) ; | 71 | void slotExited(Opie::Core::OProcess*) ; |
67 | void slotStdOut(Opie::Core::OProcess*, char*, int); | 72 | void slotStdOut(Opie::Core::OProcess*, char*, int); |
68 | void slotError(); | 73 | void slotError(); |
74 | void slotFoundServices(const QString&, Services::ValueList); | ||
69 | 75 | ||
70 | private: | 76 | private: |
71 | void sendNow(); | 77 | void sendNow(); |
72 | QString parseOut(); | 78 | QString parseOut(); |
73 | void received(); | 79 | void received(); |
74 | void sendEnd(); | 80 | void sendEnd(); |
75 | 81 | ||
76 | }; | 82 | }; |
77 | }; | 83 | }; |
78 | 84 | ||
79 | 85 | ||
80 | #endif | 86 | #endif |