- move IAssetDataPlugin from OpenSim/Framework/IAssetProvider.cs to
OpenSim/Data/IAssetData.cs - remove some trailing whitespace0.6.3-post-fixes
parent
f8e45e8e98
commit
e12b0a2496
|
@ -26,8 +26,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Data
|
||||||
{
|
{
|
||||||
public interface IAssetDataPlugin : IPlugin
|
public interface IAssetDataPlugin : IPlugin
|
||||||
{
|
{
|
|
@ -42,7 +42,7 @@ namespace OpenSim.Data.MSSQL
|
||||||
private const string _migrationStore = "AssetStore";
|
private const string _migrationStore = "AssetStore";
|
||||||
|
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private long TicksToEpoch;
|
private long TicksToEpoch;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Database manager
|
/// Database manager
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -212,7 +212,7 @@ namespace OpenSim.Data.MSSQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commented out since currently unused - this probably should be called in FetchAsset()
|
// Commented out since currently unused - this probably should be called in FetchAsset()
|
||||||
// private void UpdateAccessTime(AssetBase asset)
|
// private void UpdateAccessTime(AssetBase asset)
|
||||||
// {
|
// {
|
||||||
// using (AutoClosingSqlCommand cmd = database.Query("UPDATE assets SET access_time = @access_time WHERE id=@id"))
|
// using (AutoClosingSqlCommand cmd = database.Query("UPDATE assets SET access_time = @access_time WHERE id=@id"))
|
||||||
|
|
|
@ -32,6 +32,7 @@ using OpenMetaverse;
|
||||||
using log4net;
|
using log4net;
|
||||||
using OpenSim.Framework.AssetLoader.Filesystem;
|
using OpenSim.Framework.AssetLoader.Filesystem;
|
||||||
using OpenSim.Framework.Statistics;
|
using OpenSim.Framework.Statistics;
|
||||||
|
using OpenSim.Data;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Cache
|
namespace OpenSim.Framework.Communications.Cache
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
using OpenSim.Data;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Cache
|
namespace OpenSim.Framework.Communications.Cache
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,6 +36,7 @@ using OpenSim.Framework.AssetLoader.Filesystem;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Statistics;
|
using OpenSim.Framework.Statistics;
|
||||||
|
using OpenSim.Data;
|
||||||
|
|
||||||
namespace OpenSim.Grid.AssetServer
|
namespace OpenSim.Grid.AssetServer
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,6 +37,7 @@ using log4net;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Statistics;
|
using OpenSim.Framework.Statistics;
|
||||||
|
using OpenSim.Data;
|
||||||
|
|
||||||
namespace OpenSim.Grid.AssetServer
|
namespace OpenSim.Grid.AssetServer
|
||||||
{
|
{
|
||||||
|
@ -98,7 +99,7 @@ namespace OpenSim.Grid.AssetServer
|
||||||
result = ms.GetBuffer();
|
result = ms.GetBuffer();
|
||||||
|
|
||||||
//Ckrinke 1/11/09 Commenting out the succesful REST message as under heavy use there
|
//Ckrinke 1/11/09 Commenting out the succesful REST message as under heavy use there
|
||||||
//are multiple messages in a second and that is usually (in my experience) meaning
|
//are multiple messages in a second and that is usually (in my experience) meaning
|
||||||
//the logging itself is slowing down the program. Leaving the unsuccesful message
|
//the logging itself is slowing down the program. Leaving the unsuccesful message
|
||||||
//as we need to know about that path.
|
//as we need to know about that path.
|
||||||
// m_log.InfoFormat(
|
// m_log.InfoFormat(
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2008, Contributors. All rights reserved.
|
* Copyright (c) 2008, Contributors. All rights reserved.
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification,
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
* are permitted provided that the following conditions are met:
|
* are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* * Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
* and/or other materials provided with the distribution.
|
* and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the Organizations nor the names of Individual
|
* * Neither the name of the Organizations nor the names of Individual
|
||||||
* Contributors may be used to endorse or promote products derived from
|
* Contributors may be used to endorse or promote products derived from
|
||||||
* this software without specific prior written permission.
|
* this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@ -43,6 +43,7 @@ using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Grid.AssetServer;
|
using OpenSim.Grid.AssetServer;
|
||||||
|
using OpenSim.Data;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules.Hypergrid
|
namespace OpenSim.Region.Environment.Modules.Hypergrid
|
||||||
{
|
{
|
||||||
|
@ -51,10 +52,10 @@ namespace OpenSim.Region.Environment.Modules.Hypergrid
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
private static bool initialized = false;
|
private static bool initialized = false;
|
||||||
private static bool enabled = false;
|
private static bool enabled = false;
|
||||||
|
|
||||||
Scene m_scene;
|
Scene m_scene;
|
||||||
//AssetService m_assetService;
|
//AssetService m_assetService;
|
||||||
|
|
||||||
#region IRegionModule interface
|
#region IRegionModule interface
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
|
@ -98,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.Hypergrid
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AssetService
|
public class AssetService
|
||||||
{
|
{
|
||||||
private IUserService m_userService;
|
private IUserService m_userService;
|
||||||
private bool m_doLookup = false;
|
private bool m_doLookup = false;
|
||||||
|
@ -120,8 +121,8 @@ namespace OpenSim.Region.Environment.Modules.Hypergrid
|
||||||
protected void AddHttpHandlers(Scene m_scene)
|
protected void AddHttpHandlers(Scene m_scene)
|
||||||
{
|
{
|
||||||
IAssetDataPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin;
|
IAssetDataPlugin m_assetProvider = ((AssetServerBase)m_scene.AssetCache.AssetServer).AssetProviderPlugin;
|
||||||
|
|
||||||
BaseHttpServer httpServer = m_scene.CommsManager.HttpServer;
|
BaseHttpServer httpServer = m_scene.CommsManager.HttpServer;
|
||||||
httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider));
|
httpServer.AddStreamHandler(new GetAssetStreamHandler(m_assetProvider));
|
||||||
httpServer.AddStreamHandler(new PostAssetStreamHandler(m_assetProvider));
|
httpServer.AddStreamHandler(new PostAssetStreamHandler(m_assetProvider));
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Data;
|
||||||
|
|
||||||
namespace OpenSim.Tests.Common.Mock
|
namespace OpenSim.Tests.Common.Mock
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
/// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the
|
/// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the
|
||||||
/// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
|
/// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit
|
||||||
/// tests are single threaded.
|
/// tests are single threaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class TestAssetDataPlugin : IAssetDataPlugin
|
public class TestAssetDataPlugin : IAssetDataPlugin
|
||||||
{
|
{
|
||||||
public string Version { get { return "0"; } }
|
public string Version { get { return "0"; } }
|
||||||
|
@ -43,7 +43,7 @@ namespace OpenSim.Tests.Common.Mock
|
||||||
|
|
||||||
public void Initialise() {}
|
public void Initialise() {}
|
||||||
public void Dispose() {}
|
public void Dispose() {}
|
||||||
|
|
||||||
public AssetBase FetchAsset(UUID uuid) { return null; }
|
public AssetBase FetchAsset(UUID uuid) { return null; }
|
||||||
public void CreateAsset(AssetBase asset) {}
|
public void CreateAsset(AssetBase asset) {}
|
||||||
public void UpdateAsset(AssetBase asset) {}
|
public void UpdateAsset(AssetBase asset) {}
|
||||||
|
|
10
prebuild.xml
10
prebuild.xml
|
@ -716,6 +716,7 @@
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
<Reference name="OpenSim.Framework.Statistics"/>
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
|
<Reference name="OpenSim.Data"/>
|
||||||
<Reference name="OpenMetaverseTypes.dll"/>
|
<Reference name="OpenMetaverseTypes.dll"/>
|
||||||
<Reference name="log4net.dll"/>
|
<Reference name="log4net.dll"/>
|
||||||
|
|
||||||
|
@ -2217,7 +2218,7 @@
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
<!-- Tools -->
|
<!-- Tools -->
|
||||||
|
|
||||||
<Project name="pCampBot" path="OpenSim/Tools/pCampBot" type="Exe">
|
<Project name="pCampBot" path="OpenSim/Tools/pCampBot" type="Exe">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -2297,6 +2298,7 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Data"/>
|
||||||
<Reference name="OpenSim.Region.Communications.Local"/>
|
<Reference name="OpenSim.Region.Communications.Local"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
|
@ -2317,7 +2319,7 @@
|
||||||
<OutputPath>../../../bin/</OutputPath>
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
</Options>
|
</Options>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
|
||||||
<ReferencePath>../../../bin/</ReferencePath>
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
<Reference name="System" localCopy="false"/>
|
<Reference name="System" localCopy="false"/>
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
|
@ -2580,7 +2582,7 @@
|
||||||
<Reference name="log4net.dll"/>
|
<Reference name="log4net.dll"/>
|
||||||
<Reference name="DotNetOpenMail.dll"/>
|
<Reference name="DotNetOpenMail.dll"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
TODO: this is kind of lame, we basically build a duplicate
|
TODO: this is kind of lame, we basically build a duplicate
|
||||||
assembly but with tests added in, just so that we don't
|
assembly but with tests added in, just so that we don't
|
||||||
need to hard code in a bunch of Test directories here. If
|
need to hard code in a bunch of Test directories here. If
|
||||||
|
@ -2738,4 +2740,4 @@
|
||||||
|
|
||||||
</Solution>
|
</Solution>
|
||||||
</Prebuild>
|
</Prebuild>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue