diff options
author | lbsa71 | 2007-09-27 13:25:45 +0000 |
---|---|---|
committer | lbsa71 | 2007-09-27 13:25:45 +0000 |
commit | 8143c597fc5f62ec0d931d2d5b887730e06aec04 (patch) | |
tree | ae67873a5f801b2b7bdf9a7b088db98beb97b5ac /OpenSim/Framework/Data | |
parent | Terrain: (diff) | |
download | opensim-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 '')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | 58 | ||||
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLManager.cs | 58 | ||||
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | 61 | ||||
-rw-r--r-- | OpenSim/Framework/Data/InventoryData.cs | 33 |
4 files changed, 112 insertions, 98 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs index 5009d9e..8a7e869 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | |||
@@ -132,7 +132,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
132 | param["?uuid"] = user.ToStringHyphenated(); | 132 | param["?uuid"] = user.ToStringHyphenated(); |
133 | param["?zero"] = LLUUID.Zero.ToStringHyphenated(); | 133 | param["?zero"] = LLUUID.Zero.ToStringHyphenated(); |
134 | 134 | ||
135 | IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param); | 135 | IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND (agentID = ?uuid OR category = 0)", param); |
136 | IDataReader reader = result.ExecuteReader(); | 136 | IDataReader reader = result.ExecuteReader(); |
137 | 137 | ||
138 | List<InventoryFolderBase> items = database.readInventoryFolders(reader); | 138 | List<InventoryFolderBase> items = database.readInventoryFolders(reader); |
@@ -152,40 +152,6 @@ namespace OpenSim.Framework.Data.MySQL | |||
152 | } | 152 | } |
153 | 153 | ||
154 | /// <summary> | 154 | /// <summary> |
155 | /// Returns the users inventory root folder. | ||
156 | /// </summary> | ||
157 | /// <param name="user"></param> | ||
158 | /// <returns></returns> | ||
159 | public InventoryFolderBase getUserRootFolder(LLUUID user) | ||
160 | { | ||
161 | try | ||
162 | { | ||
163 | lock (database) | ||
164 | { | ||
165 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
166 | param["?uuid"] = user.ToStringHyphenated(); | ||
167 | param["?zero"] = LLUUID.Zero.ToStringHyphenated(); | ||
168 | |||
169 | IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param); | ||
170 | IDataReader reader = result.ExecuteReader(); | ||
171 | |||
172 | List<InventoryFolderBase> items = database.readInventoryFolders(reader); | ||
173 | InventoryFolderBase rootFolder = items[0]; //should only be one folder with parent set to zero (the root one). | ||
174 | reader.Close(); | ||
175 | result.Dispose(); | ||
176 | |||
177 | return rootFolder; | ||
178 | } | ||
179 | } | ||
180 | catch (Exception e) | ||
181 | { | ||
182 | database.Reconnect(); | ||
183 | Console.WriteLine(e.ToString()); | ||
184 | return null; | ||
185 | } | ||
186 | } | ||
187 | |||
188 | /// <summary> | ||
189 | /// Returns a list of folders in a users inventory contained within the specified folder | 155 | /// Returns a list of folders in a users inventory contained within the specified folder |
190 | /// </summary> | 156 | /// </summary> |
191 | /// <param name="parentID">The folder to search</param> | 157 | /// <param name="parentID">The folder to search</param> |
@@ -348,5 +314,27 @@ namespace OpenSim.Framework.Data.MySQL | |||
348 | { | 314 | { |
349 | addInventoryFolder(folder); | 315 | addInventoryFolder(folder); |
350 | } | 316 | } |
317 | |||
318 | public void deleteInventoryCategory(InventoryCategory inventoryCategory) | ||
319 | { | ||
320 | try | ||
321 | { | ||
322 | lock (database) { | ||
323 | IDbCommand cmd = database.Query(string.Format("DELETE FROM inventoryitems WHERE parentFolderID IN (SELECT folderId FROM inventoryfolders WHERE category={0})", (byte)inventoryCategory), null); | ||
324 | cmd.ExecuteNonQuery(); | ||
325 | |||
326 | |||
327 | cmd = database.Query(string.Format("DELETE FROM inventoryfolders WHERE category={0}", (byte)inventoryCategory), null); | ||
328 | cmd.ExecuteNonQuery(); | ||
329 | } | ||
330 | |||
331 | } | ||
332 | catch (Exception e) | ||
333 | { | ||
334 | database.Reconnect(); | ||
335 | Console.WriteLine(e.ToString()); | ||
336 | } | ||
337 | } | ||
338 | |||
351 | } | 339 | } |
352 | } | 340 | } |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index 5037f98..e55606e 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
41 | /// <summary> | 41 | /// <summary> |
42 | /// The database connection object | 42 | /// The database connection object |
43 | /// </summary> | 43 | /// </summary> |
44 | IDbConnection dbcon; | 44 | MySqlConnection dbcon; |
45 | /// <summary> | 45 | /// <summary> |
46 | /// Connection string for ADO.net | 46 | /// Connection string for ADO.net |
47 | /// </summary> | 47 | /// </summary> |
@@ -115,10 +115,11 @@ namespace OpenSim.Framework.Data.MySQL | |||
115 | { | 115 | { |
116 | MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand(); | 116 | MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand(); |
117 | dbcommand.CommandText = sql; | 117 | dbcommand.CommandText = sql; |
118 | foreach (KeyValuePair<string, string> param in parameters) | 118 | if(parameters != null) |
119 | { | 119 | foreach (KeyValuePair<string, string> param in parameters) |
120 | dbcommand.Parameters.Add(param.Key, param.Value); | 120 | { |
121 | } | 121 | dbcommand.Parameters.Add(param.Key, param.Value); |
122 | } | ||
122 | 123 | ||
123 | return (IDbCommand)dbcommand; | 124 | return (IDbCommand)dbcommand; |
124 | } | 125 | } |
@@ -149,10 +150,11 @@ namespace OpenSim.Framework.Data.MySQL | |||
149 | { | 150 | { |
150 | MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand(); | 151 | MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand(); |
151 | dbcommand.CommandText = sql; | 152 | dbcommand.CommandText = sql; |
152 | foreach (KeyValuePair<string, string> param in parameters) | 153 | if(parameters != null) |
153 | { | 154 | foreach (KeyValuePair<string, string> param in parameters) |
154 | dbcommand.Parameters.Add(param.Key, param.Value); | 155 | { |
155 | } | 156 | dbcommand.Parameters.Add(param.Key, param.Value); |
157 | } | ||
156 | 158 | ||
157 | return (IDbCommand)dbcommand; | 159 | return (IDbCommand)dbcommand; |
158 | } | 160 | } |
@@ -370,6 +372,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
370 | folder.parentID = new LLUUID((string)reader["parentFolderID"]); | 372 | folder.parentID = new LLUUID((string)reader["parentFolderID"]); |
371 | folder.folderID = new LLUUID((string)reader["folderID"]); | 373 | folder.folderID = new LLUUID((string)reader["folderID"]); |
372 | folder.name = (string)reader["folderName"]; | 374 | folder.name = (string)reader["folderName"]; |
375 | folder.category = (InventoryCategory)((Int16)reader["category"]); | ||
376 | folder.type = (Int16)reader["folderType"]; | ||
373 | 377 | ||
374 | rows.Add(folder); | 378 | rows.Add(folder); |
375 | } | 379 | } |
@@ -509,24 +513,32 @@ namespace OpenSim.Framework.Data.MySQL | |||
509 | /// <returns>Success?</returns> | 513 | /// <returns>Success?</returns> |
510 | public bool insertFolder(InventoryFolderBase folder) | 514 | public bool insertFolder(InventoryFolderBase folder) |
511 | { | 515 | { |
512 | string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName) VALUES "; | 516 | string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName, category, folderType) VALUES "; |
513 | sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName)"; | 517 | sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?category, ?folderType)"; |
514 | 518 | ||
515 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | 519 | MySqlCommand dbcmd = dbcon.CreateCommand(); |
516 | parameters["?folderID"] = folder.folderID.ToStringHyphenated(); | 520 | dbcmd.CommandText = sql; |
517 | parameters["?agentID"] = folder.agentID.ToStringHyphenated(); | 521 | |
518 | parameters["?parentFolderID"] = folder.parentID.ToStringHyphenated(); | 522 | LLUUID tmpID = folder.folderID; |
519 | parameters["?folderName"] = folder.name; | 523 | dbcmd.Parameters.Add(new MySqlParameter("?folderID", tmpID.ToStringHyphenated())); |
520 | 524 | dbcmd.Parameters.Add(new MySqlParameter("?folderID", tmpID.ToStringHyphenated())); | |
525 | tmpID = folder.agentID; | ||
526 | dbcmd.Parameters.Add(new MySqlParameter("?agentID", tmpID.ToStringHyphenated())); | ||
527 | tmpID = folder.parentID; | ||
528 | dbcmd.Parameters.Add(new MySqlParameter("?parentFolderID", tmpID.ToStringHyphenated())); | ||
529 | dbcmd.Parameters.Add(new MySqlParameter("?folderName", folder.name)); | ||
530 | MySqlParameter p = dbcmd.Parameters.Add(new MySqlParameter("?category", MySqlDbType.Byte)); | ||
531 | p.Value = (byte)folder.category; | ||
532 | |||
533 | p = dbcmd.Parameters.Add(new MySqlParameter("?folderType", MySqlDbType.Byte)); | ||
534 | p.Value = (byte)folder.type; | ||
535 | |||
536 | |||
521 | bool returnval = false; | 537 | bool returnval = false; |
522 | try | 538 | try |
523 | { | 539 | { |
524 | IDbCommand result = Query(sql, parameters); | 540 | if (dbcmd.ExecuteNonQuery() == 1) |
525 | |||
526 | if (result.ExecuteNonQuery() == 1) | ||
527 | returnval = true; | 541 | returnval = true; |
528 | |||
529 | result.Dispose(); | ||
530 | } | 542 | } |
531 | catch (Exception e) | 543 | catch (Exception e) |
532 | { | 544 | { |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs index d3d752f..cac992c 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |||
@@ -61,6 +61,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
61 | MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Items Definitions"); | 61 | MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Items Definitions"); |
62 | 62 | ||
63 | ds.AcceptChanges(); | 63 | ds.AcceptChanges(); |
64 | |||
64 | return; | 65 | return; |
65 | } | 66 | } |
66 | 67 | ||
@@ -195,43 +196,16 @@ namespace OpenSim.Framework.Data.SQLite | |||
195 | /// <returns>A list of folder objects</returns> | 196 | /// <returns>A list of folder objects</returns> |
196 | public List<InventoryFolderBase> getUserRootFolders(LLUUID user) | 197 | public List<InventoryFolderBase> getUserRootFolders(LLUUID user) |
197 | { | 198 | { |
198 | return null; | ||
199 | } | ||
200 | |||
201 | /// <summary> | ||
202 | /// Returns the users inventory root folder. | ||
203 | /// </summary> | ||
204 | /// <param name="user">The UUID of the user who is having inventory being returned</param> | ||
205 | /// <returns>Root inventory folder</returns> | ||
206 | public InventoryFolderBase getUserRootFolder(LLUUID user) | ||
207 | { | ||
208 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); | 199 | List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); |
209 | DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; | 200 | DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; |
210 | string selectExp = "agentID = '" + user.ToString() + "' AND parentID = '" + LLUUID.Zero.ToString() + "'"; | 201 | |
202 | string selectExp = "parentID = '" + LLUUID.Zero.ToString() + "' AND (agentID = '" + user.ToString() + "' OR category = 0)"; | ||
211 | DataRow[] rows = inventoryFolderTable.Select(selectExp); | 203 | DataRow[] rows = inventoryFolderTable.Select(selectExp); |
212 | foreach (DataRow row in rows) | 204 | foreach (DataRow row in rows) |
213 | { | 205 | { |
214 | folders.Add(this.buildFolder(row)); | 206 | folders.Add(this.buildFolder(row)); |
215 | } | 207 | } |
216 | 208 | return folders; | |
217 | if (folders.Count == 1) | ||
218 | { | ||
219 | //we found the root | ||
220 | //System.Console.WriteLine("found root inventory folder"); | ||
221 | return folders[0]; | ||
222 | } | ||
223 | else if (folders.Count > 1) | ||
224 | { | ||
225 | //err shouldn't be more than one root | ||
226 | //System.Console.WriteLine("found more than one root inventory folder"); | ||
227 | } | ||
228 | else if (folders.Count == 0) | ||
229 | { | ||
230 | // no root? | ||
231 | //System.Console.WriteLine("couldn't find root inventory folder"); | ||
232 | } | ||
233 | |||
234 | return null; | ||
235 | } | 209 | } |
236 | 210 | ||
237 | /// <summary> | 211 | /// <summary> |
@@ -270,7 +244,14 @@ namespace OpenSim.Framework.Data.SQLite | |||
270 | /// <returns>A class containing folder information</returns> | 244 | /// <returns>A class containing folder information</returns> |
271 | public InventoryFolderBase getInventoryFolder(LLUUID folder) | 245 | public InventoryFolderBase getInventoryFolder(LLUUID folder) |
272 | { | 246 | { |
273 | return null; | 247 | DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; |
248 | string selectExp = "UUID = '" + folder.ToString() + "'"; | ||
249 | DataRow[] rows = inventoryFolderTable.Select(selectExp); | ||
250 | |||
251 | if (rows.Length == 1) | ||
252 | return this.buildFolder(rows[0]); | ||
253 | else | ||
254 | return null; | ||
274 | } | 255 | } |
275 | 256 | ||
276 | /// <summary> | 257 | /// <summary> |
@@ -308,6 +289,11 @@ namespace OpenSim.Framework.Data.SQLite | |||
308 | this.invItemsDa.Update(ds, "inventoryitems"); | 289 | this.invItemsDa.Update(ds, "inventoryitems"); |
309 | } | 290 | } |
310 | 291 | ||
292 | //TODO! Implement SQLite deleteInventoryCategory | ||
293 | public void deleteInventoryCategory(InventoryCategory inventoryCategory) | ||
294 | { | ||
295 | } | ||
296 | |||
311 | /// <summary> | 297 | /// <summary> |
312 | /// Adds a new folder specified by folder | 298 | /// Adds a new folder specified by folder |
313 | /// </summary> | 299 | /// </summary> |
@@ -326,6 +312,11 @@ namespace OpenSim.Framework.Data.SQLite | |||
326 | this.addFolder(folder); | 312 | this.addFolder(folder); |
327 | } | 313 | } |
328 | 314 | ||
315 | //TODO! implement CreateNewUserInventory | ||
316 | public void CreateNewUserInventory(LLUUID user) | ||
317 | { | ||
318 | throw new Exception("Function not implemented"); | ||
319 | } | ||
329 | 320 | ||
330 | /*********************************************************************** | 321 | /*********************************************************************** |
331 | * | 322 | * |
@@ -350,6 +341,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
350 | createCol(inv, "parentFolderID", typeof(System.String)); | 341 | createCol(inv, "parentFolderID", typeof(System.String)); |
351 | createCol(inv, "avatarID", typeof(System.String)); | 342 | createCol(inv, "avatarID", typeof(System.String)); |
352 | createCol(inv, "creatorsID", typeof(System.String)); | 343 | createCol(inv, "creatorsID", typeof(System.String)); |
344 | createCol(inv, "category", typeof(System.Byte)); | ||
353 | 345 | ||
354 | createCol(inv, "inventoryName", typeof(System.String)); | 346 | createCol(inv, "inventoryName", typeof(System.String)); |
355 | createCol(inv, "inventoryDescription", typeof(System.String)); | 347 | createCol(inv, "inventoryDescription", typeof(System.String)); |
@@ -373,6 +365,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
373 | createCol(fol, "parentID", typeof(System.String)); | 365 | createCol(fol, "parentID", typeof(System.String)); |
374 | createCol(fol, "type", typeof(System.Int32)); | 366 | createCol(fol, "type", typeof(System.Int32)); |
375 | createCol(fol, "version", typeof(System.Int32)); | 367 | createCol(fol, "version", typeof(System.Int32)); |
368 | createCol(fol, "category", typeof(System.Byte)); | ||
376 | 369 | ||
377 | fol.PrimaryKey = new DataColumn[] { fol.Columns["UUID"] }; | 370 | fol.PrimaryKey = new DataColumn[] { fol.Columns["UUID"] }; |
378 | return fol; | 371 | return fol; |
@@ -415,6 +408,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
415 | folder.parentID = new LLUUID((string)row["parentID"]); | 408 | folder.parentID = new LLUUID((string)row["parentID"]); |
416 | folder.type = Convert.ToInt16(row["type"]); | 409 | folder.type = Convert.ToInt16(row["type"]); |
417 | folder.version = Convert.ToUInt16(row["version"]); | 410 | folder.version = Convert.ToUInt16(row["version"]); |
411 | folder.category = (InventoryCategory)Convert.ToByte(row["category"]); | ||
418 | return folder; | 412 | return folder; |
419 | } | 413 | } |
420 | 414 | ||
@@ -426,6 +420,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
426 | row["parentID"] = folder.parentID; | 420 | row["parentID"] = folder.parentID; |
427 | row["type"] = folder.type; | 421 | row["type"] = folder.type; |
428 | row["version"] = folder.version; | 422 | row["version"] = folder.version; |
423 | row["category"] = folder.category; | ||
429 | } | 424 | } |
430 | 425 | ||
431 | 426 | ||
@@ -644,3 +639,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
644 | } | 639 | } |
645 | } | 640 | } |
646 | 641 | ||
642 | |||
643 | |||
644 | |||
645 | |||
diff --git a/OpenSim/Framework/Data/InventoryData.cs b/OpenSim/Framework/Data/InventoryData.cs index 2df26e1..dc857d8 100644 --- a/OpenSim/Framework/Data/InventoryData.cs +++ b/OpenSim/Framework/Data/InventoryData.cs | |||
@@ -25,15 +25,19 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | ||
29 | using System.Xml.Serialization; | ||
28 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
29 | using libsecondlife; | 31 | using libsecondlife; |
30 | 32 | ||
31 | namespace OpenSim.Framework.Data | 33 | namespace OpenSim.Framework.Data |
32 | { | 34 | { |
35 | |||
36 | public enum InventoryCategory : byte { Library, Default, User }; | ||
33 | /// <summary> | 37 | /// <summary> |
34 | /// Inventory Item - contains all the properties associated with an individual inventory piece. | 38 | /// Inventory Item - contains all the properties associated with an individual inventory piece. |
35 | /// </summary> | 39 | /// </summary> |
36 | public class InventoryItemBase | 40 | public class InventoryItemBase : MarshalByRefObject |
37 | { | 41 | { |
38 | /// <summary> | 42 | /// <summary> |
39 | /// A UUID containing the ID for the inventory item itself | 43 | /// A UUID containing the ID for the inventory item itself |
@@ -66,10 +70,12 @@ namespace OpenSim.Framework.Data | |||
66 | /// <summary> | 70 | /// <summary> |
67 | /// The name of the inventory item (must be less than 64 characters) | 71 | /// The name of the inventory item (must be less than 64 characters) |
68 | /// </summary> | 72 | /// </summary> |
73 | [XmlElement(ElementName="name")] | ||
69 | public string inventoryName; | 74 | public string inventoryName; |
70 | /// <summary> | 75 | /// <summary> |
71 | /// The description of the inventory item (must be less than 64 characters) | 76 | /// The description of the inventory item (must be less than 64 characters) |
72 | /// </summary> | 77 | /// </summary> |
78 | [XmlElement(ElementName = "description")] | ||
73 | public string inventoryDescription; | 79 | public string inventoryDescription; |
74 | /// <summary> | 80 | /// <summary> |
75 | /// A mask containing the permissions for the next owner (cannot be enforced) | 81 | /// A mask containing the permissions for the next owner (cannot be enforced) |
@@ -92,7 +98,7 @@ namespace OpenSim.Framework.Data | |||
92 | /// <summary> | 98 | /// <summary> |
93 | /// A Class for folders which contain users inventory | 99 | /// A Class for folders which contain users inventory |
94 | /// </summary> | 100 | /// </summary> |
95 | public class InventoryFolderBase | 101 | public class InventoryFolderBase : MarshalByRefObject |
96 | { | 102 | { |
97 | /// <summary> | 103 | /// <summary> |
98 | /// The name of the folder (64 characters or less) | 104 | /// The name of the folder (64 characters or less) |
@@ -118,6 +124,10 @@ namespace OpenSim.Framework.Data | |||
118 | /// | 124 | /// |
119 | /// </summary> | 125 | /// </summary> |
120 | public ushort version; | 126 | public ushort version; |
127 | /// <summary> | ||
128 | /// Inventory category, Library, Default, System | ||
129 | /// </summary> | ||
130 | public InventoryCategory category; | ||
121 | } | 131 | } |
122 | 132 | ||
123 | /// <summary> | 133 | /// <summary> |
@@ -162,13 +172,6 @@ namespace OpenSim.Framework.Data | |||
162 | List<InventoryFolderBase> getUserRootFolders(LLUUID user); | 172 | List<InventoryFolderBase> getUserRootFolders(LLUUID user); |
163 | 173 | ||
164 | /// <summary> | 174 | /// <summary> |
165 | /// Returns the users inventory root folder. | ||
166 | /// </summary> | ||
167 | /// <param name="user">The UUID of the user who is having inventory being returned</param> | ||
168 | /// <returns>Root inventory folder</returns> | ||
169 | InventoryFolderBase getUserRootFolder(LLUUID user); | ||
170 | |||
171 | /// <summary> | ||
172 | /// Returns a list of inventory folders contained in the folder 'parentID' | 175 | /// Returns a list of inventory folders contained in the folder 'parentID' |
173 | /// </summary> | 176 | /// </summary> |
174 | /// <param name="parentID">The folder to get subfolders for</param> | 177 | /// <param name="parentID">The folder to get subfolders for</param> |
@@ -218,5 +221,17 @@ namespace OpenSim.Framework.Data | |||
218 | /// </summary> | 221 | /// </summary> |
219 | /// <param name="folder">The inventory folder</param> | 222 | /// <param name="folder">The inventory folder</param> |
220 | void updateInventoryFolder(InventoryFolderBase folder); | 223 | void updateInventoryFolder(InventoryFolderBase folder); |
224 | |||
225 | /// <summary> | ||
226 | /// Delete a complete inventory category | ||
227 | /// </summary> | ||
228 | /// <param name="inventoryCategory">What folder category shout be deleted</param> | ||
229 | void deleteInventoryCategory(InventoryCategory inventoryCategory); | ||
230 | |||
231 | /// <summary> | ||
232 | /// Setup the initial folderset of a user | ||
233 | /// </summary> | ||
234 | /// <param name="user"></param> | ||
235 | //void CreateNewUserInventory(LLUUID user); | ||
221 | } | 236 | } |
222 | } | 237 | } |