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