From 15423539f98d47201a819e35f80b0c30ee459556 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 10 Sep 2007 06:45:54 +0000 Subject: hooked up sdague new sqlite asset database provider to the old asset system. So we can still use sqlite for assets while we wait for the rest of the new asset system to be wrote. Needs more testing, so if it causes problems will have to swap back to db4o. --- OpenSim/Framework/General/Interfaces/IAssetProvider.cs | 18 ++++++++++++++++++ OpenSim/Framework/General/Interfaces/IAssetServer.cs | 4 ++-- OpenSim/Framework/General/Types/AssetBase.cs | 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 OpenSim/Framework/General/Interfaces/IAssetProvider.cs (limited to 'OpenSim/Framework/General') diff --git a/OpenSim/Framework/General/Interfaces/IAssetProvider.cs b/OpenSim/Framework/General/Interfaces/IAssetProvider.cs new file mode 100644 index 0000000..a2ef826 --- /dev/null +++ b/OpenSim/Framework/General/Interfaces/IAssetProvider.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenSim.Framework.Types; +using libsecondlife; + +namespace OpenSim.Framework.Interfaces +{ + public interface IAssetProvider + { + void Initialise(string dbfile, string dbname); + AssetBase FetchAsset(LLUUID uuid); + void CreateAsset(AssetBase asset); + void UpdateAsset(AssetBase asset); + bool ExistsAsset(LLUUID uuid); + void CommitAssets(); // force a sync to the database + } +} \ No newline at end of file diff --git a/OpenSim/Framework/General/Interfaces/IAssetServer.cs b/OpenSim/Framework/General/Interfaces/IAssetServer.cs index cdce979..da3f61a 100644 --- a/OpenSim/Framework/General/Interfaces/IAssetServer.cs +++ b/OpenSim/Framework/General/Interfaces/IAssetServer.cs @@ -37,9 +37,9 @@ namespace OpenSim.Framework.Interfaces public interface IAssetServer { void SetReceiver(IAssetReceiver receiver); - void RequestAsset(LLUUID assetID, bool isTexture); + void FetchAsset(LLUUID assetID, bool isTexture); void UpdateAsset(AssetBase asset); - void UploadNewAsset(AssetBase asset); + void CreateAsset(AssetBase asset); void SetServerInfo(string ServerUrl, string ServerKey); void Close(); } diff --git a/OpenSim/Framework/General/Types/AssetBase.cs b/OpenSim/Framework/General/Types/AssetBase.cs index 71642a2..7d5ee7b 100644 --- a/OpenSim/Framework/General/Types/AssetBase.cs +++ b/OpenSim/Framework/General/Types/AssetBase.cs @@ -42,7 +42,8 @@ namespace OpenSim.Framework.Types public AssetBase() { - + Name = " "; + Description = " "; } } } -- cgit v1.1