summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.h
authorzautrix <zautrix>2005-02-23 22:51:41 (UTC)
committer zautrix <zautrix>2005-02-23 22:51:41 (UTC)
commita130c77b5c762131fb9ecb4cc96de52126b8c338 (patch) (unidiff)
tree655ecb4c1bb5e735a7d9a63104db8872367e84e9 /libkdepim/ksyncmanager.h
parent4a9bf75c2ef12a40be3aea1d147f3703aee48638 (diff)
downloadkdepimpi-a130c77b5c762131fb9ecb4cc96de52126b8c338.zip
kdepimpi-a130c77b5c762131fb9ecb4cc96de52126b8c338.tar.gz
kdepimpi-a130c77b5c762131fb9ecb4cc96de52126b8c338.tar.bz2
socket fix
Diffstat (limited to 'libkdepim/ksyncmanager.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 09bd1c1..810a515 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -41,88 +41,90 @@ class QProgressBar;
41 41
42class KServerSocket : public QServerSocket 42class KServerSocket : public QServerSocket
43{ 43{
44 Q_OBJECT 44 Q_OBJECT
45 45
46 public: 46 public:
47 KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 ); 47 KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 );
48 48
49 void newConnection ( int socket ) ; 49 void newConnection ( int socket ) ;
50 void setFileName( QString fn ) {mFileName = fn;}; 50 void setFileName( QString fn ) {mFileName = fn;};
51 signals: 51 signals:
52 void file_received( bool ); 52 void file_received( bool );
53 void request_file(); 53 void request_file();
54 void saveFile(); 54 void saveFile();
55 void endConnect(); 55 void endConnect();
56 private slots: 56 private slots:
57 void discardClient(); 57 void discardClient();
58 void readClient(); 58 void readClient();
59 void readBackFileFromSocket(); 59 void readBackFileFromSocket();
60 private : 60 private :
61 bool blockRC; 61 bool blockRC;
62 void send_file(); 62 void send_file();
63 void get_file(); 63 void get_file();
64 void end_connect(); 64 void end_connect();
65 void error_connect();
65 QDialog* mSyncActionDialog; 66 QDialog* mSyncActionDialog;
66 QSocket* mSocket; 67 QSocket* mSocket;
67 QString mPassWord; 68 QString mPassWord;
68 QString mFileName; 69 QString mFileName;
69 QTime piTime; 70 QTime piTime;
70 QString piFileString; 71 QString piFileString;
71}; 72};
72 73
73class KCommandSocket : public QObject 74class KCommandSocket : public QObject
74{ 75{
75 Q_OBJECT 76 Q_OBJECT
76 public: 77 public:
77 enum state { successR, errorR, successW, errorW, errorTO, quiet }; 78 enum state { successR, errorR, successW, errorW, errorTO, errorPW,quiet };
78 KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 ); 79 KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 );
79 void readFile( QString ); 80 void readFile( QString );
80 void writeFile( QString ); 81 void writeFile( QString );
81 void sendStop(); 82 void sendStop();
82 83
83 private slots : 84 private slots :
84 void sendFileRequest(); 85 void sendFileRequest();
85 86
86 signals: 87 signals:
87 void commandFinished( KCommandSocket*, int ); 88 void commandFinished( KCommandSocket*, int );
88 private slots: 89 private slots:
89 void startReadFileFromSocket(); 90 void startReadFileFromSocket();
90 void readFileFromSocket(); 91 void readFileFromSocket();
91 void deleteSocket(); 92 void deleteSocket();
92 void writeFileToSocket(); 93 void writeFileToSocket();
93 private : 94 private :
94 QWidget* tlw; 95 QWidget* tlw;
95 QSocket* mSocket; 96 QSocket* mSocket;
96 QString mPassWord; 97 QString mPassWord;
97 Q_UINT16 mPort; 98 Q_UINT16 mPort;
98 QString mHost; 99 QString mHost;
99 QString mFileName; 100 QString mFileName;
100 QTimer* mTimerSocket; 101 QTimer* mTimerSocket;
101 int mRetVal; 102 int mRetVal;
102 QTime mTime; 103 QTime mTime;
103 QString mFileString; 104 QString mFileString;
104 bool mFirst; 105 bool mFirst;
106 bool mFirstLine;
105}; 107};
106 108
107 109
108class KSyncManager : public QObject 110class KSyncManager : public QObject
109{ 111{
110 Q_OBJECT 112 Q_OBJECT
111 113
112 public: 114 public:
113 enum TargetApp { 115 enum TargetApp {
114 KOPI = 0, 116 KOPI = 0,
115 KAPI = 1, 117 KAPI = 1,
116 PWMPI = 2 }; 118 PWMPI = 2 };
117 119
118 KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); 120 KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu);
119 ~KSyncManager() ; 121 ~KSyncManager() ;
120 122
121 void multiSync( bool askforPrefs ); 123 void multiSync( bool askforPrefs );
122 bool blockSave() { return mBlockSaveFlag; } 124 bool blockSave() { return mBlockSaveFlag; }
123 void setBlockSave(bool sa) { mBlockSaveFlag = sa; } 125 void setBlockSave(bool sa) { mBlockSaveFlag = sa; }
124 void setDefaultFileName( QString s) ; 126 void setDefaultFileName( QString s) ;
125 QString defaultFileName() { return mDefFileName ;} 127 QString defaultFileName() { return mDefFileName ;}
126 QString syncFileName(); 128 QString syncFileName();
127 void enableQuick( bool ask = true); 129 void enableQuick( bool ask = true);
128 130