InventoryItemBase.cs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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 OpenSim 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 libsecondlife;
  28. namespace OpenSim.Framework
  29. {
  30. /// <summary>
  31. /// Inventory Item - contains all the properties associated with an individual inventory piece.
  32. /// </summary>
  33. public class InventoryItemBase
  34. {
  35. /// <summary>
  36. /// The UUID of the associated asset on the asset server
  37. /// </summary>
  38. private LLUUID _assetID;
  39. /// <summary>
  40. /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
  41. /// </summary>
  42. private int _assetType;
  43. /// <summary>
  44. ///
  45. /// </summary>
  46. private uint _basePermissions;
  47. /// <summary>
  48. /// The creator of this item
  49. /// </summary>
  50. private LLUUID _creator;
  51. private LLUUID _owner;
  52. private uint _nextPermissions;
  53. /// <summary>
  54. /// A mask containing permissions for the current owner (cannot be enforced)
  55. /// </summary>
  56. private uint _currentPermissions;
  57. /// <summary>
  58. /// The description of the inventory item (must be less than 64 characters)
  59. /// </summary>
  60. private string _description;
  61. /// <summary>
  62. ///
  63. /// </summary>
  64. private uint _everyOnePermissions;
  65. /// <summary>
  66. /// The folder this item is contained in
  67. /// </summary>
  68. private LLUUID _folder;
  69. /// <summary>
  70. /// A UUID containing the ID for the inventory item itself
  71. /// </summary>
  72. private LLUUID _id;
  73. /// <summary>
  74. /// The type of inventory item. (Can be slightly different to the asset type
  75. /// </summary>
  76. private int _invType;
  77. /// <summary>
  78. /// The name of the inventory item (must be less than 64 characters)
  79. /// </summary>
  80. private string _name;
  81. /// <summary>
  82. ///
  83. /// </summary>
  84. private LLUUID _groupID;
  85. /// <summary>
  86. ///
  87. /// </summary>
  88. private bool _groupOwned;
  89. /// <summary>
  90. ///
  91. /// </summary>
  92. private int _salePrice;
  93. /// <summary>
  94. ///
  95. /// </summary>
  96. private byte _saleType;
  97. /// <summary>
  98. ///
  99. /// </summary>
  100. private uint _flags;
  101. /// <summary>
  102. ///
  103. /// </summary>
  104. private int _creationDate;
  105. public virtual LLUUID ID {
  106. get {
  107. return _id;
  108. }
  109. set {
  110. _id = value;
  111. }
  112. }
  113. public virtual int InvType
  114. {
  115. get { return _invType; }
  116. set { _invType = value; }
  117. }
  118. public virtual LLUUID Folder
  119. {
  120. get { return _folder; }
  121. set { _folder = value; }
  122. }
  123. public virtual LLUUID Owner
  124. {
  125. get { return _owner; }
  126. set { _owner = value; }
  127. }
  128. public virtual LLUUID Creator
  129. {
  130. get { return _creator; }
  131. set { _creator = value; }
  132. }
  133. public virtual string Name
  134. {
  135. get { return _name; }
  136. set { _name = value; }
  137. }
  138. public virtual string Description
  139. {
  140. get { return _description; }
  141. set { _description = value; }
  142. }
  143. public virtual uint NextPermissions
  144. {
  145. get { return _nextPermissions; }
  146. set { _nextPermissions = value; }
  147. }
  148. public virtual uint CurrentPermissions
  149. {
  150. get { return _currentPermissions; }
  151. set { _currentPermissions = value; }
  152. }
  153. public virtual uint BasePermissions
  154. {
  155. get { return _basePermissions; }
  156. set { _basePermissions = value; }
  157. }
  158. public virtual uint EveryOnePermissions
  159. {
  160. get { return _everyOnePermissions; }
  161. set { _everyOnePermissions = value; }
  162. }
  163. public virtual int AssetType
  164. {
  165. get { return _assetType; }
  166. set { _assetType = value; }
  167. }
  168. public virtual LLUUID AssetID
  169. {
  170. get { return _assetID; }
  171. set { _assetID = value; }
  172. }
  173. public virtual LLUUID GroupID
  174. {
  175. get
  176. {
  177. return _groupID;
  178. }
  179. set
  180. {
  181. _groupID = value;
  182. }
  183. }
  184. public virtual bool GroupOwned
  185. {
  186. get
  187. {
  188. return _groupOwned;
  189. }
  190. set
  191. {
  192. _groupOwned = value;
  193. }
  194. }
  195. public virtual int SalePrice
  196. {
  197. get
  198. {
  199. return _salePrice;
  200. }
  201. set
  202. {
  203. _salePrice = value;
  204. }
  205. }
  206. public virtual byte SaleType
  207. {
  208. get
  209. {
  210. return _saleType;
  211. }
  212. set
  213. {
  214. _saleType = value;
  215. }
  216. }
  217. public virtual uint Flags
  218. {
  219. get
  220. {
  221. return _flags;
  222. }
  223. set
  224. {
  225. _flags = value;
  226. }
  227. }
  228. public virtual int CreationDate
  229. {
  230. get
  231. {
  232. return _creationDate;
  233. }
  234. set
  235. {
  236. _creationDate = value;
  237. }
  238. }
  239. }
  240. }