diff options
author | Melanie Thielker | 2009-05-09 00:39:01 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-05-09 00:39:01 +0000 |
commit | a582d1b1a201224df97d1e4030ae7d471aa7f120 (patch) | |
tree | d5ac7f936ac3841fe37b6b48524ea43910e35e83 /OpenSim/Servers/Base | |
parent | * Fix windows build. Thanks RemedyTomm for the patch (diff) | |
download | opensim-SC-a582d1b1a201224df97d1e4030ae7d471aa7f120.zip opensim-SC-a582d1b1a201224df97d1e4030ae7d471aa7f120.tar.gz opensim-SC-a582d1b1a201224df97d1e4030ae7d471aa7f120.tar.bz2 opensim-SC-a582d1b1a201224df97d1e4030ae7d471aa7f120.tar.xz |
Add the /data and /metadata retrieval modes to the new asset server.
Not functional yet.
Diffstat (limited to 'OpenSim/Servers/Base')
-rw-r--r-- | OpenSim/Servers/Base/ServerUtils.cs | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/OpenSim/Servers/Base/ServerUtils.cs b/OpenSim/Servers/Base/ServerUtils.cs new file mode 100644 index 0000000..b648e45 --- /dev/null +++ b/OpenSim/Servers/Base/ServerUtils.cs | |||
@@ -0,0 +1,75 @@ | |||
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 OpenSim 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 | namespace OpenSim.Servers.AssetServer | ||
29 | { | ||
30 | public static class ServerUtils | ||
31 | { | ||
32 | public static string SLAssetTypeToContentType(int assetType) | ||
33 | { | ||
34 | switch (assetType) | ||
35 | { | ||
36 | case 0: | ||
37 | return "image/jp2"; | ||
38 | case 1: | ||
39 | return "application/ogg"; | ||
40 | case 2: | ||
41 | return "application/x-metaverse-callingcard"; | ||
42 | case 3: | ||
43 | return "application/x-metaverse-landmark"; | ||
44 | case 5: | ||
45 | return "application/x-metaverse-clothing"; | ||
46 | case 6: | ||
47 | return "application/x-metaverse-primitive"; | ||
48 | case 7: | ||
49 | return "application/x-metaverse-notecard"; | ||
50 | case 8: | ||
51 | return "application/x-metaverse-folder"; | ||
52 | case 10: | ||
53 | return "application/x-metaverse-lsl"; | ||
54 | case 11: | ||
55 | return "application/x-metaverse-lso"; | ||
56 | case 12: | ||
57 | return "image/tga"; | ||
58 | case 13: | ||
59 | return "application/x-metaverse-bodypart"; | ||
60 | case 17: | ||
61 | return "audio/x-wav"; | ||
62 | case 19: | ||
63 | return "image/jpeg"; | ||
64 | case 20: | ||
65 | return "application/x-metaverse-animation"; | ||
66 | case 21: | ||
67 | return "application/x-metaverse-gesture"; | ||
68 | case 22: | ||
69 | return "application/x-metaverse-simstate"; | ||
70 | default: | ||
71 | return "application/octet-stream"; | ||
72 | } | ||
73 | } | ||
74 | } | ||
75 | } | ||