Rename NewAssetServer AssetInventoryServer and fully qualify with

OpenSim.Grid.AssetInventoryServer.
0.6.3-post-fixes
Mike Mazur 2009-02-16 02:25:25 +00:00
parent b3c0cea024
commit 8d30472551
28 changed files with 120 additions and 119 deletions

View File

@ -4,7 +4,7 @@
</Runtime>
<Dependencies>
<Addin id="OpenSim.Data" version="0.5" />
<Addin id="OpenSim.Grid.AssetServer.Plugins.OpenSim" version="0.1" />
<Addin id="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim" version="0.1" />
</Dependencies>
<Extension path = "/OpenSim/GridData">
<Plugin id="MySQLGridData" provider="OpenSim.Data.MySQL.dll" type="OpenSim.Data.MySQL.MySQLGridData" />

View File

@ -40,11 +40,11 @@ using HttpServer;
using log4net;
using OpenSim.Framework;
namespace AssetServer
namespace OpenSim.Grid.AssetInventoryServer
{
public class AssetServer : ServiceBase
public class AssetInventoryServer : ServiceBase
{
public const string CONFIG_FILE = "AssetServer.ini";
public const string CONFIG_FILE = "AssetInventoryServer.ini";
public WebServer HttpServer;
public IniConfigSource ConfigFile;
@ -55,9 +55,9 @@ namespace AssetServer
public IAuthorizationProvider AuthorizationProvider;
public IMetricsProvider MetricsProvider;
public AssetServer()
public AssetInventoryServer()
{
this.ServiceName = "OpenSimAssetServer";
this.ServiceName = "OpenSimAssetInventoryServer";
}
public bool Start()
@ -138,7 +138,7 @@ namespace AssetServer
// return false;
//}
StorageProvider = LoadAssetServerPlugin() as IAssetStorageProvider;
StorageProvider = LoadAssetInventoryServerPlugin() as IAssetStorageProvider;
try
{
@ -163,7 +163,7 @@ namespace AssetServer
public void Shutdown()
{
foreach (IExtension<AssetServer> extension in ExtensionLoader<AssetServer>.Extensions)
foreach (IExtension<AssetInventoryServer> extension in ExtensionLoader<AssetInventoryServer>.Extensions)
{
Logger.Log.Debug("Disposing extension " + extension.GetType().Name);
try { extension.Stop(); }
@ -215,12 +215,13 @@ namespace AssetServer
#endregion
private IAssetServerPlugin LoadAssetServerPlugin()
private IAssetInventoryServerPlugin LoadAssetInventoryServerPlugin()
{
PluginLoader<IAssetServerPlugin> loader = new PluginLoader<IAssetServerPlugin>(new AssetServerPluginInitialiser(this));
PluginLoader<IAssetInventoryServerPlugin> loader = new PluginLoader<IAssetInventoryServerPlugin>(new AssetInventoryServerPluginInitialiser(this));
//loader.Add ("/OpenSim/AssetServer/StorageProvider", new PluginProviderFilter (provider));
loader.Add("/OpenSim/AssetServer/StorageProvider", new PluginCountConstraint(1));
//loader.Add ("/OpenSim/AssetInventoryServer/StorageProvider", new PluginProviderFilter (provider));
//loader.Add("/OpenSim/AssetInventoryServer/StorageProvider", new PluginCountConstraint(1));
loader.Add("/OpenSim/AssetInventoryServer/StorageProvider");
loader.Load();
return loader.Plugin;

View File

@ -31,17 +31,17 @@ using System;
using ExtensionLoader;
using OpenMetaverse;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class AuthorizeAll : IExtension<AssetServer>, IAuthorizationProvider
public class AuthorizeAll : IExtension<AssetInventoryServer>, IAuthorizationProvider
{
AssetServer server;
AssetInventoryServer server;
public AuthorizeAll()
{
}
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;
}

View File

@ -37,17 +37,17 @@ using ExtensionLoader;
using OpenMetaverse;
using HttpServer;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class BrowseFrontend : IExtension<AssetServer>
public class BrowseFrontend : IExtension<AssetInventoryServer>
{
AssetServer server;
AssetInventoryServer server;
public BrowseFrontend()
{
}
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;

View File

@ -32,7 +32,7 @@ using System.Xml;
using ExtensionLoader.Config;
using MySql.Data.MySqlClient;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public static class DBConnString
{
@ -68,7 +68,7 @@ namespace AssetServer.Extensions
else
{
Logger.Log.Error("Database connection string is missing, check that the database_connect line is " +
"correct and uncommented in AssetServer.ini");
"correct and uncommented in AssetInventoryServer.ini");
}
}

View File

@ -31,17 +31,17 @@ using System;
using ExtensionLoader;
using OpenMetaverse;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class NullAuthentication : IExtension<AssetServer>, IAuthenticationProvider
public class NullAuthentication : IExtension<AssetInventoryServer>, IAuthenticationProvider
{
AssetServer server;
AssetInventoryServer server;
public NullAuthentication()
{
}
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;
}

View File

@ -31,17 +31,17 @@ using System;
using ExtensionLoader;
using OpenMetaverse;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class NullMetrics : IExtension<AssetServer>, IMetricsProvider
public class NullMetrics : IExtension<AssetInventoryServer>, IMetricsProvider
{
AssetServer server;
AssetInventoryServer server;
public NullMetrics()
{
}
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;
}

View File

@ -36,17 +36,17 @@ using ExtensionLoader;
using OpenMetaverse;
using HttpServer;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class OpenSimFrontend : IExtension<AssetServer>
public class OpenSimFrontend : IExtension<AssetInventoryServer>
{
AssetServer server;
AssetInventoryServer server;
public OpenSimFrontend()
{
}
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;

View File

@ -37,11 +37,11 @@ using OpenMetaverse;
using OpenMetaverse.StructuredData;
using HttpServer;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class OpenSimInventoryFrontend : IExtension<AssetServer>
public class OpenSimInventoryFrontend : IExtension<AssetInventoryServer>
{
AssetServer server;
AssetInventoryServer server;
Utils.InventoryItemSerializer itemSerializer = new Utils.InventoryItemSerializer();
Utils.InventoryFolderSerializer folderSerializer = new Utils.InventoryFolderSerializer();
Utils.InventoryCollectionSerializer collectionSerializer = new Utils.InventoryCollectionSerializer();
@ -50,7 +50,7 @@ namespace AssetServer.Extensions
{
}
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;

View File

@ -37,13 +37,13 @@ using ExtensionLoader.Config;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class OpenSimMySQLInventory : IExtension<AssetServer>, IInventoryProvider
public class OpenSimMySQLInventory : IExtension<AssetInventoryServer>, IInventoryProvider
{
const string EXTENSION_NAME = "OpenSimMySQLInventory"; // Used in metrics reporting
AssetServer server;
AssetInventoryServer server;
public OpenSimMySQLInventory()
{
@ -51,7 +51,7 @@ namespace AssetServer.Extensions
#region Required Interfaces
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;

View File

@ -37,13 +37,13 @@ using ExtensionLoader.Config;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class OpenSimMySQLStorage : IExtension<AssetServer>, IStorageProvider
public class OpenSimMySQLStorage : IExtension<AssetInventoryServer>, IStorageProvider
{
const string EXTENSION_NAME = "OpenSimMySQLStorage"; // Used in metrics reporting
AssetServer server;
AssetInventoryServer server;
public OpenSimMySQLStorage()
{
@ -51,7 +51,7 @@ namespace AssetServer.Extensions
#region Required Interfaces
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;

View File

@ -36,17 +36,17 @@ using OpenMetaverse;
using OpenMetaverse.StructuredData;
using HttpServer;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class ReferenceFrontend : IExtension<AssetServer>
public class ReferenceFrontend : IExtension<AssetInventoryServer>
{
AssetServer server;
AssetInventoryServer server;
public ReferenceFrontend()
{
}
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;

View File

@ -36,14 +36,14 @@ using ExtensionLoader;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class SimpleInventory : IExtension<AssetServer>, IInventoryProvider
public class SimpleInventory : IExtension<AssetInventoryServer>, IInventoryProvider
{
const string EXTENSION_NAME = "SimpleInventory"; // Used for metrics reporting
const string DEFAULT_INVENTORY_DIR = "SimpleInventory";
AssetServer server;
AssetInventoryServer server;
Dictionary<Uri, InventoryCollection> inventories = new Dictionary<Uri, InventoryCollection>();
Dictionary<Uri, List<InventoryItem>> activeGestures = new Dictionary<Uri, List<InventoryItem>>();
Utils.InventoryItemSerializer itemSerializer = new Utils.InventoryItemSerializer();
@ -55,7 +55,7 @@ namespace AssetServer.Extensions
#region Required Interfaces
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;

View File

@ -35,15 +35,15 @@ using ExtensionLoader;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public class SimpleStorage : IExtension<AssetServer>, IStorageProvider
public class SimpleStorage : IExtension<AssetInventoryServer>, IStorageProvider
{
const string EXTENSION_NAME = ""; // Used in metrics reporting
const string DEFAULT_DATA_DIR = "SimpleAssets";
const string TEMP_DATA_DIR = "SimpleAssetsTemp";
AssetServer server;
AssetInventoryServer server;
Dictionary<UUID, Metadata> metadataStorage;
Dictionary<UUID, string> filenames;
@ -53,7 +53,7 @@ namespace AssetServer.Extensions
#region Required Interfaces
public void Start(AssetServer server)
public void Start(AssetInventoryServer server)
{
this.server = server;
metadataStorage = new Dictionary<UUID, Metadata>();

View File

@ -2,7 +2,7 @@
using System.IO;
using OpenMetaverse;
namespace AssetServer.Extensions
namespace OpenSim.Grid.AssetInventoryServer.Extensions
{
public static class SimpleUtils
{

View File

@ -34,7 +34,7 @@ using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
namespace AssetServer
namespace OpenSim.Grid.AssetInventoryServer
{
/// <summary>
/// Response from a call to a backend provider
@ -50,27 +50,27 @@ namespace AssetServer
Failure
}
public class AssetServerPluginInitialiser : PluginInitialiserBase
public class AssetInventoryServerPluginInitialiser : PluginInitialiserBase
{
private AssetServer server;
private AssetInventoryServer server;
public AssetServerPluginInitialiser (AssetServer server)
public AssetInventoryServerPluginInitialiser (AssetInventoryServer server)
{
this.server = server;
}
public override void Initialise (IPlugin plugin)
{
IAssetServerPlugin p = plugin as IAssetServerPlugin;
IAssetInventoryServerPlugin p = plugin as IAssetInventoryServerPlugin;
p.Initialise (server);
}
}
#region Interfaces
public interface IAssetServerPlugin : IPlugin
public interface IAssetInventoryServerPlugin : IPlugin
{
void Initialise(AssetServer server);
void Initialise(AssetInventoryServer server);
}
public interface IStorageProvider
@ -83,7 +83,7 @@ namespace AssetServer
int ForEach(Action<Metadata> action, int start, int count);
}
public interface IAssetStorageProvider : IAssetServerPlugin
public interface IAssetStorageProvider : IAssetInventoryServerPlugin
{
BackendResponse TryFetchMetadata(UUID assetID, out Metadata metadata);
BackendResponse TryFetchData(UUID assetID, out byte[] assetData);

View File

@ -31,7 +31,7 @@ using System;
using System.Collections.Generic;
using OpenMetaverse;
namespace AssetServer
namespace OpenSim.Grid.AssetInventoryServer
{
public class InventoryBase
{

View File

@ -33,7 +33,7 @@ using log4net.Config;
[assembly: log4net.Config.XmlConfigurator(ConfigFileExtension = "log4net")]
namespace AssetServer
namespace OpenSim.Grid.AssetInventoryServer
{
/// <summary>
/// Singleton logging class for the entire library

View File

@ -30,14 +30,14 @@
using System;
using System.ServiceProcess;
namespace AssetServer
namespace OpenSim.Grid.AssetInventoryServer
{
class MainEntry
{
static void Main(string[] args)
{
#if DEBUG
AssetServer server = new AssetServer();
AssetInventoryServer server = new AssetInventoryServer();
if (server.Start())
{
Console.WriteLine("Asset server is running. Press CTRL+C to quit");
@ -54,7 +54,7 @@ namespace AssetServer
Console.ReadLine();
}
#else
ServiceBase[] servicesToRun = new ServiceBase[] { new AssetServer() };
ServiceBase[] servicesToRun = new ServiceBase[] { new AssetInventoryServer() };
ServiceBase.Run(servicesToRun);
#endif
}

View File

@ -4,7 +4,7 @@ using System.Xml;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace AssetServer
namespace OpenSim.Grid.AssetInventoryServer
{
public class Metadata
{

View File

@ -37,15 +37,15 @@ using ExtensionLoader.Config;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
using AssetServer.Extensions;
using OpenSim.Grid.AssetInventoryServer.Extensions;
namespace AssetServer.Plugins
namespace OpenSim.Grid.AssetInventoryServer.Plugins
{
public class OpenSimAssetStoragePlugin : IAssetStorageProvider
{
const string EXTENSION_NAME = "OpenSimAssetStorage"; // Used in metrics reporting
private AssetServer server;
private AssetInventoryServer server;
private IAssetProviderPlugin m_assetProvider;
public OpenSimAssetStoragePlugin()
@ -291,7 +291,7 @@ namespace AssetServer.Plugins
#region IPlugin implementation
public void Initialise(AssetServer server)
public void Initialise(AssetInventoryServer server)
{
this.server = server;
@ -332,7 +332,7 @@ namespace AssetServer.Plugins
public string Name
{
get { return "AssetServer storage provider"; }
get { return "AssetInventoryServer storage provider"; }
}
#endregion IPlugin implementation

View File

@ -0,0 +1,14 @@
<Addin id="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim" version="0.1">
<Runtime>
<Import assembly="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll"/>
</Runtime>
<Dependencies>
<Addin id="OpenSim.Grid.AssetInventoryServer" version="0.1" />
</Dependencies>
<ExtensionPoint path = "/OpenSim/AssetData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetProviderPlugin"/>
</ExtensionPoint>
<Extension path="/OpenSim/AssetInventoryServer/StorageProvider">
<Plugin id="OpenSimAssetStorage" provider="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSimAssetStoragePlugin" />
</Extension>
</Addin>

View File

@ -37,7 +37,7 @@ using OpenMetaverse;
using OpenMetaverse.StructuredData;
using HttpServer;
namespace AssetServer
namespace OpenSim.Grid.AssetInventoryServer
{
public static class Utils
{

View File

@ -1,14 +0,0 @@
<Addin id="OpenSim.Grid.AssetServer.Plugins.OpenSim" version="0.1">
<Runtime>
<Import assembly="OpenSim.Grid.AssetServer.Plugins.OpenSim.dll"/>
</Runtime>
<Dependencies>
<Addin id="OpenSim.Grid.NewAssetServer" version="0.1" />
</Dependencies>
<ExtensionPoint path = "/OpenSim/AssetData">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Framework.IAssetProviderPlugin"/>
</ExtensionPoint>
<Extension path="/OpenSim/AssetServer/StorageProvider">
<Plugin id="OpenSimAssetStorage" provider="OpenSim.Grid.AssetServer.Plugins.OpenSim.dll" type="AssetServer.Plugins.OpenSimAssetStoragePlugin" />
</Extension>
</Addin>

View File

@ -0,0 +1,21 @@
<Addin id="OpenSim.Grid.AssetInventoryServer" isroot="true" version="0.1">
<Runtime>
<Import assembly="OpenSim.Grid.AssetInventoryServer.exe"/>
<Import assembly="OpenSim.Framework.dll"/>
</Runtime>
<ExtensionPoint path="/OpenSim/AssetInventoryServer/StorageProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Grid.AssetInventoryServer.IAssetStorageProvider"/>
</ExtensionPoint>
<ExtensionPoint path="/OpenSim/AssetInventoryServer/InventoryProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Grid.AssetInventoryServer.IInventoryProvider"/>
</ExtensionPoint>
<ExtensionPoint path="/OpenSim/AssetInventoryServer/AuthenticationProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Grid.AssetInventoryServer.IAuthenticationProvider"/>
</ExtensionPoint>
<ExtensionPoint path="/OpenSim/AssetInventoryServer/AuthorizationProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Grid.AssetInventoryServer.IAuthorizationProvider"/>
</ExtensionPoint>
<ExtensionPoint path="/OpenSim/AssetInventoryServer/MetricsProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="OpenSim.Grid.AssetInventoryServer.IMetricsProvider"/>
</ExtensionPoint>
</Addin>

View File

@ -1,21 +0,0 @@
<Addin id="OpenSim.Grid.NewAssetServer" isroot="true" version="0.1">
<Runtime>
<Import assembly="OpenSim.Grid.NewAssetServer.exe"/>
<Import assembly="OpenSim.Framework.dll"/>
</Runtime>
<ExtensionPoint path="/OpenSim/AssetServer/StorageProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="AssetServer.IAssetStorageProvider"/>
</ExtensionPoint>
<ExtensionPoint path="/OpenSim/AssetServer/InventoryProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="AssetServer.IInventoryProvider"/>
</ExtensionPoint>
<ExtensionPoint path="/OpenSim/AssetServer/AuthenticationProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="AssetServer.IAuthenticationProvider"/>
</ExtensionPoint>
<ExtensionPoint path="/OpenSim/AssetServer/AuthorizationProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="AssetServer.IAuthorizationProvider"/>
</ExtensionPoint>
<ExtensionPoint path="/OpenSim/AssetServer/MetricsProvider">
<ExtensionNode name="Plugin" type="OpenSim.Framework.PluginExtensionNode" objectType="AssetServer.IMetricsProvider"/>
</ExtensionPoint>
</Addin>

View File

@ -746,7 +746,7 @@
</Files>
</Project>
<Project name="OpenSim.Grid.NewAssetServer" path="OpenSim/Grid/NewAssetServer" type="Exe">
<Project name="OpenSim.Grid.AssetInventoryServer" path="OpenSim/Grid/AssetInventoryServer" type="Exe">
<Configuration name="Debug">
<Options>
<OutputPath>../../../bin/</OutputPath>
@ -783,7 +783,7 @@
</Files>
</Project>
<Project name="OpenSim.Grid.AssetServer.Plugins.OpenSim" path="OpenSim/Grid/NewAssetServer/Plugins/OpenSim" type="Library">
<Project name="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim" path="OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../../../bin/</OutputPath>
@ -799,7 +799,7 @@
<Reference name="System" />
<Reference name="System.Data" />
<Reference name="OpenSim.Framework" />
<Reference name="OpenSim.Grid.NewAssetServer" />
<Reference name="OpenSim.Grid.AssetInventoryServer" />
<Reference name="OpenMetaverseTypes"/>
<Reference name="OpenMetaverse.StructuredData2" />
<Reference name="HttpServer2"/>
@ -814,7 +814,7 @@
</Files>
</Project>
<!--Project name="OpenSim.Grid.AssetServer.Simple" path="OpenSim/Grid/NewAssetServer/Extensions/Simple" type="Library">
<!--Project name="OpenSim.Grid.AssetInventoryServer.Simple" path="OpenSim/Grid/AssetInventoryServer/Extensions/Simple" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../../../bin/</OutputPath>
@ -842,7 +842,7 @@
</Files>
</Project>
<Project name="OpenSim.Grid.AssetServer.OpenSimMySQL" path="OpenSim/Grid/NewAssetServer/Extensions/OpenSimMySQL" type="Library">
<Project name="OpenSim.Grid.AssetInventoryServer.OpenSimMySQL" path="OpenSim/Grid/AssetInventoryServer/Extensions/OpenSimMySQL" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../../../bin/</OutputPath>