aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
diff options
context:
space:
mode:
authordiva2009-03-23 02:37:19 +0000
committerdiva2009-03-23 02:37:19 +0000
commit5af63a6a5c98fb153a07dcaac067ec3b94d6bdee (patch)
tree85ba6a5faadac0ba23a18b6572c478ba13462238 /OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
parentFinish folder gives. With this commit, single item and folder gives now (diff)
downloadopensim-SC_OLD-5af63a6a5c98fb153a07dcaac067ec3b94d6bdee.zip
opensim-SC_OLD-5af63a6a5c98fb153a07dcaac067ec3b94d6bdee.tar.gz
opensim-SC_OLD-5af63a6a5c98fb153a07dcaac067ec3b94d6bdee.tar.bz2
opensim-SC_OLD-5af63a6a5c98fb153a07dcaac067ec3b94d6bdee.tar.xz
Root agent retrieval via http/REST. This is a pull, the caller gets the agent. This is not used by the regions yet, but it may be a better alternative to transfer agents even when that is done by the regions. The data is still trivial; soon it will have attachments, scripts and script state. Also, authorization tokens still to come. Serialization using OSD/json, as the other methods.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs25
1 files changed, 19 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs b/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
index 17d3bb9..7e6e52a 100644
--- a/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
+++ b/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
@@ -40,8 +40,8 @@ namespace OpenSim.Region.Framework.Scenes
40 { 40 {
41 UUID AgentID { get; set; } 41 UUID AgentID { get; set; }
42 42
43 OSDMap PackUpdateMessage(); 43 OSDMap Pack();
44 void UnpackUpdateMessage(OSDMap map); 44 void Unpack(OSDMap map);
45 } 45 }
46 46
47 /// <summary> 47 /// <summary>
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Framework.Scenes
74 public byte[] Throttles; 74 public byte[] Throttles;
75 75
76 76
77 public OSDMap PackUpdateMessage() 77 public OSDMap Pack()
78 { 78 {
79 OSDMap args = new OSDMap(); 79 OSDMap args = new OSDMap();
80 args["message_type"] = OSD.FromString("AgentPosition"); 80 args["message_type"] = OSD.FromString("AgentPosition");
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes
101 return args; 101 return args;
102 } 102 }
103 103
104 public void UnpackUpdateMessage(OSDMap args) 104 public void Unpack(OSDMap args)
105 { 105 {
106 if (args.ContainsKey("region_handle")) 106 if (args.ContainsKey("region_handle"))
107 UInt64.TryParse(args["region_handle"].AsString(), out RegionHandle); 107 UInt64.TryParse(args["region_handle"].AsString(), out RegionHandle);
@@ -257,7 +257,7 @@ namespace OpenSim.Region.Framework.Scenes
257 257
258 public string CallbackURI; 258 public string CallbackURI;
259 259
260 public OSDMap PackUpdateMessage() 260 public virtual OSDMap Pack()
261 { 261 {
262 OSDMap args = new OSDMap(); 262 OSDMap args = new OSDMap();
263 args["message_type"] = OSD.FromString("AgentData"); 263 args["message_type"] = OSD.FromString("AgentData");
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Framework.Scenes
346 /// Avoiding reflection makes it painful to write, but that's the price! 346 /// Avoiding reflection makes it painful to write, but that's the price!
347 /// </summary> 347 /// </summary>
348 /// <param name="hash"></param> 348 /// <param name="hash"></param>
349 public void UnpackUpdateMessage(OSDMap args) 349 public virtual void Unpack(OSDMap args)
350 { 350 {
351 if (args.ContainsKey("region_handle")) 351 if (args.ContainsKey("region_handle"))
352 UInt64.TryParse(args["region_handle"].AsString(), out RegionHandle); 352 UInt64.TryParse(args["region_handle"].AsString(), out RegionHandle);
@@ -497,4 +497,17 @@ namespace OpenSim.Region.Framework.Scenes
497 } 497 }
498 } 498 }
499 499
500 public class CompleteAgentData : AgentData
501 {
502 public override OSDMap Pack()
503 {
504 return base.Pack();
505 }
506
507 public override void Unpack(OSDMap map)
508 {
509 base.Unpack(map);
510 }
511 }
512
500} 513}