Added implementation of SendInstantMessage() in RegionSyncAvatar, and

SendGridInstantMessageViaXMLRPC to IMessageTransferModule to enable
proper forwarding of instance messages.
dsg
Huaiyu (Kitty) Liu 2011-05-25 13:11:55 -07:00
parent 53fa87ad76
commit a664835b03
3 changed files with 20 additions and 7 deletions

View File

@ -446,7 +446,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
}
protected virtual void SendGridInstantMessageViaXMLRPC(GridInstantMessage im, MessageResultNotification result)
//protected virtual void SendGridInstantMessageViaXMLRPC(GridInstantMessage im, MessageResultNotification result)
//DSG: make this function public, so that we can call from outside to
//use the Grid Service to send the instant message.
public virtual void SendGridInstantMessageViaXMLRPC(GridInstantMessage im, MessageResultNotification result)
{
GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync;

View File

@ -33,6 +33,8 @@ using OpenSim.Framework;
using OpenSim.Framework.Client;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
{
public class RegionSyncAvatar : IClientAPI, IClientCore
@ -509,7 +511,12 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
public void SendInstantMessage(GridInstantMessage im)
{
IMessageTransferModule m_msgTransferModule = m_scene.RequestModuleInterface<IMessageTransferModule>();
if (m_msgTransferModule != null)
{
m_msgTransferModule.SendGridInstantMessageViaXMLRPC(im, delegate(bool success) { });
}
}
public void SendGenericMessage(string method, List<string> message)

View File

@ -37,5 +37,8 @@ namespace OpenSim.Region.Framework.Interfaces
event UndeliveredMessage OnUndeliveredMessage;
void SendInstantMessage(GridInstantMessage im, MessageResultNotification result);
//DSG: add this to the interface to enable outsiders to call it
void SendGridInstantMessageViaXMLRPC(GridInstantMessage im, MessageResultNotification result);
}
}