diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs index 107b588..dceda38 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs | |||
@@ -40,7 +40,7 @@ using OpenMetaverse; | |||
40 | 40 | ||
41 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | 41 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory |
42 | { | 42 | { |
43 | public class RemoteInventoryServicesConnector : ISharedRegionModule, IInventoryService | 43 | public class RemoteInventoryServicesConnector : InventoryCache, ISharedRegionModule, IInventoryService |
44 | { | 44 | { |
45 | private static readonly ILog m_log = | 45 | private static readonly ILog m_log = |
46 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -69,9 +69,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
69 | Init(source); | 69 | Init(source); |
70 | } | 70 | } |
71 | 71 | ||
72 | private void Init(IConfigSource source) | 72 | protected override void Init(IConfigSource source) |
73 | { | 73 | { |
74 | m_RemoteConnector = new InventoryServicesConnector(source); | 74 | m_RemoteConnector = new InventoryServicesConnector(source); |
75 | base.Init(source); | ||
75 | } | 76 | } |
76 | 77 | ||
77 | 78 | ||
@@ -101,7 +102,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
101 | { | 102 | { |
102 | } | 103 | } |
103 | 104 | ||
104 | public void AddRegion(Scene scene) | 105 | public override void AddRegion(Scene scene) |
105 | { | 106 | { |
106 | if (!m_Enabled) | 107 | if (!m_Enabled) |
107 | return; | 108 | return; |
@@ -116,10 +117,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
116 | } | 117 | } |
117 | 118 | ||
118 | scene.RegisterModuleInterface<IInventoryService>(this); | 119 | scene.RegisterModuleInterface<IInventoryService>(this); |
120 | base.AddRegion(scene); | ||
119 | } | 121 | } |
120 | 122 | ||
121 | public void RemoveRegion(Scene scene) | 123 | public override void RemoveRegion(Scene scene) |
122 | { | 124 | { |
125 | base.RemoveRegion(scene); | ||
123 | } | 126 | } |
124 | 127 | ||
125 | public void RegionLoaded(Scene scene) | 128 | public void RegionLoaded(Scene scene) |
@@ -168,6 +171,34 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
168 | 171 | ||
169 | } | 172 | } |
170 | 173 | ||
174 | // inherited. See base class | ||
175 | // public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) | ||
176 | |||
177 | public override Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID) | ||
178 | { | ||
179 | UUID sessionID = GetSessionID(userID); | ||
180 | return m_RemoteConnector.GetSystemFolders(userID.ToString(), sessionID); | ||
181 | } | ||
182 | |||
183 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) | ||
184 | { | ||
185 | UUID sessionID = GetSessionID(userID); | ||
186 | try | ||
187 | { | ||
188 | return m_RemoteConnector.GetFolderContent(userID.ToString(), folderID, sessionID); | ||
189 | } | ||
190 | catch (Exception e) | ||
191 | { | ||
192 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation failed, {0} {1}", | ||
193 | e.Source, e.Message); | ||
194 | } | ||
195 | InventoryCollection nullCollection = new InventoryCollection(); | ||
196 | nullCollection.Folders = new List<InventoryFolderBase>(); | ||
197 | nullCollection.Items = new List<InventoryItemBase>(); | ||
198 | nullCollection.UserID = userID; | ||
199 | return nullCollection; | ||
200 | } | ||
201 | |||
171 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) | 202 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) |
172 | { | 203 | { |
173 | return new List<InventoryItemBase>(); | 204 | return new List<InventoryItemBase>(); |
@@ -259,7 +290,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
259 | return false; | 290 | return false; |
260 | } | 291 | } |
261 | 292 | ||
262 | public InventoryFolderBase RequestRootFolder(UUID userID) | 293 | public InventoryFolderBase GetRootFolder(UUID userID) |
263 | { | 294 | { |
264 | return null; | 295 | return null; |
265 | } | 296 | } |