aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache
diff options
context:
space:
mode:
authorMW2007-08-14 17:29:15 +0000
committerMW2007-08-14 17:29:15 +0000
commit181a90967ee9084676f84e74b2393855218c5723 (patch)
tree7eee2ef5dba2b95827e2849a8981075786cb5cc3 /OpenSim/Framework/Communications/Cache
parentCorrect caps of Default.lsl for Linux. Thanks again krinkec. :) (diff)
downloadopensim-SC_OLD-181a90967ee9084676f84e74b2393855218c5723.zip
opensim-SC_OLD-181a90967ee9084676f84e74b2393855218c5723.tar.gz
opensim-SC_OLD-181a90967ee9084676f84e74b2393855218c5723.tar.bz2
opensim-SC_OLD-181a90967ee9084676f84e74b2393855218c5723.tar.xz
Start of inventory items, when you upload a texture the data will now be stored in the inventory database and you will still have that texture in inventory on later logins (Again only in standalone mode with authentication.)
Also there might be some problems if you upload textures in other regions to the start one (due to us not updating the CAPS url properly).
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetTransactions.cs4
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs21
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCache.cs2
3 files changed, 23 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
index c906b76..e12d234 100644
--- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs
@@ -128,7 +128,7 @@ namespace OpenSim.Framework.Communications.Caches
128 } 128 }
129 if (this.OnUpLoad != null) 129 if (this.OnUpLoad != null)
130 { 130 {
131 this.OnUpLoad(this.m_assetName, this.newAssetID, inventoryItemID, data); 131 this.OnUpLoad(this.m_assetName, "description", this.newAssetID, inventoryItemID, LLUUID.Zero, data);
132 } 132 }
133 return text; 133 return text;
134 } 134 }
@@ -266,7 +266,7 @@ namespace OpenSim.Framework.Communications.Caches
266 } 266 }
267 if (this.OnUpLoad != null) 267 if (this.OnUpLoad != null)
268 { 268 {
269 this.OnUpLoad(this.m_assetName, this.newAssetID, inventoryItemID, data); 269 this.OnUpLoad(this.m_assetName, "description", this.newAssetID, inventoryItemID, LLUUID.Zero, data);
270 } 270 }
271 return text; 271 return text;
272 } 272 }
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index fc2f948..123e692 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -40,10 +40,16 @@ namespace OpenSim.Framework.Communications.Caches
40{ 40{
41 public class CachedUserInfo 41 public class CachedUserInfo
42 { 42 {
43 private CommunicationsManager m_parentCommsManager;
43 // Fields 44 // Fields
44 public InventoryFolder RootFolder = null; 45 public InventoryFolder RootFolder = null;
45 public UserProfileData UserProfile = null; 46 public UserProfileData UserProfile = null;
46 47
48 public CachedUserInfo(CommunicationsManager commsManager)
49 {
50 m_parentCommsManager = commsManager;
51 }
52
47 // Methods 53 // Methods
48 public void FolderReceive(LLUUID userID, InventoryFolder folderInfo) 54 public void FolderReceive(LLUUID userID, InventoryFolder folderInfo)
49 { 55 {
@@ -73,6 +79,7 @@ namespace OpenSim.Framework.Communications.Caches
73 79
74 public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo) 80 public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo)
75 { 81 {
82 Console.WriteLine("received new inventory item " + itemInfo.inventoryID + " with asset id of " + itemInfo.assetID);
76 if ((userID == this.UserProfile.UUID) && (this.RootFolder != null)) 83 if ((userID == this.UserProfile.UUID) && (this.RootFolder != null))
77 { 84 {
78 if (itemInfo.parentFolderID == this.RootFolder.folderID) 85 if (itemInfo.parentFolderID == this.RootFolder.folderID)
@@ -84,11 +91,23 @@ namespace OpenSim.Framework.Communications.Caches
84 InventoryFolder folder = this.RootFolder.HasSubFolder(itemInfo.parentFolderID); 91 InventoryFolder folder = this.RootFolder.HasSubFolder(itemInfo.parentFolderID);
85 if (folder != null) 92 if (folder != null)
86 { 93 {
87 folder.Items.Add(itemInfo.inventoryID, itemInfo); 94 folder.Items.Add(itemInfo.inventoryID, itemInfo);
88 } 95 }
89 } 96 }
90 } 97 }
91 } 98 }
99
100 public void AddItem(LLUUID userID, InventoryItemBase itemInfo)
101 {
102 if ((userID == this.UserProfile.UUID) && (this.RootFolder != null))
103 {
104 this.ItemReceive(userID, itemInfo);
105 Console.WriteLine("now adding inventory item to database");
106 this.m_parentCommsManager.InventoryServer.AddNewInventoryItem(userID, itemInfo);
107 }
108 }
92 } 109 }
110
111
93} 112}
94 113
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
index e65b6b2..02c5f65 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Framework.Communications.Caches
61 { 61 {
62 if (!this.UserProfiles.ContainsKey(userID)) 62 if (!this.UserProfiles.ContainsKey(userID))
63 { 63 {
64 CachedUserInfo userInfo = new CachedUserInfo(); 64 CachedUserInfo userInfo = new CachedUserInfo(this.m_parent);
65 userInfo.UserProfile = this.RequestUserProfileForUser(userID); 65 userInfo.UserProfile = this.RequestUserProfileForUser(userID);
66 if (userInfo.UserProfile != null) 66 if (userInfo.UserProfile != null)
67 { 67 {