? defaultPaths.h
Index: APIModules/QTSSAccessModule/QTSSAccessModule.cpp
===================================================================
RCS file: /cvs/Darwin/Services/StreamingServer/APIModules/QTSSAccessModule/QTSSAccessModule.cpp,v
retrieving revision 1.25
diff -u -d -b -w -r1.25 QTSSAccessModule.cpp
--- QTSSAccessModule.cpp	2001/11/02 23:49:03	1.25
+++ QTSSAccessModule.cpp	2001/11/29 12:37:18
@@ -32,6 +32,7 @@
 
 #include "QTSSAccessModule.h"
 
+#include "defaultPaths.h"
 
 #include "OSArrayObjectDeleter.h"
 #include "QTSS_Private.h"
@@ -69,22 +70,11 @@
 //static Bool16			sDefaultAuthenticationEnabled	= true;
 //static Bool16			sAuthenticationEnabled			= true;
 
-#ifdef __Win32__
-static char* sDefaultUsersFilePath = "c:\\Program Files\\Darwin Streaming Server\\qtusers";
-#elif __MacOSX__
-static char* sDefaultUsersFilePath = "/Library/QuickTimeStreaming/Config/qtusers";
-#else
-static char* sDefaultUsersFilePath = "/etc/streaming/qtusers";
-#endif
+
+static char* sDefaultUsersFilePath  = DEFAULTPATHS_ETC_DIR "qtusers";
 static char* sUsersFilePath = NULL;
 
-#ifdef __Win32__
-static char* sDefaultGroupsFilePath = "c:\\Program Files\\Darwin Streaming Server\\qtgroups";
-#elif __MacOSX__
-static char* sDefaultGroupsFilePath = "/Library/QuickTimeStreaming/Config/qtgroups";
-#else
-static char* sDefaultGroupsFilePath = "/etc/streaming/qtgroups";
-#endif
+static char* sDefaultGroupsFilePath = DEFAULTPATHS_ETC_DIR "qtgroups";
 static char* sGroupsFilePath = NULL;
 
 static char* sDefaultAccessFileName = "qtaccess";
Index: APIModules/QTSSDemoAuthorizationModule.bproj/QTSSDemoModule.cpp
===================================================================
RCS file: /cvs/Darwin/Services/StreamingServer/APIModules/QTSSDemoAuthorizationModule.bproj/QTSSDemoModule.cpp,v
retrieving revision 1.13
diff -u -d -b -w -r1.13 QTSSDemoModule.cpp
--- QTSSDemoModule.cpp	2001/10/18 02:00:52	1.13
+++ QTSSDemoModule.cpp	2001/11/29 12:37:26
@@ -32,6 +32,9 @@
 */
 
 #include "QTSSDemoModule.h"
+
+#include "defaultPaths.h"
+
 #include "AccessCheck.h"
 #include "StrPtrLen.h"
 #include "QTSSModuleUtils.h"
@@ -136,8 +139,7 @@
 	char realmNameBuff[kBuffLen];
 	StrPtrLen realmName(realmNameBuff, kBuffLen);
 
-        //AccessChecker accessChecker(movieRootDir, "/etc/streaming/QTSSUsers", "qtaccess", "/etc/streaming/QTSSGroups");
-        AccessChecker accessChecker(movieRootDir, "qtaccess", "/etc/streaming/QTSSUsers", "/etc/streaming/QTSSGroups");
+        AccessChecker accessChecker(movieRootDir, "qtaccess",  DEFAULTPATHS_ETC_DIR "QTSSUsers", DEFAULTPATHS_ETC_DIR "QTSSGroups");
 	
 	//If there are no access files, then allow world access
 	if ( !accessChecker.GetAccessFile(pathBuff) ) 
Index: APIModules/QTSSReflectorModule/QTSSRelayModule.cpp
===================================================================
RCS file: /cvs/Darwin/Services/StreamingServer/APIModules/QTSSReflectorModule/QTSSRelayModule.cpp,v
retrieving revision 1.44
diff -u -d -b -w -r1.44 QTSSRelayModule.cpp
--- QTSSRelayModule.cpp	2001/11/21 01:01:13	1.44
+++ QTSSRelayModule.cpp	2001/11/29 12:38:00
@@ -38,6 +38,8 @@
 #include "OSArrayObjectDeleter.h"
 #include "QTSS_Private.h"
 
+#include "defaultPaths.h"
+
 #include "OSMemory.h"
 #include "OSRef.h"
 #include "IdleTask.h"
@@ -87,16 +89,8 @@
 // ATTRIBUTES
 
 static QTSS_AttributeID		sRelayModulePrefParseErr  = qtssIllegalAttrID;
-
-
-#ifdef __Win32__
-static char*	sDefaultRelayPrefs		 		= "c:\\Program Files\\Darwin Streaming Server\\relayconfig.xml";
-#elif __MacOSX__
-static char*	sDefaultRelayPrefs		 		= "/Library/QuickTimeStreaming/Config/relayconfig.xml";
-#else
-static char*	sDefaultRelayPrefs		 		= "/etc/streaming/relayconfig.xml";
-#endif
 
+static char*		sDefaultRelayPrefs = DEFAULTPATHS_ETC_DIR "relayconfig.xml";
 
 static OSQueue* 	sSessionQueue = NULL;
 static OSQueue* 	sAnnouncedQueue = NULL;
Index: MP3Broadcaster/MP3Broadcaster.cpp
===================================================================
RCS file: /cvs/Darwin/Services/StreamingServer/MP3Broadcaster/MP3Broadcaster.cpp,v
retrieving revision 1.25
diff -u -d -b -w -r1.25 MP3Broadcaster.cpp
--- MP3Broadcaster.cpp	2001/11/21 18:39:29	1.25
+++ MP3Broadcaster.cpp	2001/11/29 12:38:30
@@ -26,6 +26,8 @@
 #include "MP3MetaInfoUpdater.h"
 #include "StringTranslator.h"
 
+#include "defaultPaths.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <signal.h>
@@ -95,8 +97,8 @@
 	sBroadcaster = this;
 	
 	strcpy(mIPAddr, "128.0.0.1");
-	strcpy(mPlayListPath, "/etc/streaming/mp3playlist.ply");
-	strcpy(mWorkingDirPath, "/etc/streaming/");
+	strcpy(mPlayListPath, DEFAULTPATHS_ETC_DIR "mp3playlist.ply");
+	strcpy(mWorkingDirPath, DEFAULTPATHS_ETC_DIR );
 	strcpy(mPlayMode, "sequential");
 	strcpy(mMountPoint, "/");
 	strcpy(mGenre, "Pop");
Index: Server.tproj/QTSServerPrefs.cpp
===================================================================
RCS file: /cvs/Darwin/Services/StreamingServer/Server.tproj/QTSServerPrefs.cpp,v
retrieving revision 1.51
diff -u -d -b -w -r1.51 QTSServerPrefs.cpp
--- QTSServerPrefs.cpp	2001/11/14 02:06:06	1.51
+++ QTSServerPrefs.cpp	2001/11/29 12:39:21
@@ -35,6 +35,8 @@
 #include "OSMemory.h"
 #include "QTSSDataConverter.h"
  
+#include "defaultPaths.h"
+ 
 #ifndef __Win32__
 #include <sys/types.h>
 #include <netinet/in.h>
@@ -55,34 +57,16 @@
 	{ kDontAllowMultipleValues,	"60",		NULL					},	//rtp_timeout
 	{ kDontAllowMultipleValues,	"1000",		NULL					},	//maximum_connections
 	{ kDontAllowMultipleValues,	"102400",	NULL					},	//maximum_bandwidth
-#ifdef __MacOSX__
-	{ kDontAllowMultipleValues,	"/Library/QuickTimeStreaming/Movies",	NULL	},	//movie_folder
-#elif __Win32__
-	{ kDontAllowMultipleValues,	"c:\\Program Files\\Darwin Streaming Server\\Movies",	NULL	},	//movie_folder
-#else
-	{ kDontAllowMultipleValues,	"/usr/local/movies",NULL			},	//movie_folder
-#endif
+	{ kDontAllowMultipleValues,	DEFAULTPATHS_ETC_DIR "Movies",	NULL			},	//movie_folder
 	{ kAllowMultipleValues,		"0",		NULL					},	//bind_ip_addr
 	{ kDontAllowMultipleValues,	"false",	NULL					},	//break_on_assert
 	{ kDontAllowMultipleValues,	"true",		NULL					},	//auto_restart
 	{ kDontAllowMultipleValues,	"1",		NULL					},	//total_bytes_update
 	{ kDontAllowMultipleValues,	"60",		NULL					},	//average_bandwidth_update
 	{ kDontAllowMultipleValues,	"600",		NULL					},	//safe_play_duration
-#ifdef __MacOSX__
-	{ kDontAllowMultipleValues,	"/Library/QuickTimeStreaming/Modules",	NULL	},	//module_folder
-#elif __Win32__
-	{ kDontAllowMultipleValues,	"c:\\Program Files\\Darwin Streaming Server\\QTSSModules",	NULL	},	//module_folder
-#else
-	{ kDontAllowMultipleValues,	"/usr/local/sbin/StreamingServerModules",	NULL	},	//module_folder
-#endif
+	{ kDontAllowMultipleValues,	DEFAULTPATHS_SSM_DIR,	NULL				},	//module_folder
 	{ kDontAllowMultipleValues,	"Error",	NULL					},	//error_logfile_name
-#ifdef __MacOSX__
-	{ kDontAllowMultipleValues,	"/Library/QuickTimeStreaming/Logs/",	NULL	},	//error_logfile_dir
-#elif __Win32__
-	{ kDontAllowMultipleValues,	"c:\\Program Files\\Darwin Streaming Server\\Logs",	NULL	},	//error_logfile_dir
-#else
-	{ kDontAllowMultipleValues,	"/var/streaming/logs",	NULL		},	//error_logfile_dir
-#endif
+	{ kDontAllowMultipleValues,	DEFAULTPATHS_LOG_DIR,	NULL				},	//error_logfile_dir
 	{ kDontAllowMultipleValues,	"0",		NULL					},	//error_logfile_interval
 	{ kDontAllowMultipleValues,	"256000",	NULL					},	//error_logfile_size
 	{ kDontAllowMultipleValues,	"2",		NULL					},	//error_logfile_verbosity
@@ -116,11 +100,7 @@
 	{ kDontAllowMultipleValues,	"10",		NULL					},	//sdp_file_delete_interval_seconds
 	{ kDontAllowMultipleValues,	"false",	NULL					},	//auto_start
 	{ kDontAllowMultipleValues,	"true",		NULL					},	//reliable_udp
-#ifdef __Win32__
-	{ kAllowMultipleValues,		"\\",			NULL					},	//reliable_udp_dirs (set all dirs)
-#else
-	{ kAllowMultipleValues,		"/",			NULL					},	//reliable_udp_dirs (set all dirs)
-#endif
+	{ kAllowMultipleValues,		DEFAULTPATHS_DIRECTORY_SEPARATOR,	NULL		},	//reliable_udp_dirs (set all dirs)
 	{ kDontAllowMultipleValues,	"false",	NULL					},	//reliable_udp_printfs
 	{ kDontAllowMultipleValues,	"2500",		NULL					},	//drop_all_packets_delay
 	{ kDontAllowMultipleValues,	"1500",		NULL					},	//thin_all_the_way_delay
Index: Server.tproj/main.cpp
===================================================================
RCS file: /cvs/Darwin/Services/StreamingServer/Server.tproj/main.cpp,v
retrieving revision 1.40
diff -u -d -b -w -r1.40 main.cpp
--- main.cpp	2001/10/23 03:35:40	1.40
+++ main.cpp	2001/11/29 12:39:23
@@ -33,6 +33,8 @@
 #include <stdlib.h>
 #include "getopt.h"
 
+#include "defaultPaths.h"
+
 #include <sys/time.h>
 #include <signal.h>
 #include <fcntl.h>
@@ -177,21 +179,8 @@
 	Bool16 dontFork = false;
 	Bool16 theXMLPrefsExist = true;
 	
-#ifdef __MACOS__
-	// On MacOS, grab config files out of current directory
-	static char* sDefaultConfigFilePath = "streamingserver.conf";
-	static char* sDefaultXMLFilePath = "streamingserver.xml";
-#elif __MacOSX__
-	// On MacOSX, grab files out of /Library/QuickTimeStreaming/Config
-    // Since earlier versions of QTSS installed the config file at /etc/streamingserver.conf 
-    // leave the default config file path in the old location
-	static char* sDefaultConfigFilePath = "/etc/streamingserver.conf";
-	static char* sDefaultXMLFilePath = "/Library/QuickTimeStreaming/Config/streamingserver.xml";
-#else
-	// Otherwise, grab files out of /etc
-	static char* sDefaultConfigFilePath = "/etc/streamingserver.conf";
-	static char* sDefaultXMLFilePath = "/etc/streaming/streamingserver.xml";
-#endif
+	static char* sDefaultConfigFilePath = DEFAULTPATHS_ETC_DIR_OLD "streamingserver.conf";
+	static char* sDefaultXMLFilePath = DEFAULTPATHS_ETC_DIR "streamingserver.xml";
 
 	char* theConfigFilePath = sDefaultConfigFilePath;
 	char* theXMLFilePath = sDefaultXMLFilePath;
@@ -214,11 +203,7 @@
 				
 				break;
 			case 'f':
-				#if __MacOSX__
-					theXMLFilePath  = "/Library/QuickTimeStreaming/Config/streamingserver.xml";
-				#else
-					theXMLFilePath  = "/etc/streaming/streamingserver.xml";
-				#endif
+				theXMLFilePath  = DEFAULTPATHS_ETC_DIR "streamingserver.xml";
 				break;
 			case 'p':
 				Assert(optarg != NULL);// this means we didn't declare getopt options correctly or there is a bug in getopt.
Index: StreamingProxy.tproj/proxy_unix.c
===================================================================
RCS file: /cvs/Darwin/Services/StreamingServer/StreamingProxy.tproj/proxy_unix.c,v
retrieving revision 1.14
diff -u -d -b -w -r1.14 proxy_unix.c
--- proxy_unix.c	2001/08/13 17:21:09	1.14
+++ proxy_unix.c	2001/11/29 12:39:30
@@ -55,11 +55,9 @@
 #include "pthread.h"
 #endif
 
-#if defined(__MacOSX__)
-  char *gConfigFilePath = "/Library/QuickTimeStreaming/Config/streamingproxy.conf";
-#else
-  char *gConfigFilePath = "/etc/streaming/streamingproxy.conf";
-#endif
+#include "defaultPaths.h"
+
+char *gConfigFilePath = DEFAULTPATHS_ETC_DIR "streamingproxy.conf";
 
 char *gOptionsString = "-c:-p:-d-v-h-s-x-i:";
 char gOptionsChar = '-';
Index: qtpasswd.tproj/QTSSPasswd.cpp
===================================================================
RCS file: /cvs/Darwin/Services/StreamingServer/qtpasswd.tproj/QTSSPasswd.cpp,v
retrieving revision 1.21
diff -u -d -b -w -r1.21 QTSSPasswd.cpp
--- QTSSPasswd.cpp	2001/11/19 22:02:30	1.21
+++ QTSSPasswd.cpp	2001/11/29 12:40:25
@@ -60,6 +60,7 @@
 #include "StrPtrLen.h"
 #include "md5digest.h"
 #include "md5.h"
+#include "defaultPaths.h"
 #include "revision.h"
 
 #ifdef __linux__
@@ -79,13 +80,7 @@
 #define MAX_LINE_LEN 5120
 #define MAX_PASSWORD_LEN 80
 
-#if __MacOSX__
-const char* kDefaultQTPasswdFilePath = "/Library/QuickTimeStreaming/Config/qtusers";
-#elif __Win32__
-const char* kDefaultQTPasswdFilePath = "C:\\Program Files\\Darwin Streaming Server\\qtusers";
-#else
-const char* kDefaultQTPasswdFilePath = "/etc/streaming/qtusers";
-#endif
+const char* kDefaultQTPasswdFilePath = DEFAULTPATHS_ETC_DIR "qtusers";
 
 
 const char* kDefaultRealmString = "Streaming Server";
