TestInventoryService.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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 System.Text;
  30. using OpenSim.Framework;
  31. using OpenMetaverse;
  32. using OpenSim.Services.Interfaces;
  33. using Nini.Config;
  34. namespace OpenSim.Tests.Common.Mock
  35. {
  36. public class TestInventoryService : IInventoryService
  37. {
  38. public TestInventoryService()
  39. {
  40. }
  41. public TestInventoryService(IConfigSource config)
  42. {
  43. }
  44. /// <summary>
  45. /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/>
  46. /// </summary>
  47. /// <param name="userId"></param>
  48. /// <returns></returns>
  49. public bool CreateUserInventory(UUID userId)
  50. {
  51. return false;
  52. }
  53. /// <summary>
  54. /// <see cref="OpenSim.Framework.Communications.IInterServiceInventoryServices"/>
  55. /// </summary>
  56. /// <param name="userId"></param>
  57. /// <returns></returns>
  58. public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
  59. {
  60. List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
  61. InventoryFolderBase folder = new InventoryFolderBase();
  62. folder.ID = UUID.Random();
  63. folder.Owner = userId;
  64. folders.Add(folder);
  65. return folders;
  66. }
  67. public InventoryFolderBase GetRootFolder(UUID userID)
  68. {
  69. return new InventoryFolderBase();
  70. }
  71. public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
  72. {
  73. return null;
  74. }
  75. public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
  76. {
  77. return null;
  78. }
  79. /// <summary>
  80. /// Returns a list of all the active gestures in a user's inventory.
  81. /// </summary>
  82. /// <param name="userId">
  83. /// The <see cref="UUID"/> of the user
  84. /// </param>
  85. /// <returns>
  86. /// A flat list of the gesture items.
  87. /// </returns>
  88. public List<InventoryItemBase> GetActiveGestures(UUID userId)
  89. {
  90. return null;
  91. }
  92. public InventoryCollection GetUserInventory(UUID userID)
  93. {
  94. return null;
  95. }
  96. public void GetUserInventory(UUID userID, OpenSim.Services.Interfaces.InventoryReceiptCallback callback)
  97. {
  98. }
  99. public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
  100. {
  101. return null;
  102. }
  103. public bool AddFolder(InventoryFolderBase folder)
  104. {
  105. return false;
  106. }
  107. public bool UpdateFolder(InventoryFolderBase folder)
  108. {
  109. return false;
  110. }
  111. public bool MoveFolder(InventoryFolderBase folder)
  112. {
  113. return false;
  114. }
  115. public bool DeleteFolders(UUID ownerID, List<UUID> ids)
  116. {
  117. return false;
  118. }
  119. public bool PurgeFolder(InventoryFolderBase folder)
  120. {
  121. return false;
  122. }
  123. public bool AddItem(InventoryItemBase item)
  124. {
  125. return false;
  126. }
  127. public bool UpdateItem(InventoryItemBase item)
  128. {
  129. return false;
  130. }
  131. public bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
  132. {
  133. return false;
  134. }
  135. public bool DeleteItems(UUID ownerID, List<UUID> itemIDs)
  136. {
  137. return false;
  138. }
  139. public InventoryItemBase GetItem(InventoryItemBase item)
  140. {
  141. return null;
  142. }
  143. public InventoryFolderBase GetFolder(InventoryFolderBase folder)
  144. {
  145. return null;
  146. }
  147. public bool HasInventoryForUser(UUID userID)
  148. {
  149. return false;
  150. }
  151. public InventoryFolderBase RequestRootFolder(UUID userID)
  152. {
  153. InventoryFolderBase root = new InventoryFolderBase();
  154. root.ID = UUID.Random();
  155. root.Owner = userID;
  156. root.ParentID = UUID.Zero;
  157. return root;
  158. }
  159. public int GetAssetPermissions(UUID userID, UUID assetID)
  160. {
  161. return 1;
  162. }
  163. }
  164. }