diff options
author | teravus | 2012-11-15 09:46:41 -0500 |
---|---|---|
committer | teravus | 2012-11-15 09:46:41 -0500 |
commit | dfac269032300872c4d0dc507f4f9062d102b0f4 (patch) | |
tree | d60fca83f54417c349c33b46de6ac65748ff762f /OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |
parent | * Fixes mesh loading issues in last commit. (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.zip opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.tar.gz opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.tar.bz2 opensim-SC-dfac269032300872c4d0dc507f4f9062d102b0f4.tar.xz |
Merge master into teravuswork
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 139 |
1 files changed, 138 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 8c34ed3..c447d1f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -40,16 +40,75 @@ using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | |||
40 | 40 | ||
41 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | 41 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces |
42 | { | 42 | { |
43 | /// <summary> | ||
44 | /// To permit region owners to enable the extended scripting functionality | ||
45 | /// of OSSL, without allowing malicious scripts to access potentially | ||
46 | /// troublesome functions, each OSSL function is assigned a threat level, | ||
47 | /// and access to the functions is granted or denied based on a default | ||
48 | /// threshold set in OpenSim.ini (which can be overridden for individual | ||
49 | /// functions on a case-by-case basis) | ||
50 | /// </summary> | ||
43 | public enum ThreatLevel | 51 | public enum ThreatLevel |
44 | { | 52 | { |
53 | // Not documented, presumably means permanently disabled ? | ||
45 | NoAccess = -1, | 54 | NoAccess = -1, |
55 | |||
56 | /// <summary> | ||
57 | /// Function is no threat at all. It doesn't constitute a threat to | ||
58 | /// either users or the system and has no known side effects. | ||
59 | /// </summary> | ||
46 | None = 0, | 60 | None = 0, |
61 | |||
62 | /// <summary> | ||
63 | /// Abuse of this command can cause a nuisance to the region operator, | ||
64 | /// such as log message spew. | ||
65 | /// </summary> | ||
47 | Nuisance = 1, | 66 | Nuisance = 1, |
67 | |||
68 | /// <summary> | ||
69 | /// Extreme levels of abuse of this function can cause impaired | ||
70 | /// functioning of the region, or very gullible users can be tricked | ||
71 | /// into experiencing harmless effects. | ||
72 | /// </summary> | ||
48 | VeryLow = 2, | 73 | VeryLow = 2, |
74 | |||
75 | /// <summary> | ||
76 | /// Intentional abuse can cause crashes or malfunction under certain | ||
77 | /// circumstances, which can be easily rectified; or certain users can | ||
78 | /// be tricked into certain situations in an avoidable manner. | ||
79 | /// </summary> | ||
49 | Low = 3, | 80 | Low = 3, |
81 | |||
82 | /// <summary> | ||
83 | /// Intentional abuse can cause denial of service and crashes with | ||
84 | /// potential of data or state loss; or trusting users can be tricked | ||
85 | /// into embarrassing or uncomfortable situations. | ||
86 | /// </summary> | ||
50 | Moderate = 4, | 87 | Moderate = 4, |
88 | |||
89 | /// <summary> | ||
90 | /// Casual abuse can cause impaired functionality or temporary denial | ||
91 | /// of service conditions. Intentional abuse can easily cause crashes | ||
92 | /// with potential data loss, or can be used to trick experienced and | ||
93 | /// cautious users into unwanted situations, or changes global data | ||
94 | /// permanently and without undo ability. | ||
95 | /// </summary> | ||
51 | High = 5, | 96 | High = 5, |
97 | |||
98 | /// <summary> | ||
99 | /// Even normal use may, depending on the number of instances, or | ||
100 | /// frequency of use, result in severe service impairment or crash | ||
101 | /// with loss of data, or can be used to cause unwanted or harmful | ||
102 | /// effects on users without giving the user a means to avoid it. | ||
103 | /// </summary> | ||
52 | VeryHigh = 6, | 104 | VeryHigh = 6, |
105 | |||
106 | /// <summary> | ||
107 | /// Even casual use is a danger to region stability, or function allows | ||
108 | /// console or OS command execution, or function allows taking money | ||
109 | /// without consent, or allows deletion or modification of user data, | ||
110 | /// or allows the compromise of sensitive data by design. | ||
111 | /// </summary> | ||
53 | Severe = 7 | 112 | Severe = 7 |
54 | }; | 113 | }; |
55 | 114 | ||
@@ -98,7 +157,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
98 | void osAvatarPlayAnimation(string avatar, string animation); | 157 | void osAvatarPlayAnimation(string avatar, string animation); |
99 | void osAvatarStopAnimation(string avatar, string animation); | 158 | void osAvatarStopAnimation(string avatar, string animation); |
100 | 159 | ||
101 | // Attachment commands | 160 | #region Attachment commands |
102 | 161 | ||
103 | /// <summary> | 162 | /// <summary> |
104 | /// Attach the object containing this script to the avatar that owns it without asking for PERMISSION_ATTACH | 163 | /// Attach the object containing this script to the avatar that owns it without asking for PERMISSION_ATTACH |
@@ -133,6 +192,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
133 | /// <remarks>Nothing happens if the object is not attached.</remarks> | 192 | /// <remarks>Nothing happens if the object is not attached.</remarks> |
134 | void osForceDetachFromAvatar(); | 193 | void osForceDetachFromAvatar(); |
135 | 194 | ||
195 | /// <summary> | ||
196 | /// Returns a strided list of the specified attachment points and the number of attachments on those points. | ||
197 | /// </summary> | ||
198 | /// <param name="avatar">avatar UUID</param> | ||
199 | /// <param name="attachmentPoints">list of ATTACH_* constants</param> | ||
200 | /// <returns></returns> | ||
201 | LSL_List osGetNumberOfAttachments(LSL_Key avatar, LSL_List attachmentPoints); | ||
202 | |||
203 | /// <summary> | ||
204 | /// Sends a specified message to the specified avatar's attachments on | ||
205 | /// the specified attachment points. | ||
206 | /// </summary> | ||
207 | /// <remarks> | ||
208 | /// Behaves as osMessageObject(), without the sending script needing to know the attachment keys in advance. | ||
209 | /// </remarks> | ||
210 | /// <param name="avatar">avatar UUID</param> | ||
211 | /// <param name="message">message string</param> | ||
212 | /// <param name="attachmentPoints">list of ATTACH_* constants, or -1 for all attachments. If -1 is specified and OS_ATTACH_MSG_INVERT_POINTS is present in flags, no action is taken.</param> | ||
213 | /// <param name="flags">flags further constraining the attachments to deliver the message to.</param> | ||
214 | void osMessageAttachments(LSL_Key avatar, string message, LSL_List attachmentPoints, int flags); | ||
215 | |||
216 | #endregion | ||
217 | |||
136 | //texture draw functions | 218 | //texture draw functions |
137 | string osMovePen(string drawList, int x, int y); | 219 | string osMovePen(string drawList, int x, int y); |
138 | string osDrawLine(string drawList, int startX, int startY, int endX, int endY); | 220 | string osDrawLine(string drawList, int startX, int startY, int endX, int endY); |
@@ -258,6 +340,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
258 | int osGetSimulatorMemory(); | 340 | int osGetSimulatorMemory(); |
259 | void osKickAvatar(string FirstName,string SurName,string alert); | 341 | void osKickAvatar(string FirstName,string SurName,string alert); |
260 | void osSetSpeed(string UUID, LSL_Float SpeedModifier); | 342 | void osSetSpeed(string UUID, LSL_Float SpeedModifier); |
343 | LSL_Float osGetHealth(string avatar); | ||
261 | void osCauseHealing(string avatar, double healing); | 344 | void osCauseHealing(string avatar, double healing); |
262 | void osCauseDamage(string avatar, double damage); | 345 | void osCauseDamage(string avatar, double damage); |
263 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); | 346 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); |
@@ -305,5 +388,59 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
305 | /// </summary> | 388 | /// </summary> |
306 | /// <returns>Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown.</returns> | 389 | /// <returns>Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown.</returns> |
307 | LSL_Key osGetRezzingObject(); | 390 | LSL_Key osGetRezzingObject(); |
391 | |||
392 | /// <summary> | ||
393 | /// Sets the response type for an HTTP request/response | ||
394 | /// </summary> | ||
395 | /// <returns></returns> | ||
396 | void osSetContentType(LSL_Key id, string type); | ||
397 | |||
398 | /// <summary> | ||
399 | /// Attempts to drop an attachment to the ground | ||
400 | /// </summary> | ||
401 | void osDropAttachment(); | ||
402 | |||
403 | /// <summary> | ||
404 | /// Attempts to drop an attachment to the ground while bypassing the script permissions | ||
405 | /// </summary> | ||
406 | void osForceDropAttachment(); | ||
407 | |||
408 | /// <summary> | ||
409 | /// Attempts to drop an attachment at the specified coordinates. | ||
410 | /// </summary> | ||
411 | /// <param name="pos"></param> | ||
412 | /// <param name="rot"></param> | ||
413 | void osDropAttachmentAt(vector pos, rotation rot); | ||
414 | |||
415 | /// <summary> | ||
416 | /// Attempts to drop an attachment at the specified coordinates while bypassing the script permissions | ||
417 | /// </summary> | ||
418 | /// <param name="pos"></param> | ||
419 | /// <param name="rot"></param> | ||
420 | void osForceDropAttachmentAt(vector pos, rotation rot); | ||
421 | |||
422 | /// <summary> | ||
423 | /// Identical to llListen except for a bitfield which indicates which | ||
424 | /// string parameters should be parsed as regex patterns. | ||
425 | /// </summary> | ||
426 | /// <param name="channelID"></param> | ||
427 | /// <param name="name"></param> | ||
428 | /// <param name="ID"></param> | ||
429 | /// <param name="msg"></param> | ||
430 | /// <param name="regexBitfield"> | ||
431 | /// OS_LISTEN_REGEX_NAME | ||
432 | /// OS_LISTEN_REGEX_MESSAGE | ||
433 | /// </param> | ||
434 | /// <returns></returns> | ||
435 | LSL_Integer osListenRegex(int channelID, string name, string ID, | ||
436 | string msg, int regexBitfield); | ||
437 | |||
438 | /// <summary> | ||
439 | /// Wraps to bool Regex.IsMatch(string input, string pattern) | ||
440 | /// </summary> | ||
441 | /// <param name="input">string to test for match</param> | ||
442 | /// <param name="regex">string to use as pattern</param> | ||
443 | /// <returns>boolean</returns> | ||
444 | LSL_Integer osRegexIsMatch(string input, string pattern); | ||
308 | } | 445 | } |
309 | } | 446 | } |