diff options
author | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
commit | 7d89e122930be39e84a6d174548fa2d12ac0484a (patch) | |
tree | e5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Framework/Communications/Capabilities/Caps.cs | |
parent | * minor: speculatively try a change to bamboo.build to see if this generates ... (diff) | |
download | opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.zip opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2 opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz |
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle.
* This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big!
* Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities/Caps.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/Caps.cs | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index a7486d6..e82a5e9 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -30,7 +30,7 @@ using System.Collections; | |||
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.IO; | 31 | using System.IO; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using libsecondlife; | 33 | using OpenMetaverse; |
34 | using log4net; | 34 | using log4net; |
35 | using OpenSim.Framework.Communications.Cache; | 35 | using OpenSim.Framework.Communications.Cache; |
36 | using OpenSim.Framework.Servers; | 36 | using OpenSim.Framework.Servers; |
@@ -40,21 +40,21 @@ using OpenSim.Region.Interfaces; | |||
40 | namespace OpenSim.Framework.Communications.Capabilities | 40 | namespace OpenSim.Framework.Communications.Capabilities |
41 | { | 41 | { |
42 | public delegate void UpLoadedAsset( | 42 | public delegate void UpLoadedAsset( |
43 | string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, | 43 | string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder, |
44 | byte[] data, string inventoryType, string assetType); | 44 | byte[] data, string inventoryType, string assetType); |
45 | 45 | ||
46 | public delegate LLUUID UpdateItem(LLUUID itemID, byte[] data); | 46 | public delegate UUID UpdateItem(UUID itemID, byte[] data); |
47 | 47 | ||
48 | public delegate void UpdateTaskScript(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data); | 48 | public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data); |
49 | 49 | ||
50 | public delegate void NewInventoryItem(LLUUID userID, InventoryItemBase item); | 50 | public delegate void NewInventoryItem(UUID userID, InventoryItemBase item); |
51 | 51 | ||
52 | public delegate LLUUID ItemUpdatedCallback(LLUUID userID, LLUUID itemID, byte[] data); | 52 | public delegate UUID ItemUpdatedCallback(UUID userID, UUID itemID, byte[] data); |
53 | 53 | ||
54 | public delegate void TaskScriptUpdatedCallback(LLUUID userID, LLUUID itemID, LLUUID primID, | 54 | public delegate void TaskScriptUpdatedCallback(UUID userID, UUID itemID, UUID primID, |
55 | bool isScriptRunning, byte[] data); | 55 | bool isScriptRunning, byte[] data); |
56 | 56 | ||
57 | public delegate List<InventoryItemBase> FetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID, | 57 | public delegate List<InventoryItemBase> FetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID, |
58 | bool fetchFolders, bool fetchItems, int sortOrder); | 58 | bool fetchFolders, bool fetchItems, int sortOrder); |
59 | 59 | ||
60 | /// <summary> | 60 | /// <summary> |
@@ -62,7 +62,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
62 | /// we can popup a message on the user's client if the inventory service has permanently failed). But I didn't want | 62 | /// we can popup a message on the user's client if the inventory service has permanently failed). But I didn't want |
63 | /// to just pass the whole Scene into CAPS. | 63 | /// to just pass the whole Scene into CAPS. |
64 | /// </summary> | 64 | /// </summary> |
65 | public delegate IClientAPI GetClientDelegate(LLUUID agentID); | 65 | public delegate IClientAPI GetClientDelegate(UUID agentID); |
66 | 66 | ||
67 | public class Caps | 67 | public class Caps |
68 | { | 68 | { |
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
97 | 97 | ||
98 | //private string eventQueue = "0100/"; | 98 | //private string eventQueue = "0100/"; |
99 | private BaseHttpServer m_httpListener; | 99 | private BaseHttpServer m_httpListener; |
100 | private LLUUID m_agentID; | 100 | private UUID m_agentID; |
101 | private AssetCache m_assetCache; | 101 | private AssetCache m_assetCache; |
102 | private int m_eventQueueCount = 1; | 102 | private int m_eventQueueCount = 1; |
103 | private Queue<string> m_capsEventQueue = new Queue<string>(); | 103 | private Queue<string> m_capsEventQueue = new Queue<string>(); |
@@ -113,7 +113,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
113 | public GetClientDelegate GetClient = null; | 113 | public GetClientDelegate GetClient = null; |
114 | 114 | ||
115 | public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, | 115 | public Caps(AssetCache assetCache, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, |
116 | LLUUID agent, bool dumpAssetsToFile, string regionName) | 116 | UUID agent, bool dumpAssetsToFile, string regionName) |
117 | { | 117 | { |
118 | m_assetCache = assetCache; | 118 | m_assetCache = assetCache; |
119 | m_capsObjectPath = capsPath; | 119 | m_capsObjectPath = capsPath; |
@@ -258,7 +258,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
258 | Hashtable hash = new Hashtable(); | 258 | Hashtable hash = new Hashtable(); |
259 | try | 259 | try |
260 | { | 260 | { |
261 | hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); | 261 | hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); |
262 | } | 262 | } |
263 | catch (LLSD.LLSDParseException pe) | 263 | catch (LLSD.LLSDParseException pe) |
264 | { | 264 | { |
@@ -388,7 +388,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
388 | llsdItem.permissions.creator_id = invItem.Creator; | 388 | llsdItem.permissions.creator_id = invItem.Creator; |
389 | llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; | 389 | llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions; |
390 | llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions; | 390 | llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions; |
391 | llsdItem.permissions.group_id = LLUUID.Zero; | 391 | llsdItem.permissions.group_id = UUID.Zero; |
392 | llsdItem.permissions.group_mask = 0; | 392 | llsdItem.permissions.group_mask = 0; |
393 | llsdItem.permissions.is_owner_group = false; | 393 | llsdItem.permissions.is_owner_group = false; |
394 | llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions; | 394 | llsdItem.permissions.next_owner_mask = (int)invItem.NextPermissions; |
@@ -423,7 +423,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
423 | LLSDMapLayer mapLayer = new LLSDMapLayer(); | 423 | LLSDMapLayer mapLayer = new LLSDMapLayer(); |
424 | mapLayer.Right = 5000; | 424 | mapLayer.Right = 5000; |
425 | mapLayer.Top = 5000; | 425 | mapLayer.Top = 5000; |
426 | mapLayer.ImageID = new LLUUID("00000000-0000-1111-9999-000000000006"); | 426 | mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006"); |
427 | 427 | ||
428 | return mapLayer; | 428 | return mapLayer; |
429 | } | 429 | } |
@@ -522,7 +522,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
522 | m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName); | 522 | m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName); |
523 | //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); | 523 | //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); |
524 | 524 | ||
525 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); | 525 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request)); |
526 | LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); | 526 | LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); |
527 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); | 527 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); |
528 | 528 | ||
@@ -573,8 +573,8 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
573 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 573 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
574 | { | 574 | { |
575 | m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName); | 575 | m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName); |
576 | //libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)libsecondlife.StructuredData.LLSDParser.DeserializeBinary(Helpers.StringToField(request)); | 576 | //OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request)); |
577 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); | 577 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request)); |
578 | LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); | 578 | LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); |
579 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); | 579 | LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); |
580 | 580 | ||
@@ -636,9 +636,9 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
636 | string assetName = llsdRequest.name; | 636 | string assetName = llsdRequest.name; |
637 | string assetDes = llsdRequest.description; | 637 | string assetDes = llsdRequest.description; |
638 | string capsBase = "/CAPS/" + m_capsObjectPath; | 638 | string capsBase = "/CAPS/" + m_capsObjectPath; |
639 | LLUUID newAsset = LLUUID.Random(); | 639 | UUID newAsset = UUID.Random(); |
640 | LLUUID newInvItem = LLUUID.Random(); | 640 | UUID newInvItem = UUID.Random(); |
641 | LLUUID parentFolder = llsdRequest.folder_id; | 641 | UUID parentFolder = llsdRequest.folder_id; |
642 | string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); | 642 | string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); |
643 | 643 | ||
644 | AssetUploader uploader = | 644 | AssetUploader uploader = |
@@ -662,8 +662,8 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
662 | /// <param name="assetID"></param> | 662 | /// <param name="assetID"></param> |
663 | /// <param name="inventoryItem"></param> | 663 | /// <param name="inventoryItem"></param> |
664 | /// <param name="data"></param> | 664 | /// <param name="data"></param> |
665 | public void UploadCompleteHandler(string assetName, string assetDescription, LLUUID assetID, | 665 | public void UploadCompleteHandler(string assetName, string assetDescription, UUID assetID, |
666 | LLUUID inventoryItem, LLUUID parentFolder, byte[] data, string inventoryType, | 666 | UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType, |
667 | string assetType) | 667 | string assetType) |
668 | { | 668 | { |
669 | sbyte assType = 0; | 669 | sbyte assType = 0; |
@@ -728,14 +728,14 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
728 | /// <param name="itemID">Item to update</param> | 728 | /// <param name="itemID">Item to update</param> |
729 | /// <param name="data">New asset data</param> | 729 | /// <param name="data">New asset data</param> |
730 | /// <returns></returns> | 730 | /// <returns></returns> |
731 | public LLUUID ItemUpdated(LLUUID itemID, byte[] data) | 731 | public UUID ItemUpdated(UUID itemID, byte[] data) |
732 | { | 732 | { |
733 | if (ItemUpdatedCall != null) | 733 | if (ItemUpdatedCall != null) |
734 | { | 734 | { |
735 | return ItemUpdatedCall(m_agentID, itemID, data); | 735 | return ItemUpdatedCall(m_agentID, itemID, data); |
736 | } | 736 | } |
737 | 737 | ||
738 | return LLUUID.Zero; | 738 | return UUID.Zero; |
739 | } | 739 | } |
740 | 740 | ||
741 | /// <summary> | 741 | /// <summary> |
@@ -745,7 +745,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
745 | /// <param name="primID">Prim containing item to update</param> | 745 | /// <param name="primID">Prim containing item to update</param> |
746 | /// <param name="isScriptRunning">Signals whether the script to update is currently running</param> | 746 | /// <param name="isScriptRunning">Signals whether the script to update is currently running</param> |
747 | /// <param name="data">New asset data</param> | 747 | /// <param name="data">New asset data</param> |
748 | public void TaskScriptUpdated(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data) | 748 | public void TaskScriptUpdated(UUID itemID, UUID primID, bool isScriptRunning, byte[] data) |
749 | { | 749 | { |
750 | if (TaskScriptUpdatedCall != null) | 750 | if (TaskScriptUpdatedCall != null) |
751 | { | 751 | { |
@@ -759,9 +759,9 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
759 | private UpLoadedAsset handlerUpLoad = null; | 759 | private UpLoadedAsset handlerUpLoad = null; |
760 | 760 | ||
761 | private string uploaderPath = String.Empty; | 761 | private string uploaderPath = String.Empty; |
762 | private LLUUID newAssetID; | 762 | private UUID newAssetID; |
763 | private LLUUID inventoryItemID; | 763 | private UUID inventoryItemID; |
764 | private LLUUID parentFolder; | 764 | private UUID parentFolder; |
765 | private BaseHttpServer httpListener; | 765 | private BaseHttpServer httpListener; |
766 | private bool m_dumpAssetsToFile; | 766 | private bool m_dumpAssetsToFile; |
767 | private string m_assetName = String.Empty; | 767 | private string m_assetName = String.Empty; |
@@ -770,8 +770,8 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
770 | private string m_invType = String.Empty; | 770 | private string m_invType = String.Empty; |
771 | private string m_assetType = String.Empty; | 771 | private string m_assetType = String.Empty; |
772 | 772 | ||
773 | public AssetUploader(string assetName, string description, LLUUID assetID, LLUUID inventoryItem, | 773 | public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem, |
774 | LLUUID parentFolderID, string invType, string assetType, string path, | 774 | UUID parentFolderID, string invType, string assetType, string path, |
775 | BaseHttpServer httpServer, bool dumpAssetsToFile) | 775 | BaseHttpServer httpServer, bool dumpAssetsToFile) |
776 | { | 776 | { |
777 | m_assetName = assetName; | 777 | m_assetName = assetName; |
@@ -795,7 +795,7 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
795 | /// <returns></returns> | 795 | /// <returns></returns> |
796 | public string uploaderCaps(byte[] data, string path, string param) | 796 | public string uploaderCaps(byte[] data, string path, string param) |
797 | { | 797 | { |
798 | LLUUID inv = inventoryItemID; | 798 | UUID inv = inventoryItemID; |
799 | string res = String.Empty; | 799 | string res = String.Empty; |
800 | LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); | 800 | LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); |
801 | uploadComplete.new_asset = newAssetID.ToString(); | 801 | uploadComplete.new_asset = newAssetID.ToString(); |
@@ -860,11 +860,11 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
860 | private UpdateItem handlerUpdateItem = null; | 860 | private UpdateItem handlerUpdateItem = null; |
861 | 861 | ||
862 | private string uploaderPath = String.Empty; | 862 | private string uploaderPath = String.Empty; |
863 | private LLUUID inventoryItemID; | 863 | private UUID inventoryItemID; |
864 | private BaseHttpServer httpListener; | 864 | private BaseHttpServer httpListener; |
865 | private bool m_dumpAssetToFile; | 865 | private bool m_dumpAssetToFile; |
866 | 866 | ||
867 | public ItemUpdater(LLUUID inventoryItem, string path, BaseHttpServer httpServer, bool dumpAssetToFile) | 867 | public ItemUpdater(UUID inventoryItem, string path, BaseHttpServer httpServer, bool dumpAssetToFile) |
868 | { | 868 | { |
869 | m_dumpAssetToFile = dumpAssetToFile; | 869 | m_dumpAssetToFile = dumpAssetToFile; |
870 | 870 | ||
@@ -882,10 +882,10 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
882 | /// <returns></returns> | 882 | /// <returns></returns> |
883 | public string uploaderCaps(byte[] data, string path, string param) | 883 | public string uploaderCaps(byte[] data, string path, string param) |
884 | { | 884 | { |
885 | LLUUID inv = inventoryItemID; | 885 | UUID inv = inventoryItemID; |
886 | string res = String.Empty; | 886 | string res = String.Empty; |
887 | LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); | 887 | LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); |
888 | LLUUID assetID = LLUUID.Zero; | 888 | UUID assetID = UUID.Zero; |
889 | handlerUpdateItem = OnUpLoad; | 889 | handlerUpdateItem = OnUpLoad; |
890 | if (handlerUpdateItem != null) | 890 | if (handlerUpdateItem != null) |
891 | { | 891 | { |
@@ -942,13 +942,13 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
942 | private UpdateTaskScript handlerUpdateTaskScript = null; | 942 | private UpdateTaskScript handlerUpdateTaskScript = null; |
943 | 943 | ||
944 | private string uploaderPath = String.Empty; | 944 | private string uploaderPath = String.Empty; |
945 | private LLUUID inventoryItemID; | 945 | private UUID inventoryItemID; |
946 | private LLUUID primID; | 946 | private UUID primID; |
947 | private bool isScriptRunning; | 947 | private bool isScriptRunning; |
948 | private BaseHttpServer httpListener; | 948 | private BaseHttpServer httpListener; |
949 | private bool m_dumpAssetToFile; | 949 | private bool m_dumpAssetToFile; |
950 | 950 | ||
951 | public TaskInventoryScriptUpdater(LLUUID inventoryItemID, LLUUID primID, int isScriptRunning, | 951 | public TaskInventoryScriptUpdater(UUID inventoryItemID, UUID primID, int isScriptRunning, |
952 | string path, BaseHttpServer httpServer, bool dumpAssetToFile) | 952 | string path, BaseHttpServer httpServer, bool dumpAssetToFile) |
953 | { | 953 | { |
954 | m_dumpAssetToFile = dumpAssetToFile; | 954 | m_dumpAssetToFile = dumpAssetToFile; |