author | zecke <zecke> | 2003-02-16 15:49:02 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-16 15:49:02 (UTC) |
commit | 30a098530260176ac20d75ba6cb7abfb3d998c13 (patch) (side-by-side diff) | |
tree | ee5c08ca67fa00574414153921ab2de654c60421 /core/obex/obex.h | |
parent | 7fab90d46144843d32e476ada8d0a5f40f50aa60 (diff) | |
download | opie-30a098530260176ac20d75ba6cb7abfb3d998c13.zip opie-30a098530260176ac20d75ba6cb7abfb3d998c13.tar.gz opie-30a098530260176ac20d75ba6cb7abfb3d998c13.tar.bz2 |
disable snd in IrDaApplet it hangs on my machine..
Remove the hacky OBEX Implementation
Add a more cleaned up more appealing (not yet working) version
which will even be able to do OBEX over Bluetooth in the future
-It handles receive better
let's you choose what to do with custom files and created a DocLnk
-Send lets you beam to multiple devices
this needs the IrDa Applet to be present
-rw-r--r-- | core/obex/obex.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/core/obex/obex.h b/core/obex/obex.h new file mode 100644 index 0000000..60f5d28 --- a/dev/null +++ b/core/obex/obex.h @@ -0,0 +1,84 @@ + + +#ifndef OpieObex_H +#define OpieObex_H + +#include <qobject.h> + +class OProcess; +class QCopChannel; +namespace OpieObex { + class Obex : public QObject { + Q_OBJECT + public: + /** + * Obex c'tor look + */ + Obex( QObject *parent, const char* name); + /** + * d'tor + */ + ~Obex(); + + /** + * Starting listening to irda after enabled by the applet + * a signal gets emitted when recieved a file + */ + void receive(); + void send( const QString& ); + void setReceiveEnabled( bool = false ); + signals: + + /** + * a signal + * @param path The path to the recieved file + */ + void receivedFile( const QString& path); + /** + * error signal if the program couldn't be started or the + * the connection timed out + */ + void error( int ); + /** + * The current try to receive data + */ + void currentTry(unsigned int); + /** + * signal sent The file got beamed to the remote location + */ + void sent(bool); + void done(bool); + + private: + uint m_count; + QString m_file; + QString m_outp; + OProcess *m_send; + OProcess *m_rec; + bool m_receive : 1; + void shutDownReceive(); + +private slots: + + /** + * send over palm obex + */ + + //void send(const QString&); + + // the process exited + void slotExited(OProcess* proc) ; + void slotStdOut(OProcess*, char*, int); + void slotError(); + + private: + void sendNow(); + QString parseOut(); + void received(); + void sendEnd(); + + }; +}; + + +#endif |