From 6a8d8f54e88a21e6cfd78dc7981cdeec2f18094d Mon Sep 17 00:00:00 2001 From: Tleiades Hax Date: Tue, 30 Oct 2007 22:42:34 +0000 Subject: Step one on the long march towards grid based inventory. Introduction of an InevntoryServer --- OpenSim/Region/Application/OpenSimMain.cs | 3 ++- .../ClientStack/ClientView.ProcessPackets.cs | 2 +- .../Communications/OGS1/CommunicationsOGS1.cs | 4 ++-- .../Communications/OGS1/OGS1InventoryService.cs | 24 +++++++++++++++++++--- OpenSim/Region/Environment/Modules/ChatModule.cs | 2 +- .../Region/Environment/Modules/WorldCommModule.cs | 2 +- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 +- 7 files changed, 29 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 7245482..6be067f 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -175,6 +175,7 @@ namespace OpenSim config.Set("user_send_key", "null"); config.Set("user_recv_key", "null"); config.Set("asset_server_url", "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString()); + config.Set("inventory_server_url", "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString()); } } @@ -774,4 +775,4 @@ namespace OpenSim #endregion } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 7d1780c..89e5465 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs @@ -770,4 +770,4 @@ namespace OpenSim.Region.ClientStack OutPacket(logReply); } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 941cc30..1281a44 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs @@ -42,8 +42,8 @@ namespace OpenSim.Region.Communications.OGS1 m_gridService = gridInterComms; m_interRegion = gridInterComms; - m_inventoryService = new OGS1InventoryService(); + m_inventoryService = new OGS1InventoryService(serversInfo.InventoryURL); m_userService = new OGS1UserServices(this); } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 49fdee9..85df353 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -25,7 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - +using System; +using System.IO; +using System.Xml.Serialization; using System.Collections.Generic; using libsecondlife; using OpenSim.Framework; @@ -36,8 +38,11 @@ namespace OpenSim.Region.Communications.OGS1 { public class OGS1InventoryService : IInventoryServices { - public OGS1InventoryService() + string _inventoryServerUrl; + + public OGS1InventoryService(string inventoryServerUrl) { + _inventoryServerUrl = inventoryServerUrl; } #region IInventoryServices Members @@ -45,6 +50,19 @@ namespace OpenSim.Region.Communications.OGS1 public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) { + //TODO! Uncomment when all is done + //SerializableInventory userInventory = null; + + //RestClient inventoryServer = new RestClient(_inventoryServerUrl); + //inventoryServer.AddResourcePath("inventory"); + //inventoryServer.AddResourcePath("user"); + //inventoryServer.AddResourcePath(userID.ToStringHyphenated()); + + //using (Stream userInventoryStream = inventoryServer.Request()) + //{ + // XmlSerializer x = new XmlSerializer(typeof(SerializableInventory)); + // userInventory = (SerializableInventory)x.Deserialize(userInventoryStream); + //} } public void AddNewInventoryFolder(LLUUID userID, InventoryFolderImpl folder) @@ -70,4 +88,4 @@ namespace OpenSim.Region.Communications.OGS1 #endregion } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 9d4187a..99b69e1 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs @@ -431,4 +431,4 @@ namespace OpenSim.Region.Environment.Modules m_tcp.Close(); } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Environment/Modules/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/WorldCommModule.cs index 7a631d7..5af2ce3 100644 --- a/OpenSim/Region/Environment/Modules/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/WorldCommModule.cs @@ -490,4 +490,4 @@ namespace OpenSim.Region.Environment.Modules return m_id; } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 5155b41..3b73893 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1059,4 +1059,4 @@ namespace OpenSim.Region.Environment.Scenes SendOurAppearance(m_controllingClient); } } -} \ No newline at end of file +} -- cgit v1.1