From 4c5788c4c0975dbf3af58e2184a90965fcf0e893 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 7 Aug 2010 22:24:17 +0100 Subject: Add search URL to Login Service --- OpenSim/Services/LLLoginService/LLLoginResponse.cs | 18 +++++++++++++++++- OpenSim/Services/LLLoginService/LLLoginService.cs | 4 +++- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 240f5b1..c1da463 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -178,6 +178,8 @@ namespace OpenSim.Services.LLLoginService // Web map private string mapTileURL; + private string searchURL; + // Error Flags private string errorReason; private string errorMessage; @@ -226,7 +228,7 @@ namespace OpenSim.Services.LLLoginService public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, GridRegion destination, List invSkel, FriendInfo[] friendsList, ILibraryService libService, string where, string startlocation, Vector3 position, Vector3 lookAt, List gestures, string message, - GridRegion home, IPEndPoint clientIP, string mapTileURL) + GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL) : this() { FillOutInventoryData(invSkel, libService); @@ -243,6 +245,7 @@ namespace OpenSim.Services.LLLoginService BuddList = ConvertFriendListItem(friendsList); StartLocation = where; MapTileURL = mapTileURL; + SearchURL = searchURL; FillOutHomeData(pinfo, home); LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); @@ -416,6 +419,7 @@ namespace OpenSim.Services.LLLoginService InitialOutfitHash["gender"] = "female"; initialOutfit.Add(InitialOutfitHash); mapTileURL = String.Empty; + searchURL = String.Empty; } @@ -479,6 +483,9 @@ namespace OpenSim.Services.LLLoginService responseData["region_x"] = (Int32)(RegionX); responseData["region_y"] = (Int32)(RegionY); + if (searchURL != String.Empty) + responseData["search"] = searchURL; + if (mapTileURL != String.Empty) responseData["map-server-url"] = mapTileURL; @@ -581,6 +588,9 @@ namespace OpenSim.Services.LLLoginService if (mapTileURL != String.Empty) map["map-server-url"] = OSD.FromString(mapTileURL); + if (searchURL != String.Empty) + map["search"] = OSD.FromString(searchURL); + if (m_buddyList != null) { map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray()); @@ -938,6 +948,12 @@ namespace OpenSim.Services.LLLoginService set { mapTileURL = value; } } + public string SearchURL + { + get { return searchURL; } + set { searchURL = value; } + } + public string Message { get { return welcomeMessage; } diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 9446126..f9fe7f0 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -74,6 +74,7 @@ namespace OpenSim.Services.LLLoginService protected string m_GatekeeperURL; protected bool m_AllowRemoteSetLoginLevel; protected string m_MapTileURL; + protected string m_SearchURL; IConfig m_LoginServerConfig; @@ -102,6 +103,7 @@ namespace OpenSim.Services.LLLoginService m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0); m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty); m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); + m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); // These are required; the others aren't if (accountService == string.Empty || authService == string.Empty) @@ -364,7 +366,7 @@ namespace OpenSim.Services.LLLoginService // Finally, fill out the response and return it // LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, - where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL); + where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_SearchURL); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); return response; -- cgit v1.1