aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2011-06-20 03:08:56 +0200
committerMelanie2011-06-20 03:08:56 +0200
commitf4f55c4d6bdbe9a86b5343159916977b331fefe0 (patch)
tree08fb85f2aa0193bf8549e684b98501c2c52faa1a /OpenSim/Framework
parentAdd some flags to control content in search better (diff)
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC-f4f55c4d6bdbe9a86b5343159916977b331fefe0.zip
opensim-SC-f4f55c4d6bdbe9a86b5343159916977b331fefe0.tar.gz
opensim-SC-f4f55c4d6bdbe9a86b5343159916977b331fefe0.tar.bz2
opensim-SC-f4f55c4d6bdbe9a86b5343159916977b331fefe0.tar.xz
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AgentCircuitData.cs1
-rw-r--r--OpenSim/Framework/AssetBase.cs6
-rw-r--r--OpenSim/Framework/AssetLandmark.cs3
-rw-r--r--OpenSim/Framework/IClientAPI.cs16
-rw-r--r--OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs8
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs4
-rw-r--r--OpenSim/Framework/Util.cs63
7 files changed, 95 insertions, 6 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index dbd47d3..125910e 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -345,6 +345,7 @@ namespace OpenSim.Framework
345 } 345 }
346 } 346 }
347 } 347 }
348
348 } 349 }
349 350
350 351
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs
index 98fa846..8e24f91 100644
--- a/OpenSim/Framework/AssetBase.cs
+++ b/OpenSim/Framework/AssetBase.cs
@@ -223,6 +223,12 @@ namespace OpenSim.Framework
223 set { m_metadata.Temporary = value; } 223 set { m_metadata.Temporary = value; }
224 } 224 }
225 225
226 public string CreatorID
227 {
228 get { return m_metadata.CreatorID; }
229 set { m_metadata.CreatorID = value; }
230 }
231
226 public AssetFlags Flags 232 public AssetFlags Flags
227 { 233 {
228 get { return m_metadata.Flags; } 234 get { return m_metadata.Flags; }
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs
index f433235..103f756 100644
--- a/OpenSim/Framework/AssetLandmark.cs
+++ b/OpenSim/Framework/AssetLandmark.cs
@@ -35,6 +35,7 @@ namespace OpenSim.Framework
35 public Vector3 Position; 35 public Vector3 Position;
36 public ulong RegionHandle; 36 public ulong RegionHandle;
37 public UUID RegionID; 37 public UUID RegionID;
38 public string Gatekeeper = string.Empty;
38 public int Version; 39 public int Version;
39 40
40 public AssetLandmark(AssetBase a) 41 public AssetLandmark(AssetBase a)
@@ -51,6 +52,8 @@ namespace OpenSim.Framework
51 string[] parts = temp.Split('\n'); 52 string[] parts = temp.Split('\n');
52 int.TryParse(parts[0].Substring(17, 1), out Version); 53 int.TryParse(parts[0].Substring(17, 1), out Version);
53 UUID.TryParse(parts[1].Substring(10, 36), out RegionID); 54 UUID.TryParse(parts[1].Substring(10, 36), out RegionID);
55 if (parts.Length >= 5)
56 Gatekeeper = parts[4].Replace("gatekeeper ", "");
54 // The position is a vector with spaces as separators ("10.3 32.5 43"). 57 // The position is a vector with spaces as separators ("10.3 32.5 43").
55 // Parse each scalar separately to take into account the system's culture setting. 58 // Parse each scalar separately to take into account the system's culture setting.
56 string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' '); 59 string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' ');
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 3cf5f32..31a45e2 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Framework
83 IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags); 83 IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags);
84 84
85 public delegate void TeleportLandmarkRequest( 85 public delegate void TeleportLandmarkRequest(
86 IClientAPI remoteClient, UUID regionID, Vector3 position); 86 IClientAPI remoteClient, AssetLandmark lm);
87 87
88 public delegate void DisconnectUser(); 88 public delegate void DisconnectUser();
89 89
@@ -1165,7 +1165,19 @@ namespace OpenSim.Framework
1165 void SendAgentAlertMessage(string message, bool modal); 1165 void SendAgentAlertMessage(string message, bool modal);
1166 void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); 1166 void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
1167 1167
1168 void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, 1168 /// <summary>
1169 /// Open a dialog box on the client.
1170 /// </summary>
1171 /// <param name="objectname"></param>
1172 /// <param name="objectID"></param>
1173 /// <param name="ownerID">/param>
1174 /// <param name="ownerFirstName"></param>
1175 /// <param name="ownerLastName"></param>
1176 /// <param name="msg"></param>
1177 /// <param name="textureID"></param>
1178 /// <param name="ch"></param>
1179 /// <param name="buttonlabels"></param>
1180 void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch,
1169 string[] buttonlabels); 1181 string[] buttonlabels);
1170 1182
1171 bool AddMoney(int debit); 1183 bool AddMoney(int debit);
diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
index 6ba4c5a..931898c 100644
--- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
@@ -182,6 +182,9 @@ namespace OpenSim.Framework.Serialization.External
182 case "FixedSun": 182 case "FixedSun":
183 settings.FixedSun = bool.Parse(xtr.ReadElementContentAsString()); 183 settings.FixedSun = bool.Parse(xtr.ReadElementContentAsString());
184 break; 184 break;
185 case "SunPosition":
186 settings.SunPosition = double.Parse(xtr.ReadElementContentAsString());
187 break;
185 } 188 }
186 } 189 }
187 190
@@ -237,8 +240,9 @@ namespace OpenSim.Framework.Serialization.External
237 xtw.WriteElementString("TerrainLowerLimit", settings.TerrainLowerLimit.ToString()); 240 xtw.WriteElementString("TerrainLowerLimit", settings.TerrainLowerLimit.ToString());
238 xtw.WriteElementString("UseEstateSun", settings.UseEstateSun.ToString()); 241 xtw.WriteElementString("UseEstateSun", settings.UseEstateSun.ToString());
239 xtw.WriteElementString("FixedSun", settings.FixedSun.ToString()); 242 xtw.WriteElementString("FixedSun", settings.FixedSun.ToString());
240 // XXX: Need to expose interface to get sun phase information from sun module 243 xtw.WriteElementString("SunPosition", settings.SunPosition.ToString());
241 // xtw.WriteStartElement("SunPhase", 244 // Note: 'SunVector' isn't saved because this value is owned by the Sun Module, which
245 // calculates it automatically according to the date and other factors.
242 xtw.WriteEndElement(); 246 xtw.WriteEndElement();
243 247
244 xtw.WriteEndElement(); 248 xtw.WriteEndElement();
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index c12d666..460f759 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -412,7 +412,7 @@ namespace OpenSim.Framework.Servers.HttpServer
412 // OpenSim.Framework.WebUtil.OSHeaderRequestID 412 // OpenSim.Framework.WebUtil.OSHeaderRequestID
413 if (request.Headers["opensim-request-id"] != null) 413 if (request.Headers["opensim-request-id"] != null)
414 reqnum = String.Format("{0}:{1}",request.RemoteIPEndPoint,request.Headers["opensim-request-id"]); 414 reqnum = String.Format("{0}:{1}",request.RemoteIPEndPoint,request.Headers["opensim-request-id"]);
415 // m_log.DebugFormat("[BASE HTTP SERVER]: <{0}> handle request for {1}",reqnum,request.RawUrl); 415 //m_log.DebugFormat("[BASE HTTP SERVER]: <{0}> handle request for {1}",reqnum,request.RawUrl);
416 416
417 Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); 417 Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
418 418
@@ -440,7 +440,7 @@ namespace OpenSim.Framework.Servers.HttpServer
440 string path = request.RawUrl; 440 string path = request.RawUrl;
441 string handlerKey = GetHandlerKey(request.HttpMethod, path); 441 string handlerKey = GetHandlerKey(request.HttpMethod, path);
442 442
443// m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); 443 //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
444 444
445 if (TryGetStreamHandler(handlerKey, out requestHandler)) 445 if (TryGetStreamHandler(handlerKey, out requestHandler))
446 { 446 {
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 366a38f..5ace351 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1706,5 +1706,68 @@ namespace OpenSim.Framework
1706 return (T)Enum.Parse(typeof(T), value); ; 1706 return (T)Enum.Parse(typeof(T), value); ;
1707 } 1707 }
1708 #endregion 1708 #endregion
1709
1710 #region Universal User Identifiers
1711 /// <summary>
1712 /// </summary>
1713 /// <param name="value">uuid[;endpoint[;name]]</param>
1714 /// <param name="uuid"></param>
1715 /// <param name="url"></param>
1716 /// <param name="firstname"></param>
1717 /// <param name="lastname"></param>
1718 public static bool ParseUniversalUserIdentifier(string value, out UUID uuid, out string url, out string firstname, out string lastname, out string secret)
1719 {
1720 uuid = UUID.Zero; url = string.Empty; firstname = "Unknown"; lastname = "User"; secret = string.Empty;
1721
1722 string[] parts = value.Split(';');
1723 if (parts.Length >= 1)
1724 if (!UUID.TryParse(parts[0], out uuid))
1725 return false;
1726
1727 if (parts.Length >= 2)
1728 url = parts[1];
1729
1730 if (parts.Length >= 3)
1731 {
1732 string[] name = parts[2].Split();
1733 if (name.Length == 2)
1734 {
1735 firstname = name[0];
1736 lastname = name[1];
1737 }
1738 }
1739 if (parts.Length >= 4)
1740 secret = parts[3];
1741
1742 return true;
1743 }
1744
1745 /// <summary>
1746 ///
1747 /// </summary>
1748 /// <param name="acircuit"></param>
1749 /// <returns>uuid[;endpoint[;name]]</returns>
1750 public static string ProduceUserUniversalIdentifier(AgentCircuitData acircuit)
1751 {
1752 if (acircuit.ServiceURLs.ContainsKey("HomeURI"))
1753 {
1754 string agentsURI = acircuit.ServiceURLs["HomeURI"].ToString();
1755 if (!agentsURI.EndsWith("/"))
1756 agentsURI += "/";
1757
1758 // This is ugly, but there's no other way, given that the name is changed
1759 // in the agent circuit data for foreigners
1760 if (acircuit.lastname.Contains("@"))
1761 {
1762 string[] parts = acircuit.firstname.Split(new char[] { '.' });
1763 if (parts.Length == 2)
1764 return acircuit.AgentID.ToString() + ";" + agentsURI + ";" + parts[0] + " " + parts[1];
1765 }
1766 return acircuit.AgentID.ToString() + ";" + agentsURI + ";" + acircuit.firstname + " " + acircuit.lastname;
1767 }
1768 else
1769 return acircuit.AgentID.ToString();
1770 }
1771 #endregion
1709 } 1772 }
1710} 1773}