diff options
author | Diva Canto | 2009-08-10 20:31:51 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-10 20:31:51 -0700 |
commit | cdcbc48534f19afe7cbdeb6c690e6b7d9f2ff099 (patch) | |
tree | 4d42dff30b4ca8d9f770209c257484c1a2295ddf /OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | |
parent | Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-cdcbc48534f19afe7cbdeb6c690e6b7d9f2ff099.zip opensim-SC_OLD-cdcbc48534f19afe7cbdeb6c690e6b7d9f2ff099.tar.gz opensim-SC_OLD-cdcbc48534f19afe7cbdeb6c690e6b7d9f2ff099.tar.bz2 opensim-SC_OLD-cdcbc48534f19afe7cbdeb6c690e6b7d9f2ff099.tar.xz |
Added two new methods to IIventoryService -- GetFolderForType and GetFolderContent. Some meat to it, but not completed. None of this code is called anywhere yet.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs index ae15cfb..1a6826e 100644 --- a/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/InventoryServiceConnector.cs | |||
@@ -155,6 +155,50 @@ namespace OpenSim.Services.Connectors | |||
155 | } | 155 | } |
156 | } | 156 | } |
157 | 157 | ||
158 | /// <summary> | ||
159 | /// Gets the user folder for the given folder-type | ||
160 | /// </summary> | ||
161 | /// <param name="userID"></param> | ||
162 | /// <param name="type"></param> | ||
163 | /// <returns></returns> | ||
164 | public List<InventoryFolderBase> GetSystemFolders(string userID, UUID sessionID) | ||
165 | { | ||
166 | try | ||
167 | { | ||
168 | return SynchronousRestSessionObjectPoster<string, List<InventoryFolderBase>>.BeginPostObject( | ||
169 | "GET", m_ServerURI + "/SystemFolders/", userID, sessionID.ToString(), userID.ToString()); | ||
170 | } | ||
171 | catch (Exception e) | ||
172 | { | ||
173 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderForType operation failed, {0} {1}", | ||
174 | e.Source, e.Message); | ||
175 | } | ||
176 | |||
177 | return new List<InventoryFolderBase>(); | ||
178 | } | ||
179 | |||
180 | /// <summary> | ||
181 | /// Gets everything (folders and items) inside a folder | ||
182 | /// </summary> | ||
183 | /// <param name="userId"></param> | ||
184 | /// <param name="folderID"></param> | ||
185 | /// <returns></returns> | ||
186 | public InventoryCollection GetFolderContent(string userID, UUID folderID, UUID sessionID) | ||
187 | { | ||
188 | try | ||
189 | { | ||
190 | return SynchronousRestSessionObjectPoster<UUID, InventoryCollection>.BeginPostObject( | ||
191 | "GET", m_ServerURI + "/GetFolderContents/", folderID, sessionID.ToString(), userID.ToString()); | ||
192 | } | ||
193 | catch (Exception e) | ||
194 | { | ||
195 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderForType operation failed, {0} {1}", | ||
196 | e.Source, e.Message); | ||
197 | } | ||
198 | |||
199 | return null; | ||
200 | } | ||
201 | |||
158 | public bool AddFolder(string userID, InventoryFolderBase folder, UUID sessionID) | 202 | public bool AddFolder(string userID, InventoryFolderBase folder, UUID sessionID) |
159 | { | 203 | { |
160 | try | 204 | try |