aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
diff options
context:
space:
mode:
authorlbsa712007-09-27 13:25:45 +0000
committerlbsa712007-09-27 13:25:45 +0000
commit8143c597fc5f62ec0d931d2d5b887730e06aec04 (patch)
treeae67873a5f801b2b7bdf9a7b088db98beb97b5ac /OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
parentTerrain: (diff)
downloadopensim-SC_OLD-8143c597fc5f62ec0d931d2d5b887730e06aec04.zip
opensim-SC_OLD-8143c597fc5f62ec0d931d2d5b887730e06aec04.tar.gz
opensim-SC_OLD-8143c597fc5f62ec0d931d2d5b887730e06aec04.tar.bz2
opensim-SC_OLD-8143c597fc5f62ec0d931d2d5b887730e06aec04.tar.xz
* Tleiades grid mode inventory (#444) - thanx Tleiades!
* updated to rev 1413 on libsecondlife.dll and libsecondlife.dll.config (#423)
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs69
1 files changed, 58 insertions, 11 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
index 45188c1..2ec4d10 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs
@@ -1,8 +1,15 @@
1using System;
2using System.Runtime.Remoting;
3using System.Runtime.Remoting.Channels;
4using System.Runtime.Remoting.Channels.Tcp;
5using System.Runtime.Serialization.Formatters;
6using System.Collections;
1using System.Collections.Generic; 7using System.Collections.Generic;
8
2using libsecondlife; 9using libsecondlife;
3using OpenSim.Framework.Communications; 10using OpenSim.Framework.Communications;
4using OpenSim.Framework.Data; 11using OpenSim.Framework.Data;
5using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder; 12using OpenSim.Framework.Types;
6 13
7 14
8namespace OpenSim.Region.Communications.OGS1 15namespace OpenSim.Region.Communications.OGS1
@@ -10,43 +17,83 @@ namespace OpenSim.Region.Communications.OGS1
10 public class OGS1InventoryService : IInventoryServices 17 public class OGS1InventoryService : IInventoryServices
11 { 18 {
12 19
13 public OGS1InventoryService() 20 IUserServices _userServices;
21 IInventoryServices _inventoryServices;
22
23 public OGS1InventoryService(NetworkServersInfo networkConfig, IUserServices userServices) :
24 this(networkConfig.InventoryServerName, networkConfig.InventoryServerPort, userServices)
25 {
26 }
27
28 public OGS1InventoryService(string serverName, int serverPort, IUserServices userServices)
14 { 29 {
30 _userServices = userServices;
31
32 // we only need to register the tcp channel once, and we don't know which other modules use remoting
33 if (ChannelServices.GetChannel("tcp") == null)
34 {
35 // Creating a custom formatter for a TcpChannel sink chain.
36 BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
37 serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
38
39 BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
40
41 IDictionary props = new Hashtable();
42 props["typeFilterLevel"] = TypeFilterLevel.Full;
43
44 // Pass the properties for the port setting and the server provider in the server chain argument. (Client remains null here.)
45 TcpChannel chan = new TcpChannel(props, clientProvider, serverProvider);
46
47 ChannelServices.RegisterChannel(chan, true);
48 }
49
15 50
51
52 string remotingUrl = string.Format("tcp://{0}:{1}/Inventory", serverName, serverPort);
53 _inventoryServices = (IInventoryServices)Activator.GetObject(typeof(IInventoryServices), remotingUrl);
16 } 54 }
17 55
18 #region IInventoryServices Members 56 #region IInventoryServices Members
19 57
20 public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) 58 public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack)
21 { 59 {
22 60 _inventoryServices.RequestInventoryForUser(userID, folderCallBack, itemCallBack);
23 } 61 }
24 62
25 public void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder) 63 public void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder)
26 { 64 {
27 65 _inventoryServices.AddNewInventoryFolder(userID, folder);
28 } 66 }
29 67
30 public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item) 68 public void AddNewInventoryItem(LLUUID userID, InventoryItemBase item)
31 { 69 {
32 70 _inventoryServices.AddNewInventoryItem(userID, item);
33 } 71 }
34 72
35 public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) 73 public void DeleteInventoryItem(LLUUID userID, InventoryItemBase item)
36 { 74 {
37 75 _inventoryServices.DeleteInventoryItem(userID, item);
76 }
77
78 public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID folderID)
79 {
80 return _inventoryServices.RequestFirstLevelFolders(folderID);
38 } 81 }
39 82
40 public void CreateNewUserInventory(LLUUID user) 83 public List<InventoryItemBase> RequestFolderItems(LLUUID folderID)
41 { 84 {
42 85 return _inventoryServices.RequestFolderItems(folderID);
43 } 86 }
44 87
45 public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID) 88 public void GetRootFoldersForUser(LLUUID user, out LLUUID libraryFolder, out LLUUID personalFolder)
46 { 89 {
47 return new List<InventoryFolderBase>(); 90 _inventoryServices.GetRootFoldersForUser(user, out libraryFolder, out personalFolder);
48 } 91 }
49 92
93 public void CreateNewUserInventory(LLUUID libraryRootId, LLUUID user)
94 {
95 throw new Exception("method not implemented");
96 }
50 #endregion 97 #endregion
51 } 98 }
52} 99}