From f9721573d956092c2d993ee41654f3f5e160401c Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Fri, 14 Sep 2012 13:17:07 +0100 Subject: Implementing ability to register script constants and invocations on a region module automatically --- .../Framework/Interfaces/IScriptModuleComms.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'OpenSim/Region/Framework/Interfaces') diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs index dae7c00..277c9ed 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs @@ -75,6 +75,14 @@ namespace OpenSim.Region.Framework.Interfaces void RegisterScriptInvocation(Type target, string[] methods); /// + /// Automatically register script invocations by checking for methods + /// with . Should only check + /// public methods. + /// + /// + void RegisterScriptInvocations(IRegionModuleBase target); + + /// /// Returns an array of all registered script calls /// /// @@ -98,9 +106,24 @@ namespace OpenSim.Region.Framework.Interfaces /// For constants void RegisterConstant(string cname, object value); + + /// + /// Automatically register all constants on a region module by + /// checking for fields with . + /// + /// + void RegisterConstants(IRegionModuleBase target); object LookupModConstant(string cname); // For use ONLY by the script API void RaiseEvent(UUID script, string id, string module, string command, string key); } + + [AttributeUsage(AttributeTargets.Method)] + public class ScriptInvocationAttribute : Attribute + { } + + [AttributeUsage(AttributeTargets.Field)] + public class ScriptConstantAttribute : Attribute + { } } -- cgit v1.1