summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.h
Unidiff
Diffstat (limited to 'libkdepim/ksyncmanager.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index bd3ecdc..30ec1e6 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -17,129 +17,129 @@
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19 19
20 $Id$ 20 $Id$
21*/ 21*/
22#ifndef _KSYNCMANAGER_H 22#ifndef _KSYNCMANAGER_H
23#define _KSYNCMANAGER_H 23#define _KSYNCMANAGER_H
24 24
25#include <qobject.h> 25#include <qobject.h>
26#include <qstring.h> 26#include <qstring.h>
27#include <qsocket.h> 27#include <qsocket.h>
28#include <qdatetime.h> 28#include <qdatetime.h>
29#include <qserversocket.h> 29#include <qserversocket.h>
30#include <qtextstream.h> 30#include <qtextstream.h>
31#include <qregexp.h> 31#include <qregexp.h>
32 32
33class QPopupMenu; 33class QPopupMenu;
34class KSyncProfile; 34class KSyncProfile;
35class KPimPrefs; 35class KPimPrefs;
36class QWidget; 36class QWidget;
37class KSyncManager; 37class KSyncManager;
38class KSyncInterface; 38class KSyncInterface;
39class QProgressBar; 39class QProgressBar;
40 40
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 deleteSocket(); 58 void deleteSocket();
59 void readClient(); 59 void readClient();
60 void displayErrorMessage(); 60 void displayErrorMessage();
61 void readBackFileFromSocket(); 61 void readBackFileFromSocket();
62 private : 62 private :
63 int mErrorMessage; 63 int mErrorMessage;
64 bool blockRC; 64 bool blockRC;
65 void send_file(); 65 void send_file();
66 void get_file(); 66 void get_file();
67 void end_connect(); 67 void end_connect();
68 void error_connect( QString ); 68 void error_connect( QString );
69 QDialog* mSyncActionDialog; 69 QDialog* mSyncActionDialog;
70 QSocket* mSocket; 70 QSocket* mSocket;
71 QString mPassWord; 71 QString mPassWord;
72 QString mFileName; 72 QString mFileName;
73 QTime piTime; 73 QTime piTime;
74 QString piFileString; 74 QString piFileString;
75}; 75};
76 76
77class KCommandSocket : public QObject 77class KCommandSocket : public QObject
78{ 78{
79 Q_OBJECT 79 Q_OBJECT
80 public: 80 public:
81 enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN,quiet }; 81 enum state { successR, errorR, successW, errorW, errorTO, errorPW, errorCA, errorFI, errorUN, errorED,quiet };
82 KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 ); 82 KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 );
83 void readFile( QString ); 83 void readFile( QString );
84 void writeFile( QString ); 84 void writeFile( QString );
85 void sendStop(); 85 void sendStop();
86 86
87 private slots : 87 private slots :
88 void sendFileRequest(); 88 void sendFileRequest();
89 89
90 signals: 90 signals:
91 void commandFinished( KCommandSocket*, int ); 91 void commandFinished( KCommandSocket*, int );
92 private slots: 92 private slots:
93 void startReadFileFromSocket(); 93 void startReadFileFromSocket();
94 void readFileFromSocket(); 94 void readFileFromSocket();
95 void deleteSocket(); 95 void deleteSocket();
96 void writeFileToSocket(); 96 void writeFileToSocket();
97 private : 97 private :
98 QWidget* tlw; 98 QWidget* tlw;
99 QSocket* mSocket; 99 QSocket* mSocket;
100 QString mPassWord; 100 QString mPassWord;
101 Q_UINT16 mPort; 101 Q_UINT16 mPort;
102 QString mHost; 102 QString mHost;
103 QString mFileName; 103 QString mFileName;
104 QTimer* mTimerSocket; 104 QTimer* mTimerSocket;
105 int mRetVal; 105 int mRetVal;
106 QTime mTime; 106 QTime mTime;
107 QString mFileString; 107 QString mFileString;
108 bool mFirst; 108 bool mFirst;
109 bool mFirstLine; 109 bool mFirstLine;
110}; 110};
111 111
112 112
113class KSyncManager : public QObject 113class KSyncManager : public QObject
114{ 114{
115 Q_OBJECT 115 Q_OBJECT
116 116
117 public: 117 public:
118 enum TargetApp { 118 enum TargetApp {
119 KOPI = 0, 119 KOPI = 0,
120 KAPI = 1, 120 KAPI = 1,
121 PWMPI = 2 }; 121 PWMPI = 2 };
122 122
123 KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); 123 KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu);
124 ~KSyncManager() ; 124 ~KSyncManager() ;
125 125
126 void multiSync( bool askforPrefs ); 126 void multiSync( bool askforPrefs );
127 bool blockSave() { return mBlockSaveFlag; } 127 bool blockSave() { return mBlockSaveFlag; }
128 void setBlockSave(bool sa) { mBlockSaveFlag = sa; } 128 void setBlockSave(bool sa) { mBlockSaveFlag = sa; }
129 void setDefaultFileName( QString s) ; 129 void setDefaultFileName( QString s) ;
130 QString defaultFileName() { return mDefFileName ;} 130 QString defaultFileName() { return mDefFileName ;}
131 QString syncFileName(); 131 QString syncFileName();
132 void enableQuick( bool ask = true); 132 void enableQuick( bool ask = true);
133 133
134 bool syncWithDesktop () { return mSyncWithDesktop;} 134 bool syncWithDesktop () { return mSyncWithDesktop;}
135 QString getCurrentSyncDevice() { return mCurrentSyncDevice; } 135 QString getCurrentSyncDevice() { return mCurrentSyncDevice; }
136 QString getCurrentSyncName() { return mCurrentSyncName; } 136 QString getCurrentSyncName() { return mCurrentSyncName; }
137 137
138 void showProgressBar(int percentage, QString caption = QString::null, int total=100); 138 void showProgressBar(int percentage, QString caption = QString::null, int total=100);
139 void hideProgressBar(); 139 void hideProgressBar();
140 bool isProgressBarCanceled(); 140 bool isProgressBarCanceled();
141 141
142 // sync stuff 142 // sync stuff
143 QString mLocalMachineName; 143 QString mLocalMachineName;
144 QStringList mExternSyncProfiles; 144 QStringList mExternSyncProfiles;
145 QStringList mSyncProfileNames; 145 QStringList mSyncProfileNames;