diff options
author | mingchen | 2007-07-23 19:30:33 +0000 |
---|---|---|
committer | mingchen | 2007-07-23 19:30:33 +0000 |
commit | 87bddd32dfdb6ab43ef21703053935d3cda69c51 (patch) | |
tree | 70d1beaf870770d9180756ae74bd77d3376ec9fb /OpenSim/Framework/General/Configuration | |
parent | Applied makomk 's patch from issue #219. (diff) | |
download | opensim-SC_OLD-87bddd32dfdb6ab43ef21703053935d3cda69c51.zip opensim-SC_OLD-87bddd32dfdb6ab43ef21703053935d3cda69c51.tar.gz opensim-SC_OLD-87bddd32dfdb6ab43ef21703053935d3cda69c51.tar.bz2 opensim-SC_OLD-87bddd32dfdb6ab43ef21703053935d3cda69c51.tar.xz |
*Added configuration plugin (OpenSim.Framework.Configuration.HTTP.dll) that fetches a file from a remote server
*Right now, values are not saved back to the remote server, but that will be changed
*Removed some warnings from invalid references that were not used anyways
Diffstat (limited to 'OpenSim/Framework/General/Configuration')
-rw-r--r-- | OpenSim/Framework/General/Configuration/ConfigurationMember.cs | 8 | ||||
-rw-r--r-- | OpenSim/Framework/General/Configuration/Interfaces/IGenericConfig.cs | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Framework/General/Configuration/ConfigurationMember.cs b/OpenSim/Framework/General/Configuration/ConfigurationMember.cs index 4a6e0cc..b8dfc0c 100644 --- a/OpenSim/Framework/General/Configuration/ConfigurationMember.cs +++ b/OpenSim/Framework/General/Configuration/ConfigurationMember.cs | |||
@@ -25,13 +25,16 @@ namespace OpenSim.Framework.Configuration | |||
25 | private ConfigurationOptionResult resultFunction; | 25 | private ConfigurationOptionResult resultFunction; |
26 | 26 | ||
27 | private IGenericConfig configurationPlugin = null; | 27 | private IGenericConfig configurationPlugin = null; |
28 | /// <summary> | ||
29 | /// This is the default configuration DLL loaded | ||
30 | /// </summary> | ||
31 | private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; | ||
28 | public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) | 32 | public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) |
29 | { | 33 | { |
30 | this.configurationFilename = configuration_filename; | 34 | this.configurationFilename = configuration_filename; |
31 | this.configurationDescription = configuration_description; | 35 | this.configurationDescription = configuration_description; |
32 | this.loadFunction = load_function; | 36 | this.loadFunction = load_function; |
33 | this.resultFunction = result_function; | 37 | this.resultFunction = result_function; |
34 | this.configurationPlugin = this.LoadConfigDll("OpenSim.Framework.Configuration.XML.dll"); | ||
35 | } | 38 | } |
36 | 39 | ||
37 | public void setConfigurationFilename(string filename) | 40 | public void setConfigurationFilename(string filename) |
@@ -50,7 +53,7 @@ namespace OpenSim.Framework.Configuration | |||
50 | 53 | ||
51 | public void forceConfigurationPluginLibrary(string dll_filename) | 54 | public void forceConfigurationPluginLibrary(string dll_filename) |
52 | { | 55 | { |
53 | configurationPlugin = this.LoadConfigDll(dll_filename); | 56 | configurationPluginFilename = dll_filename; |
54 | } | 57 | } |
55 | public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt) | 58 | public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt) |
56 | { | 59 | { |
@@ -76,6 +79,7 @@ namespace OpenSim.Framework.Configuration | |||
76 | 79 | ||
77 | public void performConfigurationRetrieve() | 80 | public void performConfigurationRetrieve() |
78 | { | 81 | { |
82 | configurationPlugin = this.LoadConfigDll(configurationPluginFilename); | ||
79 | configurationOptions.Clear(); | 83 | configurationOptions.Clear(); |
80 | if(loadFunction == null) | 84 | if(loadFunction == null) |
81 | { | 85 | { |
diff --git a/OpenSim/Framework/General/Configuration/Interfaces/IGenericConfig.cs b/OpenSim/Framework/General/Configuration/Interfaces/IGenericConfig.cs index 5a5a20e..ceccd04 100644 --- a/OpenSim/Framework/General/Configuration/Interfaces/IGenericConfig.cs +++ b/OpenSim/Framework/General/Configuration/Interfaces/IGenericConfig.cs | |||
@@ -31,6 +31,7 @@ namespace OpenSim.Framework.Configuration.Interfaces | |||
31 | { | 31 | { |
32 | void SetFileName(string fileName); | 32 | void SetFileName(string fileName); |
33 | void LoadData(); | 33 | void LoadData(); |
34 | void LoadDataFromString(string data); | ||
34 | string GetAttribute(string attributeName); | 35 | string GetAttribute(string attributeName); |
35 | bool SetAttribute(string attributeName, string attributeValue); | 36 | bool SetAttribute(string attributeName, string attributeValue); |
36 | void Commit(); | 37 | void Commit(); |