aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/GridConfig.cs
diff options
context:
space:
mode:
authorlbsa712009-04-17 05:52:46 +0000
committerlbsa712009-04-17 05:52:46 +0000
commitbbe1e196963fe8609a1070793b8439c293261d24 (patch)
tree32102a5e67d7e007d5efe473aef3d331f3697726 /OpenSim/Framework/GridConfig.cs
parent* Added some debug info if MXP is enabled. (diff)
downloadopensim-SC-bbe1e196963fe8609a1070793b8439c293261d24.zip
opensim-SC-bbe1e196963fe8609a1070793b8439c293261d24.tar.gz
opensim-SC-bbe1e196963fe8609a1070793b8439c293261d24.tar.bz2
opensim-SC-bbe1e196963fe8609a1070793b8439c293261d24.tar.xz
* Some more work on refactoring configs;
* Moved the constants out into a separate DefaultConfig * Pulled configMember up * Some minor CCC
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/GridConfig.cs41
1 files changed, 19 insertions, 22 deletions
diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs
index 640eeaa..679c84b 100644
--- a/OpenSim/Framework/GridConfig.cs
+++ b/OpenSim/Framework/GridConfig.cs
@@ -31,19 +31,16 @@ namespace OpenSim.Framework
31{ 31{
32 public class GridConfig:ConfigBase 32 public class GridConfig:ConfigBase
33 { 33 {
34 public static uint DefaultHttpPort = 8001;
35
36 public string AllowForcefulBanlines = "TRUE"; 34 public string AllowForcefulBanlines = "TRUE";
37 public bool AllowRegionRegistration = true; 35 public bool AllowRegionRegistration = true;
38 public string AssetRecvKey = String.Empty; 36 public string AssetRecvKey = String.Empty;
39 public string AssetSendKey = String.Empty; 37 public string AssetSendKey = String.Empty;
40 38
41 private ConfigurationMember configMember;
42 public string DatabaseProvider = String.Empty; 39 public string DatabaseProvider = String.Empty;
43 public string DatabaseConnect = String.Empty; 40 public string DatabaseConnect = String.Empty;
44 public string DefaultAssetServer = String.Empty; 41 public string DefaultAssetServer = String.Empty;
45 public string DefaultUserServer = String.Empty; 42 public string DefaultUserServer = String.Empty;
46 public uint HttpPort = DefaultHttpPort; 43 public uint HttpPort = DefaultSettings.DefaultGridServerHttpPort;
47 public string SimRecvKey = String.Empty; 44 public string SimRecvKey = String.Empty;
48 public string SimSendKey = String.Empty; 45 public string SimSendKey = String.Empty;
49 public string UserRecvKey = String.Empty; 46 public string UserRecvKey = String.Empty;
@@ -51,49 +48,49 @@ namespace OpenSim.Framework
51 48
52 public GridConfig(string description, string filename) 49 public GridConfig(string description, string filename)
53 { 50 {
54 configMember = 51 m_configMember =
55 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true); 52 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true);
56 configMember.performConfigurationRetrieve(); 53 m_configMember.performConfigurationRetrieve();
57 } 54 }
58 55
59 public void loadConfigurationOptions() 56 public void loadConfigurationOptions()
60 { 57 {
61 configMember.addConfigurationOption("default_asset_server", 58 m_configMember.addConfigurationOption("default_asset_server",
62 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 59 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
63 "Default Asset Server URI", 60 "Default Asset Server URI",
64 "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/", 61 "http://127.0.0.1:" + DefaultSettings.DefaultAssetServerHttpPort.ToString() + "/",
65 false); 62 false);
66 configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 63 m_configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
67 "Key to send to asset server", "null", false); 64 "Key to send to asset server", "null", false);
68 configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 65 m_configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
69 "Key to expect from asset server", "null", false); 66 "Key to expect from asset server", "null", false);
70 67
71 configMember.addConfigurationOption("default_user_server", 68 m_configMember.addConfigurationOption("default_user_server",
72 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 69 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
73 "Default User Server URI", 70 "Default User Server URI",
74 "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false); 71 "http://127.0.0.1:" + DefaultSettings.DefaultUserServerHttpPort.ToString() + "/", false);
75 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 72 m_configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
76 "Key to send to user server", "null", false); 73 "Key to send to user server", "null", false);
77 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 74 m_configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
78 "Key to expect from user server", "null", false); 75 "Key to expect from user server", "null", false);
79 76
80 configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 77 m_configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
81 "Key to send to a simulator", "null", false); 78 "Key to send to a simulator", "null", false);
82 configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 79 m_configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
83 "Key to expect from a simulator", "null", false); 80 "Key to expect from a simulator", "null", false);
84 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 81 m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
85 "DLL for database provider", "OpenSim.Data.MySQL.dll", false); 82 "DLL for database provider", "OpenSim.Data.MySQL.dll", false);
86 configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 83 m_configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
87 "Database connect string", "", false); 84 "Database connect string", "", false);
88 85
89 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 86 m_configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
90 "Http Listener port", DefaultHttpPort.ToString(), false); 87 "Http Listener port", DefaultSettings.DefaultGridServerHttpPort.ToString(), false);
91 88
92 configMember.addConfigurationOption("allow_forceful_banlines", 89 m_configMember.addConfigurationOption("allow_forceful_banlines",
93 ConfigurationOption.ConfigurationTypes.TYPE_STRING, 90 ConfigurationOption.ConfigurationTypes.TYPE_STRING,
94 "Allow Forceful Banlines", "TRUE", true); 91 "Allow Forceful Banlines", "TRUE", true);
95 92
96 configMember.addConfigurationOption("allow_region_registration", 93 m_configMember.addConfigurationOption("allow_region_registration",
97 ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, 94 ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
98 "Allow regions to register immediately upon grid server startup? true/false", 95 "Allow regions to register immediately upon grid server startup? true/false",
99 "True", 96 "True",