diff options
author | lbsa71 | 2007-12-27 21:41:48 +0000 |
---|---|---|
committer | lbsa71 | 2007-12-27 21:41:48 +0000 |
commit | efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch) | |
tree | bf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Grid/InventoryServer/GridInventoryService.cs | |
parent | * removed always true if (diff) | |
download | opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2 opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz |
* Optimized usings
* shortened references
* Removed redundant 'this'
* Normalized EOF
Diffstat (limited to 'OpenSim/Grid/InventoryServer/GridInventoryService.cs')
-rw-r--r-- | OpenSim/Grid/InventoryServer/GridInventoryService.cs | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index ca2e526..d36a915 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -28,23 +28,22 @@ | |||
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | 31 | using libsecondlife; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Communications; | 33 | using OpenSim.Framework.Communications; |
34 | using OpenSim.Framework.Console; | 34 | using OpenSim.Framework.Console; |
35 | using libsecondlife; | ||
36 | 35 | ||
37 | namespace OpenSim.Grid.InventoryServer | 36 | namespace OpenSim.Grid.InventoryServer |
38 | { | 37 | { |
39 | public class GridInventoryService : InventoryServiceBase | 38 | public class GridInventoryService : InventoryServiceBase |
40 | { | 39 | { |
41 | public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, | 40 | public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, |
42 | InventoryItemInfo itemCallBack) | 41 | InventoryItemInfo itemCallBack) |
43 | { | 42 | { |
44 | |||
45 | } | 43 | } |
46 | 44 | ||
47 | private bool TryGetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList, out List<InventoryItemBase> itemsList) | 45 | private bool TryGetUsersInventory(LLUUID userID, out List<InventoryFolderBase> folderList, |
46 | out List<InventoryItemBase> itemsList) | ||
48 | { | 47 | { |
49 | List<InventoryFolderBase> rootFolders = RequestFirstLevelFolders(userID); | 48 | List<InventoryFolderBase> rootFolders = RequestFirstLevelFolders(userID); |
50 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); | 49 | List<InventoryItemBase> allItems = new List<InventoryItemBase>(); |
@@ -107,10 +106,10 @@ namespace OpenSim.Grid.InventoryServer | |||
107 | public InventoryCollection GetUserInventory(Guid rawUserID) | 106 | public InventoryCollection GetUserInventory(Guid rawUserID) |
108 | { | 107 | { |
109 | LLUUID userID = new LLUUID(rawUserID); | 108 | LLUUID userID = new LLUUID(rawUserID); |
110 | 109 | ||
111 | // We get enough verbose messages later on for diagnostics | 110 | // We get enough verbose messages later on for diagnostics |
112 | //MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToString()); | 111 | //MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToString()); |
113 | 112 | ||
114 | InventoryCollection invCollection = new InventoryCollection(); | 113 | InventoryCollection invCollection = new InventoryCollection(); |
115 | List<InventoryFolderBase> folders; | 114 | List<InventoryFolderBase> folders; |
116 | List<InventoryItemBase> allItems; | 115 | List<InventoryItemBase> allItems; |
@@ -126,14 +125,14 @@ namespace OpenSim.Grid.InventoryServer | |||
126 | public bool CreateUsersInventory(Guid rawUserID) | 125 | public bool CreateUsersInventory(Guid rawUserID) |
127 | { | 126 | { |
128 | LLUUID userID = new LLUUID(rawUserID); | 127 | LLUUID userID = new LLUUID(rawUserID); |
129 | 128 | ||
130 | MainLog.Instance.Verbose( | 129 | MainLog.Instance.Verbose( |
131 | "INVENTORY", "Creating new set of inventory folders for " + userID.ToString()); | 130 | "INVENTORY", "Creating new set of inventory folders for " + userID.ToString()); |
132 | 131 | ||
133 | CreateNewUserInventory(userID); | 132 | CreateNewUserInventory(userID); |
134 | return true; | 133 | return true; |
135 | } | 134 | } |
136 | 135 | ||
137 | 136 | ||
138 | public override void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder) | 137 | public override void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder) |
139 | { | 138 | { |
@@ -156,30 +155,30 @@ namespace OpenSim.Grid.InventoryServer | |||
156 | MainLog.Instance.Verbose( | 155 | MainLog.Instance.Verbose( |
157 | "INVENTORY", | 156 | "INVENTORY", |
158 | "Updating in " + folder.parentID.ToString() | 157 | "Updating in " + folder.parentID.ToString() |
159 | + ", folder " + folder.name); | 158 | + ", folder " + folder.name); |
160 | 159 | ||
161 | AddNewInventoryFolder(folder.agentID, folder); | 160 | AddNewInventoryFolder(folder.agentID, folder); |
162 | return true; | 161 | return true; |
163 | } | 162 | } |
164 | 163 | ||
165 | public bool MoveInventoryFolder(InventoryFolderBase folder) | 164 | public bool MoveInventoryFolder(InventoryFolderBase folder) |
166 | { | 165 | { |
167 | MainLog.Instance.Verbose( | 166 | MainLog.Instance.Verbose( |
168 | "INVENTORY", | 167 | "INVENTORY", |
169 | "Moving folder " + folder.folderID | 168 | "Moving folder " + folder.folderID |
170 | + " to " + folder.parentID.ToString()); | 169 | + " to " + folder.parentID.ToString()); |
171 | 170 | ||
172 | MoveExistingInventoryFolder(folder); | 171 | MoveExistingInventoryFolder(folder); |
173 | return true; | 172 | return true; |
174 | } | 173 | } |
175 | 174 | ||
176 | public bool AddInventoryItem( InventoryItemBase item) | 175 | public bool AddInventoryItem(InventoryItemBase item) |
177 | { | 176 | { |
178 | // Right now, this actions act more like an update/insert combination than a simple create. | 177 | // Right now, this actions act more like an update/insert combination than a simple create. |
179 | MainLog.Instance.Verbose( | 178 | MainLog.Instance.Verbose( |
180 | "INVENTORY", | 179 | "INVENTORY", |
181 | "Updating in " + item.parentFolderID.ToString() | 180 | "Updating in " + item.parentFolderID.ToString() |
182 | + ", item " + item.inventoryName); | 181 | + ", item " + item.inventoryName); |
183 | 182 | ||
184 | AddNewInventoryItem(item.avatarID, item); | 183 | AddNewInventoryItem(item.avatarID, item); |
185 | return true; | 184 | return true; |
@@ -191,15 +190,15 @@ namespace OpenSim.Grid.InventoryServer | |||
191 | MainLog.Instance.Verbose( | 190 | MainLog.Instance.Verbose( |
192 | "INVENTORY", | 191 | "INVENTORY", |
193 | "Deleting in " + item.parentFolderID.ToString() | 192 | "Deleting in " + item.parentFolderID.ToString() |
194 | + ", item " + item.inventoryName); | 193 | + ", item " + item.inventoryName); |
195 | 194 | ||
196 | DeleteItem(item); | 195 | DeleteItem(item); |
197 | } | 196 | } |
198 | 197 | ||
199 | public bool DeleteInvItem( InventoryItemBase item) | 198 | public bool DeleteInvItem(InventoryItemBase item) |
200 | { | 199 | { |
201 | DeleteInventoryItem(item.avatarID, item); | 200 | DeleteInventoryItem(item.avatarID, item); |
202 | return true; | 201 | return true; |
203 | } | 202 | } |
204 | } | 203 | } |
205 | } | 204 | } \ No newline at end of file |