aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2012-09-17 14:18:03 +0100
committerMelanie2012-09-17 14:18:03 +0100
commitd739246030eea2a12672a798fba1902928f0c905 (patch)
tree034265413db0661f842a7d9c279fd18ff1e9497a /OpenSim/Region/Framework
parentMerge branch 'master' into careminster (diff)
parentDocumentation of IScriptModuleComms.RegisterConstant and IScriptModuleComms.L... (diff)
downloadopensim-SC_OLD-d739246030eea2a12672a798fba1902928f0c905.zip
opensim-SC_OLD-d739246030eea2a12672a798fba1902928f0c905.tar.gz
opensim-SC_OLD-d739246030eea2a12672a798fba1902928f0c905.tar.bz2
opensim-SC_OLD-d739246030eea2a12672a798fba1902928f0c905.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs42
1 files changed, 41 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
index dae7c00..93930ce 100644
--- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
+++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
@@ -75,6 +75,14 @@ namespace OpenSim.Region.Framework.Interfaces
75 void RegisterScriptInvocation(Type target, string[] methods); 75 void RegisterScriptInvocation(Type target, string[] methods);
76 76
77 /// <summary> 77 /// <summary>
78 /// Automatically register script invocations by checking for methods
79 /// with <see cref="ScriptInvocationAttribute"/>. Should only check
80 /// public methods.
81 /// </summary>
82 /// <param name="target"></param>
83 void RegisterScriptInvocations(IRegionModuleBase target);
84
85 /// <summary>
78 /// Returns an array of all registered script calls 86 /// Returns an array of all registered script calls
79 /// </summary> 87 /// </summary>
80 /// <returns></returns> 88 /// <returns></returns>
@@ -96,11 +104,43 @@ namespace OpenSim.Region.Framework.Interfaces
96 /// <param name="key"></param> 104 /// <param name="key"></param>
97 void DispatchReply(UUID scriptId, int code, string text, string key); 105 void DispatchReply(UUID scriptId, int code, string text, string key);
98 106
99 /// For constants 107 /// <summary>
108 /// Operation to for a region module to register a constant to be used
109 /// by the script engine
110 /// </summary>
111 /// <param name="cname">
112 /// The name of the constant. LSL convention is for constant names to
113 /// be uppercase.
114 /// </param>
115 /// <param name="value">
116 /// The value of the constant. Should be of a type that can be
117 /// converted to one of <see cref="OpenSim.Region.ScriptEngine.Shared.LSL_Types"/>
118 /// </param>
100 void RegisterConstant(string cname, object value); 119 void RegisterConstant(string cname, object value);
120
121 /// <summary>
122 /// Automatically register all constants on a region module by
123 /// checking for fields with <see cref="ScriptConstantAttribute"/>.
124 /// </summary>
125 /// <param name="target"></param>
126 void RegisterConstants(IRegionModuleBase target);
127
128 /// <summary>
129 /// Operation to check for a registered constant
130 /// </summary>
131 /// <param name="cname">Name of constant</param>
132 /// <returns>Value of constant or null if none found.</returns>
101 object LookupModConstant(string cname); 133 object LookupModConstant(string cname);
102 134
103 // For use ONLY by the script API 135 // For use ONLY by the script API
104 void RaiseEvent(UUID script, string id, string module, string command, string key); 136 void RaiseEvent(UUID script, string id, string module, string command, string key);
105 } 137 }
138
139 [AttributeUsage(AttributeTargets.Method)]
140 public class ScriptInvocationAttribute : Attribute
141 { }
142
143 [AttributeUsage(AttributeTargets.Field)]
144 public class ScriptConstantAttribute : Attribute
145 { }
106} 146}