aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs
diff options
context:
space:
mode:
authorAdam Frisby2009-04-22 10:10:19 +0000
committerAdam Frisby2009-04-22 10:10:19 +0000
commit03c307ecdb2c75700d838e163ea21a27aad294b2 (patch)
treedacc95be3e65ee04475b6a8b7953d8a954d14cf4 /OpenSim/Client/VWoHTTP/VWoHTTPModule.cs
parentfurther cleanup (lower casing non-public vars and local vars) (diff)
downloadopensim-SC-03c307ecdb2c75700d838e163ea21a27aad294b2.zip
opensim-SC-03c307ecdb2c75700d838e163ea21a27aad294b2.tar.gz
opensim-SC-03c307ecdb2c75700d838e163ea21a27aad294b2.tar.bz2
opensim-SC-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.cs69
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 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using Nini.Config;
5using OpenMetaverse;
6using OpenSim.Client.VWoHTTP.ClientStack;
7using OpenSim.Framework.Servers;
8using OpenSim.Framework.Servers.Interfaces;
9using OpenSim.Region.Framework.Interfaces;
10using OpenSim.Region.Framework.Scenes;
11
12namespace 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}