try simplify lsl listen code a bit

This commit is contained in:
UbitUmarov
2022-06-18 22:40:01 +01:00
parent ade2ceb098
commit c972c23d2e
8 changed files with 223 additions and 233 deletions

View File

@@ -33,18 +33,14 @@ namespace OpenSim.Region.Framework.Interfaces
{
public interface IWorldCommListenerInfo
{
Object[] GetSerializationData();
UUID GetItemID();
UUID GetHostID();
int GetChannel();
uint GetLocalID();
int GetHandle();
string GetMessage();
string GetName();
bool IsActive();
void Deactivate();
void Activate();
UUID GetID();
bool IsActive { get; }
int Handle { get; }
UUID ItemID { get; }
UUID HostID { get; }
int Channel { get; }
string Message { get; }
string Name { get; }
UUID ID { get; }
/// <summary>
/// Bitfield indicating which strings should be processed as regex.
@@ -52,6 +48,10 @@ namespace OpenSim.Region.Framework.Interfaces
/// 2 corresponds to IWorldCommListenerInfo::GetMessage()
/// </summary>
int RegexBitfield { get; }
Object[] GetSerializationData();
void Deactivate();
void Activate();
}
public interface IWorldComm
@@ -67,7 +67,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// the script during 'peek' time. Parameter hostID is needed to
/// determine the position of the script.
/// </summary>
/// <param name="LocalID">localID of the script engine</param>
/// <param name="itemID">UUID of the script engine</param>
/// <param name="hostID">UUID of the SceneObjectPart</param>
/// <param name="channel">channel to listen on</param>
@@ -75,7 +74,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="id">key to filter on (user given, could be totally faked)</param>
/// <param name="msg">msg to filter on</param>
/// <returns>number of the scripts handle</returns>
int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg);
int Listen(UUID itemID, UUID hostID, int channel, string name, UUID id, string msg);
/// <summary>
/// Create a listen event callback with the specified filters.
@@ -83,7 +82,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// the script during 'peek' time. Parameter hostID is needed to
/// determine the position of the script.
/// </summary>
/// <param name="LocalID">localID of the script engine</param>
/// <param name="itemID">UUID of the script engine</param>
/// <param name="hostID">UUID of the SceneObjectPart</param>
/// <param name="channel">channel to listen on</param>
@@ -92,7 +90,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="msg">msg to filter on</param>
/// <param name="regexBitfield">Bitfield indicating which strings should be processed as regex.</param>
/// <returns>number of the scripts handle</returns>
int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg, int regexBitfield);
int Listen(UUID itemID, UUID hostID, int channel, string name, UUID id, string msg, int regexBitfield);
/// <summary>
/// This method scans over the objects which registered an interest in listen callbacks.
@@ -146,7 +144,6 @@ namespace OpenSim.Region.Framework.Interfaces
void ListenRemove(UUID itemID, int handle);
void DeleteListener(UUID itemID);
Object[] GetSerializationData(UUID itemID);
void CreateFromData(uint localID, UUID itemID, UUID hostID,
Object[] data);
void CreateFromData(UUID itemID, UUID hostID, Object[] data);
}
}