IOSSL_Api.cs 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. 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. using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
  35. using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
  36. namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
  37. {
  38. public enum ThreatLevel
  39. {
  40. None = 0,
  41. Nuisance = 1,
  42. VeryLow = 2,
  43. Low = 3,
  44. Moderate = 4,
  45. High = 5,
  46. VeryHigh = 6,
  47. Severe = 7
  48. };
  49. public interface IOSSL_Api
  50. {
  51. void CheckThreatLevel(ThreatLevel level, string function);
  52. //OpenSim functions
  53. string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer);
  54. string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
  55. int timer, int alpha);
  56. string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
  57. bool blend, int disp, int timer, int alpha, int face);
  58. string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer);
  59. string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
  60. int timer, int alpha);
  61. string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
  62. bool blend, int disp, int timer, int alpha, int face);
  63. LSL_Float osTerrainGetHeight(int x, int y);
  64. LSL_Integer osTerrainSetHeight(int x, int y, double val);
  65. void osTerrainFlush();
  66. int osRegionRestart(double seconds);
  67. void osRegionNotice(string msg);
  68. bool osConsoleCommand(string Command);
  69. void osSetParcelMediaURL(string url);
  70. void osSetPrimFloatOnWater(int floatYN);
  71. // Avatar Info Commands
  72. string osGetAgentIP(string agent);
  73. LSL_List osGetAgents();
  74. // Teleport commands
  75. void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  76. void osTeleportAgent(string agent, uint regionX, uint regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  77. void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
  78. // Animation commands
  79. void osAvatarPlayAnimation(string avatar, string animation);
  80. void osAvatarStopAnimation(string avatar, string animation);
  81. //texture draw functions
  82. string osMovePen(string drawList, int x, int y);
  83. string osDrawLine(string drawList, int startX, int startY, int endX, int endY);
  84. string osDrawLine(string drawList, int endX, int endY);
  85. string osDrawText(string drawList, string text);
  86. string osDrawEllipse(string drawList, int width, int height);
  87. string osDrawRectangle(string drawList, int width, int height);
  88. string osDrawFilledRectangle(string drawList, int width, int height);
  89. string osSetFontSize(string drawList, int fontSize);
  90. string osSetPenSize(string drawList, int penSize);
  91. string osSetPenColour(string drawList, string colour);
  92. string osDrawImage(string drawList, int width, int height, string imageUrl);
  93. vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize);
  94. void osSetStateEvents(int events);
  95. double osList2Double(LSL_Types.list src, int index);
  96. void osSetRegionWaterHeight(double height);
  97. void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour);
  98. void osSetEstateSunSettings(bool sunFixed, double sunHour);
  99. double osGetCurrentSunHour();
  100. double osSunGetParam(string param);
  101. void osSunSetParam(string param, double value);
  102. // Wind Module Functions
  103. string osWindActiveModelPluginName();
  104. void osWindParamSet(string plugin, string param, float value);
  105. float osWindParamGet(string plugin, string param);
  106. string osGetScriptEngineName();
  107. string osGetSimulatorVersion();
  108. Hashtable osParseJSON(string JSON);
  109. void osMessageObject(key objectUUID,string message);
  110. void osMakeNotecard(string notecardName, LSL_Types.list contents);
  111. string osGetNotecardLine(string name, int line);
  112. string osGetNotecard(string name);
  113. int osGetNumberOfNotecardLines(string name);
  114. string osAvatarName2Key(string firstname, string lastname);
  115. string osKey2Name(string id);
  116. // Grid Info Functions
  117. string osGetGridNick();
  118. string osGetGridName();
  119. string osGetGridLoginURI();
  120. LSL_String osFormatString(string str, LSL_List strings);
  121. LSL_List osMatchString(string src, string pattern, int start);
  122. // Information about data loaded into the region
  123. string osLoadedCreationDate();
  124. string osLoadedCreationTime();
  125. string osLoadedCreationID();
  126. LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules);
  127. }
  128. }