aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/CommunicationsManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/CommunicationsManager.cs')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs61
1 files changed, 27 insertions, 34 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 2a87306..6ea3c29 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -37,81 +37,74 @@ namespace OpenSim.Framework.Communications
37{ 37{
38 public class CommunicationsManager 38 public class CommunicationsManager
39 { 39 {
40 protected AssetCache m_assetCache; 40 protected IUserServices m_userService;
41 protected IGridServices m_gridServer; 41 public IUserServices UserService
42 protected IInterRegionCommunications m_interRegion;
43 protected IInventoryServices m_inventoryServer;
44 protected AssetTransactionManager m_transactionsManager;
45 protected UserProfileCache m_userProfiles;
46 protected IUserServices m_userServer;
47 protected NetworkServersInfo m_networkServersInfo;
48
49 public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache)
50 {
51 m_networkServersInfo = serversInfo;
52 m_assetCache = assetCache;
53 m_userProfiles = new UserProfileCache(this);
54 m_transactionsManager = new AssetTransactionManager(this);
55 }
56
57 public IUserServices UserServer
58 { 42 {
59 get { return m_userServer; } 43 get { return m_userService; }
60 set { m_userServer = value; }
61 } 44 }
62 45
63 public IGridServices GridServer 46 protected IGridServices m_gridService;
47 public IGridServices GridService
64 { 48 {
65 get { return m_gridServer; } 49 get { return m_gridService; }
66 } 50 }
67 51
68 public IInventoryServices InventoryServer 52 protected IInventoryServices m_inventoryService;
53 public IInventoryServices InventoryService
69 { 54 {
70 get { return m_inventoryServer; } 55 get { return m_inventoryService; }
71 set { m_inventoryServer = value; }
72 } 56 }
73 57
58 protected IInterRegionCommunications m_interRegion;
74 public IInterRegionCommunications InterRegion 59 public IInterRegionCommunications InterRegion
75 { 60 {
76 get { return m_interRegion; } 61 get { return m_interRegion; }
77 set { m_interRegion = value; }
78 } 62 }
79 63
80 public UserProfileCache UserProfiles 64 protected UserProfileCache m_userProfileCache;
65 public UserProfileCache UserProfileCache
81 { 66 {
82 get { return m_userProfiles; } 67 get { return m_userProfileCache; }
83 set { m_userProfiles = value; }
84 } 68 }
85 69
70 protected AssetTransactionManager m_transactionsManager;
86 public AssetTransactionManager TransactionsManager 71 public AssetTransactionManager TransactionsManager
87 { 72 {
88 get { return m_transactionsManager; } 73 get { return m_transactionsManager; }
89 set { m_transactionsManager = value; }
90 } 74 }
91 75
76 protected AssetCache m_assetCache;
92 public AssetCache AssetCache 77 public AssetCache AssetCache
93 { 78 {
94 get { return m_assetCache; } 79 get { return m_assetCache; }
95 set { m_assetCache = value; }
96 } 80 }
97 81
82 protected NetworkServersInfo m_networkServersInfo;
98 public NetworkServersInfo NetworkServersInfo 83 public NetworkServersInfo NetworkServersInfo
99 { 84 {
100 get { return m_networkServersInfo; } 85 get { return m_networkServersInfo; }
101 set { m_networkServersInfo = value; }
102 } 86 }
103 87
88 public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache)
89 {
90 m_networkServersInfo = serversInfo;
91 m_assetCache = assetCache;
92 m_userProfileCache = new UserProfileCache(this);
93 m_transactionsManager = new AssetTransactionManager(this);
94 }
95
96
104 #region Packet Handlers 97 #region Packet Handlers
105 98
106 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) 99 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
107 { 100 {
108 if (uuid == m_userProfiles.libraryRoot.agentID) 101 if (uuid == m_userProfileCache.libraryRoot.agentID)
109 { 102 {
110 remote_client.SendNameReply(uuid, "Mr", "OpenSim"); 103 remote_client.SendNameReply(uuid, "Mr", "OpenSim");
111 } 104 }
112 else 105 else
113 { 106 {
114 UserProfileData profileData = m_userServer.GetUserProfile(uuid); 107 UserProfileData profileData = m_userService.GetUserProfile(uuid);
115 if (profileData != null) 108 if (profileData != null)
116 { 109 {
117 LLUUID profileId = profileData.UUID; 110 LLUUID profileId = profileData.UUID;