diff options
author | Justin Clarke Casey | 2008-04-08 11:19:34 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-08 11:19:34 +0000 |
commit | 0c601b73125d1bc120e248149bf4d83ecc27f1c2 (patch) | |
tree | 6c12f957e3cedda58a725b25e43b9595124bfb54 /share/perl/lib/OpenSim/InventoryServer | |
parent | * Added stretchable ellipsoid support with configurable LOD. It's actually a... (diff) | |
download | opensim-SC_OLD-0c601b73125d1bc120e248149bf4d83ecc27f1c2.zip opensim-SC_OLD-0c601b73125d1bc120e248149bf4d83ecc27f1c2.tar.gz opensim-SC_OLD-0c601b73125d1bc120e248149bf4d83ecc27f1c2.tar.bz2 opensim-SC_OLD-0c601b73125d1bc120e248149bf4d83ecc27f1c2.tar.xz |
* Removing lulurun's perl UGAI from core svn, pending a link to an external repository, as per mailing list discussion.
Diffstat (limited to 'share/perl/lib/OpenSim/InventoryServer')
-rw-r--r-- | share/perl/lib/OpenSim/InventoryServer/Config.pm | 51 | ||||
-rw-r--r-- | share/perl/lib/OpenSim/InventoryServer/InventoryManager.pm | 86 |
2 files changed, 0 insertions, 137 deletions
diff --git a/share/perl/lib/OpenSim/InventoryServer/Config.pm b/share/perl/lib/OpenSim/InventoryServer/Config.pm deleted file mode 100644 index 64dbdd1..0000000 --- a/share/perl/lib/OpenSim/InventoryServer/Config.pm +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | package OpenSim::InventoryServer::Config; | ||
2 | |||
3 | use strict; | ||
4 | |||
5 | our %SYS_SQL = ( | ||
6 | save_inventory_folder => | ||
7 | "REPLACE INTO inventoryfolders VALUES (?,?,?,?,?,?)", | ||
8 | save_inventory_item => | ||
9 | "REPLACE INTO inventoryitems VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)", | ||
10 | get_root_folder => | ||
11 | "SELECT * FROM inventoryfolders WHERE parentFolderID=? AND agentId=?", | ||
12 | get_children_folders => | ||
13 | "SELECT * FROM inventoryfolders WHERE parentFolderID=?", | ||
14 | get_user_inventory_folders => | ||
15 | "SELECT * FROM inventoryfolders WHERE agentID=?", | ||
16 | get_user_inventory_items => | ||
17 | "SELECT * FROM inventoryitems WHERE avatarID=?", | ||
18 | delete_inventory_item => | ||
19 | "DELETE FROM inventoryitems WHERE inventoryID=?", | ||
20 | move_inventory_folder => | ||
21 | "UPDATE inventoryfolders SET parentFolderID=? WHERE folderID=?", | ||
22 | ); | ||
23 | |||
24 | |||
25 | our @INVENTORYFOLDERS_COLUMNS = ( | ||
26 | "folderID", | ||
27 | "agentID", | ||
28 | "parentFolderID", | ||
29 | "folderName", | ||
30 | "type", | ||
31 | "version", | ||
32 | ); | ||
33 | |||
34 | our @INVENTORYITEMS_COLUMNS = ( | ||
35 | "inventoryID", | ||
36 | "assetID", | ||
37 | "type", | ||
38 | "parentFolderID", | ||
39 | "avatarID", | ||
40 | "inventoryName", | ||
41 | "inventoryDescription", | ||
42 | "inventoryNextPermissions", | ||
43 | "inventoryCurrentPermissions", | ||
44 | "assetType", | ||
45 | "invType", | ||
46 | "creatorID", | ||
47 | "inventoryBasePermissions", | ||
48 | "inventoryEveryOnePermissions", | ||
49 | ); | ||
50 | |||
51 | 1; | ||
diff --git a/share/perl/lib/OpenSim/InventoryServer/InventoryManager.pm b/share/perl/lib/OpenSim/InventoryServer/InventoryManager.pm deleted file mode 100644 index 97111b7..0000000 --- a/share/perl/lib/OpenSim/InventoryServer/InventoryManager.pm +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | package OpenSim::InventoryServer::InventoryManager; | ||
2 | |||
3 | use strict; | ||
4 | use Carp; | ||
5 | use OpenSim::Utility; | ||
6 | use OpenSim::InventoryServer::Config; | ||
7 | |||
8 | sub saveInventoryFolder { | ||
9 | my $folder = shift; | ||
10 | my $result = &OpenSim::Utility::getSimpleResult($OpenSim::InventoryServer::Config::SYS_SQL{save_inventory_folder}, | ||
11 | $folder->{"folderID"}, | ||
12 | $folder->{"agentID"}, | ||
13 | $folder->{"parentFolderID"}, | ||
14 | $folder->{"folderName"}, | ||
15 | $folder->{"type"}, | ||
16 | $folder->{"version"}); | ||
17 | } | ||
18 | |||
19 | sub saveInventoryItem { | ||
20 | my $item = shift; | ||
21 | my $result = &OpenSim::Utility::getSimpleResult($OpenSim::InventoryServer::Config::SYS_SQL{save_inventory_item}, | ||
22 | $item->{"inventoryID"}, | ||
23 | $item->{"assetID"}, | ||
24 | $item->{"type"}, | ||
25 | $item->{"parentFolderID"}, | ||
26 | $item->{"avatarID"}, | ||
27 | $item->{"inventoryName"}, | ||
28 | $item->{"inventoryDescription"}, | ||
29 | $item->{"inventoryNextPermissions"}, | ||
30 | $item->{"inventoryCurrentPermissions"}, | ||
31 | $item->{"assetType"}, | ||
32 | $item->{"invType"}, | ||
33 | $item->{"creatorID"}, | ||
34 | $item->{"inventoryBasePermissions"}, | ||
35 | $item->{"inventoryEveryOnePermissions"}); | ||
36 | } | ||
37 | |||
38 | sub getRootFolder { | ||
39 | my $agent_id = shift; | ||
40 | my $result = &OpenSim::Utility::getSimpleResult($OpenSim::InventoryServer::Config::SYS_SQL{get_root_folder}, | ||
41 | &OpenSim::Utility::ZeroUUID(), | ||
42 | $agent_id); | ||
43 | my $count = @$result; | ||
44 | if ($count > 0) { | ||
45 | return $result->[0]; | ||
46 | } else { | ||
47 | return undef; | ||
48 | } | ||
49 | } | ||
50 | |||
51 | sub getChildrenFolders { | ||
52 | my $parent_id = shift; | ||
53 | my $result = &OpenSim::Utility::getSimpleResult($OpenSim::InventoryServer::Config::SYS_SQL{get_children_folders}, $parent_id); | ||
54 | return $result; | ||
55 | } | ||
56 | |||
57 | sub getUserInventoryFolders { | ||
58 | my $agent_id = shift; | ||
59 | my $result = &OpenSim::Utility::getSimpleResult($OpenSim::InventoryServer::Config::SYS_SQL{get_user_inventory_folders}, | ||
60 | $agent_id); | ||
61 | return $result; | ||
62 | } | ||
63 | |||
64 | sub getUserInventoryItems { | ||
65 | my $agent_id = shift; | ||
66 | my $result = &OpenSim::Utility::getSimpleResult($OpenSim::InventoryServer::Config::SYS_SQL{get_user_inventory_items}, | ||
67 | $agent_id); | ||
68 | return $result; | ||
69 | } | ||
70 | |||
71 | sub deleteInventoryItem { | ||
72 | my $item_id = shift; | ||
73 | &OpenSim::Utility::getSimpleResult($OpenSim::InventoryServer::Config::SYS_SQL{delete_inventory_item}, | ||
74 | $item_id); | ||
75 | } | ||
76 | |||
77 | sub moveInventoryFolder { | ||
78 | my $info = shift; | ||
79 | &OpenSim::Utility::getSimpleResult($OpenSim::InventoryServer::Config::SYS_SQL{move_inventory_folder}, | ||
80 | $info->{parentID}->{UUID}, # TODO: not good | ||
81 | $info->{folderID}->{UUID}, # TODO: not good UUID should be extracted in the higher level | ||
82 | ); | ||
83 | } | ||
84 | |||
85 | 1; | ||
86 | |||