diff options
Diffstat (limited to 'OpenSim/Services/AssetService/HGAssetService.cs')
-rw-r--r-- | OpenSim/Services/AssetService/HGAssetService.cs | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/OpenSim/Services/AssetService/HGAssetService.cs b/OpenSim/Services/AssetService/HGAssetService.cs new file mode 100644 index 0000000..7415427 --- /dev/null +++ b/OpenSim/Services/AssetService/HGAssetService.cs | |||
@@ -0,0 +1,107 @@ | |||
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 | using log4net; | ||
29 | using Nini.Config; | ||
30 | using System; | ||
31 | using System.Reflection; | ||
32 | using OpenSim.Framework; | ||
33 | using OpenSim.Services.Interfaces; | ||
34 | |||
35 | namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset | ||
36 | { | ||
37 | public class HGAssetService : IAssetService | ||
38 | { | ||
39 | private static readonly ILog m_log = | ||
40 | LogManager.GetLogger( | ||
41 | MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
43 | public HGAssetService(IConfigSource source) | ||
44 | { | ||
45 | IConfig moduleConfig = source.Configs["Modules"]; | ||
46 | if (moduleConfig != null) | ||
47 | { | ||
48 | string name = moduleConfig.GetString("AssetServices", ""); | ||
49 | |||
50 | IConfig assetConfig = source.Configs["AssetService"]; | ||
51 | if (assetConfig == null) | ||
52 | { | ||
53 | m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini"); | ||
54 | return; | ||
55 | } | ||
56 | |||
57 | m_log.Info("[ASSET CONNECTOR]: HG asset service enabled"); | ||
58 | } | ||
59 | } | ||
60 | |||
61 | // | ||
62 | // Note to Diva: | ||
63 | // | ||
64 | // This is not the broker! | ||
65 | // This module is not supposed to route anything anywhere. This is where | ||
66 | // the code to access remote assets (by URL) goes. It can be assumed | ||
67 | // that the ID is a URL. The broker makes sure of that. | ||
68 | // | ||
69 | // This is a disposable comment :) Feel free to remove it | ||
70 | // | ||
71 | |||
72 | public AssetBase Get(string id) | ||
73 | { | ||
74 | return null; | ||
75 | } | ||
76 | |||
77 | public AssetMetadata GetMetadata(string id) | ||
78 | { | ||
79 | return null; | ||
80 | } | ||
81 | |||
82 | public byte[] GetData(string id) | ||
83 | { | ||
84 | return null; | ||
85 | } | ||
86 | |||
87 | public bool Get(string id, Object sender, AssetRetrieved handler) | ||
88 | { | ||
89 | return false; | ||
90 | } | ||
91 | |||
92 | public string Store(AssetBase asset) | ||
93 | { | ||
94 | return String.Empty; | ||
95 | } | ||
96 | |||
97 | public bool UpdateContent(string id, byte[] data) | ||
98 | { | ||
99 | return false; | ||
100 | } | ||
101 | |||
102 | public bool Delete(string id) | ||
103 | { | ||
104 | return false; | ||
105 | } | ||
106 | } | ||
107 | } | ||