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/Region/Environment/Modules/Scripting | |
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/Region/Environment/Modules/Scripting')
7 files changed, 157 insertions, 146 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs index 15ce584..59d29d6 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -29,9 +29,9 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Drawing; | 30 | using System.Drawing; |
31 | using System.Drawing.Imaging; | 31 | using System.Drawing.Imaging; |
32 | using libsecondlife; | 32 | using OpenMetaverse; |
33 | using OpenMetaverse.Imaging; | ||
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | using OpenJPEGNet; | ||
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.Environment.Interfaces; | 36 | using OpenSim.Region.Environment.Interfaces; |
37 | using OpenSim.Region.Environment.Scenes; | 37 | using OpenSim.Region.Environment.Scenes; |
@@ -40,12 +40,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
40 | { | 40 | { |
41 | public class DynamicTextureModule : IRegionModule, IDynamicTextureManager | 41 | public class DynamicTextureModule : IRegionModule, IDynamicTextureManager |
42 | { | 42 | { |
43 | private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); | 43 | private Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>(); |
44 | 44 | ||
45 | private Dictionary<string, IDynamicTextureRender> RenderPlugins = | 45 | private Dictionary<string, IDynamicTextureRender> RenderPlugins = |
46 | new Dictionary<string, IDynamicTextureRender>(); | 46 | new Dictionary<string, IDynamicTextureRender>(); |
47 | 47 | ||
48 | private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>(); | 48 | private Dictionary<UUID, DynamicTextureUpdater> Updaters = new Dictionary<UUID, DynamicTextureUpdater>(); |
49 | 49 | ||
50 | #region IDynamicTextureManager Members | 50 | #region IDynamicTextureManager Members |
51 | 51 | ||
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
62 | /// </summary> | 62 | /// </summary> |
63 | /// <param name="id"></param> | 63 | /// <param name="id"></param> |
64 | /// <param name="data"></param> | 64 | /// <param name="data"></param> |
65 | public void ReturnData(LLUUID id, byte[] data) | 65 | public void ReturnData(UUID id, byte[] data) |
66 | { | 66 | { |
67 | if (Updaters.ContainsKey(id)) | 67 | if (Updaters.ContainsKey(id)) |
68 | { | 68 | { |
@@ -75,13 +75,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
75 | } | 75 | } |
76 | } | 76 | } |
77 | 77 | ||
78 | public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, | 78 | public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, |
79 | string extraParams, int updateTimer) | 79 | string extraParams, int updateTimer) |
80 | { | 80 | { |
81 | return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255); | 81 | return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255); |
82 | } | 82 | } |
83 | 83 | ||
84 | public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, | 84 | public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, |
85 | string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) | 85 | string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) |
86 | { | 86 | { |
87 | if (RenderPlugins.ContainsKey(contentType)) | 87 | if (RenderPlugins.ContainsKey(contentType)) |
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
94 | updater.ContentType = contentType; | 94 | updater.ContentType = contentType; |
95 | updater.Url = url; | 95 | updater.Url = url; |
96 | updater.UpdateTimer = updateTimer; | 96 | updater.UpdateTimer = updateTimer; |
97 | updater.UpdaterID = LLUUID.Random(); | 97 | updater.UpdaterID = UUID.Random(); |
98 | updater.Params = extraParams; | 98 | updater.Params = extraParams; |
99 | updater.BlendWithOldTexture = SetBlending; | 99 | updater.BlendWithOldTexture = SetBlending; |
100 | updater.FrontAlpha = AlphaValue; | 100 | updater.FrontAlpha = AlphaValue; |
@@ -107,16 +107,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
107 | RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); | 107 | RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); |
108 | return updater.UpdaterID; | 108 | return updater.UpdaterID; |
109 | } | 109 | } |
110 | return LLUUID.Zero; | 110 | return UUID.Zero; |
111 | } | 111 | } |
112 | 112 | ||
113 | public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, | 113 | public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, |
114 | string extraParams, int updateTimer) | 114 | string extraParams, int updateTimer) |
115 | { | 115 | { |
116 | return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255); | 116 | return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255); |
117 | } | 117 | } |
118 | 118 | ||
119 | public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, | 119 | public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, |
120 | string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) | 120 | string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) |
121 | { | 121 | { |
122 | if (RenderPlugins.ContainsKey(contentType)) | 122 | if (RenderPlugins.ContainsKey(contentType)) |
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
127 | updater.ContentType = contentType; | 127 | updater.ContentType = contentType; |
128 | updater.BodyData = data; | 128 | updater.BodyData = data; |
129 | updater.UpdateTimer = updateTimer; | 129 | updater.UpdateTimer = updateTimer; |
130 | updater.UpdaterID = LLUUID.Random(); | 130 | updater.UpdaterID = UUID.Random(); |
131 | updater.Params = extraParams; | 131 | updater.Params = extraParams; |
132 | updater.BlendWithOldTexture = SetBlending; | 132 | updater.BlendWithOldTexture = SetBlending; |
133 | updater.FrontAlpha = AlphaValue; | 133 | updater.FrontAlpha = AlphaValue; |
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
140 | RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); | 140 | RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); |
141 | return updater.UpdaterID; | 141 | return updater.UpdaterID; |
142 | } | 142 | } |
143 | return LLUUID.Zero; | 143 | return UUID.Zero; |
144 | } | 144 | } |
145 | 145 | ||
146 | #endregion | 146 | #endregion |
@@ -184,18 +184,18 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
184 | public string BodyData; | 184 | public string BodyData; |
185 | public string ContentType; | 185 | public string ContentType; |
186 | public byte FrontAlpha = 255; | 186 | public byte FrontAlpha = 255; |
187 | public LLUUID LastAssetID; | 187 | public UUID LastAssetID; |
188 | public string Params; | 188 | public string Params; |
189 | public LLUUID PrimID; | 189 | public UUID PrimID; |
190 | public bool SetNewFrontAlpha = false; | 190 | public bool SetNewFrontAlpha = false; |
191 | public LLUUID SimUUID; | 191 | public UUID SimUUID; |
192 | public LLUUID UpdaterID; | 192 | public UUID UpdaterID; |
193 | public int UpdateTimer; | 193 | public int UpdateTimer; |
194 | public string Url; | 194 | public string Url; |
195 | 195 | ||
196 | public DynamicTextureUpdater() | 196 | public DynamicTextureUpdater() |
197 | { | 197 | { |
198 | LastAssetID = LLUUID.Zero; | 198 | LastAssetID = UUID.Zero; |
199 | UpdateTimer = 0; | 199 | UpdateTimer = 0; |
200 | BodyData = null; | 200 | BodyData = null; |
201 | } | 201 | } |
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
211 | 211 | ||
212 | if (BlendWithOldTexture) | 212 | if (BlendWithOldTexture) |
213 | { | 213 | { |
214 | LLUUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; | 214 | UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; |
215 | oldAsset = scene.AssetCache.GetAsset(lastTextureID, true); | 215 | oldAsset = scene.AssetCache.GetAsset(lastTextureID, true); |
216 | if (oldAsset != null) | 216 | if (oldAsset != null) |
217 | { | 217 | { |
@@ -231,7 +231,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
231 | 231 | ||
232 | // Create a new asset for user | 232 | // Create a new asset for user |
233 | AssetBase asset = new AssetBase(); | 233 | AssetBase asset = new AssetBase(); |
234 | asset.FullID = LLUUID.Random(); | 234 | asset.FullID = UUID.Random(); |
235 | asset.Data = assetData; | 235 | asset.Data = assetData; |
236 | asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); | 236 | asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); |
237 | asset.Type = 0; | 237 | asset.Type = 0; |
@@ -243,10 +243,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
243 | LastAssetID = asset.FullID; | 243 | LastAssetID = asset.FullID; |
244 | 244 | ||
245 | // mostly keep the values from before | 245 | // mostly keep the values from before |
246 | LLObject.TextureEntry tmptex = part.Shape.Textures; | 246 | Primitive.TextureEntry tmptex = part.Shape.Textures; |
247 | 247 | ||
248 | // remove the old asset from the cache | 248 | // remove the old asset from the cache |
249 | LLUUID oldID = tmptex.DefaultTexture.TextureID; | 249 | UUID oldID = tmptex.DefaultTexture.TextureID; |
250 | scene.AssetCache.ExpireAsset(oldID); | 250 | scene.AssetCache.ExpireAsset(oldID); |
251 | 251 | ||
252 | tmptex.DefaultTexture.TextureID = asset.FullID; | 252 | tmptex.DefaultTexture.TextureID = asset.FullID; |
@@ -259,15 +259,27 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
259 | 259 | ||
260 | private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) | 260 | private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) |
261 | { | 261 | { |
262 | Bitmap image1 = new Bitmap(OpenJPEG.DecodeToImage(frontImage)); | 262 | ManagedImage managedImage; |
263 | Bitmap image2 = new Bitmap(OpenJPEG.DecodeToImage(backImage)); | 263 | Image image; |
264 | if (setNewAlpha) | 264 | |
265 | if (OpenJPEG.DecodeToImage(frontImage, out managedImage, out image)) | ||
265 | { | 266 | { |
266 | SetAlpha(ref image1, newAlpha); | 267 | Bitmap image1 = new Bitmap(image); |
268 | |||
269 | if (OpenJPEG.DecodeToImage(backImage, out managedImage, out image)) | ||
270 | { | ||
271 | Bitmap image2 = new Bitmap(image); | ||
272 | |||
273 | if (setNewAlpha) | ||
274 | SetAlpha(ref image1, newAlpha); | ||
275 | |||
276 | Bitmap joint = MergeBitMaps(image1, image2); | ||
277 | |||
278 | return OpenJPEG.EncodeFromImage(joint, true); | ||
279 | } | ||
267 | } | 280 | } |
268 | Bitmap joint = MergeBitMaps(image1, image2); | ||
269 | 281 | ||
270 | return OpenJPEG.EncodeFromImage(joint, true); | 282 | return null; |
271 | } | 283 | } |
272 | 284 | ||
273 | public Bitmap MergeBitMaps(Bitmap front, Bitmap back) | 285 | public Bitmap MergeBitMaps(Bitmap front, Bitmap back) |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs index bcf3e76..5a715f5 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs | |||
@@ -29,7 +29,7 @@ using System; | |||
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text.RegularExpressions; | 31 | using System.Text.RegularExpressions; |
32 | using libsecondlife; | 32 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region.Environment.Interfaces; | 34 | using OpenSim.Region.Environment.Interfaces; |
35 | using OpenSim.Region.Environment.Scenes; | 35 | using OpenSim.Region.Environment.Scenes; |
@@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | private SceneObjectPart findPrim(LLUUID objectID, out string ObjectRegionName) | 164 | private SceneObjectPart findPrim(UUID objectID, out string ObjectRegionName) |
165 | { | 165 | { |
166 | lock (m_Scenes) | 166 | lock (m_Scenes) |
167 | { | 167 | { |
@@ -179,7 +179,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
179 | return null; | 179 | return null; |
180 | } | 180 | } |
181 | 181 | ||
182 | private void resolveNamePositionRegionName(LLUUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName) | 182 | private void resolveNamePositionRegionName(UUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName) |
183 | { | 183 | { |
184 | string m_ObjectRegionName; | 184 | string m_ObjectRegionName; |
185 | SceneObjectPart part = findPrim(objectID, out m_ObjectRegionName); | 185 | SceneObjectPart part = findPrim(objectID, out m_ObjectRegionName); |
@@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
203 | /// <param name="address"></param> | 203 | /// <param name="address"></param> |
204 | /// <param name="subject"></param> | 204 | /// <param name="subject"></param> |
205 | /// <param name="body"></param> | 205 | /// <param name="body"></param> |
206 | public void SendEmail(LLUUID objectID, string address, string subject, string body) | 206 | public void SendEmail(UUID objectID, string address, string subject, string body) |
207 | { | 207 | { |
208 | //Check if address is empty | 208 | //Check if address is empty |
209 | if (address == string.Empty) | 209 | if (address == string.Empty) |
@@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
240 | //Creation EmailMessage | 240 | //Creation EmailMessage |
241 | EmailMessage emailMessage = new EmailMessage(); | 241 | EmailMessage emailMessage = new EmailMessage(); |
242 | //From | 242 | //From |
243 | emailMessage.FromAddress = new EmailAddress(objectID.UUID.ToString()+"@"+m_HostName); | 243 | emailMessage.FromAddress = new EmailAddress(objectID.ToString()+"@"+m_HostName); |
244 | //To - Only One | 244 | //To - Only One |
245 | emailMessage.AddToAddress(new EmailAddress(address)); | 245 | emailMessage.AddToAddress(new EmailAddress(address)); |
246 | //Subject | 246 | //Subject |
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
264 | //Send Email Message | 264 | //Send Email Message |
265 | emailMessage.Send(smtpServer); | 265 | emailMessage.Send(smtpServer); |
266 | //Log | 266 | //Log |
267 | m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.UUID.ToString()); | 267 | m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.ToString()); |
268 | } | 268 | } |
269 | catch (Exception e) | 269 | catch (Exception e) |
270 | { | 270 | { |
@@ -280,7 +280,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules | |||
280 | /// <param name="sender"></param> | 280 | /// <param name="sender"></param> |
281 | /// <param name="subject"></param> | 281 | /// <param name="subject"></param> |
282 | /// <returns></returns> | 282 | /// <returns></returns> |
283 | public Email GetNextEmail(LLUUID objectID, string sender, string subject) | 283 | public Email GetNextEmail(UUID objectID, string sender, string subject) |
284 | { | 284 | { |
285 | return null; | 285 | return null; |
286 | } | 286 | } |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 1eb0387..9595588 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -31,7 +31,7 @@ using System.IO; | |||
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Text; | 32 | using System.Text; |
33 | using System.Threading; | 33 | using System.Threading; |
34 | using libsecondlife; | 34 | using OpenMetaverse; |
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Servers; | 37 | using OpenSim.Framework.Servers; |
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest | |||
91 | private string m_name = "HttpScriptRequests"; | 91 | private string m_name = "HttpScriptRequests"; |
92 | 92 | ||
93 | // <request id, HttpRequestClass> | 93 | // <request id, HttpRequestClass> |
94 | private Dictionary<LLUUID, HttpRequestClass> m_pendingRequests; | 94 | private Dictionary<UUID, HttpRequestClass> m_pendingRequests; |
95 | private Scene m_scene; | 95 | private Scene m_scene; |
96 | // private Queue<HttpRequestClass> rpcQueue = new Queue<HttpRequestClass>(); | 96 | // private Queue<HttpRequestClass> rpcQueue = new Queue<HttpRequestClass>(); |
97 | 97 | ||
@@ -101,14 +101,14 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest | |||
101 | 101 | ||
102 | #region IHttpRequests Members | 102 | #region IHttpRequests Members |
103 | 103 | ||
104 | public LLUUID MakeHttpRequest(string url, string parameters, string body) | 104 | public UUID MakeHttpRequest(string url, string parameters, string body) |
105 | { | 105 | { |
106 | return LLUUID.Zero; | 106 | return UUID.Zero; |
107 | } | 107 | } |
108 | 108 | ||
109 | public LLUUID StartHttpRequest(uint localID, LLUUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body) | 109 | public UUID StartHttpRequest(uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body) |
110 | { | 110 | { |
111 | LLUUID reqID = LLUUID.Random(); | 111 | UUID reqID = UUID.Random(); |
112 | HttpRequestClass htc = new HttpRequestClass(); | 112 | HttpRequestClass htc = new HttpRequestClass(); |
113 | 113 | ||
114 | // Partial implementation: support for parameter flags needed | 114 | // Partial implementation: support for parameter flags needed |
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest | |||
163 | return reqID; | 163 | return reqID; |
164 | } | 164 | } |
165 | 165 | ||
166 | public void StopHttpRequest(uint m_localID, LLUUID m_itemID) | 166 | public void StopHttpRequest(uint m_localID, UUID m_itemID) |
167 | { | 167 | { |
168 | if (m_pendingRequests != null) | 168 | if (m_pendingRequests != null) |
169 | { | 169 | { |
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest | |||
192 | { | 192 | { |
193 | lock (HttpListLock) | 193 | lock (HttpListLock) |
194 | { | 194 | { |
195 | foreach (LLUUID luid in m_pendingRequests.Keys) | 195 | foreach (UUID luid in m_pendingRequests.Keys) |
196 | { | 196 | { |
197 | HttpRequestClass tmpReq; | 197 | HttpRequestClass tmpReq; |
198 | 198 | ||
@@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest | |||
208 | return null; | 208 | return null; |
209 | } | 209 | } |
210 | 210 | ||
211 | public void RemoveCompletedRequest(LLUUID id) | 211 | public void RemoveCompletedRequest(UUID id) |
212 | { | 212 | { |
213 | lock (HttpListLock) | 213 | lock (HttpListLock) |
214 | { | 214 | { |
@@ -232,7 +232,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest | |||
232 | 232 | ||
233 | m_scene.RegisterModuleInterface<IHttpRequests>(this); | 233 | m_scene.RegisterModuleInterface<IHttpRequests>(this); |
234 | 234 | ||
235 | m_pendingRequests = new Dictionary<LLUUID, HttpRequestClass>(); | 235 | m_pendingRequests = new Dictionary<UUID, HttpRequestClass>(); |
236 | } | 236 | } |
237 | 237 | ||
238 | public void PostInitialise() | 238 | public void PostInitialise() |
@@ -274,11 +274,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest | |||
274 | public bool httpVerifyCert = true; // not implemented | 274 | public bool httpVerifyCert = true; // not implemented |
275 | 275 | ||
276 | // Request info | 276 | // Request info |
277 | public LLUUID itemID; | 277 | public UUID itemID; |
278 | public uint localID; | 278 | public uint localID; |
279 | public DateTime next; | 279 | public DateTime next; |
280 | public string outbound_body; | 280 | public string outbound_body; |
281 | public LLUUID reqID; | 281 | public UUID reqID; |
282 | public HttpWebRequest request; | 282 | public HttpWebRequest request; |
283 | public string response_body; | 283 | public string response_body; |
284 | public List<string> response_metadata; | 284 | public List<string> response_metadata; |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs index 725322b..339ad42 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs | |||
@@ -29,9 +29,9 @@ using System; | |||
29 | using System.Drawing; | 29 | using System.Drawing; |
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Net; | 31 | using System.Net; |
32 | using libsecondlife; | 32 | using OpenMetaverse; |
33 | using OpenMetaverse.Imaging; | ||
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | using OpenJPEGNet; | ||
35 | using OpenSim.Region.Environment.Interfaces; | 35 | using OpenSim.Region.Environment.Interfaces; |
36 | using OpenSim.Region.Environment.Scenes; | 36 | using OpenSim.Region.Environment.Scenes; |
37 | 37 | ||
@@ -70,13 +70,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL | |||
70 | return null; | 70 | return null; |
71 | } | 71 | } |
72 | 72 | ||
73 | public bool AsyncConvertUrl(LLUUID id, string url, string extraParams) | 73 | public bool AsyncConvertUrl(UUID id, string url, string extraParams) |
74 | { | 74 | { |
75 | MakeHttpRequest(url, id); | 75 | MakeHttpRequest(url, id); |
76 | return true; | 76 | return true; |
77 | } | 77 | } |
78 | 78 | ||
79 | public bool AsyncConvertData(LLUUID id, string bodyData, string extraParams) | 79 | public bool AsyncConvertData(UUID id, string bodyData, string extraParams) |
80 | { | 80 | { |
81 | return false; | 81 | return false; |
82 | } | 82 | } |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL | |||
118 | 118 | ||
119 | #endregion | 119 | #endregion |
120 | 120 | ||
121 | private void MakeHttpRequest(string url, LLUUID requestID) | 121 | private void MakeHttpRequest(string url, UUID requestID) |
122 | { | 122 | { |
123 | WebRequest request = HttpWebRequest.Create(url); | 123 | WebRequest request = HttpWebRequest.Create(url); |
124 | RequestState state = new RequestState((HttpWebRequest) request, requestID); | 124 | RequestState state = new RequestState((HttpWebRequest) request, requestID); |
@@ -177,10 +177,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL | |||
177 | public class RequestState | 177 | public class RequestState |
178 | { | 178 | { |
179 | public HttpWebRequest Request = null; | 179 | public HttpWebRequest Request = null; |
180 | public LLUUID RequestID = LLUUID.Zero; | 180 | public UUID RequestID = UUID.Zero; |
181 | public int TimeOfRequest = 0; | 181 | public int TimeOfRequest = 0; |
182 | 182 | ||
183 | public RequestState(HttpWebRequest request, LLUUID requestID) | 183 | public RequestState(HttpWebRequest request, UUID requestID) |
184 | { | 184 | { |
185 | Request = request; | 185 | Request = request; |
186 | RequestID = requestID; | 186 | RequestID = requestID; |
@@ -189,4 +189,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL | |||
189 | 189 | ||
190 | #endregion | 190 | #endregion |
191 | } | 191 | } |
192 | } \ No newline at end of file | 192 | } |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs index 27f1182..256bf27 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs | |||
@@ -31,12 +31,11 @@ using System.Drawing.Imaging; | |||
31 | using System.Globalization; | 31 | using System.Globalization; |
32 | using System.IO; | 32 | using System.IO; |
33 | using System.Net; | 33 | using System.Net; |
34 | using libsecondlife; | 34 | using OpenMetaverse; |
35 | using OpenMetaverse.Imaging; | ||
35 | using Nini.Config; | 36 | using Nini.Config; |
36 | using OpenJPEGNet; | ||
37 | using OpenSim.Region.Environment.Interfaces; | 37 | using OpenSim.Region.Environment.Interfaces; |
38 | using OpenSim.Region.Environment.Scenes; | 38 | using OpenSim.Region.Environment.Scenes; |
39 | using Image=System.Drawing.Image; | ||
40 | 39 | ||
41 | //using Cairo; | 40 | //using Cairo; |
42 | 41 | ||
@@ -79,12 +78,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender | |||
79 | return null; | 78 | return null; |
80 | } | 79 | } |
81 | 80 | ||
82 | public bool AsyncConvertUrl(LLUUID id, string url, string extraParams) | 81 | public bool AsyncConvertUrl(UUID id, string url, string extraParams) |
83 | { | 82 | { |
84 | return false; | 83 | return false; |
85 | } | 84 | } |
86 | 85 | ||
87 | public bool AsyncConvertData(LLUUID id, string bodyData, string extraParams) | 86 | public bool AsyncConvertData(UUID id, string bodyData, string extraParams) |
88 | { | 87 | { |
89 | Draw(bodyData, id, extraParams); | 88 | Draw(bodyData, id, extraParams); |
90 | return true; | 89 | return true; |
@@ -127,7 +126,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender | |||
127 | 126 | ||
128 | #endregion | 127 | #endregion |
129 | 128 | ||
130 | private void Draw(string data, LLUUID id, string extraParams) | 129 | private void Draw(string data, UUID id, string extraParams) |
131 | { | 130 | { |
132 | // TODO: this is a brutal hack. extraParams should actually be parsed reasonably. | 131 | // TODO: this is a brutal hack. extraParams should actually be parsed reasonably. |
133 | int size = 256; | 132 | int size = 256; |
@@ -374,4 +373,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender | |||
374 | return null; | 373 | return null; |
375 | } | 374 | } |
376 | } | 375 | } |
377 | } \ No newline at end of file | 376 | } |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs index 2f67dee..ae5eefc 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using libsecondlife; | 31 | using OpenMetaverse; |
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Region.Environment.Interfaces; | 34 | using OpenSim.Region.Environment.Interfaces; |
@@ -66,7 +66,7 @@ using OpenSim.Region.Environment.Scenes; | |||
66 | * | 66 | * |
67 | * For LSL compliance, note the following: | 67 | * For LSL compliance, note the following: |
68 | * (Tested again 1.21.1 on May 2, 2008) | 68 | * (Tested again 1.21.1 on May 2, 2008) |
69 | * 1. 'id' has to be parsed into a LLUUID. None-UUID keys are | 69 | * 1. 'id' has to be parsed into a UUID. None-UUID keys are |
70 | * to be replaced by the ZeroID key. (Well, TryParse does | 70 | * to be replaced by the ZeroID key. (Well, TryParse does |
71 | * that for us. | 71 | * that for us. |
72 | * 2. Setting up an listen event from the same script, with the | 72 | * 2. Setting up an listen event from the same script, with the |
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
157 | /// <param name="id">key to filter on (user given, could be totally faked)</param> | 157 | /// <param name="id">key to filter on (user given, could be totally faked)</param> |
158 | /// <param name="msg">msg to filter on</param> | 158 | /// <param name="msg">msg to filter on</param> |
159 | /// <returns>number of the scripts handle</returns> | 159 | /// <returns>number of the scripts handle</returns> |
160 | public int Listen(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, LLUUID id, string msg) | 160 | public int Listen(uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg) |
161 | { | 161 | { |
162 | return m_listenerManager.AddListener(localID, itemID, hostID, channel, name, id, msg); | 162 | return m_listenerManager.AddListener(localID, itemID, hostID, channel, name, id, msg); |
163 | } | 163 | } |
@@ -169,7 +169,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
169 | /// <param name="itemID">UUID of the script engine</param> | 169 | /// <param name="itemID">UUID of the script engine</param> |
170 | /// <param name="handle">handle returned by Listen()</param> | 170 | /// <param name="handle">handle returned by Listen()</param> |
171 | /// <param name="active">temp. activate or deactivate the Listen()</param> | 171 | /// <param name="active">temp. activate or deactivate the Listen()</param> |
172 | public void ListenControl(LLUUID itemID, int handle, int active) | 172 | public void ListenControl(UUID itemID, int handle, int active) |
173 | { | 173 | { |
174 | if (active == 1) | 174 | if (active == 1) |
175 | m_listenerManager.Activate(itemID, handle); | 175 | m_listenerManager.Activate(itemID, handle); |
@@ -182,7 +182,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
182 | /// </summary> | 182 | /// </summary> |
183 | /// <param name="itemID">UUID of the script engine</param> | 183 | /// <param name="itemID">UUID of the script engine</param> |
184 | /// <param name="handle">handle returned by Listen()</param> | 184 | /// <param name="handle">handle returned by Listen()</param> |
185 | public void ListenRemove(LLUUID itemID, int handle) | 185 | public void ListenRemove(UUID itemID, int handle) |
186 | { | 186 | { |
187 | m_listenerManager.Remove(itemID, handle); | 187 | m_listenerManager.Remove(itemID, handle); |
188 | } | 188 | } |
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
192 | /// (script engine) | 192 | /// (script engine) |
193 | /// </summary> | 193 | /// </summary> |
194 | /// <param name="itemID">UUID of the script engine</param> | 194 | /// <param name="itemID">UUID of the script engine</param> |
195 | public void DeleteListener(LLUUID itemID) | 195 | public void DeleteListener(UUID itemID) |
196 | { | 196 | { |
197 | m_listenerManager.DeleteListener(itemID); | 197 | m_listenerManager.DeleteListener(itemID); |
198 | } | 198 | } |
@@ -210,11 +210,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
210 | /// <param name="name">name of sender (object or avatar)</param> | 210 | /// <param name="name">name of sender (object or avatar)</param> |
211 | /// <param name="id">key of sender (object or avatar)</param> | 211 | /// <param name="id">key of sender (object or avatar)</param> |
212 | /// <param name="msg">msg to sent</param> | 212 | /// <param name="msg">msg to sent</param> |
213 | public void DeliverMessage(ChatTypeEnum type, int channel, string name, LLUUID id, string msg) | 213 | public void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg) |
214 | { | 214 | { |
215 | SceneObjectPart source = null; | 215 | SceneObjectPart source = null; |
216 | ScenePresence avatar = null; | 216 | ScenePresence avatar = null; |
217 | LLVector3 position; | 217 | Vector3 position; |
218 | 218 | ||
219 | source = m_scene.GetSceneObjectPart(id); | 219 | source = m_scene.GetSceneObjectPart(id); |
220 | if (source != null) | 220 | if (source != null) |
@@ -231,7 +231,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
231 | // Determine which listen event filters match the given set of arguments, this results | 231 | // Determine which listen event filters match the given set of arguments, this results |
232 | // in a limited set of listeners, each belonging a host. If the host is in range, add them | 232 | // in a limited set of listeners, each belonging a host. If the host is in range, add them |
233 | // to the pending queue. | 233 | // to the pending queue. |
234 | foreach (ListenerInfo li in m_listenerManager.GetListeners(LLUUID.Zero, channel, name, id, msg)) | 234 | foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg)) |
235 | { | 235 | { |
236 | // Dont process if this message is from yourself! | 236 | // Dont process if this message is from yourself! |
237 | if (li.GetHostID().Equals(id)) | 237 | if (li.GetHostID().Equals(id)) |
@@ -331,12 +331,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
331 | e.Message); | 331 | e.Message); |
332 | } | 332 | } |
333 | 333 | ||
334 | public Object[] GetSerializationData(LLUUID itemID) | 334 | public Object[] GetSerializationData(UUID itemID) |
335 | { | 335 | { |
336 | return m_listenerManager.GetSerializationData(itemID); | 336 | return m_listenerManager.GetSerializationData(itemID); |
337 | } | 337 | } |
338 | 338 | ||
339 | public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID, | 339 | public void CreateFromData(uint localID, UUID itemID, UUID hostID, |
340 | Object[] data) | 340 | Object[] data) |
341 | { | 341 | { |
342 | m_listenerManager.AddFromData(localID, itemID, hostID, data); | 342 | m_listenerManager.AddFromData(localID, itemID, hostID, data); |
@@ -357,7 +357,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
357 | m_curlisteners = 0; | 357 | m_curlisteners = 0; |
358 | } | 358 | } |
359 | 359 | ||
360 | public int AddListener(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, LLUUID id, string msg) | 360 | public int AddListener(uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg) |
361 | { | 361 | { |
362 | // do we already have a match on this particular filter event? | 362 | // do we already have a match on this particular filter event? |
363 | List<ListenerInfo> coll = GetListeners(itemID, channel, name, id, msg); | 363 | List<ListenerInfo> coll = GetListeners(itemID, channel, name, id, msg); |
@@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
395 | return -1; | 395 | return -1; |
396 | } | 396 | } |
397 | 397 | ||
398 | public void Remove(LLUUID itemID, int handle) | 398 | public void Remove(UUID itemID, int handle) |
399 | { | 399 | { |
400 | lock (m_listeners) | 400 | lock (m_listeners) |
401 | { | 401 | { |
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
419 | } | 419 | } |
420 | } | 420 | } |
421 | 421 | ||
422 | public void DeleteListener(LLUUID itemID) | 422 | public void DeleteListener(UUID itemID) |
423 | { | 423 | { |
424 | List<int> emptyChannels = new List<int>(); | 424 | List<int> emptyChannels = new List<int>(); |
425 | List<ListenerInfo> removedListeners = new List<ListenerInfo>(); | 425 | List<ListenerInfo> removedListeners = new List<ListenerInfo>(); |
@@ -455,7 +455,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
455 | } | 455 | } |
456 | } | 456 | } |
457 | 457 | ||
458 | public void Activate(LLUUID itemID, int handle) | 458 | public void Activate(UUID itemID, int handle) |
459 | { | 459 | { |
460 | lock (m_listeners) | 460 | lock (m_listeners) |
461 | { | 461 | { |
@@ -474,7 +474,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
474 | } | 474 | } |
475 | } | 475 | } |
476 | 476 | ||
477 | public void Dectivate(LLUUID itemID, int handle) | 477 | public void Dectivate(UUID itemID, int handle) |
478 | { | 478 | { |
479 | lock (m_listeners) | 479 | lock (m_listeners) |
480 | { | 480 | { |
@@ -494,7 +494,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
494 | } | 494 | } |
495 | 495 | ||
496 | // non-locked access, since its always called in the context of the lock | 496 | // non-locked access, since its always called in the context of the lock |
497 | private int GetNewHandle(LLUUID itemID) | 497 | private int GetNewHandle(UUID itemID) |
498 | { | 498 | { |
499 | List<int> handles = new List<int>(); | 499 | List<int> handles = new List<int>(); |
500 | 500 | ||
@@ -521,7 +521,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
521 | // Theres probably a more clever and efficient way to | 521 | // Theres probably a more clever and efficient way to |
522 | // do this, maybe with regex. | 522 | // do this, maybe with regex. |
523 | // PM2008: Ha, one could even be smart and define a specialized Enumerator. | 523 | // PM2008: Ha, one could even be smart and define a specialized Enumerator. |
524 | public List<ListenerInfo> GetListeners(LLUUID itemID, int channel, string name, LLUUID id, string msg) | 524 | public List<ListenerInfo> GetListeners(UUID itemID, int channel, string name, UUID id, string msg) |
525 | { | 525 | { |
526 | List<ListenerInfo> collection = new List<ListenerInfo>(); | 526 | List<ListenerInfo> collection = new List<ListenerInfo>(); |
527 | 527 | ||
@@ -539,7 +539,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
539 | { | 539 | { |
540 | continue; | 540 | continue; |
541 | } | 541 | } |
542 | if (!itemID.Equals(LLUUID.Zero) && !li.GetItemID().Equals(itemID)) | 542 | if (!itemID.Equals(UUID.Zero) && !li.GetItemID().Equals(itemID)) |
543 | { | 543 | { |
544 | continue; | 544 | continue; |
545 | } | 545 | } |
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
547 | { | 547 | { |
548 | continue; | 548 | continue; |
549 | } | 549 | } |
550 | if (!li.GetID().Equals(LLUUID.Zero) && !li.GetID().Equals(id)) | 550 | if (!li.GetID().Equals(UUID.Zero) && !li.GetID().Equals(id)) |
551 | { | 551 | { |
552 | continue; | 552 | continue; |
553 | } | 553 | } |
@@ -561,7 +561,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
561 | return collection; | 561 | return collection; |
562 | } | 562 | } |
563 | 563 | ||
564 | public Object[] GetSerializationData(LLUUID itemID) | 564 | public Object[] GetSerializationData(UUID itemID) |
565 | { | 565 | { |
566 | List<Object> data = new List<Object>(); | 566 | List<Object> data = new List<Object>(); |
567 | 567 | ||
@@ -576,7 +576,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
576 | return (Object[])data.ToArray(); | 576 | return (Object[])data.ToArray(); |
577 | } | 577 | } |
578 | 578 | ||
579 | public void AddFromData(uint localID, LLUUID itemID, LLUUID hostID, | 579 | public void AddFromData(uint localID, UUID itemID, UUID hostID, |
580 | Object[] data) | 580 | Object[] data) |
581 | { | 581 | { |
582 | int idx = 0; | 582 | int idx = 0; |
@@ -603,25 +603,25 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
603 | private bool m_active; // Listener is active or not | 603 | private bool m_active; // Listener is active or not |
604 | private int m_handle; // Assigned handle of this listener | 604 | private int m_handle; // Assigned handle of this listener |
605 | private uint m_localID; // Local ID from script engine | 605 | private uint m_localID; // Local ID from script engine |
606 | private LLUUID m_itemID; // ID of the host script engine | 606 | private UUID m_itemID; // ID of the host script engine |
607 | private LLUUID m_hostID; // ID of the host/scene part | 607 | private UUID m_hostID; // ID of the host/scene part |
608 | private int m_channel; // Channel | 608 | private int m_channel; // Channel |
609 | private LLUUID m_id; // ID to filter messages from | 609 | private UUID m_id; // ID to filter messages from |
610 | private string m_name; // Object name to filter messages from | 610 | private string m_name; // Object name to filter messages from |
611 | private string m_message; // The message | 611 | private string m_message; // The message |
612 | 612 | ||
613 | public ListenerInfo(int handle, uint localID, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, string message) | 613 | public ListenerInfo(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, UUID id, string message) |
614 | { | 614 | { |
615 | Initialise(handle, localID, ItemID, hostID, channel, name, id, message); | 615 | Initialise(handle, localID, ItemID, hostID, channel, name, id, message); |
616 | } | 616 | } |
617 | 617 | ||
618 | public ListenerInfo(ListenerInfo li, string name, LLUUID id, string message) | 618 | public ListenerInfo(ListenerInfo li, string name, UUID id, string message) |
619 | { | 619 | { |
620 | Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message); | 620 | Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message); |
621 | } | 621 | } |
622 | 622 | ||
623 | private void Initialise(int handle, uint localID, LLUUID ItemID, LLUUID hostID, int channel, string name, | 623 | private void Initialise(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, |
624 | LLUUID id, string message) | 624 | UUID id, string message) |
625 | { | 625 | { |
626 | m_active = true; | 626 | m_active = true; |
627 | m_handle = handle; | 627 | m_handle = handle; |
@@ -648,22 +648,22 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
648 | return data; | 648 | return data; |
649 | } | 649 | } |
650 | 650 | ||
651 | public static ListenerInfo FromData(uint localID, LLUUID ItemID, LLUUID hostID, Object[] data) | 651 | public static ListenerInfo FromData(uint localID, UUID ItemID, UUID hostID, Object[] data) |
652 | { | 652 | { |
653 | ListenerInfo linfo = new ListenerInfo((int)data[1], localID, | 653 | ListenerInfo linfo = new ListenerInfo((int)data[1], localID, |
654 | ItemID, hostID, (int)data[2], (string)data[3], | 654 | ItemID, hostID, (int)data[2], (string)data[3], |
655 | (LLUUID)data[4], (string)data[5]); | 655 | (UUID)data[4], (string)data[5]); |
656 | linfo.m_active=(bool)data[0]; | 656 | linfo.m_active=(bool)data[0]; |
657 | 657 | ||
658 | return linfo; | 658 | return linfo; |
659 | } | 659 | } |
660 | 660 | ||
661 | public LLUUID GetItemID() | 661 | public UUID GetItemID() |
662 | { | 662 | { |
663 | return m_itemID; | 663 | return m_itemID; |
664 | } | 664 | } |
665 | 665 | ||
666 | public LLUUID GetHostID() | 666 | public UUID GetHostID() |
667 | { | 667 | { |
668 | return m_hostID; | 668 | return m_hostID; |
669 | } | 669 | } |
@@ -708,7 +708,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm | |||
708 | m_active = true; | 708 | m_active = true; |
709 | } | 709 | } |
710 | 710 | ||
711 | public LLUUID GetID() | 711 | public UUID GetID() |
712 | { | 712 | { |
713 | return m_id; | 713 | return m_id; |
714 | } | 714 | } |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs index bde90bc..85aa344 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs | |||
@@ -31,7 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Threading; | 33 | using System.Threading; |
34 | using libsecondlife; | 34 | using OpenMetaverse; |
35 | using log4net; | 35 | using log4net; |
36 | using Nini.Config; | 36 | using Nini.Config; |
37 | using Nwc.XmlRpc; | 37 | using Nwc.XmlRpc; |
@@ -82,12 +82,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
82 | private string m_name = "XMLRPCModule"; | 82 | private string m_name = "XMLRPCModule"; |
83 | 83 | ||
84 | // <channel id, RPCChannelInfo> | 84 | // <channel id, RPCChannelInfo> |
85 | private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; | 85 | private Dictionary<UUID, RPCChannelInfo> m_openChannels; |
86 | private Dictionary<LLUUID, SendRemoteDataRequest> m_pendingSRDResponses; | 86 | private Dictionary<UUID, SendRemoteDataRequest> m_pendingSRDResponses; |
87 | private int m_remoteDataPort = 0; | 87 | private int m_remoteDataPort = 0; |
88 | 88 | ||
89 | private Dictionary<LLUUID, RPCRequestInfo> m_rpcPending; | 89 | private Dictionary<UUID, RPCRequestInfo> m_rpcPending; |
90 | private Dictionary<LLUUID, RPCRequestInfo> m_rpcPendingResponses; | 90 | private Dictionary<UUID, RPCRequestInfo> m_rpcPendingResponses; |
91 | private List<Scene> m_scenes = new List<Scene>(); | 91 | private List<Scene> m_scenes = new List<Scene>(); |
92 | private int RemoteReplyScriptTimeout = 9000; | 92 | private int RemoteReplyScriptTimeout = 9000; |
93 | private int RemoteReplyScriptWait = 300; | 93 | private int RemoteReplyScriptWait = 300; |
@@ -102,10 +102,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
102 | // get called only one time (or we lose any open channels) | 102 | // get called only one time (or we lose any open channels) |
103 | if (null == m_openChannels) | 103 | if (null == m_openChannels) |
104 | { | 104 | { |
105 | m_openChannels = new Dictionary<LLUUID, RPCChannelInfo>(); | 105 | m_openChannels = new Dictionary<UUID, RPCChannelInfo>(); |
106 | m_rpcPending = new Dictionary<LLUUID, RPCRequestInfo>(); | 106 | m_rpcPending = new Dictionary<UUID, RPCRequestInfo>(); |
107 | m_rpcPendingResponses = new Dictionary<LLUUID, RPCRequestInfo>(); | 107 | m_rpcPendingResponses = new Dictionary<UUID, RPCRequestInfo>(); |
108 | m_pendingSRDResponses = new Dictionary<LLUUID, SendRemoteDataRequest>(); | 108 | m_pendingSRDResponses = new Dictionary<UUID, SendRemoteDataRequest>(); |
109 | 109 | ||
110 | try | 110 | try |
111 | { | 111 | { |
@@ -164,11 +164,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
164 | /********************************************** | 164 | /********************************************** |
165 | * OpenXMLRPCChannel | 165 | * OpenXMLRPCChannel |
166 | * | 166 | * |
167 | * Generate a LLUUID channel key and add it and | 167 | * Generate a UUID channel key and add it and |
168 | * the prim id to dictionary <channelUUID, primUUID> | 168 | * the prim id to dictionary <channelUUID, primUUID> |
169 | * | 169 | * |
170 | * A custom channel key can be proposed. | 170 | * A custom channel key can be proposed. |
171 | * Otherwise, passing LLUUID.Zero will generate | 171 | * Otherwise, passing UUID.Zero will generate |
172 | * and return a random channel | 172 | * and return a random channel |
173 | * | 173 | * |
174 | * First check if there is a channel assigned for | 174 | * First check if there is a channel assigned for |
@@ -179,9 +179,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
179 | * | 179 | * |
180 | * ********************************************/ | 180 | * ********************************************/ |
181 | 181 | ||
182 | public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID, LLUUID channelID) | 182 | public UUID OpenXMLRPCChannel(uint localID, UUID itemID, UUID channelID) |
183 | { | 183 | { |
184 | LLUUID newChannel = LLUUID.Zero; | 184 | UUID newChannel = UUID.Zero; |
185 | 185 | ||
186 | // This should no longer happen, but the check is reasonable anyway | 186 | // This should no longer happen, but the check is reasonable anyway |
187 | if (null == m_openChannels) | 187 | if (null == m_openChannels) |
@@ -201,9 +201,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | if (newChannel == LLUUID.Zero) | 204 | if (newChannel == UUID.Zero) |
205 | { | 205 | { |
206 | newChannel = (channelID == LLUUID.Zero) ? LLUUID.Random() : channelID; | 206 | newChannel = (channelID == UUID.Zero) ? UUID.Random() : channelID; |
207 | RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, newChannel); | 207 | RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, newChannel); |
208 | lock (XMLRPCListLock) | 208 | lock (XMLRPCListLock) |
209 | { | 209 | { |
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
216 | 216 | ||
217 | // Delete channels based on itemID | 217 | // Delete channels based on itemID |
218 | // for when a script is deleted | 218 | // for when a script is deleted |
219 | public void DeleteChannels(LLUUID itemID) | 219 | public void DeleteChannels(UUID itemID) |
220 | { | 220 | { |
221 | if (m_openChannels != null) | 221 | if (m_openChannels != null) |
222 | { | 222 | { |
@@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
234 | 234 | ||
235 | IEnumerator tmpEnumerator = tmp.GetEnumerator(); | 235 | IEnumerator tmpEnumerator = tmp.GetEnumerator(); |
236 | while (tmpEnumerator.MoveNext()) | 236 | while (tmpEnumerator.MoveNext()) |
237 | m_openChannels.Remove((LLUUID) tmpEnumerator.Current); | 237 | m_openChannels.Remove((UUID) tmpEnumerator.Current); |
238 | } | 238 | } |
239 | } | 239 | } |
240 | } | 240 | } |
@@ -248,12 +248,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
248 | 248 | ||
249 | public void RemoteDataReply(string channel, string message_id, string sdata, int idata) | 249 | public void RemoteDataReply(string channel, string message_id, string sdata, int idata) |
250 | { | 250 | { |
251 | LLUUID message_key = new LLUUID(message_id); | 251 | UUID message_key = new UUID(message_id); |
252 | LLUUID channel_key = new LLUUID(channel); | 252 | UUID channel_key = new UUID(channel); |
253 | 253 | ||
254 | RPCRequestInfo rpcInfo = null; | 254 | RPCRequestInfo rpcInfo = null; |
255 | 255 | ||
256 | if (message_key == LLUUID.Zero) | 256 | if (message_key == UUID.Zero) |
257 | { | 257 | { |
258 | foreach (RPCRequestInfo oneRpcInfo in m_rpcPendingResponses.Values) | 258 | foreach (RPCRequestInfo oneRpcInfo in m_rpcPendingResponses.Values) |
259 | if (oneRpcInfo.GetChannelKey() == channel_key) | 259 | if (oneRpcInfo.GetChannelKey() == channel_key) |
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
284 | * | 284 | * |
285 | *********************************************/ | 285 | *********************************************/ |
286 | 286 | ||
287 | public void CloseXMLRPCChannel(LLUUID channelKey) | 287 | public void CloseXMLRPCChannel(UUID channelKey) |
288 | { | 288 | { |
289 | if (m_openChannels.ContainsKey(channelKey)) | 289 | if (m_openChannels.ContainsKey(channelKey)) |
290 | m_openChannels.Remove(channelKey); | 290 | m_openChannels.Remove(channelKey); |
@@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
308 | { | 308 | { |
309 | lock (XMLRPCListLock) | 309 | lock (XMLRPCListLock) |
310 | { | 310 | { |
311 | foreach (LLUUID luid in m_rpcPending.Keys) | 311 | foreach (UUID luid in m_rpcPending.Keys) |
312 | { | 312 | { |
313 | RPCRequestInfo tmpReq; | 313 | RPCRequestInfo tmpReq; |
314 | 314 | ||
@@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
322 | return null; | 322 | return null; |
323 | } | 323 | } |
324 | 324 | ||
325 | public void RemoveCompletedRequest(LLUUID id) | 325 | public void RemoveCompletedRequest(UUID id) |
326 | { | 326 | { |
327 | lock (XMLRPCListLock) | 327 | lock (XMLRPCListLock) |
328 | { | 328 | { |
@@ -339,7 +339,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
339 | } | 339 | } |
340 | } | 340 | } |
341 | 341 | ||
342 | public LLUUID SendRemoteData(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata) | 342 | public UUID SendRemoteData(uint localID, UUID itemID, string channel, string dest, int idata, string sdata) |
343 | { | 343 | { |
344 | SendRemoteDataRequest req = new SendRemoteDataRequest( | 344 | SendRemoteDataRequest req = new SendRemoteDataRequest( |
345 | localID, itemID, channel, dest, idata, sdata | 345 | localID, itemID, channel, dest, idata, sdata |
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
354 | { | 354 | { |
355 | lock (XMLRPCListLock) | 355 | lock (XMLRPCListLock) |
356 | { | 356 | { |
357 | foreach (LLUUID luid in m_pendingSRDResponses.Keys) | 357 | foreach (UUID luid in m_pendingSRDResponses.Keys) |
358 | { | 358 | { |
359 | SendRemoteDataRequest tmpReq; | 359 | SendRemoteDataRequest tmpReq; |
360 | 360 | ||
@@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
369 | return null; | 369 | return null; |
370 | } | 370 | } |
371 | 371 | ||
372 | public void RemoveCompletedSRDRequest(LLUUID id) | 372 | public void RemoveCompletedSRDRequest(UUID id) |
373 | { | 373 | { |
374 | lock (XMLRPCListLock) | 374 | lock (XMLRPCListLock) |
375 | { | 375 | { |
@@ -381,7 +381,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
381 | } | 381 | } |
382 | } | 382 | } |
383 | 383 | ||
384 | public void CancelSRDRequests(LLUUID itemID) | 384 | public void CancelSRDRequests(UUID itemID) |
385 | { | 385 | { |
386 | if (m_pendingSRDResponses != null) | 386 | if (m_pendingSRDResponses != null) |
387 | { | 387 | { |
@@ -408,7 +408,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
408 | 408 | ||
409 | if (GoodXML) | 409 | if (GoodXML) |
410 | { | 410 | { |
411 | LLUUID channel = new LLUUID((string) requestData["Channel"]); | 411 | UUID channel = new UUID((string) requestData["Channel"]); |
412 | RPCChannelInfo rpcChanInfo; | 412 | RPCChannelInfo rpcChanInfo; |
413 | if (m_openChannels.TryGetValue(channel, out rpcChanInfo)) | 413 | if (m_openChannels.TryGetValue(channel, out rpcChanInfo)) |
414 | { | 414 | { |
@@ -462,24 +462,24 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
462 | 462 | ||
463 | public class RPCRequestInfo | 463 | public class RPCRequestInfo |
464 | { | 464 | { |
465 | private LLUUID m_ChannelKey; | 465 | private UUID m_ChannelKey; |
466 | private string m_IntVal; | 466 | private string m_IntVal; |
467 | private LLUUID m_ItemID; | 467 | private UUID m_ItemID; |
468 | private uint m_localID; | 468 | private uint m_localID; |
469 | private LLUUID m_MessageID; | 469 | private UUID m_MessageID; |
470 | private bool m_processed; | 470 | private bool m_processed; |
471 | private int m_respInt; | 471 | private int m_respInt; |
472 | private string m_respStr; | 472 | private string m_respStr; |
473 | private string m_StrVal; | 473 | private string m_StrVal; |
474 | 474 | ||
475 | public RPCRequestInfo(uint localID, LLUUID itemID, LLUUID channelKey, string strVal, string intVal) | 475 | public RPCRequestInfo(uint localID, UUID itemID, UUID channelKey, string strVal, string intVal) |
476 | { | 476 | { |
477 | m_localID = localID; | 477 | m_localID = localID; |
478 | m_StrVal = strVal; | 478 | m_StrVal = strVal; |
479 | m_IntVal = intVal; | 479 | m_IntVal = intVal; |
480 | m_ItemID = itemID; | 480 | m_ItemID = itemID; |
481 | m_ChannelKey = channelKey; | 481 | m_ChannelKey = channelKey; |
482 | m_MessageID = LLUUID.Random(); | 482 | m_MessageID = UUID.Random(); |
483 | m_processed = false; | 483 | m_processed = false; |
484 | m_respStr = String.Empty; | 484 | m_respStr = String.Empty; |
485 | m_respInt = 0; | 485 | m_respInt = 0; |
@@ -490,7 +490,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
490 | return m_processed; | 490 | return m_processed; |
491 | } | 491 | } |
492 | 492 | ||
493 | public LLUUID GetChannelKey() | 493 | public UUID GetChannelKey() |
494 | { | 494 | { |
495 | return m_ChannelKey; | 495 | return m_ChannelKey; |
496 | } | 496 | } |
@@ -525,7 +525,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
525 | return m_localID; | 525 | return m_localID; |
526 | } | 526 | } |
527 | 527 | ||
528 | public LLUUID GetItemID() | 528 | public UUID GetItemID() |
529 | { | 529 | { |
530 | return m_ItemID; | 530 | return m_ItemID; |
531 | } | 531 | } |
@@ -540,7 +540,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
540 | return int.Parse(m_IntVal); | 540 | return int.Parse(m_IntVal); |
541 | } | 541 | } |
542 | 542 | ||
543 | public LLUUID GetMessageID() | 543 | public UUID GetMessageID() |
544 | { | 544 | { |
545 | return m_MessageID; | 545 | return m_MessageID; |
546 | } | 546 | } |
@@ -548,23 +548,23 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
548 | 548 | ||
549 | public class RPCChannelInfo | 549 | public class RPCChannelInfo |
550 | { | 550 | { |
551 | private LLUUID m_ChannelKey; | 551 | private UUID m_ChannelKey; |
552 | private LLUUID m_itemID; | 552 | private UUID m_itemID; |
553 | private uint m_localID; | 553 | private uint m_localID; |
554 | 554 | ||
555 | public RPCChannelInfo(uint localID, LLUUID itemID, LLUUID channelID) | 555 | public RPCChannelInfo(uint localID, UUID itemID, UUID channelID) |
556 | { | 556 | { |
557 | m_ChannelKey = channelID; | 557 | m_ChannelKey = channelID; |
558 | m_localID = localID; | 558 | m_localID = localID; |
559 | m_itemID = itemID; | 559 | m_itemID = itemID; |
560 | } | 560 | } |
561 | 561 | ||
562 | public LLUUID GetItemID() | 562 | public UUID GetItemID() |
563 | { | 563 | { |
564 | return m_itemID; | 564 | return m_itemID; |
565 | } | 565 | } |
566 | 566 | ||
567 | public LLUUID GetChannelID() | 567 | public UUID GetChannelID() |
568 | { | 568 | { |
569 | return m_ChannelKey; | 569 | return m_ChannelKey; |
570 | } | 570 | } |
@@ -583,15 +583,15 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
583 | public bool finished; | 583 | public bool finished; |
584 | private Thread httpThread; | 584 | private Thread httpThread; |
585 | public int idata; | 585 | public int idata; |
586 | public LLUUID m_itemID; | 586 | public UUID m_itemID; |
587 | public uint m_localID; | 587 | public uint m_localID; |
588 | public LLUUID reqID; | 588 | public UUID reqID; |
589 | public XmlRpcRequest request; | 589 | public XmlRpcRequest request; |
590 | public int response_idata; | 590 | public int response_idata; |
591 | public string response_sdata; | 591 | public string response_sdata; |
592 | public string sdata; | 592 | public string sdata; |
593 | 593 | ||
594 | public SendRemoteDataRequest(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata) | 594 | public SendRemoteDataRequest(uint localID, UUID itemID, string channel, string dest, int idata, string sdata) |
595 | { | 595 | { |
596 | this.channel = channel; | 596 | this.channel = channel; |
597 | destURL = dest; | 597 | destURL = dest; |
@@ -600,10 +600,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
600 | m_itemID = itemID; | 600 | m_itemID = itemID; |
601 | m_localID = localID; | 601 | m_localID = localID; |
602 | 602 | ||
603 | reqID = LLUUID.Random(); | 603 | reqID = UUID.Random(); |
604 | } | 604 | } |
605 | 605 | ||
606 | public LLUUID process() | 606 | public UUID process() |
607 | { | 607 | { |
608 | httpThread = new Thread(SendRequest); | 608 | httpThread = new Thread(SendRequest); |
609 | httpThread.Name = "HttpRequestThread"; | 609 | httpThread.Name = "HttpRequestThread"; |
@@ -625,12 +625,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
625 | { | 625 | { |
626 | Hashtable param = new Hashtable(); | 626 | Hashtable param = new Hashtable(); |
627 | 627 | ||
628 | // Check if channel is an LLUUID | 628 | // Check if channel is an UUID |
629 | // if not, use as method name | 629 | // if not, use as method name |
630 | LLUUID parseUID; | 630 | UUID parseUID; |
631 | string mName = "llRemoteData"; | 631 | string mName = "llRemoteData"; |
632 | if ((channel != null) && (channel != "")) | 632 | if ((channel != null) && (channel != "")) |
633 | if (!LLUUID.TryParse(channel, out parseUID)) | 633 | if (!UUID.TryParse(channel, out parseUID)) |
634 | mName = channel; | 634 | mName = channel; |
635 | else | 635 | else |
636 | param["Channel"] = channel; | 636 | param["Channel"] = channel; |
@@ -698,7 +698,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC | |||
698 | } | 698 | } |
699 | } | 699 | } |
700 | 700 | ||
701 | public LLUUID GetReqID() | 701 | public UUID GetReqID() |
702 | { | 702 | { |
703 | return reqID; | 703 | return reqID; |
704 | } | 704 | } |