aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs71
1 files changed, 1 insertions, 70 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
index 70ff954..a76ffde 100644
--- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
+++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
@@ -47,46 +47,9 @@ namespace OpenSim.Region.Framework.Interfaces
47 /// </summary> 47 /// </summary>
48 event ScriptCommand OnScriptCommand; 48 event ScriptCommand OnScriptCommand;
49 49
50 /// <summary>
51 /// Register an instance method as a script call by method name
52 /// </summary>
53 /// <param name="target"></param>
54 /// <param name="method"></param>
55 void RegisterScriptInvocation(object target, string method); 50 void RegisterScriptInvocation(object target, string method);
56
57 /// <summary>
58 /// Register a static or instance method as a script call by method info
59 /// </summary>
60 /// <param name="target">If target is a Type object, will assume method is static.</param>
61 /// <param name="method"></param>
62 void RegisterScriptInvocation(object target, MethodInfo method); 51 void RegisterScriptInvocation(object target, MethodInfo method);
63
64 /// <summary>
65 /// Register one or more instance methods as script calls by method name
66 /// </summary>
67 /// <param name="target"></param>
68 /// <param name="methods"></param>
69 void RegisterScriptInvocation(object target, string[] methods); 52 void RegisterScriptInvocation(object target, string[] methods);
70
71 /// <summary>
72 /// Register one or more static methods as script calls by method name
73 /// </summary>
74 /// <param name="target"></param>
75 /// <param name="methods"></param>
76 void RegisterScriptInvocation(Type target, string[] methods);
77
78 /// <summary>
79 /// Automatically register script invocations by checking for methods
80 /// with <see cref="ScriptInvocationAttribute"/>. Should only check
81 /// public methods.
82 /// </summary>
83 /// <param name="target"></param>
84 void RegisterScriptInvocations(IRegionModuleBase target);
85
86 /// <summary>
87 /// Returns an array of all registered script calls
88 /// </summary>
89 /// <returns></returns>
90 Delegate[] GetScriptInvocationList(); 53 Delegate[] GetScriptInvocationList();
91 54
92 Delegate LookupScriptInvocation(string fname); 55 Delegate LookupScriptInvocation(string fname);
@@ -105,44 +68,12 @@ namespace OpenSim.Region.Framework.Interfaces
105 /// <param name="key"></param> 68 /// <param name="key"></param>
106 void DispatchReply(UUID scriptId, int code, string text, string key); 69 void DispatchReply(UUID scriptId, int code, string text, string key);
107 70
108 /// <summary> 71 /// For constants
109 /// Operation to for a region module to register a constant to be used
110 /// by the script engine
111 /// </summary>
112 /// <param name="cname">
113 /// The name of the constant. LSL convention is for constant names to
114 /// be uppercase.
115 /// </param>
116 /// <param name="value">
117 /// The value of the constant. Should be of a type that can be
118 /// converted to one of <see cref="OpenSim.Region.ScriptEngine.Shared.LSL_Types"/>
119 /// </param>
120 void RegisterConstant(string cname, object value); 72 void RegisterConstant(string cname, object value);
121
122 /// <summary>
123 /// Automatically register all constants on a region module by
124 /// checking for fields with <see cref="ScriptConstantAttribute"/>.
125 /// </summary>
126 /// <param name="target"></param>
127 void RegisterConstants(IRegionModuleBase target);
128
129 /// <summary>
130 /// Operation to check for a registered constant
131 /// </summary>
132 /// <param name="cname">Name of constant</param>
133 /// <returns>Value of constant or null if none found.</returns>
134 object LookupModConstant(string cname); 73 object LookupModConstant(string cname);
135 Dictionary<string, object> GetConstants(); 74 Dictionary<string, object> GetConstants();
136 75
137 // For use ONLY by the script API 76 // For use ONLY by the script API
138 void RaiseEvent(UUID script, string id, string module, string command, string key); 77 void RaiseEvent(UUID script, string id, string module, string command, string key);
139 } 78 }
140
141 [AttributeUsage(AttributeTargets.Method)]
142 public class ScriptInvocationAttribute : Attribute
143 { }
144
145 [AttributeUsage(AttributeTargets.Field)]
146 public class ScriptConstantAttribute : Attribute
147 { }
148} 79}