aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local/LocalInventoryService.cs
diff options
context:
space:
mode:
authorMW2007-08-14 13:54:46 +0000
committerMW2007-08-14 13:54:46 +0000
commita228b5984e6523456871f2f8e51aa086050acbf2 (patch)
treeb79888d4aa588c08fbb78bfcc78df3f47d7b5bea /OpenSim/Region/Communications/Local/LocalInventoryService.cs
parentDisabled ScriptEngine until I add error handling tomorrow (diff)
downloadopensim-SC_OLD-a228b5984e6523456871f2f8e51aa086050acbf2.zip
opensim-SC_OLD-a228b5984e6523456871f2f8e51aa086050acbf2.tar.gz
opensim-SC_OLD-a228b5984e6523456871f2f8e51aa086050acbf2.tar.bz2
opensim-SC_OLD-a228b5984e6523456871f2f8e51aa086050acbf2.tar.xz
Start of Inventory service, currently only (partially) functional in standalone mode and using sqlite).
In standalone mode, if you have account authenticate turned on (setting in opensim.ini) then when you create a new account, a set of inventory is created for that account and stored in database (currently only a set of empty folders). Then during login the database is search for that set and sent to the client in the login response. More functions will be added soon, like creating new folders (and a bit later items) from the client inventory window.
Diffstat (limited to 'OpenSim/Region/Communications/Local/LocalInventoryService.cs')
-rw-r--r--OpenSim/Region/Communications/Local/LocalInventoryService.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
new file mode 100644
index 0000000..35c2c8c
--- /dev/null
+++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
@@ -0,0 +1,51 @@
1using System;
2using System.Collections.Generic;
3using libsecondlife;
4using OpenSim.Framework.Communications;
5using OpenSim.Framework.Data;
6using OpenSim.Framework.Types;
7using OpenSim.Framework.UserManagement;
8using OpenSim.Framework.Utilities;
9using OpenSim.Framework.InventoryServiceBase;
10using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder;
11
12namespace OpenSim.Region.Communications.Local
13{
14 public class LocalInventoryService : InventoryServiceBase , IInventoryServices
15 {
16
17 public LocalInventoryService()
18 {
19
20 }
21
22 public void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack)
23 {
24 List<InventoryFolderBase> folders = this.RequestFirstLevelFolders(userID);
25 InventoryFolder rootFolder = null;
26
27 //need to make sure we send root folder first
28 foreach (InventoryFolderBase folder in folders)
29 {
30 if (folder.parentID == libsecondlife.LLUUID.Zero)
31 {
32 InventoryFolder newfolder = new InventoryFolder(folder);
33 rootFolder = newfolder;
34 folderCallBack(userID, newfolder);
35 }
36 }
37
38 if (rootFolder != null)
39 {
40 foreach (InventoryFolderBase folder in folders)
41 {
42 if (folder.folderID != rootFolder.folderID)
43 {
44 InventoryFolder newfolder = new InventoryFolder(folder);
45 folderCallBack(userID, newfolder);
46 }
47 }
48 }
49 }
50 }
51}