Step one on the long march towards grid based inventory. Introduction of an InevntoryServer

This commit is contained in:
Tleiades Hax
2007-10-30 22:42:34 +00:00
parent a8c42a5829
commit 6a8d8f54e8
15 changed files with 533 additions and 73 deletions

View File

@@ -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
}
}
}

View File

@@ -770,4 +770,4 @@ namespace OpenSim.Region.ClientStack
OutPacket(logReply);
}
}
}
}

View File

@@ -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);
}
}
}
}

View File

@@ -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
}
}
}

View File

@@ -431,4 +431,4 @@ namespace OpenSim.Region.Environment.Modules
m_tcp.Close();
}
}
}
}

View File

@@ -490,4 +490,4 @@ namespace OpenSim.Region.Environment.Modules
return m_id;
}
}
}
}

View File

@@ -1059,4 +1059,4 @@ namespace OpenSim.Region.Environment.Scenes
SendOurAppearance(m_controllingClient);
}
}
}
}