diff options
author | SignpostMarv | 2012-10-23 15:42:16 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-26 02:08:00 +0100 |
commit | e977761071a2d614a9a621437fbf86479b414759 (patch) | |
tree | 3d9e6a65c9462ca8f6439184887a632dc041eb27 /OpenSim/Region/Framework | |
parent | Formatting and casing correction in WorldCommModule, trailing new line in OSS... (diff) | |
download | opensim-SC_OLD-e977761071a2d614a9a621437fbf86479b414759.zip opensim-SC_OLD-e977761071a2d614a9a621437fbf86479b414759.tar.gz opensim-SC_OLD-e977761071a2d614a9a621437fbf86479b414759.tar.bz2 opensim-SC_OLD-e977761071a2d614a9a621437fbf86479b414759.tar.xz |
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
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IWorldComm.cs | 25 |
1 files changed, 25 insertions, 0 deletions
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 | |||
45 | void Deactivate(); | 45 | void Deactivate(); |
46 | void Activate(); | 46 | void Activate(); |
47 | UUID GetID(); | 47 | UUID GetID(); |
48 | |||
49 | /// <summary> | ||
50 | /// Bitfield indicating which strings should be processed as regex. | ||
51 | /// 1 corresponds to IWorldCommListenerInfo::GetName() | ||
52 | /// 2 corresponds to IWorldCommListenerInfo::GetMessage() | ||
53 | /// </summary> | ||
54 | /// <returns></returns> | ||
55 | int GetRegexBitfield(); | ||
48 | } | 56 | } |
49 | 57 | ||
50 | public interface IWorldComm | 58 | public interface IWorldComm |
@@ -70,6 +78,23 @@ namespace OpenSim.Region.Framework.Interfaces | |||
70 | /// <returns>number of the scripts handle</returns> | 78 | /// <returns>number of the scripts handle</returns> |
71 | int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg); | 79 | int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg); |
72 | 80 | ||
81 | /// <summary> | ||
82 | /// Create a listen event callback with the specified filters. | ||
83 | /// The parameters localID,itemID are needed to uniquely identify | ||
84 | /// the script during 'peek' time. Parameter hostID is needed to | ||
85 | /// determine the position of the script. | ||
86 | /// </summary> | ||
87 | /// <param name="LocalID">localID of the script engine</param> | ||
88 | /// <param name="itemID">UUID of the script engine</param> | ||
89 | /// <param name="hostID">UUID of the SceneObjectPart</param> | ||
90 | /// <param name="channel">channel to listen on</param> | ||
91 | /// <param name="name">name to filter on</param> | ||
92 | /// <param name="id">key to filter on (user given, could be totally faked)</param> | ||
93 | /// <param name="msg">msg to filter on</param> | ||
94 | /// <param name="regexBitfield">Bitfield indicating which strings should be processed as regex.</param> | ||
95 | /// <returns>number of the scripts handle</returns> | ||
96 | int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg, int regexBitfield); | ||
97 | |||
73 | /// <summary> | 98 | /// <summary> |
74 | /// This method scans over the objects which registered an interest in listen callbacks. | 99 | /// This method scans over the objects which registered an interest in listen callbacks. |
75 | /// For everyone it finds, it checks if it fits the given filter. If it does, then | 100 | /// For everyone it finds, it checks if it fits the given filter. If it does, then |