From e977761071a2d614a9a621437fbf86479b414759 Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Tue, 23 Oct 2012 15:42:16 +0100
Subject: adding ability for listeners to be filtered by regular expressions
and a general-purpose function to see if a given string matches a given regex
---
OpenSim/Region/Framework/Interfaces/IWorldComm.cs | 25 +++++++++++++++++++++++
1 file changed, 25 insertions(+)
(limited to 'OpenSim/Region/Framework/Interfaces')
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
index 8d88065..66b3f3a 100644
--- a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
+++ b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs
@@ -45,6 +45,14 @@ namespace OpenSim.Region.Framework.Interfaces
void Deactivate();
void Activate();
UUID GetID();
+
+ ///
+ /// Bitfield indicating which strings should be processed as regex.
+ /// 1 corresponds to IWorldCommListenerInfo::GetName()
+ /// 2 corresponds to IWorldCommListenerInfo::GetMessage()
+ ///
+ ///
+ int GetRegexBitfield();
}
public interface IWorldComm
@@ -70,6 +78,23 @@ namespace OpenSim.Region.Framework.Interfaces
/// number of the scripts handle
int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg);
+ ///
+ /// Create a listen event callback with the specified filters.
+ /// The parameters localID,itemID are needed to uniquely identify
+ /// the script during 'peek' time. Parameter hostID is needed to
+ /// determine the position of the script.
+ ///
+ /// localID of the script engine
+ /// UUID of the script engine
+ /// UUID of the SceneObjectPart
+ /// channel to listen on
+ /// name to filter on
+ /// key to filter on (user given, could be totally faked)
+ /// msg to filter on
+ /// Bitfield indicating which strings should be processed as regex.
+ /// number of the scripts handle
+ int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg, int regexBitfield);
+
///
/// This method scans over the objects which registered an interest in listen callbacks.
/// For everyone it finds, it checks if it fits the given filter. If it does, then
--
cgit v1.1