diff options
Diffstat (limited to 'OpenSim/Region/Framework/Interfaces')
5 files changed, 143 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs index 8954513..6df5cc2 100644 --- a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs +++ b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs | |||
@@ -25,6 +25,8 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
29 | using System.Drawing; | ||
28 | using System.IO; | 30 | using System.IO; |
29 | using OpenMetaverse; | 31 | using OpenMetaverse; |
30 | 32 | ||
@@ -33,7 +35,14 @@ namespace OpenSim.Region.Framework.Interfaces | |||
33 | public interface IDynamicTextureManager | 35 | public interface IDynamicTextureManager |
34 | { | 36 | { |
35 | void RegisterRender(string handleType, IDynamicTextureRender render); | 37 | void RegisterRender(string handleType, IDynamicTextureRender render); |
36 | void ReturnData(UUID id, byte[] data); | 38 | |
39 | /// <summary> | ||
40 | /// Used by IDynamicTextureRender implementations to return renders | ||
41 | /// </summary> | ||
42 | /// <param name='id'></param> | ||
43 | /// <param name='data'></param> | ||
44 | /// <param name='isReuseable'></param> | ||
45 | void ReturnData(UUID id, IDynamicTexture texture); | ||
37 | 46 | ||
38 | UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams, | 47 | UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams, |
39 | int updateTimer); | 48 | int updateTimer); |
@@ -113,11 +122,65 @@ namespace OpenSim.Region.Framework.Interfaces | |||
113 | string GetName(); | 122 | string GetName(); |
114 | string GetContentType(); | 123 | string GetContentType(); |
115 | bool SupportsAsynchronous(); | 124 | bool SupportsAsynchronous(); |
116 | byte[] ConvertUrl(string url, string extraParams); | 125 | |
117 | byte[] ConvertStream(Stream data, string extraParams); | 126 | // /// <summary> |
127 | // /// Return true if converting the input body and extra params data will always result in the same byte[] array | ||
128 | // /// </summary> | ||
129 | // /// <remarks> | ||
130 | // /// This method allows the caller to use a previously generated asset if it has one. | ||
131 | // /// </remarks> | ||
132 | // /// <returns></returns> | ||
133 | // /// <param name='bodyData'></param> | ||
134 | // /// <param name='extraParams'></param> | ||
135 | // bool AlwaysIdenticalConversion(string bodyData, string extraParams); | ||
136 | |||
137 | IDynamicTexture ConvertUrl(string url, string extraParams); | ||
138 | IDynamicTexture ConvertData(string bodyData, string extraParams); | ||
139 | |||
118 | bool AsyncConvertUrl(UUID id, string url, string extraParams); | 140 | bool AsyncConvertUrl(UUID id, string url, string extraParams); |
119 | bool AsyncConvertData(UUID id, string bodyData, string extraParams); | 141 | bool AsyncConvertData(UUID id, string bodyData, string extraParams); |
142 | |||
120 | void GetDrawStringSize(string text, string fontName, int fontSize, | 143 | void GetDrawStringSize(string text, string fontName, int fontSize, |
121 | out double xSize, out double ySize); | 144 | out double xSize, out double ySize); |
122 | } | 145 | } |
146 | |||
147 | public interface IDynamicTexture | ||
148 | { | ||
149 | /// <summary> | ||
150 | /// Input commands used to generate this data. | ||
151 | /// </summary> | ||
152 | /// <remarks> | ||
153 | /// Null if input commands were not used. | ||
154 | /// </remarks> | ||
155 | string InputCommands { get; } | ||
156 | |||
157 | /// <summary> | ||
158 | /// Uri used to generate this data. | ||
159 | /// </summary> | ||
160 | /// <remarks> | ||
161 | /// Null if a uri was not used. | ||
162 | /// </remarks> | ||
163 | Uri InputUri { get; } | ||
164 | |||
165 | /// <summary> | ||
166 | /// Extra input params used to generate this data. | ||
167 | /// </summary> | ||
168 | string InputParams { get; } | ||
169 | |||
170 | /// <summary> | ||
171 | /// Texture data. | ||
172 | /// </summary> | ||
173 | byte[] Data { get; } | ||
174 | |||
175 | /// <summary> | ||
176 | /// Size of texture. | ||
177 | /// </summary> | ||
178 | Size Size { get; } | ||
179 | |||
180 | /// <summary> | ||
181 | /// Signal whether the texture is reuseable (i.e. whether the same input data will always generate the same | ||
182 | /// texture). | ||
183 | /// </summary> | ||
184 | bool IsReuseable { get; } | ||
185 | } | ||
123 | } | 186 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs index ca2ad94..292efa4 100644 --- a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs | |||
@@ -46,6 +46,10 @@ namespace OpenSim.Region.Framework.Interfaces | |||
46 | /// </summary> | 46 | /// </summary> |
47 | void sendRegionHandshakeToAll(); | 47 | void sendRegionHandshakeToAll(); |
48 | void TriggerEstateInfoChange(); | 48 | void TriggerEstateInfoChange(); |
49 | |||
50 | /// <summary> | ||
51 | /// Fires the OnRegionInfoChange event. | ||
52 | /// </summary> | ||
49 | void TriggerRegionInfoChange(); | 53 | void TriggerRegionInfoChange(); |
50 | 54 | ||
51 | void setEstateTerrainBaseTexture(int level, UUID texture); | 55 | void setEstateTerrainBaseTexture(int level, UUID texture); |
diff --git a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs index baac6e8..da39e95 100644 --- a/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IJsonStoreModule.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
35 | 35 | ||
36 | public interface IJsonStoreModule | 36 | public interface IJsonStoreModule |
37 | { | 37 | { |
38 | bool CreateStore(string value, out UUID result); | 38 | bool CreateStore(string value, ref UUID result); |
39 | bool DestroyStore(UUID storeID); | 39 | bool DestroyStore(UUID storeID); |
40 | bool TestPath(UUID storeID, string path, bool useJson); | 40 | bool TestPath(UUID storeID, string path, bool useJson); |
41 | bool SetValue(UUID storeID, string path, string value, bool useJson); | 41 | bool SetValue(UUID storeID, string path, string value, bool useJson); |
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs index ed71a95..93930ce 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs | |||
@@ -46,9 +46,46 @@ namespace OpenSim.Region.Framework.Interfaces | |||
46 | /// </summary> | 46 | /// </summary> |
47 | event ScriptCommand OnScriptCommand; | 47 | event ScriptCommand OnScriptCommand; |
48 | 48 | ||
49 | /// <summary> | ||
50 | /// Register an instance method as a script call by method name | ||
51 | /// </summary> | ||
52 | /// <param name="target"></param> | ||
53 | /// <param name="method"></param> | ||
49 | void RegisterScriptInvocation(object target, string method); | 54 | void RegisterScriptInvocation(object target, string method); |
55 | |||
56 | /// <summary> | ||
57 | /// Register a static or instance method as a script call by method info | ||
58 | /// </summary> | ||
59 | /// <param name="target">If target is a Type object, will assume method is static.</param> | ||
60 | /// <param name="method"></param> | ||
50 | void RegisterScriptInvocation(object target, MethodInfo method); | 61 | void RegisterScriptInvocation(object target, MethodInfo method); |
62 | |||
63 | /// <summary> | ||
64 | /// Register one or more instance methods as script calls by method name | ||
65 | /// </summary> | ||
66 | /// <param name="target"></param> | ||
67 | /// <param name="methods"></param> | ||
51 | void RegisterScriptInvocation(object target, string[] methods); | 68 | void RegisterScriptInvocation(object target, string[] methods); |
69 | |||
70 | /// <summary> | ||
71 | /// Register one or more static methods as script calls by method name | ||
72 | /// </summary> | ||
73 | /// <param name="target"></param> | ||
74 | /// <param name="methods"></param> | ||
75 | void RegisterScriptInvocation(Type target, string[] methods); | ||
76 | |||
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> | ||
86 | /// Returns an array of all registered script calls | ||
87 | /// </summary> | ||
88 | /// <returns></returns> | ||
52 | Delegate[] GetScriptInvocationList(); | 89 | Delegate[] GetScriptInvocationList(); |
53 | 90 | ||
54 | Delegate LookupScriptInvocation(string fname); | 91 | Delegate LookupScriptInvocation(string fname); |
@@ -67,11 +104,43 @@ namespace OpenSim.Region.Framework.Interfaces | |||
67 | /// <param name="key"></param> | 104 | /// <param name="key"></param> |
68 | void DispatchReply(UUID scriptId, int code, string text, string key); | 105 | void DispatchReply(UUID scriptId, int code, string text, string key); |
69 | 106 | ||
70 | /// 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> | ||
71 | 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> | ||
72 | object LookupModConstant(string cname); | 133 | object LookupModConstant(string cname); |
73 | 134 | ||
74 | // For use ONLY by the script API | 135 | // For use ONLY by the script API |
75 | 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); |
76 | } | 137 | } |
138 | |||
139 | [AttributeUsage(AttributeTargets.Method)] | ||
140 | public class ScriptInvocationAttribute : Attribute | ||
141 | { } | ||
142 | |||
143 | [AttributeUsage(AttributeTargets.Field)] | ||
144 | public class ScriptConstantAttribute : Attribute | ||
145 | { } | ||
77 | } | 146 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/IUrlModule.cs b/OpenSim/Region/Framework/Interfaces/IUrlModule.cs index 457444c..79e9f9d 100644 --- a/OpenSim/Region/Framework/Interfaces/IUrlModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IUrlModule.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Framework.Interfaces | |||
39 | UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID); | 39 | UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID); |
40 | void ReleaseURL(string url); | 40 | void ReleaseURL(string url); |
41 | void HttpResponse(UUID request, int status, string body); | 41 | void HttpResponse(UUID request, int status, string body); |
42 | void HttpContentType(UUID request, string type); | ||
43 | |||
42 | string GetHttpHeader(UUID request, string header); | 44 | string GetHttpHeader(UUID request, string header); |
43 | int GetFreeUrls(); | 45 | int GetFreeUrls(); |
44 | 46 | ||