* reorder and rename
parent
40468f18a4
commit
6c41efa4e3
|
@ -25,96 +25,94 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
using System.Text;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Framework.Communications.Caches;
|
||||
using OpenSim.Framework.Data;
|
||||
using OpenSim.Framework.Interfaces;
|
||||
using OpenSim.Framework.Types;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Communications.Caches;
|
||||
|
||||
using OpenSim.Framework.Types;
|
||||
|
||||
namespace OpenSim.Framework.Communications
|
||||
{
|
||||
|
||||
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)
|
||||
{
|
||||
this.serversInfo = serversInfo;
|
||||
this.m_assetCache = assetCache;
|
||||
this.m_networkServersInfo = serversInfo;
|
||||
m_assetCache = assetCache;
|
||||
m_userProfiles = new UserProfileCache(this);
|
||||
m_transactionsManager = new AssetTransactionManager(this);
|
||||
}
|
||||
|
||||
private IUserServices m_userServer;
|
||||
public IUserServices UserServer
|
||||
{
|
||||
get { return m_userServer; }
|
||||
set { m_userServer = value; }
|
||||
}
|
||||
|
||||
private IGridServices m_gridServer;
|
||||
public IGridServices GridServer
|
||||
{
|
||||
get { return m_gridServer; }
|
||||
set { m_gridServer = value; }
|
||||
}
|
||||
|
||||
private IInventoryServices m_inventoryServer;
|
||||
public IInventoryServices InventoryServer
|
||||
{
|
||||
get { return m_inventoryServer; }
|
||||
set { m_inventoryServer = value; }
|
||||
}
|
||||
|
||||
private IInterRegionCommunications m_interRegion;
|
||||
public IInterRegionCommunications InterRegion
|
||||
{
|
||||
get { return m_interRegion; }
|
||||
set { m_interRegion = value; }
|
||||
}
|
||||
|
||||
private UserProfileCache m_userProfiles;
|
||||
public UserProfileCache UserProfiles
|
||||
{
|
||||
get { return m_userProfiles; }
|
||||
set { m_userProfiles = value; }
|
||||
}
|
||||
|
||||
private AssetTransactionManager m_transactionsManager;
|
||||
public AssetTransactionManager TransactionsManager
|
||||
{
|
||||
get { return m_transactionsManager; }
|
||||
set { m_transactionsManager = value; }
|
||||
}
|
||||
|
||||
private AssetCache m_assetCache;
|
||||
public AssetCache AssetCache
|
||||
{
|
||||
get { return m_assetCache; }
|
||||
set { m_assetCache = value; }
|
||||
}
|
||||
|
||||
private NetworkServersInfo serversInfo;
|
||||
public NetworkServersInfo ServersInfo
|
||||
public NetworkServersInfo NetworkServersInfo
|
||||
{
|
||||
get { return serversInfo; }
|
||||
set { serversInfo = value; }
|
||||
get { return m_networkServersInfo; }
|
||||
set { m_networkServersInfo = value; }
|
||||
}
|
||||
|
||||
#region Packet Handlers
|
||||
|
||||
public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
|
||||
{
|
||||
if (uuid == m_userProfiles.libraryRoot.agentID)
|
||||
{
|
||||
remote_client.SendNameReply(uuid , "Mr" , "OpenSim");
|
||||
remote_client.SendNameReply(uuid, "Mr", "OpenSim");
|
||||
}
|
||||
else
|
||||
{
|
||||
UserProfileData profileData = this.m_userServer.GetUserProfile(uuid);
|
||||
UserProfileData profileData = m_userServer.GetUserProfile(uuid);
|
||||
if (profileData != null)
|
||||
{
|
||||
LLUUID profileId = profileData.UUID;
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
IList parameters = new ArrayList();
|
||||
parameters.Add(param);
|
||||
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;
|
||||
|
||||
return ConvertXMLRPCDataToUserProfile(respData);
|
||||
|
@ -74,7 +74,7 @@ namespace OpenSim.Region.Communications.OGS1
|
|||
IList parameters = new ArrayList();
|
||||
parameters.Add(param);
|
||||
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;
|
||||
|
||||
return ConvertXMLRPCDataToUserProfile(respData);
|
||||
|
|
Loading…
Reference in New Issue