aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/InventoryItemBase.cs
diff options
context:
space:
mode:
authorSean Dague2008-04-07 18:28:48 +0000
committerSean Dague2008-04-07 18:28:48 +0000
commit79222a0b45eca74c32cda95cc0857ac860ab6d19 (patch)
tree86654770a4a4c4e756d78440ad19ec90038c93ad /OpenSim/Framework/InventoryItemBase.cs
parentadded swag #1 on Inventory NHibernate implementation. There (diff)
downloadopensim-SC-79222a0b45eca74c32cda95cc0857ac860ab6d19.zip
opensim-SC-79222a0b45eca74c32cda95cc0857ac860ab6d19.tar.gz
opensim-SC-79222a0b45eca74c32cda95cc0857ac860ab6d19.tar.bz2
opensim-SC-79222a0b45eca74c32cda95cc0857ac860ab6d19.tar.xz
break out the 5 classes that were
InventoryItemBase into seperate .cs files 1 per class
Diffstat (limited to 'OpenSim/Framework/InventoryItemBase.cs')
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs197
1 files changed, 0 insertions, 197 deletions
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 1d0246b..7d146e7 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -102,201 +102,4 @@ namespace OpenSim.Framework
102 /// </summary> 102 /// </summary>
103 public uint inventoryEveryOnePermissions; 103 public uint inventoryEveryOnePermissions;
104 } 104 }
105
106 /// <summary>
107 /// A Class for folders which contain users inventory
108 /// </summary>
109 public class InventoryFolderBase
110 {
111 /// <summary>
112 /// The name of the folder (64 characters or less)
113 /// </summary>
114 public string name;
115
116 /// <summary>
117 /// The agent who's inventory this is contained by
118 /// </summary>
119 public LLUUID agentID;
120
121 /// <summary>
122 /// The folder this folder is contained in
123 /// </summary>
124 public LLUUID parentID;
125
126 /// <summary>
127 /// The UUID for this folder
128 /// </summary>
129 public LLUUID folderID;
130
131 /// <summary>
132 /// Type of items normally stored in this folder
133 /// </summary>
134 public short type;
135
136 /// <summary>
137 ///
138 /// </summary>
139 public ushort version;
140 }
141
142 /// <summary>
143 /// An interface for accessing inventory data from a storage server
144 /// </summary>
145 public interface IInventoryData
146 {
147 /// <summary>
148 /// Initialises the interface
149 /// </summary>
150 void Initialise();
151
152 /// <summary>
153 /// Closes the interface
154 /// </summary>
155 void Close();
156
157 /// <summary>
158 /// The plugin being loaded
159 /// </summary>
160 /// <returns>A string containing the plugin name</returns>
161 string getName();
162
163 /// <summary>
164 /// The plugins version
165 /// </summary>
166 /// <returns>A string containing the plugin version</returns>
167 string getVersion();
168
169 /// <summary>
170 /// Returns all child folders in the hierarchy from the parent folder and down.
171 /// Does not return the parent folder itself.
172 /// </summary>
173 /// <param name="parentID">The folder to get subfolders for</param>
174 /// <returns>A list of inventory folders</returns>
175 List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID);
176
177 /// <summary>
178 /// Returns a list of inventory items contained within the specified folder
179 /// </summary>
180 /// <param name="folderID">The UUID of the target folder</param>
181 /// <returns>A List of InventoryItemBase items</returns>
182 List<InventoryItemBase> getInventoryInFolder(LLUUID folderID);
183
184 /// <summary>
185 /// Returns a list of the root folders within a users inventory
186 /// </summary>
187 /// <param name="user">The user whos inventory is to be searched</param>
188 /// <returns>A list of folder objects</returns>
189 List<InventoryFolderBase> getUserRootFolders(LLUUID user);
190
191 /// <summary>
192 /// Returns the users inventory root folder.
193 /// </summary>
194 /// <param name="user">The UUID of the user who is having inventory being returned</param>
195 /// <returns>Root inventory folder, null if no root inventory folder was found</returns>
196 InventoryFolderBase getUserRootFolder(LLUUID user);
197
198 /// <summary>
199 /// Returns a list of inventory folders contained in the folder 'parentID'
200 /// </summary>
201 /// <param name="parentID">The folder to get subfolders for</param>
202 /// <returns>A list of inventory folders</returns>
203 List<InventoryFolderBase> getInventoryFolders(LLUUID parentID);
204
205 /// <summary>
206 /// Returns an inventory item by its UUID
207 /// </summary>
208 /// <param name="item">The UUID of the item to be returned</param>
209 /// <returns>A class containing item information</returns>
210 InventoryItemBase getInventoryItem(LLUUID item);
211
212 /// <summary>
213 /// Returns a specified inventory folder by its UUID
214 /// </summary>
215 /// <param name="folder">The UUID of the folder to be returned</param>
216 /// <returns>A class containing folder information</returns>
217 InventoryFolderBase getInventoryFolder(LLUUID folder);
218
219 /// <summary>
220 /// Creates a new inventory item based on item
221 /// </summary>
222 /// <param name="item">The item to be created</param>
223 void addInventoryItem(InventoryItemBase item);
224
225 /// <summary>
226 /// Updates an inventory item with item (updates based on ID)
227 /// </summary>
228 /// <param name="item">The updated item</param>
229 void updateInventoryItem(InventoryItemBase item);
230
231 /// <summary>
232 ///
233 /// </summary>
234 /// <param name="item"></param>
235 void deleteInventoryItem(LLUUID item);
236
237 /// <summary>
238 /// Adds a new folder specified by folder
239 /// </summary>
240 /// <param name="folder">The inventory folder</param>
241 void addInventoryFolder(InventoryFolderBase folder);
242
243 /// <summary>
244 /// Updates a folder based on its ID with folder
245 /// </summary>
246 /// <param name="folder">The inventory folder</param>
247 void updateInventoryFolder(InventoryFolderBase folder);
248
249 /// <summary>
250 /// Updates a folder based on its ID with folder
251 /// </summary>
252 /// <param name="folder">The inventory folder</param>
253 void moveInventoryFolder(InventoryFolderBase folder);
254
255 /// <summary>
256 /// Deletes a folder based on its ID with folder
257 /// </summary>
258 /// <param name="folder">The id of the folder</param>
259 void deleteInventoryFolder(LLUUID folder);
260 }
261
262 public class InventoryCollection
263 {
264 public List<InventoryFolderBase> Folders;
265 public List<InventoryItemBase> AllItems;
266 public LLUUID UserID;
267
268 public InventoryCollection()
269 {
270 Folders = new List<InventoryFolderBase>();
271 AllItems = new List<InventoryItemBase>();
272 }
273
274 public InventoryCollection(List<InventoryFolderBase> folders, List<InventoryItemBase> allItems)
275 {
276 Folders = folders;
277 AllItems = allItems;
278 }
279 }
280
281 /*
282 * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder
283 * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
284 * into this simpler class, and then use that.
285 */
286
287 [XmlRoot(ElementName = "inventory", IsNullable = true)]
288 public class SerializableInventory
289 {
290 [XmlRoot(ElementName = "folder", IsNullable = true)]
291 public class SerializableFolder : InventoryFolderBase
292 {
293 [XmlArray(ElementName = "folders", IsNullable = true)] [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof (SerializableFolder))] public
294 ArrayList SubFolders;
295
296 [XmlArray(ElementName = "items", IsNullable = true)] [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof (InventoryItemBase))] public ArrayList
297 Items;
298 }
299
300 [XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root;
301 }
302} 105}