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/AssetConfig.cs | |
parent | * Added some debug info if MXP is enabled. (diff) | |
download | opensim-SC_OLD-bbe1e196963fe8609a1070793b8439c293261d24.zip opensim-SC_OLD-bbe1e196963fe8609a1070793b8439c293261d24.tar.gz opensim-SC_OLD-bbe1e196963fe8609a1070793b8439c293261d24.tar.bz2 opensim-SC_OLD-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 'OpenSim/Framework/AssetConfig.cs')
-rw-r--r-- | OpenSim/Framework/AssetConfig.cs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/OpenSim/Framework/AssetConfig.cs b/OpenSim/Framework/AssetConfig.cs index 804a270..f9e6954 100644 --- a/OpenSim/Framework/AssetConfig.cs +++ b/OpenSim/Framework/AssetConfig.cs | |||
@@ -35,33 +35,30 @@ namespace OpenSim.Framework | |||
35 | /// </summary> | 35 | /// </summary> |
36 | public class AssetConfig:ConfigBase | 36 | public class AssetConfig:ConfigBase |
37 | { | 37 | { |
38 | public const uint DefaultHttpPort = 8003; | ||
39 | |||
40 | private ConfigurationMember configMember; | ||
41 | public string DatabaseConnect = String.Empty; | 38 | public string DatabaseConnect = String.Empty; |
42 | public string DatabaseProvider = String.Empty; | 39 | public string DatabaseProvider = String.Empty; |
43 | public uint HttpPort = DefaultHttpPort; | 40 | public uint HttpPort = DefaultSettings.DefaultAssetServerHttpPort; |
44 | public string AssetSetsLocation = string.Empty; | 41 | public string AssetSetsLocation = string.Empty; |
45 | 42 | ||
46 | public AssetConfig(string description, string filename) | 43 | public AssetConfig(string description, string filename) |
47 | { | 44 | { |
48 | configMember = | 45 | m_configMember = |
49 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true); | 46 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true); |
50 | configMember.performConfigurationRetrieve(); | 47 | m_configMember.performConfigurationRetrieve(); |
51 | } | 48 | } |
52 | 49 | ||
53 | public void loadConfigurationOptions() | 50 | public void loadConfigurationOptions() |
54 | { | 51 | { |
55 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 52 | m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
56 | "DLL for database provider", "OpenSim.Data.MySQL.dll", false); | 53 | "DLL for database provider", "OpenSim.Data.MySQL.dll", false); |
57 | 54 | ||
58 | configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 55 | m_configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
59 | "Database connection string", "", false); | 56 | "Database connection string", "", false); |
60 | 57 | ||
61 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 58 | m_configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
62 | "Http Listener port", DefaultHttpPort.ToString(), false); | 59 | "Http Listener port", DefaultSettings.DefaultAssetServerHttpPort.ToString(), false); |
63 | 60 | ||
64 | configMember.addConfigurationOption("assetset_location", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 61 | m_configMember.addConfigurationOption("assetset_location", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
65 | "Location of 'AssetSets.xml'", | 62 | "Location of 'AssetSets.xml'", |
66 | string.Format(".{0}assets{0}AssetSets.xml", Path.DirectorySeparatorChar), false); | 63 | string.Format(".{0}assets{0}AssetSets.xml", Path.DirectorySeparatorChar), false); |
67 | } | 64 | } |