Renaming [ServiceConnectors] back to [Modules].
parent
5cfd84c924
commit
720e2bc5d9
|
@ -56,8 +56,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["ServiceConnectors"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
m_log.DebugFormat("[XXX] moduleConfig null? {0}", ((moduleConfig == null) ? "yes" : "no"));
|
|
||||||
|
|
||||||
if (moduleConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["ServiceConnectors"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (moduleConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string name = moduleConfig.GetString("AssetServices", "");
|
string name = moduleConfig.GetString("AssetServices", "");
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["ServiceConnectors"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (moduleConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string name = moduleConfig.GetString("AssetServices", "");
|
string name = moduleConfig.GetString("AssetServices", "");
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset
|
||||||
|
|
||||||
public override void Initialise(IConfigSource source)
|
public override void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["ServiceConnectors"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (moduleConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string name = moduleConfig.GetString("AssetServices", "");
|
string name = moduleConfig.GetString("AssetServices", "");
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.User
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["ServiceConnectors"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (moduleConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string name = moduleConfig.GetString("UserServices", "");
|
string name = moduleConfig.GetString("UserServices", "");
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.User
|
||||||
|
|
||||||
public void Initialise(IConfigSource source)
|
public void Initialise(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["ServiceConnectors"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (moduleConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string name = moduleConfig.GetString("UserServices", "");
|
string name = moduleConfig.GetString("UserServices", "");
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace OpenSim.Services.AssetService
|
||||||
|
|
||||||
public HGAssetService(IConfigSource source)
|
public HGAssetService(IConfigSource source)
|
||||||
{
|
{
|
||||||
IConfig moduleConfig = source.Configs["ServiceConnectors"];
|
IConfig moduleConfig = source.Configs["Modules"];
|
||||||
if (moduleConfig != null)
|
if (moduleConfig != null)
|
||||||
{
|
{
|
||||||
string name = moduleConfig.GetString("AssetServices", "");
|
string name = moduleConfig.GetString("AssetServices", "");
|
||||||
|
@ -95,9 +95,7 @@ namespace OpenSim.Services.AssetService
|
||||||
// work in general, because the remote grid may be running
|
// work in general, because the remote grid may be running
|
||||||
// an asset server that has a different protocol.
|
// an asset server that has a different protocol.
|
||||||
// Eventually we will want a piece of meta-protocol asking
|
// Eventually we will want a piece of meta-protocol asking
|
||||||
// the remote server about its kind, and even asking it
|
// the remote server about its kind. Definitely cool thing to do!
|
||||||
// to send its own connector, which we would instantiate
|
|
||||||
// dynamically. Definitely coo, thing to do!
|
|
||||||
connector = new AssetServicesConnector(url);
|
connector = new AssetServicesConnector(url);
|
||||||
m_connectors.Add(url, connector);
|
m_connectors.Add(url, connector);
|
||||||
}
|
}
|
||||||
|
@ -121,6 +119,15 @@ namespace OpenSim.Services.AssetService
|
||||||
|
|
||||||
public AssetMetadata GetMetadata(string id)
|
public AssetMetadata GetMetadata(string id)
|
||||||
{
|
{
|
||||||
|
string url = string.Empty;
|
||||||
|
string assetID = string.Empty;
|
||||||
|
|
||||||
|
if (StringToUrlAndAssetID(id, out url, out assetID))
|
||||||
|
{
|
||||||
|
IAssetService connector = GetConnector(url);
|
||||||
|
return connector.GetMetadata(assetID);
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,9 +127,9 @@ namespace OpenSim.Tests.Common.Setup
|
||||||
|
|
||||||
ISharedRegionModule assetService = new LocalAssetServicesConnector();
|
ISharedRegionModule assetService = new LocalAssetServicesConnector();
|
||||||
IniConfigSource config = new IniConfigSource();
|
IniConfigSource config = new IniConfigSource();
|
||||||
config.AddConfig("ServiceConnectors");
|
config.AddConfig("Modules");
|
||||||
config.AddConfig("AssetService");
|
config.AddConfig("AssetService");
|
||||||
config.Configs["ServiceConnectors"].Set("AssetServices", "LocalAssetServicesConnector");
|
config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
|
||||||
config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
|
config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
|
||||||
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
|
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Data.Null.dll");
|
||||||
assetService.Initialise(config);
|
assetService.Initialise(config);
|
||||||
|
|
|
@ -1269,7 +1269,7 @@
|
||||||
; format your hard drive and make all meat in your fridge spoil.
|
; format your hard drive and make all meat in your fridge spoil.
|
||||||
; You have been warned.
|
; You have been warned.
|
||||||
; Some of this is starting to work!
|
; Some of this is starting to work!
|
||||||
[ServiceConnectors]
|
[Modules]
|
||||||
; Choose one
|
; Choose one
|
||||||
AssetServices = "LocalAssetServicesConnector"
|
AssetServices = "LocalAssetServicesConnector"
|
||||||
;AssetServices = "RemoteAssetServicesConnector"
|
;AssetServices = "RemoteAssetServicesConnector"
|
||||||
|
|
Loading…
Reference in New Issue