From 58ce018625384cf21f336584c5bedbf712d7315e Mon Sep 17 00:00:00 2001
From: MW
Date: Wed, 9 Jul 2008 12:02:01 +0000
Subject: for testing purposes only: added void osSetParcelMediaTime(double
 time) command to script engines. which sets the position of the media that is
 playing. Time is in seconds. Doesn't do any security checking (should be
 checking that the object/script is owned by the parcel owner). So could be
 abused, if it is then we should remove it, or add the security. Only tested
 in dotnet scripting engine, but should work in XEngine too.

---
 OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 7 +++++++
 OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs     | 1 +
 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs       | 7 +++++++
 3 files changed, 15 insertions(+)

(limited to 'OpenSim/Region/ScriptEngine/Shared/Api')

diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 3e1c930..b7ff9b6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -581,5 +581,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
                 return String.Empty;
             }
         }
+
+
+        //for testing purposes only
+        public void osSetParcelMediaTime(double time)
+        {
+            World.ParcelMediaSetTime((float)time);
+        }
     }
 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index d55491c..87b3ef4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -66,5 +66,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
         void osSetRegionWaterHeight(double height);
 
         string osGetScriptEngineName();
+        void osSetParcelMediaTime(double time);
     }
 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 90c4419..9d0c337 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -200,5 +200,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
         {
             return m_OSSL_Functions.osGetScriptEngineName();
         }
+
+
+        //for testing purposes only
+        public void osSetParcelMediaTime(double time)
+        {
+            m_OSSL_Functions.osSetParcelMediaTime(time);
+        }
     }
 }
-- 
cgit v1.1