NullInventoryData.cs 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System;
  28. using System.Collections.Generic;
  29. using OpenMetaverse;
  30. using OpenSim.Framework;
  31. namespace OpenSim.Data.Null
  32. {
  33. /// <summary>
  34. /// This class is completely null.
  35. /// </summary>
  36. public class NullInventoryData : IInventoryDataPlugin
  37. {
  38. public string Version { get { return "1.0.0.0"; } }
  39. public void Initialise()
  40. {
  41. }
  42. public void Dispose()
  43. {
  44. // Do nothing.
  45. }
  46. public string Name
  47. {
  48. get { return "Null Inventory Data Interface"; }
  49. }
  50. public void Initialise(string connect)
  51. {
  52. }
  53. /// <summary>
  54. /// Returns all descendent folders of this folder. Does not return the parent folder itself.
  55. /// </summary>
  56. /// <param name="parentID">The folder to get subfolders for</param>
  57. /// <returns>A list of inventory folders</returns>
  58. public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
  59. {
  60. return new List<InventoryFolderBase>();
  61. }
  62. /// <summary>
  63. /// Returns a list of inventory items contained within the specified folder
  64. /// </summary>
  65. /// <param name="folderID">The UUID of the target folder</param>
  66. /// <returns>A List of InventoryItemBase items</returns>
  67. public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
  68. {
  69. return new List<InventoryItemBase>();
  70. }
  71. /// <summary>
  72. /// Returns a list of the root folders within a users inventory
  73. /// </summary>
  74. /// <param name="user">The user whos inventory is to be searched</param>
  75. /// <returns>A list of folder objects</returns>
  76. public List<InventoryFolderBase> getUserRootFolders(UUID user)
  77. {
  78. return new List<InventoryFolderBase>();
  79. }
  80. /// <summary>
  81. /// Returns the users inventory root folder.
  82. /// </summary>
  83. /// <param name="user">The UUID of the user who is having inventory being returned</param>
  84. /// <returns>Root inventory folder, null if no root inventory folder was found</returns>
  85. public InventoryFolderBase getUserRootFolder(UUID user)
  86. {
  87. return null;
  88. }
  89. /// <summary>
  90. /// Returns a list of inventory folders contained in the folder 'parentID'
  91. /// </summary>
  92. /// <param name="parentID">The folder to get subfolders for</param>
  93. /// <returns>A list of inventory folders</returns>
  94. public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
  95. {
  96. return new List<InventoryFolderBase>();
  97. }
  98. /// <summary>
  99. /// Returns an inventory item by its UUID
  100. /// </summary>
  101. /// <param name="item">The UUID of the item to be returned</param>
  102. /// <returns>A class containing item information</returns>
  103. public InventoryItemBase getInventoryItem(UUID item)
  104. {
  105. return null;
  106. }
  107. /// <summary>
  108. /// Returns a specified inventory folder by its UUID
  109. /// </summary>
  110. /// <param name="folder">The UUID of the folder to be returned</param>
  111. /// <returns>A class containing folder information</returns>
  112. public InventoryFolderBase getInventoryFolder(UUID folder)
  113. {
  114. return null;
  115. }
  116. /// <summary>
  117. /// Creates a new inventory item based on item
  118. /// </summary>
  119. /// <param name="item">The item to be created</param>
  120. public void addInventoryItem(InventoryItemBase item)
  121. {
  122. }
  123. /// <summary>
  124. /// Updates an inventory item with item (updates based on ID)
  125. /// </summary>
  126. /// <param name="item">The updated item</param>
  127. public void updateInventoryItem(InventoryItemBase item)
  128. {
  129. }
  130. /// <summary>
  131. ///
  132. /// </summary>
  133. /// <param name="item"></param>
  134. public void deleteInventoryItem(UUID item)
  135. {
  136. }
  137. /// <summary>
  138. ///
  139. /// </summary>
  140. /// <param name="item"></param>
  141. public InventoryItemBase queryInventoryItem(UUID item)
  142. {
  143. return null;
  144. }
  145. /// <summary>
  146. ///
  147. /// </summary>
  148. /// <param name="item"></param>
  149. public InventoryFolderBase queryInventoryFolder(UUID folder)
  150. {
  151. return null;
  152. }
  153. /// <summary>
  154. /// Adds a new folder specified by folder
  155. /// </summary>
  156. /// <param name="folder">The inventory folder</param>
  157. public void addInventoryFolder(InventoryFolderBase folder)
  158. {
  159. }
  160. /// <summary>
  161. /// Updates a folder based on its ID with folder
  162. /// </summary>
  163. /// <param name="folder">The inventory folder</param>
  164. public void updateInventoryFolder(InventoryFolderBase folder)
  165. {
  166. }
  167. /// <summary>
  168. /// Updates a folder based on its ID with folder
  169. /// </summary>
  170. /// <param name="folder">The inventory folder</param>
  171. public void moveInventoryFolder(InventoryFolderBase folder)
  172. {
  173. }
  174. /// <summary>
  175. /// Deletes a folder. Thie will delete both the folder itself and its contents (items and descendent folders)
  176. /// </summary>
  177. /// <param name="folder">The id of the folder</param>
  178. public void deleteInventoryFolder(UUID folder)
  179. {
  180. }
  181. /// <summary>
  182. /// Returns all activated gesture-items in the inventory of the specified avatar.
  183. /// </summary>
  184. /// <param name="avatarID">
  185. /// The <see cref="UUID"/> of the avatar
  186. /// </param>
  187. /// <returns>
  188. /// The list of gestures (<see cref="InventoryItemBase"/>s)
  189. /// </returns>
  190. public List<InventoryItemBase> fetchActiveGestures(UUID avatarID)
  191. {
  192. return new List<InventoryItemBase>();
  193. }
  194. }
  195. }