aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/GridConfig.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/General/GridConfig.cs
parent* Deleted .user file (diff)
downloadopensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/General/GridConfig.cs73
1 files changed, 44 insertions, 29 deletions
diff --git a/OpenSim/Framework/General/GridConfig.cs b/OpenSim/Framework/General/GridConfig.cs
index 64ce3b1..66d6c3a 100644
--- a/OpenSim/Framework/General/GridConfig.cs
+++ b/OpenSim/Framework/General/GridConfig.cs
@@ -26,10 +26,6 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Framework 29namespace OpenSim.Framework
34{ 30{
35 public class GridConfig 31 public class GridConfig
@@ -50,30 +46,49 @@ namespace OpenSim.Framework
50 46
51 public static uint DefaultHttpPort = 8001; 47 public static uint DefaultHttpPort = 8001;
52 public uint HttpPort = DefaultHttpPort; 48 public uint HttpPort = DefaultHttpPort;
53 49
54 private ConfigurationMember configMember; 50 private ConfigurationMember configMember;
51
55 public GridConfig(string description, string filename) 52 public GridConfig(string description, string filename)
56 { 53 {
57 configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); 54 configMember =
55 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
58 configMember.performConfigurationRetrieve(); 56 configMember.performConfigurationRetrieve();
59 } 57 }
60 58
61 public void loadConfigurationOptions() 59 public void loadConfigurationOptions()
62 { 60 {
63 configMember.addConfigurationOption("grid_owner", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "OGS Grid Owner", "OGS development team", false); 61 configMember.addConfigurationOption("grid_owner",
64 configMember.addConfigurationOption("default_asset_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Asset Server URI", "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/", false); 62 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
65 configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to asset server", "null", false); 63 "OGS Grid Owner", "OGS development team", false);
66 configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from asset server", "null", false); 64 configMember.addConfigurationOption("default_asset_server",
65 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
66 "Default Asset Server URI",
67 "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/",
68 false);
69 configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
70 "Key to send to asset server", "null", false);
71 configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
72 "Key to expect from asset server", "null", false);
67 73
68 configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false); 74 configMember.addConfigurationOption("default_user_server",
69 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false); 75 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
70 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false); 76 "Default User Server URI",
77 "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false);
78 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
79 "Key to send to user server", "null", false);
80 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
81 "Key to expect from user server", "null", false);
71 82
72 configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to a simulator", "null", false); 83 configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
73 configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from a simulator", "null", false); 84 "Key to send to a simulator", "null", false);
74 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); 85 configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
86 "Key to expect from a simulator", "null", false);
87 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
88 "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
75 89
76 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false); 90 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
91 "Http Listener port", DefaultHttpPort.ToString(), false);
77 } 92 }
78 93
79 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 94 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
@@ -81,41 +96,41 @@ namespace OpenSim.Framework
81 switch (configuration_key) 96 switch (configuration_key)
82 { 97 {
83 case "grid_owner": 98 case "grid_owner":
84 this.GridOwner = (string)configuration_result; 99 GridOwner = (string) configuration_result;
85 break; 100 break;
86 case "default_asset_server": 101 case "default_asset_server":
87 this.DefaultAssetServer = (string)configuration_result; 102 DefaultAssetServer = (string) configuration_result;
88 break; 103 break;
89 case "asset_send_key": 104 case "asset_send_key":
90 this.AssetSendKey = (string)configuration_result; 105 AssetSendKey = (string) configuration_result;
91 break; 106 break;
92 case "asset_recv_key": 107 case "asset_recv_key":
93 this.AssetRecvKey = (string)configuration_result; 108 AssetRecvKey = (string) configuration_result;
94 break; 109 break;
95 case "default_user_server": 110 case "default_user_server":
96 this.DefaultUserServer = (string)configuration_result; 111 DefaultUserServer = (string) configuration_result;
97 break; 112 break;
98 case "user_send_key": 113 case "user_send_key":
99 this.UserSendKey = (string)configuration_result; 114 UserSendKey = (string) configuration_result;
100 break; 115 break;
101 case "user_recv_key": 116 case "user_recv_key":
102 this.UserRecvKey = (string)configuration_result; 117 UserRecvKey = (string) configuration_result;
103 break; 118 break;
104 case "sim_send_key": 119 case "sim_send_key":
105 this.SimSendKey = (string)configuration_result; 120 SimSendKey = (string) configuration_result;
106 break; 121 break;
107 case "sim_recv_key": 122 case "sim_recv_key":
108 this.SimRecvKey = (string)configuration_result; 123 SimRecvKey = (string) configuration_result;
109 break; 124 break;
110 case "database_provider": 125 case "database_provider":
111 this.DatabaseProvider = (string)configuration_result; 126 DatabaseProvider = (string) configuration_result;
112 break; 127 break;
113 case "http_port": 128 case "http_port":
114 HttpPort = (uint)configuration_result; 129 HttpPort = (uint) configuration_result;
115 break; 130 break;
116 } 131 }
117 132
118 return true; 133 return true;
119 } 134 }
120 } 135 }
121} 136} \ No newline at end of file