diff options
author | Adam Frisby | 2009-04-22 10:10:19 +0000 |
---|---|---|
committer | Adam Frisby | 2009-04-22 10:10:19 +0000 |
commit | 03c307ecdb2c75700d838e163ea21a27aad294b2 (patch) | |
tree | dacc95be3e65ee04475b6a8b7953d8a954d14cf4 /OpenSim/Client/VWoHTTP/VWoHTTPModule.cs | |
parent | further cleanup (lower casing non-public vars and local vars) (diff) | |
download | opensim-SC_OLD-03c307ecdb2c75700d838e163ea21a27aad294b2.zip opensim-SC_OLD-03c307ecdb2c75700d838e163ea21a27aad294b2.tar.gz opensim-SC_OLD-03c307ecdb2c75700d838e163ea21a27aad294b2.tar.bz2 opensim-SC_OLD-03c307ecdb2c75700d838e163ea21a27aad294b2.tar.xz |
* Committing stub VW-over-HTTP ClientStack. (1/2)
* Nonfunctional, but eventually form a AJAX-accessible client protocol - for clients written in environments which only allow HTTP (eg HTML, Silverlight, Flash, etc). Designed for super-lightweight clients.
Diffstat (limited to 'OpenSim/Client/VWoHTTP/VWoHTTPModule.cs')
-rw-r--r-- | OpenSim/Client/VWoHTTP/VWoHTTPModule.cs | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs b/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs new file mode 100644 index 0000000..b326122 --- /dev/null +++ b/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs | |||
@@ -0,0 +1,69 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using Nini.Config; | ||
5 | using OpenMetaverse; | ||
6 | using OpenSim.Client.VWoHTTP.ClientStack; | ||
7 | using OpenSim.Framework.Servers; | ||
8 | using OpenSim.Framework.Servers.Interfaces; | ||
9 | using OpenSim.Region.Framework.Interfaces; | ||
10 | using OpenSim.Region.Framework.Scenes; | ||
11 | |||
12 | namespace OpenSim.Client.VWoHTTP | ||
13 | { | ||
14 | class VWoHTTPModule : IRegionModule, IHttpAgentHandler | ||
15 | { | ||
16 | |||
17 | private IHttpServer m_httpd; | ||
18 | |||
19 | private readonly List<Scene> m_scenes = new List<Scene>(); | ||
20 | |||
21 | private Dictionary<UUID, VWHClientView> m_clients = new Dictionary<UUID, VWHClientView>(); | ||
22 | |||
23 | #region Implementation of IRegionModule | ||
24 | |||
25 | public void Initialise(Scene scene, IConfigSource source) | ||
26 | { | ||
27 | m_scenes.Add(scene); | ||
28 | |||
29 | m_httpd = scene.CommsManager.HttpServer; | ||
30 | } | ||
31 | |||
32 | public void PostInitialise() | ||
33 | { | ||
34 | m_httpd.AddAgentHandler("vwohttp", this); | ||
35 | } | ||
36 | |||
37 | public void Close() | ||
38 | { | ||
39 | m_httpd.RemoveAgentHandler("vwohttp", this); | ||
40 | } | ||
41 | |||
42 | public string Name | ||
43 | { | ||
44 | get { return "VWoHTTP ClientStack"; } | ||
45 | } | ||
46 | |||
47 | public bool IsSharedModule | ||
48 | { | ||
49 | get { return true; } | ||
50 | } | ||
51 | |||
52 | #endregion | ||
53 | |||
54 | #region Implementation of IHttpAgentHandler | ||
55 | |||
56 | public bool Handle(OSHttpRequest req, OSHttpResponse resp) | ||
57 | { | ||
58 | |||
59 | return false; | ||
60 | } | ||
61 | |||
62 | public bool Match(OSHttpRequest req, OSHttpResponse resp) | ||
63 | { | ||
64 | return req.Url.ToString().Contains("vwohttp"); | ||
65 | } | ||
66 | |||
67 | #endregion | ||
68 | } | ||
69 | } | ||