aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/Main.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-06 18:18:19 +0000
committerTeravus Ovares2008-01-06 18:18:19 +0000
commitb8efd5f2949dd247590c1e40509e71031faf3413 (patch)
tree02307ef3edef08bf1a393d89cd772ad8d0ee7ae5 /OpenSim/Grid/UserServer/Main.cs
parentSet svn:eol-style. (diff)
downloadopensim-SC-b8efd5f2949dd247590c1e40509e71031faf3413.zip
opensim-SC-b8efd5f2949dd247590c1e40509e71031faf3413.tar.gz
opensim-SC-b8efd5f2949dd247590c1e40509e71031faf3413.tar.bz2
opensim-SC-b8efd5f2949dd247590c1e40509e71031faf3413.tar.xz
* Added some userserver glue for communications with the message server
* Added some code for the message server, fixed a few references and starting to flesh it out.
Diffstat (limited to 'OpenSim/Grid/UserServer/Main.cs')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 5264870..8e6817d 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -42,9 +42,11 @@ namespace OpenSim.Grid.UserServer
42 public class OpenUser_Main : conscmd_callback 42 public class OpenUser_Main : conscmd_callback
43 { 43 {
44 private UserConfig Cfg; 44 private UserConfig Cfg;
45
45 46
46 public UserManager m_userManager; 47 public UserManager m_userManager;
47 public UserLoginService m_loginService; 48 public UserLoginService m_loginService;
49 public MessageServersConnector m_messagesService;
48 50
49 private LogBase m_console; 51 private LogBase m_console;
50 private LLUUID m_lastCreatedUser = LLUUID.Random(); 52 private LLUUID m_lastCreatedUser = LLUUID.Random();
@@ -93,6 +95,10 @@ namespace OpenSim.Grid.UserServer
93 m_loginService = new UserLoginService( 95 m_loginService = new UserLoginService(
94 m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); 96 m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg);
95 97
98 m_messagesService = new MessageServersConnector(MainLog.Instance);
99
100 m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation;
101
96 MainLog.Instance.Verbose("REGION", "Starting HTTP process"); 102 MainLog.Instance.Verbose("REGION", "Starting HTTP process");
97 BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); 103 BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort);
98 104
@@ -106,7 +112,12 @@ namespace OpenSim.Grid.UserServer
106 httpServer.AddXmlRPCHandler("remove_user_friend", m_userManager.XmlRpcResponseXmlRPCRemoveUserFriend); 112 httpServer.AddXmlRPCHandler("remove_user_friend", m_userManager.XmlRpcResponseXmlRPCRemoveUserFriend);
107 httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms); 113 httpServer.AddXmlRPCHandler("update_user_friend_perms", m_userManager.XmlRpcResponseXmlRPCUpdateUserFriendPerms);
108 httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList); 114 httpServer.AddXmlRPCHandler("get_user_friend_list", m_userManager.XmlRpcResponseXmlRPCGetUserFriendList);
109 115
116 // Message Server ---> User Server
117 httpServer.AddXmlRPCHandler("register_messageserver", m_messagesService.XmlRPCRegisterMessageServer);
118 httpServer.AddXmlRPCHandler("agent_change_region", m_messagesService.XmlRPCUserMovedtoRegion);
119 httpServer.AddXmlRPCHandler("deregister_messageserver", m_messagesService.XmlRPCDeRegisterMessageServer);
120
110 121
111 httpServer.AddStreamHandler( 122 httpServer.AddStreamHandler(
112 new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); 123 new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod));
@@ -173,6 +184,7 @@ namespace OpenSim.Grid.UserServer
173 break; 184 break;
174 185
175 case "shutdown": 186 case "shutdown":
187 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
176 m_console.Close(); 188 m_console.Close();
177 Environment.Exit(0); 189 Environment.Exit(0);
178 break; 190 break;
@@ -196,6 +208,10 @@ namespace OpenSim.Grid.UserServer
196 { 208 {
197 Console.WriteLine("response got"); 209 Console.WriteLine("response got");
198 } 210 }
211 public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position)
212 {
213 m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, Position);
214 }
199 215
200 /*private void ConfigDB(IGenericConfig configData) 216 /*private void ConfigDB(IGenericConfig configData)
201 { 217 {