diff options
author | Jeff Ames | 2008-04-07 14:19:08 +0000 |
---|---|---|
committer | Jeff Ames | 2008-04-07 14:19:08 +0000 |
commit | 8833a72388a07db48eb1fc135bf3919da13fb1db (patch) | |
tree | e9ba61c9b6a2eb78d664a8a5fa8d49ddfd4e1332 /OpenSim/Region/DataSnapshot/EstateSnapshot.cs | |
parent | Thank you kindly Diva & KMeisthax for adding the beginnings (diff) | |
download | opensim-SC-8833a72388a07db48eb1fc135bf3919da13fb1db.zip opensim-SC-8833a72388a07db48eb1fc135bf3919da13fb1db.tar.gz opensim-SC-8833a72388a07db48eb1fc135bf3919da13fb1db.tar.bz2 opensim-SC-8833a72388a07db48eb1fc135bf3919da13fb1db.tar.xz |
Update svn properties.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/DataSnapshot/EstateSnapshot.cs | 136 |
1 files changed, 68 insertions, 68 deletions
diff --git a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs index 76fed59..eeb9709 100644 --- a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs | |||
@@ -1,68 +1,68 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using System.Xml; | 4 | using System.Xml; |
5 | using OpenSim.Region.Environment.Scenes; | 5 | using OpenSim.Region.Environment.Scenes; |
6 | using OpenSim.Region.Environment.Modules.LandManagement; | 6 | using OpenSim.Region.Environment.Modules.LandManagement; |
7 | using OpenSim.Framework; | 7 | using OpenSim.Framework; |
8 | using OpenSim.Framework.Console; | 8 | using OpenSim.Framework.Console; |
9 | using OpenSim.Framework.Communications; | 9 | using OpenSim.Framework.Communications; |
10 | using libsecondlife; | 10 | using libsecondlife; |
11 | using libsecondlife.Packets; | 11 | using libsecondlife.Packets; |
12 | 12 | ||
13 | namespace OpenSim.Region.DataSnapshot | 13 | namespace OpenSim.Region.DataSnapshot |
14 | { | 14 | { |
15 | public class EstateSnapshot : IDataSnapshotProvider | 15 | public class EstateSnapshot : IDataSnapshotProvider |
16 | { | 16 | { |
17 | private Scene m_scene = null; | 17 | private Scene m_scene = null; |
18 | private DataSnapshotManager m_parent = null; | 18 | private DataSnapshotManager m_parent = null; |
19 | 19 | ||
20 | #region IDataSnapshotProvider Members | 20 | #region IDataSnapshotProvider Members |
21 | 21 | ||
22 | public XmlNode RequestSnapshotData(XmlDocument factory) | 22 | public XmlNode RequestSnapshotData(XmlDocument factory) |
23 | { | 23 | { |
24 | //Estate data section - contains who owns a set of sims and the name of the set. | 24 | //Estate data section - contains who owns a set of sims and the name of the set. |
25 | //In Opensim all the estate names are the same as the Master Avatar (owner of the sim) | 25 | //In Opensim all the estate names are the same as the Master Avatar (owner of the sim) |
26 | //Now in DataSnapshotProvider module form! | 26 | //Now in DataSnapshotProvider module form! |
27 | XmlNode estatedata = factory.CreateNode(XmlNodeType.Element, "estate", ""); | 27 | XmlNode estatedata = factory.CreateNode(XmlNodeType.Element, "estate", ""); |
28 | 28 | ||
29 | LLUUID ownerid = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 29 | LLUUID ownerid = m_scene.RegionInfo.MasterAvatarAssignedUUID; |
30 | 30 | ||
31 | //TODO: Change to query userserver about the master avatar UUID ? | 31 | //TODO: Change to query userserver about the master avatar UUID ? |
32 | String firstname = m_scene.RegionInfo.MasterAvatarFirstName; | 32 | String firstname = m_scene.RegionInfo.MasterAvatarFirstName; |
33 | String lastname = m_scene.RegionInfo.MasterAvatarLastName; | 33 | String lastname = m_scene.RegionInfo.MasterAvatarLastName; |
34 | 34 | ||
35 | //TODO: Fix the marshalling system to have less copypasta gruntwork | 35 | //TODO: Fix the marshalling system to have less copypasta gruntwork |
36 | XmlNode user = factory.CreateNode(XmlNodeType.Element, "user", ""); | 36 | XmlNode user = factory.CreateNode(XmlNodeType.Element, "user", ""); |
37 | XmlAttribute type = (XmlAttribute)factory.CreateNode(XmlNodeType.Attribute, "type", ""); | 37 | XmlAttribute type = (XmlAttribute)factory.CreateNode(XmlNodeType.Attribute, "type", ""); |
38 | type.Value = "owner"; | 38 | type.Value = "owner"; |
39 | user.Attributes.Append(type); | 39 | user.Attributes.Append(type); |
40 | 40 | ||
41 | //TODO: Create more TODOs | 41 | //TODO: Create more TODOs |
42 | XmlNode username = factory.CreateNode(XmlNodeType.Element, "name", ""); | 42 | XmlNode username = factory.CreateNode(XmlNodeType.Element, "name", ""); |
43 | username.InnerText = firstname + " " + lastname; | 43 | username.InnerText = firstname + " " + lastname; |
44 | user.AppendChild(username); | 44 | user.AppendChild(username); |
45 | 45 | ||
46 | XmlNode useruuid = factory.CreateNode(XmlNodeType.Element, "uuid", ""); | 46 | XmlNode useruuid = factory.CreateNode(XmlNodeType.Element, "uuid", ""); |
47 | useruuid.InnerText = ownerid.ToString(); | 47 | useruuid.InnerText = ownerid.ToString(); |
48 | user.AppendChild(useruuid); | 48 | user.AppendChild(useruuid); |
49 | 49 | ||
50 | estatedata.AppendChild(user); | 50 | estatedata.AppendChild(user); |
51 | 51 | ||
52 | return estatedata; | 52 | return estatedata; |
53 | } | 53 | } |
54 | 54 | ||
55 | public void Initialize(Scene scene, DataSnapshotManager parent) | 55 | public void Initialize(Scene scene, DataSnapshotManager parent) |
56 | { | 56 | { |
57 | m_scene = scene; | 57 | m_scene = scene; |
58 | m_parent = parent; | 58 | m_parent = parent; |
59 | } | 59 | } |
60 | 60 | ||
61 | public Scene GetParentScene | 61 | public Scene GetParentScene |
62 | { | 62 | { |
63 | get { return m_scene; } | 63 | get { return m_scene; } |
64 | } | 64 | } |
65 | 65 | ||
66 | #endregion | 66 | #endregion |
67 | } | 67 | } |
68 | } | 68 | } |