-rw-r--r-- | core/applets/obex/obex.h | 116 |
1 files changed, 60 insertions, 56 deletions
diff --git a/core/applets/obex/obex.h b/core/applets/obex/obex.h index 4e78015..2ce44f2 100644 --- a/core/applets/obex/obex.h +++ b/core/applets/obex/obex.h | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #ifndef OpieObex_H | 3 | #ifndef OpieObex_H |
4 | #define OpieObex_H | 4 | #define OpieObex_H |
5 | 5 | ||
6 | #include <qobject.h> | 6 | #include <qobject.h> |
@@ -9,71 +9,75 @@ class OProcess; | |||
9 | class QCopChannel; | 9 | class QCopChannel; |
10 | namespace OpieObex { | 10 | namespace OpieObex { |
11 | class Obex : public QObject { | 11 | class Obex : public QObject { |
12 | Q_OBJECT | 12 | Q_OBJECT |
13 | public: | 13 | public: |
14 | /** | 14 | /** |
15 | * Obex c'tor look | 15 | * Obex c'tor look |
16 | */ | 16 | */ |
17 | Obex( QObject *parent, const char* name); | 17 | Obex( QObject *parent, const char* name); |
18 | /** | 18 | /** |
19 | * d'tor | 19 | * d'tor |
20 | */ | 20 | */ |
21 | ~Obex(); | 21 | ~Obex(); |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * Starting listening to irda after enabled by the applet | 24 | * Starting listening to irda after enabled by the applet |
25 | * a signal gets emitted when recieved a file | 25 | * a signal gets emitted when recieved a file |
26 | */ | 26 | */ |
27 | void receive(); | 27 | void receive(); |
28 | void send( const QString& ); | 28 | void send( const QString& ); |
29 | void setReceiveEnabled( bool = false ); | ||
29 | signals: | 30 | signals: |
30 | 31 | ||
31 | /** | 32 | /** |
32 | * a signal | 33 | * a signal |
33 | * @param path The path to the recieved file | 34 | * @param path The path to the recieved file |
34 | */ | 35 | */ |
35 | void receivedFile( const QString& path); | 36 | void receivedFile( const QString& path); |
36 | /** | 37 | /** |
37 | * error signal if the program couldn't be started or the | 38 | * error signal if the program couldn't be started or the |
38 | * the connection timed out | 39 | * the connection timed out |
39 | */ | 40 | */ |
40 | void error( int ); | 41 | void error( int ); |
41 | /** | 42 | /** |
42 | * The current try to receive data | 43 | * The current try to receive data |
43 | */ | 44 | */ |
44 | void currentTry(unsigned int); | 45 | void currentTry(unsigned int); |
45 | /** | 46 | /** |
46 | * signal sent The file got beamed to the remote location | 47 | * signal sent The file got beamed to the remote location |
47 | */ | 48 | */ |
48 | void sent(); | 49 | void sent(); |
49 | // private slots | 50 | // private slots |
50 | void done(bool); | 51 | void done(bool); |
51 | 52 | ||
52 | private: | 53 | private: |
53 | uint m_count; | 54 | uint m_count; |
54 | QString m_file; | 55 | QString m_file; |
55 | QString m_outp; | 56 | QString m_outp; |
56 | OProcess *m_send; | 57 | OProcess *m_send; |
57 | OProcess *m_rec; | 58 | OProcess *m_rec; |
58 | 59 | bool m_receive : 1; | |
59 | private slots: | 60 | void shutDownReceive(); |
60 | 61 | ||
61 | /** | 62 | private slots: |
62 | * send over palm obex | 63 | |
63 | */ | 64 | /** |
65 | * send over palm obex | ||
66 | */ | ||
67 | |||
68 | //void send(const QString&); | ||
69 | |||
70 | // the process exited | ||
71 | void slotExited(OProcess* proc) ; | ||
72 | void slotStdOut(OProcess*, char*, int); | ||
73 | void slotError(); | ||
64 | 74 | ||
65 | //void send(const QString&); | ||
66 | |||
67 | // the process exited | ||
68 | void slotExited(OProcess* proc) ; | ||
69 | void slotStdOut(OProcess*, char*, int); | ||
70 | |||
71 | private: | 75 | private: |
72 | void sendNow(); | 76 | void sendNow(); |
73 | QString parseOut(); | 77 | QString parseOut(); |
74 | void recieved(); | 78 | void recieved(); |
75 | void sendEnd(); | 79 | void sendEnd(); |
76 | 80 | ||
77 | }; | 81 | }; |
78 | }; | 82 | }; |
79 | 83 | ||