summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2005-11-25 17:41:25 (UTC)
committer zautrix <zautrix>2005-11-25 17:41:25 (UTC)
commit279e183c0325cd9565605f60af0215bb9bfdc825 (patch) (side-by-side diff)
tree43ab776cd108874819e7c6e73070a7d989a9078f /libkdepim
parent794a5204686ad9bfc16172b01db35f1f3b7683e5 (diff)
downloadkdepimpi-279e183c0325cd9565605f60af0215bb9bfdc825.zip
kdepimpi-279e183c0325cd9565605f60af0215bb9bfdc825.tar.gz
kdepimpi-279e183c0325cd9565605f60af0215bb9bfdc825.tar.bz2
sync
Diffstat (limited to 'libkdepim') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp18
-rw-r--r--libkdepim/ksyncmanager.h6
2 files changed, 21 insertions, 3 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index a64eb34..719d80b 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -199,2 +199,3 @@ void KSyncManager::slotSyncMenu( int action )
mCurrentResourceLocal = "";
+ emit multiResourceSyncStart( false );
if ( action == 5000 )
@@ -443,2 +444,4 @@ void KSyncManager::enableQuick( bool ask )
connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) );
+ connect( mServerSocket, SIGNAL ( request_file(const QString &) ),this, SIGNAL ( request_file(const QString &) ) );
+ connect( mServerSocket, SIGNAL ( file_received( bool ,const QString &) ), this, SIGNAL ( getFile( bool,const QString & ) ) );
}
@@ -571,3 +574,3 @@ int KSyncManager::ringSync()
{
-
+ emit multiResourceSyncStart( false );
int syncedProfiles = 0;
@@ -1142,3 +1145,6 @@ void KSyncManager::syncPi()
int startRemote = mSpecificResources.count()/2;
+ emit multiResourceSyncStart( true );
while ( startLocal < mSpecificResources.count()/2 ) {
+ if ( startLocal+1 >= mSpecificResources.count()/2 )
+ emit multiResourceSyncStart( false );
mPisyncFinished = false;
@@ -1221,3 +1227,3 @@ void KSyncManager::readFileFromSocket()
}
- KCommandSocket* commandSocket = new KCommandSocket( "",mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() );
+ KCommandSocket* commandSocket = new KCommandSocket( mCurrentResourceRemote,mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() );
connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) );
@@ -1285,2 +1291,3 @@ void KServerSocket::readClient()
}
+ mResource = "";
mErrorMessage = 0;
@@ -1301,2 +1308,3 @@ void KServerSocket::readClient()
KSyncManager::mRequestedSyncEvent = QDateTime();
+ mResource =tokens[3];
send_file();
@@ -1312,2 +1320,3 @@ void KServerSocket::readClient()
blockRC = true;
+ mResource =tokens[2];
get_file();
@@ -1408,2 +1417,3 @@ void KServerSocket::send_file()
mSyncActionDialog->raise();
+ emit request_file(mResource);
emit request_file();
@@ -1469,2 +1479,3 @@ void KServerSocket::readBackFileFromSocket()
piFileString = "";
+ emit file_received( false, mResource);
emit file_received( false );
@@ -1485,2 +1496,3 @@ void KServerSocket::readBackFileFromSocket()
piFileString = "";
+ emit file_received( true, mResource );
emit file_received( true );
@@ -1598,3 +1610,3 @@ void KCommandSocket::writeFileToSocket()
os2.setEncoding( QTextStream::Latin1 );
- os2 << "PUT " << mPassWord << "\r\n\r\n";;
+ os2 << "PUT " << mPassWord << mRemoteResource << "\r\n\r\n";;
int byteCount = 0;
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index f4654ce..53c611d 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -55,2 +55,4 @@ class KServerSocket : public QServerSocket
void request_file();
+ void file_received( bool, const QString &);
+ void request_file(const QString &);
void saveFile();
@@ -64,2 +66,3 @@ class KServerSocket : public QServerSocket
private :
+ QString mResource;
int mErrorMessage;
@@ -176,2 +179,5 @@ class KSyncManager : public QObject
void getFile( bool );
+ void getFile( bool, const QString &);
+ void request_file(const QString &);
+ void multiResourceSyncStart( bool );