aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJeff Ames2009-04-24 00:58:48 +0000
committerJeff Ames2009-04-24 00:58:48 +0000
commit8afeee9ff6905781824237e0ddd4235b4d921ef8 (patch)
treee701c0356b5a75685d2678e982bf331b0b0e0aa9
parent* refactor: move archive user inventory item serialization out to a separate ... (diff)
downloadopensim-SC_OLD-8afeee9ff6905781824237e0ddd4235b4d921ef8.zip
opensim-SC_OLD-8afeee9ff6905781824237e0ddd4235b4d921ef8.tar.gz
opensim-SC_OLD-8afeee9ff6905781824237e0ddd4235b4d921ef8.tar.bz2
opensim-SC_OLD-8afeee9ff6905781824237e0ddd4235b4d921ef8.tar.xz
Update svn properties, add copyright headers, formatting cleanup.
-rw-r--r--OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs35
-rw-r--r--OpenSim/Client/VWoHTTP/VWoHTTPModule.cs31
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs19
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs2
4 files changed, 64 insertions, 23 deletions
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
index 3ac4164..314bbe4 100644
--- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
+++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Drawing; 30using System.Drawing;
4using System.Drawing.Imaging; 31using System.Drawing.Imaging;
@@ -30,7 +57,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
30 if (!UUID.TryParse(urlparts[1], out sessionID)) 57 if (!UUID.TryParse(urlparts[1], out sessionID))
31 return false; 58 return false;
32 // Check we match session 59 // Check we match session
33 if(sessionID != SessionId) 60 if (sessionID != SessionId)
34 return false; 61 return false;
35 62
36 string method = urlparts[2]; 63 string method = urlparts[2];
@@ -57,12 +84,12 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
57 private bool ProcessTextureRequest(string param, OSHttpResponse resp) 84 private bool ProcessTextureRequest(string param, OSHttpResponse resp)
58 { 85 {
59 UUID assetID; 86 UUID assetID;
60 if(!UUID.TryParse(param, out assetID)) 87 if (!UUID.TryParse(param, out assetID))
61 return false; 88 return false;
62 89
63 AssetBase asset = m_scene.CommsManager.AssetCache.GetAsset(assetID, true); 90 AssetBase asset = m_scene.CommsManager.AssetCache.GetAsset(assetID, true);
64 91
65 if(asset == null) 92 if (asset == null)
66 return false; 93 return false;
67 94
68 ManagedImage tmp; 95 ManagedImage tmp;
diff --git a/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs b/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs
index c5b5c09..8f7fc1b 100644
--- a/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs
+++ b/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4using Nini.Config; 31using Nini.Config;
@@ -25,7 +52,7 @@ namespace OpenSim.Client.VWoHTTP
25 52
26 public void Initialise(Scene scene, IConfigSource source) 53 public void Initialise(Scene scene, IConfigSource source)
27 { 54 {
28 if(m_disabled) 55 if (m_disabled)
29 return; 56 return;
30 57
31 m_scenes.Add(scene); 58 m_scenes.Add(scene);
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs
index 30839cc..2a5a319 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs
@@ -67,13 +67,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
67 m_serviceURL = serviceURL.Trim().ToLower(); 67 m_serviceURL = serviceURL.Trim().ToLower();
68 m_disableKeepAlive = disableKeepAlive; 68 m_disableKeepAlive = disableKeepAlive;
69 69
70 if ((serviceURL == null) 70 if ((serviceURL == null) ||
71 || (serviceURL == string.Empty) 71 (serviceURL == string.Empty))
72 )
73 { 72 {
74 throw new Exception("Please specify a valid ServiceURL for XmlRpcGroupDataProvider in OpenSim.ini, [Groups], XmlRpcServiceURL"); 73 throw new Exception("Please specify a valid ServiceURL for XmlRpcGroupDataProvider in OpenSim.ini, [Groups], XmlRpcServiceURL");
75 } 74 }
76
77 } 75 }
78 76
79 /// <summary> 77 /// <summary>
@@ -153,7 +151,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
153 if (respData.Contains("error")) 151 if (respData.Contains("error"))
154 { 152 {
155 // UUID is not nullable 153 // UUID is not nullable
156
157 return UUID.Zero; 154 return UUID.Zero;
158 } 155 }
159 156
@@ -236,7 +233,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
236 param["Name"] = GroupName.ToString(); 233 param["Name"] = GroupName.ToString();
237 } 234 }
238 235
239
240 Hashtable respData = XmlRpcCall("groups.getGroup", param); 236 Hashtable respData = XmlRpcCall("groups.getGroup", param);
241 237
242 if (respData.Contains("error")) 238 if (respData.Contains("error"))
@@ -253,7 +249,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
253 Hashtable param = new Hashtable(); 249 Hashtable param = new Hashtable();
254 param["GroupID"] = GroupID.ToString(); 250 param["GroupID"] = GroupID.ToString();
255 251
256
257 Hashtable respData = XmlRpcCall("groups.getGroup", param); 252 Hashtable respData = XmlRpcCall("groups.getGroup", param);
258 253
259 if (respData.Contains("error")) 254 if (respData.Contains("error"))
@@ -269,7 +264,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
269 MemberGroupProfile.PowersMask = MemberInfo.GroupPowers; 264 MemberGroupProfile.PowersMask = MemberInfo.GroupPowers;
270 265
271 return MemberGroupProfile; 266 return MemberGroupProfile;
272
273 } 267 }
274 268
275 private GroupProfileData GroupProfileHashtableToGroupProfileData(Hashtable groupProfile) 269 private GroupProfileData GroupProfileHashtableToGroupProfileData(Hashtable groupProfile)
@@ -300,7 +294,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
300 294
301 private GroupRecord GroupProfileHashtableToGroupRecord(Hashtable groupProfile) 295 private GroupRecord GroupProfileHashtableToGroupRecord(Hashtable groupProfile)
302 { 296 {
303
304 GroupRecord group = new GroupRecord(); 297 GroupRecord group = new GroupRecord();
305 group.GroupID = UUID.Parse((string)groupProfile["GroupID"]); 298 group.GroupID = UUID.Parse((string)groupProfile["GroupID"]);
306 group.GroupName = groupProfile["Name"].ToString(); 299 group.GroupName = groupProfile["Name"].ToString();
@@ -320,7 +313,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
320 return group; 313 return group;
321 } 314 }
322 315
323
324 public void SetAgentActiveGroup(UUID AgentID, UUID GroupID) 316 public void SetAgentActiveGroup(UUID AgentID, UUID GroupID)
325 { 317 {
326 Hashtable param = new Hashtable(); 318 Hashtable param = new Hashtable();
@@ -349,7 +341,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
349 param["ListInProfile"] = ListInProfile ? "1" : "0"; 341 param["ListInProfile"] = ListInProfile ? "1" : "0";
350 342
351 XmlRpcCall("groups.setAgentGroupInfo", param); 343 XmlRpcCall("groups.setAgentGroupInfo", param);
352
353 } 344 }
354 345
355 public void AddAgentToGroupInvite(UUID inviteID, UUID groupID, UUID roleID, UUID agentID) 346 public void AddAgentToGroupInvite(UUID inviteID, UUID groupID, UUID roleID, UUID agentID)
@@ -361,7 +352,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
361 param["GroupID"] = groupID.ToString(); 352 param["GroupID"] = groupID.ToString();
362 353
363 XmlRpcCall("groups.addAgentToGroupInvite", param); 354 XmlRpcCall("groups.addAgentToGroupInvite", param);
364
365 } 355 }
366 356
367 public GroupInviteInfo GetAgentToGroupInvite(UUID inviteID) 357 public GroupInviteInfo GetAgentToGroupInvite(UUID inviteID)
@@ -410,7 +400,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
410 param["GroupID"] = GroupID.ToString(); 400 param["GroupID"] = GroupID.ToString();
411 401
412 XmlRpcCall("groups.removeAgentFromGroup", param); 402 XmlRpcCall("groups.removeAgentFromGroup", param);
413
414 } 403 }
415 404
416 public void AddAgentToGroupRole(UUID AgentID, UUID GroupID, UUID RoleID) 405 public void AddAgentToGroupRole(UUID AgentID, UUID GroupID, UUID RoleID)
@@ -433,7 +422,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
433 XmlRpcCall("groups.removeAgentFromGroupRole", param); 422 XmlRpcCall("groups.removeAgentFromGroupRole", param);
434 } 423 }
435 424
436
437 public List<DirGroupsReplyData> FindGroups(string search) 425 public List<DirGroupsReplyData> FindGroups(string search)
438 { 426 {
439 Hashtable param = new Hashtable(); 427 Hashtable param = new Hashtable();
@@ -494,7 +482,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
494 return HashTableToGroupMembershipData(respData); 482 return HashTableToGroupMembershipData(respData);
495 } 483 }
496 484
497
498 public List<GroupMembershipData> GetAgentGroupMemberships(UUID AgentID) 485 public List<GroupMembershipData> GetAgentGroupMemberships(UUID AgentID)
499 { 486 {
500 Hashtable param = new Hashtable(); 487 Hashtable param = new Hashtable();
@@ -757,7 +744,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
757 744
758 XmlRpcResponse resp = req.Send(m_serviceURL, 10000); 745 XmlRpcResponse resp = req.Send(m_serviceURL, 10000);
759 746
760 if( resp.Value is Hashtable ) 747 if (resp.Value is Hashtable)
761 { 748 {
762 Hashtable respData = (Hashtable)resp.Value; 749 Hashtable respData = (Hashtable)resp.Value;
763 if (respData.Contains("error") && !respData.Contains("succeed")) 750 if (respData.Contains("error") && !respData.Contains("succeed"))
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
index 9ba78c5..69c7258 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
@@ -490,7 +490,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
490 // If a message from a group arrives here, it may need to be forwarded to a local client 490 // If a message from a group arrives here, it may need to be forwarded to a local client
491 if (msg.fromGroup == true) 491 if (msg.fromGroup == true)
492 { 492 {
493 switch( msg.dialog ) 493 switch (msg.dialog)
494 { 494 {
495 case (byte)InstantMessageDialog.GroupInvitation: 495 case (byte)InstantMessageDialog.GroupInvitation:
496 case (byte)InstantMessageDialog.GroupNotice: 496 case (byte)InstantMessageDialog.GroupNotice: