diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs | 4 | ||||
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs (renamed from OpenSim/Grid/AssetInventoryServer/Extensions/OpenSimInventoryFrontend.cs) | 45 | ||||
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml | 3 |
3 files changed, 42 insertions, 10 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs index f0ad3cf..ebab557 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimAssetFrontendPlugin.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
43 | { | 43 | { |
44 | public class OpenSimAssetFrontendPlugin : IAssetInventoryServerPlugin | 44 | public class OpenSimAssetFrontendPlugin : IAssetInventoryServerPlugin |
45 | { | 45 | { |
46 | AssetInventoryServer server; | 46 | private AssetInventoryServer server; |
47 | 47 | ||
48 | public OpenSimAssetFrontendPlugin() | 48 | public OpenSimAssetFrontendPlugin() |
49 | { | 49 | { |
@@ -60,6 +60,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim | |||
60 | 60 | ||
61 | // Asset creation | 61 | // Asset creation |
62 | server.HttpServer.AddHandler("post", null, @"^/assets/", AssetPostHandler); | 62 | server.HttpServer.AddHandler("post", null, @"^/assets/", AssetPostHandler); |
63 | |||
64 | Logger.Log.Info("[ASSET] OpenSim Asset Frontend loaded."); | ||
63 | } | 65 | } |
64 | 66 | ||
65 | /// <summary> | 67 | /// <summary> |
diff --git a/OpenSim/Grid/AssetInventoryServer/Extensions/OpenSimInventoryFrontend.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs index 340e00c..6e33cdf 100644 --- a/OpenSim/Grid/AssetInventoryServer/Extensions/OpenSimInventoryFrontend.cs +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/OpenSimInventoryFrontendPlugin.cs | |||
@@ -36,21 +36,24 @@ using ExtensionLoader; | |||
36 | using OpenMetaverse; | 36 | using OpenMetaverse; |
37 | using OpenMetaverse.StructuredData; | 37 | using OpenMetaverse.StructuredData; |
38 | using HttpServer; | 38 | using HttpServer; |
39 | using OpenSim.Framework; | ||
39 | 40 | ||
40 | namespace OpenSim.Grid.AssetInventoryServer.Extensions | 41 | namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim |
41 | { | 42 | { |
42 | public class OpenSimInventoryFrontend : IExtension<AssetInventoryServer> | 43 | public class OpenSimInventoryFrontendPlugin : IAssetInventoryServerPlugin |
43 | { | 44 | { |
44 | AssetInventoryServer server; | 45 | private AssetInventoryServer server; |
45 | Utils.InventoryItemSerializer itemSerializer = new Utils.InventoryItemSerializer(); | 46 | private Utils.InventoryItemSerializer itemSerializer = new Utils.InventoryItemSerializer(); |
46 | Utils.InventoryFolderSerializer folderSerializer = new Utils.InventoryFolderSerializer(); | 47 | private Utils.InventoryFolderSerializer folderSerializer = new Utils.InventoryFolderSerializer(); |
47 | Utils.InventoryCollectionSerializer collectionSerializer = new Utils.InventoryCollectionSerializer(); | 48 | private Utils.InventoryCollectionSerializer collectionSerializer = new Utils.InventoryCollectionSerializer(); |
48 | 49 | ||
49 | public OpenSimInventoryFrontend() | 50 | public OpenSimInventoryFrontendPlugin() |
50 | { | 51 | { |
51 | } | 52 | } |
52 | 53 | ||
53 | public void Start(AssetInventoryServer server) | 54 | #region IPlugin implementation |
55 | |||
56 | public void Initialise(AssetInventoryServer server) | ||
54 | { | 57 | { |
55 | this.server = server; | 58 | this.server = server; |
56 | 59 | ||
@@ -64,12 +67,36 @@ namespace OpenSim.Grid.AssetInventoryServer.Extensions | |||
64 | server.HttpServer.AddHandler("post", null, @"^/DeleteItem/", DeleteItemHandler); | 67 | server.HttpServer.AddHandler("post", null, @"^/DeleteItem/", DeleteItemHandler); |
65 | server.HttpServer.AddHandler("post", null, @"^/RootFolders/", RootFoldersHandler); | 68 | server.HttpServer.AddHandler("post", null, @"^/RootFolders/", RootFoldersHandler); |
66 | server.HttpServer.AddHandler("post", null, @"^/ActiveGestures/", ActiveGesturesHandler); | 69 | server.HttpServer.AddHandler("post", null, @"^/ActiveGestures/", ActiveGesturesHandler); |
70 | |||
71 | Logger.Log.Info("[INVENTORY] OpenSim Inventory Frontend loaded."); | ||
72 | } | ||
73 | |||
74 | /// <summary> | ||
75 | /// <para>Initialises asset interface</para> | ||
76 | /// </summary> | ||
77 | public void Initialise() | ||
78 | { | ||
79 | Logger.Log.InfoFormat("[INVENTORY]: {0} cannot be default-initialized!", Name); | ||
80 | throw new PluginNotInitialisedException(Name); | ||
81 | } | ||
82 | |||
83 | public void Dispose() | ||
84 | { | ||
85 | } | ||
86 | |||
87 | public string Version | ||
88 | { | ||
89 | // TODO: this should be something meaningful and not hardcoded? | ||
90 | get { return "0.1"; } | ||
67 | } | 91 | } |
68 | 92 | ||
69 | public void Stop() | 93 | public string Name |
70 | { | 94 | { |
95 | get { return "AssetInventoryServer OpenSim asset frontend"; } | ||
71 | } | 96 | } |
72 | 97 | ||
98 | #endregion IPlugin implementation | ||
99 | |||
73 | bool GetInventoryHandler(IHttpClientContext client, IHttpRequest request, IHttpResponse response) | 100 | bool GetInventoryHandler(IHttpClientContext client, IHttpRequest request, IHttpResponse response) |
74 | { | 101 | { |
75 | UUID sessionID, agentID; | 102 | UUID sessionID, agentID; |
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml index 6d21327..cfdfdb5 100644 --- a/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/OpenSim/Resources/AssetInventoryServerOpenSimPlugins.addin.xml | |||
@@ -21,4 +21,7 @@ | |||
21 | <Extension path="/OpenSim/AssetInventoryServer/Frontend"> | 21 | <Extension path="/OpenSim/AssetInventoryServer/Frontend"> |
22 | <Plugin id="OpenSimAssetFrontend" provider="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.OpenSimAssetFrontendPlugin" /> | 22 | <Plugin id="OpenSimAssetFrontend" provider="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.OpenSimAssetFrontendPlugin" /> |
23 | </Extension> | 23 | </Extension> |
24 | <Extension path="/OpenSim/AssetInventoryServer/Frontend"> | ||
25 | <Plugin id="OpenSimInventoryFrontend" provider="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.dll" type="OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim.OpenSimInventoryFrontendPlugin" /> | ||
26 | </Extension> | ||
24 | </Addin> | 27 | </Addin> |