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.cs78
1 files changed, 78 insertions, 0 deletions
diff --git a/OpenSim/Framework/General/Configuration/GridConfig.cs b/OpenSim/Framework/General/Configuration/GridConfig.cs
new file mode 100644
index 0000000..97dd699
--- /dev/null
+++ b/OpenSim/Framework/General/Configuration/GridConfig.cs
@@ -0,0 +1,78 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Configuration
6{
7 public class GridConfig
8 {
9 public string GridOwner = "";
10 public string DefaultAssetServer = "";
11 public string AssetSendKey = "";
12 public string AssetRecvKey = "";
13
14 public string DefaultUserServer = "";
15 public string UserSendKey = "";
16 public string UserRecvKey = "";
17
18 public string SimSendKey = "";
19 public string SimRecvKey = "";
20
21 private ConfigurationMember configMember;
22 public GridConfig(string description, string filename)
23 {
24 configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
25 configMember.performConfigurationRetrieve();
26 }
27
28 public void loadConfigurationOptions()
29 {
30 configMember.addConfigurationOption("grid_owner",ConfigurationOption.ConfigurationTypes.TYPE_STRING,"OGS Grid Owner","OGS development team");
31 configMember.addConfigurationOption("default_asset_server",ConfigurationOption.ConfigurationTypes.TYPE_STRING,"Default Asset Server URI","http://127.0.0.1:8003/");
32 configMember.addConfigurationOption("asset_send_key",ConfigurationOption.ConfigurationTypes.TYPE_STRING,"Key to send to asset server","null");
33 configMember.addConfigurationOption("asset_recv_key",ConfigurationOption.ConfigurationTypes.TYPE_STRING,"Key to expect from asset server","null");
34
35 configMember.addConfigurationOption("default_user_server",ConfigurationOption.ConfigurationTypes.TYPE_STRING,"Default User Server URI","http://127.0.0.1:8002/");
36 configMember.addConfigurationOption("user_send_key",ConfigurationOption.ConfigurationTypes.TYPE_STRING,"Key to send to user server","null");
37 configMember.addConfigurationOption("user_recv_key",ConfigurationOption.ConfigurationTypes.TYPE_STRING,"Key to expect from user server","null");
38
39 configMember.addConfigurationOption("sim_send_key",ConfigurationOption.ConfigurationTypes.TYPE_STRING,"Key to send to a simulator","null");
40 configMember.addConfigurationOption("sim_recv_key",ConfigurationOption.ConfigurationTypes.TYPE_STRING,"Key to expect from a simulator","null");
41
42 }
43
44 public void handleIncomingConfiguration(string configuration_key, object configuration_result)
45 {
46 switch (configuration_key)
47 {
48 case "grid_owner":
49 this.GridOwner = (string)configuration_result;
50 break;
51 case "default_asset_server":
52 this.DefaultAssetServer = (string)configuration_result;
53 break;
54 case "asset_send_key":
55 this.AssetSendKey = (string)configuration_result;
56 break;
57 case "asset_recv_key":
58 this.AssetRecvKey = (string)configuration_result;
59 break;
60 case "default_user_server":
61 this.DefaultUserServer = (string)configuration_result;
62 break;
63 case "user_send_key":
64 this.UserSendKey = (string)configuration_result;
65 break;
66 case "user_recv_key":
67 this.UserRecvKey = (string)configuration_result;
68 break;
69 case "sim_send_key":
70 this.SimSendKey = (string)configuration_result;
71 break;
72 case "sim_recv_key":
73 this.SimRecvKey = (string)configuration_result;
74 break;
75 }
76 }
77 }
78}