diff options
author | lbsa71 | 2009-04-17 05:52:46 +0000 |
---|---|---|
committer | lbsa71 | 2009-04-17 05:52:46 +0000 |
commit | bbe1e196963fe8609a1070793b8439c293261d24 (patch) | |
tree | 32102a5e67d7e007d5efe473aef3d331f3697726 /OpenSim/Framework/UserConfig.cs | |
parent | * Added some debug info if MXP is enabled. (diff) | |
download | opensim-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/UserConfig.cs | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs index 49668af..b898f89 100644 --- a/OpenSim/Framework/UserConfig.cs +++ b/OpenSim/Framework/UserConfig.cs | |||
@@ -35,9 +35,6 @@ namespace OpenSim.Framework | |||
35 | /// </summary> | 35 | /// </summary> |
36 | public class UserConfig:ConfigBase | 36 | public class UserConfig:ConfigBase |
37 | { | 37 | { |
38 | public static uint DefaultHttpPort = 8002; | ||
39 | public static bool DefaultHttpSSL = false; | ||
40 | private ConfigurationMember configMember; | ||
41 | public string DatabaseProvider = String.Empty; | 38 | public string DatabaseProvider = String.Empty; |
42 | public string DatabaseConnect = String.Empty; | 39 | public string DatabaseConnect = String.Empty; |
43 | public string DefaultStartupMsg = String.Empty; | 40 | public string DefaultStartupMsg = String.Empty; |
@@ -45,8 +42,8 @@ namespace OpenSim.Framework | |||
45 | public uint DefaultY = 1000; | 42 | public uint DefaultY = 1000; |
46 | public string GridRecvKey = String.Empty; | 43 | public string GridRecvKey = String.Empty; |
47 | public string GridSendKey = String.Empty; | 44 | public string GridSendKey = String.Empty; |
48 | public uint HttpPort = DefaultHttpPort; | 45 | public uint HttpPort = DefaultSettings.DefaultUserServerHttpPort; |
49 | public bool HttpSSL = DefaultHttpSSL; | 46 | public bool HttpSSL = DefaultSettings.DefaultUserServerHttpSSL; |
50 | public uint DefaultUserLevel = 0; | 47 | public uint DefaultUserLevel = 0; |
51 | public string LibraryXmlfile = ""; | 48 | public string LibraryXmlfile = ""; |
52 | 49 | ||
@@ -101,61 +98,61 @@ namespace OpenSim.Framework | |||
101 | } | 98 | } |
102 | public UserConfig(string description, string filename) | 99 | public UserConfig(string description, string filename) |
103 | { | 100 | { |
104 | configMember = | 101 | m_configMember = |
105 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true); | 102 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true); |
106 | configMember.performConfigurationRetrieve(); | 103 | m_configMember.performConfigurationRetrieve(); |
107 | } | 104 | } |
108 | 105 | ||
109 | public void loadConfigurationOptions() | 106 | public void loadConfigurationOptions() |
110 | { | 107 | { |
111 | configMember.addConfigurationOption("default_startup_message", | 108 | m_configMember.addConfigurationOption("default_startup_message", |
112 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 109 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
113 | "Default Startup Message", "Welcome to OGS", false); | 110 | "Default Startup Message", "Welcome to OGS", false); |
114 | 111 | ||
115 | configMember.addConfigurationOption("default_grid_server", | 112 | m_configMember.addConfigurationOption("default_grid_server", |
116 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 113 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
117 | "Default Grid Server URI", | 114 | "Default Grid Server URI", |
118 | "http://127.0.0.1:" + GridConfig.DefaultHttpPort + "/", false); | 115 | "http://127.0.0.1:" + DefaultSettings.DefaultGridServerHttpPort + "/", false); |
119 | configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 116 | m_configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
120 | "Key to send to grid server", "null", false); | 117 | "Key to send to grid server", "null", false); |
121 | configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 118 | m_configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
122 | "Key to expect from grid server", "null", false); | 119 | "Key to expect from grid server", "null", false); |
123 | 120 | ||
124 | configMember.addConfigurationOption("default_inventory_server", | 121 | m_configMember.addConfigurationOption("default_inventory_server", |
125 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 122 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
126 | "Default Inventory Server URI", | 123 | "Default Inventory Server URI", |
127 | "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort + "/", | 124 | "http://127.0.0.1:" + DefaultSettings.DefaultInventoryServerHttpPort + "/", |
128 | false); | 125 | false); |
129 | configMember.addConfigurationOption("default_authentication_server", | 126 | m_configMember.addConfigurationOption("default_authentication_server", |
130 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 127 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
131 | "User Server (this) External URI for authentication keys", | 128 | "User Server (this) External URI for authentication keys", |
132 | "http://localhost:" + UserConfig.DefaultHttpPort + "/", | 129 | "http://localhost:" + DefaultSettings.DefaultUserServerHttpPort + "/", |
133 | false); | 130 | false); |
134 | configMember.addConfigurationOption("library_location", | 131 | m_configMember.addConfigurationOption("library_location", |
135 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 132 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
136 | "Path to library control file", | 133 | "Path to library control file", |
137 | string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar), false); | 134 | string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar), false); |
138 | 135 | ||
139 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 136 | m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
140 | "DLL for database provider", "OpenSim.Data.MySQL.dll", false); | 137 | "DLL for database provider", "OpenSim.Data.MySQL.dll", false); |
141 | configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 138 | m_configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
142 | "Connection String for Database", "", false); | 139 | "Connection String for Database", "", false); |
143 | 140 | ||
144 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 141 | m_configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
145 | "Http Listener port", DefaultHttpPort.ToString(), false); | 142 | "Http Listener port", DefaultSettings.DefaultUserServerHttpPort.ToString(), false); |
146 | configMember.addConfigurationOption("http_ssl", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, | 143 | m_configMember.addConfigurationOption("http_ssl", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, |
147 | "Use SSL? true/false", DefaultHttpSSL.ToString(), false); | 144 | "Use SSL? true/false", DefaultSettings.DefaultUserServerHttpSSL.ToString(), false); |
148 | configMember.addConfigurationOption("default_X", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 145 | m_configMember.addConfigurationOption("default_X", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
149 | "Known good region X", "1000", false); | 146 | "Known good region X", "1000", false); |
150 | configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 147 | m_configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
151 | "Known good region Y", "1000", false); | 148 | "Known good region Y", "1000", false); |
152 | configMember.addConfigurationOption("enable_llsd_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, | 149 | m_configMember.addConfigurationOption("enable_llsd_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, |
153 | "Enable LLSD login support [Currently used by libsl based clients/bots]? true/false", true.ToString(), false); | 150 | "Enable LLSD login support [Currently used by libsl based clients/bots]? true/false", true.ToString(), false); |
154 | 151 | ||
155 | configMember.addConfigurationOption("enable_hg_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, | 152 | m_configMember.addConfigurationOption("enable_hg_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, |
156 | "Enable Hypergrid login support [Currently used by GridSurfer-proxied clients]? true/false", true.ToString(), false); | 153 | "Enable Hypergrid login support [Currently used by GridSurfer-proxied clients]? true/false", true.ToString(), false); |
157 | 154 | ||
158 | configMember.addConfigurationOption("default_loginLevel", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 155 | m_configMember.addConfigurationOption("default_loginLevel", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
159 | "Minimum Level a user should have to login [0 default]", "0", false); | 156 | "Minimum Level a user should have to login [0 default]", "0", false); |
160 | 157 | ||
161 | } | 158 | } |