aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Caps.cs
diff options
context:
space:
mode:
authorMW2007-06-25 16:01:30 +0000
committerMW2007-06-25 16:01:30 +0000
commitf41379549773531b2886b64aaacf57c954a64610 (patch)
tree09d96fbb41898db1ed55a674c1757fbaee34c7af /OpenSim/OpenSim.Region/Caps.cs
parentDisabled the EventQueueGet CAPS as its not yet fully functional. (diff)
downloadopensim-SC-f41379549773531b2886b64aaacf57c954a64610.zip
opensim-SC-f41379549773531b2886b64aaacf57c954a64610.tar.gz
opensim-SC-f41379549773531b2886b64aaacf57c954a64610.tar.bz2
opensim-SC-f41379549773531b2886b64aaacf57c954a64610.tar.xz
updated prebuild.xml.
Added some more events to IClientAPI (OnGrapObject , OnGrapUpdate, OnDeGrapObject).
Diffstat (limited to 'OpenSim/OpenSim.Region/Caps.cs')
-rw-r--r--OpenSim/OpenSim.Region/Caps.cs28
1 files changed, 23 insertions, 5 deletions
diff --git a/OpenSim/OpenSim.Region/Caps.cs b/OpenSim/OpenSim.Region/Caps.cs
index 9cb921b..88799a0 100644
--- a/OpenSim/OpenSim.Region/Caps.cs
+++ b/OpenSim/OpenSim.Region/Caps.cs
@@ -27,6 +27,7 @@ namespace OpenSim.Region
27 private LLUUID agentID; 27 private LLUUID agentID;
28 private AssetCache assetCache; 28 private AssetCache assetCache;
29 private int eventQueueCount = 1; 29 private int eventQueueCount = 1;
30 private Queue<string> CapsEventQueue = new Queue<string>();
30 31
31 public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, LLUUID agent) 32 public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, LLUUID agent)
32 { 33 {
@@ -77,7 +78,7 @@ namespace OpenSim.Region
77 capURLS += "<key>MapLayer</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + mapLayerPath + "</string>"; 78 capURLS += "<key>MapLayer</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + mapLayerPath + "</string>";
78 capURLS += "<key>NewFileAgentInventory</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + newInventory + "</string>"; 79 capURLS += "<key>NewFileAgentInventory</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + newInventory + "</string>";
79 //capURLS += "<key>RequestTextureDownload</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + requestTexture + "</string>"; 80 //capURLS += "<key>RequestTextureDownload</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + requestTexture + "</string>";
80 // capURLS += "<key>EventQueueGet</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + eventQueue + "</string>"; 81 //capURLS += "<key>EventQueueGet</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + eventQueue + "</string>";
81 return capURLS; 82 return capURLS;
82 } 83 }
83 84
@@ -122,9 +123,26 @@ namespace OpenSim.Region
122 123
123 public string ProcessEventQueue(string request, string path, string param) 124 public string ProcessEventQueue(string request, string path, string param)
124 { 125 {
125 // Console.WriteLine("event queue request " + request); 126 // Console.WriteLine("event queue request " + request);
126 string res = ""; 127 string res = "";
127 res = this.CreateEmptyEventResponse(); 128 int timer = 0;
129
130 /*while ((timer < 200) || (this.CapsEventQueue.Count < 1))
131 {
132 timer++;
133 }*/
134 if (this.CapsEventQueue.Count > 0)
135 {
136 lock (this.CapsEventQueue)
137 {
138 string item = CapsEventQueue.Dequeue();
139 res = item;
140 }
141 }
142 else
143 {
144 res = this.CreateEmptyEventResponse();
145 }
128 return res; 146 return res;
129 } 147 }
130 148
@@ -141,6 +159,7 @@ namespace OpenSim.Region
141 res += "</map></array>"; 159 res += "</map></array>";
142 res += "</map></llsd>"; 160 res += "</map></llsd>";
143 eventQueueCount++; 161 eventQueueCount++;
162 this.CapsEventQueue.Enqueue(res);
144 return res; 163 return res;
145 } 164 }
146 165
@@ -176,7 +195,7 @@ namespace OpenSim.Region
176 195
177 public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data) 196 public void UploadHandler(LLUUID assetID, LLUUID inventoryItem, byte[] data)
178 { 197 {
179 // Console.WriteLine("upload handler called"); 198 Console.WriteLine("upload handler called");
180 AssetBase asset; 199 AssetBase asset;
181 asset = new AssetBase(); 200 asset = new AssetBase();
182 asset.FullID = assetID; 201 asset.FullID = assetID;
@@ -185,7 +204,6 @@ namespace OpenSim.Region
185 asset.Name = "UploadedTexture" + Util.RandomClass.Next(1, 1000).ToString("000"); 204 asset.Name = "UploadedTexture" + Util.RandomClass.Next(1, 1000).ToString("000");
186 asset.Data = data; 205 asset.Data = data;
187 this.assetCache.AddAsset(asset); 206 this.assetCache.AddAsset(asset);
188
189 } 207 }
190 208
191 public class AssetUploader 209 public class AssetUploader