diff options
author | Melanie Thielker | 2009-05-13 02:54:13 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-05-13 02:54:13 +0000 |
commit | 80ce08d8b2744b84af8b1311130fbe68d31e89a9 (patch) | |
tree | 61472ca87e5328633a93ed8b138e2a76bcf19117 /OpenSim/Region/CoreModules/Scripting/LSLHttp | |
parent | Implement llAttachToAvatar() (diff) | |
download | opensim-SC-80ce08d8b2744b84af8b1311130fbe68d31e89a9.zip opensim-SC-80ce08d8b2744b84af8b1311130fbe68d31e89a9.tar.gz opensim-SC-80ce08d8b2744b84af8b1311130fbe68d31e89a9.tar.bz2 opensim-SC-80ce08d8b2744b84af8b1311130fbe68d31e89a9.tar.xz |
Add a skeleton for the LSLHttpServer
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/LSLHttp')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs new file mode 100644 index 0000000..457de99 --- /dev/null +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -0,0 +1,116 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using Nini.Config; | ||
33 | using OpenMetaverse; | ||
34 | using OpenSim.Region.Framework.Interfaces; | ||
35 | using OpenSim.Region.Framework.Scenes; | ||
36 | |||
37 | namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | ||
38 | { | ||
39 | public class UrlData | ||
40 | { | ||
41 | public UUID hostID; | ||
42 | public UUID itemID; | ||
43 | Scene scene; | ||
44 | IScriptModule engine; | ||
45 | string url; | ||
46 | Dictionary<UUID, RequestData> requests; | ||
47 | } | ||
48 | |||
49 | public class RequestData | ||
50 | { | ||
51 | UUID requestID; | ||
52 | Dictionary<string, string> headers; | ||
53 | string body; | ||
54 | } | ||
55 | |||
56 | public class UrlModule : ISharedRegionModule, IUrlModule | ||
57 | { | ||
58 | private Dictionary<UUID, UrlData> m_RequestMap = | ||
59 | new Dictionary<UUID, UrlData>(); | ||
60 | |||
61 | private Dictionary<string, UrlData> m_UrlMap = | ||
62 | new Dictionary<string, UrlData>(); | ||
63 | |||
64 | private int m_TotalUrls = 0; | ||
65 | |||
66 | public string Name | ||
67 | { | ||
68 | get { return "UrlModule"; } | ||
69 | } | ||
70 | |||
71 | public void Initialise(IConfigSource config) | ||
72 | { | ||
73 | } | ||
74 | |||
75 | public void PostInitialise() | ||
76 | { | ||
77 | } | ||
78 | |||
79 | public void AddRegion(Scene scene) | ||
80 | { | ||
81 | } | ||
82 | |||
83 | public void RegionLoaded(Scene scene) | ||
84 | { | ||
85 | } | ||
86 | |||
87 | public void RemoveRegion(Scene scene) | ||
88 | { | ||
89 | } | ||
90 | |||
91 | public void Close() | ||
92 | { | ||
93 | } | ||
94 | |||
95 | public void RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID) | ||
96 | { | ||
97 | } | ||
98 | |||
99 | public void RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID) | ||
100 | { | ||
101 | } | ||
102 | |||
103 | public void ReleaseURL(string url) | ||
104 | { | ||
105 | } | ||
106 | |||
107 | public void HttpResponse(UUID request, int status, string body) | ||
108 | { | ||
109 | } | ||
110 | |||
111 | public string GetHttpHeader(UUID request, string header) | ||
112 | { | ||
113 | return String.Empty; | ||
114 | } | ||
115 | } | ||
116 | } | ||