diff options
author | John Hurliman | 2009-10-27 16:26:02 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-27 16:26:02 -0700 |
commit | 76dc52dba46f84de174374f4093d5288a0b9efdd (patch) | |
tree | 0eee855dfd0ada1009b95ddd1e60fa47546e7cf4 /OpenSim | |
parent | Move the calculation of time dilation from the scene to the physics engine. T... (diff) | |
parent | Remove the SECS loader (diff) | |
download | opensim-SC_OLD-76dc52dba46f84de174374f4093d5288a0b9efdd.zip opensim-SC_OLD-76dc52dba46f84de174374f4093d5288a0b9efdd.tar.gz opensim-SC_OLD-76dc52dba46f84de174374f4093d5288a0b9efdd.tar.bz2 opensim-SC_OLD-76dc52dba46f84de174374f4093d5288a0b9efdd.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
23 files changed, 0 insertions, 1502 deletions
diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/ComponentFactory.cs b/OpenSim/ApplicationPlugins/ScriptEngine/ComponentFactory.cs deleted file mode 100644 index c85634b..0000000 --- a/OpenSim/ApplicationPlugins/ScriptEngine/ComponentFactory.cs +++ /dev/null | |||
@@ -1,145 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.IO; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using OpenSim.ScriptEngine.Shared; | ||
33 | |||
34 | namespace OpenSim.ApplicationPlugins.ScriptEngine | ||
35 | { | ||
36 | public static class ComponentFactory | ||
37 | { | ||
38 | // Component providers are registered here wit a name (string) | ||
39 | // When a script engine is created the components are instanciated | ||
40 | public static Dictionary<string, Type> providers = new Dictionary<string, Type>(); | ||
41 | public static Dictionary<string, Type> scriptEngines = new Dictionary<string, Type>(); | ||
42 | |||
43 | internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | private readonly static string nameIScriptEngineComponent = typeof(IScriptEngineComponent).Name; // keep interface name in managed code | ||
45 | private readonly static string nameIScriptEngine = typeof(IScriptEngine).Name; // keep interface name in managed code | ||
46 | |||
47 | public static string Name | ||
48 | { | ||
49 | get { return "SECS.ComponentFactory"; } | ||
50 | } | ||
51 | |||
52 | /// <summary> | ||
53 | /// Load components from directory | ||
54 | /// </summary> | ||
55 | /// <param name="directory"></param> | ||
56 | internal static void Load(string directory, string filter) | ||
57 | { | ||
58 | // We may want to change how this functions as currently it required unique class names for each component | ||
59 | |||
60 | foreach (string file in Directory.GetFiles(directory, filter)) | ||
61 | { | ||
62 | //m_log.DebugFormat("[ScriptEngine]: Loading: [{0}].", file); | ||
63 | Assembly componentAssembly = null; | ||
64 | try | ||
65 | { | ||
66 | componentAssembly = Assembly.LoadFrom(file); | ||
67 | } | ||
68 | catch | ||
69 | { | ||
70 | m_log.ErrorFormat("[{0}] Error loading: \"{1}\".", Name, file); | ||
71 | } | ||
72 | |||
73 | if (componentAssembly != null) | ||
74 | { | ||
75 | try | ||
76 | { | ||
77 | // Go through all types in the assembly | ||
78 | foreach (Type componentType in componentAssembly.GetTypes()) | ||
79 | { | ||
80 | if (componentType.IsPublic | ||
81 | && !componentType.IsAbstract) | ||
82 | { | ||
83 | //if (componentType.IsSubclassOf(typeof(ComponentBase))) | ||
84 | if (componentType.GetInterface(nameIScriptEngineComponent) != null) | ||
85 | { | ||
86 | // We have found an type which is derived from ProdiverBase, add it to provider list | ||
87 | m_log.InfoFormat("[{0}] Adding component: {1}", Name, componentType.Name); | ||
88 | lock (providers) | ||
89 | { | ||
90 | providers.Add(componentType.Name, componentType); | ||
91 | } | ||
92 | } | ||
93 | //if (componentType.IsSubclassOf(typeof(ScriptEngineBase))) | ||
94 | if (componentType.GetInterface(nameIScriptEngine) != null) | ||
95 | { | ||
96 | // We have found an type which is derived from RegionScriptEngineBase, add it to engine list | ||
97 | m_log.InfoFormat("[{0}] Adding script engine: {1}", Name, componentType.Name); | ||
98 | lock (scriptEngines) | ||
99 | { | ||
100 | scriptEngines.Add(componentType.Name, componentType); | ||
101 | } | ||
102 | } | ||
103 | } | ||
104 | } | ||
105 | } | ||
106 | catch | ||
107 | (ReflectionTypeLoadException re) | ||
108 | { | ||
109 | m_log.ErrorFormat("[{0}] Could not load component \"{1}\": {2}", Name, componentAssembly.FullName, re.ToString()); | ||
110 | int c = 0; | ||
111 | foreach (Exception e in re.LoaderExceptions) | ||
112 | { | ||
113 | c++; | ||
114 | m_log.ErrorFormat("[{0}] LoaderException {1}: {2}", Name, c, e.ToString()); | ||
115 | } | ||
116 | } | ||
117 | } //if | ||
118 | } //foreach | ||
119 | } | ||
120 | |||
121 | public static IScriptEngineComponent GetComponentInstance(string name, params Object[] args) | ||
122 | { | ||
123 | lock (providers) | ||
124 | { | ||
125 | if (!providers.ContainsKey(name)) | ||
126 | throw new Exception("ScriptEngine requested component named \"" + name + | ||
127 | "\" that does not exist."); | ||
128 | return Activator.CreateInstance(providers[name], args) as IScriptEngineComponent; | ||
129 | } | ||
130 | } | ||
131 | |||
132 | private readonly static string nameIScriptEngineRegionComponent = typeof(IScriptEngineRegionComponent).Name; // keep interface name in managed code | ||
133 | public static IScriptEngineComponent GetComponentInstance(RegionInfoStructure info, string name, params Object[] args) | ||
134 | { | ||
135 | IScriptEngineComponent c = GetComponentInstance(name, args); | ||
136 | |||
137 | // If module is IScriptEngineRegionComponent then it will have one instance per region and we will initialize it | ||
138 | if (c.GetType().GetInterface(nameIScriptEngineRegionComponent) != null) | ||
139 | ((IScriptEngineRegionComponent)c).Initialize(info); | ||
140 | |||
141 | return c; | ||
142 | } | ||
143 | |||
144 | } | ||
145 | } | ||
diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/ScriptEngine/Properties/AssemblyInfo.cs deleted file mode 100644 index 890774d..0000000 --- a/OpenSim/ApplicationPlugins/ScriptEngine/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System.Reflection; | ||
29 | using System.Runtime.InteropServices; | ||
30 | |||
31 | // General Information about an assembly is controlled through the following | ||
32 | // set of attributes. Change these attribute values to modify the information | ||
33 | // associated with an assembly. | ||
34 | [assembly: AssemblyTitle("OpenSim.ApplicationPlugins.ScriptEngine")] | ||
35 | [assembly: AssemblyDescription("")] | ||
36 | [assembly: AssemblyConfiguration("")] | ||
37 | [assembly: AssemblyCompany("http://opensimulator.org")] | ||
38 | [assembly: AssemblyProduct("OpenSim.ApplicationPlugins.ScriptEngine")] | ||
39 | [assembly: AssemblyCopyright("Copyright (c) OpenSimulator.org Developers 2007-2009")] | ||
40 | [assembly: AssemblyTrademark("")] | ||
41 | [assembly: AssemblyCulture("")] | ||
42 | |||
43 | // Setting ComVisible to false makes the types in this assembly not visible | ||
44 | // to COM components. If you need to access a type in this assembly from | ||
45 | // COM, set the ComVisible attribute to true on that type. | ||
46 | [assembly: ComVisible(false)] | ||
47 | |||
48 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
49 | [assembly: Guid("a234c402-3014-45de-9f6b-c024d9f71983")] | ||
50 | |||
51 | // Version information for an assembly consists of the following four values: | ||
52 | // | ||
53 | // Major Version | ||
54 | // Minor Version | ||
55 | // Build Number | ||
56 | // Revision | ||
57 | // | ||
58 | // You can specify all the values or you can default the Build and Revision Numbers | ||
59 | // by using the '*' as shown below: | ||
60 | // [assembly: AssemblyVersion("0.6.5.*")] | ||
61 | [assembly: AssemblyVersion("0.6.5.*")] | ||
62 | [assembly: AssemblyFileVersion("0.6.5.0")] | ||
diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs b/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs deleted file mode 100644 index 41a5278..0000000 --- a/OpenSim/ApplicationPlugins/ScriptEngine/RegionEngineLoader.cs +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Reflection; | ||
29 | using log4net; | ||
30 | using Nini.Config; | ||
31 | using OpenSim.Region.Framework.Interfaces; | ||
32 | using OpenSim.Region.Framework.Scenes; | ||
33 | using OpenSim.ScriptEngine.Shared; | ||
34 | |||
35 | namespace OpenSim.ApplicationPlugins.ScriptEngine | ||
36 | { | ||
37 | public class RegionEngineLoader : IRegionModule | ||
38 | { | ||
39 | // This is a region module. | ||
40 | // This means: Every time a new region is created, a new instance of this module is also created. | ||
41 | // This module is responsible for starting the script engine for this region. | ||
42 | public string Name { get { return "SECS.DotNetEngine.Scheduler.RegionLoader"; } } | ||
43 | public bool IsSharedModule { get { return true; } } | ||
44 | |||
45 | internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | private string tempScriptEngineName = "DotNetEngine"; | ||
47 | public IScriptEngine scriptEngine; | ||
48 | public IConfigSource ConfigSource; | ||
49 | public IConfig ScriptConfigSource; | ||
50 | public void Initialise(Scene scene, IConfigSource source) | ||
51 | { | ||
52 | // New region is being created | ||
53 | // Create a new script engine | ||
54 | // Make sure we have config | ||
55 | try | ||
56 | { | ||
57 | if (ConfigSource.Configs["SECS"] == null) | ||
58 | ConfigSource.AddConfig("SECS"); | ||
59 | ScriptConfigSource = ConfigSource.Configs["SECS"]; | ||
60 | |||
61 | // Is SECS enabled? | ||
62 | if (ScriptConfigSource.GetBoolean("Enabled", false)) | ||
63 | { | ||
64 | LoadEngine(); | ||
65 | if (scriptEngine != null) | ||
66 | scriptEngine.Initialise(scene, source); | ||
67 | } | ||
68 | } | ||
69 | catch (NullReferenceException) | ||
70 | { | ||
71 | } | ||
72 | } | ||
73 | |||
74 | public void PostInitialise() | ||
75 | { | ||
76 | if (scriptEngine != null) | ||
77 | scriptEngine.PostInitialise(); | ||
78 | } | ||
79 | |||
80 | public void Close() | ||
81 | { | ||
82 | try | ||
83 | { | ||
84 | if (scriptEngine != null) | ||
85 | scriptEngine.Close(); | ||
86 | } | ||
87 | catch (Exception ex) | ||
88 | { | ||
89 | m_log.ErrorFormat("[{0}] Unable to close engine \"{1}\": {2}", Name, tempScriptEngineName, ex.ToString()); | ||
90 | } | ||
91 | } | ||
92 | |||
93 | private void LoadEngine() | ||
94 | { | ||
95 | m_log.DebugFormat("[{0}] Loading region script engine engine \"{1}\".", Name, tempScriptEngineName); | ||
96 | try | ||
97 | { | ||
98 | lock (ComponentFactory.scriptEngines) | ||
99 | { | ||
100 | if (!ComponentFactory.scriptEngines.ContainsKey(tempScriptEngineName)) | ||
101 | { | ||
102 | m_log.ErrorFormat("[{0}] Unable to load region script engine: Script engine \"{1}\" does not exist.", Name, tempScriptEngineName); | ||
103 | } | ||
104 | else | ||
105 | { | ||
106 | scriptEngine = | ||
107 | Activator.CreateInstance(ComponentFactory.scriptEngines[tempScriptEngineName]) as | ||
108 | IScriptEngine; | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | catch (Exception ex) | ||
113 | { | ||
114 | m_log.ErrorFormat("[{0}] Internal error loading region script engine \"{1}\": {2}", Name, tempScriptEngineName, ex.ToString()); | ||
115 | } | ||
116 | } | ||
117 | |||
118 | } | ||
119 | } | ||
diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/Resources/ScriptEnginePlugin.addin.xml b/OpenSim/ApplicationPlugins/ScriptEngine/Resources/ScriptEnginePlugin.addin.xml deleted file mode 100644 index f067bf4..0000000 --- a/OpenSim/ApplicationPlugins/ScriptEngine/Resources/ScriptEnginePlugin.addin.xml +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | <Addin id="OpenSim.ApplicationPlugins.ScriptEngine" version="0.1"> | ||
2 | <Runtime> | ||
3 | <Import assembly="OpenSim.ApplicationPlugins.ScriptEngine.dll" /> | ||
4 | </Runtime> | ||
5 | <Dependencies> | ||
6 | <Addin id="OpenSim" version="0.5" /> | ||
7 | </Dependencies> | ||
8 | <Extension path = "/OpenSim/Startup"> | ||
9 | <Plugin id="ScriptEnginePlugin" type="OpenSim.ApplicationPlugins.ScriptEngine.ScriptEnginePlugin" /> | ||
10 | </Extension> | ||
11 | </Addin> | ||
diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/ScriptEnginePlugin.cs b/OpenSim/ApplicationPlugins/ScriptEngine/ScriptEnginePlugin.cs deleted file mode 100644 index cd34f70..0000000 --- a/OpenSim/ApplicationPlugins/ScriptEngine/ScriptEnginePlugin.cs +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System.Reflection; | ||
28 | using log4net; | ||
29 | |||
30 | namespace OpenSim.ApplicationPlugins.ScriptEngine | ||
31 | { | ||
32 | /// <summary> | ||
33 | /// Loads all Script Engine Components | ||
34 | /// </summary> | ||
35 | public class ScriptEnginePlugin : IApplicationPlugin | ||
36 | { | ||
37 | internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
38 | internal OpenSimBase m_OpenSim; | ||
39 | |||
40 | |||
41 | |||
42 | public ScriptEnginePlugin() | ||
43 | { | ||
44 | // Application startup | ||
45 | #if DEBUG | ||
46 | m_log.InfoFormat("[{0}] ##################################", Name); | ||
47 | m_log.InfoFormat("[{0}] # Script Engine Component System #", Name); | ||
48 | m_log.InfoFormat("[{0}] ##################################", Name); | ||
49 | #else | ||
50 | m_log.InfoFormat("[{0}] Script Engine Component System", Name); | ||
51 | #endif | ||
52 | |||
53 | // Load all modules from current directory | ||
54 | // We only want files named OpenSim.ScriptEngine.*.dll | ||
55 | ComponentFactory.Load(".", "OpenSim.ScriptEngine.*.dll"); | ||
56 | } | ||
57 | |||
58 | public void Initialise(OpenSimBase openSim) | ||
59 | { | ||
60 | |||
61 | // Our objective: Load component .dll's | ||
62 | m_OpenSim = openSim; | ||
63 | //m_OpenSim.Shutdown(); | ||
64 | } | ||
65 | |||
66 | public void PostInitialise() | ||
67 | { | ||
68 | } | ||
69 | |||
70 | |||
71 | #region IApplicationPlugin stuff | ||
72 | /// <summary> | ||
73 | /// Returns the plugin version | ||
74 | /// </summary> | ||
75 | /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns> | ||
76 | public string Version | ||
77 | { | ||
78 | get { return "1.0.0.0"; } | ||
79 | } | ||
80 | |||
81 | /// <summary> | ||
82 | /// Returns the plugin name | ||
83 | /// </summary> | ||
84 | /// <returns>Plugin name, eg MySQL User Provider</returns> | ||
85 | public string Name | ||
86 | { | ||
87 | get { return "SECS"; } | ||
88 | } | ||
89 | |||
90 | /// <summary> | ||
91 | /// Default-initialises the plugin | ||
92 | /// </summary> | ||
93 | public void Initialise() { } | ||
94 | |||
95 | ///<summary> | ||
96 | ///Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | ||
97 | ///</summary> | ||
98 | ///<filterpriority>2</filterpriority> | ||
99 | public void Dispose() | ||
100 | { | ||
101 | //throw new NotImplementedException(); | ||
102 | } | ||
103 | #endregion | ||
104 | |||
105 | } | ||
106 | } | ||
diff --git a/OpenSim/ScriptEngine/Shared.Script/ICommandProvider.cs b/OpenSim/ScriptEngine/Shared.Script/ICommandProvider.cs deleted file mode 100644 index 6a02a4a..0000000 --- a/OpenSim/ScriptEngine/Shared.Script/ICommandProvider.cs +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | namespace ScriptAssemblies | ||
33 | { | ||
34 | public interface ICommandProvider | ||
35 | { | ||
36 | void ExecuteCommand(string functionName, params object[] args); | ||
37 | string Name { get; } | ||
38 | } | ||
39 | } | ||
diff --git a/OpenSim/ScriptEngine/Shared.Script/IScript.cs b/OpenSim/ScriptEngine/Shared.Script/IScript.cs deleted file mode 100644 index 6afb4d5..0000000 --- a/OpenSim/ScriptEngine/Shared.Script/IScript.cs +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | namespace ScriptAssemblies | ||
33 | { | ||
34 | public interface IScript | ||
35 | { | ||
36 | void ExecuteFunction(string functionName, params object[] args); | ||
37 | } | ||
38 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared.Script/Properties/AssemblyInfo.cs b/OpenSim/ScriptEngine/Shared.Script/Properties/AssemblyInfo.cs deleted file mode 100644 index 090cb44..0000000 --- a/OpenSim/ScriptEngine/Shared.Script/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System.Reflection; | ||
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | ||
31 | |||
32 | // General Information about an assembly is controlled through the following | ||
33 | // set of attributes. Change these attribute values to modify the information | ||
34 | // associated with an assembly. | ||
35 | [assembly: AssemblyTitle("OpenSim.ScriptEngine.Shared.Script")] | ||
36 | [assembly: AssemblyDescription("")] | ||
37 | [assembly: AssemblyConfiguration("")] | ||
38 | [assembly: AssemblyCompany("http://opensimulator.org")] | ||
39 | [assembly: AssemblyProduct("OpenSim.ScriptEngine.Shared.Script")] | ||
40 | [assembly: AssemblyCopyright("Copyright © Microsoft 2008")] | ||
41 | [assembly: AssemblyTrademark("")] | ||
42 | [assembly: AssemblyCulture("")] | ||
43 | |||
44 | // Setting ComVisible to false makes the types in this assembly not visible | ||
45 | // to COM components. If you need to access a type in this assembly from | ||
46 | // COM, set the ComVisible attribute to true on that type. | ||
47 | [assembly: ComVisible(false)] | ||
48 | |||
49 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
50 | [assembly: Guid("ea77002b-c967-4368-ace9-6533f8147d4b")] | ||
51 | |||
52 | // Version information for an assembly consists of the following four values: | ||
53 | // | ||
54 | // Major Version | ||
55 | // Minor Version | ||
56 | // Build Number | ||
57 | // Revision | ||
58 | // | ||
59 | // You can specify all the values or you can default the Build and Revision Numbers | ||
60 | // by using the '*' as shown below: | ||
61 | // [assembly: AssemblyVersion("0.6.5.*")] | ||
62 | [assembly: AssemblyVersion("0.6.5.*")] | ||
63 | [assembly: AssemblyFileVersion("0.6.5.0")] | ||
diff --git a/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs b/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs deleted file mode 100644 index ab7835d..0000000 --- a/OpenSim/ScriptEngine/Shared.Script/ScriptBase.cs +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using System.Runtime.Remoting.Lifetime; | ||
32 | using System.Text; | ||
33 | |||
34 | namespace ScriptAssemblies | ||
35 | { | ||
36 | public class ScriptBase : MarshalByRefObject, IScript | ||
37 | { | ||
38 | |||
39 | #region AppDomain Serialization Keep-Alive | ||
40 | // | ||
41 | // Never expire this object | ||
42 | // | ||
43 | public override Object InitializeLifetimeService() | ||
44 | { | ||
45 | ILease lease = (ILease)base.InitializeLifetimeService(); | ||
46 | |||
47 | if (lease.CurrentState == LeaseState.Initial) | ||
48 | { | ||
49 | lease.InitialLeaseTime = TimeSpan.Zero; | ||
50 | } | ||
51 | return lease; | ||
52 | } | ||
53 | #endregion | ||
54 | |||
55 | public delegate void ExecuteFunctionEventDelegate(string functionName, params object[] args); | ||
56 | public event ExecuteFunctionEventDelegate OnExecuteFunction; | ||
57 | |||
58 | //private List<ICommandProvider> CommandProviders = new List<ICommandProvider>(); | ||
59 | |||
60 | public ScriptBase() | ||
61 | { | ||
62 | } | ||
63 | |||
64 | public void ExecuteFunction(string functionName, params object[] args) | ||
65 | { | ||
66 | // We got a new command, fire event | ||
67 | if (OnExecuteFunction != null) | ||
68 | OnExecuteFunction(functionName, args); | ||
69 | |||
70 | } | ||
71 | } | ||
72 | } | ||
diff --git a/OpenSim/ScriptEngine/Shared/EventParams.cs b/OpenSim/ScriptEngine/Shared/EventParams.cs deleted file mode 100644 index 28eaa58..0000000 --- a/OpenSim/ScriptEngine/Shared/EventParams.cs +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using OpenMetaverse; | ||
32 | using OpenSim.Region.ScriptEngine.Shared; | ||
33 | using log4net; | ||
34 | using System.Reflection; | ||
35 | |||
36 | namespace OpenSim.ScriptEngine.Shared | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// Holds all the data required to execute a scripting event. | ||
40 | /// </summary> | ||
41 | public class EventParams | ||
42 | { | ||
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | public string EventName; | ||
45 | public Object[] Params; | ||
46 | public Region.ScriptEngine.Shared.DetectParams[] DetectParams; | ||
47 | public uint LocalID; | ||
48 | public UUID ItemID; | ||
49 | |||
50 | public EventParams(uint localID, UUID itemID, string eventName, Object[] eventParams, DetectParams[] detectParams) | ||
51 | { | ||
52 | LocalID = localID; | ||
53 | ItemID = itemID; | ||
54 | EventName = eventName; | ||
55 | Params = eventParams; | ||
56 | DetectParams = detectParams; | ||
57 | } | ||
58 | public EventParams(uint localID, string eventName, Object[] eventParams, DetectParams[] detectParams) | ||
59 | { | ||
60 | LocalID = localID; | ||
61 | EventName = eventName; | ||
62 | Params = eventParams; | ||
63 | DetectParams = detectParams; | ||
64 | } | ||
65 | public void test(params object[] args) | ||
66 | { | ||
67 | string functionName = "test"; | ||
68 | test2(functionName, args); | ||
69 | } | ||
70 | public void test2(string functionName, params object[] args) | ||
71 | { | ||
72 | String logMessage = functionName; | ||
73 | foreach (object arg in args) | ||
74 | { | ||
75 | logMessage +=", "+arg; | ||
76 | } | ||
77 | m_log.Debug(logMessage); | ||
78 | } | ||
79 | |||
80 | |||
81 | } | ||
82 | } | ||
diff --git a/OpenSim/ScriptEngine/Shared/IScriptCommandProvider.cs b/OpenSim/ScriptEngine/Shared/IScriptCommandProvider.cs deleted file mode 100644 index b2498d6..0000000 --- a/OpenSim/ScriptEngine/Shared/IScriptCommandProvider.cs +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | namespace OpenSim.ScriptEngine.Shared | ||
33 | { | ||
34 | public interface IScriptCommandProvider : ScriptAssemblies.ICommandProvider | ||
35 | { | ||
36 | } | ||
37 | } | ||
diff --git a/OpenSim/ScriptEngine/Shared/IScriptCompiler.cs b/OpenSim/ScriptEngine/Shared/IScriptCompiler.cs deleted file mode 100644 index 57249fd..0000000 --- a/OpenSim/ScriptEngine/Shared/IScriptCompiler.cs +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Reflection; | ||
30 | using System.Text; | ||
31 | using ScriptAssemblies; | ||
32 | |||
33 | namespace OpenSim.ScriptEngine.Shared | ||
34 | { | ||
35 | public interface IScriptCompiler : IScriptEngineComponent | ||
36 | { | ||
37 | string Compile(ScriptMetaData scriptMetaData, ref string script); | ||
38 | string PreProcessScript(ref string script); | ||
39 | } | ||
40 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared/IScriptEngine.cs b/OpenSim/ScriptEngine/Shared/IScriptEngine.cs deleted file mode 100644 index 3acd1d5..0000000 --- a/OpenSim/ScriptEngine/Shared/IScriptEngine.cs +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Text; | ||
30 | using Nini.Config; | ||
31 | using OpenSim.Region.Framework.Interfaces; | ||
32 | using OpenSim.Region.Framework.Scenes; | ||
33 | |||
34 | namespace OpenSim.ScriptEngine.Shared | ||
35 | { | ||
36 | public interface IScriptEngine | ||
37 | { | ||
38 | //string[] ComponentNames { get; } | ||
39 | //Dictionary<string, IScriptEngineComponent> Components { get; } | ||
40 | //void InitializeComponents(); | ||
41 | void Initialise(Scene scene, IConfigSource source); | ||
42 | void PostInitialise(); | ||
43 | void Close(); | ||
44 | string Name { get; } | ||
45 | // string Name { get; } | ||
46 | //void Initialize(); | ||
47 | //void Close(); | ||
48 | } | ||
49 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared/IScriptEngineComponent.cs b/OpenSim/ScriptEngine/Shared/IScriptEngineComponent.cs deleted file mode 100644 index 0959b53..0000000 --- a/OpenSim/ScriptEngine/Shared/IScriptEngineComponent.cs +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Text; | ||
30 | |||
31 | namespace OpenSim.ScriptEngine.Shared | ||
32 | { | ||
33 | public interface IScriptEngineComponent | ||
34 | { | ||
35 | } | ||
36 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared/IScriptEngineRegionComponent.cs b/OpenSim/ScriptEngine/Shared/IScriptEngineRegionComponent.cs deleted file mode 100644 index eeb86c1..0000000 --- a/OpenSim/ScriptEngine/Shared/IScriptEngineRegionComponent.cs +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | namespace OpenSim.ScriptEngine.Shared | ||
29 | { | ||
30 | public interface IScriptEngineRegionComponent | ||
31 | { | ||
32 | void Initialize(RegionInfoStructure currentRegion); | ||
33 | } | ||
34 | } | ||
diff --git a/OpenSim/ScriptEngine/Shared/IScriptEventProvider.cs b/OpenSim/ScriptEngine/Shared/IScriptEventProvider.cs deleted file mode 100644 index b796a4b..0000000 --- a/OpenSim/ScriptEngine/Shared/IScriptEventProvider.cs +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | namespace OpenSim.ScriptEngine.Shared | ||
33 | { | ||
34 | public interface IScriptEventProvider : IScriptEngineComponent, IScriptEngineRegionComponent | ||
35 | { | ||
36 | |||
37 | } | ||
38 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared/IScriptExecutor.cs b/OpenSim/ScriptEngine/Shared/IScriptExecutor.cs deleted file mode 100644 index a48c7e5..0000000 --- a/OpenSim/ScriptEngine/Shared/IScriptExecutor.cs +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Text; | ||
30 | using OpenSim.ScriptEngine.Shared; | ||
31 | |||
32 | namespace OpenSim.ScriptEngine.Shared | ||
33 | { | ||
34 | public interface IScriptExecutor : IScriptEngineComponent, IScriptEngineRegionComponent | ||
35 | { | ||
36 | void ExecuteCommand(ref ScriptStructure scriptContainer, EventParams p); | ||
37 | void ExecuteCommand(EventParams p); | ||
38 | } | ||
39 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared/IScriptLoader.cs b/OpenSim/ScriptEngine/Shared/IScriptLoader.cs deleted file mode 100644 index 6beea17..0000000 --- a/OpenSim/ScriptEngine/Shared/IScriptLoader.cs +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenSim.ScriptEngine.Shared; | ||
29 | |||
30 | namespace OpenSim.ScriptEngine.Shared | ||
31 | { | ||
32 | public interface IScriptLoader: IScriptEngineComponent | ||
33 | { | ||
34 | ScriptAssemblies.IScript LoadScript(ScriptStructure script); | ||
35 | } | ||
36 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared/IScriptScheduler.cs b/OpenSim/ScriptEngine/Shared/IScriptScheduler.cs deleted file mode 100644 index cf1f1ab..0000000 --- a/OpenSim/ScriptEngine/Shared/IScriptScheduler.cs +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Text; | ||
30 | using OpenMetaverse; | ||
31 | using OpenSim.ScriptEngine.Shared; | ||
32 | |||
33 | namespace OpenSim.ScriptEngine.Shared | ||
34 | { | ||
35 | public interface IScriptScheduler : IScriptEngineComponent | ||
36 | { | ||
37 | void AddScript(ScriptStructure script); | ||
38 | void Removecript(uint id, UUID itemID); | ||
39 | void Close(); | ||
40 | } | ||
41 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared/Properties/AssemblyInfo.cs b/OpenSim/ScriptEngine/Shared/Properties/AssemblyInfo.cs deleted file mode 100644 index 4ce44ed..0000000 --- a/OpenSim/ScriptEngine/Shared/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System.Reflection; | ||
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | ||
31 | |||
32 | // General Information about an assembly is controlled through the following | ||
33 | // set of attributes. Change these attribute values to modify the information | ||
34 | // associated with an assembly. | ||
35 | [assembly: AssemblyTitle("OpenSim.ScriptEngine.Shared")] | ||
36 | [assembly: AssemblyDescription("")] | ||
37 | [assembly: AssemblyConfiguration("")] | ||
38 | [assembly: AssemblyCompany("http://opensimulator.org")] | ||
39 | [assembly: AssemblyProduct("OpenSim.ScriptEngine.Shared")] | ||
40 | [assembly: AssemblyCopyright("Copyright © Microsoft 2008")] | ||
41 | [assembly: AssemblyTrademark("")] | ||
42 | [assembly: AssemblyCulture("")] | ||
43 | |||
44 | // Setting ComVisible to false makes the types in this assembly not visible | ||
45 | // to COM components. If you need to access a type in this assembly from | ||
46 | // COM, set the ComVisible attribute to true on that type. | ||
47 | [assembly: ComVisible(false)] | ||
48 | |||
49 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
50 | [assembly: Guid("ea77002b-c967-4368-ace9-6533f8147d4b")] | ||
51 | |||
52 | // Version information for an assembly consists of the following four values: | ||
53 | // | ||
54 | // Major Version | ||
55 | // Minor Version | ||
56 | // Build Number | ||
57 | // Revision | ||
58 | // | ||
59 | // You can specify all the values or you can default the Build and Revision Numbers | ||
60 | // by using the '*' as shown below: | ||
61 | // [assembly: AssemblyVersion("0.6.5.*")] | ||
62 | [assembly: AssemblyVersion("0.6.5.*")] | ||
63 | [assembly: AssemblyFileVersion("0.6.5.0")] | ||
diff --git a/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs b/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs deleted file mode 100644 index 64b33d4..0000000 --- a/OpenSim/ScriptEngine/Shared/RegionInfoStructure.cs +++ /dev/null | |||
@@ -1,120 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using Nini.Config; | ||
33 | using OpenSim.Region.Framework.Scenes; | ||
34 | using OpenSim.Region.ScriptEngine.Shared; | ||
35 | using OpenSim.ScriptEngine.Shared; | ||
36 | using EventParams = OpenSim.ScriptEngine.Shared.EventParams; | ||
37 | |||
38 | namespace OpenSim.ScriptEngine.Shared | ||
39 | { | ||
40 | public struct RegionInfoStructure | ||
41 | { | ||
42 | public Scene Scene; | ||
43 | public IConfigSource ConfigSource; | ||
44 | |||
45 | public IScriptLoader ScriptLoader; | ||
46 | public Dictionary<string, IScriptEventProvider> EventProviders; | ||
47 | public Dictionary<string, IScriptExecutor> Executors; | ||
48 | public Dictionary<string, IScriptCompiler> Compilers; | ||
49 | public Dictionary<string, IScriptScheduler> Schedulers; | ||
50 | public Dictionary<string, IScriptCommandProvider> CommandProviders; | ||
51 | |||
52 | public void Executors_Execute(EventParams p) | ||
53 | { | ||
54 | // Execute a command on all executors | ||
55 | lock (Executors) | ||
56 | { | ||
57 | foreach (IScriptExecutor exec in Executors.Values) | ||
58 | { | ||
59 | exec.ExecuteCommand(p); | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | public void Executors_Execute(ScriptStructure scriptContainer, EventParams p) | ||
64 | { | ||
65 | // Execute a command on all executors | ||
66 | lock (Executors) | ||
67 | { | ||
68 | foreach (IScriptExecutor exec in Executors.Values) | ||
69 | { | ||
70 | exec.ExecuteCommand(ref scriptContainer, p); | ||
71 | } | ||
72 | } | ||
73 | } | ||
74 | |||
75 | public IScriptCompiler FindCompiler(ScriptMetaData scriptMetaData) | ||
76 | { | ||
77 | string compiler = "Compiler_LSL"; | ||
78 | if (scriptMetaData.ContainsKey("Compiler")) | ||
79 | compiler = scriptMetaData["Compiler"]; | ||
80 | |||
81 | lock (Compilers) | ||
82 | { | ||
83 | if (!Compilers.ContainsKey(compiler)) | ||
84 | throw new Exception("Requested script compiler \"" + compiler + "\" does not exist."); | ||
85 | |||
86 | return Compilers[compiler]; | ||
87 | } | ||
88 | } | ||
89 | |||
90 | public IScriptScheduler FindScheduler(ScriptMetaData scriptMetaData) | ||
91 | { | ||
92 | string scheduler = "Scheduler"; | ||
93 | if (scriptMetaData.ContainsKey("Scheduler")) | ||
94 | scheduler = scriptMetaData["Scheduler"]; | ||
95 | |||
96 | lock (Schedulers) | ||
97 | { | ||
98 | if (!Schedulers.ContainsKey(scheduler)) | ||
99 | throw new Exception("Requested script scheduler \"" + scheduler + "\" does not exist."); | ||
100 | |||
101 | return Schedulers[scheduler]; | ||
102 | } | ||
103 | } | ||
104 | |||
105 | //public Assembly[] GetCommandProviderAssemblies() | ||
106 | //{ | ||
107 | // lock (CommandProviders) | ||
108 | // { | ||
109 | // Assembly[] ass = new Assembly[CommandProviders.Count]; | ||
110 | // int i = 0; | ||
111 | // foreach (string key in CommandProviders.Keys) | ||
112 | // { | ||
113 | // ass[i] = CommandProviders[key].GetType().Assembly; | ||
114 | // i++; | ||
115 | // } | ||
116 | // return ass; | ||
117 | // } | ||
118 | //} | ||
119 | } | ||
120 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared/ScriptMetaData.cs b/OpenSim/ScriptEngine/Shared/ScriptMetaData.cs deleted file mode 100644 index e351632..0000000 --- a/OpenSim/ScriptEngine/Shared/ScriptMetaData.cs +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | |||
30 | namespace OpenSim.ScriptEngine.Shared | ||
31 | { | ||
32 | public class ScriptMetaData: Dictionary<string, string> | ||
33 | { | ||
34 | private static readonly char[] LineSeparator = "\r\n".ToCharArray(); | ||
35 | private static readonly char[] Separator = { ':' }; | ||
36 | public static ScriptMetaData Extract(ref string Script) | ||
37 | { | ||
38 | ScriptMetaData ret = new ScriptMetaData(); | ||
39 | if (string.IsNullOrEmpty(Script)) | ||
40 | return ret; | ||
41 | |||
42 | // Process it line by line | ||
43 | string Line = ""; | ||
44 | for (int i = 0; i < Script.Length + 1; i++) | ||
45 | { | ||
46 | // Found a line separator? | ||
47 | if (i < Script.Length | ||
48 | && Script[i] != LineSeparator[0] | ||
49 | && Script[i] != LineSeparator[1]) | ||
50 | { | ||
51 | // No, not end of line. Add to current line | ||
52 | Line += Script[i]; | ||
53 | } | ||
54 | else | ||
55 | { | ||
56 | // Extract MetaData from this line. Returns False if not found. | ||
57 | if (!_GetMetaFromLine(ret, Line)) | ||
58 | continue; | ||
59 | // Empty for next round | ||
60 | Line = ""; | ||
61 | } | ||
62 | } | ||
63 | return ret; | ||
64 | } | ||
65 | |||
66 | private static bool _GetMetaFromLine(ScriptMetaData ret, string line) | ||
67 | { | ||
68 | line = line.Trim(); | ||
69 | |||
70 | // Empty line? We may find more later | ||
71 | if (line == "") | ||
72 | return true; | ||
73 | |||
74 | // Is this a comment? If not, then return false | ||
75 | if (!line.StartsWith("//")) | ||
76 | return false; | ||
77 | |||
78 | // It is a comment | ||
79 | string[] keyval = line.Split(Separator, 2, StringSplitOptions.None); | ||
80 | keyval[0] = keyval[0].Substring(2, keyval[0].Length - 2).Trim(); | ||
81 | keyval[1] = keyval[1].Trim(); | ||
82 | |||
83 | // Add it | ||
84 | if (keyval[0] != "") | ||
85 | if (!ret.ContainsKey(keyval[0])) | ||
86 | { | ||
87 | //m_log.DebugFormat("[DotNetEngine] Script metadata: Key: \"{0}\", Value: \"{1}\".", keyval[0], keyval[1]); | ||
88 | ret.Add(keyval[0], keyval[1]); | ||
89 | } | ||
90 | |||
91 | return true; | ||
92 | } | ||
93 | |||
94 | } | ||
95 | } \ No newline at end of file | ||
diff --git a/OpenSim/ScriptEngine/Shared/ScriptStructure.cs b/OpenSim/ScriptEngine/Shared/ScriptStructure.cs deleted file mode 100644 index 1095a8b..0000000 --- a/OpenSim/ScriptEngine/Shared/ScriptStructure.cs +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using System.Text; | ||
32 | using log4net; | ||
33 | using OpenMetaverse; | ||
34 | using OpenSim.Region.ScriptEngine.Interfaces; | ||
35 | using OpenSim.Region.ScriptEngine.Shared.ScriptBase; | ||
36 | using OpenSim.ScriptEngine.Shared; | ||
37 | |||
38 | namespace OpenSim.ScriptEngine.Shared | ||
39 | { | ||
40 | public struct ScriptStructure | ||
41 | { | ||
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
44 | public RegionInfoStructure RegionInfo; | ||
45 | public ScriptMetaData ScriptMetaData; | ||
46 | |||
47 | public ScriptAssemblies.IScript ScriptObject; | ||
48 | public string State; | ||
49 | public bool Running; | ||
50 | public bool Disabled; | ||
51 | public string Source; | ||
52 | public int StartParam; | ||
53 | public AppDomain AppDomain; | ||
54 | public Dictionary<string, IScriptApi> Apis; | ||
55 | public Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> LineMap; | ||
56 | public uint LocalID; | ||
57 | public UUID ItemID; | ||
58 | public string AssemblyFileName; | ||
59 | |||
60 | public string ScriptID { get { return LocalID.ToString() + "." + ItemID.ToString(); } } | ||
61 | public string Name { get { return "Script:" + ScriptID; } } | ||
62 | private bool Initialized; | ||
63 | private Dictionary<string, Delegate> InternalFunctions; | ||
64 | public string AssemblyName; | ||
65 | |||
66 | public void ExecuteEvent(EventParams p) | ||
67 | { | ||
68 | ExecuteMethod(p, true); | ||
69 | } | ||
70 | |||
71 | public void ExecuteMethod(EventParams p) | ||
72 | { | ||
73 | ExecuteMethod(p, false); | ||
74 | } | ||
75 | private void ExecuteMethod(EventParams p, bool isEvent) | ||
76 | { | ||
77 | // First time initialization? | ||
78 | if (!Initialized) | ||
79 | { | ||
80 | Initialized = true; | ||
81 | CacheInternalFunctions(); | ||
82 | } | ||
83 | |||
84 | lock (InternalFunctions) | ||
85 | { | ||
86 | // Make function name | ||
87 | string FunctionName; | ||
88 | if (isEvent) | ||
89 | FunctionName = State + "_event_" + p.EventName; | ||
90 | else | ||
91 | FunctionName = p.EventName; | ||
92 | |||
93 | // Check if this function exist | ||
94 | if (!InternalFunctions.ContainsKey(FunctionName)) | ||
95 | { | ||
96 | // TODO: Send message in-world | ||
97 | m_log.ErrorFormat("[{0}] Script function \"{1}\" was not found.", Name, FunctionName); | ||
98 | return; | ||
99 | } | ||
100 | |||
101 | // Execute script function | ||
102 | try | ||
103 | { | ||
104 | InternalFunctions[FunctionName].DynamicInvoke(p.Params); | ||
105 | } | ||
106 | catch (Exception e) | ||
107 | { | ||
108 | m_log.ErrorFormat("[{0}] Execute \"{1}\" failed: {2}", Name, FunctionName, e.ToString()); | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | |||
113 | /// <summary> | ||
114 | /// Cache functions into a dictionary with delegates. Should be faster than reflection. | ||
115 | /// </summary> | ||
116 | private void CacheInternalFunctions() | ||
117 | { | ||
118 | Type scriptObjectType = ScriptObject.GetType(); | ||
119 | InternalFunctions = new Dictionary<string, Delegate>(); | ||
120 | |||
121 | MethodInfo[] methods = scriptObjectType.GetMethods(); | ||
122 | lock (InternalFunctions) | ||
123 | { | ||
124 | // Read all methods into a dictionary | ||
125 | foreach (MethodInfo mi in methods) | ||
126 | { | ||
127 | // TODO: We don't support overloading | ||
128 | if (!InternalFunctions.ContainsKey(mi.Name)) | ||
129 | InternalFunctions.Add(mi.Name, Delegate.CreateDelegate(scriptObjectType, ScriptObject, mi)); | ||
130 | else | ||
131 | m_log.ErrorFormat("[{0}] Error: Script function \"{1}\" is already added. We do not support overloading.", | ||
132 | Name, mi.Name); | ||
133 | } | ||
134 | } | ||
135 | } | ||
136 | } | ||
137 | } | ||