aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/CommunicationsManager.cs
diff options
context:
space:
mode:
authorlbsa712007-09-24 05:15:13 +0000
committerlbsa712007-09-24 05:15:13 +0000
commit40468f18a493d6bad5b512b1cb13c1091ab7f17f (patch)
treeccc6f155d0414c1e8c6f58cbb1f2a8fe7dd372c2 /OpenSim/Framework/Communications/CommunicationsManager.cs
parent* Added TryGetAvatarByName (diff)
downloadopensim-SC_OLD-40468f18a493d6bad5b512b1cb13c1091ab7f17f.zip
opensim-SC_OLD-40468f18a493d6bad5b512b1cb13c1091ab7f17f.tar.gz
opensim-SC_OLD-40468f18a493d6bad5b512b1cb13c1091ab7f17f.tar.bz2
opensim-SC_OLD-40468f18a493d6bad5b512b1cb13c1091ab7f17f.tar.xz
* Encapsulated all CommunicationsManager services
Diffstat (limited to 'OpenSim/Framework/Communications/CommunicationsManager.cs')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs78
1 files changed, 63 insertions, 15 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 6d73af8..d6a577f 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -28,6 +28,7 @@
28using System.Text; 28using System.Text;
29using libsecondlife; 29using libsecondlife;
30using libsecondlife.Packets; 30using libsecondlife.Packets;
31using OpenSim.Framework.Communications.Cache;
31using OpenSim.Framework.Data; 32using OpenSim.Framework.Data;
32using OpenSim.Framework.Interfaces; 33using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Types; 34using OpenSim.Framework.Types;
@@ -40,33 +41,80 @@ namespace OpenSim.Framework.Communications
40 41
41 public class CommunicationsManager 42 public class CommunicationsManager
42 { 43 {
43 public IUserServices UserServer;
44 public IGridServices GridServer;
45 public IInventoryServices InventoryServer;
46 public IInterRegionCommunications InterRegion;
47 public UserProfileCache UserProfiles;
48 public AssetTransactionManager TransactionsManager;
49 public AssetCache AssetCache;
50
51 public NetworkServersInfo ServersInfo;
52 public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache) 44 public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache)
53 { 45 {
54 ServersInfo = serversInfo; 46 this.serversInfo = serversInfo;
55 this.AssetCache = assetCache; 47 this.m_assetCache = assetCache;
56 UserProfiles = new UserProfileCache(this); 48 m_userProfiles = new UserProfileCache(this);
57 TransactionsManager = new AssetTransactionManager(this); 49 m_transactionsManager = new AssetTransactionManager(this);
50 }
51
52 private IUserServices m_userServer;
53 public IUserServices UserServer
54 {
55 get { return m_userServer; }
56 set { m_userServer = value; }
57 }
58
59 private IGridServices m_gridServer;
60 public IGridServices GridServer
61 {
62 get { return m_gridServer; }
63 set { m_gridServer = value; }
64 }
65
66 private IInventoryServices m_inventoryServer;
67 public IInventoryServices InventoryServer
68 {
69 get { return m_inventoryServer; }
70 set { m_inventoryServer = value; }
71 }
72
73 private IInterRegionCommunications m_interRegion;
74 public IInterRegionCommunications InterRegion
75 {
76 get { return m_interRegion; }
77 set { m_interRegion = value; }
78 }
79
80 private UserProfileCache m_userProfiles;
81 public UserProfileCache UserProfiles
82 {
83 get { return m_userProfiles; }
84 set { m_userProfiles = value; }
85 }
86
87 private AssetTransactionManager m_transactionsManager;
88 public AssetTransactionManager TransactionsManager
89 {
90 get { return m_transactionsManager; }
91 set { m_transactionsManager = value; }
92 }
93
94 private AssetCache m_assetCache;
95 public AssetCache AssetCache
96 {
97 get { return m_assetCache; }
98 set { m_assetCache = value; }
99 }
100
101 private NetworkServersInfo serversInfo;
102 public NetworkServersInfo ServersInfo
103 {
104 get { return serversInfo; }
105 set { serversInfo = value; }
58 } 106 }
59 107
60 #region Packet Handlers 108 #region Packet Handlers
61 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) 109 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
62 { 110 {
63 if (uuid == UserProfiles.libraryRoot.agentID) 111 if (uuid == m_userProfiles.libraryRoot.agentID)
64 { 112 {
65 remote_client.SendNameReply(uuid , "Mr" , "OpenSim"); 113 remote_client.SendNameReply(uuid , "Mr" , "OpenSim");
66 } 114 }
67 else 115 else
68 { 116 {
69 UserProfileData profileData = this.UserServer.GetUserProfile(uuid); 117 UserProfileData profileData = this.m_userServer.GetUserProfile(uuid);
70 if (profileData != null) 118 if (profileData != null)
71 { 119 {
72 LLUUID profileId = profileData.UUID; 120 LLUUID profileId = profileData.UUID;