diff options
author | MW | 2007-08-19 13:35:20 +0000 |
---|---|---|
committer | MW | 2007-08-19 13:35:20 +0000 |
commit | c89db49f3cd3bbd60577eb5a1787ccf8dea930e3 (patch) | |
tree | 2b51b0d261724427933f543dd2f39ef8cd21127f /OpenSim/Framework | |
parent | Code comments on recent changes in EventQueueManager (diff) | |
download | opensim-SC_OLD-c89db49f3cd3bbd60577eb5a1787ccf8dea930e3.zip opensim-SC_OLD-c89db49f3cd3bbd60577eb5a1787ccf8dea930e3.tar.gz opensim-SC_OLD-c89db49f3cd3bbd60577eb5a1787ccf8dea930e3.tar.bz2 opensim-SC_OLD-c89db49f3cd3bbd60577eb5a1787ccf8dea930e3.tar.xz |
Sqlite datastore should now save the textures and extraparams data (used by sculpties) correctly. [Really need to add a ExtraParams field to the sqlite database though, but for now I have combined their data so that we don't lose backward compatibility, know a couple of people have been using the datastore already].
Now have a rough day/night cycle (the movement of the sun needs to be made smoother but for now it is better than we had I think).
Added dalien's patch (issue 294) for saving and loading prims to a xml file (think he will be modifying these to be import/export functions and maybe writing a xml datastore for backups).
Some preliminary work on task inventory (ie object's/prim's inventory).
Added place holder data for AvatarProperties (ie a avatar's profile). Should we store this sort of data on the user server or have another server for it (a normal webserver should work).
Added a few more method to IClientAPI.
Sure there is something I'm forgeting.
Diffstat (limited to 'OpenSim/Framework')
5 files changed, 64 insertions, 28 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs index 7f52739..addd20a 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactions.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactions.cs | |||
@@ -156,7 +156,7 @@ namespace OpenSim.Framework.Communications.Caches | |||
156 | } | 156 | } |
157 | if (this.OnUpLoad != null) | 157 | if (this.OnUpLoad != null) |
158 | { | 158 | { |
159 | this.OnUpLoad(this.m_assetName, "description", this.newAssetID, inventoryItemID, LLUUID.Zero, data); | 159 | this.OnUpLoad(this.m_assetName, "description", this.newAssetID, inventoryItemID, LLUUID.Zero, data, "" , ""); |
160 | } | 160 | } |
161 | return text; | 161 | return text; |
162 | } | 162 | } |
@@ -373,7 +373,7 @@ namespace OpenSim.Framework.Communications.Caches | |||
373 | } | 373 | } |
374 | if (this.OnUpLoad != null) | 374 | if (this.OnUpLoad != null) |
375 | { | 375 | { |
376 | this.OnUpLoad(this.m_assetName, "description", this.newAssetID, inventoryItemID, LLUUID.Zero, data); | 376 | this.OnUpLoad(this.m_assetName, "description", this.newAssetID, inventoryItemID, LLUUID.Zero, data, "" , "" ); |
377 | } | 377 | } |
378 | return text; | 378 | return text; |
379 | } | 379 | } |
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 14f9c95..6afb35c 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -39,7 +39,7 @@ using OpenSim.Framework.Data; | |||
39 | 39 | ||
40 | namespace OpenSim.Region.Capabilities | 40 | namespace OpenSim.Region.Capabilities |
41 | { | 41 | { |
42 | public delegate void UpLoadedAsset(string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, byte[] data); | 42 | public delegate void UpLoadedAsset(string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, byte[] data, string inventoryType, string assetType); |
43 | public delegate LLUUID UpdateItem(LLUUID itemID, byte[] data); | 43 | public delegate LLUUID UpdateItem(LLUUID itemID, byte[] data); |
44 | public delegate void NewInventoryItem(LLUUID userID, InventoryItemBase item); | 44 | public delegate void NewInventoryItem(LLUUID userID, InventoryItemBase item); |
45 | public delegate LLUUID ItemUpdatedCallback(LLUUID userID, LLUUID itemID, byte[] data); | 45 | public delegate LLUUID ItemUpdatedCallback(LLUUID userID, LLUUID itemID, byte[] data); |
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Capabilities | |||
113 | /// <returns></returns> | 113 | /// <returns></returns> |
114 | public string CapsRequest(string request, string path, string param) | 114 | public string CapsRequest(string request, string path, string param) |
115 | { | 115 | { |
116 | //Console.WriteLine("caps request " + request); | 116 | // Console.WriteLine("caps request " + request); |
117 | string result = LLSDHelpers.SerialiseLLSDReply(this.GetCapabilities()); | 117 | string result = LLSDHelpers.SerialiseLLSDReply(this.GetCapabilities()); |
118 | return result; | 118 | return result; |
119 | } | 119 | } |
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Capabilities | |||
270 | /// <returns></returns> | 270 | /// <returns></returns> |
271 | public LLSDAssetUploadResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest) | 271 | public LLSDAssetUploadResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest) |
272 | { | 272 | { |
273 | // Console.WriteLine("asset upload request via CAPS"); | 273 | //Console.WriteLine("asset upload request via CAPS" + llsdRequest.inventory_type +" , "+ llsdRequest.asset_type); |
274 | 274 | ||
275 | string assetName = llsdRequest.name; | 275 | string assetName = llsdRequest.name; |
276 | string assetDes = llsdRequest.description; | 276 | string assetDes = llsdRequest.description; |
@@ -280,7 +280,7 @@ namespace OpenSim.Region.Capabilities | |||
280 | LLUUID parentFolder = llsdRequest.folder_id; | 280 | LLUUID parentFolder = llsdRequest.folder_id; |
281 | string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); | 281 | string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); |
282 | 282 | ||
283 | AssetUploader uploader = new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, "" , "", capsBase + uploaderPath, this.httpListener); | 283 | AssetUploader uploader = new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, llsdRequest.asset_type, capsBase + uploaderPath, this.httpListener); |
284 | httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); | 284 | httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); |
285 | string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath; | 285 | string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath; |
286 | 286 | ||
@@ -297,13 +297,27 @@ namespace OpenSim.Region.Capabilities | |||
297 | /// <param name="assetID"></param> | 297 | /// <param name="assetID"></param> |
298 | /// <param name="inventoryItem"></param> | 298 | /// <param name="inventoryItem"></param> |
299 | /// <param name="data"></param> | 299 | /// <param name="data"></param> |
300 | public void UploadCompleteHandler(string assetName, string assetDescription, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, byte[] data) | 300 | public void UploadCompleteHandler(string assetName, string assetDescription, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, byte[] data, string inventoryType, string assetType) |
301 | { | 301 | { |
302 | sbyte assType = 0; | ||
303 | sbyte inType = 0; | ||
304 | |||
305 | if (inventoryType == "sound") | ||
306 | { | ||
307 | inType = 1; | ||
308 | assType = 1; | ||
309 | } | ||
310 | else if (inventoryType == "animation") | ||
311 | { | ||
312 | inType = 19; | ||
313 | assType = 19; | ||
314 | } | ||
315 | |||
302 | AssetBase asset; | 316 | AssetBase asset; |
303 | asset = new AssetBase(); | 317 | asset = new AssetBase(); |
304 | asset.FullID = assetID; | 318 | asset.FullID = assetID; |
305 | asset.Type = 0; | 319 | asset.Type = assType; |
306 | asset.InvType = 0; | 320 | asset.InvType = inType; |
307 | asset.Name = assetName; | 321 | asset.Name = assetName; |
308 | asset.Data = data; | 322 | asset.Data = data; |
309 | this.assetCache.AddAsset(asset); | 323 | this.assetCache.AddAsset(asset); |
@@ -315,8 +329,8 @@ namespace OpenSim.Region.Capabilities | |||
315 | item.assetID = asset.FullID; | 329 | item.assetID = asset.FullID; |
316 | item.inventoryDescription = assetDescription; | 330 | item.inventoryDescription = assetDescription; |
317 | item.inventoryName = assetName; | 331 | item.inventoryName = assetName; |
318 | item.assetType = 0; | 332 | item.assetType = assType; |
319 | item.invType = 0; | 333 | item.invType = inType; |
320 | item.parentFolderID = parentFolder; | 334 | item.parentFolderID = parentFolder; |
321 | item.inventoryCurrentPermissions = 2147483647; | 335 | item.inventoryCurrentPermissions = 2147483647; |
322 | item.inventoryNextPermissions = 2147483647; | 336 | item.inventoryNextPermissions = 2147483647; |
@@ -350,6 +364,9 @@ namespace OpenSim.Region.Capabilities | |||
350 | private string m_assetName = ""; | 364 | private string m_assetName = ""; |
351 | private string m_assetDes = ""; | 365 | private string m_assetDes = ""; |
352 | 366 | ||
367 | private string m_invType = ""; | ||
368 | private string m_assetType = ""; | ||
369 | |||
353 | /// <summary> | 370 | /// <summary> |
354 | /// | 371 | /// |
355 | /// </summary> | 372 | /// </summary> |
@@ -366,6 +383,9 @@ namespace OpenSim.Region.Capabilities | |||
366 | uploaderPath = path; | 383 | uploaderPath = path; |
367 | httpListener = httpServer; | 384 | httpListener = httpServer; |
368 | parentFolder = parentFolderID; | 385 | parentFolder = parentFolderID; |
386 | m_assetType = assetType; | ||
387 | m_invType = invType; | ||
388 | |||
369 | } | 389 | } |
370 | 390 | ||
371 | /// <summary> | 391 | /// <summary> |
@@ -393,7 +413,7 @@ namespace OpenSim.Region.Capabilities | |||
393 | 413 | ||
394 | if (OnUpLoad != null) | 414 | if (OnUpLoad != null) |
395 | { | 415 | { |
396 | OnUpLoad(m_assetName, m_assetDes, newAssetID, inv, parentFolder, data); | 416 | OnUpLoad(m_assetName, m_assetDes, newAssetID, inv, parentFolder, data, m_invType, m_assetType); |
397 | } | 417 | } |
398 | 418 | ||
399 | return res; | 419 | return res; |
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index 8db1e15..2cedea0 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs | |||
@@ -89,6 +89,7 @@ namespace OpenSim.Framework.Interfaces | |||
89 | 89 | ||
90 | public delegate void UDPAssetUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data); | 90 | public delegate void UDPAssetUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data); |
91 | public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); | 91 | public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); |
92 | public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName); | ||
92 | 93 | ||
93 | public interface IClientAPI | 94 | public interface IClientAPI |
94 | { | 95 | { |
@@ -140,6 +141,7 @@ namespace OpenSim.Framework.Interfaces | |||
140 | event RequestTaskInventory OnRequestTaskInventory; | 141 | event RequestTaskInventory OnRequestTaskInventory; |
141 | event UDPAssetUploadRequest OnAssetUploadRequest; | 142 | event UDPAssetUploadRequest OnAssetUploadRequest; |
142 | event XferReceive OnXferReceive; | 143 | event XferReceive OnXferReceive; |
144 | event RequestXfer OnRequestXfer; | ||
143 | 145 | ||
144 | event UUIDNameRequest OnNameFromUUIDRequest; | 146 | event UUIDNameRequest OnNameFromUUIDRequest; |
145 | 147 | ||
@@ -212,11 +214,17 @@ namespace OpenSim.Framework.Interfaces | |||
212 | void SendInventoryItemUpdate(InventoryItemBase Item); | 214 | void SendInventoryItemUpdate(InventoryItemBase Item); |
213 | void SendRemoveInventoryItem(LLUUID itemID); | 215 | void SendRemoveInventoryItem(LLUUID itemID); |
214 | void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); | 216 | void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); |
217 | void SendXferPacket(ulong xferID, uint packet, byte[] data); | ||
218 | |||
219 | void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID); | ||
220 | void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags); | ||
215 | 221 | ||
216 | void SendNameReply(LLUUID profileId, string firstname, string lastname); | 222 | void SendNameReply(LLUUID profileId, string firstname, string lastname); |
217 | void SendAlertMessage(string message); | 223 | void SendAlertMessage(string message); |
218 | void SendAgentAlertMessage(string message, bool modal); | 224 | void SendAgentAlertMessage(string message, bool modal); |
219 | void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url); | 225 | void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url); |
220 | bool AddMoney( int debit ); | 226 | bool AddMoney( int debit ); |
227 | |||
228 | void SendViewerTime(int phase); | ||
221 | } | 229 | } |
222 | } | 230 | } |
diff --git a/OpenSim/Framework/General/NullClientAPI.cs b/OpenSim/Framework/General/NullClientAPI.cs index 6be2563..e001549 100644 --- a/OpenSim/Framework/General/NullClientAPI.cs +++ b/OpenSim/Framework/General/NullClientAPI.cs | |||
@@ -59,6 +59,7 @@ namespace OpenSim.Framework | |||
59 | public event RequestTaskInventory OnRequestTaskInventory; | 59 | public event RequestTaskInventory OnRequestTaskInventory; |
60 | public event UDPAssetUploadRequest OnAssetUploadRequest; | 60 | public event UDPAssetUploadRequest OnAssetUploadRequest; |
61 | public event XferReceive OnXferReceive; | 61 | public event XferReceive OnXferReceive; |
62 | public event RequestXfer OnRequestXfer; | ||
62 | 63 | ||
63 | public event UUIDNameRequest OnNameFromUUIDRequest; | 64 | public event UUIDNameRequest OnNameFromUUIDRequest; |
64 | 65 | ||
@@ -140,6 +141,10 @@ namespace OpenSim.Framework | |||
140 | public virtual void SendInventoryItemUpdate(InventoryItemBase Item) { } | 141 | public virtual void SendInventoryItemUpdate(InventoryItemBase Item) { } |
141 | public virtual void SendRemoveInventoryItem(LLUUID itemID) { } | 142 | public virtual void SendRemoveInventoryItem(LLUUID itemID) { } |
142 | public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) { } | 143 | public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) { } |
144 | public virtual void SendXferPacket(ulong xferID, uint packet, byte[] data) { } | ||
145 | |||
146 | public virtual void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID) { } | ||
147 | public virtual void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags) { } | ||
143 | 148 | ||
144 | public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname){} | 149 | public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname){} |
145 | public void SendAlertMessage(string message) { } | 150 | public void SendAlertMessage(string message) { } |
@@ -151,6 +156,8 @@ namespace OpenSim.Framework | |||
151 | { | 156 | { |
152 | return false; | 157 | return false; |
153 | } | 158 | } |
159 | |||
160 | public void SendViewerTime(int phase) { } | ||
154 | } | 161 | } |
155 | } | 162 | } |
156 | 163 | ||
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index 87cf173..728767f 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | |||
@@ -12,12 +12,12 @@ namespace OpenSim.Framework.Types | |||
12 | RightTriangle = 4, | 12 | RightTriangle = 4, |
13 | HalfCircle = 5 | 13 | HalfCircle = 5 |
14 | } | 14 | } |
15 | 15 | ||
16 | public enum HollowShape : byte | 16 | public enum HollowShape : byte |
17 | { | 17 | { |
18 | Same = 0, | 18 | Same = 0, |
19 | Circle = 16, | 19 | Circle = 16, |
20 | Square =32, | 20 | Square = 32, |
21 | Triangle = 48 | 21 | Triangle = 48 |
22 | } | 22 | } |
23 | 23 | ||
@@ -26,7 +26,7 @@ namespace OpenSim.Framework.Types | |||
26 | Primitive = 9, | 26 | Primitive = 9, |
27 | Avatar = 47 | 27 | Avatar = 47 |
28 | } | 28 | } |
29 | 29 | ||
30 | public enum Extrusion : byte | 30 | public enum Extrusion : byte |
31 | { | 31 | { |
32 | Straight = 16, | 32 | Straight = 16, |
@@ -34,11 +34,11 @@ namespace OpenSim.Framework.Types | |||
34 | Curve2 = 48, | 34 | Curve2 = 48, |
35 | Flexible = 128 | 35 | Flexible = 128 |
36 | } | 36 | } |
37 | 37 | ||
38 | public class PrimitiveBaseShape | 38 | public class PrimitiveBaseShape |
39 | { | 39 | { |
40 | private static byte[] m_defaultTextureEntry; | 40 | private static byte[] m_defaultTextureEntry; |
41 | 41 | ||
42 | public byte PCode; | 42 | public byte PCode; |
43 | public ushort PathBegin; | 43 | public ushort PathBegin; |
44 | public ushort PathEnd; | 44 | public ushort PathEnd; |
@@ -100,14 +100,14 @@ namespace OpenSim.Framework.Types | |||
100 | { | 100 | { |
101 | m_defaultTextureEntry = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); | 101 | m_defaultTextureEntry = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); |
102 | } | 102 | } |
103 | 103 | ||
104 | public PrimitiveBaseShape() | 104 | public PrimitiveBaseShape() |
105 | { | 105 | { |
106 | PCode = (byte)PCodeEnum.Primitive; | 106 | PCode = (byte)PCodeEnum.Primitive; |
107 | ExtraParams = new byte[1]; | 107 | ExtraParams = new byte[1]; |
108 | TextureEntry = m_defaultTextureEntry; | 108 | TextureEntry = m_defaultTextureEntry; |
109 | } | 109 | } |
110 | 110 | ||
111 | //void returns need to change of course | 111 | //void returns need to change of course |
112 | public virtual void GetMesh() | 112 | public virtual void GetMesh() |
113 | { | 113 | { |
@@ -121,11 +121,12 @@ namespace OpenSim.Framework.Types | |||
121 | } | 121 | } |
122 | 122 | ||
123 | public class GenericShape : PrimitiveBaseShape | 123 | public class GenericShape : PrimitiveBaseShape |
124 | { | 124 | { |
125 | public GenericShape() : base() | 125 | public GenericShape() |
126 | : base() | ||
126 | { | 127 | { |
127 | 128 | ||
128 | } | 129 | } |
129 | } | 130 | } |
130 | 131 | ||
131 | public class BoxShape : PrimitiveBaseShape | 132 | public class BoxShape : PrimitiveBaseShape |
@@ -133,7 +134,7 @@ namespace OpenSim.Framework.Types | |||
133 | public BoxShape() | 134 | public BoxShape() |
134 | : base() | 135 | : base() |
135 | { | 136 | { |
136 | PathCurve = (byte) Extrusion.Straight; | 137 | PathCurve = (byte)Extrusion.Straight; |
137 | ProfileShape = ProfileShape.Square; | 138 | ProfileShape = ProfileShape.Square; |
138 | PathScaleX = 100; | 139 | PathScaleX = 100; |
139 | PathScaleY = 100; | 140 | PathScaleY = 100; |
@@ -156,8 +157,8 @@ namespace OpenSim.Framework.Types | |||
156 | { | 157 | { |
157 | BoxShape boxShape = new BoxShape(); | 158 | BoxShape boxShape = new BoxShape(); |
158 | 159 | ||
159 | boxShape.SetSide( 0.5f ); | 160 | boxShape.SetSide(0.5f); |
160 | 161 | ||
161 | return boxShape; | 162 | return boxShape; |
162 | } | 163 | } |
163 | } | 164 | } |
@@ -182,12 +183,12 @@ namespace OpenSim.Framework.Types | |||
182 | 183 | ||
183 | private void SetHeigth(float heigth) | 184 | private void SetHeigth(float heigth) |
184 | { | 185 | { |
185 | Scale.Z = heigth; | 186 | Scale.Z = heigth; |
186 | } | 187 | } |
187 | 188 | ||
188 | private void SetRadius(float radius) | 189 | private void SetRadius(float radius) |
189 | { | 190 | { |
190 | Scale.X = Scale.Y = radius*2f; | 191 | Scale.X = Scale.Y = radius * 2f; |
191 | } | 192 | } |
192 | } | 193 | } |
193 | } | 194 | } |