C# Class Universe.Modules.Inventory.LLClientInventory

Inheritance: INonSharedRegionModule, ILLClientInventory
Show file Open project: Virtual-Universe/Virtual-Universe

Protected Properties

Property Type Description
m_DefaultLSLScript string
m_scene IScene

Public Methods

Method Description
AddInventoryItem ( InventoryItemBase item ) : void

Add the given inventory item to a user's inventory.

AddInventoryItemAsync ( IClientAPI remoteClient, InventoryItemBase item ) : void

Add an inventory item to an avatar's inventory.

AddInventoryItemAsync ( InventoryItemBase item ) : void

Add the given inventory item to a user's inventory.

AddRegion ( IScene scene ) : void
Close ( ) : void
Initialize ( IConfigSource source ) : void
MoveTaskInventoryItemToObject ( UUID destId, ISceneChildEntity part, UUID itemId ) : void

Copy a task (prim) inventory item to another task (prim)

MoveTaskInventoryItemToUserInventory ( UUID avatarId, UUID folderId, ISceneChildEntity part, UUID itemId, bool checkPermissions ) : InventoryItemBase

Move the given item from the object task inventory to the agent's inventory

MoveTaskInventoryItemsToUserInventory ( UUID destID, string name, ISceneChildEntity host, List items ) : UUID

Move the given items from the object task inventory to the agent's inventory

NoteCardAgentInventory ( UUID agentID, string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse ) : byte[]

Called by the notecard update handler. Provides a URL to which the client can upload a new asset.

RegionLoaded ( IScene scene ) : void
RemoveRegion ( IScene scene ) : void
ReturnObjects ( ISceneEntity returnobjects, UUID agentId ) : bool

Return the given objects to the agent given

RezScript ( UUID srcId, ISceneChildEntity srcPart, UUID destId, int pin, int running, int startParam ) : void

Rez a script into a prim's inventory from another prim This is used for the LSL function llRemoteLoadScriptPin and requires a valid pin to be used

ScriptTaskInventory ( UUID AgentID, string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse ) : byte[]

Called by the script task update handler. Provides a URL to which the client can upload a new asset.

TaskInventoryUpdaterHandle ( UUID AgentID, string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse ) : byte[]

Called by the script task update handler. Provides a URL to which the client can upload a new asset.

Protected Methods

Method Description
ChangeInventoryItemFlags ( IClientAPI remoteClient, UUID itemID, uint flags ) : void

Change an inventory items flags

ClientMoveTaskInventoryItemToUserInventory ( IClientAPI remoteClient, UUID folderId, uint primLocalId, UUID itemId ) : void

Move the inventory folder to another place in the user's inventory

CopyInventoryItem ( IClientAPI remoteClient, uint callbackID, UUID oldAgentID, UUID oldItemID, UUID newFolderID, string newName ) : void

Copy an inventory item in the user's inventory

CreateNewInventoryItem ( IClientAPI remoteClient, UUID transactionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte assetType, byte wearableType, uint nextOwnerMask, int creationDate ) : void

Create a new inventory item. Called when the client creates a new item directly within their inventory (e.g. by selecting a context inventory menu option).

CreateNewInventoryItem ( IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate ) : void

Create a new Inventory Item

DeRezObjects ( IClientAPI remoteClient, List localIDs, UUID groupID, DeRezAction action, UUID destinationID ) : void

Delete the given objects from the Scene and move them into the client's inventory

EventManager_OnClosingClient ( IClientAPI client ) : void

Remove ourselves from the inventory events

EventManager_OnNewClient ( IClientAPI client ) : void

Hook up to the client inventory events

HandleCreateInventoryFolder ( IClientAPI remoteClient, UUID folderID, ushort folderType, string folderName, UUID parentID ) : void

Handle an inventory folder creation request from the client.

HandleFetchInventory ( IClientAPI remoteClient, UUID itemID, UUID ownerID ) : void

Handle a fetch inventory request from the client

HandleFetchInventoryDescendents ( IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder ) : void

Tell the client about the various child items and folders contained in the requested folder.

HandleLinkInventoryItem ( IClientAPI remoteClient, UUID transActionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, UUID olditemID ) : void

Create a new 'link' to another inventory item Used in Viewer 2 for appearance.

HandleMoveInventoryFolder ( IClientAPI remoteClient, UUID folderID, UUID parentID ) : void

Move the inventory folder to another place in the user's inventory

HandlePurgeInventoryDescendents ( IClientAPI remoteClient, UUID folderID ) : void

This should delete all the items and folders in the given directory.

HandleUpdateInventoryFolder ( IClientAPI remoteClient, UUID folderID, ushort type, string name, UUID parentID ) : void

Handle a client request to update the inventory folder

MoveInventoryItem ( IClientAPI remoteClient, List items ) : void

Move an item within the agent's inventory.

MoveTaskInventoryItemToUserInventory ( IClientAPI remoteClient, UUID folderId, ISceneChildEntity part, UUID itemId, bool checkPermissions ) : InventoryItemBase

Move the given item in the given prim to a folder in the client's inventory

RemoveInventoryFolder ( IClientAPI remoteClient, List folderIDs ) : void

Removes an inventory folder. This packet is sent when the user right-clicks a folder that's already in trash and chooses "purge"

RemoveInventoryItem ( IClientAPI remoteClient, List itemIDs ) : void

Remove an inventory item for the client's inventory

RemoveTaskInventory ( IClientAPI remoteClient, UUID itemID, uint localID ) : void

Remove an item from a prim (task) inventory

RequestTaskInventory ( IClientAPI remoteClient, uint primLocalID ) : void

Send the details of a prim's inventory to the client.

RezScript ( IClientAPI remoteClient, InventoryItemBase itemBase, UUID transactionID, uint localID ) : void

Rez a script into a prim's inventory, either ex nihilo or from an existing avatar inventory

SendInventoryAsync ( IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder ) : void
SendInventoryComplete ( IAsyncResult iar ) : void
SendInventoryUpdate ( IClientAPI client, InventoryFolderBase folder, bool fetchFolders, bool fetchItems ) : void

Send an update to the client about the given folder

UpdateInventoryItemAsset ( IClientAPI remoteClient, UUID transactionID, UUID itemID, InventoryItemBase itemUpd ) : void

Update an item which is either already in the client's inventory or is within a transaction

UpdateTaskInventory ( IClientAPI remoteClient, UUID transactionID, TaskInventoryItem itemInfo, uint primLocalID ) : void

Update an item in a prim (task) inventory. This method does not handle scripts, RezScript(IClientAPI, UUID, unit)

Private Methods

Method Description
BuildLandmark ( IScenePresence presence ) : byte[]
CreateAgentInventoryItemFromTask ( UUID destAgent, ISceneChildEntity part, UUID itemId ) : InventoryItemBase

Change a task inventory item to a user inventory item

EventManagerOnRegisterCaps ( UUID agentID, IHttpServer server ) : OSDMap

Register the Caps for inventory

Method Details

AddInventoryItem() public method

Add the given inventory item to a user's inventory.
public AddInventoryItem ( InventoryItemBase item ) : void
item Universe.Framework.Services.ClassHelpers.Inventory.InventoryItemBase The item to add
return void

AddInventoryItemAsync() public method

Add an inventory item to an avatar's inventory.
public AddInventoryItemAsync ( IClientAPI remoteClient, InventoryItemBase item ) : void
remoteClient IClientAPI The remote client controlling the avatar
item Universe.Framework.Services.ClassHelpers.Inventory.InventoryItemBase /// The item. This structure contains all the item metadata, including the folder /// in which the item is to be placed. ///
return void

AddInventoryItemAsync() public method

Add the given inventory item to a user's inventory.
public AddInventoryItemAsync ( InventoryItemBase item ) : void
item Universe.Framework.Services.ClassHelpers.Inventory.InventoryItemBase The item to add
return void

AddRegion() public method

public AddRegion ( IScene scene ) : void
scene IScene
return void

ChangeInventoryItemFlags() protected method

Change an inventory items flags
protected ChangeInventoryItemFlags ( IClientAPI remoteClient, UUID itemID, uint flags ) : void
remoteClient IClientAPI
itemID UUID
flags uint
return void

ClientMoveTaskInventoryItemToUserInventory() protected method

Move the inventory folder to another place in the user's inventory
protected ClientMoveTaskInventoryItemToUserInventory ( IClientAPI remoteClient, UUID folderId, uint primLocalId, UUID itemId ) : void
remoteClient IClientAPI The client that requested the change
folderId UUID The folderID that the task (object) item will be moved into
primLocalId uint The localID of the prim the item is in
itemId UUID The UUID of the item to move
return void

Close() public method

public Close ( ) : void
return void

CopyInventoryItem() protected method

Copy an inventory item in the user's inventory
protected CopyInventoryItem ( IClientAPI remoteClient, uint callbackID, UUID oldAgentID, UUID oldItemID, UUID newFolderID, string newName ) : void
remoteClient IClientAPI
callbackID uint
oldAgentID UUID
oldItemID UUID
newFolderID UUID
newName string
return void

CreateNewInventoryItem() protected method

Create a new inventory item. Called when the client creates a new item directly within their inventory (e.g. by selecting a context inventory menu option).
protected CreateNewInventoryItem ( IClientAPI remoteClient, UUID transactionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte assetType, byte wearableType, uint nextOwnerMask, int creationDate ) : void
remoteClient IClientAPI
transactionID UUID
folderID UUID
callbackID uint
description string
name string
invType sbyte
assetType sbyte
wearableType byte
nextOwnerMask uint
creationDate int
return void

CreateNewInventoryItem() protected method

Create a new Inventory Item
protected CreateNewInventoryItem ( IClientAPI remoteClient, string creatorID, string creatorData, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate ) : void
remoteClient IClientAPI
creatorID string
creatorData string
folderID UUID
name string
flags uint
callbackID uint
asset Universe.Framework.Services.ClassHelpers.Assets.AssetBase
invType sbyte
baseMask uint
currentMask uint
everyoneMask uint
nextOwnerMask uint
groupMask uint
creationDate int
return void

DeRezObjects() protected method

Delete the given objects from the Scene and move them into the client's inventory
protected DeRezObjects ( IClientAPI remoteClient, List localIDs, UUID groupID, DeRezAction action, UUID destinationID ) : void
remoteClient IClientAPI The client requesting the change (can be null if returning objects)
localIDs List A list of all the localIDs of the groups to delete
groupID UUID the GroupID of the objects
action DeRezAction What type of action is causing this
destinationID UUID The folder ID to put the inventory items in
return void

EventManager_OnClosingClient() protected method

Remove ourselves from the inventory events
protected EventManager_OnClosingClient ( IClientAPI client ) : void
client IClientAPI
return void

EventManager_OnNewClient() protected method

Hook up to the client inventory events
protected EventManager_OnNewClient ( IClientAPI client ) : void
client IClientAPI
return void

HandleCreateInventoryFolder() protected method

Handle an inventory folder creation request from the client.
protected HandleCreateInventoryFolder ( IClientAPI remoteClient, UUID folderID, ushort folderType, string folderName, UUID parentID ) : void
remoteClient IClientAPI
folderID UUID
folderType ushort
folderName string
parentID UUID
return void

HandleFetchInventory() protected method

Handle a fetch inventory request from the client
protected HandleFetchInventory ( IClientAPI remoteClient, UUID itemID, UUID ownerID ) : void
remoteClient IClientAPI
itemID UUID
ownerID UUID
return void

HandleFetchInventoryDescendents() protected method

Tell the client about the various child items and folders contained in the requested folder.
protected HandleFetchInventoryDescendents ( IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder ) : void
remoteClient IClientAPI
folderID UUID
ownerID UUID
fetchFolders bool
fetchItems bool
sortOrder int
return void

HandleLinkInventoryItem() protected method

Create a new 'link' to another inventory item Used in Viewer 2 for appearance.
protected HandleLinkInventoryItem ( IClientAPI remoteClient, UUID transActionID, UUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, UUID olditemID ) : void
remoteClient IClientAPI
transActionID UUID
folderID UUID
callbackID uint
description string
name string
invType sbyte
type sbyte
olditemID UUID
return void

HandleMoveInventoryFolder() protected method

Move the inventory folder to another place in the user's inventory
protected HandleMoveInventoryFolder ( IClientAPI remoteClient, UUID folderID, UUID parentID ) : void
remoteClient IClientAPI The client that requested the change
folderID UUID The folder UUID to move
parentID UUID The folder to move the folder (folderID) into
return void

HandlePurgeInventoryDescendents() protected method

This should delete all the items and folders in the given directory.
protected HandlePurgeInventoryDescendents ( IClientAPI remoteClient, UUID folderID ) : void
remoteClient IClientAPI
folderID UUID
return void

HandleUpdateInventoryFolder() protected method

Handle a client request to update the inventory folder
protected HandleUpdateInventoryFolder ( IClientAPI remoteClient, UUID folderID, ushort type, string name, UUID parentID ) : void
remoteClient IClientAPI
folderID UUID
type ushort
name string
parentID UUID
return void

Initialize() public method

public Initialize ( IConfigSource source ) : void
source IConfigSource
return void

MoveInventoryItem() protected method

Move an item within the agent's inventory.
protected MoveInventoryItem ( IClientAPI remoteClient, List items ) : void
remoteClient IClientAPI
items List
return void

MoveTaskInventoryItemToObject() public method

Copy a task (prim) inventory item to another task (prim)
public MoveTaskInventoryItemToObject ( UUID destId, ISceneChildEntity part, UUID itemId ) : void
destId UUID
part ISceneChildEntity
itemId UUID
return void

MoveTaskInventoryItemToUserInventory() protected method

Move the given item in the given prim to a folder in the client's inventory
protected MoveTaskInventoryItemToUserInventory ( IClientAPI remoteClient, UUID folderId, ISceneChildEntity part, UUID itemId, bool checkPermissions ) : InventoryItemBase
remoteClient IClientAPI
folderId UUID
part ISceneChildEntity
itemId UUID
checkPermissions bool
return Universe.Framework.Services.ClassHelpers.Inventory.InventoryItemBase

MoveTaskInventoryItemToUserInventory() public method

Move the given item from the object task inventory to the agent's inventory
public MoveTaskInventoryItemToUserInventory ( UUID avatarId, UUID folderId, ISceneChildEntity part, UUID itemId, bool checkPermissions ) : InventoryItemBase
avatarId UUID
folderId UUID /// The user inventory folder to move (or copy) the item to. If null, then the most /// suitable system folder is used (e.g. the Objects folder for objects). If there is no suitable folder, then /// the item is placed in the user's root inventory folder ///
part ISceneChildEntity
itemId UUID
checkPermissions bool
return Universe.Framework.Services.ClassHelpers.Inventory.InventoryItemBase

MoveTaskInventoryItemsToUserInventory() public method

Move the given items from the object task inventory to the agent's inventory
public MoveTaskInventoryItemsToUserInventory ( UUID destID, string name, ISceneChildEntity host, List items ) : UUID
destID UUID
name string
host ISceneChildEntity
items List
return UUID

NoteCardAgentInventory() public method

Called by the notecard update handler. Provides a URL to which the client can upload a new asset.
public NoteCardAgentInventory ( UUID agentID, string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse ) : byte[]
agentID UUID
path string
request Stream
httpRequest Universe.Framework.Servers.HttpServer.Implementation.OSHttpRequest
httpResponse Universe.Framework.Servers.HttpServer.Implementation.OSHttpResponse
return byte[]

RegionLoaded() public method

public RegionLoaded ( IScene scene ) : void
scene IScene
return void

RemoveInventoryFolder() protected method

Removes an inventory folder. This packet is sent when the user right-clicks a folder that's already in trash and chooses "purge"
protected RemoveInventoryFolder ( IClientAPI remoteClient, List folderIDs ) : void
remoteClient IClientAPI
folderIDs List
return void

RemoveInventoryItem() protected method

Remove an inventory item for the client's inventory
protected RemoveInventoryItem ( IClientAPI remoteClient, List itemIDs ) : void
remoteClient IClientAPI
itemIDs List
return void

RemoveRegion() public method

public RemoveRegion ( IScene scene ) : void
scene IScene
return void

RemoveTaskInventory() protected method

Remove an item from a prim (task) inventory
protected RemoveTaskInventory ( IClientAPI remoteClient, UUID itemID, uint localID ) : void
remoteClient IClientAPI /// Unused at the moment but retained since the avatar ID might /// be necessary for a permissions check at some stage. ///
itemID UUID
localID uint
return void

RequestTaskInventory() protected method

Send the details of a prim's inventory to the client.
protected RequestTaskInventory ( IClientAPI remoteClient, uint primLocalID ) : void
remoteClient IClientAPI
primLocalID uint
return void

ReturnObjects() public method

Return the given objects to the agent given
public ReturnObjects ( ISceneEntity returnobjects, UUID agentId ) : bool
returnobjects ISceneEntity The objects to return
agentId UUID The agent UUID that will get the inventory items for these objects
return bool

RezScript() protected method

Rez a script into a prim's inventory, either ex nihilo or from an existing avatar inventory
protected RezScript ( IClientAPI remoteClient, InventoryItemBase itemBase, UUID transactionID, uint localID ) : void
remoteClient IClientAPI
itemBase Universe.Framework.Services.ClassHelpers.Inventory.InventoryItemBase
transactionID UUID
localID uint
return void

RezScript() public method

Rez a script into a prim's inventory from another prim This is used for the LSL function llRemoteLoadScriptPin and requires a valid pin to be used
public RezScript ( UUID srcId, ISceneChildEntity srcPart, UUID destId, int pin, int running, int startParam ) : void
srcId UUID The UUID of the script that is going to be copied
srcPart ISceneChildEntity The prim that the script that is going to be copied from
destId UUID The UUID of the prim that the
pin int The ScriptAccessPin of the prim
running int Whether the script should be running when it is started
startParam int The start param to pass to the script
return void

ScriptTaskInventory() public method

Called by the script task update handler. Provides a URL to which the client can upload a new asset.
public ScriptTaskInventory ( UUID AgentID, string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse ) : byte[]
AgentID UUID
path string
request Stream
httpRequest Universe.Framework.Servers.HttpServer.Implementation.OSHttpRequest HTTP request header object
httpResponse Universe.Framework.Servers.HttpServer.Implementation.OSHttpResponse HTTP response header object
return byte[]

SendInventoryAsync() protected method

protected SendInventoryAsync ( IClientAPI remoteClient, UUID folderID, UUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder ) : void
remoteClient IClientAPI
folderID UUID
ownerID UUID
fetchFolders bool
fetchItems bool
sortOrder int
return void

SendInventoryComplete() protected method

protected SendInventoryComplete ( IAsyncResult iar ) : void
iar IAsyncResult
return void

SendInventoryUpdate() protected method

Send an update to the client about the given folder
protected SendInventoryUpdate ( IClientAPI client, InventoryFolderBase folder, bool fetchFolders, bool fetchItems ) : void
client IClientAPI The client to send the update to
folder Universe.Framework.Services.ClassHelpers.Inventory.InventoryFolderBase The folder that we need to send
fetchFolders bool Should we fetch folders inside of this folder
fetchItems bool Should we fetch items inside of this folder
return void

TaskInventoryUpdaterHandle() public method

Called by the script task update handler. Provides a URL to which the client can upload a new asset.
public TaskInventoryUpdaterHandle ( UUID AgentID, string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse ) : byte[]
AgentID UUID
path string
request Stream
httpRequest Universe.Framework.Servers.HttpServer.Implementation.OSHttpRequest HTTP request header object
httpResponse Universe.Framework.Servers.HttpServer.Implementation.OSHttpResponse HTTP response header object
return byte[]

UpdateInventoryItemAsset() protected method

Update an item which is either already in the client's inventory or is within a transaction
protected UpdateInventoryItemAsset ( IClientAPI remoteClient, UUID transactionID, UUID itemID, InventoryItemBase itemUpd ) : void
remoteClient IClientAPI
transactionID UUID /// The transaction ID. If this is UUID.Zero we will /// assume that we are not in a transaction ///
itemID UUID The ID of the updated item
itemUpd Universe.Framework.Services.ClassHelpers.Inventory.InventoryItemBase
return void

UpdateTaskInventory() protected method

Update an item in a prim (task) inventory. This method does not handle scripts, RezScript(IClientAPI, UUID, unit)
protected UpdateTaskInventory ( IClientAPI remoteClient, UUID transactionID, TaskInventoryItem itemInfo, uint primLocalID ) : void
remoteClient IClientAPI
transactionID UUID
itemInfo Universe.Framework.SceneInfo.TaskInventoryItem
primLocalID uint
return void

Property Details

m_DefaultLSLScript protected property

protected string m_DefaultLSLScript
return string

m_scene protected property

protected IScene m_scene
return IScene