diff options
Diffstat (limited to 'OpenSim/Region/Framework/Interfaces')
11 files changed, 452 insertions, 48 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index 788f42b..d1b7dc1 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | |||
@@ -37,6 +37,27 @@ namespace OpenSim.Region.Framework.Interfaces | |||
37 | public interface IAttachmentsModule | 37 | public interface IAttachmentsModule |
38 | { | 38 | { |
39 | /// <summary> | 39 | /// <summary> |
40 | /// RezAttachments. This should only be called upon login on the first region. | ||
41 | /// Attachment rezzings on crossings and TPs are done in a different way. | ||
42 | /// </summary> | ||
43 | void RezAttachments(IScenePresence sp); | ||
44 | |||
45 | /// <summary> | ||
46 | /// Save the attachments that have change on this presence. | ||
47 | /// </summary> | ||
48 | /// <param name="sp"></param> | ||
49 | void SaveChangedAttachments(IScenePresence sp); | ||
50 | |||
51 | /// <summary> | ||
52 | /// Delete all the presence's attachments from the scene | ||
53 | /// </summary> | ||
54 | /// <param name="sp"> | ||
55 | /// This is done when a root agent leaves/is demoted to child (for instance, on logout, teleport or region cross). | ||
56 | /// </param> | ||
57 | /// <param name="silent"></param> | ||
58 | void DeleteAttachmentsFromScene(IScenePresence sp, bool silent); | ||
59 | |||
60 | /// <summary> | ||
40 | /// Attach an object to an avatar from the world. | 61 | /// Attach an object to an avatar from the world. |
41 | /// </summary> | 62 | /// </summary> |
42 | /// <param name="controllingClient"></param> | 63 | /// <param name="controllingClient"></param> |
@@ -48,13 +69,11 @@ namespace OpenSim.Region.Framework.Interfaces | |||
48 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent); | 69 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent); |
49 | 70 | ||
50 | /// <summary> | 71 | /// <summary> |
51 | /// Attach an object to an avatar. | 72 | /// Attach an object to an avatar |
52 | /// </summary> | 73 | /// </summary> |
53 | /// <param name="controllingClient"></param> | 74 | /// <param name="remoteClient"></param> |
54 | /// <param name="localID"></param> | 75 | /// <param name="grp"></param> |
55 | /// <param name="attachPoint"></param> | 76 | /// <param name="AttachmentPt"></param> |
56 | /// <param name="rot"></param> | ||
57 | /// <param name="attachPos"></param> | ||
58 | /// <param name="silent"></param> | 77 | /// <param name="silent"></param> |
59 | /// <returns>true if the object was successfully attached, false otherwise</returns> | 78 | /// <returns>true if the object was successfully attached, false otherwise</returns> |
60 | bool AttachObject( | 79 | bool AttachObject( |
@@ -67,24 +86,19 @@ namespace OpenSim.Region.Framework.Interfaces | |||
67 | /// <param name="itemID"></param> | 86 | /// <param name="itemID"></param> |
68 | /// <param name="AttachmentPt"></param> | 87 | /// <param name="AttachmentPt"></param> |
69 | /// <returns>The scene object that was attached. Null if the scene object could not be found</returns> | 88 | /// <returns>The scene object that was attached. Null if the scene object could not be found</returns> |
70 | UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt); | 89 | ISceneEntity RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt); |
71 | 90 | ||
72 | /// <summary> | 91 | /// <summary> |
73 | /// Rez an attachment from user inventory | 92 | /// Rez an attachment from user inventory and change inventory status to match. |
74 | /// </summary> | 93 | /// </summary> |
75 | /// <param name="remoteClient"></param> | 94 | /// <param name="sp"></param> |
76 | /// <param name="itemID"></param> | 95 | /// <param name="itemID"></param> |
77 | /// <param name="AttachmentPt"></param> | 96 | /// <param name="AttachmentPt"></param> |
78 | /// <param name="updateinventoryStatus"> | 97 | /// <returns>The scene object that was attached. Null if the scene object could not be found</returns> |
79 | /// If true, we also update the user's inventory to show that the attachment is set. If false, we do not. | 98 | ISceneEntity RezSingleAttachmentFromInventory(ScenePresence sp, UUID itemID, uint AttachmentPt); |
80 | /// False is required so that we don't attempt to update information when a user enters a scene with the | ||
81 | /// attachment already correctly set up in inventory. | ||
82 | /// <returns>The uuid of the scene object that was attached. Null if the scene object could not be found</returns> | ||
83 | UUID RezSingleAttachmentFromInventory( | ||
84 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus); | ||
85 | 99 | ||
86 | // Same as above, but also load script states from a separate doc | 100 | // Same as above, but also load script states from a separate doc |
87 | UUID RezSingleAttachmentFromInventory( | 101 | ISceneEntity RezSingleAttachmentFromInventory( |
88 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus, XmlDocument doc); | 102 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus, XmlDocument doc); |
89 | 103 | ||
90 | /// <summary> | 104 | /// <summary> |
@@ -101,9 +115,10 @@ namespace OpenSim.Region.Framework.Interfaces | |||
101 | /// <summary> | 115 | /// <summary> |
102 | /// Detach an object from the avatar. | 116 | /// Detach an object from the avatar. |
103 | /// </summary> | 117 | /// </summary> |
104 | /// | 118 | /// <remarks> |
105 | /// This method is called in response to a client's detach request, so we only update the information in | 119 | /// This method is called in response to a client's detach request, so we only update the information in |
106 | /// inventory | 120 | /// inventory |
121 | /// </remarks> | ||
107 | /// <param name="objectLocalID"></param> | 122 | /// <param name="objectLocalID"></param> |
108 | /// <param name="remoteClient"></param> | 123 | /// <param name="remoteClient"></param> |
109 | void DetachObject(uint objectLocalID, IClientAPI remoteClient); | 124 | void DetachObject(uint objectLocalID, IClientAPI remoteClient); |
@@ -111,12 +126,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
111 | /// <summary> | 126 | /// <summary> |
112 | /// Detach the given item to the ground. | 127 | /// Detach the given item to the ground. |
113 | /// </summary> | 128 | /// </summary> |
114 | /// <param name="itemID"></param> | 129 | /// <param name="objectLocalID"></param> |
115 | /// <param name="remoteClient"></param> | 130 | /// <param name="remoteClient"></param> |
116 | void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient); | 131 | void DetachSingleAttachmentToGround(uint objectLocalID, IClientAPI remoteClient); |
117 | 132 | ||
118 | /// <summary> | 133 | /// <summary> |
119 | /// Update the user inventory to show a detach. | 134 | /// Detach the given item so that it remains in the user's inventory. |
120 | /// </summary> | 135 | /// </summary> |
121 | /// <param name="itemID"> | 136 | /// <param name="itemID"> |
122 | /// A <see cref="UUID"/> | 137 | /// A <see cref="UUID"/> |
@@ -124,23 +139,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
124 | /// <param name="remoteClient"> | 139 | /// <param name="remoteClient"> |
125 | /// A <see cref="IClientAPI"/> | 140 | /// A <see cref="IClientAPI"/> |
126 | /// </param> | 141 | /// </param> |
127 | void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient); | 142 | void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient); |
128 | 143 | ||
129 | /// <summary> | 144 | /// Update the position of an attachment. |
130 | /// Update the user inventory with a changed attachment | ||
131 | /// </summary> | 145 | /// </summary> |
132 | /// <param name="remoteClient"> | 146 | /// <param name="sog"></param> |
133 | /// A <see cref="IClientAPI"/> | 147 | /// <param name="pos"></param> |
134 | /// </param> | 148 | void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos); |
135 | /// <param name="grp"> | ||
136 | /// A <see cref="SceneObjectGroup"/> | ||
137 | /// </param> | ||
138 | /// <param name="itemID"> | ||
139 | /// A <see cref="UUID"/> | ||
140 | /// </param> | ||
141 | /// <param name="agentID"> | ||
142 | /// A <see cref="UUID"/> | ||
143 | /// </param> | ||
144 | void UpdateKnownItem(IClientAPI remoteClient, SceneObjectGroup grp, UUID itemID, UUID agentID); | ||
145 | } | 149 | } |
146 | } | 150 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs index d0e5609..4dbddf4 100644 --- a/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs +++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System.Collections.Generic; | ||
28 | using OpenMetaverse; | 29 | using OpenMetaverse; |
29 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
30 | 31 | ||
@@ -32,6 +33,30 @@ namespace OpenSim.Region.Framework.Interfaces | |||
32 | { | 33 | { |
33 | public interface IAvatarFactory | 34 | public interface IAvatarFactory |
34 | { | 35 | { |
36 | /// <summary> | ||
37 | /// Send the appearance of an avatar to others in the scene. | ||
38 | /// </summary> | ||
39 | /// <param name="agentId"></param> | ||
40 | /// <returns></returns> | ||
41 | bool SendAppearance(UUID agentId); | ||
42 | |||
43 | /// <summary> | ||
44 | /// Return the baked texture ids of the given agent. | ||
45 | /// </summary> | ||
46 | /// <param name="agentId"></param> | ||
47 | /// <returns>An empty list if this agent has no baked textures (e.g. because it's a child agent)</returns> | ||
48 | Dictionary<BakeType, Primitive.TextureEntryFace> GetBakedTextureFaces(UUID agentId); | ||
49 | |||
50 | /// <summary> | ||
51 | /// Save the baked textures for the given agent permanently in the asset database. | ||
52 | /// </summary> | ||
53 | /// <remarks> | ||
54 | /// This is used to preserve apperance textures for NPCs | ||
55 | /// </remarks> | ||
56 | /// <param name="agentId"></param> | ||
57 | /// <returns>true if a valid agent was found, false otherwise</returns> | ||
58 | bool SaveBakedTextures(UUID agentId); | ||
59 | |||
35 | bool ValidateBakedTextureCache(IClientAPI client); | 60 | bool ValidateBakedTextureCache(IClientAPI client); |
36 | void QueueAppearanceSend(UUID agentid); | 61 | void QueueAppearanceSend(UUID agentid); |
37 | void QueueAppearanceSave(UUID agentid); | 62 | void QueueAppearanceSave(UUID agentid); |
diff --git a/OpenSim/Region/Framework/Interfaces/IInventoryAccessModule.cs b/OpenSim/Region/Framework/Interfaces/IInventoryAccessModule.cs index da11e61..1904011 100644 --- a/OpenSim/Region/Framework/Interfaces/IInventoryAccessModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IInventoryAccessModule.cs | |||
@@ -54,10 +54,58 @@ namespace OpenSim.Region.Framework.Interfaces | |||
54 | /// FIXME: This is not very useful. It would be far more useful to return a list of items instead. | 54 | /// FIXME: This is not very useful. It would be far more useful to return a list of items instead. |
55 | /// </returns> | 55 | /// </returns> |
56 | UUID CopyToInventory(DeRezAction action, UUID folderID, List<SceneObjectGroup> objectGroups, IClientAPI remoteClient); | 56 | UUID CopyToInventory(DeRezAction action, UUID folderID, List<SceneObjectGroup> objectGroups, IClientAPI remoteClient); |
57 | 57 | ||
58 | SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart, | 58 | /// <summary> |
59 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, | 59 | /// Rez an object into the scene from the user's inventory |
60 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment); | 60 | /// </summary> |
61 | /// <remarks> | ||
62 | /// FIXME: It would be really nice if inventory access modules didn't also actually do the work of rezzing | ||
63 | /// things to the scene. The caller should be doing that, I think. | ||
64 | /// </remarks> | ||
65 | /// <param name="remoteClient"></param> | ||
66 | /// <param name="itemID"></param> | ||
67 | /// <param name="RayEnd"></param> | ||
68 | /// <param name="RayStart"></param> | ||
69 | /// <param name="RayTargetID"></param> | ||
70 | /// <param name="BypassRayCast"></param> | ||
71 | /// <param name="RayEndIsIntersection"></param> | ||
72 | /// <param name="RezSelected"></param> | ||
73 | /// <param name="RemoveItem"></param> | ||
74 | /// <param name="fromTaskID"></param> | ||
75 | /// <param name="attachment"></param> | ||
76 | /// <returns>The SceneObjectGroup rezzed or null if rez was unsuccessful.</returns> | ||
77 | SceneObjectGroup RezObject( | ||
78 | IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart, | ||
79 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, | ||
80 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment); | ||
81 | |||
82 | /// <summary> | ||
83 | /// Rez an object into the scene from the user's inventory | ||
84 | /// </summary> | ||
85 | /// <remarks> | ||
86 | /// FIXME: It would be really nice if inventory access modules didn't also actually do the work of rezzing | ||
87 | /// things to the scene. The caller should be doing that, I think. | ||
88 | /// </remarks> | ||
89 | /// <param name="remoteClient"></param> | ||
90 | /// <param name="item"> | ||
91 | /// The item from which the object asset came. Can be null, in which case pre and post rez item adjustment and checks are not performed. | ||
92 | /// </param> | ||
93 | /// <param name="assetID">The asset id for the object to rez.</param> | ||
94 | /// <param name="RayEnd"></param> | ||
95 | /// <param name="RayStart"></param> | ||
96 | /// <param name="RayTargetID"></param> | ||
97 | /// <param name="BypassRayCast"></param> | ||
98 | /// <param name="RayEndIsIntersection"></param> | ||
99 | /// <param name="RezSelected"></param> | ||
100 | /// <param name="RemoveItem"></param> | ||
101 | /// <param name="fromTaskID"></param> | ||
102 | /// <param name="attachment"></param> | ||
103 | /// <returns>The SceneObjectGroup rezzed or null if rez was unsuccessful.</returns> | ||
104 | SceneObjectGroup RezObject( | ||
105 | IClientAPI remoteClient, InventoryItemBase item, UUID assetID, Vector3 RayEnd, Vector3 RayStart, | ||
106 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, | ||
107 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment); | ||
108 | |||
61 | void TransferInventoryAssets(InventoryItemBase item, UUID sender, UUID receiver); | 109 | void TransferInventoryAssets(InventoryItemBase item, UUID sender, UUID receiver); |
62 | 110 | ||
63 | /// <summary> | 111 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index 21a755f..5e5c4a1 100644 --- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs +++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs | |||
@@ -26,15 +26,80 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using OpenMetaverse; | 28 | using OpenMetaverse; |
29 | using OpenSim.Framework; | ||
29 | using OpenSim.Region.Framework.Scenes; | 30 | using OpenSim.Region.Framework.Scenes; |
30 | 31 | ||
31 | namespace OpenSim.Region.Framework.Interfaces | 32 | namespace OpenSim.Region.Framework.Interfaces |
32 | { | 33 | { |
33 | public interface INPCModule | 34 | public interface INPCModule |
34 | { | 35 | { |
35 | UUID CreateNPC(string firstname, string lastname, Vector3 position, Scene scene, UUID cloneAppearanceFrom); | 36 | /// <summary> |
36 | void Autopilot(UUID agentID, Scene scene, Vector3 pos); | 37 | /// Create an NPC |
37 | void Say(UUID agentID, Scene scene, string text); | 38 | /// </summary> |
38 | void DeleteNPC(UUID agentID, Scene scene); | 39 | /// <param name="firstname"></param> |
40 | /// <param name="lastname"></param> | ||
41 | /// <param name="position"></param> | ||
42 | /// <param name="scene"></param> | ||
43 | /// <param name="appearance">The avatar appearance to use for the new NPC.</param> | ||
44 | /// <returns>The UUID of the ScenePresence created.</returns> | ||
45 | UUID CreateNPC(string firstname, string lastname, Vector3 position, Scene scene, AvatarAppearance appearance); | ||
46 | |||
47 | /// <summary> | ||
48 | /// Check if the agent is an NPC. | ||
49 | /// </summary> | ||
50 | /// <param name="agentID"></param> | ||
51 | /// <param name="scene"></param> | ||
52 | /// <returns>True if the agent is an NPC in the given scene. False otherwise.</returns> | ||
53 | bool IsNPC(UUID agentID, Scene scene); | ||
54 | |||
55 | /// <summary> | ||
56 | /// Set the appearance for an NPC. | ||
57 | /// </summary> | ||
58 | /// <param name="agentID"></param> | ||
59 | /// <param name="appearance"></param> | ||
60 | /// <param name="scene"></param> | ||
61 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | ||
62 | bool SetNPCAppearance(UUID agentID, AvatarAppearance appearance, Scene scene); | ||
63 | |||
64 | /// <summary> | ||
65 | /// Move an NPC to a target over time. | ||
66 | /// </summary> | ||
67 | /// <param name="agentID">The UUID of the NPC</param> | ||
68 | /// <param name="scene"></param> | ||
69 | /// <param name="pos"></param> | ||
70 | /// <param name="noFly"> | ||
71 | /// If true, then the avatar will attempt to walk to the location even if it's up in the air. | ||
72 | /// This is to allow walking on prims. | ||
73 | /// </param> | ||
74 | /// <param name="landAtTarget"> | ||
75 | /// If true and the avatar is flying when it reaches the target, land. | ||
76 | /// </param> | ||
77 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | ||
78 | bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget); | ||
79 | |||
80 | /// <summary> | ||
81 | /// Stop the NPC's current movement. | ||
82 | /// </summary> | ||
83 | /// <param name="agentID">The UUID of the NPC</param> | ||
84 | /// <param name="scene"></param> | ||
85 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | ||
86 | bool StopMoveToTarget(UUID agentID, Scene scene); | ||
87 | |||
88 | /// <summary> | ||
89 | /// Get the NPC to say something. | ||
90 | /// </summary> | ||
91 | /// <param name="agentID">The UUID of the NPC</param> | ||
92 | /// <param name="scene"></param> | ||
93 | /// <param name="text"></param> | ||
94 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | ||
95 | bool Say(UUID agentID, Scene scene, string text); | ||
96 | |||
97 | /// <summary> | ||
98 | /// Delete an NPC. | ||
99 | /// </summary> | ||
100 | /// <param name="agentID">The UUID of the NPC</param> | ||
101 | /// <param name="scene"></param> | ||
102 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | ||
103 | bool DeleteNPC(UUID agentID, Scene scene); | ||
39 | } | 104 | } |
40 | } \ No newline at end of file | 105 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs b/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs new file mode 100644 index 0000000..1ed978b --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IPermissionsModule.cs | |||
@@ -0,0 +1,54 @@ | |||
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 | |||
28 | using OpenMetaverse; | ||
29 | using OpenSim.Region.Framework.Scenes; | ||
30 | |||
31 | namespace OpenSim.Region.Framework.Interfaces | ||
32 | { | ||
33 | /// <value> | ||
34 | /// Which set of permissions a user has. | ||
35 | /// </value> | ||
36 | public enum PermissionClass | ||
37 | { | ||
38 | Owner, | ||
39 | Group, | ||
40 | Everyone | ||
41 | }; | ||
42 | |||
43 | public interface IPermissionsModule | ||
44 | { | ||
45 | |||
46 | /// <summary> | ||
47 | /// Returns the type of permissions that the user has over an object. | ||
48 | /// </summary> | ||
49 | /// <param name="user">The user</param> | ||
50 | /// <param name="obj">The object</param> | ||
51 | /// <returns>The type of permissions the user has over the object</returns> | ||
52 | PermissionClass GetPermissionClass(UUID user, SceneObjectPart obj); | ||
53 | } | ||
54 | } | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IScenePresence.cs b/OpenSim/Region/Framework/Interfaces/IScenePresence.cs new file mode 100644 index 0000000..ff39283 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IScenePresence.cs | |||
@@ -0,0 +1,96 @@ | |||
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 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using OpenSim.Framework; | ||
31 | using OpenSim.Region.Framework.Scenes; | ||
32 | |||
33 | namespace OpenSim.Region.Framework.Interfaces | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// An agent in the scene. | ||
37 | /// </summary> | ||
38 | /// <remarks> | ||
39 | /// Interface is a work in progress. Please feel free to add other required properties and methods. | ||
40 | /// </remarks> | ||
41 | public interface IScenePresence : ISceneEntity | ||
42 | { | ||
43 | /// <value> | ||
44 | /// The client controlling this presence | ||
45 | /// </value> | ||
46 | IClientAPI ControllingClient { get; } | ||
47 | |||
48 | /// <summary> | ||
49 | /// What type of presence is this? User, NPC, etc. | ||
50 | /// </summary> | ||
51 | PresenceType PresenceType { get; } | ||
52 | |||
53 | /// <summary> | ||
54 | /// Avatar appearance data. | ||
55 | /// </summary> | ||
56 | /// <remarks> | ||
57 | // Because appearance setting is in a module, we actually need | ||
58 | // to give it access to our appearance directly, otherwise we | ||
59 | // get a synchronization issue. | ||
60 | /// </remarks> | ||
61 | AvatarAppearance Appearance { get; set; } | ||
62 | |||
63 | /// <summary> | ||
64 | /// The AttachmentsModule synchronizes on this to avoid race conditions between commands to add and remove attachments. | ||
65 | /// </summary> | ||
66 | /// <remarks> | ||
67 | /// All add and remove attachment operations must synchronize on this for the lifetime of their operations. | ||
68 | /// </remarks> | ||
69 | Object AttachmentsSyncLock { get; } | ||
70 | |||
71 | /// <summary> | ||
72 | /// The scene objects attached to this avatar. | ||
73 | /// </summary> | ||
74 | /// <returns> | ||
75 | /// A copy of the list. | ||
76 | /// </returns> | ||
77 | /// <remarks> | ||
78 | /// Do not change this list directly - use the attachments module. | ||
79 | /// </remarks> | ||
80 | List<SceneObjectGroup> GetAttachments(); | ||
81 | |||
82 | /// <summary> | ||
83 | /// The scene objects attached to this avatar at a specific attachment point. | ||
84 | /// </summary> | ||
85 | /// <param name="attachmentPoint"></param> | ||
86 | /// <returns></returns> | ||
87 | List<SceneObjectGroup> GetAttachments(uint attachmentPoint); | ||
88 | |||
89 | bool HasAttachments(); | ||
90 | |||
91 | // Don't use these methods directly. Instead, use the AttachmentsModule | ||
92 | void AddAttachment(SceneObjectGroup gobj); | ||
93 | void RemoveAttachment(SceneObjectGroup gobj); | ||
94 | void ClearAttachments(); | ||
95 | } | ||
96 | } \ No newline at end of file | ||
diff --git a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs index 2397f22..e715e70 100644 --- a/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs +++ b/OpenSim/Region/Framework/Interfaces/ISceneViewer.cs | |||
@@ -30,12 +30,21 @@ using OpenSim.Region.Framework.Scenes; | |||
30 | 30 | ||
31 | namespace OpenSim.Region.Framework.Interfaces | 31 | namespace OpenSim.Region.Framework.Interfaces |
32 | { | 32 | { |
33 | /// <summary> | ||
34 | /// Sends scheduled updates to it's associated ScenePresence. | ||
35 | /// </summary> | ||
33 | public interface ISceneViewer | 36 | public interface ISceneViewer |
34 | { | 37 | { |
35 | void Reset(); | 38 | // void Reset(); |
36 | void Close(); | 39 | void Close(); |
40 | |||
41 | /// <summary> | ||
42 | /// Add the part to the queue of parts for which we need to send an update to the client | ||
43 | /// </summary> | ||
44 | /// <param name="part"></param> | ||
37 | void QueuePartForUpdate(SceneObjectPart part); | 45 | void QueuePartForUpdate(SceneObjectPart part); |
46 | |||
38 | void SendPrimUpdates(); | 47 | void SendPrimUpdates(); |
39 | int GetPendingObjectsCount(); | 48 | int GetPendingObjectsCount(); |
40 | } | 49 | } |
41 | } | 50 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs index 641e226..7dde586 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs | |||
@@ -54,5 +54,10 @@ namespace OpenSim.Region.Framework.Interfaces | |||
54 | bool HasScript(UUID itemID, out bool running); | 54 | bool HasScript(UUID itemID, out bool running); |
55 | 55 | ||
56 | void SaveAllState(); | 56 | void SaveAllState(); |
57 | |||
58 | /// <summary> | ||
59 | /// Starts the processing threads. | ||
60 | /// </summary> | ||
61 | void StartProcessing(); | ||
57 | } | 62 | } |
58 | } | 63 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulatorFeaturesModule.cs b/OpenSim/Region/Framework/Interfaces/ISimulatorFeaturesModule.cs new file mode 100644 index 0000000..8cef14e --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ISimulatorFeaturesModule.cs | |||
@@ -0,0 +1,43 @@ | |||
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 | |||
28 | using System; | ||
29 | using OpenMetaverse.StructuredData; | ||
30 | |||
31 | namespace OpenSim.Region.Framework.Interfaces | ||
32 | { | ||
33 | /// <summary> | ||
34 | /// Add remove or retrieve Simulator Features that will be given to a viewer via the SimulatorFeatures capability. | ||
35 | /// </summary> | ||
36 | public interface ISimulatorFeaturesModule | ||
37 | { | ||
38 | void AddFeature(string name, OSD value); | ||
39 | bool RemoveFeature(string name); | ||
40 | bool TryGetFeature(string name, out OSD value); | ||
41 | OSDMap GetFeatures(); | ||
42 | } | ||
43 | } \ No newline at end of file | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IUserManagement.cs b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs index 5d30aa8..c66e053 100644 --- a/OpenSim/Region/Framework/Interfaces/IUserManagement.cs +++ b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs | |||
@@ -5,13 +5,48 @@ using OpenMetaverse; | |||
5 | 5 | ||
6 | namespace OpenSim.Region.Framework.Interfaces | 6 | namespace OpenSim.Region.Framework.Interfaces |
7 | { | 7 | { |
8 | /// <summary> | ||
9 | /// This maintains the relationship between a UUID and a user name. | ||
10 | /// </summary> | ||
8 | public interface IUserManagement | 11 | public interface IUserManagement |
9 | { | 12 | { |
10 | string GetUserName(UUID uuid); | 13 | string GetUserName(UUID uuid); |
11 | string GetUserHomeURL(UUID uuid); | 14 | string GetUserHomeURL(UUID uuid); |
12 | string GetUserUUI(UUID uuid); | 15 | string GetUserUUI(UUID uuid); |
13 | string GetUserServerURL(UUID uuid, string serverType); | 16 | string GetUserServerURL(UUID uuid, string serverType); |
14 | void AddUser(UUID uuid, string userData); | 17 | |
18 | /// <summary> | ||
19 | /// Add a user. | ||
20 | /// </summary> | ||
21 | /// <remarks> | ||
22 | /// If an account is found for the UUID, then the names in this will be used rather than any information | ||
23 | /// extracted from creatorData. | ||
24 | /// </remarks> | ||
25 | /// <param name="uuid"></param> | ||
26 | /// <param name="creatorData">The creator data for this user.</param> | ||
27 | void AddUser(UUID uuid, string creatorData); | ||
28 | |||
29 | /// <summary> | ||
30 | /// Add a user. | ||
31 | /// </summary> | ||
32 | /// <remarks> | ||
33 | /// The UUID is related to the name without any other checks being performed, such as user account presence. | ||
34 | /// </remarks> | ||
35 | /// <param name="uuid"></param> | ||
36 | /// <param name="firstName"></param> | ||
37 | /// <param name="lastName"></param> | ||
38 | void AddUser(UUID uuid, string firstName, string lastName); | ||
39 | |||
40 | /// <summary> | ||
41 | /// Add a user. | ||
42 | /// </summary> | ||
43 | /// <remarks> | ||
44 | /// The arguments apart from uuid are formed into a creatorData string and processing proceeds as for the | ||
45 | /// AddUser(UUID uuid, string creatorData) method. | ||
46 | /// </remarks> | ||
47 | /// <param name="uuid"></param> | ||
48 | /// <param name="firstName"></param> | ||
49 | /// <param name="profileURL"></param> | ||
15 | void AddUser(UUID uuid, string firstName, string lastName, string profileURL); | 50 | void AddUser(UUID uuid, string firstName, string lastName, string profileURL); |
16 | } | 51 | } |
17 | } | 52 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs index 8da99a0..dafbf30 100644 --- a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs +++ b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs | |||
@@ -81,6 +81,26 @@ namespace OpenSim.Region.Framework.Interfaces | |||
81 | void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg); | 81 | void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg); |
82 | 82 | ||
83 | /// <summary> | 83 | /// <summary> |
84 | /// Delivers the message to a specified object in the region. | ||
85 | /// </summary> | ||
86 | /// <param name='target'> | ||
87 | /// Target. | ||
88 | /// </param> | ||
89 | /// <param name='channel'> | ||
90 | /// Channel. | ||
91 | /// </param> | ||
92 | /// <param name='name'> | ||
93 | /// Name. | ||
94 | /// </param> | ||
95 | /// <param name='id'> | ||
96 | /// Identifier. | ||
97 | /// </param> | ||
98 | /// <param name='msg'> | ||
99 | /// Message. | ||
100 | /// </param> | ||
101 | bool DeliverMessageTo(UUID target, int channel, Vector3 pos, string name, UUID id, string msg, out string error); | ||
102 | |||
103 | /// <summary> | ||
84 | /// Are there any listen events ready to be dispatched? | 104 | /// Are there any listen events ready to be dispatched? |
85 | /// </summary> | 105 | /// </summary> |
86 | /// <returns>boolean indication</returns> | 106 | /// <returns>boolean indication</returns> |