Merge branch 'dev_IM' into dev

dsg
Huaiyu (Kitty) Liu 2011-05-25 13:16:26 -07:00
commit 384e39f225
3 changed files with 15 additions and 2 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; GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync;

View File

@ -33,6 +33,8 @@ using OpenSim.Framework;
using OpenSim.Framework.Client; using OpenSim.Framework.Client;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
{ {
public class RegionSyncAvatar : IClientAPI, IClientCore public class RegionSyncAvatar : IClientAPI, IClientCore
@ -509,7 +511,12 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
public void SendInstantMessage(GridInstantMessage im) 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) public void SendGenericMessage(string method, List<string> message)

View File

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