aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMike Mazur2009-02-03 05:20:16 +0000
committerMike Mazur2009-02-03 05:20:16 +0000
commite12b0a249674bbe4b1980c74f13d8f09cc2e4432 (patch)
treeecbc9a25faf6dd40b05b9435ad24d6a36b4a3b62
parentRename IAssetProviderPlugin to IAssetDataPlugin aligning with the other data ... (diff)
downloadopensim-SC_OLD-e12b0a249674bbe4b1980c74f13d8f09cc2e4432.zip
opensim-SC_OLD-e12b0a249674bbe4b1980c74f13d8f09cc2e4432.tar.gz
opensim-SC_OLD-e12b0a249674bbe4b1980c74f13d8f09cc2e4432.tar.bz2
opensim-SC_OLD-e12b0a249674bbe4b1980c74f13d8f09cc2e4432.tar.xz
- move IAssetDataPlugin from OpenSim/Framework/IAssetProvider.cs to
OpenSim/Data/IAssetData.cs - remove some trailing whitespace
-rw-r--r--OpenSim/Data/IAssetData.cs (renamed from OpenSim/Framework/IAssetProvider.cs)3
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs4
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs1
-rw-r--r--OpenSim/Framework/Communications/Cache/SQLAssetServer.cs1
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs1
-rw-r--r--OpenSim/Grid/AssetServer/RestService.cs3
-rw-r--r--OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs45
-rw-r--r--OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs6
-rw-r--r--prebuild.xml10
9 files changed, 41 insertions, 33 deletions
diff --git a/OpenSim/Framework/IAssetProvider.cs b/OpenSim/Data/IAssetData.cs
index 77e0d0c..47e25f3 100644
--- a/OpenSim/Framework/IAssetProvider.cs
+++ b/OpenSim/Data/IAssetData.cs
@@ -26,8 +26,9 @@
26 */ 26 */
27 27
28using OpenMetaverse; 28using OpenMetaverse;
29using OpenSim.Framework;
29 30
30namespace OpenSim.Framework 31namespace OpenSim.Data
31{ 32{
32 public interface IAssetDataPlugin : IPlugin 33 public interface IAssetDataPlugin : IPlugin
33 { 34 {
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index 2fe89e2..3eaae12 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Data.MSSQL
42 private const string _migrationStore = "AssetStore"; 42 private const string _migrationStore = "AssetStore";
43 43
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 private long TicksToEpoch; 45 private long TicksToEpoch;
46 /// <summary> 46 /// <summary>
47 /// Database manager 47 /// Database manager
48 /// </summary> 48 /// </summary>
@@ -212,7 +212,7 @@ namespace OpenSim.Data.MSSQL
212 } 212 }
213 } 213 }
214 214
215// Commented out since currently unused - this probably should be called in FetchAsset() 215// Commented out since currently unused - this probably should be called in FetchAsset()
216// private void UpdateAccessTime(AssetBase asset) 216// private void UpdateAccessTime(AssetBase asset)
217// { 217// {
218// using (AutoClosingSqlCommand cmd = database.Query("UPDATE assets SET access_time = @access_time WHERE id=@id")) 218// using (AutoClosingSqlCommand cmd = database.Query("UPDATE assets SET access_time = @access_time WHERE id=@id"))
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index 7fb06b9..cc5ba8e 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -32,6 +32,7 @@ using OpenMetaverse;
32using log4net; 32using log4net;
33using OpenSim.Framework.AssetLoader.Filesystem; 33using OpenSim.Framework.AssetLoader.Filesystem;
34using OpenSim.Framework.Statistics; 34using OpenSim.Framework.Statistics;
35using OpenSim.Data;
35 36
36namespace OpenSim.Framework.Communications.Cache 37namespace OpenSim.Framework.Communications.Cache
37{ 38{
diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
index 00dbad0..6266bf0 100644
--- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
+++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using log4net; 30using log4net;
31using OpenSim.Data;
31 32
32namespace OpenSim.Framework.Communications.Cache 33namespace OpenSim.Framework.Communications.Cache
33{ 34{
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
index b5c8df0..07fe0a4 100644
--- a/OpenSim/Grid/AssetServer/Main.cs
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -36,6 +36,7 @@ using OpenSim.Framework.AssetLoader.Filesystem;
36using OpenSim.Framework.Console; 36using OpenSim.Framework.Console;
37using OpenSim.Framework.Servers; 37using OpenSim.Framework.Servers;
38using OpenSim.Framework.Statistics; 38using OpenSim.Framework.Statistics;
39using OpenSim.Data;
39 40
40namespace OpenSim.Grid.AssetServer 41namespace OpenSim.Grid.AssetServer
41{ 42{
diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs
index e81cb3f..3613cd8 100644
--- a/OpenSim/Grid/AssetServer/RestService.cs
+++ b/OpenSim/Grid/AssetServer/RestService.cs
@@ -37,6 +37,7 @@ using log4net;
37using OpenSim.Framework; 37using OpenSim.Framework;
38using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
39using OpenSim.Framework.Statistics; 39using OpenSim.Framework.Statistics;
40using OpenSim.Data;
40 41
41namespace OpenSim.Grid.AssetServer 42namespace OpenSim.Grid.AssetServer
42{ 43{
@@ -98,7 +99,7 @@ namespace OpenSim.Grid.AssetServer
98 result = ms.GetBuffer(); 99 result = ms.GetBuffer();
99 100
100//Ckrinke 1/11/09 Commenting out the succesful REST message as under heavy use there 101//Ckrinke 1/11/09 Commenting out the succesful REST message as under heavy use there
101//are multiple messages in a second and that is usually (in my experience) meaning 102//are multiple messages in a second and that is usually (in my experience) meaning
102//the logging itself is slowing down the program. Leaving the unsuccesful message 103//the logging itself is slowing down the program. Leaving the unsuccesful message
103//as we need to know about that path. 104//as we need to know about that path.
104// m_log.InfoFormat( 105// m_log.InfoFormat(
diff --git a/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs b/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs
index 24de4e8..285a019 100644
--- a/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs
+++ b/OpenSim/Region/Environment/Modules/Hypergrid/HGStandaloneAssetService.cs
@@ -1,29 +1,29 @@
1/** 1/**
2 * Copyright (c) 2008, Contributors. All rights reserved. 2 * Copyright (c) 2008, Contributors. All rights reserved.
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without modification, 5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met: 6 * are permitted provided that the following conditions are met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright notice, 8 * * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright notice, 10 * * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation 11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution. 12 * and/or other materials provided with the distribution.
13 * * Neither the name of the Organizations nor the names of Individual 13 * * Neither the name of the Organizations nor the names of Individual
14 * Contributors may be used to endorse or promote products derived from 14 * Contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission. 15 * this software without specific prior written permission.
16 * 16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
20 * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
22 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 24 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25 * OF THE POSSIBILITY OF SUCH DAMAGE. 25 * OF THE POSSIBILITY OF SUCH DAMAGE.
26 * 26 *
27 */ 27 */
28 28
29using System; 29using System;
@@ -43,6 +43,7 @@ using OpenSim.Framework.Servers;
43using OpenSim.Region.Environment.Interfaces; 43using OpenSim.Region.Environment.Interfaces;
44using OpenSim.Region.Environment.Scenes; 44using OpenSim.Region.Environment.Scenes;
45using OpenSim.Grid.AssetServer; 45using OpenSim.Grid.AssetServer;
46using OpenSim.Data;
46 47
47namespace OpenSim.Region.Environment.Modules.Hypergrid 48namespace OpenSim.Region.Environment.Modules.Hypergrid
48{ 49{
@@ -51,10 +52,10 @@ namespace OpenSim.Region.Environment.Modules.Hypergrid
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 52 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 private static bool initialized = false; 53 private static bool initialized = false;
53 private static bool enabled = false; 54 private static bool enabled = false;
54 55
55 Scene m_scene; 56 Scene m_scene;
56 //AssetService m_assetService; 57 //AssetService m_assetService;
57 58
58 #region IRegionModule interface 59 #region IRegionModule interface
59 60
60 public void Initialise(Scene scene, IConfigSource config) 61 public void Initialise(Scene scene, IConfigSource config)
@@ -98,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.Hypergrid
98 99
99 } 100 }
100 101
101 public class AssetService 102 public class AssetService
102 { 103 {
103 private IUserService m_userService; 104 private IUserService m_userService;
104 private bool m_doLookup = false; 105 private bool m_doLookup = false;
@@ -120,8 +121,8 @@ namespace OpenSim.Region.Environment.Modules.Hypergrid
120 protected void AddHttpHandlers(Scene m_scene) 121 protected void AddHttpHandlers(Scene m_scene)
121 { 122 {
122 IAssetDataPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin; 123 IAssetDataPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin;
123 124
124 BaseHttpServer httpServer = m_scene.CommsManager.HttpServer; 125 BaseHttpServer httpServer = m_scene.CommsManager.HttpServer;
125 httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider)); 126 httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider));
126 httpServer.AddStreamHandler(new PostAssetStreamHandler(m_assetProvider)); 127 httpServer.AddStreamHandler(new PostAssetStreamHandler(m_assetProvider));
127 128
diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
index ebece27..fc84eac 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs
@@ -27,7 +27,7 @@
27 27
28using OpenMetaverse; 28using OpenMetaverse;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using OpenSim.Framework.Communications; 30using OpenSim.Data;
31 31
32namespace OpenSim.Tests.Common.Mock 32namespace OpenSim.Tests.Common.Mock
33{ 33{
@@ -35,7 +35,7 @@ namespace OpenSim.Tests.Common.Mock
35 /// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the 35 /// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the
36 /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit 36 /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
37 /// tests are single threaded. 37 /// tests are single threaded.
38 /// </summary> 38 /// </summary>
39 public class TestAssetDataPlugin : IAssetDataPlugin 39 public class TestAssetDataPlugin : IAssetDataPlugin
40 { 40 {
41 public string Version { get { return "0"; } } 41 public string Version { get { return "0"; } }
@@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common.Mock
43 43
44 public void Initialise() {} 44 public void Initialise() {}
45 public void Dispose() {} 45 public void Dispose() {}
46 46
47 public AssetBase FetchAsset(UUID uuid) { return null; } 47 public AssetBase FetchAsset(UUID uuid) { return null; }
48 public void CreateAsset(AssetBase asset) {} 48 public void CreateAsset(AssetBase asset) {}
49 public void UpdateAsset(AssetBase asset) {} 49 public void UpdateAsset(AssetBase asset) {}
diff --git a/prebuild.xml b/prebuild.xml
index 6b1bce3..47ae00c 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -716,6 +716,7 @@
716 <Reference name="OpenSim.Framework.Servers"/> 716 <Reference name="OpenSim.Framework.Servers"/>
717 <Reference name="OpenSim.Framework.Communications"/> 717 <Reference name="OpenSim.Framework.Communications"/>
718 <Reference name="OpenSim.Framework.Statistics"/> 718 <Reference name="OpenSim.Framework.Statistics"/>
719 <Reference name="OpenSim.Data"/>
719 <Reference name="OpenMetaverseTypes.dll"/> 720 <Reference name="OpenMetaverseTypes.dll"/>
720 <Reference name="log4net.dll"/> 721 <Reference name="log4net.dll"/>
721 722
@@ -2217,7 +2218,7 @@
2217 </Project> 2218 </Project>
2218 2219
2219 <!-- Tools --> 2220 <!-- Tools -->
2220 2221
2221 <Project name="pCampBot" path="OpenSim/Tools/pCampBot" type="Exe"> 2222 <Project name="pCampBot" path="OpenSim/Tools/pCampBot" type="Exe">
2222 <Configuration name="Debug"> 2223 <Configuration name="Debug">
2223 <Options> 2224 <Options>
@@ -2297,6 +2298,7 @@
2297 <Reference name="OpenSim.Framework"/> 2298 <Reference name="OpenSim.Framework"/>
2298 <Reference name="OpenSim.Framework.Communications"/> 2299 <Reference name="OpenSim.Framework.Communications"/>
2299 <Reference name="OpenSim.Framework.Servers"/> 2300 <Reference name="OpenSim.Framework.Servers"/>
2301 <Reference name="OpenSim.Data"/>
2300 <Reference name="OpenSim.Region.Communications.Local"/> 2302 <Reference name="OpenSim.Region.Communications.Local"/>
2301 <Reference name="OpenSim.Region.Environment"/> 2303 <Reference name="OpenSim.Region.Environment"/>
2302 <Reference name="OpenSim.Region.Physics.Manager"/> 2304 <Reference name="OpenSim.Region.Physics.Manager"/>
@@ -2317,7 +2319,7 @@
2317 <OutputPath>../../../bin/</OutputPath> 2319 <OutputPath>../../../bin/</OutputPath>
2318 </Options> 2320 </Options>
2319 </Configuration> 2321 </Configuration>
2320 2322
2321 <ReferencePath>../../../bin/</ReferencePath> 2323 <ReferencePath>../../../bin/</ReferencePath>
2322 <Reference name="System" localCopy="false"/> 2324 <Reference name="System" localCopy="false"/>
2323 <Reference name="System.Xml"/> 2325 <Reference name="System.Xml"/>
@@ -2580,7 +2582,7 @@
2580 <Reference name="log4net.dll"/> 2582 <Reference name="log4net.dll"/>
2581 <Reference name="DotNetOpenMail.dll"/> 2583 <Reference name="DotNetOpenMail.dll"/>
2582 2584
2583 <!-- 2585 <!--
2584 TODO: this is kind of lame, we basically build a duplicate 2586 TODO: this is kind of lame, we basically build a duplicate
2585 assembly but with tests added in, just so that we don't 2587 assembly but with tests added in, just so that we don't
2586 need to hard code in a bunch of Test directories here. If 2588 need to hard code in a bunch of Test directories here. If
@@ -2738,4 +2740,4 @@
2738 2740
2739 </Solution> 2741 </Solution>
2740</Prebuild> 2742</Prebuild>
2741 2743