29 using System.Collections;
30 using System.Collections.Generic;
32 using System.Reflection;
33 using System.Threading;
38 using OpenMetaverse.StructuredData;
39 using OpenSim.Framework;
40 using OpenSim.Framework.Servers;
41 using OpenSim.Region.ClientStack.Linden;
42 using OpenSim.Region.Framework.Interfaces;
43 using OpenSim.Region.Framework.Scenes;
45 namespace OpenSim.Tests.Common
51 public string Name {
get; set; }
52 public object[] Args {
get; set; }
54 public Event(
string name,
object[] args)
61 public Dictionary<UUID, List<Event>> Events {
get; set; }
69 Events =
new Dictionary<UUID, List<Event>>();
77 public string Name {
get {
return "TestEventQueueGetModule"; } }
79 public Type ReplaceableInterface {
get {
return null; } }
81 private void AddEvent(UUID avatarID,
string name, params
object[] args)
83 Console.WriteLine(
"Adding event {0} for {1}", name, avatarID);
87 if (!Events.ContainsKey(avatarID))
89 avEvents =
new List<Event>();
90 Events[avatarID] = avEvents;
94 avEvents = Events[avatarID];
97 avEvents.Add(
new Event(name, args));
108 AddEvent(avatarID,
"Enqueue", o);
114 AddEvent(avatarID,
"DisableSimulator", handle);
117 public void EnableSimulator (ulong handle, IPEndPoint endPoint, UUID avatarID,
int regionSizeX,
int regionSizeY)
119 AddEvent(avatarID,
"EnableSimulator", handle);
123 ulong regionHandle,
int regionSizeX,
int regionSizeY)
125 AddEvent(avatarID,
"EstablishAgentCommunication", endPoint, capsPath);
129 uint locationID, uint flags,
string capsURL, UUID agentID,
int regionSizeX,
int regionSizeY)
131 AddEvent(agentID,
"TeleportFinishEvent", regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL);
134 public void CrossRegion (ulong handle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint,
135 string capsURL, UUID avatarID, UUID sessionID,
int regionSizeX,
int regionSizeY)
137 AddEvent(avatarID,
"CrossRegion", handle, pos, lookAt, newRegionExternalEndPoint, capsURL, sessionID);
141 UUID sessionID,
string sessionName, UUID fromAgent,
string message, UUID toAgent,
string fromName,
142 byte dialog, uint timeStamp,
bool offline,
int parentEstateID, Vector3 position, uint ttl,
143 UUID transactionID,
bool fromGroup, byte[] binaryBucket)
146 toAgent,
"ChatterboxInvitation", sessionID, sessionName, fromAgent, message, toAgent, fromName, dialog,
147 timeStamp, offline, parentEstateID, position, ttl, transactionID, fromGroup, binaryBucket);
152 AddEvent(toAgent,
"ChatterBoxSessionAgentListUpdates", sessionID, fromAgent, canVoiceChat, isModerator, textMute);
155 public void ParcelProperties (OpenMetaverse.Messages.Linden.ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID)
157 AddEvent(avatarID,
"ParcelProperties", parcelPropertiesMessage);
160 public void GroupMembership (OpenMetaverse.Packets.AgentGroupDataUpdatePacket groupUpdate, UUID avatarID)
162 AddEvent(avatarID,
"GroupMembership", groupUpdate);
167 Console.WriteLine(
"ONE");
168 throw new System.NotImplementedException ();
173 Console.WriteLine(
"TWO");
174 throw new System.NotImplementedException ();
177 public void partPhysicsProperties (uint localID, byte physhapetype,
float density,
float friction,
float bounce,
float gravmod, UUID avatarID)
179 AddEvent(avatarID,
"partPhysicsProperties", localID, physhapetype, density, friction, bounce, gravmod);
void AddRegion(Scene scene)
This is called whenever a Scene is added. For shared modules, this can happen several times...
void Initialise(IConfigSource source)
This is called to initialize the region module. For shared modules, this is called exactly once...
void DisableSimulator(ulong handle, UUID avatarID)
void RemoveRegion(Scene scene)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
void RegionLoaded(Scene scene)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...
OSD BuildEvent(string eventName, OSD eventBody)
bool Enqueue(OSD o, UUID avatarID)
void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat, bool isModerator, bool textMute)
Event(string name, object[] args)
void GroupMembership(OpenMetaverse.Packets.AgentGroupDataUpdatePacket groupUpdate, UUID avatarID)
void ParcelProperties(OpenMetaverse.Messages.Linden.ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID)
void TeleportFinishEvent(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL, UUID agentID, int regionSizeX, int regionSizeY)
void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY)
void partPhysicsProperties(uint localID, byte physhapetype, float density, float friction, float bounce, float gravmod, UUID avatarID)
OpenMetaverse.StructuredData.OSD OSD
OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono)
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
void ChatterboxInvitation(UUID sessionID, string sessionName, UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, bool offline, int parentEstateID, Vector3 position, uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket)
void CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL, UUID avatarID, UUID sessionID, int regionSizeX, int regionSizeY)
void EstablishAgentCommunication(UUID avatarID, IPEndPoint endPoint, string capsPath, ulong regionHandle, int regionSizeX, int regionSizeY)