diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/InventoryItemBase.cs | 231 |
2 files changed, 65 insertions, 170 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index a625c7e..bc8437c 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | |||
@@ -396,7 +396,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
396 | } | 396 | } |
397 | 397 | ||
398 | /// <summary> | 398 | /// <summary> |
399 | /// Return a copy of the list of child items in this folder | 399 | /// Return a copy of the list of child items in this folder. The items themselves are the originals. |
400 | /// </summary> | 400 | /// </summary> |
401 | public List<InventoryItemBase> RequestListOfItems() | 401 | public List<InventoryItemBase> RequestListOfItems() |
402 | { | 402 | { |
@@ -416,7 +416,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
416 | } | 416 | } |
417 | 417 | ||
418 | /// <summary> | 418 | /// <summary> |
419 | /// Return a copy of the list of child folders in this folder. | 419 | /// Return a copy of the list of child folders in this folder. The folders themselves are the originals. |
420 | /// </summary> | 420 | /// </summary> |
421 | public List<InventoryFolderBase> RequestListOfFolders() | 421 | public List<InventoryFolderBase> RequestListOfFolders() |
422 | { | 422 | { |
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index ae3777c..ce3dc63 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs | |||
@@ -34,219 +34,114 @@ namespace OpenSim.Framework | |||
34 | /// Inventory Item - contains all the properties associated with an individual inventory piece. | 34 | /// Inventory Item - contains all the properties associated with an individual inventory piece. |
35 | /// </summary> | 35 | /// </summary> |
36 | public class InventoryItemBase : InventoryNodeBase | 36 | public class InventoryItemBase : InventoryNodeBase |
37 | { | 37 | { |
38 | /// <summary> | 38 | /// <summary> |
39 | /// The UUID of the associated asset on the asset server | 39 | /// The inventory type of the item. This is slightly different from the asset type in some situations. |
40 | /// </summary> | 40 | /// </summary> |
41 | private UUID _assetID; | 41 | public int InvType; |
42 | |||
43 | /// <summary> | ||
44 | /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) | ||
45 | /// </summary> | ||
46 | private int _assetType; | ||
47 | 42 | ||
48 | /// <summary> | 43 | /// <summary> |
49 | /// | 44 | /// The folder this item is contained in |
50 | /// </summary> | 45 | /// </summary> |
51 | private uint _basePermissions; | 46 | public UUID Folder; |
52 | 47 | ||
53 | /// <summary> | 48 | /// <value> |
54 | /// The creator of this item | 49 | /// The creator of this item |
55 | /// </summary> | 50 | /// </value> |
56 | private string m_creatorId = String.Empty; | 51 | public string CreatorId |
52 | { | ||
53 | get { return m_creatorId; } | ||
54 | set | ||
55 | { | ||
56 | m_creatorId = value; | ||
57 | UUID creatorIdAsUuid; | ||
58 | |||
59 | // For now, all IDs are UUIDs | ||
60 | UUID.TryParse(m_creatorId, out creatorIdAsUuid); | ||
61 | CreatorIdAsUuid = creatorIdAsUuid; | ||
62 | } | ||
63 | } | ||
64 | |||
65 | private string m_creatorId = String.Empty; | ||
57 | 66 | ||
58 | /// <summary> | 67 | /// <value> |
59 | /// The creator of this item expressed as a UUID | 68 | /// The creator of this item expressed as a UUID |
60 | /// </summary> | 69 | /// </value> |
61 | private UUID m_creatorIdAsUuid = UUID.Zero; | 70 | public UUID CreatorIdAsUuid { get; private set; } |
62 | 71 | ||
63 | /// <summary> | 72 | /// <summary> |
73 | /// The description of the inventory item (must be less than 64 characters) | ||
74 | /// </summary> | ||
75 | public string Description = String.Empty; | ||
76 | |||
77 | /// <value> | ||
64 | /// | 78 | /// |
65 | /// </summary> | 79 | /// </value> |
66 | private uint _nextPermissions; | 80 | public uint NextPermissions; |
67 | 81 | ||
68 | /// <summary> | 82 | /// <summary> |
69 | /// A mask containing permissions for the current owner (cannot be enforced) | 83 | /// A mask containing permissions for the current owner (cannot be enforced) |
70 | /// </summary> | 84 | /// </summary> |
71 | private uint _currentPermissions; | 85 | public uint CurrentPermissions; |
72 | 86 | ||
73 | /// <summary> | 87 | /// <summary> |
74 | /// The description of the inventory item (must be less than 64 characters) | 88 | /// |
75 | /// </summary> | 89 | /// </summary> |
76 | private string _description = string.Empty; | 90 | public uint BasePermissions; |
77 | 91 | ||
78 | /// <summary> | 92 | /// <summary> |
79 | /// | 93 | /// |
80 | /// </summary> | 94 | /// </summary> |
81 | private uint _everyOnePermissions; | 95 | public uint EveryOnePermissions; |
82 | 96 | ||
83 | /// <summary> | 97 | /// <summary> |
84 | /// | 98 | /// |
85 | /// </summary> | 99 | /// </summary> |
86 | private uint _groupPermissions; | 100 | public uint GroupPermissions; |
87 | 101 | ||
88 | /// <summary> | 102 | /// <summary> |
89 | /// The folder this item is contained in | 103 | /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) |
90 | /// </summary> | 104 | /// </summary> |
91 | private UUID _folder; | 105 | public int AssetType; |
92 | 106 | ||
93 | /// <summary> | 107 | /// <summary> |
94 | /// The inventory type of the item. This is slightly different from the asset type in some situations. | 108 | /// The UUID of the associated asset on the asset server |
95 | /// </summary> | 109 | /// </summary> |
96 | private int _invType; | 110 | public UUID AssetID; |
97 | 111 | ||
98 | /// <summary> | 112 | /// <summary> |
99 | /// | 113 | /// |
100 | /// </summary> | 114 | /// </summary> |
101 | private UUID _groupID; | 115 | public UUID GroupID; |
102 | 116 | ||
103 | /// <summary> | 117 | /// <summary> |
104 | /// | 118 | /// |
105 | /// </summary> | 119 | /// </summary> |
106 | private bool _groupOwned; | 120 | public bool GroupOwned; |
107 | 121 | ||
108 | /// <summary> | 122 | /// <summary> |
109 | /// | 123 | /// |
110 | /// </summary> | 124 | /// </summary> |
111 | private int _salePrice; | 125 | public int SalePrice; |
112 | 126 | ||
113 | /// <summary> | 127 | /// <summary> |
114 | /// | 128 | /// |
115 | /// </summary> | 129 | /// </summary> |
116 | private byte _saleType; | 130 | public byte SaleType; |
117 | 131 | ||
118 | /// <summary> | 132 | /// <summary> |
119 | /// | 133 | /// |
120 | /// </summary> | 134 | /// </summary> |
121 | private uint _flags; | 135 | public uint Flags; |
122 | 136 | ||
123 | /// <summary> | 137 | /// <summary> |
124 | /// | 138 | /// |
125 | /// </summary> | 139 | /// </summary> |
126 | private int _creationDate; | 140 | public int CreationDate; |
127 | |||
128 | public int InvType | ||
129 | { | ||
130 | get { return _invType; } | ||
131 | set { _invType = value; } | ||
132 | } | ||
133 | |||
134 | public UUID Folder | ||
135 | { | ||
136 | get { return _folder; } | ||
137 | set { _folder = value; } | ||
138 | } | ||
139 | |||
140 | /// <value> | ||
141 | /// The creator ID | ||
142 | /// </value> | ||
143 | public string CreatorId | ||
144 | { | ||
145 | get { return m_creatorId; } | ||
146 | set | ||
147 | { | ||
148 | m_creatorId = value; | ||
149 | |||
150 | // For now, all IDs are UUIDs | ||
151 | UUID.TryParse(m_creatorId, out m_creatorIdAsUuid); | ||
152 | } | ||
153 | } | ||
154 | |||
155 | /// <value> | ||
156 | /// The creator ID expressed as a UUID | ||
157 | /// </value> | ||
158 | public UUID CreatorIdAsUuid | ||
159 | { | ||
160 | get { return m_creatorIdAsUuid; } | ||
161 | } | ||
162 | |||
163 | public string Description | ||
164 | { | ||
165 | get { return _description; } | ||
166 | set { _description = value; } | ||
167 | } | ||
168 | |||
169 | public uint NextPermissions | ||
170 | { | ||
171 | get { return _nextPermissions; } | ||
172 | set { _nextPermissions = value; } | ||
173 | } | ||
174 | |||
175 | public uint CurrentPermissions | ||
176 | { | ||
177 | get { return _currentPermissions; } | ||
178 | set { _currentPermissions = value; } | ||
179 | } | ||
180 | |||
181 | public uint BasePermissions | ||
182 | { | ||
183 | get { return _basePermissions; } | ||
184 | set { _basePermissions = value; } | ||
185 | } | ||
186 | |||
187 | public uint EveryOnePermissions | ||
188 | { | ||
189 | get { return _everyOnePermissions; } | ||
190 | set { _everyOnePermissions = value; } | ||
191 | } | ||
192 | |||
193 | public uint GroupPermissions | ||
194 | { | ||
195 | get { return _groupPermissions; } | ||
196 | set { _groupPermissions = value; } | ||
197 | } | ||
198 | |||
199 | public int AssetType | ||
200 | { | ||
201 | get { return _assetType; } | ||
202 | set { _assetType = value; } | ||
203 | } | ||
204 | |||
205 | public UUID AssetID | ||
206 | { | ||
207 | get { return _assetID; } | ||
208 | set { _assetID = value; } | ||
209 | } | ||
210 | |||
211 | public UUID GroupID | ||
212 | { | ||
213 | get { return _groupID; } | ||
214 | set { _groupID = value; } | ||
215 | } | ||
216 | |||
217 | public bool GroupOwned | ||
218 | { | ||
219 | get { return _groupOwned; } | ||
220 | set { _groupOwned = value; } | ||
221 | } | ||
222 | |||
223 | public int SalePrice | ||
224 | { | ||
225 | get { return _salePrice; } | ||
226 | set { _salePrice = value; } | ||
227 | } | ||
228 | |||
229 | public byte SaleType | ||
230 | { | ||
231 | get { return _saleType; } | ||
232 | set { _saleType = value; } | ||
233 | } | ||
234 | |||
235 | public uint Flags | ||
236 | { | ||
237 | get { return _flags; } | ||
238 | set { _flags = value; } | ||
239 | } | ||
240 | |||
241 | public int CreationDate | ||
242 | { | ||
243 | get { return _creationDate; } | ||
244 | set { _creationDate = value; } | ||
245 | } | ||
246 | 141 | ||
247 | public InventoryItemBase() | 142 | public InventoryItemBase() |
248 | { | 143 | { |
249 | _creationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; | 144 | CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; |
250 | } | 145 | } |
251 | } | 146 | } |
252 | } | 147 | } |