[Box Backup-commit] COMMIT r2246 - box/trunk/bin/bbackupd

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Thu, 21 Aug 2008 11:47:21 +0100 (BST)


Author: chris
Date: 2008-08-21 11:47:21 +0100 (Thu, 21 Aug 2008)
New Revision: 2246

Modified:
   box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
Log:
More use of new interfaces, compile fix for [2245].


Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2008-08-21 10:41:18 UTC (rev 2245)
+++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2008-08-21 10:47:21 UTC (rev 2246)
@@ -121,7 +121,7 @@
 	ProgressNotifier& rNotifier(rContext.GetProgressNotifier());
 
 	// Signal received by daemon?
-	if(rParams.mrDaemon.StopRun())
+	if(rParams.mrRunStatusProvider.StopRun())
 	{
 		// Yes. Stop now.
 		THROW_EXCEPTION(BackupStoreException, SignalReceived)
@@ -1513,7 +1513,7 @@
 				&& subtype == BackupProtocolClientError::Err_StorageLimitExceeded)
 				{
 					// The hard limit was exceeded on the server, notify!
-					rParams.mrDaemon.NotifySysadmin(BackupDaemon::NotifyEvent_StoreFull);
+					rParams.mrSysadminNotifier.NotifySysadmin(BackupDaemon::NotifyEvent_StoreFull);
 					// return an error code instead of
 					// throwing an exception that we
 					// can't debug.
@@ -1569,7 +1569,10 @@
 //		Created: 8/3/04
 //
 // --------------------------------------------------------------------------
-BackupClientDirectoryRecord::SyncParams::SyncParams(BackupDaemon &rDaemon, 
+BackupClientDirectoryRecord::SyncParams::SyncParams(
+	RunStatusProvider &rRunStatusProvider,
+	SysadminNotifier &rSysadminNotifier,
+	ProgressNotifier &rProgressNotifier,
 	BackupClientContext &rContext)
 	: mSyncPeriodStart(0),
 	  mSyncPeriodEnd(0),
@@ -1577,7 +1580,9 @@
 	  mMaxFileTimeInFuture(99999999999999999LL),
 	  mFileTrackingSizeThreshold(16*1024),
 	  mDiffingUploadSizeThreshold(16*1024),
-	  mrDaemon(rDaemon),
+	  mrRunStatusProvider(rRunStatusProvider),
+	  mrSysadminNotifier(rSysadminNotifier),
+	  mrProgressNotifier(rProgressNotifier),
 	  mrContext(rContext),
 	  mReadErrorsOnFilesystemObjects(false),
 	  mUploadAfterThisTimeInTheFuture(99999999999999999LL),