diff options
author | Sean Dague | 2007-07-30 20:11:40 +0000 |
---|---|---|
committer | Sean Dague | 2007-07-30 20:11:40 +0000 |
commit | 74bb5282a09ec095a7ff810c62f79cc64e187686 (patch) | |
tree | e0a9b703bfcbbab59b04351dd71508fa913e741a /OpenSim/Framework/General/Configuration/UserConfig.cs | |
parent | added OnDisconnectUser event to required classes (diff) | |
download | opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.zip opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.tar.gz opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.tar.bz2 opensim-SC-74bb5282a09ec095a7ff810c62f79cc64e187686.tar.xz |
mass update of files to have native line endings
Diffstat (limited to 'OpenSim/Framework/General/Configuration/UserConfig.cs')
-rw-r--r-- | OpenSim/Framework/General/Configuration/UserConfig.cs | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/OpenSim/Framework/General/Configuration/UserConfig.cs b/OpenSim/Framework/General/Configuration/UserConfig.cs index 2183491..177506f 100644 --- a/OpenSim/Framework/General/Configuration/UserConfig.cs +++ b/OpenSim/Framework/General/Configuration/UserConfig.cs | |||
@@ -1,62 +1,62 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | 4 | ||
5 | namespace OpenSim.Framework.Configuration | 5 | namespace OpenSim.Framework.Configuration |
6 | { | 6 | { |
7 | /// <summary> | 7 | /// <summary> |
8 | /// UserConfig -- For User Server Configuration | 8 | /// UserConfig -- For User Server Configuration |
9 | /// </summary> | 9 | /// </summary> |
10 | public class UserConfig | 10 | public class UserConfig |
11 | { | 11 | { |
12 | public string DefaultStartupMsg = ""; | 12 | public string DefaultStartupMsg = ""; |
13 | public string GridServerURL = ""; | 13 | public string GridServerURL = ""; |
14 | public string GridSendKey = ""; | 14 | public string GridSendKey = ""; |
15 | public string GridRecvKey = ""; | 15 | public string GridRecvKey = ""; |
16 | 16 | ||
17 | public string DatabaseProvider = ""; | 17 | public string DatabaseProvider = ""; |
18 | 18 | ||
19 | private ConfigurationMember configMember; | 19 | private ConfigurationMember configMember; |
20 | 20 | ||
21 | public UserConfig(string description, string filename) | 21 | public UserConfig(string description, string filename) |
22 | { | 22 | { |
23 | configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); | 23 | configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); |
24 | configMember.performConfigurationRetrieve(); | 24 | configMember.performConfigurationRetrieve(); |
25 | } | 25 | } |
26 | 26 | ||
27 | public void loadConfigurationOptions() | 27 | public void loadConfigurationOptions() |
28 | { | 28 | { |
29 | configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS",false); | 29 | configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS",false); |
30 | 30 | ||
31 | configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:8001/", false); | 31 | configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:8001/", false); |
32 | configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false); | 32 | configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false); |
33 | configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false); | 33 | configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false); |
34 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); | 34 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); |
35 | 35 | ||
36 | } | 36 | } |
37 | 37 | ||
38 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 38 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
39 | { | 39 | { |
40 | switch (configuration_key) | 40 | switch (configuration_key) |
41 | { | 41 | { |
42 | case "default_startup_message": | 42 | case "default_startup_message": |
43 | this.DefaultStartupMsg = (string)configuration_result; | 43 | this.DefaultStartupMsg = (string)configuration_result; |
44 | break; | 44 | break; |
45 | case "default_grid_server": | 45 | case "default_grid_server": |
46 | this.GridServerURL = (string)configuration_result; | 46 | this.GridServerURL = (string)configuration_result; |
47 | break; | 47 | break; |
48 | case "grid_send_key": | 48 | case "grid_send_key": |
49 | this.GridSendKey = (string)configuration_result; | 49 | this.GridSendKey = (string)configuration_result; |
50 | break; | 50 | break; |
51 | case "grid_recv_key": | 51 | case "grid_recv_key": |
52 | this.GridRecvKey = (string)configuration_result; | 52 | this.GridRecvKey = (string)configuration_result; |
53 | break; | 53 | break; |
54 | case "database_provider": | 54 | case "database_provider": |
55 | this.DatabaseProvider = (string)configuration_result; | 55 | this.DatabaseProvider = (string)configuration_result; |
56 | break; | 56 | break; |
57 | } | 57 | } |
58 | 58 | ||
59 | return true; | 59 | return true; |
60 | } | 60 | } |
61 | } | 61 | } |
62 | } | 62 | } |