00001 00002 00003 #ifndef OpieObex_H 00004 #define OpieObex_H 00005 00006 #include <qobject.h> 00007 00008 namespace Opie {namespace Core {class OProcess;}} 00009 class QCopChannel; 00010 namespace OpieObex { 00011 class Obex : public QObject { 00012 Q_OBJECT 00013 public: 00017 Obex( QObject *parent, const char* name); 00021 ~Obex(); 00022 00027 void receive(); 00028 void send( const QString& ); 00029 void setReceiveEnabled( bool = false ); 00030 signals: 00031 00036 void receivedFile( const QString& path); 00041 void error( int ); 00045 void currentTry(unsigned int); 00049 void sent(bool); 00050 void done(bool); 00051 00052 private: 00053 uint m_count; 00054 QString m_file; 00055 QString m_outp; 00056 Opie::Core::OProcess *m_send; 00057 Opie::Core::OProcess *m_rec; 00058 bool m_receive : 1; 00059 void shutDownReceive(); 00060 00061 private slots: 00062 00067 //void send(const QString&); 00068 00069 // the process exited 00070 void slotExited(Opie::Core::OProcess* proc) ; 00071 void slotStdOut(Opie::Core::OProcess*, char*, int); 00072 void slotError(); 00073 00074 private: 00075 void sendNow(); 00076 QString parseOut(); 00077 void received(); 00078 void sendEnd(); 00079 00080 }; 00081 }; 00082 00083 00084 #endif
1.4.2