aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Caps.cs
diff options
context:
space:
mode:
authorMW2007-06-23 11:14:58 +0000
committerMW2007-06-23 11:14:58 +0000
commit303ea70efad0ba703743f4a5b9812250c314c2d4 (patch)
tree47d6a28ef7b026ed0e0fd39619b1bacc6fe3ba55 /OpenSim/OpenSim.Region/Caps.cs
parentDeleted some comments being wrote to console (diff)
downloadopensim-SC-303ea70efad0ba703743f4a5b9812250c314c2d4.zip
opensim-SC-303ea70efad0ba703743f4a5b9812250c314c2d4.tar.gz
opensim-SC-303ea70efad0ba703743f4a5b9812250c314c2d4.tar.bz2
opensim-SC-303ea70efad0ba703743f4a5b9812250c314c2d4.tar.xz
More work on CAPS handler.
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.Region/Caps.cs18
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/OpenSim.Region/Caps.cs b/OpenSim/OpenSim.Region/Caps.cs
index f3ee628..c86061f 100644
--- a/OpenSim/OpenSim.Region/Caps.cs
+++ b/OpenSim/OpenSim.Region/Caps.cs
@@ -10,16 +10,19 @@ namespace OpenSim.Region
10 { 10 {
11 private string httpListenerAddress; 11 private string httpListenerAddress;
12 private uint httpListenPort; 12 private uint httpListenPort;
13 private string MainPath = "00334-0000/"; 13 private string capsObjectPath = "00001-";
14 private string MapLayerPath = "00334-0001/"; 14 private string requestPath = "0000/";
15 private string mapLayerPath = "0001/";
15 private BaseHttpServer httpListener; 16 private BaseHttpServer httpListener;
16 // private LLUUID agentID; 17 private LLUUID agentID;
17 18
18 public Caps(BaseHttpServer httpServer, string httpListen, uint httpPort) 19 public Caps(BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, LLUUID agent)
19 { 20 {
21 capsObjectPath = capsPath;
20 httpListener = httpServer; 22 httpListener = httpServer;
21 httpListenerAddress = httpListen; 23 httpListenerAddress = httpListen;
22 httpListenPort = httpPort; 24 httpListenPort = httpPort;
25 agentID = agent;
23 } 26 }
24 27
25 /// <summary> 28 /// <summary>
@@ -28,8 +31,8 @@ namespace OpenSim.Region
28 public void RegisterHandlers() 31 public void RegisterHandlers()
29 { 32 {
30 Console.WriteLine("registering CAPS handlers"); 33 Console.WriteLine("registering CAPS handlers");
31 httpListener.AddRestHandler("POST", "/CAPS/" + MainPath, CapsRequest); 34 httpListener.AddRestHandler("POST", "/CAPS/" +capsObjectPath+ requestPath, CapsRequest);
32 httpListener.AddRestHandler("POST", "/CAPS/" + MapLayerPath, MapLayer); 35 httpListener.AddRestHandler("POST", "/CAPS/" +capsObjectPath+ mapLayerPath, MapLayer);
33 } 36 }
34 37
35 /// <summary> 38 /// <summary>
@@ -41,6 +44,7 @@ namespace OpenSim.Region
41 /// <returns></returns> 44 /// <returns></returns>
42 public string CapsRequest(string request, string path, string param) 45 public string CapsRequest(string request, string path, string param)
43 { 46 {
47 //Console.WriteLine("Caps Request " + request);
44 string result = "<llsd><map>"; 48 string result = "<llsd><map>";
45 result += this.GetCapabilities(); 49 result += this.GetCapabilities();
46 result += "</map></llsd>"; 50 result += "</map></llsd>";
@@ -55,7 +59,7 @@ namespace OpenSim.Region
55 { 59 {
56 string capURLS=""; 60 string capURLS="";
57 61
58 capURLS += "<key>MapLayer</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + MapLayerPath + "</string>"; 62 capURLS += "<key>MapLayer</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" +capsObjectPath+ mapLayerPath + "</string>";
59 63
60 return capURLS; 64 return capURLS;
61 } 65 }