aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces
diff options
context:
space:
mode:
authorAdam Frisby2009-04-11 10:21:04 +0000
committerAdam Frisby2009-04-11 10:21:04 +0000
commitb8619386eb31a2bf3f460e464d0237f6bee5f56f (patch)
treee9a1f1559e04e3f3597aa8ed6ef37c6a63254ca2 /OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces
parentCorrect Opensim.ini.example to reflect the default settings for clouds. (diff)
downloadopensim-SC_OLD-b8619386eb31a2bf3f460e464d0237f6bee5f56f.zip
opensim-SC_OLD-b8619386eb31a2bf3f460e464d0237f6bee5f56f.tar.gz
opensim-SC_OLD-b8619386eb31a2bf3f460e464d0237f6bee5f56f.tar.bz2
opensim-SC_OLD-b8619386eb31a2bf3f460e464d0237f6bee5f56f.tar.xz
* Minor MRM Cleanup
* Interfaces now live in Interfaces subdirectory. * Namespace does not yet reflect this change. * Final namespace for MRMs will probably sit somewhere around OpenSim.Extend.MRM[?]
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatar.cs39
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IEntity.cs14
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IGraphics.cs12
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IHeightmap.cs69
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IHost.cs41
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs223
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObjectAccessor.cs39
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IParcel.cs42
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IPersistence.cs56
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IScheduler.cs43
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/ISocialEntity.cs41
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs57
12 files changed, 676 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatar.cs
new file mode 100644
index 0000000..92ef490
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatar.cs
@@ -0,0 +1,39 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenMetaverse;
32
33namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
34{
35 public interface IAvatar : IEntity
36 {
37
38 }
39}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IEntity.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IEntity.cs
new file mode 100644
index 0000000..94c53e3
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IEntity.cs
@@ -0,0 +1,14 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenMetaverse;
5
6namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
7{
8 public interface IEntity
9 {
10 string Name { get; set; }
11 UUID GlobalID { get; }
12 Vector3 WorldPosition { get; set; }
13 }
14}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IGraphics.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IGraphics.cs
new file mode 100644
index 0000000..f4bc12e
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IGraphics.cs
@@ -0,0 +1,12 @@
1using System.Drawing;
2using OpenMetaverse;
3
4namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
5{
6 public interface IGraphics
7 {
8 UUID SaveBitmap(Bitmap data);
9 UUID SaveBitmap(Bitmap data, bool lossless, bool temporary);
10 Bitmap LoadBitmap(UUID assetID);
11 }
12}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IHeightmap.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IHeightmap.cs
new file mode 100644
index 0000000..eea1baf
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IHeightmap.cs
@@ -0,0 +1,69 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
33{
34 public interface IHeightmap
35 {
36 /// <summary>
37 /// Returns [or sets] the heightmap value at specified coordinates.
38 /// </summary>
39 /// <param name="x">X Coordinate</param>
40 /// <param name="y">Y Coordinate</param>
41 /// <returns>A value in meters representing height. Can be negative. Value correlates with Z parameter in world coordinates</returns>
42 /// <example>
43 /// double heightVal = World.Heightmap[128,128];
44 /// World.Heightmap[128,128] *= 5.0;
45 /// World.Heightmap[128,128] = 25;
46 /// </example>
47 double this[int x, int y]
48 {
49 get;
50 set;
51 }
52
53 /// <summary>
54 /// The maximum length of the region (Y axis), exclusive. (eg Height = 256, max Y = 255). Minimum is always 0 inclusive.
55 /// </summary>
56 /// <example>
57 /// Host.Console.Info("The terrain length of this region is " + World.Heightmap.Length);
58 /// </example>
59 int Length { get; }
60
61 /// <summary>
62 /// The maximum width of the region (X axis), exclusive. (eg Width = 256, max X = 255). Minimum is always 0 inclusive.
63 /// </summary>
64 /// <example>
65 /// Host.Console.Info("The terrain width of this region is " + World.Heightmap.Width);
66 /// </example>
67 int Width { get; }
68 }
69}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IHost.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IHost.cs
new file mode 100644
index 0000000..8980b8f
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IHost.cs
@@ -0,0 +1,41 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31using log4net;
32
33namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
34{
35 public interface IHost
36 {
37 IObject Object { get; }
38 ILog Console { get; }
39 IGraphics Graphics { get; }
40 }
41}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
new file mode 100644
index 0000000..e17b716
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs
@@ -0,0 +1,223 @@
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
28using System;
29using System.Drawing;
30using OpenMetaverse;
31using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object;
32
33namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
34{
35 public class TouchEventArgs : EventArgs
36 {
37 public IAvatar Avatar;
38
39 public Vector3 TouchBiNormal;
40 public Vector3 TouchNormal;
41 public Vector3 TouchPosition;
42
43 public Vector2 TouchUV;
44 public Vector2 TouchST;
45
46 public int TouchMaterialIndex;
47 }
48
49 public delegate void OnTouchDelegate(IObject sender, TouchEventArgs e);
50
51 public interface IObject : IEntity
52 {
53 #region Events
54
55 event OnTouchDelegate OnTouch;
56
57 #endregion
58
59 /// <summary>
60 /// Returns whether or not this object is still in the world.
61 /// Eg, if you store an IObject reference, however the object
62 /// is deleted before you use it, it will throw a NullReference
63 /// exception. 'Exists' allows you to check the object is still
64 /// in play before utilizing it.
65 /// </summary>
66 /// <example>
67 /// IObject deleteMe = World.Objects[0];
68 ///
69 /// if (deleteMe.Exists) {
70 /// deleteMe.Say("Hello, I still exist!");
71 /// }
72 ///
73 /// World.Objects.Remove(deleteMe);
74 ///
75 /// if (!deleteMe.Exists) {
76 /// Host.Console.Info("I was deleted");
77 /// }
78 /// </example>
79 /// <remarks>
80 /// Objects should be near-guarunteed to exist for any event which
81 /// passes them as an argument. Storing an object for a longer period
82 /// of time however will limit their reliability.
83 ///
84 /// It is a good practice to use Try/Catch blocks handling for
85 /// NullReferenceException, when accessing remote objects.
86 /// </remarks>
87 bool Exists { get; }
88
89 /// <summary>
90 /// The local region-unique ID for this object.
91 /// </summary>
92 uint LocalID { get; }
93
94 /// <summary>
95 /// The description assigned to this object.
96 /// </summary>
97 String Description { get; set; }
98
99 /// <summary>
100 /// Returns the root object of a linkset. If this object is the root, it will return itself.
101 /// </summary>
102 IObject Root { get; }
103
104 /// <summary>
105 /// Returns a collection of objects which are linked to the current object. Does not include the root object.
106 /// </summary>
107 IObject[] Children { get; }
108
109 /// <summary>
110 /// Returns a list of materials attached to this object. Each may contain unique texture
111 /// and other visual information. For primitive based objects, this correlates with
112 /// Object Faces. For mesh based objects, this correlates with Materials.
113 /// </summary>
114 IObjectMaterial[] Materials { get; }
115
116 /// <summary>
117 /// The bounding box of the object. Primitive and Mesh objects alike are scaled to fit within these bounds.
118 /// </summary>
119 Vector3 Scale { get; set; }
120
121 /// <summary>
122 /// The rotation of the object relative to the Scene
123 /// </summary>
124 Quaternion WorldRotation { get; set; }
125
126 /// <summary>
127 /// The rotation of the object relative to a parent object
128 /// If root, works the same as WorldRotation
129 /// </summary>
130 Quaternion OffsetRotation { get; set; }
131
132 /// <summary>
133 /// The position of the object relative to a parent object
134 /// If root, works the same as WorldPosition
135 /// </summary>
136 Vector3 OffsetPosition { get; set; }
137
138 Vector3 SitTarget { get; set; }
139 String SitTargetText { get; set; }
140
141 String TouchText { get; set; }
142
143 /// <summary>
144 /// Text to be associated with this object, in the
145 /// Second Life(r) viewer, this is shown above the
146 /// object.
147 /// </summary>
148 String Text { get; set; }
149
150 bool IsRotationLockedX { get; set; } // SetStatus(!ROTATE_X)
151 bool IsRotationLockedY { get; set; } // SetStatus(!ROTATE_Y)
152 bool IsRotationLockedZ { get; set; } // SetStatus(!ROTATE_Z)
153 bool IsSandboxed { get; set; } // SetStatus(SANDBOX)
154 bool IsImmotile { get; set; } // SetStatus(BLOCK_GRAB)
155 bool IsAlwaysReturned { get; set; } // SetStatus(!DIE_AT_EDGE)
156 bool IsTemporary { get; set; } // TEMP_ON_REZ
157
158 bool IsFlexible { get; set; }
159
160 PrimType PrimShape { get; set; }
161 // TODO:
162 // PrimHole
163 // Repeats, Offsets, Cut/Dimple/ProfileCut
164 // Hollow, Twist, HoleSize,
165 // Taper[A+B], Shear[A+B], Revolutions,
166 // RadiusOffset, Skew
167
168 PhysicsMaterial PhysicsMaterial { get; set; }
169
170 IObjectPhysics Physics { get; }
171
172
173 /// <summary>
174 /// Causes the object to speak to its surroundings,
175 /// equivilent to LSL/OSSL llSay
176 /// </summary>
177 /// <param name="msg">The message to send to the user</param>
178 void Say(string msg);
179
180 }
181
182 public enum PhysicsMaterial
183 {
184 Default,
185 Glass,
186 Metal,
187 Plastic,
188 Wood,
189 Rubber,
190 Stone,
191 Flesh
192 }
193
194 public enum PrimType
195 {
196 NotPrimitive = 255,
197 Box = 0,
198 Cylinder = 1,
199 Prism = 2,
200 Sphere = 3,
201 Torus = 4,
202 Tube = 5,
203 Ring = 6,
204 Sculpt = 7
205 }
206
207 public enum TextureMapping
208 {
209 Default,
210 Planar
211 }
212
213 public interface IObjectMaterial
214 {
215 Color Color { get; set; }
216 UUID Texture { get; set; }
217 TextureMapping Mapping { get; set; } // SetPrimParms(PRIM_TEXGEN)
218 bool Bright { get; set; } // SetPrimParms(FULLBRIGHT)
219 double Bloom { get; set; } // SetPrimParms(GLOW)
220 bool Shiny { get; set; } // SetPrimParms(SHINY)
221 bool BumpMap { get; set; } // SetPrimParms(BUMPMAP) [DEPRECIATE IN FAVOUR OF UUID?]
222 }
223}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObjectAccessor.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObjectAccessor.cs
new file mode 100644
index 0000000..cd27a6a
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObjectAccessor.cs
@@ -0,0 +1,39 @@
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
28using System.Collections.Generic;
29using OpenMetaverse;
30
31namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
32{
33 public interface IObjectAccessor : ICollection<IObject>
34 {
35 IObject this[int index] { get; }
36 IObject this[uint index] { get; }
37 IObject this[UUID index] { get; }
38 }
39} \ No newline at end of file
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IParcel.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IParcel.cs
new file mode 100644
index 0000000..3b229a7
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IParcel.cs
@@ -0,0 +1,42 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenMetaverse;
32
33namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
34{
35 public interface IParcel
36 {
37 string Name { get; set; }
38 string Description { get; set; }
39 ISocialEntity Owner { get; set; }
40 bool[,] Bitmap { get; }
41 }
42}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IPersistence.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IPersistence.cs
new file mode 100644
index 0000000..bde51fe
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IPersistence.cs
@@ -0,0 +1,56 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
33{
34 interface IPersistence
35 {
36 T Get<T>(Guid storageID);
37 T Get<T>();
38
39 /// <summary>
40 /// Stores 'data' into the persistence system
41 /// associated with this object, however saved
42 /// under the ID 'storageID'. This data may
43 /// be accessed by other scripts however.
44 /// </summary>
45 /// <param name="storageID"></param>
46 /// <param name="data"></param>
47 void Put<T>(Guid storageID, T data);
48
49 /// <summary>
50 /// Stores 'data' into the persistence system
51 /// using the default ID for this script.
52 /// </summary>
53 /// <param name="data"></param>
54 void Put<T>(T data);
55 }
56}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IScheduler.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IScheduler.cs
new file mode 100644
index 0000000..cf45de7
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IScheduler.cs
@@ -0,0 +1,43 @@
1using System;
2
3namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
4{
5 interface IScheduler
6 {
7 /// <summary>
8 /// Schedule an event callback to occur
9 /// when 'time' is elapsed.
10 /// </summary>
11 /// <param name="time">The period to wait before executing</param>
12 void RunIn(TimeSpan time);
13
14 /// <summary>
15 /// Schedule an event callback to fire
16 /// every "time". Equivilent to a repeating
17 /// timer.
18 /// </summary>
19 /// <param name="time">The period to wait between executions</param>
20 void RunAndRepeat(TimeSpan time);
21
22 /// <summary>
23 /// Fire this scheduler only when the region has
24 /// a user in it.
25 /// </summary>
26 bool WhenRegionOccupied { get; set; }
27
28 /// <summary>
29 /// Fire this event only when the region is visible
30 /// to a child agent, or there is a full agent
31 /// in this region.
32 /// </summary>
33 bool WhenRegionVisible { get; set; }
34
35 /// <summary>
36 /// Determines whether this runs in the master scheduler thread, or a new thread
37 /// is spawned to handle your request. Running in scheduler may mean that your
38 /// code does not execute perfectly on time, however will result in a lower
39 /// processor cost to running your code.
40 /// </summary>
41 bool Schedule { get; set; }
42 }
43}
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/ISocialEntity.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/ISocialEntity.cs
new file mode 100644
index 0000000..cbac123
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/ISocialEntity.cs
@@ -0,0 +1,41 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenMetaverse;
32
33namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
34{
35 public interface ISocialEntity
36 {
37 UUID GlobalID { get; }
38 string Name { get; }
39 bool IsUser { get; }
40 }
41} \ No newline at end of file
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs
new file mode 100644
index 0000000..9196acd
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IWorld.cs
@@ -0,0 +1,57 @@
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
28using System;
29
30namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
31{
32 public class NewUserEventArgs : EventArgs
33 {
34 public IAvatar Avatar;
35 }
36
37 public delegate void OnNewUserDelegate(IWorld sender, NewUserEventArgs e);
38
39 public class ChatEventArgs : EventArgs
40 {
41 public string Text;
42 public IEntity Sender;
43 }
44
45 public delegate void OnChatDelegate(IWorld sender, ChatEventArgs e);
46
47 public interface IWorld
48 {
49 IObjectAccessor Objects { get; }
50 IAvatar[] Avatars { get; }
51 IParcel[] Parcels { get; }
52 IHeightmap Terrain { get; }
53
54 event OnChatDelegate OnChat;
55 event OnNewUserDelegate OnNewUser;
56 }
57}