aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/GridConfig.cs
diff options
context:
space:
mode:
authorJeff Ames2007-10-31 01:21:04 +0000
committerJeff Ames2007-10-31 01:21:04 +0000
commit98b238cf6b75e9d26cf8f423decfbfd9df36b438 (patch)
tree553a190fec2f6e7492dd28129326929e3dbb3e15 /OpenSim/Framework/General/GridConfig.cs
parentTevarus' patch for object flags & implemented Phantom edits (diff)
downloadopensim-SC-98b238cf6b75e9d26cf8f423decfbfd9df36b438.zip
opensim-SC-98b238cf6b75e9d26cf8f423decfbfd9df36b438.tar.gz
opensim-SC-98b238cf6b75e9d26cf8f423decfbfd9df36b438.tar.bz2
opensim-SC-98b238cf6b75e9d26cf8f423decfbfd9df36b438.tar.xz
set svn:eol-style
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/General/GridConfig.cs270
1 files changed, 135 insertions, 135 deletions
diff --git a/OpenSim/Framework/General/GridConfig.cs b/OpenSim/Framework/General/GridConfig.cs
index 66d6c3a..021e6c5 100644
--- a/OpenSim/Framework/General/GridConfig.cs
+++ b/OpenSim/Framework/General/GridConfig.cs
@@ -1,136 +1,136 @@
1/* 1/*
2* Copyright (c) Contributors, http://opensimulator.org/ 2* Copyright (c) Contributors, http://opensimulator.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29namespace OpenSim.Framework 29namespace OpenSim.Framework
30{ 30{
31 public class GridConfig 31 public class GridConfig
32 { 32 {
33 public string GridOwner = ""; 33 public string GridOwner = "";
34 public string DefaultAssetServer = ""; 34 public string DefaultAssetServer = "";
35 public string AssetSendKey = ""; 35 public string AssetSendKey = "";
36 public string AssetRecvKey = ""; 36 public string AssetRecvKey = "";
37 37
38 public string DefaultUserServer = ""; 38 public string DefaultUserServer = "";
39 public string UserSendKey = ""; 39 public string UserSendKey = "";
40 public string UserRecvKey = ""; 40 public string UserRecvKey = "";
41 41
42 public string SimSendKey = ""; 42 public string SimSendKey = "";
43 public string SimRecvKey = ""; 43 public string SimRecvKey = "";
44 44
45 public string DatabaseProvider = ""; 45 public string DatabaseProvider = "";
46 46
47 public static uint DefaultHttpPort = 8001; 47 public static uint DefaultHttpPort = 8001;
48 public uint HttpPort = DefaultHttpPort; 48 public uint HttpPort = DefaultHttpPort;
49 49
50 private ConfigurationMember configMember; 50 private ConfigurationMember configMember;
51 51
52 public GridConfig(string description, string filename) 52 public GridConfig(string description, string filename)
53 { 53 {
54 configMember = 54 configMember =
55 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); 55 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
56 configMember.performConfigurationRetrieve(); 56 configMember.performConfigurationRetrieve();
57 } 57 }
58 58
59 public void loadConfigurationOptions() 59 public void loadConfigurationOptions()
60 { 60 {
61 configMember.addConfigurationOption("grid_owner", 61 configMember.addConfigurationOption("grid_owner",
62 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 62 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
63 "OGS Grid Owner", "OGS development team", false); 63 "OGS Grid Owner", "OGS development team", false);
64 configMember.addConfigurationOption("default_asset_server", 64 configMember.addConfigurationOption("default_asset_server",
65 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 65 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
66 "Default Asset Server URI", 66 "Default Asset Server URI",
67 "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/", 67 "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/",
68 false); 68 false);
69 configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 69 configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
70 "Key to send to asset server", "null", false); 70 "Key to send to asset server", "null", false);
71 configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 71 configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
72 "Key to expect from asset server", "null", false); 72 "Key to expect from asset server", "null", false);
73 73
74 configMember.addConfigurationOption("default_user_server", 74 configMember.addConfigurationOption("default_user_server",
75 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 75 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
76 "Default User Server URI", 76 "Default User Server URI",
77 "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false); 77 "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false);
78 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 78 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
79 "Key to send to user server", "null", false); 79 "Key to send to user server", "null", false);
80 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 80 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
81 "Key to expect from user server", "null", false); 81 "Key to expect from user server", "null", false);
82 82
83 configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 83 configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
84 "Key to send to a simulator", "null", false); 84 "Key to send to a simulator", "null", false);
85 configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 85 configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
86 "Key to expect from a simulator", "null", false); 86 "Key to expect from a simulator", "null", false);
87 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 87 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
88 "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); 88 "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
89 89
90 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 90 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
91 "Http Listener port", DefaultHttpPort.ToString(), false); 91 "Http Listener port", DefaultHttpPort.ToString(), false);
92 } 92 }
93 93
94 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 94 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
95 { 95 {
96 switch (configuration_key) 96 switch (configuration_key)
97 { 97 {
98 case "grid_owner": 98 case "grid_owner":
99 GridOwner = (string) configuration_result; 99 GridOwner = (string) configuration_result;
100 break; 100 break;
101 case "default_asset_server": 101 case "default_asset_server":
102 DefaultAssetServer = (string) configuration_result; 102 DefaultAssetServer = (string) configuration_result;
103 break; 103 break;
104 case "asset_send_key": 104 case "asset_send_key":
105 AssetSendKey = (string) configuration_result; 105 AssetSendKey = (string) configuration_result;
106 break; 106 break;
107 case "asset_recv_key": 107 case "asset_recv_key":
108 AssetRecvKey = (string) configuration_result; 108 AssetRecvKey = (string) configuration_result;
109 break; 109 break;
110 case "default_user_server": 110 case "default_user_server":
111 DefaultUserServer = (string) configuration_result; 111 DefaultUserServer = (string) configuration_result;
112 break; 112 break;
113 case "user_send_key": 113 case "user_send_key":
114 UserSendKey = (string) configuration_result; 114 UserSendKey = (string) configuration_result;
115 break; 115 break;
116 case "user_recv_key": 116 case "user_recv_key":
117 UserRecvKey = (string) configuration_result; 117 UserRecvKey = (string) configuration_result;
118 break; 118 break;
119 case "sim_send_key": 119 case "sim_send_key":
120 SimSendKey = (string) configuration_result; 120 SimSendKey = (string) configuration_result;
121 break; 121 break;
122 case "sim_recv_key": 122 case "sim_recv_key":
123 SimRecvKey = (string) configuration_result; 123 SimRecvKey = (string) configuration_result;
124 break; 124 break;
125 case "database_provider": 125 case "database_provider":
126 DatabaseProvider = (string) configuration_result; 126 DatabaseProvider = (string) configuration_result;
127 break; 127 break;
128 case "http_port": 128 case "http_port":
129 HttpPort = (uint) configuration_result; 129 HttpPort = (uint) configuration_result;
130 break; 130 break;
131 } 131 }
132 132
133 return true; 133 return true;
134 } 134 }
135 } 135 }
136} \ No newline at end of file 136} \ No newline at end of file