aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs11
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs31
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCache.cs5
-rw-r--r--OpenSim/Framework/IClientAPI.cs4
4 files changed, 37 insertions, 14 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 0ea33ff..99041c1 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -239,6 +239,17 @@ namespace OpenSim.Framework.Communications.Cache
239 //Todo should delete it from memory too 239 //Todo should delete it from memory too
240 } 240 }
241 241
242 public AssetBase CopyAsset(LLUUID assetID)
243 {
244 AssetBase asset = GetAsset(assetID);
245 if (asset == null)
246 return null;
247
248 asset.FullID = LLUUID.Random(); // TODO: check for conflicts
249 AddAsset(asset);
250 return asset;
251 }
252
242 /// <summary> 253 /// <summary>
243 /// 254 ///
244 /// </summary> 255 /// </summary>
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 05caa84..62251bc 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -88,7 +88,8 @@ namespace OpenSim.Framework.Communications.Cache
88 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000002"); 88 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000002");
89 item.inventoryDescription = "Plywood texture"; 89 item.inventoryDescription = "Plywood texture";
90 item.inventoryName = "Plywood"; 90 item.inventoryName = "Plywood";
91 item.assetType = 0; 91 item.assetType = (int) AssetType.Texture;
92 item.invType = (int) InventoryType.Texture;
92 item.parentFolderID = m_textureFolder.folderID; 93 item.parentFolderID = m_textureFolder.folderID;
93 item.inventoryBasePermissions = 0x7FFFFFFF; 94 item.inventoryBasePermissions = 0x7FFFFFFF;
94 item.inventoryEveryOnePermissions = 0x7FFFFFFF; 95 item.inventoryEveryOnePermissions = 0x7FFFFFFF;
@@ -103,7 +104,8 @@ namespace OpenSim.Framework.Communications.Cache
103 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000003"); 104 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000003");
104 item.inventoryDescription = "Rocks texture"; 105 item.inventoryDescription = "Rocks texture";
105 item.inventoryName = "Rocks"; 106 item.inventoryName = "Rocks";
106 item.assetType = 0; 107 item.assetType = (int) AssetType.Texture;
108 item.invType = (int) InventoryType.Texture;
107 item.parentFolderID = m_textureFolder.folderID; 109 item.parentFolderID = m_textureFolder.folderID;
108 item.inventoryBasePermissions = 0x7FFFFFFF; 110 item.inventoryBasePermissions = 0x7FFFFFFF;
109 item.inventoryEveryOnePermissions = 0x7FFFFFFF; 111 item.inventoryEveryOnePermissions = 0x7FFFFFFF;
@@ -118,7 +120,8 @@ namespace OpenSim.Framework.Communications.Cache
118 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000001"); 120 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000001");
119 item.inventoryDescription = "Bricks texture"; 121 item.inventoryDescription = "Bricks texture";
120 item.inventoryName = "Bricks"; 122 item.inventoryName = "Bricks";
121 item.assetType = 0; 123 item.assetType = (int) AssetType.Texture;
124 item.invType = (int) InventoryType.Texture;
122 item.parentFolderID = m_textureFolder.folderID; 125 item.parentFolderID = m_textureFolder.folderID;
123 item.inventoryBasePermissions = 0x7FFFFFFF; 126 item.inventoryBasePermissions = 0x7FFFFFFF;
124 item.inventoryEveryOnePermissions = 0x7FFFFFFF; 127 item.inventoryEveryOnePermissions = 0x7FFFFFFF;
@@ -133,7 +136,8 @@ namespace OpenSim.Framework.Communications.Cache
133 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000004"); 136 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000004");
134 item.inventoryDescription = "Granite texture"; 137 item.inventoryDescription = "Granite texture";
135 item.inventoryName = "Granite"; 138 item.inventoryName = "Granite";
136 item.assetType = 0; 139 item.assetType = (int) AssetType.Texture;
140 item.invType = (int) InventoryType.Texture;
137 item.parentFolderID = m_textureFolder.folderID; 141 item.parentFolderID = m_textureFolder.folderID;
138 item.inventoryBasePermissions = 0x7FFFFFFF; 142 item.inventoryBasePermissions = 0x7FFFFFFF;
139 item.inventoryEveryOnePermissions = 0x7FFFFFFF; 143 item.inventoryEveryOnePermissions = 0x7FFFFFFF;
@@ -148,7 +152,8 @@ namespace OpenSim.Framework.Communications.Cache
148 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000005"); 152 item.assetID = new LLUUID("00000000-0000-0000-9999-000000000005");
149 item.inventoryDescription = "Hardwood texture"; 153 item.inventoryDescription = "Hardwood texture";
150 item.inventoryName = "Hardwood"; 154 item.inventoryName = "Hardwood";
151 item.assetType = 0; 155 item.assetType = (int) AssetType.Texture;
156 item.invType = (int) InventoryType.Texture;
152 item.parentFolderID = m_textureFolder.folderID; 157 item.parentFolderID = m_textureFolder.folderID;
153 item.inventoryBasePermissions = 0x7FFFFFFF; 158 item.inventoryBasePermissions = 0x7FFFFFFF;
154 item.inventoryEveryOnePermissions = 0x7FFFFFFF; 159 item.inventoryEveryOnePermissions = 0x7FFFFFFF;
@@ -163,8 +168,8 @@ namespace OpenSim.Framework.Communications.Cache
163 item.assetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); 168 item.assetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
164 item.inventoryDescription = "Default Shape"; 169 item.inventoryDescription = "Default Shape";
165 item.inventoryName = "Default Shape"; 170 item.inventoryName = "Default Shape";
166 item.assetType = 13; 171 item.assetType = (int) AssetType.Bodypart;
167 item.invType = 18; 172 item.invType = (int) InventoryType.Wearable;
168 item.parentFolderID = folderID; 173 item.parentFolderID = folderID;
169 item.inventoryCurrentPermissions = 0; 174 item.inventoryCurrentPermissions = 0;
170 item.inventoryNextPermissions = 0; 175 item.inventoryNextPermissions = 0;
@@ -177,8 +182,8 @@ namespace OpenSim.Framework.Communications.Cache
177 item.assetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); 182 item.assetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb");
178 item.inventoryDescription = "Default Skin"; 183 item.inventoryDescription = "Default Skin";
179 item.inventoryName = "Default Skin"; 184 item.inventoryName = "Default Skin";
180 item.assetType = 13; 185 item.assetType = (int) AssetType.Bodypart;
181 item.invType = 18; 186 item.invType = (int) InventoryType.Wearable;
182 item.parentFolderID = folderID; 187 item.parentFolderID = folderID;
183 item.inventoryCurrentPermissions = 0; 188 item.inventoryCurrentPermissions = 0;
184 item.inventoryNextPermissions = 0; 189 item.inventoryNextPermissions = 0;
@@ -191,8 +196,8 @@ namespace OpenSim.Framework.Communications.Cache
191 item.assetID = new LLUUID("00000000-38f9-1111-024e-222222111110"); 196 item.assetID = new LLUUID("00000000-38f9-1111-024e-222222111110");
192 item.inventoryDescription = "Default Shirt"; 197 item.inventoryDescription = "Default Shirt";
193 item.inventoryName = "Default Shirt"; 198 item.inventoryName = "Default Shirt";
194 item.assetType = 5; 199 item.assetType = (int) AssetType.Clothing;
195 item.invType = 18; 200 item.invType = (int) InventoryType.Wearable;
196 item.parentFolderID = folderID; 201 item.parentFolderID = folderID;
197 item.inventoryCurrentPermissions = 0; 202 item.inventoryCurrentPermissions = 0;
198 item.inventoryNextPermissions = 0; 203 item.inventoryNextPermissions = 0;
@@ -205,8 +210,8 @@ namespace OpenSim.Framework.Communications.Cache
205 item.assetID = new LLUUID("00000000-38f9-1111-024e-222222111120"); 210 item.assetID = new LLUUID("00000000-38f9-1111-024e-222222111120");
206 item.inventoryDescription = "Default Pants"; 211 item.inventoryDescription = "Default Pants";
207 item.inventoryName = "Default Pants"; 212 item.inventoryName = "Default Pants";
208 item.assetType = 5; 213 item.assetType = (int) AssetType.Clothing;
209 item.invType = 18; 214 item.invType = (int) InventoryType.Wearable;
210 item.parentFolderID = folderID; 215 item.parentFolderID = folderID;
211 item.inventoryCurrentPermissions = 0; 216 item.inventoryCurrentPermissions = 0;
212 item.inventoryNextPermissions = 0; 217 item.inventoryNextPermissions = 0;
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
index 74b2440..117ed36 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs
@@ -74,7 +74,10 @@ namespace OpenSim.Framework.Communications.Cache
74 74
75 public CachedUserInfo GetUserDetails(LLUUID userID) 75 public CachedUserInfo GetUserDetails(LLUUID userID)
76 { 76 {
77 return m_userProfiles[userID]; 77 if (m_userProfiles.ContainsKey(userID))
78 return m_userProfiles[userID];
79 else
80 return null;
78 } 81 }
79 82
80 public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, 83 public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType,
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index ada5ff0..23181bf 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -272,6 +272,9 @@ namespace OpenSim.Framework
272 public delegate void UpdateInventoryItemTransaction( 272 public delegate void UpdateInventoryItemTransaction(
273 IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID); 273 IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID);
274 274
275 public delegate void CopyInventoryItem(
276 IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID, string newName);
277
275 public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID); 278 public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID);
276 279
277 public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID); 280 public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID);
@@ -344,6 +347,7 @@ namespace OpenSim.Framework
344 event FetchInventory OnFetchInventory; 347 event FetchInventory OnFetchInventory;
345 event RequestTaskInventory OnRequestTaskInventory; 348 event RequestTaskInventory OnRequestTaskInventory;
346 event UpdateInventoryItemTransaction OnUpdateInventoryItem; 349 event UpdateInventoryItemTransaction OnUpdateInventoryItem;
350 event CopyInventoryItem OnCopyInventoryItem;
347 event UDPAssetUploadRequest OnAssetUploadRequest; 351 event UDPAssetUploadRequest OnAssetUploadRequest;
348 event XferReceive OnXferReceive; 352 event XferReceive OnXferReceive;
349 event RequestXfer OnRequestXfer; 353 event RequestXfer OnRequestXfer;