aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJeff Ames2008-02-16 08:35:19 +0000
committerJeff Ames2008-02-16 08:35:19 +0000
commite8225f2f815d48294e7b857f7aff1f8641808292 (patch)
tree0d14e651a0856026f05322d587dec09e937c4f08 /OpenSim/Region
parentForgot one small but important line .. ;) (diff)
downloadopensim-SC-e8225f2f815d48294e7b857f7aff1f8641808292.zip
opensim-SC-e8225f2f815d48294e7b857f7aff1f8641808292.tar.gz
opensim-SC-e8225f2f815d48294e7b857f7aff1f8641808292.tar.bz2
opensim-SC-e8225f2f815d48294e7b857f7aff1f8641808292.tar.xz
Update svn properties.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs216
-rw-r--r--OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs20
-rw-r--r--OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs44
3 files changed, 140 insertions, 140 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs
index bb05db9..fdca945 100644
--- a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs
@@ -1,108 +1,108 @@
1/* 1/*
2* Copyright (c) Contributors, http://opensimulator.org/ 2* Copyright (c) Contributors, http://opensimulator.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders. 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4* 4*
5* Redistribution and use in source and binary forms, with or without 5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met: 6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright 7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer. 8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright 9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the 10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution. 11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the 12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products 13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission. 14* derived from this software without specific prior written permission.
15* 15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY 16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 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 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 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 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. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Runtime.Remoting.Lifetime; 30using System.Runtime.Remoting.Lifetime;
31using System.Text; 31using System.Text;
32 32
33namespace OpenSim.Region.ScriptEngine.Common 33namespace OpenSim.Region.ScriptEngine.Common
34{ 34{
35 public abstract class ExecutorBase : MarshalByRefObject 35 public abstract class ExecutorBase : MarshalByRefObject
36 { 36 {
37 /// <summary> 37 /// <summary>
38 /// Contains the script to execute functions in. 38 /// Contains the script to execute functions in.
39 /// </summary> 39 /// </summary>
40 protected IScript m_Script; 40 protected IScript m_Script;
41 /// <summary> 41 /// <summary>
42 /// If set to False events will not be executed. 42 /// If set to False events will not be executed.
43 /// </summary> 43 /// </summary>
44 protected bool m_Running = true; 44 protected bool m_Running = true;
45 45
46 /// <summary> 46 /// <summary>
47 /// Create a new instance of ExecutorBase 47 /// Create a new instance of ExecutorBase
48 /// </summary> 48 /// </summary>
49 /// <param name="Script"></param> 49 /// <param name="Script"></param>
50 public ExecutorBase(IScript Script) 50 public ExecutorBase(IScript Script)
51 { 51 {
52 m_Script = Script; 52 m_Script = Script;
53 } 53 }
54 54
55 /// <summary> 55 /// <summary>
56 /// Make sure our object does not timeout when in AppDomain. (Called by ILease base class) 56 /// Make sure our object does not timeout when in AppDomain. (Called by ILease base class)
57 /// </summary> 57 /// </summary>
58 /// <returns></returns> 58 /// <returns></returns>
59 public override Object InitializeLifetimeService() 59 public override Object InitializeLifetimeService()
60 { 60 {
61 //Console.WriteLine("Executor: InitializeLifetimeService()"); 61 //Console.WriteLine("Executor: InitializeLifetimeService()");
62 // return null; 62 // return null;
63 ILease lease = (ILease)base.InitializeLifetimeService(); 63 ILease lease = (ILease)base.InitializeLifetimeService();
64 64
65 if (lease.CurrentState == LeaseState.Initial) 65 if (lease.CurrentState == LeaseState.Initial)
66 { 66 {
67 lease.InitialLeaseTime = TimeSpan.Zero; // TimeSpan.FromMinutes(1); 67 lease.InitialLeaseTime = TimeSpan.Zero; // TimeSpan.FromMinutes(1);
68 // lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); 68 // lease.SponsorshipTimeout = TimeSpan.FromMinutes(2);
69 // lease.RenewOnCallTime = TimeSpan.FromSeconds(2); 69 // lease.RenewOnCallTime = TimeSpan.FromSeconds(2);
70 } 70 }
71 return lease; 71 return lease;
72 } 72 }
73 73
74 /// <summary> 74 /// <summary>
75 /// Get current AppDomain 75 /// Get current AppDomain
76 /// </summary> 76 /// </summary>
77 /// <returns>Current AppDomain</returns> 77 /// <returns>Current AppDomain</returns>
78 public AppDomain GetAppDomain() 78 public AppDomain GetAppDomain()
79 { 79 {
80 return AppDomain.CurrentDomain; 80 return AppDomain.CurrentDomain;
81 } 81 }
82 82
83 /// <summary> 83 /// <summary>
84 /// Execute a specific function/event in script. 84 /// Execute a specific function/event in script.
85 /// </summary> 85 /// </summary>
86 /// <param name="FunctionName">Name of function to execute</param> 86 /// <param name="FunctionName">Name of function to execute</param>
87 /// <param name="args">Arguments to pass to function</param> 87 /// <param name="args">Arguments to pass to function</param>
88 public void ExecuteEvent(string FunctionName, object[] args) 88 public void ExecuteEvent(string FunctionName, object[] args)
89 { 89 {
90 if (m_Running == false) 90 if (m_Running == false)
91 { 91 {
92 // Script is inactive, do not execute! 92 // Script is inactive, do not execute!
93 return; 93 return;
94 } 94 }
95 DoExecuteEvent(FunctionName, args); 95 DoExecuteEvent(FunctionName, args);
96 } 96 }
97 protected abstract void DoExecuteEvent(string FunctionName, object[] args); 97 protected abstract void DoExecuteEvent(string FunctionName, object[] args);
98 98
99 /// <summary> 99 /// <summary>
100 /// Stop script from running. Event execution will be ignored. 100 /// Stop script from running. Event execution will be ignored.
101 /// </summary> 101 /// </summary>
102 public void StopScript() 102 public void StopScript()
103 { 103 {
104 m_Running = false; 104 m_Running = false;
105 } 105 }
106 106
107 } 107 }
108} 108}
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs
index 1f66b14..46c5db4 100644
--- a/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs
+++ b/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs
@@ -1,10 +1,10 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4 4
5namespace OpenSim.Region.ScriptEngine.Common.TRPC 5namespace OpenSim.Region.ScriptEngine.Common.TRPC
6{ 6{
7 class MyBase 7 class MyBase
8 { 8 {
9 } 9 }
10} 10}
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs
index e87bec8..27a1551 100644
--- a/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs
+++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSOScript.cs
@@ -1,22 +1,22 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.IO; 3using System.IO;
4using System.Text; 4using System.Text;
5using OpenSim.Region.ScriptEngine.LSOEngine.LSO; 5using OpenSim.Region.ScriptEngine.LSOEngine.LSO;
6 6
7namespace OpenSim.Region.ScriptEngine.LSOEngine 7namespace OpenSim.Region.ScriptEngine.LSOEngine
8{ 8{
9 /// <summary> 9 /// <summary>
10 /// This class encapsulated an LSO file and contains execution-specific data 10 /// This class encapsulated an LSO file and contains execution-specific data
11 /// </summary> 11 /// </summary>
12 public class LSOScript 12 public class LSOScript
13 { 13 {
14 private byte[] LSOCode = new byte[1024 * 16]; // Contains the LSO-file 14 private byte[] LSOCode = new byte[1024 * 16]; // Contains the LSO-file
15 //private System.IO.MemoryStream LSOCode = new MemoryStream(1024 * 16); 15 //private System.IO.MemoryStream LSOCode = new MemoryStream(1024 * 16);
16 16
17 public void Execute(LSO_Enums.Event_Mask_Values Event, params object[] param) 17 public void Execute(LSO_Enums.Event_Mask_Values Event, params object[] param)
18 { 18 {
19 19
20 } 20 }
21 } 21 }
22} 22}