IOSSL_Api.cs 5.5 KB

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