diff options
author | Tleiades Hax | 2007-10-13 07:26:21 +0000 |
---|---|---|
committer | Tleiades Hax | 2007-10-13 07:26:21 +0000 |
commit | 1232eb1c587ffdc06c26a1c5b1b4fa5f22848754 (patch) | |
tree | 468fb8483a2cd03e472a6988ef60f1c8ff01c07e /OpenSim/Framework/General/Configuration | |
parent | Change 3 UserServer login messages from writeline to MainLog to help diagnose... (diff) | |
download | opensim-SC-1232eb1c587ffdc06c26a1c5b1b4fa5f22848754.zip opensim-SC-1232eb1c587ffdc06c26a1c5b1b4fa5f22848754.tar.gz opensim-SC-1232eb1c587ffdc06c26a1c5b1b4fa5f22848754.tar.bz2 opensim-SC-1232eb1c587ffdc06c26a1c5b1b4fa5f22848754.tar.xz |
Asset server implementation. Again one of these "plumbing" releases, where no real functionality has been introduced, but ground work has been made, enabling the asset server, and preparing the sim server to query the asset server.
Introduced an "IPlugin" interface, which plugins can inherit from.
Diffstat (limited to 'OpenSim/Framework/General/Configuration')
-rw-r--r-- | OpenSim/Framework/General/Configuration/AssetConfig.cs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/OpenSim/Framework/General/Configuration/AssetConfig.cs b/OpenSim/Framework/General/Configuration/AssetConfig.cs new file mode 100644 index 0000000..e5f1c88 --- /dev/null +++ b/OpenSim/Framework/General/Configuration/AssetConfig.cs | |||
@@ -0,0 +1,54 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Framework.Configuration | ||
6 | { | ||
7 | /// <summary> | ||
8 | /// UserConfig -- For User Server Configuration | ||
9 | /// </summary> | ||
10 | public class AssetConfig | ||
11 | { | ||
12 | public string DefaultStartupMsg = ""; | ||
13 | |||
14 | public string DatabaseProvider = ""; | ||
15 | |||
16 | public uint HttpPort = 8003; | ||
17 | |||
18 | private ConfigurationMember configMember; | ||
19 | |||
20 | public AssetConfig(string description, string filename) | ||
21 | { | ||
22 | configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); | ||
23 | configMember.performConfigurationRetrieve(); | ||
24 | } | ||
25 | |||
26 | public void loadConfigurationOptions() | ||
27 | { | ||
28 | configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); | ||
29 | |||
30 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); | ||
31 | |||
32 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", "8003", false); | ||
33 | |||
34 | } | ||
35 | |||
36 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | ||
37 | { | ||
38 | switch (configuration_key) | ||
39 | { | ||
40 | case "default_startup_message": | ||
41 | this.DefaultStartupMsg = (string)configuration_result; | ||
42 | break; | ||
43 | case "database_provider": | ||
44 | this.DatabaseProvider = (string)configuration_result; | ||
45 | break; | ||
46 | case "http_port": | ||
47 | HttpPort = (uint)configuration_result; | ||
48 | break; | ||
49 | } | ||
50 | |||
51 | return true; | ||
52 | } | ||
53 | } | ||
54 | } | ||