summaryrefslogtreecommitdiffabout
path: root/libkdepim
Side-by-side diff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp24
-rw-r--r--libkdepim/ksyncmanager.h6
2 files changed, 24 insertions, 6 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index a64eb34..719d80b 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -198,3 +198,4 @@ void KSyncManager::slotSyncMenu( int action )
qDebug("KSM::syncaction %d ", action);
- mCurrentResourceLocal = "";
+ 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,3 +1479,4 @@ void KServerSocket::readBackFileFromSocket()
piFileString = "";
- emit file_received( false );
+ emit file_received( false, mResource);
+ emit file_received( false);
blockRC = false;
@@ -1485,3 +1496,4 @@ void KServerSocket::readBackFileFromSocket()
piFileString = "";
- emit file_received( true );
+ emit file_received( true, mResource );
+ emit file_received( true);
delete mSyncActionDialog;
@@ -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 );