aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-30 16:08:24 +0000
committerTeravus Ovares2008-04-30 16:08:24 +0000
commita9cc76e0efba7496909d613c75b81de6a9c5d979 (patch)
treee83763d4dfb3b78ead9b5926dce1d2468b496845 /OpenSim/Framework
parentmove IUserService into the OpenSim.Framework.Communications assembly (diff)
downloadopensim-SC-a9cc76e0efba7496909d613c75b81de6a9c5d979.zip
opensim-SC-a9cc76e0efba7496909d613c75b81de6a9c5d979.tar.gz
opensim-SC-a9cc76e0efba7496909d613c75b81de6a9c5d979.tar.bz2
opensim-SC-a9cc76e0efba7496909d613c75b81de6a9c5d979.tar.xz
* Long awaited patch from A_Biondi Mantis 923. Kept alive by Melanie. Thanks A_Biondi and Melanie!
* This builds but might not work. JustinCC will examine.. it may work out of the box.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs2
-rw-r--r--OpenSim/Framework/Communications/IInventoryServices.cs7
-rw-r--r--OpenSim/Framework/Communications/InventoryServiceBase.cs11
-rw-r--r--OpenSim/Framework/IClientAPI.cs9
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs118
5 files changed, 134 insertions, 13 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 9749366..847909a 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -325,7 +325,7 @@ namespace OpenSim.Framework.Communications.Cache
325 { 325 {
326 if ((userID == UserProfile.ID) && HasInventory) 326 if ((userID == UserProfile.ID) && HasInventory)
327 { 327 {
328 m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); 328 m_commsManager.InventoryService.UpdateInventoryItem(userID, itemInfo);
329 } 329 }
330 } 330 }
331 331
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs
index 5690f89..c82c946 100644
--- a/OpenSim/Framework/Communications/IInventoryServices.cs
+++ b/OpenSim/Framework/Communications/IInventoryServices.cs
@@ -78,6 +78,13 @@ namespace OpenSim.Framework.Communications
78 void AddNewInventoryItem(LLUUID userID, InventoryItemBase item); 78 void AddNewInventoryItem(LLUUID userID, InventoryItemBase item);
79 79
80 /// <summary> 80 /// <summary>
81 /// Update an item in the given user's inventory
82 /// </summary>
83 /// <param name="userID"></param>
84 /// <param name="item"></param>
85 void UpdateInventoryItem(LLUUID userID, InventoryItemBase item);
86
87 /// <summary>
81 /// Delete an item from the given user's inventory 88 /// Delete an item from the given user's inventory
82 /// </summary> 89 /// </summary>
83 /// <param name="userID"></param> 90 /// <param name="userID"></param>
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index 0528b91..dab6a16 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -172,6 +172,9 @@ namespace OpenSim.Framework.Communications
172 172
173 // See IInventoryServices 173 // See IInventoryServices
174 public abstract void AddNewInventoryItem(LLUUID userID, InventoryItemBase item); 174 public abstract void AddNewInventoryItem(LLUUID userID, InventoryItemBase item);
175
176 // See IInventoryServices
177 public abstract void UpdateInventoryItem(LLUUID userID, InventoryItemBase item);
175 178
176 // See IInventoryServices 179 // See IInventoryServices
177 public abstract void DeleteInventoryItem(LLUUID userID, InventoryItemBase item); 180 public abstract void DeleteInventoryItem(LLUUID userID, InventoryItemBase item);
@@ -230,6 +233,14 @@ namespace OpenSim.Framework.Communications
230 } 233 }
231 } 234 }
232 235
236 protected void UpdateItem(InventoryItemBase item)
237 {
238 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
239 {
240 plugin.Value.updateInventoryItem(item);
241 }
242 }
243
233 protected void DeleteItem(InventoryItemBase item) 244 protected void DeleteItem(InventoryItemBase item)
234 { 245 {
235 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) 246 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 20d4e62..9bcd65f 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -393,9 +393,12 @@ namespace OpenSim.Framework
393 393
394 public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID); 394 public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
395 395
396 public delegate void UpdateInventoryItem( 396/* public delegate void UpdateInventoryItem(
397 IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, string name, string description, 397 IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, string name, string description,
398 uint nextOwnerMask); 398 uint nextOwnerMask);*/
399
400 public delegate void UpdateInventoryItem(
401 IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, InventoryItemBase itemUpd);
399 402
400 public delegate void CopyInventoryItem( 403 public delegate void CopyInventoryItem(
401 IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID, 404 IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID,
@@ -756,4 +759,4 @@ namespace OpenSim.Framework
756 public byte[] usecircuit; 759 public byte[] usecircuit;
757 public EndPoint userEP; 760 public EndPoint userEP;
758 } 761 }
759} \ No newline at end of file 762}
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 3d75a8a..dbf2085 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -54,6 +54,10 @@ namespace OpenSim.Framework
54 /// </summary> 54 /// </summary>
55 private LLUUID _creator; 55 private LLUUID _creator;
56 56
57 private LLUUID _owner;
58
59 private uint _nextPermissions;
60
57 /// <summary> 61 /// <summary>
58 /// A mask containing permissions for the current owner (cannot be enforced) 62 /// A mask containing permissions for the current owner (cannot be enforced)
59 /// </summary> 63 /// </summary>
@@ -89,20 +93,44 @@ namespace OpenSim.Framework
89 /// </summary> 93 /// </summary>
90 private string _name; 94 private string _name;
91 95
96
92 /// <summary> 97 /// <summary>
93 /// A mask containing the permissions for the next owner (cannot be enforced) 98 ///
94 /// </summary> 99 /// </summary>
95 private uint _nextPermissions; 100 private LLUUID _groupID;
96 101
97 /// <summary> 102 /// <summary>
98 /// The owner of this inventory item 103 ///
99 /// </summary> 104 /// </summary>
100 private LLUUID _owner; 105 private bool _groupOwned;
101 106
102 public LLUUID ID 107 /// <summary>
103 { 108 ///
104 get { return _id; } 109 /// </summary>
105 set { _id = value; } 110 private int _salePrice;
111
112 /// <summary>
113 ///
114 /// </summary>
115 private byte _saleType;
116
117 /// <summary>
118 ///
119 /// </summary>
120 private uint _flags;
121
122 /// <summary>
123 ///
124 /// </summary>
125 public int _creationDate;
126
127 public LLUUID ID {
128 get {
129 return _id;
130 }
131 set {
132 _id = value;
133 }
106 } 134 }
107 135
108 public int InvType 136 public int InvType
@@ -176,5 +204,77 @@ namespace OpenSim.Framework
176 get { return _assetID; } 204 get { return _assetID; }
177 set { _assetID = value; } 205 set { _assetID = value; }
178 } 206 }
207
208 public LLUUID GroupID
209 {
210 get
211 {
212 return _groupID;
213 }
214 set
215 {
216 _groupID = value;
217 }
218 }
219
220 public bool GroupOwned
221 {
222 get
223 {
224 return _groupOwned;
225 }
226 set
227 {
228 _groupOwned = value;
229 }
230 }
231
232 public int SalePrice
233 {
234 get
235 {
236 return _salePrice;
237 }
238 set
239 {
240 _salePrice = value;
241 }
242 }
243
244 public byte SaleType
245 {
246 get
247 {
248 return _saleType;
249 }
250 set
251 {
252 _saleType = value;
253 }
254 }
255
256 public uint Flags
257 {
258 get
259 {
260 return _flags;
261 }
262 set
263 {
264 _flags = value;
265 }
266 }
267
268 public int CreationDate
269 {
270 get
271 {
272 return _creationDate;
273 }
274 set
275 {
276 _creationDate = value;
277 }
278 }
179 } 279 }
180} \ No newline at end of file 280}