aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Interfaces/IEntityInventory.cs')
-rw-r--r--OpenSim/Region/Environment/Interfaces/IEntityInventory.cs208
1 files changed, 0 insertions, 208 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs b/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs
deleted file mode 100644
index a270293..0000000
--- a/OpenSim/Region/Environment/Interfaces/IEntityInventory.cs
+++ /dev/null
@@ -1,208 +0,0 @@
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
28using System;
29using System.Collections.Generic;
30using System.Reflection;
31using OpenMetaverse;
32using log4net;
33using OpenSim.Framework;
34using OpenSim.Framework.Communications.Cache;
35using OpenSim.Region.Interfaces;
36using OpenSim.Region.Environment.Interfaces;
37using OpenSim.Region.Environment.Scenes.Scripting;
38
39namespace OpenSim.Region.Environment.Scenes
40{
41 /// <summary>
42 /// Interface to an entity's (SceneObjectPart's) inventory
43 /// </summary>
44 ///
45 /// This is not a finished 1.0 candidate interface
46 public interface IEntityInventory
47 {
48 /// <summary>
49 /// Force the task inventory of this prim to persist at the next update sweep
50 /// </summary>
51 void ForceInventoryPersistence();
52
53 /// <summary>
54 /// Reset UUIDs for all the items in the prim's inventory.
55 /// </summary>
56 ///
57 /// This involves either generating
58 /// new ones or setting existing UUIDs to the correct parent UUIDs.
59 ///
60 /// If this method is called and there are inventory items, then we regard the inventory as having changed.
61 ///
62 /// <param name="linkNum">Link number for the part</param>
63 void ResetInventoryIDs();
64
65 /// <summary>
66 /// Change every item in this inventory to a new owner.
67 /// </summary>
68 /// <param name="ownerId"></param>
69 void ChangeInventoryOwner(UUID ownerId);
70
71 /// <summary>
72 /// Change every item in this inventory to a new group.
73 /// </summary>
74 /// <param name="groupID"></param>
75 void ChangeInventoryGroup(UUID groupID);
76
77 /// <summary>
78 /// Start all the scripts contained in this entity's inventory
79 /// </summary>
80 void CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource);
81
82 /// <summary>
83 /// Stop all the scripts in this entity.
84 /// </summary>
85 void RemoveScriptInstances();
86
87 /// <summary>
88 /// Start a script which is in this entity's inventory.
89 /// </summary>
90 /// <param name="item"></param>
91 /// <param name="postOnRez"></param>
92 /// <param name="engine"></param>
93 /// <param name="stateSource"></param>
94 void CreateScriptInstance(
95 TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource);
96
97 /// <summary>
98 /// Start a script which is in this entity's inventory.
99 /// </summary>
100 /// <param name="itemId"></param>
101 /// <param name="startParam"></param>
102 /// <param name="postOnRez"></param>
103 /// <param name="engine"></param>
104 /// <param name="stateSource"></param>
105 void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource);
106
107 /// <summary>
108 /// Stop a script which is in this prim's inventory.
109 /// </summary>
110 /// <param name="itemId"></param>
111 void RemoveScriptInstance(UUID itemId);
112
113 /// <summary>
114 /// Add an item to this entity's inventory. If an item with the same name already exists, then an alternative
115 /// name is chosen.
116 /// </summary>
117 /// <param name="item"></param>
118 void AddInventoryItem(TaskInventoryItem item, bool allowedDrop);
119
120 /// <summary>
121 /// Add an item to this entity's inventory. If an item with the same name already exists, it is replaced.
122 /// </summary>
123 /// <param name="item"></param>
124 void AddInventoryItemExclusive(TaskInventoryItem item, bool allowedDrop);
125
126 /// <summary>
127 /// Restore a whole collection of items to the entity's inventory at once.
128 /// We assume that the items already have all their fields correctly filled out.
129 /// The items are not flagged for persistence to the database, since they are being restored
130 /// from persistence rather than being newly added.
131 /// </summary>
132 /// <param name="items"></param>
133 void RestoreInventoryItems(ICollection<TaskInventoryItem> items);
134
135 /// <summary>
136 /// Returns an existing inventory item. Returns the original, so any changes will be live.
137 /// </summary>
138 /// <param name="itemID"></param>
139 /// <returns>null if the item does not exist</returns>
140 TaskInventoryItem GetInventoryItem(UUID itemId);
141
142 /// <summary>
143 /// Update an existing inventory item.
144 /// </summary>
145 /// <param name="item">The updated item. An item with the same id must already exist
146 /// in this prim's inventory.</param>
147 /// <returns>false if the item did not exist, true if the update occurred successfully</returns>
148 bool UpdateInventoryItem(TaskInventoryItem item);
149
150 /// <summary>
151 /// Remove an item from this entity's inventory
152 /// </summary>
153 /// <param name="itemID"></param>
154 /// <returns>Numeric asset type of the item removed. Returns -1 if the item did not exist
155 /// in this prim's inventory.</returns>
156 int RemoveInventoryItem(UUID itemID);
157
158 /// <summary>
159 /// Return the name with which a client can request a xfer of this prim's inventory metadata
160 /// </summary>
161 string GetInventoryFileName();
162
163 bool GetInventoryFileName(IClientAPI client, uint localID);
164
165 /// <summary>
166 /// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
167 /// </summary>
168 /// <param name="xferManager"></param>
169 void RequestInventoryFile(IClientAPI client, IXfer xferManager);
170
171 /// <summary>
172 /// Backup the inventory to the given data store
173 /// </summary>
174 /// <param name="datastore"></param>
175 void ProcessInventoryBackup(IRegionDataStore datastore);
176
177 uint MaskEffectivePermissions();
178
179 void ApplyNextOwnerPermissions();
180
181 void ApplyGodPermissions(uint perms);
182
183 /// <summary>
184 /// Returns true if this inventory contains any scripts
185 /// </summary></returns>
186 bool ContainsScripts();
187
188 /// <summary>
189 /// Get the uuids of all items in this inventory
190 /// </summary>
191 /// <returns></returns>
192 List<UUID> GetInventoryList();
193
194 /// <summary>
195 /// Get the names of the assemblies associated with scripts in this inventory.
196 /// </summary>
197 /// <returns></returns>
198 string[] GetScriptAssemblies();
199
200 /// <summary>
201 /// Get the xml representing the saved states of scripts in this inventory.
202 /// </summary>
203 /// <returns>
204 /// A <see cref="Dictionary`2"/>
205 /// </returns>
206 Dictionary<UUID, string> GetScriptStates();
207 }
208}