opensim – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | eva | 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; |
||
29 | using System.Collections.Generic; |
||
30 | using OpenSim.Framework; |
||
31 | using OpenMetaverse; |
||
32 | |||
33 | namespace OpenSim.Services.Interfaces |
||
34 | { |
||
35 | /// <summary> |
||
36 | /// Callback used when a user's inventory is received from the inventory service |
||
37 | /// </summary> |
||
38 | public delegate void InventoryReceiptCallback( |
||
39 | ICollection<InventoryFolderImpl> folders, ICollection<InventoryItemBase> items); |
||
40 | |||
41 | public interface IInventoryService |
||
42 | { |
||
43 | /// <summary> |
||
44 | /// Create the entire inventory for a given user |
||
45 | /// </summary> |
||
46 | /// <param name="user"></param> |
||
47 | /// <returns></returns> |
||
48 | bool CreateUserInventory(UUID user); |
||
49 | |||
50 | /// <summary> |
||
51 | /// Gets the skeleton of the inventory -- folders only |
||
52 | /// </summary> |
||
53 | /// <param name="userId"></param> |
||
54 | /// <returns></returns> |
||
55 | List<InventoryFolderBase> GetInventorySkeleton(UUID userId); |
||
56 | |||
57 | /// <summary> |
||
58 | /// Synchronous inventory fetch. |
||
59 | /// </summary> |
||
60 | /// <param name="userID"></param> |
||
61 | /// <returns></returns> |
||
62 | [Obsolete] |
||
63 | InventoryCollection GetUserInventory(UUID userID); |
||
64 | |||
65 | /// <summary> |
||
66 | /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the |
||
67 | /// inventory has been received |
||
68 | /// </summary> |
||
69 | /// <param name="userID"></param> |
||
70 | /// <param name="callback"></param> |
||
71 | [Obsolete] |
||
72 | void GetUserInventory(UUID userID, InventoryReceiptCallback callback); |
||
73 | |||
74 | /// <summary> |
||
75 | /// Retrieve the root inventory folder for the given user. |
||
76 | /// </summary> |
||
77 | /// <param name="userID"></param> |
||
78 | /// <returns>null if no root folder was found</returns> |
||
79 | InventoryFolderBase GetRootFolder(UUID userID); |
||
80 | |||
81 | /// <summary> |
||
82 | /// Gets the user folder for the given folder-type |
||
83 | /// </summary> |
||
84 | /// <param name="userID"></param> |
||
85 | /// <param name="type"></param> |
||
86 | /// <returns></returns> |
||
87 | InventoryFolderBase GetFolderForType(UUID userID, AssetType type); |
||
88 | |||
89 | /// <summary> |
||
90 | /// Gets everything (folders and items) inside a folder |
||
91 | /// </summary> |
||
92 | /// <param name="userId"></param> |
||
93 | /// <param name="folderID"></param> |
||
94 | /// <returns></returns> |
||
95 | InventoryCollection GetFolderContent(UUID userID, UUID folderID); |
||
96 | |||
97 | /// <summary> |
||
98 | /// Gets the items inside a folder |
||
99 | /// </summary> |
||
100 | /// <param name="userID"></param> |
||
101 | /// <param name="folderID"></param> |
||
102 | /// <returns></returns> |
||
103 | List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID); |
||
104 | |||
105 | /// <summary> |
||
106 | /// Add a new folder to the user's inventory |
||
107 | /// </summary> |
||
108 | /// <param name="folder"></param> |
||
109 | /// <returns>true if the folder was successfully added</returns> |
||
110 | bool AddFolder(InventoryFolderBase folder); |
||
111 | |||
112 | /// <summary> |
||
113 | /// Update a folder in the user's inventory |
||
114 | /// </summary> |
||
115 | /// <param name="folder"></param> |
||
116 | /// <returns>true if the folder was successfully updated</returns> |
||
117 | bool UpdateFolder(InventoryFolderBase folder); |
||
118 | |||
119 | /// <summary> |
||
120 | /// Move an inventory folder to a new location |
||
121 | /// </summary> |
||
122 | /// <param name="folder">A folder containing the details of the new location</param> |
||
123 | /// <returns>true if the folder was successfully moved</returns> |
||
124 | bool MoveFolder(InventoryFolderBase folder); |
||
125 | |||
126 | /// <summary> |
||
127 | /// Delete an item from the user's inventory |
||
128 | /// </summary> |
||
129 | /// <param name="item"></param> |
||
130 | /// <returns>true if the item was successfully deleted</returns> |
||
131 | //bool DeleteItem(InventoryItemBase item); |
||
132 | bool DeleteFolders(UUID userID, List<UUID> folderIDs); |
||
133 | |||
134 | /// <summary> |
||
135 | /// Purge an inventory folder of all its items and subfolders. |
||
136 | /// </summary> |
||
137 | /// <param name="folder"></param> |
||
138 | /// <returns>true if the folder was successfully purged</returns> |
||
139 | bool PurgeFolder(InventoryFolderBase folder); |
||
140 | |||
141 | /// <summary> |
||
142 | /// Add a new item to the user's inventory |
||
143 | /// </summary> |
||
144 | /// <param name="item"> |
||
145 | /// The item to be added. If item.FolderID == UUID.Zero then the item is added to the most suitable system |
||
146 | /// folder. If there is no suitable folder then the item is added to the user's root inventory folder. |
||
147 | /// </param> |
||
148 | /// <returns>true if the item was successfully added, false if it was not</returns> |
||
149 | bool AddItem(InventoryItemBase item); |
||
150 | |||
151 | /// <summary> |
||
152 | /// Update an item in the user's inventory |
||
153 | /// </summary> |
||
154 | /// <param name="item"></param> |
||
155 | /// <returns>true if the item was successfully updated</returns> |
||
156 | bool UpdateItem(InventoryItemBase item); |
||
157 | |||
158 | bool MoveItems(UUID ownerID, List<InventoryItemBase> items); |
||
159 | |||
160 | /// <summary> |
||
161 | /// Delete an item from the user's inventory |
||
162 | /// </summary> |
||
163 | /// <param name="item"></param> |
||
164 | /// <returns>true if the item was successfully deleted</returns> |
||
165 | //bool DeleteItem(InventoryItemBase item); |
||
166 | bool DeleteItems(UUID userID, List<UUID> itemIDs); |
||
167 | |||
168 | /// <summary> |
||
169 | /// Get an item, given by its UUID |
||
170 | /// </summary> |
||
171 | /// <param name="item"></param> |
||
172 | /// <returns>null if no item was found, otherwise the found item</returns> |
||
173 | InventoryItemBase GetItem(InventoryItemBase item); |
||
174 | |||
175 | /// <summary> |
||
176 | /// Get a folder, given by its UUID |
||
177 | /// </summary> |
||
178 | /// <param name="folder"></param> |
||
179 | /// <returns></returns> |
||
180 | InventoryFolderBase GetFolder(InventoryFolderBase folder); |
||
181 | |||
182 | /// <summary> |
||
183 | /// Does the given user have an inventory structure? |
||
184 | /// </summary> |
||
185 | /// <param name="userID"></param> |
||
186 | /// <returns></returns> |
||
187 | bool HasInventoryForUser(UUID userID); |
||
188 | |||
189 | /// <summary> |
||
190 | /// Get the active gestures of the agent. |
||
191 | /// </summary> |
||
192 | /// <param name="userId"></param> |
||
193 | /// <returns></returns> |
||
194 | List<InventoryItemBase> GetActiveGestures(UUID userId); |
||
195 | |||
196 | /// <summary> |
||
197 | /// Get the union of permissions of all inventory items |
||
198 | /// that hold the given assetID. |
||
199 | /// </summary> |
||
200 | /// <param name="userID"></param> |
||
201 | /// <param name="assetID"></param> |
||
202 | /// <returns>The permissions or 0 if no such asset is found in |
||
203 | /// the user's inventory</returns> |
||
204 | int GetAssetPermissions(UUID userID, UUID assetID); |
||
205 | } |
||
206 | } |