aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/InventoryConfig.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/General/InventoryConfig.cs')
-rw-r--r--OpenSim/Framework/General/InventoryConfig.cs134
1 files changed, 67 insertions, 67 deletions
diff --git a/OpenSim/Framework/General/InventoryConfig.cs b/OpenSim/Framework/General/InventoryConfig.cs
index 9ba3e07..8e64b68 100644
--- a/OpenSim/Framework/General/InventoryConfig.cs
+++ b/OpenSim/Framework/General/InventoryConfig.cs
@@ -1,67 +1,67 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Framework 5namespace OpenSim.Framework
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 InventoryConfig 10 public class InventoryConfig
11 { 11 {
12 public string DefaultStartupMsg = ""; 12 public string DefaultStartupMsg = "";
13 public string UserServerURL = ""; 13 public string UserServerURL = "";
14 public string UserSendKey = ""; 14 public string UserSendKey = "";
15 public string UserRecvKey = ""; 15 public string UserRecvKey = "";
16 16
17 public string DatabaseProvider = ""; 17 public string DatabaseProvider = "";
18 public static uint DefaultHttpPort = 8004; 18 public static uint DefaultHttpPort = 8004;
19 19
20 public int HttpPort = 8004; 20 public int HttpPort = 8004;
21 21
22 private ConfigurationMember configMember; 22 private ConfigurationMember configMember;
23 23
24 public InventoryConfig(string description, string filename) 24 public InventoryConfig(string description, string filename)
25 { 25 {
26 configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); 26 configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
27 configMember.performConfigurationRetrieve(); 27 configMember.performConfigurationRetrieve();
28 } 28 }
29 29
30 public void loadConfigurationOptions() 30 public void loadConfigurationOptions()
31 { 31 {
32 configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); 32 configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false);
33 configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString(), false); 33 configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString(), false);
34 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false); 34 configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false);
35 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false); 35 configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false);
36 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); 36 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
37 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Http Listener port", DefaultHttpPort.ToString(), false); 37 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Http Listener port", DefaultHttpPort.ToString(), false);
38 } 38 }
39 39
40 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 40 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
41 { 41 {
42 switch (configuration_key) 42 switch (configuration_key)
43 { 43 {
44 case "default_startup_message": 44 case "default_startup_message":
45 this.DefaultStartupMsg = (string)configuration_result; 45 this.DefaultStartupMsg = (string)configuration_result;
46 break; 46 break;
47 case "default_user_server": 47 case "default_user_server":
48 this.UserServerURL = (string)configuration_result; 48 this.UserServerURL = (string)configuration_result;
49 break; 49 break;
50 case "user_send_key": 50 case "user_send_key":
51 this.UserSendKey = (string)configuration_result; 51 this.UserSendKey = (string)configuration_result;
52 break; 52 break;
53 case "user_recv_key": 53 case "user_recv_key":
54 this.UserRecvKey = (string)configuration_result; 54 this.UserRecvKey = (string)configuration_result;
55 break; 55 break;
56 case "database_provider": 56 case "database_provider":
57 this.DatabaseProvider = (string)configuration_result; 57 this.DatabaseProvider = (string)configuration_result;
58 break; 58 break;
59 case "http_port": 59 case "http_port":
60 HttpPort = (int)configuration_result; 60 HttpPort = (int)configuration_result;
61 break; 61 break;
62 } 62 }
63 63
64 return true; 64 return true;
65 } 65 }
66 } 66 }
67} 67}