aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/share/perl/lib/OpenSim/AssetServer/AssetManager.pm
diff options
context:
space:
mode:
authorAdam Frisby2008-03-25 16:29:54 +0000
committerAdam Frisby2008-03-25 16:29:54 +0000
commit8c05b81d6860d8e0da4098cc6f59f630d7c53037 (patch)
tree3325e09660ee8ad5a12cc19c8da6c4bd8bff5c21 /share/perl/lib/OpenSim/AssetServer/AssetManager.pm
parent* On Ray casting. Now returning the face normal of the collision face. (diff)
downloadopensim-SC-8c05b81d6860d8e0da4098cc6f59f630d7c53037.zip
opensim-SC-8c05b81d6860d8e0da4098cc6f59f630d7c53037.tar.gz
opensim-SC-8c05b81d6860d8e0da4098cc6f59f630d7c53037.tar.bz2
opensim-SC-8c05b81d6860d8e0da4098cc6f59f630d7c53037.tar.xz
* Committing Lulurun's Cgi/Perl implementation of the UGAI servers.
* I love you long time.
Diffstat (limited to 'share/perl/lib/OpenSim/AssetServer/AssetManager.pm')
-rw-r--r--share/perl/lib/OpenSim/AssetServer/AssetManager.pm34
1 files changed, 34 insertions, 0 deletions
diff --git a/share/perl/lib/OpenSim/AssetServer/AssetManager.pm b/share/perl/lib/OpenSim/AssetServer/AssetManager.pm
new file mode 100644
index 0000000..f36ab1a
--- /dev/null
+++ b/share/perl/lib/OpenSim/AssetServer/AssetManager.pm
@@ -0,0 +1,34 @@
1package OpenSim::AssetServer::AssetManager;
2
3use strict;
4use Carp;
5use OpenSim::Utility;
6use OpenSim::AssetServer::Config;
7
8
9sub getAssetByUUID {
10 my $uuid = shift;
11 my $result = &OpenSim::Utility::getSimpleResult($OpenSim::AssetServer::Config::SYS_SQL{select_asset_by_uuid}, $uuid);
12 my $count = @$result;
13 if ($count > 0) {
14 return $result->[0];
15 }
16 Carp::croak("can not find asset($uuid)");
17}
18
19sub saveAsset {
20 my $asset = shift;
21 my $result = &OpenSim::Utility::getSimpleResult(
22 $OpenSim::AssetServer::Config::SYS_SQL{insert_asset},
23 $asset->{id},
24 $asset->{name},
25 $asset->{description},
26 $asset->{assetType},
27 $asset->{invType},
28 $asset->{"local"},
29 $asset->{temporary},
30 $asset->{data}
31 );
32}
33
341;