OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
OpenSim.Region.Framework.Scenes.SceneObjectPartInventory Class Reference
Inheritance diagram for OpenSim.Region.Framework.Scenes.SceneObjectPartInventory:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Region.Framework.Scenes.SceneObjectPartInventory:
Collaboration graph
[legend]

Classes

class  InventoryStringBuilder
 

Public Member Functions

 SceneObjectPartInventory (SceneObjectPart part)
 Constructor More...
 
void ForceInventoryPersistence ()
 Force the task inventory of this prim to persist at the next update sweep More...
 
void ResetInventoryIDs ()
 Reset UUIDs for all the items in the prim's inventory. More...
 
void ResetObjectID ()
 Reset parent object UUID for all the items in the prim's inventory. More...
 
void ChangeInventoryOwner (UUID ownerId)
 Change every item in this inventory to a new owner. More...
 
void ChangeInventoryGroup (UUID groupID)
 Change every item in this inventory to a new group. More...
 
bool TryGetScriptInstanceRunning (UUID itemId, out bool running)
 Try to get the script running status. More...
 
int CreateScriptInstances (int startParam, bool postOnRez, string engine, int stateSource)
 Start all the scripts contained in this entity's inventory More...
 
ArrayList GetScriptErrors (UUID itemID)
 
void RemoveScriptInstances (bool sceneObjectBeingDeleted)
 Stop and remove all the scripts in this prim. More...
 
void StopScriptInstances ()
 Stop all the scripts in this prim. More...
 
bool CreateScriptInstance (TaskInventoryItem item, int startParam, bool postOnRez, string engine, int stateSource)
 Start a script which is in this prim's inventory. More...
 
bool CreateScriptInstance (UUID itemId, int startParam, bool postOnRez, string engine, int stateSource)
 Start a script which is in this prim's inventory. Some processing may occur in the background, but this routine returns asap. More...
 
ArrayList CreateScriptInstanceEr (UUID itemId, int startParam, bool postOnRez, string engine, int stateSource)
 Start a script which is in this prim's inventory and return any compilation error messages. More...
 
void RemoveScriptInstance (UUID itemId, bool sceneObjectBeingDeleted)
 Stop and remove a script which is in this prim's inventory. More...
 
void StopScriptInstance (UUID itemId)
 Stop a script which is in this prim's inventory. More...
 
void StopScriptInstance (TaskInventoryItem item)
 Stop a script which is in this prim's inventory. More...
 
void AddInventoryItem (TaskInventoryItem item, bool allowedDrop)
 Add an item to this prim's inventory. If an item with the same name already exists, then an alternative name is chosen. More...
 
void AddInventoryItemExclusive (TaskInventoryItem item, bool allowedDrop)
 Add an item to this prim's inventory. If an item with the same name already exists, it is replaced. More...
 
void RestoreInventoryItems (ICollection< TaskInventoryItem > items)
 Restore a whole collection of items to the prim's inventory at once. We assume that the items already have all their fields correctly filled out. The items are not flagged for persistence to the database, since they are being restored from persistence rather than being newly added. More...
 
TaskInventoryItem GetInventoryItem (UUID itemId)
 Returns an existing inventory item. Returns the original, so any changes will be live. More...
 
TaskInventoryItem GetInventoryItem (string name)
 Gets an inventory item by name More...
 
List< TaskInventoryItemGetInventoryItems (string name)
 Get inventory items by name. More...
 
bool GetRezReadySceneObjects (TaskInventoryItem item, out List< SceneObjectGroup > objlist, out List< Vector3 > veclist, out Vector3 bbox, out float offsetHeight)
 Get the scene object(s) referenced by an inventory item. More...
 
bool UpdateInventoryItem (TaskInventoryItem item)
 Update an existing inventory item. More...
 
bool UpdateInventoryItem (TaskInventoryItem item, bool fireScriptEvents)
 
bool UpdateInventoryItem (TaskInventoryItem item, bool fireScriptEvents, bool considerChanged)
 
int RemoveInventoryItem (UUID itemID)
 Remove an item from this prim's inventory More...
 
void RequestInventoryFile (IClientAPI client, IXfer xferManager)
 Serialize all the metadata for the items in this prim's inventory ready for sending to the client More...
 
void ProcessInventoryBackup (ISimulationDataService datastore)
 Process inventory backup More...
 
uint MaskEffectivePermissions ()
 
void ApplyNextOwnerPermissions ()
 
void ApplyGodPermissions (uint perms)
 
bool ContainsScripts ()
 Returns true if this part inventory contains any scripts. False otherwise. More...
 
int ScriptCount ()
 Returns the count of scripts in this parts inventory. More...
 
int RunningScriptCount ()
 Returns the count of running scripts in this parts inventory. More...
 
List< UUID > GetInventoryList ()
 Get the uuids of all items in this inventory More...
 
List< TaskInventoryItemGetInventoryItems ()
 Get all inventory items. More...
 
List< TaskInventoryItemGetInventoryItems (InventoryType type)
 Get inventory items by type. More...
 
Dictionary< UUID, string > GetScriptStates ()
 Get the xml representing the saved states of scripts in this inventory. More...
 
Dictionary< UUID, string > GetScriptStates (bool oldIDs)
 
void ResumeScripts ()
 

Static Public Member Functions

static bool TryGetScriptInstanceRunning (Scene scene, TaskInventoryItem item, out bool running)
 

Protected Member Functions

void AddInventoryItem (string name, TaskInventoryItem item, bool allowedDrop)
 Add an item to this prim's inventory. More...
 

Protected Attributes

uint m_inventorySerial = 0
 Serial count for inventory file , used to tell if inventory has changed no need for this to be part of Database backup More...
 
TaskInventoryDictionary m_items = new TaskInventoryDictionary()
 Holds in memory prim inventory More...
 

Properties

int Count [get]
 
- Properties inherited from OpenSim.Region.Framework.Interfaces.IEntityInventory
int Count [get]
 Number of items in this inventory. More...
 

Detailed Description

Definition at line 45 of file SceneObjectPartInventory.cs.

Constructor & Destructor Documentation

OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.SceneObjectPartInventory ( SceneObjectPart  part)
inline

Constructor

Parameters
partA SceneObjectPart

Definition at line 117 of file SceneObjectPartInventory.cs.

Member Function Documentation

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.AddInventoryItem ( TaskInventoryItem  item,
bool  allowedDrop 
)
inline

Add an item to this prim's inventory. If an item with the same name already exists, then an alternative name is chosen.

Parameters
item

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 748 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.AddInventoryItem ( string  name,
TaskInventoryItem  item,
bool  allowedDrop 
)
inlineprotected

Add an item to this prim's inventory.

Parameters
nameThe name that the new item should have.
itemThe item itself. The name within this structure is ignored in favour of the name given in this method's arguments
allowedDropItem was only added to inventory because AllowedDrop is set

Definition at line 788 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.AddInventoryItemExclusive ( TaskInventoryItem  item,
bool  allowedDrop 
)
inline

Add an item to this prim's inventory. If an item with the same name already exists, it is replaced.

Parameters
item

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 757 of file SceneObjectPartInventory.cs.

Here is the call graph for this function:

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ApplyGodPermissions ( uint  perms)
inline
void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ApplyNextOwnerPermissions ( )
inline
void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ChangeInventoryGroup ( UUID  groupID)
inline

Change every item in this inventory to a new group.

Parameters
groupID

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 214 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ChangeInventoryOwner ( UUID  ownerId)
inline

Change every item in this inventory to a new owner.

Parameters
ownerId

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 187 of file SceneObjectPartInventory.cs.

bool OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ContainsScripts ( )
inline

Returns true if this part inventory contains any scripts. False otherwise.

Returns

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1392 of file SceneObjectPartInventory.cs.

bool OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.CreateScriptInstance ( TaskInventoryItem  item,
int  startParam,
bool  postOnRez,
string  engine,
int  stateSource 
)
inline

Start a script which is in this prim's inventory.

Parameters
item
Returns
true if the script instance was created, false otherwise

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 355 of file SceneObjectPartInventory.cs.

bool OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.CreateScriptInstance ( UUID  itemId,
int  startParam,
bool  postOnRez,
string  engine,
int  stateSource 
)
inline

Start a script which is in this prim's inventory. Some processing may occur in the background, but this routine returns asap.

Parameters
itemIdA UUID

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 500 of file SceneObjectPartInventory.cs.

ArrayList OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.CreateScriptInstanceEr ( UUID  itemId,
int  startParam,
bool  postOnRez,
string  engine,
int  stateSource 
)
inline

Start a script which is in this prim's inventory and return any compilation error messages.

Parameters
itemIdA UUID

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 540 of file SceneObjectPartInventory.cs.

int OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.CreateScriptInstances ( int  startParam,
bool  postOnRez,
string  engine,
int  stateSource 
)
inline

Start all the scripts contained in this entity's inventory

Parameters
startParam
postOnRez
engine
stateSource
Returns
Number of scripts started.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 294 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ForceInventoryPersistence ( )
inline

Force the task inventory of this prim to persist at the next update sweep

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 125 of file SceneObjectPartInventory.cs.

TaskInventoryItem OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetInventoryItem ( UUID  itemId)
inline

Returns an existing inventory item. Returns the original, so any changes will be live.

Parameters
itemID
Returns
null if the item does not exist

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 838 of file SceneObjectPartInventory.cs.

TaskInventoryItem OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetInventoryItem ( string  name)
inline

Gets an inventory item by name

This method returns the first inventory item that matches the given name. In SL this is all you need since each item in a prim inventory must have a unique name.

Parameters
name
Returns
The inventory item. Null if no such item was found.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 847 of file SceneObjectPartInventory.cs.

List<TaskInventoryItem> OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetInventoryItems ( string  name)
inline

Get inventory items by name.

Parameters
name
Returns
A list of inventory items with that name. If no inventory item has that name then an empty list is returned.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 863 of file SceneObjectPartInventory.cs.

List<TaskInventoryItem> OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetInventoryItems ( )
inline

Get all inventory items.

Parameters
name
Returns
If there are no inventory items then an empty list is returned.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1462 of file SceneObjectPartInventory.cs.

List<TaskInventoryItem> OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetInventoryItems ( InventoryType  type)
inline

Get inventory items by type.

Returns
A list of inventory items of that type. If no inventory items of that type then an empty list is returned.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1473 of file SceneObjectPartInventory.cs.

List<UUID> OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetInventoryList ( )
inline

Get the uuids of all items in this inventory

Returns

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1452 of file SceneObjectPartInventory.cs.

bool OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetRezReadySceneObjects ( TaskInventoryItem  item,
out List< SceneObjectGroup objlist,
out List< Vector3 >  veclist,
out Vector3  bbox,
out float  offsetHeight 
)
inline

Get the scene object(s) referenced by an inventory item.

This is returned in a 'rez ready' state. That is, name, description, permissions and other details have been adjusted to reflect the part and item from which it originates.

Parameters
itemInventory item
objlistThe scene objects
veclistRelative offsets for each object
Returns
true = success, false = the scene object asset couldn't be found

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 880 of file SceneObjectPartInventory.cs.

ArrayList OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetScriptErrors ( UUID  itemID)
inline
Dictionary<UUID, string> OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetScriptStates ( )
inline

Get the xml representing the saved states of scripts in this inventory.

Returns
A Dictionary`2

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1488 of file SceneObjectPartInventory.cs.

Dictionary<UUID, string> OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.GetScriptStates ( bool  oldIDs)
inline
uint OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.MaskEffectivePermissions ( )
inline
void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ProcessInventoryBackup ( ISimulationDataService  datastore)
inline

Process inventory backup

Parameters
datastore

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1238 of file SceneObjectPartInventory.cs.

int OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.RemoveInventoryItem ( UUID  itemID)
inline

Remove an item from this prim's inventory

Parameters
itemID
Returns
Numeric asset type of the item removed. Returns -1 if the item did not exist in this prim's inventory.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1053 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.RemoveScriptInstance ( UUID  itemId,
bool  sceneObjectBeingDeleted 
)
inline

Stop and remove a script which is in this prim's inventory.

Parameters
itemId
sceneObjectBeingDeletedShould be true if this script is being removed because the scene object is being deleted. This will prevent spurious updates to the client.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 635 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.RemoveScriptInstances ( bool  sceneObjectBeingDeleted)
inline

Stop and remove all the scripts in this prim.

Parameters
sceneObjectBeingDeletedShould be true if these scripts are being removed because the scene object is being deleted. This will prevent spurious updates to the client.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 332 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.RequestInventoryFile ( IClientAPI  client,
IXfer  xferManager 
)
inline

Serialize all the metadata for the items in this prim's inventory ready for sending to the client

Parameters
xferManager

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1112 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ResetInventoryIDs ( )
inline

Reset UUIDs for all the items in the prim's inventory.

This involves either generating new ones or setting existing UUIDs to the correct parent UUIDs.

If this method is called and there are inventory items, then we regard the inventory as having changed.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 139 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ResetObjectID ( )
inline

Reset parent object UUID for all the items in the prim's inventory.

If this method is called and there are inventory items, then we regard the inventory as having changed.

Parameters
linkNumLink number for the part

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 161 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.RestoreInventoryItems ( ICollection< TaskInventoryItem items)
inline

Restore a whole collection of items to the prim's inventory at once. We assume that the items already have all their fields correctly filled out. The items are not flagged for persistence to the database, since they are being restored from persistence rather than being newly added.

Parameters
items

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 820 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ResumeScripts ( )
inline
int OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.RunningScriptCount ( )
inline

Returns the count of running scripts in this parts inventory.

Returns

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1427 of file SceneObjectPartInventory.cs.

Here is the call graph for this function:

int OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.ScriptCount ( )
inline

Returns the count of scripts in this parts inventory.

Returns

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 1409 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.StopScriptInstance ( UUID  itemId)
inline

Stop a script which is in this prim's inventory.

Parameters
itemId
sceneObjectBeingDeletedShould be true if this script is being removed because the scene object is being deleted. This will prevent spurious updates to the client.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 663 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.StopScriptInstance ( TaskInventoryItem  item)
inline

Stop a script which is in this prim's inventory.

Parameters
itemId
sceneObjectBeingDeletedShould be true if this script is being removed because the scene object is being deleted. This will prevent spurious updates to the client.

Definition at line 692 of file SceneObjectPartInventory.cs.

void OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.StopScriptInstances ( )
inline

Stop all the scripts in this prim.

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 345 of file SceneObjectPartInventory.cs.

bool OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.TryGetScriptInstanceRunning ( UUID  itemId,
out bool  running 
)
inline

Try to get the script running status.

Returns
Returns true if a script for the item was found in one of the simulator's script engines. In this case, the running parameter will reflect the running status. Returns false if the item could not be found, if the item is not a script or if a script instance for the item was not found in any of the script engines. In this case, running status is irrelevant.
Parameters
itemId
running

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 262 of file SceneObjectPartInventory.cs.

static bool OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.TryGetScriptInstanceRunning ( Scene  scene,
TaskInventoryItem  item,
out bool  running 
)
inlinestatic

Definition at line 274 of file SceneObjectPartInventory.cs.

Here is the call graph for this function:

bool OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.UpdateInventoryItem ( TaskInventoryItem  item)
inline

Update an existing inventory item.

Parameters
itemThe updated item. An item with the same id must already exist in this prim's inventory.
Returns
false if the item did not exist, true if the update occurred successfully

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 992 of file SceneObjectPartInventory.cs.

Here is the call graph for this function:

bool OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.UpdateInventoryItem ( TaskInventoryItem  item,
bool  fireScriptEvents 
)
inline

Implements OpenSim.Region.Framework.Interfaces.IEntityInventory.

Definition at line 997 of file SceneObjectPartInventory.cs.

Here is the call graph for this function:

bool OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.UpdateInventoryItem ( TaskInventoryItem  item,
bool  fireScriptEvents,
bool  considerChanged 
)
inline

Member Data Documentation

uint OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.m_inventorySerial = 0
protected

Serial count for inventory file , used to tell if inventory has changed no need for this to be part of Database backup

Definition at line 65 of file SceneObjectPartInventory.cs.

TaskInventoryDictionary OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.m_items = new TaskInventoryDictionary()
protected

Holds in memory prim inventory

Definition at line 70 of file SceneObjectPartInventory.cs.

Property Documentation

int OpenSim.Region.Framework.Scenes.SceneObjectPartInventory.Count
get

Definition at line 103 of file SceneObjectPartInventory.cs.


The documentation for this class was generated from the following file: