aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/Configuration/GridConfig.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/General/Configuration/GridConfig.cs')
-rw-r--r--OpenSim/Framework/General/Configuration/GridConfig.cs121
1 files changed, 0 insertions, 121 deletions
diff --git a/OpenSim/Framework/General/Configuration/GridConfig.cs b/OpenSim/Framework/General/Configuration/GridConfig.cs
deleted file mode 100644
index 9020404..0000000
--- a/OpenSim/Framework/General/Configuration/GridConfig.cs
+++ /dev/null
@@ -1,121 +0,0 @@
1/*
2* Copyright (c) Contributors, http://opensimulator.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Framework.Configuration
34{
35 public class GridConfig
36 {
37 public string GridOwner = "";
38 public string DefaultAssetServer = "";
39 public string AssetSendKey = "";
40 public string AssetRecvKey = "";
41
42 public string DefaultUserServer = "";
43 public string UserSendKey = "";
44 public string UserRecvKey = "";
45
46 public string SimSendKey = "";
47 public string SimRecvKey = "";
48
49 public string DatabaseProvider = "";
50
51 public static uint DefaultHttpPort = 8001;
52 public uint HttpPort = DefaultHttpPort;
53
54 private ConfigurationMember configMember;
55 public GridConfig(string description, string filename)
56 {
57 configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
58 configMember.performConfigurationRetrieve();
59 }
60
61 public void loadConfigurationOptions()
62 {
63 configMember.addConfigurationOption("grid_owner", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "OGS Grid Owner", "OGS development team", false);
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);
65 configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to asset server", "null", false);
66 configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from asset server", "null", false);
67
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);
69 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false);
70 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false);
71
72 configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to a simulator", "null", false);
73 configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from a simulator", "null", false);
74 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
75
76 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false);
77 }
78
79 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
80 {
81 switch (configuration_key)
82 {
83 case "grid_owner":
84 this.GridOwner = (string)configuration_result;
85 break;
86 case "default_asset_server":
87 this.DefaultAssetServer = (string)configuration_result;
88 break;
89 case "asset_send_key":
90 this.AssetSendKey = (string)configuration_result;
91 break;
92 case "asset_recv_key":
93 this.AssetRecvKey = (string)configuration_result;
94 break;
95 case "default_user_server":
96 this.DefaultUserServer = (string)configuration_result;
97 break;
98 case "user_send_key":
99 this.UserSendKey = (string)configuration_result;
100 break;
101 case "user_recv_key":
102 this.UserRecvKey = (string)configuration_result;
103 break;
104 case "sim_send_key":
105 this.SimSendKey = (string)configuration_result;
106 break;
107 case "sim_recv_key":
108 this.SimRecvKey = (string)configuration_result;
109 break;
110 case "database_provider":
111 this.DatabaseProvider = (string)configuration_result;
112 break;
113 case "http_port":
114 HttpPort = (uint)configuration_result;
115 break;
116 }
117
118 return true;
119 }
120 }
121}