IOSSL_Api.cs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 OpenSim 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.Collections;
  28. using OpenSim.Region.ScriptEngine.Interfaces;
  29. using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
  30. using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
  31. using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
  32. namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
  33. {
  34. public enum ThreatLevel
  35. {
  36. None = 0,
  37. Nuisance = 1,
  38. VeryLow = 2,
  39. Low = 3,
  40. Moderate = 4,
  41. High = 5,
  42. VeryHigh = 6,
  43. Severe = 7
  44. };
  45. public interface IOSSL_Api
  46. {
  47. void CheckThreatLevel(ThreatLevel level, string function);
  48. //OpenSim functions
  49. string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer);
  50. string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
  51. int timer, int alpha);
  52. string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer);
  53. string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
  54. int timer, int alpha);
  55. double osTerrainGetHeight(int x, int y);
  56. int osTerrainSetHeight(int x, int y, double val);
  57. int osRegionRestart(double seconds);
  58. void osRegionNotice(string msg);
  59. bool osConsoleCommand(string Command);
  60. void osSetParcelMediaURL(string url);
  61. void osSetPrimFloatOnWater(int floatYN);
  62. // Teleport commands
  63. void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  64. void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  65. // Animation commands
  66. void osAvatarPlayAnimation(string avatar, string animation);
  67. void osAvatarStopAnimation(string avatar, string animation);
  68. //texture draw functions
  69. string osMovePen(string drawList, int x, int y);
  70. string osDrawLine(string drawList, int startX, int startY, int endX, int endY);
  71. string osDrawLine(string drawList, int endX, int endY);
  72. string osDrawText(string drawList, string text);
  73. string osDrawEllipse(string drawList, int width, int height);
  74. string osDrawRectangle(string drawList, int width, int height);
  75. string osDrawFilledRectangle(string drawList, int width, int height);
  76. string osSetFontSize(string drawList, int fontSize);
  77. string osSetPenSize(string drawList, int penSize);
  78. string osSetPenColour(string drawList, string colour);
  79. string osDrawImage(string drawList, int width, int height, string imageUrl);
  80. void osSetStateEvents(int events);
  81. double osList2Double(LSL_Types.list src, int index);
  82. void osSetRegionWaterHeight(double height);
  83. string osGetScriptEngineName();
  84. string osGetSimulatorVersion();
  85. void osSetParcelMediaTime(double time);
  86. Hashtable osParseJSON(string JSON);
  87. void osMessageObject(key objectUUID,string message);
  88. void osMakeNotecard(string notecardName, LSL_Types.list contents);
  89. }
  90. }