[Box Backup-commit] COMMIT r1688 - box/chris/general/lib/common

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Sat, 26 May 2007 16:30:05 +0100


Author: chris
Date: 2007-05-26 16:30:05 +0100 (Sat, 26 May 2007)
New Revision: 1688

Modified:
   box/chris/general/lib/common/BoxPortsAndFiles.h
Log:
Don't define default locations for config files at compile time on Windows,
provide macros to determine them at runtime instead.


Modified: box/chris/general/lib/common/BoxPortsAndFiles.h
===================================================================
--- box/chris/general/lib/common/BoxPortsAndFiles.h	2007-05-26 15:29:11 UTC (rev 1687)
+++ box/chris/general/lib/common/BoxPortsAndFiles.h	2007-05-26 15:30:05 UTC (rev 1688)
@@ -14,21 +14,28 @@
 
 
 // Backup store daemon
-#define BOX_PORT_BBSTORED					(BOX_PORT_BASE+1)
-#define BOX_FILE_BBSTORED_DEFAULT_CONFIG	"/etc/box/bbstored.conf"
+#define BOX_PORT_BBSTORED			(BOX_PORT_BASE+1)
+
 // directory within the RAIDFILE root for the backup store daemon
-#define BOX_RAIDFILE_ROOT_BBSTORED			"backup"
+#define BOX_RAIDFILE_ROOT_BBSTORED		"backup"
 
-// Backup client daemon
+// configuration file paths
 #ifdef WIN32
-#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG	"C:\\Program Files\\Box Backup\\bbackupd.conf"
+	// no default config file path, use these macros to call
+	// GetDefaultConfigFilePath() instead.
+
+	#define BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE \
+		GetDefaultConfigFilePath("bbackupd.conf").c_str()
+	#define BOX_GET_DEFAULT_RAIDFILE_CONFIG_FILE \
+		GetDefaultConfigFilePath("raidfile.conf").c_str()
+	#define BOX_GET_DEFAULT_BBSTORED_CONFIG_FILE \
+		GetDefaultConfigFilePath("bbstored.conf").c_str()
 #else
 #define BOX_FILE_BBACKUPD_DEFAULT_CONFIG	"/etc/box/bbackupd.conf"
+#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG	"/etc/box/raidfile.conf"
+#define BOX_FILE_BBSTORED_DEFAULT_CONFIG 	"/etc/box/bbstored.conf"
 #endif
 
-// RaidFile conf location default
-#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG	"/etc/box/raidfile.conf"
-
 // Default name of the named pipe
 #define BOX_NAMED_PIPE_NAME L"\\\\.\\pipe\\boxbackup"