* reorder and rename

afrisby
lbsa71 2007-09-24 05:20:23 +00:00
parent 40468f18a4
commit 6c41efa4e3
2 changed files with 22 additions and 24 deletions

View File

@ -25,96 +25,94 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
using System.Text;
using libsecondlife; using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Caches;
using OpenSim.Framework.Data; using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces; using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework.Communications.Caches; using OpenSim.Framework.Types;
namespace OpenSim.Framework.Communications namespace OpenSim.Framework.Communications
{ {
public class CommunicationsManager public class CommunicationsManager
{ {
private AssetCache m_assetCache;
private IGridServices m_gridServer;
private IInterRegionCommunications m_interRegion;
private IInventoryServices m_inventoryServer;
private AssetTransactionManager m_transactionsManager;
private UserProfileCache m_userProfiles;
private IUserServices m_userServer;
private NetworkServersInfo m_networkServersInfo;
public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache) public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache)
{ {
this.serversInfo = serversInfo; this.m_networkServersInfo = serversInfo;
this.m_assetCache = assetCache; m_assetCache = assetCache;
m_userProfiles = new UserProfileCache(this); m_userProfiles = new UserProfileCache(this);
m_transactionsManager = new AssetTransactionManager(this); m_transactionsManager = new AssetTransactionManager(this);
} }
private IUserServices m_userServer;
public IUserServices UserServer public IUserServices UserServer
{ {
get { return m_userServer; } get { return m_userServer; }
set { m_userServer = value; } set { m_userServer = value; }
} }
private IGridServices m_gridServer;
public IGridServices GridServer public IGridServices GridServer
{ {
get { return m_gridServer; } get { return m_gridServer; }
set { m_gridServer = value; } set { m_gridServer = value; }
} }
private IInventoryServices m_inventoryServer;
public IInventoryServices InventoryServer public IInventoryServices InventoryServer
{ {
get { return m_inventoryServer; } get { return m_inventoryServer; }
set { m_inventoryServer = value; } set { m_inventoryServer = value; }
} }
private IInterRegionCommunications m_interRegion;
public IInterRegionCommunications InterRegion public IInterRegionCommunications InterRegion
{ {
get { return m_interRegion; } get { return m_interRegion; }
set { m_interRegion = value; } set { m_interRegion = value; }
} }
private UserProfileCache m_userProfiles;
public UserProfileCache UserProfiles public UserProfileCache UserProfiles
{ {
get { return m_userProfiles; } get { return m_userProfiles; }
set { m_userProfiles = value; } set { m_userProfiles = value; }
} }
private AssetTransactionManager m_transactionsManager;
public AssetTransactionManager TransactionsManager public AssetTransactionManager TransactionsManager
{ {
get { return m_transactionsManager; } get { return m_transactionsManager; }
set { m_transactionsManager = value; } set { m_transactionsManager = value; }
} }
private AssetCache m_assetCache;
public AssetCache AssetCache public AssetCache AssetCache
{ {
get { return m_assetCache; } get { return m_assetCache; }
set { m_assetCache = value; } set { m_assetCache = value; }
} }
private NetworkServersInfo serversInfo; public NetworkServersInfo NetworkServersInfo
public NetworkServersInfo ServersInfo
{ {
get { return serversInfo; } get { return m_networkServersInfo; }
set { serversInfo = value; } set { m_networkServersInfo = value; }
} }
#region Packet Handlers #region Packet Handlers
public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
{ {
if (uuid == m_userProfiles.libraryRoot.agentID) if (uuid == m_userProfiles.libraryRoot.agentID)
{ {
remote_client.SendNameReply(uuid , "Mr" , "OpenSim"); remote_client.SendNameReply(uuid, "Mr", "OpenSim");
} }
else else
{ {
UserProfileData profileData = this.m_userServer.GetUserProfile(uuid); UserProfileData profileData = m_userServer.GetUserProfile(uuid);
if (profileData != null) if (profileData != null)
{ {
LLUUID profileId = profileData.UUID; LLUUID profileId = profileData.UUID;

View File

@ -54,7 +54,7 @@ namespace OpenSim.Region.Communications.OGS1
IList parameters = new ArrayList(); IList parameters = new ArrayList();
parameters.Add(param); parameters.Add(param);
XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters); XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters);
XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000); XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000);
Hashtable respData = (Hashtable)resp.Value; Hashtable respData = (Hashtable)resp.Value;
return ConvertXMLRPCDataToUserProfile(respData); return ConvertXMLRPCDataToUserProfile(respData);
@ -74,7 +74,7 @@ namespace OpenSim.Region.Communications.OGS1
IList parameters = new ArrayList(); IList parameters = new ArrayList();
parameters.Add(param); parameters.Add(param);
XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters); XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters);
XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000); XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000);
Hashtable respData = (Hashtable)resp.Value; Hashtable respData = (Hashtable)resp.Value;
return ConvertXMLRPCDataToUserProfile(respData); return ConvertXMLRPCDataToUserProfile(respData);