clockwerk-opensim – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 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  
28 using System;
29 using System.Collections.Generic;
30 using OpenMetaverse;
31 using OpenSim.Framework;
32 using OpenSim.Region.Framework.Scenes;
33  
34 namespace OpenSim.Region.Framework.Interfaces
35 {
36 public interface IAttachmentsModule
37 {
38 /// <summary>
39 /// Copy attachment data from a ScenePresence into the AgentData structure for transmission to another simulator
40 /// </summary>
41 /// <param name='sp'></param>
42 /// <param name='ad'></param>
43 void CopyAttachments(IScenePresence sp, AgentData ad);
44  
45 /// <summary>
46 /// Copy attachment data from an AgentData structure into a ScenePresence.
47 /// </summary>
48 /// <param name='ad'></param>
49 /// <param name='sp'></param>
50 void CopyAttachments(AgentData ad, IScenePresence sp);
51  
52 /// <summary>
53 /// RezAttachments. This should only be called upon login on the first region.
54 /// Attachment rezzings on crossings and TPs are done in a different way.
55 /// </summary>
56 /// <remarks>
57 /// This is only actually necessary for viewers which do not have a current outfit folder (these viewers make
58 /// their own attachment calls on login) and agents which have attachments but no viewer (e.g. NPCs).
59 /// </remarks>
60 /// <param name="sp"></param>
61 void RezAttachments(IScenePresence sp);
62  
63 /// <summary>
64 /// Derez the attachements for a scene presence that is closing.
65 /// </summary>
66 /// <remarks>
67 /// Attachment changes are saved.
68 /// </remarks>
69 /// <param name="sp">The presence closing</param>
70 /// <param name="saveChanged">Save changed attachments.</param>
71 /// <param name="saveAllScripted">Save attachments with scripts even if they haven't changed.</para>
72 void DeRezAttachments(IScenePresence sp);
73  
74 /// <summary>
75 /// Delete all the presence's attachments from the scene
76 /// This is done when a root agent leaves/is demoted to child (for instance, on logout, teleport or region cross).
77 /// </summary>
78 /// <param name="sp"></param>
79 /// <param name="silent"></param>
80 void DeleteAttachmentsFromScene(IScenePresence sp, bool silent);
81  
82 /// <summary>
83 /// Attach an object to an avatar.
84 /// </summary>
85 /// <param name="sp"></param>
86 /// <param name="grp"></param>
87 /// <param name="AttachmentPt"></param>
88 /// <param name="silent"></param>
89 /// <param name="addToInventory">If true then add object to user inventory</param>
90 /// <param name="append">Append to attachment point rather than replace.</param>
91 /// <returns>true if the object was successfully attached, false otherwise</returns>
92 bool AttachObject(IScenePresence sp, SceneObjectGroup grp, uint AttachmentPt, bool silent, bool addToInventory, bool append);
93  
94 /// <summary>
95 /// Rez an attachment from user inventory and change inventory status to match.
96 /// </summary>
97 /// <param name="sp"></param>
98 /// <param name="itemID"></param>
99 /// <param name="AttachmentPt"></param>
100 /// <returns>The scene object that was attached. Null if the scene object could not be found</returns>
101 SceneObjectGroup RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt);
102  
103 /// <summary>
104 /// Rez multiple attachments from a user's inventory
105 /// </summary>
106 /// <param name="sp"></param>
107 /// <param name="rezlist"></param>
108 void RezMultipleAttachmentsFromInventory(IScenePresence sp,List<KeyValuePair<UUID, uint>> rezlist);
109  
110 /// <summary>
111 /// Detach the given item to the ground.
112 /// </summary>
113 /// <param name="sp"></param>
114 /// <param name="objectLocalID"></param>
115 void DetachSingleAttachmentToGround(IScenePresence sp, uint objectLocalID);
116  
117 /// <summary>
118 /// Detach the given item to the ground at the specified coordinates & rotation
119 /// </summary>
120 /// <param name="sp"></param>
121 /// <param name="objectLocalID"></param>
122 /// <param name="absolutePos"></param>
123 /// <param name="absoluteRot"></param>
124 void DetachSingleAttachmentToGround(IScenePresence sp, uint objectLocalID, Vector3 absolutePos, Quaternion absoluteRot);
125  
126 /// <summary>
127 /// Detach the given attachment so that it remains in the user's inventory.
128 /// </summary>
129 /// <param name="sp">/param>
130 /// <param name="grp">The attachment to detach.</param>
131 void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup grp);
132  
133 /// <summary>
134 /// Update the position of an attachment.
135 /// </summary>
136 /// <param name="sog"></param>
137 /// <param name="pos"></param>
138 void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos);
139 }
140 }