From 2a99a7ca0816fd68b7fcf2f1fee023aef019000d Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 04 Oct 2004 17:32:48 +0000 Subject: more sync fixes --- (limited to 'korganizer/mainwindow.h') diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index d217578..11a816c 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -46,6 +46,34 @@ private slots: QString mPassWord; }; +class KCommandSocket : public QObject +{ + Q_OBJECT + +public: + KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, const char * name=0 ); + void readFile( QString ); + void writeFile( QString ); + + +signals: + void commandFinished( bool ); +private slots: + void startReadFileFromSocket(); + void readFileFromSocket(); + void deleteSocket(); + private : + QSocket* mSocket; + QString mPassWord; + Q_UINT16 mPort; + QString mHost; + QString mFileName; + QTimer* mTimerSocket; + bool mRetVal; + QTime mTime; + QString mFileString; + bool mFirst; +}; namespace KCal { class CalendarLocal; @@ -121,7 +149,7 @@ class MainWindow : public QMainWindow QSocket* piSocket; QString piFileString; QTime piTime; - void deleteCommandSocket(); + void deleteCommandSocket(bool); void deleteCommandSocketFinish(); void fillSyncMenu(); void sendFile(QSocket* s); @@ -130,9 +158,9 @@ class MainWindow : public QMainWindow void readBackFileFromSocket(); void endConnect(); private: - QTimer* mTimerCommandSocket; + //QTimer* mTimerCommandSocket; QString mPassWordPiSync; - QSocket* mCommandSocket; + KCommandSocket* mCommandSocket; QSocket* mCommandSocketFinish; KServerSocket * mServerSocket; bool mClosed; -- cgit v0.9.0.2