OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IEntityInventory.cs
Go to the documentation of this file.
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.Collections.Generic;
29 using System.Collections;
30 using OpenMetaverse;
31 using OpenSim.Framework;
32 using OpenSim.Region.Framework.Scenes;
33 
34 namespace OpenSim.Region.Framework.Interfaces
35 {
41  public interface IEntityInventory
42  {
46  void ForceInventoryPersistence();
47 
58  void ResetInventoryIDs();
59 
67  void ResetObjectID();
68 
73  void ChangeInventoryOwner(UUID ownerId);
74 
79  void ChangeInventoryGroup(UUID groupID);
80 
89  int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource);
90 
91  ArrayList GetScriptErrors(UUID itemID);
92  void ResumeScripts();
93 
101  void RemoveScriptInstances(bool sceneObjectBeingDeleted);
102 
106  void StopScriptInstances();
107 
119  bool CreateScriptInstance(
120  TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource);
121 
134  bool CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource);
135 
136  ArrayList CreateScriptInstanceEr(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource);
137 
146  void RemoveScriptInstance(UUID itemId, bool sceneObjectBeingDeleted);
147 
152  void StopScriptInstance(UUID itemId);
153 
165  bool TryGetScriptInstanceRunning(UUID itemId, out bool running);
166 
172  void AddInventoryItem(TaskInventoryItem item, bool allowedDrop);
173 
178  void AddInventoryItemExclusive(TaskInventoryItem item, bool allowedDrop);
179 
187  void RestoreInventoryItems(ICollection<TaskInventoryItem> items);
188 
194  TaskInventoryItem GetInventoryItem(UUID itemId);
195 
203  List<TaskInventoryItem> GetInventoryItems();
204 
216  TaskInventoryItem GetInventoryItem(string name);
217 
226  List<TaskInventoryItem> GetInventoryItems(string name);
227 
236  List<TaskInventoryItem> GetInventoryItems(InventoryType type);
237 
249  bool GetRezReadySceneObjects(TaskInventoryItem item, out List<SceneObjectGroup> objlist, out List<Vector3> veclist, out Vector3 bbox, out float offsetHeight);
250 
258  bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents);
259  bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents, bool considerChanged);
260 
267  int RemoveInventoryItem(UUID itemID);
268 
273  void RequestInventoryFile(IClientAPI client, IXfer xferManager);
274 
279  void ProcessInventoryBackup(ISimulationDataService datastore);
280 
281  uint MaskEffectivePermissions();
282 
283  void ApplyNextOwnerPermissions();
284 
285  void ApplyGodPermissions(uint perms);
286 
290  int Count { get; }
291 
295  bool ContainsScripts();
296 
303  int ScriptCount();
304 
308  int RunningScriptCount();
309 
314  List<UUID> GetInventoryList();
315 
322  Dictionary<UUID, string> GetScriptStates();
323  Dictionary<UUID, string> GetScriptStates(bool oldIDs);
324  }
325 }
delegate void RemoveInventoryItem(IClientAPI remoteClient, List< UUID > itemIDs)
Represents an item in a task inventory
delegate void UpdateInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID itemID, InventoryItemBase itemUpd)
Interface to an entity's (SceneObjectPart's) inventory