diff options
Diffstat (limited to '')
33 files changed, 4727 insertions, 4727 deletions
diff --git a/OpenSim/Framework/General/ACL.cs b/OpenSim/Framework/General/ACL.cs index 0e9df19..8f9c6e7 100644 --- a/OpenSim/Framework/General/ACL.cs +++ b/OpenSim/Framework/General/ACL.cs | |||
@@ -1,263 +1,263 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
33 | // ACL Class | 33 | // ACL Class |
34 | // Modelled after the structure of the Zend ACL Framework Library | 34 | // Modelled after the structure of the Zend ACL Framework Library |
35 | // with one key difference - the tree will search for all matching | 35 | // with one key difference - the tree will search for all matching |
36 | // permissions rather than just the first. Deny permissions will | 36 | // permissions rather than just the first. Deny permissions will |
37 | // override all others. | 37 | // override all others. |
38 | 38 | ||
39 | #region ACL Core Class | 39 | #region ACL Core Class |
40 | 40 | ||
41 | /// <summary> | 41 | /// <summary> |
42 | /// Access Control List Engine | 42 | /// Access Control List Engine |
43 | /// </summary> | 43 | /// </summary> |
44 | public class ACL | 44 | public class ACL |
45 | { | 45 | { |
46 | private Dictionary<string, Role> Roles = new Dictionary<string, Role>(); | 46 | private Dictionary<string, Role> Roles = new Dictionary<string, Role>(); |
47 | private Dictionary<string, Resource> Resources = new Dictionary<string, Resource>(); | 47 | private Dictionary<string, Resource> Resources = new Dictionary<string, Resource>(); |
48 | 48 | ||
49 | public ACL AddRole(Role role) | 49 | public ACL AddRole(Role role) |
50 | { | 50 | { |
51 | if (Roles.ContainsKey(role.Name)) | 51 | if (Roles.ContainsKey(role.Name)) |
52 | throw new AlreadyContainsRoleException(role); | 52 | throw new AlreadyContainsRoleException(role); |
53 | 53 | ||
54 | Roles.Add(role.Name, role); | 54 | Roles.Add(role.Name, role); |
55 | 55 | ||
56 | return this; | 56 | return this; |
57 | } | 57 | } |
58 | 58 | ||
59 | public ACL AddResource(Resource resource) | 59 | public ACL AddResource(Resource resource) |
60 | { | 60 | { |
61 | Resources.Add(resource.Name, resource); | 61 | Resources.Add(resource.Name, resource); |
62 | 62 | ||
63 | return this; | 63 | return this; |
64 | } | 64 | } |
65 | 65 | ||
66 | public Permission HasPermission(string role, string resource) | 66 | public Permission HasPermission(string role, string resource) |
67 | { | 67 | { |
68 | if (!Roles.ContainsKey(role)) | 68 | if (!Roles.ContainsKey(role)) |
69 | throw new KeyNotFoundException(); | 69 | throw new KeyNotFoundException(); |
70 | 70 | ||
71 | if (!Resources.ContainsKey(resource)) | 71 | if (!Resources.ContainsKey(resource)) |
72 | throw new KeyNotFoundException(); | 72 | throw new KeyNotFoundException(); |
73 | 73 | ||
74 | return Roles[role].RequestPermission(resource); | 74 | return Roles[role].RequestPermission(resource); |
75 | } | 75 | } |
76 | 76 | ||
77 | public ACL GrantPermission(string role, string resource) | 77 | public ACL GrantPermission(string role, string resource) |
78 | { | 78 | { |
79 | if (!Roles.ContainsKey(role)) | 79 | if (!Roles.ContainsKey(role)) |
80 | throw new KeyNotFoundException(); | 80 | throw new KeyNotFoundException(); |
81 | 81 | ||
82 | if (!Resources.ContainsKey(resource)) | 82 | if (!Resources.ContainsKey(resource)) |
83 | throw new KeyNotFoundException(); | 83 | throw new KeyNotFoundException(); |
84 | 84 | ||
85 | Roles[role].GivePermission(resource, Permission.Allow); | 85 | Roles[role].GivePermission(resource, Permission.Allow); |
86 | 86 | ||
87 | return this; | 87 | return this; |
88 | } | 88 | } |
89 | 89 | ||
90 | public ACL DenyPermission(string role, string resource) | 90 | public ACL DenyPermission(string role, string resource) |
91 | { | 91 | { |
92 | if (!Roles.ContainsKey(role)) | 92 | if (!Roles.ContainsKey(role)) |
93 | throw new KeyNotFoundException(); | 93 | throw new KeyNotFoundException(); |
94 | 94 | ||
95 | if (!Resources.ContainsKey(resource)) | 95 | if (!Resources.ContainsKey(resource)) |
96 | throw new KeyNotFoundException(); | 96 | throw new KeyNotFoundException(); |
97 | 97 | ||
98 | Roles[role].GivePermission(resource, Permission.Deny); | 98 | Roles[role].GivePermission(resource, Permission.Deny); |
99 | 99 | ||
100 | return this; | 100 | return this; |
101 | } | 101 | } |
102 | 102 | ||
103 | public ACL ResetPermission(string role, string resource) | 103 | public ACL ResetPermission(string role, string resource) |
104 | { | 104 | { |
105 | if (!Roles.ContainsKey(role)) | 105 | if (!Roles.ContainsKey(role)) |
106 | throw new KeyNotFoundException(); | 106 | throw new KeyNotFoundException(); |
107 | 107 | ||
108 | if (!Resources.ContainsKey(resource)) | 108 | if (!Resources.ContainsKey(resource)) |
109 | throw new KeyNotFoundException(); | 109 | throw new KeyNotFoundException(); |
110 | 110 | ||
111 | Roles[role].GivePermission(resource, Permission.None); | 111 | Roles[role].GivePermission(resource, Permission.None); |
112 | 112 | ||
113 | return this; | 113 | return this; |
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | #endregion | 117 | #endregion |
118 | 118 | ||
119 | #region Exceptions | 119 | #region Exceptions |
120 | 120 | ||
121 | /// <summary> | 121 | /// <summary> |
122 | /// Thrown when an ACL attempts to add a duplicate role. | 122 | /// Thrown when an ACL attempts to add a duplicate role. |
123 | /// </summary> | 123 | /// </summary> |
124 | public class AlreadyContainsRoleException : Exception | 124 | public class AlreadyContainsRoleException : Exception |
125 | { | 125 | { |
126 | protected Role m_role; | 126 | protected Role m_role; |
127 | 127 | ||
128 | public Role ErrorRole | 128 | public Role ErrorRole |
129 | { | 129 | { |
130 | get { return m_role; } | 130 | get { return m_role; } |
131 | } | 131 | } |
132 | 132 | ||
133 | public AlreadyContainsRoleException(Role role) | 133 | public AlreadyContainsRoleException(Role role) |
134 | { | 134 | { |
135 | m_role = role; | 135 | m_role = role; |
136 | } | 136 | } |
137 | 137 | ||
138 | public override string ToString() | 138 | public override string ToString() |
139 | { | 139 | { |
140 | return "This ACL already contains a role called '" + m_role.Name + "'."; | 140 | return "This ACL already contains a role called '" + m_role.Name + "'."; |
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
144 | #endregion | 144 | #endregion |
145 | 145 | ||
146 | #region Roles and Resources | 146 | #region Roles and Resources |
147 | 147 | ||
148 | /// <summary> | 148 | /// <summary> |
149 | /// Does this Role have permission to access a specified Resource? | 149 | /// Does this Role have permission to access a specified Resource? |
150 | /// </summary> | 150 | /// </summary> |
151 | public enum Permission | 151 | public enum Permission |
152 | { | 152 | { |
153 | Deny, | 153 | Deny, |
154 | None, | 154 | None, |
155 | Allow | 155 | Allow |
156 | } ; | 156 | } ; |
157 | 157 | ||
158 | /// <summary> | 158 | /// <summary> |
159 | /// A role class, for use with Users or Groups | 159 | /// A role class, for use with Users or Groups |
160 | /// </summary> | 160 | /// </summary> |
161 | public class Role | 161 | public class Role |
162 | { | 162 | { |
163 | private string m_name; | 163 | private string m_name; |
164 | private Role[] m_parents; | 164 | private Role[] m_parents; |
165 | private Dictionary<string, Permission> m_resources = new Dictionary<string, Permission>(); | 165 | private Dictionary<string, Permission> m_resources = new Dictionary<string, Permission>(); |
166 | 166 | ||
167 | public string Name | 167 | public string Name |
168 | { | 168 | { |
169 | get { return m_name; } | 169 | get { return m_name; } |
170 | } | 170 | } |
171 | 171 | ||
172 | public Permission RequestPermission(string resource) | 172 | public Permission RequestPermission(string resource) |
173 | { | 173 | { |
174 | return RequestPermission(resource, Permission.None); | 174 | return RequestPermission(resource, Permission.None); |
175 | } | 175 | } |
176 | 176 | ||
177 | public Permission RequestPermission(string resource, Permission current) | 177 | public Permission RequestPermission(string resource, Permission current) |
178 | { | 178 | { |
179 | // Deny permissions always override any others | 179 | // Deny permissions always override any others |
180 | if (current == Permission.Deny) | 180 | if (current == Permission.Deny) |
181 | return current; | 181 | return current; |
182 | 182 | ||
183 | Permission temp = Permission.None; | 183 | Permission temp = Permission.None; |
184 | 184 | ||
185 | // Pickup non-None permissions | 185 | // Pickup non-None permissions |
186 | if (m_resources.ContainsKey(resource) && m_resources[resource] != Permission.None) | 186 | if (m_resources.ContainsKey(resource) && m_resources[resource] != Permission.None) |
187 | temp = m_resources[resource]; | 187 | temp = m_resources[resource]; |
188 | 188 | ||
189 | if (m_parents != null) | 189 | if (m_parents != null) |
190 | { | 190 | { |
191 | foreach (Role parent in m_parents) | 191 | foreach (Role parent in m_parents) |
192 | { | 192 | { |
193 | temp = parent.RequestPermission(resource, temp); | 193 | temp = parent.RequestPermission(resource, temp); |
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
197 | return temp; | 197 | return temp; |
198 | } | 198 | } |
199 | 199 | ||
200 | public void GivePermission(string resource, Permission perm) | 200 | public void GivePermission(string resource, Permission perm) |
201 | { | 201 | { |
202 | m_resources[resource] = perm; | 202 | m_resources[resource] = perm; |
203 | } | 203 | } |
204 | 204 | ||
205 | public Role(string name) | 205 | public Role(string name) |
206 | { | 206 | { |
207 | m_name = name; | 207 | m_name = name; |
208 | m_parents = null; | 208 | m_parents = null; |
209 | } | 209 | } |
210 | 210 | ||
211 | public Role(string name, Role[] parents) | 211 | public Role(string name, Role[] parents) |
212 | { | 212 | { |
213 | m_name = name; | 213 | m_name = name; |
214 | m_parents = parents; | 214 | m_parents = parents; |
215 | } | 215 | } |
216 | } | 216 | } |
217 | 217 | ||
218 | public class Resource | 218 | public class Resource |
219 | { | 219 | { |
220 | private string m_name; | 220 | private string m_name; |
221 | 221 | ||
222 | public string Name | 222 | public string Name |
223 | { | 223 | { |
224 | get { return m_name; } | 224 | get { return m_name; } |
225 | } | 225 | } |
226 | 226 | ||
227 | public Resource(string name) | 227 | public Resource(string name) |
228 | { | 228 | { |
229 | m_name = name; | 229 | m_name = name; |
230 | } | 230 | } |
231 | } | 231 | } |
232 | 232 | ||
233 | #endregion | 233 | #endregion |
234 | 234 | ||
235 | #region Tests | 235 | #region Tests |
236 | 236 | ||
237 | internal class ACLTester | 237 | internal class ACLTester |
238 | { | 238 | { |
239 | public ACLTester() | 239 | public ACLTester() |
240 | { | 240 | { |
241 | ACL acl = new ACL(); | 241 | ACL acl = new ACL(); |
242 | 242 | ||
243 | Role Guests = new Role("Guests"); | 243 | Role Guests = new Role("Guests"); |
244 | acl.AddRole(Guests); | 244 | acl.AddRole(Guests); |
245 | 245 | ||
246 | Role[] parents = new Role[0]; | 246 | Role[] parents = new Role[0]; |
247 | parents[0] = Guests; | 247 | parents[0] = Guests; |
248 | 248 | ||
249 | Role JoeGuest = new Role("JoeGuest", parents); | 249 | Role JoeGuest = new Role("JoeGuest", parents); |
250 | acl.AddRole(JoeGuest); | 250 | acl.AddRole(JoeGuest); |
251 | 251 | ||
252 | Resource CanBuild = new Resource("CanBuild"); | 252 | Resource CanBuild = new Resource("CanBuild"); |
253 | acl.AddResource(CanBuild); | 253 | acl.AddResource(CanBuild); |
254 | 254 | ||
255 | 255 | ||
256 | acl.GrantPermission("Guests", "CanBuild"); | 256 | acl.GrantPermission("Guests", "CanBuild"); |
257 | 257 | ||
258 | acl.HasPermission("JoeGuest", "CanBuild"); | 258 | acl.HasPermission("JoeGuest", "CanBuild"); |
259 | } | 259 | } |
260 | } | 260 | } |
261 | 261 | ||
262 | #endregion | 262 | #endregion |
263 | } \ No newline at end of file | 263 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/AgentCiruitData.cs b/OpenSim/Framework/General/AgentCiruitData.cs index 95cac60..3f17ca8 100644 --- a/OpenSim/Framework/General/AgentCiruitData.cs +++ b/OpenSim/Framework/General/AgentCiruitData.cs | |||
@@ -1,52 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
33 | [Serializable] | 33 | [Serializable] |
34 | public class AgentCircuitData | 34 | public class AgentCircuitData |
35 | { | 35 | { |
36 | public AgentCircuitData() | 36 | public AgentCircuitData() |
37 | { | 37 | { |
38 | } | 38 | } |
39 | 39 | ||
40 | public LLUUID AgentID; | 40 | public LLUUID AgentID; |
41 | public LLUUID SessionID; | 41 | public LLUUID SessionID; |
42 | public LLUUID SecureSessionID; | 42 | public LLUUID SecureSessionID; |
43 | public LLVector3 startpos; | 43 | public LLVector3 startpos; |
44 | public string firstname; | 44 | public string firstname; |
45 | public string lastname; | 45 | public string lastname; |
46 | public uint circuitcode; | 46 | public uint circuitcode; |
47 | public bool child; | 47 | public bool child; |
48 | public LLUUID InventoryFolder; | 48 | public LLUUID InventoryFolder; |
49 | public LLUUID BaseFolder; | 49 | public LLUUID BaseFolder; |
50 | public string CapsPath = ""; | 50 | public string CapsPath = ""; |
51 | } | 51 | } |
52 | } \ No newline at end of file | 52 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/AgentWearable.cs b/OpenSim/Framework/General/AgentWearable.cs index c2d4db3..a324cb3 100644 --- a/OpenSim/Framework/General/AgentWearable.cs +++ b/OpenSim/Framework/General/AgentWearable.cs | |||
@@ -1,71 +1,71 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework | 30 | namespace OpenSim.Framework |
31 | { | 31 | { |
32 | public class AvatarWearable | 32 | public class AvatarWearable |
33 | { | 33 | { |
34 | public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 34 | public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
35 | public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 35 | public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
36 | 36 | ||
37 | public AvatarWearable() | 37 | public AvatarWearable() |
38 | { | 38 | { |
39 | } | 39 | } |
40 | 40 | ||
41 | public AvatarWearable(LLUUID itemId, LLUUID assetId) | 41 | public AvatarWearable(LLUUID itemId, LLUUID assetId) |
42 | { | 42 | { |
43 | AssetID = assetId; | 43 | AssetID = assetId; |
44 | ItemID = itemId; | 44 | ItemID = itemId; |
45 | } | 45 | } |
46 | 46 | ||
47 | public static AvatarWearable[] DefaultWearables | 47 | public static AvatarWearable[] DefaultWearables |
48 | { | 48 | { |
49 | get | 49 | get |
50 | { | 50 | { |
51 | AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these | 51 | AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these |
52 | for (int i = 0; i < 13; i++) | 52 | for (int i = 0; i < 13; i++) |
53 | { | 53 | { |
54 | defaultWearables[i] = new AvatarWearable(); | 54 | defaultWearables[i] = new AvatarWearable(); |
55 | } | 55 | } |
56 | defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); | 56 | defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); |
57 | defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); | 57 | defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); |
58 | 58 | ||
59 | defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); | 59 | defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); |
60 | defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); | 60 | defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); |
61 | 61 | ||
62 | defaultWearables[4].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); | 62 | defaultWearables[4].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); |
63 | defaultWearables[4].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111110"); | 63 | defaultWearables[4].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111110"); |
64 | 64 | ||
65 | defaultWearables[5].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); | 65 | defaultWearables[5].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); |
66 | defaultWearables[5].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111120"); | 66 | defaultWearables[5].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111120"); |
67 | return defaultWearables; | 67 | return defaultWearables; |
68 | } | 68 | } |
69 | } | 69 | } |
70 | } | 70 | } |
71 | } \ No newline at end of file | 71 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/AssetBase.cs b/OpenSim/Framework/General/AssetBase.cs index f0367f0..ef1ee71 100644 --- a/OpenSim/Framework/General/AssetBase.cs +++ b/OpenSim/Framework/General/AssetBase.cs | |||
@@ -1,55 +1,55 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
33 | [Serializable] | 33 | [Serializable] |
34 | public class AssetBase | 34 | public class AssetBase |
35 | { | 35 | { |
36 | public byte[] Data; | 36 | public byte[] Data; |
37 | public LLUUID FullID; | 37 | public LLUUID FullID; |
38 | public sbyte Type; | 38 | public sbyte Type; |
39 | public sbyte InvType; | 39 | public sbyte InvType; |
40 | public string Name = ""; | 40 | public string Name = ""; |
41 | public string Description = ""; | 41 | public string Description = ""; |
42 | public bool Local = false; | 42 | public bool Local = false; |
43 | public bool Temporary = false; | 43 | public bool Temporary = false; |
44 | 44 | ||
45 | public AssetBase() | 45 | public AssetBase() |
46 | { | 46 | { |
47 | } | 47 | } |
48 | 48 | ||
49 | public AssetBase(LLUUID assetId, string name) | 49 | public AssetBase(LLUUID assetId, string name) |
50 | { | 50 | { |
51 | FullID = assetId; | 51 | FullID = assetId; |
52 | Name = name; | 52 | Name = name; |
53 | } | 53 | } |
54 | } | 54 | } |
55 | } \ No newline at end of file | 55 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/AssetConfig.cs b/OpenSim/Framework/General/AssetConfig.cs index 81cf899..fe77ab8 100644 --- a/OpenSim/Framework/General/AssetConfig.cs +++ b/OpenSim/Framework/General/AssetConfig.cs | |||
@@ -1,83 +1,83 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | namespace OpenSim.Framework | 29 | namespace OpenSim.Framework |
30 | { | 30 | { |
31 | /// <summary> | 31 | /// <summary> |
32 | /// UserConfig -- For User Server Configuration | 32 | /// UserConfig -- For User Server Configuration |
33 | /// </summary> | 33 | /// </summary> |
34 | public class AssetConfig | 34 | public class AssetConfig |
35 | { | 35 | { |
36 | public string DefaultStartupMsg = ""; | 36 | public string DefaultStartupMsg = ""; |
37 | 37 | ||
38 | public string DatabaseProvider = ""; | 38 | public string DatabaseProvider = ""; |
39 | 39 | ||
40 | public static uint DefaultHttpPort = 8003; | 40 | public static uint DefaultHttpPort = 8003; |
41 | public uint HttpPort = DefaultHttpPort; | 41 | public uint HttpPort = DefaultHttpPort; |
42 | 42 | ||
43 | private ConfigurationMember configMember; | 43 | private ConfigurationMember configMember; |
44 | 44 | ||
45 | public AssetConfig(string description, string filename) | 45 | public AssetConfig(string description, string filename) |
46 | { | 46 | { |
47 | configMember = | 47 | configMember = |
48 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); | 48 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); |
49 | configMember.performConfigurationRetrieve(); | 49 | configMember.performConfigurationRetrieve(); |
50 | } | 50 | } |
51 | 51 | ||
52 | public void loadConfigurationOptions() | 52 | public void loadConfigurationOptions() |
53 | { | 53 | { |
54 | configMember.addConfigurationOption("default_startup_message", | 54 | configMember.addConfigurationOption("default_startup_message", |
55 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 55 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
56 | "Default Startup Message", "Welcome to OGS", false); | 56 | "Default Startup Message", "Welcome to OGS", false); |
57 | 57 | ||
58 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 58 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
59 | "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); | 59 | "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); |
60 | 60 | ||
61 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 61 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
62 | "Http Listener port", DefaultHttpPort.ToString(), false); | 62 | "Http Listener port", DefaultHttpPort.ToString(), false); |
63 | } | 63 | } |
64 | 64 | ||
65 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 65 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
66 | { | 66 | { |
67 | switch (configuration_key) | 67 | switch (configuration_key) |
68 | { | 68 | { |
69 | case "default_startup_message": | 69 | case "default_startup_message": |
70 | DefaultStartupMsg = (string) configuration_result; | 70 | DefaultStartupMsg = (string) configuration_result; |
71 | break; | 71 | break; |
72 | case "database_provider": | 72 | case "database_provider": |
73 | DatabaseProvider = (string) configuration_result; | 73 | DatabaseProvider = (string) configuration_result; |
74 | break; | 74 | break; |
75 | case "http_port": | 75 | case "http_port": |
76 | HttpPort = (uint) configuration_result; | 76 | HttpPort = (uint) configuration_result; |
77 | break; | 77 | break; |
78 | } | 78 | } |
79 | 79 | ||
80 | return true; | 80 | return true; |
81 | } | 81 | } |
82 | } | 82 | } |
83 | } \ No newline at end of file | 83 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/AssetLandmark.cs b/OpenSim/Framework/General/AssetLandmark.cs index a62a85b..4422331 100644 --- a/OpenSim/Framework/General/AssetLandmark.cs +++ b/OpenSim/Framework/General/AssetLandmark.cs | |||
@@ -1,59 +1,59 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System.Text; | 28 | using System.Text; |
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
33 | public class AssetLandmark : AssetBase | 33 | public class AssetLandmark : AssetBase |
34 | { | 34 | { |
35 | public int Version; | 35 | public int Version; |
36 | public LLVector3 Position; | 36 | public LLVector3 Position; |
37 | public LLUUID RegionID; | 37 | public LLUUID RegionID; |
38 | 38 | ||
39 | public AssetLandmark(AssetBase a) | 39 | public AssetLandmark(AssetBase a) |
40 | { | 40 | { |
41 | Data = a.Data; | 41 | Data = a.Data; |
42 | FullID = a.FullID; | 42 | FullID = a.FullID; |
43 | Type = a.Type; | 43 | Type = a.Type; |
44 | InvType = a.InvType; | 44 | InvType = a.InvType; |
45 | Name = a.Name; | 45 | Name = a.Name; |
46 | Description = a.Description; | 46 | Description = a.Description; |
47 | InternData(); | 47 | InternData(); |
48 | } | 48 | } |
49 | 49 | ||
50 | private void InternData() | 50 | private void InternData() |
51 | { | 51 | { |
52 | string temp = Encoding.UTF8.GetString(Data).Trim(); | 52 | string temp = Encoding.UTF8.GetString(Data).Trim(); |
53 | string[] parts = temp.Split('\n'); | 53 | string[] parts = temp.Split('\n'); |
54 | int.TryParse(parts[0].Substring(17, 1), out Version); | 54 | int.TryParse(parts[0].Substring(17, 1), out Version); |
55 | LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); | 55 | LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); |
56 | LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); | 56 | LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); |
57 | } | 57 | } |
58 | } | 58 | } |
59 | } \ No newline at end of file | 59 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/AssetStorage.cs b/OpenSim/Framework/General/AssetStorage.cs index b39ceeb..9d3de5b 100644 --- a/OpenSim/Framework/General/AssetStorage.cs +++ b/OpenSim/Framework/General/AssetStorage.cs | |||
@@ -1,48 +1,48 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework | 30 | namespace OpenSim.Framework |
31 | { | 31 | { |
32 | public class AssetStorage | 32 | public class AssetStorage |
33 | { | 33 | { |
34 | public AssetStorage() | 34 | public AssetStorage() |
35 | { | 35 | { |
36 | } | 36 | } |
37 | 37 | ||
38 | public AssetStorage(LLUUID assetUUID) | 38 | public AssetStorage(LLUUID assetUUID) |
39 | { | 39 | { |
40 | UUID = assetUUID; | 40 | UUID = assetUUID; |
41 | } | 41 | } |
42 | 42 | ||
43 | public byte[] Data; | 43 | public byte[] Data; |
44 | public sbyte Type; | 44 | public sbyte Type; |
45 | public string Name; | 45 | public string Name; |
46 | public LLUUID UUID; | 46 | public LLUUID UUID; |
47 | } | 47 | } |
48 | } \ No newline at end of file | 48 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/AuthenticateResponse.cs b/OpenSim/Framework/General/AuthenticateResponse.cs index 0bf356e..88a8713 100644 --- a/OpenSim/Framework/General/AuthenticateResponse.cs +++ b/OpenSim/Framework/General/AuthenticateResponse.cs | |||
@@ -1,39 +1,39 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | namespace OpenSim.Framework | 28 | namespace OpenSim.Framework |
29 | { | 29 | { |
30 | public class AuthenticateResponse | 30 | public class AuthenticateResponse |
31 | { | 31 | { |
32 | public bool Authorised; | 32 | public bool Authorised; |
33 | public Login LoginInfo; | 33 | public Login LoginInfo; |
34 | 34 | ||
35 | public AuthenticateResponse() | 35 | public AuthenticateResponse() |
36 | { | 36 | { |
37 | } | 37 | } |
38 | } | 38 | } |
39 | } \ No newline at end of file | 39 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/ConfigurationMember.cs b/OpenSim/Framework/General/ConfigurationMember.cs index 5883d73..b68896c 100644 --- a/OpenSim/Framework/General/ConfigurationMember.cs +++ b/OpenSim/Framework/General/ConfigurationMember.cs | |||
@@ -1,440 +1,440 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Globalization; | 31 | using System.Globalization; |
32 | using System.Net; | 32 | using System.Net; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using libsecondlife; | 34 | using libsecondlife; |
35 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
36 | 36 | ||
37 | namespace OpenSim.Framework | 37 | namespace OpenSim.Framework |
38 | { | 38 | { |
39 | public class ConfigurationMember | 39 | public class ConfigurationMember |
40 | { | 40 | { |
41 | public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); | 41 | public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); |
42 | 42 | ||
43 | public delegate void ConfigurationOptionsLoad(); | 43 | public delegate void ConfigurationOptionsLoad(); |
44 | 44 | ||
45 | private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>(); | 45 | private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>(); |
46 | private string configurationFilename = ""; | 46 | private string configurationFilename = ""; |
47 | private string configurationDescription = ""; | 47 | private string configurationDescription = ""; |
48 | 48 | ||
49 | private ConfigurationOptionsLoad loadFunction; | 49 | private ConfigurationOptionsLoad loadFunction; |
50 | private ConfigurationOptionResult resultFunction; | 50 | private ConfigurationOptionResult resultFunction; |
51 | 51 | ||
52 | private IGenericConfig configurationPlugin = null; | 52 | private IGenericConfig configurationPlugin = null; |
53 | 53 | ||
54 | /// <summary> | 54 | /// <summary> |
55 | /// This is the default configuration DLL loaded | 55 | /// This is the default configuration DLL loaded |
56 | /// </summary> | 56 | /// </summary> |
57 | private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; | 57 | private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; |
58 | 58 | ||
59 | public ConfigurationMember(string configuration_filename, string configuration_description, | 59 | public ConfigurationMember(string configuration_filename, string configuration_description, |
60 | ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) | 60 | ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function) |
61 | { | 61 | { |
62 | configurationFilename = configuration_filename; | 62 | configurationFilename = configuration_filename; |
63 | configurationDescription = configuration_description; | 63 | configurationDescription = configuration_description; |
64 | loadFunction = load_function; | 64 | loadFunction = load_function; |
65 | resultFunction = result_function; | 65 | resultFunction = result_function; |
66 | } | 66 | } |
67 | 67 | ||
68 | public void setConfigurationFilename(string filename) | 68 | public void setConfigurationFilename(string filename) |
69 | { | 69 | { |
70 | configurationFilename = filename; | 70 | configurationFilename = filename; |
71 | } | 71 | } |
72 | 72 | ||
73 | public void setConfigurationDescription(string desc) | 73 | public void setConfigurationDescription(string desc) |
74 | { | 74 | { |
75 | configurationDescription = desc; | 75 | configurationDescription = desc; |
76 | } | 76 | } |
77 | 77 | ||
78 | public void setConfigurationResultFunction(ConfigurationOptionResult result) | 78 | public void setConfigurationResultFunction(ConfigurationOptionResult result) |
79 | { | 79 | { |
80 | resultFunction = result; | 80 | resultFunction = result; |
81 | } | 81 | } |
82 | 82 | ||
83 | public void forceConfigurationPluginLibrary(string dll_filename) | 83 | public void forceConfigurationPluginLibrary(string dll_filename) |
84 | { | 84 | { |
85 | configurationPluginFilename = dll_filename; | 85 | configurationPluginFilename = dll_filename; |
86 | } | 86 | } |
87 | 87 | ||
88 | public void addConfigurationOption(string configuration_key, | 88 | public void addConfigurationOption(string configuration_key, |
89 | ConfigurationOption.ConfigurationTypes configuration_type, | 89 | ConfigurationOption.ConfigurationTypes configuration_type, |
90 | string configuration_question, string configuration_default, | 90 | string configuration_question, string configuration_default, |
91 | bool use_default_no_prompt) | 91 | bool use_default_no_prompt) |
92 | { | 92 | { |
93 | ConfigurationOption configOption = new ConfigurationOption(); | 93 | ConfigurationOption configOption = new ConfigurationOption(); |
94 | configOption.configurationKey = configuration_key; | 94 | configOption.configurationKey = configuration_key; |
95 | configOption.configurationQuestion = configuration_question; | 95 | configOption.configurationQuestion = configuration_question; |
96 | configOption.configurationDefault = configuration_default; | 96 | configOption.configurationDefault = configuration_default; |
97 | configOption.configurationType = configuration_type; | 97 | configOption.configurationType = configuration_type; |
98 | configOption.configurationUseDefaultNoPrompt = use_default_no_prompt; | 98 | configOption.configurationUseDefaultNoPrompt = use_default_no_prompt; |
99 | 99 | ||
100 | if ((configuration_key != "" && configuration_question != "") || | 100 | if ((configuration_key != "" && configuration_question != "") || |
101 | (configuration_key != "" && use_default_no_prompt)) | 101 | (configuration_key != "" && use_default_no_prompt)) |
102 | { | 102 | { |
103 | if (!configurationOptions.Contains(configOption)) | 103 | if (!configurationOptions.Contains(configOption)) |
104 | { | 104 | { |
105 | configurationOptions.Add(configOption); | 105 | configurationOptions.Add(configOption); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | else | 108 | else |
109 | { | 109 | { |
110 | MainLog.Instance.Notice( | 110 | MainLog.Instance.Notice( |
111 | "Required fields for adding a configuration option is invalid. Will not add this option (" + | 111 | "Required fields for adding a configuration option is invalid. Will not add this option (" + |
112 | configuration_key + ")"); | 112 | configuration_key + ")"); |
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | public void performConfigurationRetrieve() | 116 | public void performConfigurationRetrieve() |
117 | { | 117 | { |
118 | configurationPlugin = LoadConfigDll(configurationPluginFilename); | 118 | configurationPlugin = LoadConfigDll(configurationPluginFilename); |
119 | configurationOptions.Clear(); | 119 | configurationOptions.Clear(); |
120 | if (loadFunction == null) | 120 | if (loadFunction == null) |
121 | { | 121 | { |
122 | MainLog.Instance.Error("Load Function for '" + configurationDescription + | 122 | MainLog.Instance.Error("Load Function for '" + configurationDescription + |
123 | "' is null. Refusing to run configuration."); | 123 | "' is null. Refusing to run configuration."); |
124 | return; | 124 | return; |
125 | } | 125 | } |
126 | 126 | ||
127 | if (resultFunction == null) | 127 | if (resultFunction == null) |
128 | { | 128 | { |
129 | MainLog.Instance.Error("Result Function for '" + configurationDescription + | 129 | MainLog.Instance.Error("Result Function for '" + configurationDescription + |
130 | "' is null. Refusing to run configuration."); | 130 | "' is null. Refusing to run configuration."); |
131 | return; | 131 | return; |
132 | } | 132 | } |
133 | 133 | ||
134 | MainLog.Instance.Verbose("Calling Configuration Load Function..."); | 134 | MainLog.Instance.Verbose("Calling Configuration Load Function..."); |
135 | loadFunction(); | 135 | loadFunction(); |
136 | 136 | ||
137 | if (configurationOptions.Count <= 0) | 137 | if (configurationOptions.Count <= 0) |
138 | { | 138 | { |
139 | MainLog.Instance.Error("No configuration options were specified for '" + configurationOptions + | 139 | MainLog.Instance.Error("No configuration options were specified for '" + configurationOptions + |
140 | "'. Refusing to continue configuration."); | 140 | "'. Refusing to continue configuration."); |
141 | return; | 141 | return; |
142 | } | 142 | } |
143 | 143 | ||
144 | bool useFile = true; | 144 | bool useFile = true; |
145 | if (configurationPlugin == null) | 145 | if (configurationPlugin == null) |
146 | { | 146 | { |
147 | MainLog.Instance.Error("Configuration Plugin NOT LOADED!"); | 147 | MainLog.Instance.Error("Configuration Plugin NOT LOADED!"); |
148 | return; | 148 | return; |
149 | } | 149 | } |
150 | 150 | ||
151 | if (configurationFilename.Trim() != "") | 151 | if (configurationFilename.Trim() != "") |
152 | { | 152 | { |
153 | configurationPlugin.SetFileName(configurationFilename); | 153 | configurationPlugin.SetFileName(configurationFilename); |
154 | configurationPlugin.LoadData(); | 154 | configurationPlugin.LoadData(); |
155 | useFile = true; | 155 | useFile = true; |
156 | } | 156 | } |
157 | else | 157 | else |
158 | { | 158 | { |
159 | MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file."); | 159 | MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file."); |
160 | useFile = false; | 160 | useFile = false; |
161 | } | 161 | } |
162 | 162 | ||
163 | foreach (ConfigurationOption configOption in configurationOptions) | 163 | foreach (ConfigurationOption configOption in configurationOptions) |
164 | { | 164 | { |
165 | bool convertSuccess = false; | 165 | bool convertSuccess = false; |
166 | object return_result = null; | 166 | object return_result = null; |
167 | string errorMessage = ""; | 167 | string errorMessage = ""; |
168 | bool ignoreNextFromConfig = false; | 168 | bool ignoreNextFromConfig = false; |
169 | while (convertSuccess == false) | 169 | while (convertSuccess == false) |
170 | { | 170 | { |
171 | string console_result = ""; | 171 | string console_result = ""; |
172 | string attribute = null; | 172 | string attribute = null; |
173 | if (useFile) | 173 | if (useFile) |
174 | { | 174 | { |
175 | if (!ignoreNextFromConfig) | 175 | if (!ignoreNextFromConfig) |
176 | { | 176 | { |
177 | attribute = configurationPlugin.GetAttribute(configOption.configurationKey); | 177 | attribute = configurationPlugin.GetAttribute(configOption.configurationKey); |
178 | } | 178 | } |
179 | else | 179 | else |
180 | { | 180 | { |
181 | ignoreNextFromConfig = false; | 181 | ignoreNextFromConfig = false; |
182 | } | 182 | } |
183 | } | 183 | } |
184 | 184 | ||
185 | if (attribute == null) | 185 | if (attribute == null) |
186 | { | 186 | { |
187 | if (configOption.configurationUseDefaultNoPrompt) | 187 | if (configOption.configurationUseDefaultNoPrompt) |
188 | { | 188 | { |
189 | console_result = configOption.configurationDefault; | 189 | console_result = configOption.configurationDefault; |
190 | } | 190 | } |
191 | else | 191 | else |
192 | { | 192 | { |
193 | if (configurationDescription.Trim() != "") | 193 | if (configurationDescription.Trim() != "") |
194 | { | 194 | { |
195 | console_result = | 195 | console_result = |
196 | MainLog.Instance.CmdPrompt( | 196 | MainLog.Instance.CmdPrompt( |
197 | configurationDescription + ": " + configOption.configurationQuestion, | 197 | configurationDescription + ": " + configOption.configurationQuestion, |
198 | configOption.configurationDefault); | 198 | configOption.configurationDefault); |
199 | } | 199 | } |
200 | else | 200 | else |
201 | { | 201 | { |
202 | console_result = | 202 | console_result = |
203 | MainLog.Instance.CmdPrompt(configOption.configurationQuestion, | 203 | MainLog.Instance.CmdPrompt(configOption.configurationQuestion, |
204 | configOption.configurationDefault); | 204 | configOption.configurationDefault); |
205 | } | 205 | } |
206 | } | 206 | } |
207 | } | 207 | } |
208 | else | 208 | else |
209 | { | 209 | { |
210 | console_result = attribute; | 210 | console_result = attribute; |
211 | } | 211 | } |
212 | 212 | ||
213 | switch (configOption.configurationType) | 213 | switch (configOption.configurationType) |
214 | { | 214 | { |
215 | case ConfigurationOption.ConfigurationTypes.TYPE_STRING: | 215 | case ConfigurationOption.ConfigurationTypes.TYPE_STRING: |
216 | return_result = console_result; | 216 | return_result = console_result; |
217 | convertSuccess = true; | 217 | convertSuccess = true; |
218 | break; | 218 | break; |
219 | case ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY: | 219 | case ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY: |
220 | if (console_result.Length > 0) | 220 | if (console_result.Length > 0) |
221 | { | 221 | { |
222 | return_result = console_result; | 222 | return_result = console_result; |
223 | convertSuccess = true; | 223 | convertSuccess = true; |
224 | } | 224 | } |
225 | errorMessage = "a string that is not empty"; | 225 | errorMessage = "a string that is not empty"; |
226 | break; | 226 | break; |
227 | case ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN: | 227 | case ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN: |
228 | bool boolResult; | 228 | bool boolResult; |
229 | if (Boolean.TryParse(console_result, out boolResult)) | 229 | if (Boolean.TryParse(console_result, out boolResult)) |
230 | { | 230 | { |
231 | convertSuccess = true; | 231 | convertSuccess = true; |
232 | return_result = boolResult; | 232 | return_result = boolResult; |
233 | } | 233 | } |
234 | errorMessage = "'true' or 'false' (Boolean)"; | 234 | errorMessage = "'true' or 'false' (Boolean)"; |
235 | break; | 235 | break; |
236 | case ConfigurationOption.ConfigurationTypes.TYPE_BYTE: | 236 | case ConfigurationOption.ConfigurationTypes.TYPE_BYTE: |
237 | byte byteResult; | 237 | byte byteResult; |
238 | if (Byte.TryParse(console_result, out byteResult)) | 238 | if (Byte.TryParse(console_result, out byteResult)) |
239 | { | 239 | { |
240 | convertSuccess = true; | 240 | convertSuccess = true; |
241 | return_result = byteResult; | 241 | return_result = byteResult; |
242 | } | 242 | } |
243 | errorMessage = "a byte (Byte)"; | 243 | errorMessage = "a byte (Byte)"; |
244 | break; | 244 | break; |
245 | case ConfigurationOption.ConfigurationTypes.TYPE_CHARACTER: | 245 | case ConfigurationOption.ConfigurationTypes.TYPE_CHARACTER: |
246 | char charResult; | 246 | char charResult; |
247 | if (Char.TryParse(console_result, out charResult)) | 247 | if (Char.TryParse(console_result, out charResult)) |
248 | { | 248 | { |
249 | convertSuccess = true; | 249 | convertSuccess = true; |
250 | return_result = charResult; | 250 | return_result = charResult; |
251 | } | 251 | } |
252 | errorMessage = "a character (Char)"; | 252 | errorMessage = "a character (Char)"; |
253 | break; | 253 | break; |
254 | case ConfigurationOption.ConfigurationTypes.TYPE_INT16: | 254 | case ConfigurationOption.ConfigurationTypes.TYPE_INT16: |
255 | short shortResult; | 255 | short shortResult; |
256 | if (Int16.TryParse(console_result, out shortResult)) | 256 | if (Int16.TryParse(console_result, out shortResult)) |
257 | { | 257 | { |
258 | convertSuccess = true; | 258 | convertSuccess = true; |
259 | return_result = shortResult; | 259 | return_result = shortResult; |
260 | } | 260 | } |
261 | errorMessage = "a signed 32 bit integer (short)"; | 261 | errorMessage = "a signed 32 bit integer (short)"; |
262 | break; | 262 | break; |
263 | case ConfigurationOption.ConfigurationTypes.TYPE_INT32: | 263 | case ConfigurationOption.ConfigurationTypes.TYPE_INT32: |
264 | int intResult; | 264 | int intResult; |
265 | if (Int32.TryParse(console_result, out intResult)) | 265 | if (Int32.TryParse(console_result, out intResult)) |
266 | { | 266 | { |
267 | convertSuccess = true; | 267 | convertSuccess = true; |
268 | return_result = intResult; | 268 | return_result = intResult; |
269 | } | 269 | } |
270 | errorMessage = "a signed 32 bit integer (int)"; | 270 | errorMessage = "a signed 32 bit integer (int)"; |
271 | break; | 271 | break; |
272 | case ConfigurationOption.ConfigurationTypes.TYPE_INT64: | 272 | case ConfigurationOption.ConfigurationTypes.TYPE_INT64: |
273 | long longResult; | 273 | long longResult; |
274 | if (Int64.TryParse(console_result, out longResult)) | 274 | if (Int64.TryParse(console_result, out longResult)) |
275 | { | 275 | { |
276 | convertSuccess = true; | 276 | convertSuccess = true; |
277 | return_result = longResult; | 277 | return_result = longResult; |
278 | } | 278 | } |
279 | errorMessage = "a signed 32 bit integer (long)"; | 279 | errorMessage = "a signed 32 bit integer (long)"; |
280 | break; | 280 | break; |
281 | case ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS: | 281 | case ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS: |
282 | IPAddress ipAddressResult; | 282 | IPAddress ipAddressResult; |
283 | if (IPAddress.TryParse(console_result, out ipAddressResult)) | 283 | if (IPAddress.TryParse(console_result, out ipAddressResult)) |
284 | { | 284 | { |
285 | convertSuccess = true; | 285 | convertSuccess = true; |
286 | return_result = ipAddressResult; | 286 | return_result = ipAddressResult; |
287 | } | 287 | } |
288 | errorMessage = "an IP Address (IPAddress)"; | 288 | errorMessage = "an IP Address (IPAddress)"; |
289 | break; | 289 | break; |
290 | case ConfigurationOption.ConfigurationTypes.TYPE_LLUUID: | 290 | case ConfigurationOption.ConfigurationTypes.TYPE_LLUUID: |
291 | LLUUID uuidResult; | 291 | LLUUID uuidResult; |
292 | if (LLUUID.TryParse(console_result, out uuidResult)) | 292 | if (LLUUID.TryParse(console_result, out uuidResult)) |
293 | { | 293 | { |
294 | convertSuccess = true; | 294 | convertSuccess = true; |
295 | return_result = uuidResult; | 295 | return_result = uuidResult; |
296 | } | 296 | } |
297 | errorMessage = "a UUID (LLUUID)"; | 297 | errorMessage = "a UUID (LLUUID)"; |
298 | break; | 298 | break; |
299 | case ConfigurationOption.ConfigurationTypes.TYPE_LLVECTOR3: | 299 | case ConfigurationOption.ConfigurationTypes.TYPE_LLVECTOR3: |
300 | LLVector3 vectorResult; | 300 | LLVector3 vectorResult; |
301 | if (LLVector3.TryParse(console_result, out vectorResult)) | 301 | if (LLVector3.TryParse(console_result, out vectorResult)) |
302 | { | 302 | { |
303 | convertSuccess = true; | 303 | convertSuccess = true; |
304 | return_result = vectorResult; | 304 | return_result = vectorResult; |
305 | } | 305 | } |
306 | errorMessage = "a vector (LLVector3)"; | 306 | errorMessage = "a vector (LLVector3)"; |
307 | break; | 307 | break; |
308 | case ConfigurationOption.ConfigurationTypes.TYPE_UINT16: | 308 | case ConfigurationOption.ConfigurationTypes.TYPE_UINT16: |
309 | ushort ushortResult; | 309 | ushort ushortResult; |
310 | if (UInt16.TryParse(console_result, out ushortResult)) | 310 | if (UInt16.TryParse(console_result, out ushortResult)) |
311 | { | 311 | { |
312 | convertSuccess = true; | 312 | convertSuccess = true; |
313 | return_result = ushortResult; | 313 | return_result = ushortResult; |
314 | } | 314 | } |
315 | errorMessage = "an unsigned 16 bit integer (ushort)"; | 315 | errorMessage = "an unsigned 16 bit integer (ushort)"; |
316 | break; | 316 | break; |
317 | case ConfigurationOption.ConfigurationTypes.TYPE_UINT32: | 317 | case ConfigurationOption.ConfigurationTypes.TYPE_UINT32: |
318 | uint uintResult; | 318 | uint uintResult; |
319 | if (UInt32.TryParse(console_result, out uintResult)) | 319 | if (UInt32.TryParse(console_result, out uintResult)) |
320 | { | 320 | { |
321 | convertSuccess = true; | 321 | convertSuccess = true; |
322 | return_result = uintResult; | 322 | return_result = uintResult; |
323 | } | 323 | } |
324 | errorMessage = "an unsigned 32 bit integer (uint)"; | 324 | errorMessage = "an unsigned 32 bit integer (uint)"; |
325 | break; | 325 | break; |
326 | case ConfigurationOption.ConfigurationTypes.TYPE_UINT64: | 326 | case ConfigurationOption.ConfigurationTypes.TYPE_UINT64: |
327 | ulong ulongResult; | 327 | ulong ulongResult; |
328 | if (UInt64.TryParse(console_result, out ulongResult)) | 328 | if (UInt64.TryParse(console_result, out ulongResult)) |
329 | { | 329 | { |
330 | convertSuccess = true; | 330 | convertSuccess = true; |
331 | return_result = ulongResult; | 331 | return_result = ulongResult; |
332 | } | 332 | } |
333 | errorMessage = "an unsigned 64 bit integer (ulong)"; | 333 | errorMessage = "an unsigned 64 bit integer (ulong)"; |
334 | break; | 334 | break; |
335 | case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT: | 335 | case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT: |
336 | float floatResult; | 336 | float floatResult; |
337 | if ( | 337 | if ( |
338 | float.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, | 338 | float.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, |
339 | out floatResult)) | 339 | out floatResult)) |
340 | { | 340 | { |
341 | convertSuccess = true; | 341 | convertSuccess = true; |
342 | return_result = floatResult; | 342 | return_result = floatResult; |
343 | } | 343 | } |
344 | errorMessage = "a single-precision floating point number (float)"; | 344 | errorMessage = "a single-precision floating point number (float)"; |
345 | break; | 345 | break; |
346 | case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE: | 346 | case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE: |
347 | double doubleResult; | 347 | double doubleResult; |
348 | if ( | 348 | if ( |
349 | Double.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, | 349 | Double.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, |
350 | out doubleResult)) | 350 | out doubleResult)) |
351 | { | 351 | { |
352 | convertSuccess = true; | 352 | convertSuccess = true; |
353 | return_result = doubleResult; | 353 | return_result = doubleResult; |
354 | } | 354 | } |
355 | errorMessage = "an double-precision floating point number (double)"; | 355 | errorMessage = "an double-precision floating point number (double)"; |
356 | break; | 356 | break; |
357 | } | 357 | } |
358 | 358 | ||
359 | if (convertSuccess) | 359 | if (convertSuccess) |
360 | { | 360 | { |
361 | if (useFile) | 361 | if (useFile) |
362 | { | 362 | { |
363 | configurationPlugin.SetAttribute(configOption.configurationKey, console_result); | 363 | configurationPlugin.SetAttribute(configOption.configurationKey, console_result); |
364 | } | 364 | } |
365 | 365 | ||
366 | 366 | ||
367 | if (!resultFunction(configOption.configurationKey, return_result)) | 367 | if (!resultFunction(configOption.configurationKey, return_result)) |
368 | { | 368 | { |
369 | MainLog.Instance.Notice( | 369 | MainLog.Instance.Notice( |
370 | "The handler for the last configuration option denied that input, please try again."); | 370 | "The handler for the last configuration option denied that input, please try again."); |
371 | convertSuccess = false; | 371 | convertSuccess = false; |
372 | ignoreNextFromConfig = true; | 372 | ignoreNextFromConfig = true; |
373 | } | 373 | } |
374 | } | 374 | } |
375 | else | 375 | else |
376 | { | 376 | { |
377 | if (configOption.configurationUseDefaultNoPrompt) | 377 | if (configOption.configurationUseDefaultNoPrompt) |
378 | { | 378 | { |
379 | MainLog.Instance.Error("CONFIG", | 379 | MainLog.Instance.Error("CONFIG", |
380 | string.Format( | 380 | string.Format( |
381 | "[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", | 381 | "[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", |
382 | configOption.configurationKey, console_result, errorMessage, | 382 | configOption.configurationKey, console_result, errorMessage, |
383 | configurationFilename)); | 383 | configurationFilename)); |
384 | convertSuccess = true; | 384 | convertSuccess = true; |
385 | } | 385 | } |
386 | else | 386 | else |
387 | { | 387 | { |
388 | MainLog.Instance.Warn("CONFIG", | 388 | MainLog.Instance.Warn("CONFIG", |
389 | string.Format( | 389 | string.Format( |
390 | "[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", | 390 | "[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", |
391 | configOption.configurationKey, console_result, errorMessage, | 391 | configOption.configurationKey, console_result, errorMessage, |
392 | configurationFilename)); | 392 | configurationFilename)); |
393 | ignoreNextFromConfig = true; | 393 | ignoreNextFromConfig = true; |
394 | } | 394 | } |
395 | } | 395 | } |
396 | } | 396 | } |
397 | } | 397 | } |
398 | 398 | ||
399 | if (useFile) | 399 | if (useFile) |
400 | { | 400 | { |
401 | configurationPlugin.Commit(); | 401 | configurationPlugin.Commit(); |
402 | configurationPlugin.Close(); | 402 | configurationPlugin.Close(); |
403 | } | 403 | } |
404 | } | 404 | } |
405 | 405 | ||
406 | private IGenericConfig LoadConfigDll(string dllName) | 406 | private IGenericConfig LoadConfigDll(string dllName) |
407 | { | 407 | { |
408 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | 408 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); |
409 | IGenericConfig plug = null; | 409 | IGenericConfig plug = null; |
410 | 410 | ||
411 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 411 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
412 | { | 412 | { |
413 | if (pluginType.IsPublic) | 413 | if (pluginType.IsPublic) |
414 | { | 414 | { |
415 | if (!pluginType.IsAbstract) | 415 | if (!pluginType.IsAbstract) |
416 | { | 416 | { |
417 | Type typeInterface = pluginType.GetInterface("IGenericConfig", true); | 417 | Type typeInterface = pluginType.GetInterface("IGenericConfig", true); |
418 | 418 | ||
419 | if (typeInterface != null) | 419 | if (typeInterface != null) |
420 | { | 420 | { |
421 | plug = | 421 | plug = |
422 | (IGenericConfig) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 422 | (IGenericConfig) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
423 | } | 423 | } |
424 | } | 424 | } |
425 | } | 425 | } |
426 | } | 426 | } |
427 | 427 | ||
428 | pluginAssembly = null; | 428 | pluginAssembly = null; |
429 | return plug; | 429 | return plug; |
430 | } | 430 | } |
431 | 431 | ||
432 | public void forceSetConfigurationOption(string configuration_key, string configuration_value) | 432 | public void forceSetConfigurationOption(string configuration_key, string configuration_value) |
433 | { | 433 | { |
434 | configurationPlugin.LoadData(); | 434 | configurationPlugin.LoadData(); |
435 | configurationPlugin.SetAttribute(configuration_key, configuration_value); | 435 | configurationPlugin.SetAttribute(configuration_key, configuration_value); |
436 | configurationPlugin.Commit(); | 436 | configurationPlugin.Commit(); |
437 | configurationPlugin.Close(); | 437 | configurationPlugin.Close(); |
438 | } | 438 | } |
439 | } | 439 | } |
440 | } \ No newline at end of file | 440 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/ConfigurationOption.cs b/OpenSim/Framework/General/ConfigurationOption.cs index 5a8fd08..ec39d3d 100644 --- a/OpenSim/Framework/General/ConfigurationOption.cs +++ b/OpenSim/Framework/General/ConfigurationOption.cs | |||
@@ -1,60 +1,60 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | namespace OpenSim.Framework | 29 | namespace OpenSim.Framework |
30 | { | 30 | { |
31 | public class ConfigurationOption | 31 | public class ConfigurationOption |
32 | { | 32 | { |
33 | public enum ConfigurationTypes | 33 | public enum ConfigurationTypes |
34 | { | 34 | { |
35 | TYPE_STRING, | 35 | TYPE_STRING, |
36 | TYPE_STRING_NOT_EMPTY, | 36 | TYPE_STRING_NOT_EMPTY, |
37 | TYPE_UINT16, | 37 | TYPE_UINT16, |
38 | TYPE_UINT32, | 38 | TYPE_UINT32, |
39 | TYPE_UINT64, | 39 | TYPE_UINT64, |
40 | TYPE_INT16, | 40 | TYPE_INT16, |
41 | TYPE_INT32, | 41 | TYPE_INT32, |
42 | TYPE_INT64, | 42 | TYPE_INT64, |
43 | TYPE_IP_ADDRESS, | 43 | TYPE_IP_ADDRESS, |
44 | TYPE_CHARACTER, | 44 | TYPE_CHARACTER, |
45 | TYPE_BOOLEAN, | 45 | TYPE_BOOLEAN, |
46 | TYPE_BYTE, | 46 | TYPE_BYTE, |
47 | TYPE_LLUUID, | 47 | TYPE_LLUUID, |
48 | TYPE_LLVECTOR3, | 48 | TYPE_LLVECTOR3, |
49 | TYPE_FLOAT, | 49 | TYPE_FLOAT, |
50 | TYPE_DOUBLE | 50 | TYPE_DOUBLE |
51 | } ; | 51 | } ; |
52 | 52 | ||
53 | public string configurationKey = ""; | 53 | public string configurationKey = ""; |
54 | public string configurationQuestion = ""; | 54 | public string configurationQuestion = ""; |
55 | public string configurationDefault = ""; | 55 | public string configurationDefault = ""; |
56 | 56 | ||
57 | public ConfigurationTypes configurationType = ConfigurationTypes.TYPE_STRING; | 57 | public ConfigurationTypes configurationType = ConfigurationTypes.TYPE_STRING; |
58 | public bool configurationUseDefaultNoPrompt = false; | 58 | public bool configurationUseDefaultNoPrompt = false; |
59 | } | 59 | } |
60 | } \ No newline at end of file | 60 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/EstateSettings.cs b/OpenSim/Framework/General/EstateSettings.cs index c70b6ca..63b62c6 100644 --- a/OpenSim/Framework/General/EstateSettings.cs +++ b/OpenSim/Framework/General/EstateSettings.cs | |||
@@ -1,707 +1,707 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | 31 | ||
32 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
33 | { | 33 | { |
34 | public class EstateSettings | 34 | public class EstateSettings |
35 | { | 35 | { |
36 | //Settings to this island | 36 | //Settings to this island |
37 | private float m_billableFactor; | 37 | private float m_billableFactor; |
38 | 38 | ||
39 | public float billableFactor | 39 | public float billableFactor |
40 | { | 40 | { |
41 | get { return m_billableFactor; } | 41 | get { return m_billableFactor; } |
42 | set | 42 | set |
43 | { | 43 | { |
44 | m_billableFactor = value; | 44 | m_billableFactor = value; |
45 | configMember.forceSetConfigurationOption("billable_factor", m_billableFactor.ToString()); | 45 | configMember.forceSetConfigurationOption("billable_factor", m_billableFactor.ToString()); |
46 | } | 46 | } |
47 | } | 47 | } |
48 | 48 | ||
49 | 49 | ||
50 | private uint m_estateID; | 50 | private uint m_estateID; |
51 | 51 | ||
52 | public uint estateID | 52 | public uint estateID |
53 | { | 53 | { |
54 | get { return m_estateID; } | 54 | get { return m_estateID; } |
55 | set | 55 | set |
56 | { | 56 | { |
57 | m_estateID = value; | 57 | m_estateID = value; |
58 | configMember.forceSetConfigurationOption("estate_id", m_estateID.ToString()); | 58 | configMember.forceSetConfigurationOption("estate_id", m_estateID.ToString()); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
63 | private uint m_parentEstateID; | 63 | private uint m_parentEstateID; |
64 | 64 | ||
65 | public uint parentEstateID | 65 | public uint parentEstateID |
66 | { | 66 | { |
67 | get { return m_parentEstateID; } | 67 | get { return m_parentEstateID; } |
68 | set | 68 | set |
69 | { | 69 | { |
70 | m_parentEstateID = value; | 70 | m_parentEstateID = value; |
71 | configMember.forceSetConfigurationOption("parent_estate_id", m_parentEstateID.ToString()); | 71 | configMember.forceSetConfigurationOption("parent_estate_id", m_parentEstateID.ToString()); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | private byte m_maxAgents; | 75 | private byte m_maxAgents; |
76 | 76 | ||
77 | public byte maxAgents | 77 | public byte maxAgents |
78 | { | 78 | { |
79 | get { return m_maxAgents; } | 79 | get { return m_maxAgents; } |
80 | set | 80 | set |
81 | { | 81 | { |
82 | m_maxAgents = value; | 82 | m_maxAgents = value; |
83 | configMember.forceSetConfigurationOption("max_agents", m_maxAgents.ToString()); | 83 | configMember.forceSetConfigurationOption("max_agents", m_maxAgents.ToString()); |
84 | } | 84 | } |
85 | } | 85 | } |
86 | 86 | ||
87 | private float m_objectBonusFactor; | 87 | private float m_objectBonusFactor; |
88 | 88 | ||
89 | public float objectBonusFactor | 89 | public float objectBonusFactor |
90 | { | 90 | { |
91 | get { return m_objectBonusFactor; } | 91 | get { return m_objectBonusFactor; } |
92 | set | 92 | set |
93 | { | 93 | { |
94 | m_objectBonusFactor = value; | 94 | m_objectBonusFactor = value; |
95 | configMember.forceSetConfigurationOption("object_bonus_factor", m_objectBonusFactor.ToString()); | 95 | configMember.forceSetConfigurationOption("object_bonus_factor", m_objectBonusFactor.ToString()); |
96 | } | 96 | } |
97 | } | 97 | } |
98 | 98 | ||
99 | private int m_redirectGridX; | 99 | private int m_redirectGridX; |
100 | 100 | ||
101 | public int redirectGridX | 101 | public int redirectGridX |
102 | { | 102 | { |
103 | get { return m_redirectGridX; } | 103 | get { return m_redirectGridX; } |
104 | set | 104 | set |
105 | { | 105 | { |
106 | m_redirectGridX = value; | 106 | m_redirectGridX = value; |
107 | configMember.forceSetConfigurationOption("redirect_grid_x", m_redirectGridX.ToString()); | 107 | configMember.forceSetConfigurationOption("redirect_grid_x", m_redirectGridX.ToString()); |
108 | } | 108 | } |
109 | } | 109 | } |
110 | 110 | ||
111 | private int m_redirectGridY; | 111 | private int m_redirectGridY; |
112 | 112 | ||
113 | public int redirectGridY | 113 | public int redirectGridY |
114 | { | 114 | { |
115 | get { return m_redirectGridY; } | 115 | get { return m_redirectGridY; } |
116 | set | 116 | set |
117 | { | 117 | { |
118 | m_redirectGridY = value; | 118 | m_redirectGridY = value; |
119 | configMember.forceSetConfigurationOption("redirect_grid_y", m_redirectGridY.ToString()); | 119 | configMember.forceSetConfigurationOption("redirect_grid_y", m_redirectGridY.ToString()); |
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | private Simulator.RegionFlags m_regionFlags; | 123 | private Simulator.RegionFlags m_regionFlags; |
124 | 124 | ||
125 | public Simulator.RegionFlags regionFlags | 125 | public Simulator.RegionFlags regionFlags |
126 | { | 126 | { |
127 | get { return m_regionFlags; } | 127 | get { return m_regionFlags; } |
128 | set | 128 | set |
129 | { | 129 | { |
130 | m_regionFlags = value; | 130 | m_regionFlags = value; |
131 | configMember.forceSetConfigurationOption("region_flags", m_regionFlags.ToString()); | 131 | configMember.forceSetConfigurationOption("region_flags", m_regionFlags.ToString()); |
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
136 | private Simulator.SimAccess m_simAccess; | 136 | private Simulator.SimAccess m_simAccess; |
137 | 137 | ||
138 | public Simulator.SimAccess simAccess | 138 | public Simulator.SimAccess simAccess |
139 | { | 139 | { |
140 | get { return m_simAccess; } | 140 | get { return m_simAccess; } |
141 | set | 141 | set |
142 | { | 142 | { |
143 | m_simAccess = value; | 143 | m_simAccess = value; |
144 | configMember.forceSetConfigurationOption("sim_access", m_simAccess.ToString()); | 144 | configMember.forceSetConfigurationOption("sim_access", m_simAccess.ToString()); |
145 | } | 145 | } |
146 | } | 146 | } |
147 | 147 | ||
148 | private float m_sunHour; | 148 | private float m_sunHour; |
149 | 149 | ||
150 | public float sunHour | 150 | public float sunHour |
151 | { | 151 | { |
152 | get { return m_sunHour; } | 152 | get { return m_sunHour; } |
153 | set | 153 | set |
154 | { | 154 | { |
155 | m_sunHour = value; | 155 | m_sunHour = value; |
156 | configMember.forceSetConfigurationOption("sun_hour", m_sunHour.ToString()); | 156 | configMember.forceSetConfigurationOption("sun_hour", m_sunHour.ToString()); |
157 | } | 157 | } |
158 | } | 158 | } |
159 | 159 | ||
160 | private float m_terrainRaiseLimit; | 160 | private float m_terrainRaiseLimit; |
161 | 161 | ||
162 | public float terrainRaiseLimit | 162 | public float terrainRaiseLimit |
163 | { | 163 | { |
164 | get { return m_terrainRaiseLimit; } | 164 | get { return m_terrainRaiseLimit; } |
165 | set | 165 | set |
166 | { | 166 | { |
167 | m_terrainRaiseLimit = value; | 167 | m_terrainRaiseLimit = value; |
168 | configMember.forceSetConfigurationOption("terrain_raise_limit", m_terrainRaiseLimit.ToString()); | 168 | configMember.forceSetConfigurationOption("terrain_raise_limit", m_terrainRaiseLimit.ToString()); |
169 | } | 169 | } |
170 | } | 170 | } |
171 | 171 | ||
172 | private float m_terrainLowerLimit; | 172 | private float m_terrainLowerLimit; |
173 | 173 | ||
174 | public float terrainLowerLimit | 174 | public float terrainLowerLimit |
175 | { | 175 | { |
176 | get { return m_terrainLowerLimit; } | 176 | get { return m_terrainLowerLimit; } |
177 | set | 177 | set |
178 | { | 178 | { |
179 | m_terrainLowerLimit = value; | 179 | m_terrainLowerLimit = value; |
180 | configMember.forceSetConfigurationOption("terrain_lower_limit", m_terrainLowerLimit.ToString()); | 180 | configMember.forceSetConfigurationOption("terrain_lower_limit", m_terrainLowerLimit.ToString()); |
181 | } | 181 | } |
182 | } | 182 | } |
183 | 183 | ||
184 | private bool m_useFixedSun; | 184 | private bool m_useFixedSun; |
185 | 185 | ||
186 | public bool useFixedSun | 186 | public bool useFixedSun |
187 | { | 187 | { |
188 | get { return m_useFixedSun; } | 188 | get { return m_useFixedSun; } |
189 | set | 189 | set |
190 | { | 190 | { |
191 | m_useFixedSun = value; | 191 | m_useFixedSun = value; |
192 | configMember.forceSetConfigurationOption("use_fixed_sun", m_useFixedSun.ToString()); | 192 | configMember.forceSetConfigurationOption("use_fixed_sun", m_useFixedSun.ToString()); |
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
196 | 196 | ||
197 | private int m_pricePerMeter; | 197 | private int m_pricePerMeter; |
198 | 198 | ||
199 | public int pricePerMeter | 199 | public int pricePerMeter |
200 | { | 200 | { |
201 | get { return m_pricePerMeter; } | 201 | get { return m_pricePerMeter; } |
202 | set | 202 | set |
203 | { | 203 | { |
204 | m_pricePerMeter = value; | 204 | m_pricePerMeter = value; |
205 | configMember.forceSetConfigurationOption("price_per_meter", m_pricePerMeter.ToString()); | 205 | configMember.forceSetConfigurationOption("price_per_meter", m_pricePerMeter.ToString()); |
206 | } | 206 | } |
207 | } | 207 | } |
208 | 208 | ||
209 | 209 | ||
210 | private ushort m_regionWaterHeight; | 210 | private ushort m_regionWaterHeight; |
211 | 211 | ||
212 | public ushort regionWaterHeight | 212 | public ushort regionWaterHeight |
213 | { | 213 | { |
214 | get { return m_regionWaterHeight; } | 214 | get { return m_regionWaterHeight; } |
215 | set | 215 | set |
216 | { | 216 | { |
217 | m_regionWaterHeight = value; | 217 | m_regionWaterHeight = value; |
218 | configMember.forceSetConfigurationOption("region_water_height", m_regionWaterHeight.ToString()); | 218 | configMember.forceSetConfigurationOption("region_water_height", m_regionWaterHeight.ToString()); |
219 | } | 219 | } |
220 | } | 220 | } |
221 | 221 | ||
222 | 222 | ||
223 | private bool m_regionAllowTerraform; | 223 | private bool m_regionAllowTerraform; |
224 | 224 | ||
225 | public bool regionAllowTerraform | 225 | public bool regionAllowTerraform |
226 | { | 226 | { |
227 | get { return m_regionAllowTerraform; } | 227 | get { return m_regionAllowTerraform; } |
228 | set | 228 | set |
229 | { | 229 | { |
230 | m_regionAllowTerraform = value; | 230 | m_regionAllowTerraform = value; |
231 | configMember.forceSetConfigurationOption("region_allow_terraform", m_regionAllowTerraform.ToString()); | 231 | configMember.forceSetConfigurationOption("region_allow_terraform", m_regionAllowTerraform.ToString()); |
232 | } | 232 | } |
233 | } | 233 | } |
234 | 234 | ||
235 | 235 | ||
236 | // Region Information | 236 | // Region Information |
237 | // Low resolution 'base' textures. No longer used. | 237 | // Low resolution 'base' textures. No longer used. |
238 | private LLUUID m_terrainBase0; | 238 | private LLUUID m_terrainBase0; |
239 | 239 | ||
240 | public LLUUID terrainBase0 | 240 | public LLUUID terrainBase0 |
241 | { | 241 | { |
242 | get { return m_terrainBase0; } | 242 | get { return m_terrainBase0; } |
243 | set | 243 | set |
244 | { | 244 | { |
245 | m_terrainBase0 = value; | 245 | m_terrainBase0 = value; |
246 | configMember.forceSetConfigurationOption("terrain_base_0", m_terrainBase0.ToString()); | 246 | configMember.forceSetConfigurationOption("terrain_base_0", m_terrainBase0.ToString()); |
247 | } | 247 | } |
248 | } | 248 | } |
249 | 249 | ||
250 | private LLUUID m_terrainBase1; | 250 | private LLUUID m_terrainBase1; |
251 | 251 | ||
252 | public LLUUID terrainBase1 | 252 | public LLUUID terrainBase1 |
253 | { | 253 | { |
254 | get { return m_terrainBase1; } | 254 | get { return m_terrainBase1; } |
255 | set | 255 | set |
256 | { | 256 | { |
257 | m_terrainBase1 = value; | 257 | m_terrainBase1 = value; |
258 | configMember.forceSetConfigurationOption("terrain_base_1", m_terrainBase1.ToString()); | 258 | configMember.forceSetConfigurationOption("terrain_base_1", m_terrainBase1.ToString()); |
259 | } | 259 | } |
260 | } | 260 | } |
261 | 261 | ||
262 | private LLUUID m_terrainBase2; | 262 | private LLUUID m_terrainBase2; |
263 | 263 | ||
264 | public LLUUID terrainBase2 | 264 | public LLUUID terrainBase2 |
265 | { | 265 | { |
266 | get { return m_terrainBase2; } | 266 | get { return m_terrainBase2; } |
267 | set | 267 | set |
268 | { | 268 | { |
269 | m_terrainBase2 = value; | 269 | m_terrainBase2 = value; |
270 | configMember.forceSetConfigurationOption("terrain_base_2", m_terrainBase2.ToString()); | 270 | configMember.forceSetConfigurationOption("terrain_base_2", m_terrainBase2.ToString()); |
271 | } | 271 | } |
272 | } | 272 | } |
273 | 273 | ||
274 | private LLUUID m_terrainBase3; | 274 | private LLUUID m_terrainBase3; |
275 | 275 | ||
276 | public LLUUID terrainBase3 | 276 | public LLUUID terrainBase3 |
277 | { | 277 | { |
278 | get { return m_terrainBase3; } | 278 | get { return m_terrainBase3; } |
279 | set | 279 | set |
280 | { | 280 | { |
281 | m_terrainBase3 = value; | 281 | m_terrainBase3 = value; |
282 | configMember.forceSetConfigurationOption("terrain_base_3", m_terrainBase3.ToString()); | 282 | configMember.forceSetConfigurationOption("terrain_base_3", m_terrainBase3.ToString()); |
283 | } | 283 | } |
284 | } | 284 | } |
285 | 285 | ||
286 | 286 | ||
287 | // Higher resolution terrain textures | 287 | // Higher resolution terrain textures |
288 | private LLUUID m_terrainDetail0; | 288 | private LLUUID m_terrainDetail0; |
289 | 289 | ||
290 | public LLUUID terrainDetail0 | 290 | public LLUUID terrainDetail0 |
291 | { | 291 | { |
292 | get { return m_terrainDetail0; } | 292 | get { return m_terrainDetail0; } |
293 | set | 293 | set |
294 | { | 294 | { |
295 | m_terrainDetail0 = value; | 295 | m_terrainDetail0 = value; |
296 | configMember.forceSetConfigurationOption("terrain_detail_0", m_terrainDetail0.ToString()); | 296 | configMember.forceSetConfigurationOption("terrain_detail_0", m_terrainDetail0.ToString()); |
297 | } | 297 | } |
298 | } | 298 | } |
299 | 299 | ||
300 | private LLUUID m_terrainDetail1; | 300 | private LLUUID m_terrainDetail1; |
301 | 301 | ||
302 | public LLUUID terrainDetail1 | 302 | public LLUUID terrainDetail1 |
303 | { | 303 | { |
304 | get { return m_terrainDetail1; } | 304 | get { return m_terrainDetail1; } |
305 | set | 305 | set |
306 | { | 306 | { |
307 | m_terrainDetail1 = value; | 307 | m_terrainDetail1 = value; |
308 | configMember.forceSetConfigurationOption("terrain_detail_1", m_terrainDetail1.ToString()); | 308 | configMember.forceSetConfigurationOption("terrain_detail_1", m_terrainDetail1.ToString()); |
309 | } | 309 | } |
310 | } | 310 | } |
311 | 311 | ||
312 | private LLUUID m_terrainDetail2; | 312 | private LLUUID m_terrainDetail2; |
313 | 313 | ||
314 | public LLUUID terrainDetail2 | 314 | public LLUUID terrainDetail2 |
315 | { | 315 | { |
316 | get { return m_terrainDetail2; } | 316 | get { return m_terrainDetail2; } |
317 | set | 317 | set |
318 | { | 318 | { |
319 | m_terrainDetail2 = value; | 319 | m_terrainDetail2 = value; |
320 | configMember.forceSetConfigurationOption("terrain_detail_2", m_terrainDetail2.ToString()); | 320 | configMember.forceSetConfigurationOption("terrain_detail_2", m_terrainDetail2.ToString()); |
321 | } | 321 | } |
322 | } | 322 | } |
323 | 323 | ||
324 | private LLUUID m_terrainDetail3; | 324 | private LLUUID m_terrainDetail3; |
325 | 325 | ||
326 | public LLUUID terrainDetail3 | 326 | public LLUUID terrainDetail3 |
327 | { | 327 | { |
328 | get { return m_terrainDetail3; } | 328 | get { return m_terrainDetail3; } |
329 | set | 329 | set |
330 | { | 330 | { |
331 | m_terrainDetail3 = value; | 331 | m_terrainDetail3 = value; |
332 | configMember.forceSetConfigurationOption("terrain_detail_3", m_terrainDetail3.ToString()); | 332 | configMember.forceSetConfigurationOption("terrain_detail_3", m_terrainDetail3.ToString()); |
333 | } | 333 | } |
334 | } | 334 | } |
335 | 335 | ||
336 | // First quad - each point is bilinearly interpolated at each meter of terrain | 336 | // First quad - each point is bilinearly interpolated at each meter of terrain |
337 | private float m_terrainStartHeight0; | 337 | private float m_terrainStartHeight0; |
338 | 338 | ||
339 | public float terrainStartHeight0 | 339 | public float terrainStartHeight0 |
340 | { | 340 | { |
341 | get { return m_terrainStartHeight0; } | 341 | get { return m_terrainStartHeight0; } |
342 | set | 342 | set |
343 | { | 343 | { |
344 | m_terrainStartHeight0 = value; | 344 | m_terrainStartHeight0 = value; |
345 | configMember.forceSetConfigurationOption("terrain_start_height_0", m_terrainStartHeight0.ToString()); | 345 | configMember.forceSetConfigurationOption("terrain_start_height_0", m_terrainStartHeight0.ToString()); |
346 | } | 346 | } |
347 | } | 347 | } |
348 | 348 | ||
349 | 349 | ||
350 | private float m_terrainStartHeight1; | 350 | private float m_terrainStartHeight1; |
351 | 351 | ||
352 | public float terrainStartHeight1 | 352 | public float terrainStartHeight1 |
353 | { | 353 | { |
354 | get { return m_terrainStartHeight1; } | 354 | get { return m_terrainStartHeight1; } |
355 | set | 355 | set |
356 | { | 356 | { |
357 | m_terrainStartHeight1 = value; | 357 | m_terrainStartHeight1 = value; |
358 | configMember.forceSetConfigurationOption("terrain_start_height_1", m_terrainStartHeight1.ToString()); | 358 | configMember.forceSetConfigurationOption("terrain_start_height_1", m_terrainStartHeight1.ToString()); |
359 | } | 359 | } |
360 | } | 360 | } |
361 | 361 | ||
362 | private float m_terrainStartHeight2; | 362 | private float m_terrainStartHeight2; |
363 | 363 | ||
364 | public float terrainStartHeight2 | 364 | public float terrainStartHeight2 |
365 | { | 365 | { |
366 | get { return m_terrainStartHeight2; } | 366 | get { return m_terrainStartHeight2; } |
367 | set | 367 | set |
368 | { | 368 | { |
369 | m_terrainStartHeight2 = value; | 369 | m_terrainStartHeight2 = value; |
370 | configMember.forceSetConfigurationOption("terrain_start_height_2", m_terrainStartHeight2.ToString()); | 370 | configMember.forceSetConfigurationOption("terrain_start_height_2", m_terrainStartHeight2.ToString()); |
371 | } | 371 | } |
372 | } | 372 | } |
373 | 373 | ||
374 | private float m_terrainStartHeight3; | 374 | private float m_terrainStartHeight3; |
375 | 375 | ||
376 | public float terrainStartHeight3 | 376 | public float terrainStartHeight3 |
377 | { | 377 | { |
378 | get { return m_terrainStartHeight3; } | 378 | get { return m_terrainStartHeight3; } |
379 | set | 379 | set |
380 | { | 380 | { |
381 | m_terrainStartHeight3 = value; | 381 | m_terrainStartHeight3 = value; |
382 | configMember.forceSetConfigurationOption("terrain_start_height_3", m_terrainStartHeight3.ToString()); | 382 | configMember.forceSetConfigurationOption("terrain_start_height_3", m_terrainStartHeight3.ToString()); |
383 | } | 383 | } |
384 | } | 384 | } |
385 | 385 | ||
386 | // Second quad - also bilinearly interpolated. | 386 | // Second quad - also bilinearly interpolated. |
387 | // Terrain texturing is done that: | 387 | // Terrain texturing is done that: |
388 | // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] | 388 | // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] |
389 | private float m_terrainHeightRange0; | 389 | private float m_terrainHeightRange0; |
390 | 390 | ||
391 | public float terrainHeightRange0 | 391 | public float terrainHeightRange0 |
392 | { | 392 | { |
393 | get { return m_terrainHeightRange0; } | 393 | get { return m_terrainHeightRange0; } |
394 | set | 394 | set |
395 | { | 395 | { |
396 | m_terrainHeightRange0 = value; | 396 | m_terrainHeightRange0 = value; |
397 | configMember.forceSetConfigurationOption("terrain_height_range_0", m_terrainHeightRange0.ToString()); | 397 | configMember.forceSetConfigurationOption("terrain_height_range_0", m_terrainHeightRange0.ToString()); |
398 | } | 398 | } |
399 | } | 399 | } |
400 | 400 | ||
401 | private float m_terrainHeightRange1; | 401 | private float m_terrainHeightRange1; |
402 | 402 | ||
403 | public float terrainHeightRange1 | 403 | public float terrainHeightRange1 |
404 | { | 404 | { |
405 | get { return m_terrainHeightRange1; } | 405 | get { return m_terrainHeightRange1; } |
406 | set | 406 | set |
407 | { | 407 | { |
408 | m_terrainHeightRange1 = value; | 408 | m_terrainHeightRange1 = value; |
409 | configMember.forceSetConfigurationOption("terrain_height_range_1", m_terrainHeightRange1.ToString()); | 409 | configMember.forceSetConfigurationOption("terrain_height_range_1", m_terrainHeightRange1.ToString()); |
410 | } | 410 | } |
411 | } | 411 | } |
412 | 412 | ||
413 | private float m_terrainHeightRange2; | 413 | private float m_terrainHeightRange2; |
414 | 414 | ||
415 | public float terrainHeightRange2 | 415 | public float terrainHeightRange2 |
416 | { | 416 | { |
417 | get { return m_terrainHeightRange2; } | 417 | get { return m_terrainHeightRange2; } |
418 | set | 418 | set |
419 | { | 419 | { |
420 | m_terrainHeightRange2 = value; | 420 | m_terrainHeightRange2 = value; |
421 | configMember.forceSetConfigurationOption("terrain_height_range_2", m_terrainHeightRange2.ToString()); | 421 | configMember.forceSetConfigurationOption("terrain_height_range_2", m_terrainHeightRange2.ToString()); |
422 | } | 422 | } |
423 | } | 423 | } |
424 | 424 | ||
425 | private float m_terrainHeightRange3; | 425 | private float m_terrainHeightRange3; |
426 | 426 | ||
427 | public float terrainHeightRange3 | 427 | public float terrainHeightRange3 |
428 | { | 428 | { |
429 | get { return m_terrainHeightRange3; } | 429 | get { return m_terrainHeightRange3; } |
430 | set | 430 | set |
431 | { | 431 | { |
432 | m_terrainHeightRange3 = value; | 432 | m_terrainHeightRange3 = value; |
433 | configMember.forceSetConfigurationOption("terrain_height_range_3", m_terrainHeightRange3.ToString()); | 433 | configMember.forceSetConfigurationOption("terrain_height_range_3", m_terrainHeightRange3.ToString()); |
434 | } | 434 | } |
435 | } | 435 | } |
436 | 436 | ||
437 | // Terrain Default (Must be in F32 Format!) | 437 | // Terrain Default (Must be in F32 Format!) |
438 | private string m_terrainFile; | 438 | private string m_terrainFile; |
439 | 439 | ||
440 | public string terrainFile | 440 | public string terrainFile |
441 | { | 441 | { |
442 | get { return m_terrainFile; } | 442 | get { return m_terrainFile; } |
443 | set | 443 | set |
444 | { | 444 | { |
445 | m_terrainFile = value; | 445 | m_terrainFile = value; |
446 | configMember.forceSetConfigurationOption("terrain_file", m_terrainFile.ToString()); | 446 | configMember.forceSetConfigurationOption("terrain_file", m_terrainFile.ToString()); |
447 | } | 447 | } |
448 | } | 448 | } |
449 | 449 | ||
450 | private double m_terrainMultiplier; | 450 | private double m_terrainMultiplier; |
451 | 451 | ||
452 | public double terrainMultiplier | 452 | public double terrainMultiplier |
453 | { | 453 | { |
454 | get { return m_terrainMultiplier; } | 454 | get { return m_terrainMultiplier; } |
455 | set | 455 | set |
456 | { | 456 | { |
457 | m_terrainMultiplier = value; | 457 | m_terrainMultiplier = value; |
458 | configMember.forceSetConfigurationOption("terrain_multiplier", m_terrainMultiplier.ToString()); | 458 | configMember.forceSetConfigurationOption("terrain_multiplier", m_terrainMultiplier.ToString()); |
459 | } | 459 | } |
460 | } | 460 | } |
461 | 461 | ||
462 | private float m_waterHeight; | 462 | private float m_waterHeight; |
463 | 463 | ||
464 | public float waterHeight | 464 | public float waterHeight |
465 | { | 465 | { |
466 | get { return m_waterHeight; } | 466 | get { return m_waterHeight; } |
467 | set | 467 | set |
468 | { | 468 | { |
469 | m_waterHeight = value; | 469 | m_waterHeight = value; |
470 | configMember.forceSetConfigurationOption("water_height", m_waterHeight.ToString()); | 470 | configMember.forceSetConfigurationOption("water_height", m_waterHeight.ToString()); |
471 | } | 471 | } |
472 | } | 472 | } |
473 | 473 | ||
474 | private LLUUID m_terrainImageID; | 474 | private LLUUID m_terrainImageID; |
475 | 475 | ||
476 | public LLUUID terrainImageID | 476 | public LLUUID terrainImageID |
477 | { | 477 | { |
478 | get { return m_terrainImageID; } | 478 | get { return m_terrainImageID; } |
479 | set | 479 | set |
480 | { | 480 | { |
481 | m_terrainImageID = value; | 481 | m_terrainImageID = value; |
482 | configMember.forceSetConfigurationOption("terrain_image_id", m_terrainImageID.ToString()); | 482 | configMember.forceSetConfigurationOption("terrain_image_id", m_terrainImageID.ToString()); |
483 | } | 483 | } |
484 | } | 484 | } |
485 | 485 | ||
486 | private ConfigurationMember configMember; | 486 | private ConfigurationMember configMember; |
487 | 487 | ||
488 | public EstateSettings() | 488 | public EstateSettings() |
489 | { | 489 | { |
490 | // Temporary hack to prevent multiple loadings. | 490 | // Temporary hack to prevent multiple loadings. |
491 | if (configMember == null) | 491 | if (configMember == null) |
492 | { | 492 | { |
493 | configMember = | 493 | configMember = |
494 | new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", | 494 | new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", |
495 | loadConfigurationOptions, handleIncomingConfiguration); | 495 | loadConfigurationOptions, handleIncomingConfiguration); |
496 | configMember.performConfigurationRetrieve(); | 496 | configMember.performConfigurationRetrieve(); |
497 | } | 497 | } |
498 | } | 498 | } |
499 | 499 | ||
500 | public void loadConfigurationOptions() | 500 | public void loadConfigurationOptions() |
501 | { | 501 | { |
502 | configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", | 502 | configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", |
503 | "0.0", true); | 503 | "0.0", true); |
504 | configMember.addConfigurationOption("estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "0", | 504 | configMember.addConfigurationOption("estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "0", |
505 | true); | 505 | true); |
506 | configMember.addConfigurationOption("parent_estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 506 | configMember.addConfigurationOption("parent_estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
507 | "", "0", true); | 507 | "", "0", true); |
508 | configMember.addConfigurationOption("max_agents", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, "", "40", | 508 | configMember.addConfigurationOption("max_agents", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, "", "40", |
509 | true); | 509 | true); |
510 | 510 | ||
511 | configMember.addConfigurationOption("object_bonus_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, | 511 | configMember.addConfigurationOption("object_bonus_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, |
512 | "", "1.0", true); | 512 | "", "1.0", true); |
513 | configMember.addConfigurationOption("redirect_grid_x", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "", | 513 | configMember.addConfigurationOption("redirect_grid_x", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "", |
514 | "0", true); | 514 | "0", true); |
515 | configMember.addConfigurationOption("redirect_grid_y", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "", | 515 | configMember.addConfigurationOption("redirect_grid_y", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "", |
516 | "0", true); | 516 | "0", true); |
517 | configMember.addConfigurationOption("region_flags", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", | 517 | configMember.addConfigurationOption("region_flags", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", |
518 | "0", true); | 518 | "0", true); |
519 | configMember.addConfigurationOption("sim_access", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, "", "21", | 519 | configMember.addConfigurationOption("sim_access", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, "", "21", |
520 | true); | 520 | true); |
521 | configMember.addConfigurationOption("sun_hour", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "0", | 521 | configMember.addConfigurationOption("sun_hour", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "0", |
522 | true); | 522 | true); |
523 | configMember.addConfigurationOption("terrain_raise_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, | 523 | configMember.addConfigurationOption("terrain_raise_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, |
524 | "", "0", true); | 524 | "", "0", true); |
525 | configMember.addConfigurationOption("terrain_lower_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, | 525 | configMember.addConfigurationOption("terrain_lower_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, |
526 | "", "0", true); | 526 | "", "0", true); |
527 | configMember.addConfigurationOption("use_fixed_sun", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "", | 527 | configMember.addConfigurationOption("use_fixed_sun", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "", |
528 | "false", true); | 528 | "false", true); |
529 | configMember.addConfigurationOption("price_per_meter", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 529 | configMember.addConfigurationOption("price_per_meter", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
530 | "", "1", true); | 530 | "", "1", true); |
531 | configMember.addConfigurationOption("region_water_height", | 531 | configMember.addConfigurationOption("region_water_height", |
532 | ConfigurationOption.ConfigurationTypes.TYPE_UINT16, "", "20", true); | 532 | ConfigurationOption.ConfigurationTypes.TYPE_UINT16, "", "20", true); |
533 | configMember.addConfigurationOption("region_allow_terraform", | 533 | configMember.addConfigurationOption("region_allow_terraform", |
534 | ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "", "true", true); | 534 | ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "", "true", true); |
535 | 535 | ||
536 | configMember.addConfigurationOption("terrain_base_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", | 536 | configMember.addConfigurationOption("terrain_base_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", |
537 | "b8d3965a-ad78-bf43-699b-bff8eca6c975", true); | 537 | "b8d3965a-ad78-bf43-699b-bff8eca6c975", true); |
538 | configMember.addConfigurationOption("terrain_base_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", | 538 | configMember.addConfigurationOption("terrain_base_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", |
539 | "abb783e6-3e93-26c0-248a-247666855da3", true); | 539 | "abb783e6-3e93-26c0-248a-247666855da3", true); |
540 | configMember.addConfigurationOption("terrain_base_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", | 540 | configMember.addConfigurationOption("terrain_base_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", |
541 | "179cdabd-398a-9b6b-1391-4dc333ba321f", true); | 541 | "179cdabd-398a-9b6b-1391-4dc333ba321f", true); |
542 | configMember.addConfigurationOption("terrain_base_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", | 542 | configMember.addConfigurationOption("terrain_base_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", |
543 | "beb169c7-11ea-fff2-efe5-0f24dc881df2", true); | 543 | "beb169c7-11ea-fff2-efe5-0f24dc881df2", true); |
544 | 544 | ||
545 | configMember.addConfigurationOption("terrain_detail_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, | 545 | configMember.addConfigurationOption("terrain_detail_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, |
546 | "", "00000000-0000-0000-0000-000000000000", true); | 546 | "", "00000000-0000-0000-0000-000000000000", true); |
547 | configMember.addConfigurationOption("terrain_detail_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, | 547 | configMember.addConfigurationOption("terrain_detail_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, |
548 | "", "00000000-0000-0000-0000-000000000000", true); | 548 | "", "00000000-0000-0000-0000-000000000000", true); |
549 | configMember.addConfigurationOption("terrain_detail_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, | 549 | configMember.addConfigurationOption("terrain_detail_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, |
550 | "", "00000000-0000-0000-0000-000000000000", true); | 550 | "", "00000000-0000-0000-0000-000000000000", true); |
551 | configMember.addConfigurationOption("terrain_detail_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, | 551 | configMember.addConfigurationOption("terrain_detail_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, |
552 | "", "00000000-0000-0000-0000-000000000000", true); | 552 | "", "00000000-0000-0000-0000-000000000000", true); |
553 | 553 | ||
554 | configMember.addConfigurationOption("terrain_start_height_0", | 554 | configMember.addConfigurationOption("terrain_start_height_0", |
555 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); | 555 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); |
556 | configMember.addConfigurationOption("terrain_start_height_1", | 556 | configMember.addConfigurationOption("terrain_start_height_1", |
557 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); | 557 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); |
558 | configMember.addConfigurationOption("terrain_start_height_2", | 558 | configMember.addConfigurationOption("terrain_start_height_2", |
559 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); | 559 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); |
560 | configMember.addConfigurationOption("terrain_start_height_3", | 560 | configMember.addConfigurationOption("terrain_start_height_3", |
561 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); | 561 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "10.0", true); |
562 | 562 | ||
563 | configMember.addConfigurationOption("terrain_height_range_0", | 563 | configMember.addConfigurationOption("terrain_height_range_0", |
564 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); | 564 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); |
565 | configMember.addConfigurationOption("terrain_height_range_1", | 565 | configMember.addConfigurationOption("terrain_height_range_1", |
566 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); | 566 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); |
567 | configMember.addConfigurationOption("terrain_height_range_2", | 567 | configMember.addConfigurationOption("terrain_height_range_2", |
568 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); | 568 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); |
569 | configMember.addConfigurationOption("terrain_height_range_3", | 569 | configMember.addConfigurationOption("terrain_height_range_3", |
570 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); | 570 | ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); |
571 | 571 | ||
572 | configMember.addConfigurationOption("terrain_file", | 572 | configMember.addConfigurationOption("terrain_file", |
573 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "", | 573 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "", |
574 | "default.r32", true); | 574 | "default.r32", true); |
575 | configMember.addConfigurationOption("terrain_multiplier", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, | 575 | configMember.addConfigurationOption("terrain_multiplier", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, |
576 | "", "60.0", true); | 576 | "", "60.0", true); |
577 | configMember.addConfigurationOption("water_height", ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, "", | 577 | configMember.addConfigurationOption("water_height", ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, "", |
578 | "20.0", true); | 578 | "20.0", true); |
579 | configMember.addConfigurationOption("terrain_image_id", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, | 579 | configMember.addConfigurationOption("terrain_image_id", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, |
580 | "", "00000000-0000-0000-0000-000000000000", true); | 580 | "", "00000000-0000-0000-0000-000000000000", true); |
581 | } | 581 | } |
582 | 582 | ||
583 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 583 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
584 | { | 584 | { |
585 | switch (configuration_key) | 585 | switch (configuration_key) |
586 | { | 586 | { |
587 | case "billable_factor": | 587 | case "billable_factor": |
588 | m_billableFactor = (float) configuration_result; | 588 | m_billableFactor = (float) configuration_result; |
589 | break; | 589 | break; |
590 | case "estate_id": | 590 | case "estate_id": |
591 | m_estateID = (uint) configuration_result; | 591 | m_estateID = (uint) configuration_result; |
592 | break; | 592 | break; |
593 | case "parent_estate_id": | 593 | case "parent_estate_id": |
594 | m_parentEstateID = (uint) configuration_result; | 594 | m_parentEstateID = (uint) configuration_result; |
595 | break; | 595 | break; |
596 | case "max_agents": | 596 | case "max_agents": |
597 | m_maxAgents = (byte) configuration_result; | 597 | m_maxAgents = (byte) configuration_result; |
598 | break; | 598 | break; |
599 | 599 | ||
600 | case "object_bonus_factor": | 600 | case "object_bonus_factor": |
601 | m_objectBonusFactor = (float) configuration_result; | 601 | m_objectBonusFactor = (float) configuration_result; |
602 | break; | 602 | break; |
603 | case "redirect_grid_x": | 603 | case "redirect_grid_x": |
604 | m_redirectGridX = (int) configuration_result; | 604 | m_redirectGridX = (int) configuration_result; |
605 | break; | 605 | break; |
606 | case "redirect_grid_y": | 606 | case "redirect_grid_y": |
607 | m_redirectGridY = (int) configuration_result; | 607 | m_redirectGridY = (int) configuration_result; |
608 | break; | 608 | break; |
609 | case "region_flags": | 609 | case "region_flags": |
610 | m_regionFlags = (Simulator.RegionFlags) ((uint) configuration_result); | 610 | m_regionFlags = (Simulator.RegionFlags) ((uint) configuration_result); |
611 | break; | 611 | break; |
612 | case "sim_access": | 612 | case "sim_access": |
613 | m_simAccess = (Simulator.SimAccess) ((byte) configuration_result); | 613 | m_simAccess = (Simulator.SimAccess) ((byte) configuration_result); |
614 | break; | 614 | break; |
615 | case "sun_hour": | 615 | case "sun_hour": |
616 | m_sunHour = (float) configuration_result; | 616 | m_sunHour = (float) configuration_result; |
617 | break; | 617 | break; |
618 | case "terrain_raise_limit": | 618 | case "terrain_raise_limit": |
619 | m_terrainRaiseLimit = (float) configuration_result; | 619 | m_terrainRaiseLimit = (float) configuration_result; |
620 | break; | 620 | break; |
621 | case "terrain_lower_limit": | 621 | case "terrain_lower_limit": |
622 | m_terrainLowerLimit = (float) configuration_result; | 622 | m_terrainLowerLimit = (float) configuration_result; |
623 | break; | 623 | break; |
624 | case "use_fixed_sun": | 624 | case "use_fixed_sun": |
625 | m_useFixedSun = (bool) configuration_result; | 625 | m_useFixedSun = (bool) configuration_result; |
626 | break; | 626 | break; |
627 | case "price_per_meter": | 627 | case "price_per_meter": |
628 | m_pricePerMeter = Convert.ToInt32(configuration_result); | 628 | m_pricePerMeter = Convert.ToInt32(configuration_result); |
629 | break; | 629 | break; |
630 | case "region_water_height": | 630 | case "region_water_height": |
631 | m_regionWaterHeight = (ushort) configuration_result; | 631 | m_regionWaterHeight = (ushort) configuration_result; |
632 | break; | 632 | break; |
633 | case "region_allow_terraform": | 633 | case "region_allow_terraform": |
634 | m_regionAllowTerraform = (bool) configuration_result; | 634 | m_regionAllowTerraform = (bool) configuration_result; |
635 | break; | 635 | break; |
636 | 636 | ||
637 | case "terrain_base_0": | 637 | case "terrain_base_0": |
638 | m_terrainBase0 = (LLUUID) configuration_result; | 638 | m_terrainBase0 = (LLUUID) configuration_result; |
639 | break; | 639 | break; |
640 | case "terrain_base_1": | 640 | case "terrain_base_1": |
641 | m_terrainBase1 = (LLUUID) configuration_result; | 641 | m_terrainBase1 = (LLUUID) configuration_result; |
642 | break; | 642 | break; |
643 | case "terrain_base_2": | 643 | case "terrain_base_2": |
644 | m_terrainBase2 = (LLUUID) configuration_result; | 644 | m_terrainBase2 = (LLUUID) configuration_result; |
645 | break; | 645 | break; |
646 | case "terrain_base_3": | 646 | case "terrain_base_3": |
647 | m_terrainBase3 = (LLUUID) configuration_result; | 647 | m_terrainBase3 = (LLUUID) configuration_result; |
648 | break; | 648 | break; |
649 | 649 | ||
650 | case "terrain_detail_0": | 650 | case "terrain_detail_0": |
651 | m_terrainDetail0 = (LLUUID) configuration_result; | 651 | m_terrainDetail0 = (LLUUID) configuration_result; |
652 | break; | 652 | break; |
653 | case "terrain_detail_1": | 653 | case "terrain_detail_1": |
654 | m_terrainDetail1 = (LLUUID) configuration_result; | 654 | m_terrainDetail1 = (LLUUID) configuration_result; |
655 | break; | 655 | break; |
656 | case "terrain_detail_2": | 656 | case "terrain_detail_2": |
657 | m_terrainDetail2 = (LLUUID) configuration_result; | 657 | m_terrainDetail2 = (LLUUID) configuration_result; |
658 | break; | 658 | break; |
659 | case "terrain_detail_3": | 659 | case "terrain_detail_3": |
660 | m_terrainDetail3 = (LLUUID) configuration_result; | 660 | m_terrainDetail3 = (LLUUID) configuration_result; |
661 | break; | 661 | break; |
662 | 662 | ||
663 | case "terrain_start_height_0": | 663 | case "terrain_start_height_0": |
664 | m_terrainStartHeight0 = (float) configuration_result; | 664 | m_terrainStartHeight0 = (float) configuration_result; |
665 | break; | 665 | break; |
666 | case "terrain_start_height_1": | 666 | case "terrain_start_height_1": |
667 | m_terrainStartHeight1 = (float) configuration_result; | 667 | m_terrainStartHeight1 = (float) configuration_result; |
668 | break; | 668 | break; |
669 | case "terrain_start_height_2": | 669 | case "terrain_start_height_2": |
670 | m_terrainStartHeight2 = (float) configuration_result; | 670 | m_terrainStartHeight2 = (float) configuration_result; |
671 | break; | 671 | break; |
672 | case "terrain_start_height_3": | 672 | case "terrain_start_height_3": |
673 | m_terrainStartHeight3 = (float) configuration_result; | 673 | m_terrainStartHeight3 = (float) configuration_result; |
674 | break; | 674 | break; |
675 | 675 | ||
676 | case "terrain_height_range_0": | 676 | case "terrain_height_range_0": |
677 | m_terrainHeightRange0 = (float) configuration_result; | 677 | m_terrainHeightRange0 = (float) configuration_result; |
678 | break; | 678 | break; |
679 | case "terrain_height_range_1": | 679 | case "terrain_height_range_1": |
680 | m_terrainHeightRange1 = (float) configuration_result; | 680 | m_terrainHeightRange1 = (float) configuration_result; |
681 | break; | 681 | break; |
682 | case "terrain_height_range_2": | 682 | case "terrain_height_range_2": |
683 | m_terrainHeightRange2 = (float) configuration_result; | 683 | m_terrainHeightRange2 = (float) configuration_result; |
684 | break; | 684 | break; |
685 | case "terrain_height_range_3": | 685 | case "terrain_height_range_3": |
686 | m_terrainHeightRange3 = (float) configuration_result; | 686 | m_terrainHeightRange3 = (float) configuration_result; |
687 | break; | 687 | break; |
688 | 688 | ||
689 | case "terrain_file": | 689 | case "terrain_file": |
690 | m_terrainFile = (string) configuration_result; | 690 | m_terrainFile = (string) configuration_result; |
691 | break; | 691 | break; |
692 | case "terrain_multiplier": | 692 | case "terrain_multiplier": |
693 | m_terrainMultiplier = Convert.ToDouble(configuration_result); | 693 | m_terrainMultiplier = Convert.ToDouble(configuration_result); |
694 | break; | 694 | break; |
695 | case "water_height": | 695 | case "water_height": |
696 | double tmpVal = (double) configuration_result; | 696 | double tmpVal = (double) configuration_result; |
697 | m_waterHeight = (float) tmpVal; | 697 | m_waterHeight = (float) tmpVal; |
698 | break; | 698 | break; |
699 | case "terrain_image_id": | 699 | case "terrain_image_id": |
700 | m_terrainImageID = (LLUUID) configuration_result; | 700 | m_terrainImageID = (LLUUID) configuration_result; |
701 | break; | 701 | break; |
702 | } | 702 | } |
703 | 703 | ||
704 | return true; | 704 | return true; |
705 | } | 705 | } |
706 | } | 706 | } |
707 | } \ No newline at end of file | 707 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/GridConfig.cs b/OpenSim/Framework/General/GridConfig.cs index 66d6c3a..021e6c5 100644 --- a/OpenSim/Framework/General/GridConfig.cs +++ b/OpenSim/Framework/General/GridConfig.cs | |||
@@ -1,136 +1,136 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | namespace OpenSim.Framework | 29 | namespace OpenSim.Framework |
30 | { | 30 | { |
31 | public class GridConfig | 31 | public class GridConfig |
32 | { | 32 | { |
33 | public string GridOwner = ""; | 33 | public string GridOwner = ""; |
34 | public string DefaultAssetServer = ""; | 34 | public string DefaultAssetServer = ""; |
35 | public string AssetSendKey = ""; | 35 | public string AssetSendKey = ""; |
36 | public string AssetRecvKey = ""; | 36 | public string AssetRecvKey = ""; |
37 | 37 | ||
38 | public string DefaultUserServer = ""; | 38 | public string DefaultUserServer = ""; |
39 | public string UserSendKey = ""; | 39 | public string UserSendKey = ""; |
40 | public string UserRecvKey = ""; | 40 | public string UserRecvKey = ""; |
41 | 41 | ||
42 | public string SimSendKey = ""; | 42 | public string SimSendKey = ""; |
43 | public string SimRecvKey = ""; | 43 | public string SimRecvKey = ""; |
44 | 44 | ||
45 | public string DatabaseProvider = ""; | 45 | public string DatabaseProvider = ""; |
46 | 46 | ||
47 | public static uint DefaultHttpPort = 8001; | 47 | public static uint DefaultHttpPort = 8001; |
48 | public uint HttpPort = DefaultHttpPort; | 48 | public uint HttpPort = DefaultHttpPort; |
49 | 49 | ||
50 | private ConfigurationMember configMember; | 50 | private ConfigurationMember configMember; |
51 | 51 | ||
52 | public GridConfig(string description, string filename) | 52 | public GridConfig(string description, string filename) |
53 | { | 53 | { |
54 | configMember = | 54 | configMember = |
55 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); | 55 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); |
56 | configMember.performConfigurationRetrieve(); | 56 | configMember.performConfigurationRetrieve(); |
57 | } | 57 | } |
58 | 58 | ||
59 | public void loadConfigurationOptions() | 59 | public void loadConfigurationOptions() |
60 | { | 60 | { |
61 | configMember.addConfigurationOption("grid_owner", | 61 | configMember.addConfigurationOption("grid_owner", |
62 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 62 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
63 | "OGS Grid Owner", "OGS development team", false); | 63 | "OGS Grid Owner", "OGS development team", false); |
64 | configMember.addConfigurationOption("default_asset_server", | 64 | configMember.addConfigurationOption("default_asset_server", |
65 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 65 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
66 | "Default Asset Server URI", | 66 | "Default Asset Server URI", |
67 | "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/", | 67 | "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/", |
68 | false); | 68 | false); |
69 | configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 69 | configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
70 | "Key to send to asset server", "null", false); | 70 | "Key to send to asset server", "null", false); |
71 | configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 71 | configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
72 | "Key to expect from asset server", "null", false); | 72 | "Key to expect from asset server", "null", false); |
73 | 73 | ||
74 | configMember.addConfigurationOption("default_user_server", | 74 | configMember.addConfigurationOption("default_user_server", |
75 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 75 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
76 | "Default User Server URI", | 76 | "Default User Server URI", |
77 | "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false); | 77 | "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/", false); |
78 | configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 78 | configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
79 | "Key to send to user server", "null", false); | 79 | "Key to send to user server", "null", false); |
80 | configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 80 | configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
81 | "Key to expect from user server", "null", false); | 81 | "Key to expect from user server", "null", false); |
82 | 82 | ||
83 | configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 83 | configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
84 | "Key to send to a simulator", "null", false); | 84 | "Key to send to a simulator", "null", false); |
85 | configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 85 | configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
86 | "Key to expect from a simulator", "null", false); | 86 | "Key to expect from a simulator", "null", false); |
87 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 87 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
88 | "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); | 88 | "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); |
89 | 89 | ||
90 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 90 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
91 | "Http Listener port", DefaultHttpPort.ToString(), false); | 91 | "Http Listener port", DefaultHttpPort.ToString(), false); |
92 | } | 92 | } |
93 | 93 | ||
94 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 94 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
95 | { | 95 | { |
96 | switch (configuration_key) | 96 | switch (configuration_key) |
97 | { | 97 | { |
98 | case "grid_owner": | 98 | case "grid_owner": |
99 | GridOwner = (string) configuration_result; | 99 | GridOwner = (string) configuration_result; |
100 | break; | 100 | break; |
101 | case "default_asset_server": | 101 | case "default_asset_server": |
102 | DefaultAssetServer = (string) configuration_result; | 102 | DefaultAssetServer = (string) configuration_result; |
103 | break; | 103 | break; |
104 | case "asset_send_key": | 104 | case "asset_send_key": |
105 | AssetSendKey = (string) configuration_result; | 105 | AssetSendKey = (string) configuration_result; |
106 | break; | 106 | break; |
107 | case "asset_recv_key": | 107 | case "asset_recv_key": |
108 | AssetRecvKey = (string) configuration_result; | 108 | AssetRecvKey = (string) configuration_result; |
109 | break; | 109 | break; |
110 | case "default_user_server": | 110 | case "default_user_server": |
111 | DefaultUserServer = (string) configuration_result; | 111 | DefaultUserServer = (string) configuration_result; |
112 | break; | 112 | break; |
113 | case "user_send_key": | 113 | case "user_send_key": |
114 | UserSendKey = (string) configuration_result; | 114 | UserSendKey = (string) configuration_result; |
115 | break; | 115 | break; |
116 | case "user_recv_key": | 116 | case "user_recv_key": |
117 | UserRecvKey = (string) configuration_result; | 117 | UserRecvKey = (string) configuration_result; |
118 | break; | 118 | break; |
119 | case "sim_send_key": | 119 | case "sim_send_key": |
120 | SimSendKey = (string) configuration_result; | 120 | SimSendKey = (string) configuration_result; |
121 | break; | 121 | break; |
122 | case "sim_recv_key": | 122 | case "sim_recv_key": |
123 | SimRecvKey = (string) configuration_result; | 123 | SimRecvKey = (string) configuration_result; |
124 | break; | 124 | break; |
125 | case "database_provider": | 125 | case "database_provider": |
126 | DatabaseProvider = (string) configuration_result; | 126 | DatabaseProvider = (string) configuration_result; |
127 | break; | 127 | break; |
128 | case "http_port": | 128 | case "http_port": |
129 | HttpPort = (uint) configuration_result; | 129 | HttpPort = (uint) configuration_result; |
130 | break; | 130 | break; |
131 | } | 131 | } |
132 | 132 | ||
133 | return true; | 133 | return true; |
134 | } | 134 | } |
135 | } | 135 | } |
136 | } \ No newline at end of file | 136 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/IAssetProvider.cs b/OpenSim/Framework/General/IAssetProvider.cs index f452822..ad1cf66 100644 --- a/OpenSim/Framework/General/IAssetProvider.cs +++ b/OpenSim/Framework/General/IAssetProvider.cs | |||
@@ -1,41 +1,41 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
33 | public interface IAssetProvider : IPlugin | 33 | public interface IAssetProvider : IPlugin |
34 | { | 34 | { |
35 | AssetBase FetchAsset(LLUUID uuid); | 35 | AssetBase FetchAsset(LLUUID uuid); |
36 | void CreateAsset(AssetBase asset); | 36 | void CreateAsset(AssetBase asset); |
37 | void UpdateAsset(AssetBase asset); | 37 | void UpdateAsset(AssetBase asset); |
38 | bool ExistsAsset(LLUUID uuid); | 38 | bool ExistsAsset(LLUUID uuid); |
39 | void CommitAssets(); // force a sync to the database | 39 | void CommitAssets(); // force a sync to the database |
40 | } | 40 | } |
41 | } \ No newline at end of file | 41 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/IAssetServer.cs b/OpenSim/Framework/General/IAssetServer.cs index f4cb533..9a7dbab 100644 --- a/OpenSim/Framework/General/IAssetServer.cs +++ b/OpenSim/Framework/General/IAssetServer.cs | |||
@@ -1,69 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | 31 | ||
32 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
33 | { | 33 | { |
34 | /// <summary> | 34 | /// <summary> |
35 | /// Description of IAssetServer. | 35 | /// Description of IAssetServer. |
36 | /// </summary> | 36 | /// </summary> |
37 | public interface IAssetServer | 37 | public interface IAssetServer |
38 | { | 38 | { |
39 | void SetReceiver(IAssetReceiver receiver); | 39 | void SetReceiver(IAssetReceiver receiver); |
40 | void FetchAsset(LLUUID assetID, bool isTexture); | 40 | void FetchAsset(LLUUID assetID, bool isTexture); |
41 | void UpdateAsset(AssetBase asset); | 41 | void UpdateAsset(AssetBase asset); |
42 | void StoreAndCommitAsset(AssetBase asset); | 42 | void StoreAndCommitAsset(AssetBase asset); |
43 | void Close(); | 43 | void Close(); |
44 | void LoadAsset(AssetBase info, bool image, string filename); | 44 | void LoadAsset(AssetBase info, bool image, string filename); |
45 | List<AssetBase> GetDefaultAssets(); | 45 | List<AssetBase> GetDefaultAssets(); |
46 | AssetBase CreateImageAsset(string assetIdStr, string name, string filename); | 46 | AssetBase CreateImageAsset(string assetIdStr, string name, string filename); |
47 | void ForEachDefaultAsset(Action<AssetBase> action); | 47 | void ForEachDefaultAsset(Action<AssetBase> action); |
48 | AssetBase CreateAsset(string assetIdStr, string name, string filename, bool isImage); | 48 | AssetBase CreateAsset(string assetIdStr, string name, string filename, bool isImage); |
49 | void ForEachXmlAsset(Action<AssetBase> action); | 49 | void ForEachXmlAsset(Action<AssetBase> action); |
50 | } | 50 | } |
51 | 51 | ||
52 | // could change to delegate? | 52 | // could change to delegate? |
53 | public interface IAssetReceiver | 53 | public interface IAssetReceiver |
54 | { | 54 | { |
55 | void AssetReceived(AssetBase asset, bool IsTexture); | 55 | void AssetReceived(AssetBase asset, bool IsTexture); |
56 | void AssetNotFound(LLUUID assetID); | 56 | void AssetNotFound(LLUUID assetID); |
57 | } | 57 | } |
58 | 58 | ||
59 | public interface IAssetPlugin | 59 | public interface IAssetPlugin |
60 | { | 60 | { |
61 | IAssetServer GetAssetServer(); | 61 | IAssetServer GetAssetServer(); |
62 | } | 62 | } |
63 | 63 | ||
64 | public struct ARequest | 64 | public struct ARequest |
65 | { | 65 | { |
66 | public LLUUID AssetID; | 66 | public LLUUID AssetID; |
67 | public bool IsTexture; | 67 | public bool IsTexture; |
68 | } | 68 | } |
69 | } \ No newline at end of file | 69 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/IClientAPI.cs b/OpenSim/Framework/General/IClientAPI.cs index ec7a69e..4482ae6 100644 --- a/OpenSim/Framework/General/IClientAPI.cs +++ b/OpenSim/Framework/General/IClientAPI.cs | |||
@@ -1,447 +1,447 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Net; | 30 | using System.Net; |
31 | using libsecondlife; | 31 | using libsecondlife; |
32 | using libsecondlife.Packets; | 32 | using libsecondlife.Packets; |
33 | 33 | ||
34 | namespace OpenSim.Framework | 34 | namespace OpenSim.Framework |
35 | { | 35 | { |
36 | // Base Args Interface | 36 | // Base Args Interface |
37 | public interface IEventArgs | 37 | public interface IEventArgs |
38 | { | 38 | { |
39 | IScene Scene { get; set; } | 39 | IScene Scene { get; set; } |
40 | 40 | ||
41 | IClientAPI Sender { get; set; } | 41 | IClientAPI Sender { get; set; } |
42 | } | 42 | } |
43 | 43 | ||
44 | public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock); | 44 | public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock); |
45 | 45 | ||
46 | public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e); | 46 | public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e); |
47 | 47 | ||
48 | public enum ChatTypeEnum | 48 | public enum ChatTypeEnum |
49 | { | 49 | { |
50 | Whisper = 0, | 50 | Whisper = 0, |
51 | Say = 1, | 51 | Say = 1, |
52 | Shout = 2, | 52 | Shout = 2, |
53 | Broadcast = 0xFF | 53 | Broadcast = 0xFF |
54 | } ; | 54 | } ; |
55 | 55 | ||
56 | /// <summary> | 56 | /// <summary> |
57 | /// ChatFromViewer Arguments | 57 | /// ChatFromViewer Arguments |
58 | /// </summary> | 58 | /// </summary> |
59 | public class ChatFromViewerArgs : EventArgs, IEventArgs | 59 | public class ChatFromViewerArgs : EventArgs, IEventArgs |
60 | { | 60 | { |
61 | protected string m_message; | 61 | protected string m_message; |
62 | protected ChatTypeEnum m_type; | 62 | protected ChatTypeEnum m_type; |
63 | protected int m_channel; | 63 | protected int m_channel; |
64 | protected LLVector3 m_position; | 64 | protected LLVector3 m_position; |
65 | protected string m_from; | 65 | protected string m_from; |
66 | 66 | ||
67 | protected IClientAPI m_sender; | 67 | protected IClientAPI m_sender; |
68 | protected IScene m_scene; | 68 | protected IScene m_scene; |
69 | 69 | ||
70 | /// <summary> | 70 | /// <summary> |
71 | /// The message sent by the user | 71 | /// The message sent by the user |
72 | /// </summary> | 72 | /// </summary> |
73 | public string Message | 73 | public string Message |
74 | { | 74 | { |
75 | get { return m_message; } | 75 | get { return m_message; } |
76 | set { m_message = value; } | 76 | set { m_message = value; } |
77 | } | 77 | } |
78 | 78 | ||
79 | /// <summary> | 79 | /// <summary> |
80 | /// The type of message, eg say, shout, broadcast. | 80 | /// The type of message, eg say, shout, broadcast. |
81 | /// </summary> | 81 | /// </summary> |
82 | public ChatTypeEnum Type | 82 | public ChatTypeEnum Type |
83 | { | 83 | { |
84 | get { return m_type; } | 84 | get { return m_type; } |
85 | set { m_type = value; } | 85 | set { m_type = value; } |
86 | } | 86 | } |
87 | 87 | ||
88 | /// <summary> | 88 | /// <summary> |
89 | /// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero. | 89 | /// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero. |
90 | /// </summary> | 90 | /// </summary> |
91 | public int Channel | 91 | public int Channel |
92 | { | 92 | { |
93 | get { return m_channel; } | 93 | get { return m_channel; } |
94 | set { m_channel = value; } | 94 | set { m_channel = value; } |
95 | } | 95 | } |
96 | 96 | ||
97 | /// <summary> | 97 | /// <summary> |
98 | /// The position of the sender at the time of the message broadcast. | 98 | /// The position of the sender at the time of the message broadcast. |
99 | /// </summary> | 99 | /// </summary> |
100 | public LLVector3 Position | 100 | public LLVector3 Position |
101 | { | 101 | { |
102 | get { return m_position; } | 102 | get { return m_position; } |
103 | set { m_position = value; } | 103 | set { m_position = value; } |
104 | } | 104 | } |
105 | 105 | ||
106 | /// <summary> | 106 | /// <summary> |
107 | /// The name of the sender (needed for scripts) | 107 | /// The name of the sender (needed for scripts) |
108 | /// </summary> | 108 | /// </summary> |
109 | public string From | 109 | public string From |
110 | { | 110 | { |
111 | get { return m_from; } | 111 | get { return m_from; } |
112 | set { m_from = value; } | 112 | set { m_from = value; } |
113 | } | 113 | } |
114 | 114 | ||
115 | /// <summary> | 115 | /// <summary> |
116 | /// The client responsible for sending the message, or null. | 116 | /// The client responsible for sending the message, or null. |
117 | /// </summary> | 117 | /// </summary> |
118 | public IClientAPI Sender | 118 | public IClientAPI Sender |
119 | { | 119 | { |
120 | get { return m_sender; } | 120 | get { return m_sender; } |
121 | set { m_sender = value; } | 121 | set { m_sender = value; } |
122 | } | 122 | } |
123 | 123 | ||
124 | public IScene Scene | 124 | public IScene Scene |
125 | { | 125 | { |
126 | get { return m_scene; } | 126 | get { return m_scene; } |
127 | set { m_scene = value; } | 127 | set { m_scene = value; } |
128 | } | 128 | } |
129 | 129 | ||
130 | public ChatFromViewerArgs() | 130 | public ChatFromViewerArgs() |
131 | { | 131 | { |
132 | m_position = new LLVector3(); | 132 | m_position = new LLVector3(); |
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
136 | public class TextureRequestArgs : EventArgs | 136 | public class TextureRequestArgs : EventArgs |
137 | { | 137 | { |
138 | protected LLUUID m_requestedAssetID; | 138 | protected LLUUID m_requestedAssetID; |
139 | private sbyte m_discardLevel; | 139 | private sbyte m_discardLevel; |
140 | private uint m_packetNumber; | 140 | private uint m_packetNumber; |
141 | 141 | ||
142 | public uint PacketNumber | 142 | public uint PacketNumber |
143 | { | 143 | { |
144 | get { return m_packetNumber; } | 144 | get { return m_packetNumber; } |
145 | set { m_packetNumber = value; } | 145 | set { m_packetNumber = value; } |
146 | } | 146 | } |
147 | 147 | ||
148 | public sbyte DiscardLevel | 148 | public sbyte DiscardLevel |
149 | { | 149 | { |
150 | get { return m_discardLevel; } | 150 | get { return m_discardLevel; } |
151 | set { m_discardLevel = value; } | 151 | set { m_discardLevel = value; } |
152 | } | 152 | } |
153 | 153 | ||
154 | public LLUUID RequestedAssetID | 154 | public LLUUID RequestedAssetID |
155 | { | 155 | { |
156 | get { return m_requestedAssetID; } | 156 | get { return m_requestedAssetID; } |
157 | set { m_requestedAssetID = value; } | 157 | set { m_requestedAssetID = value; } |
158 | } | 158 | } |
159 | } | 159 | } |
160 | 160 | ||
161 | public delegate void TextureRequest(Object sender, TextureRequestArgs e); | 161 | public delegate void TextureRequest(Object sender, TextureRequestArgs e); |
162 | 162 | ||
163 | public delegate void ImprovedInstantMessage( | 163 | public delegate void ImprovedInstantMessage( |
164 | LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, | 164 | LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, |
165 | string fromAgentName, string message, byte dialog); // Cut down from full list | 165 | string fromAgentName, string message, byte dialog); // Cut down from full list |
166 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos); | 166 | public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 pos); |
167 | 167 | ||
168 | public delegate void ModifyTerrain( | 168 | public delegate void ModifyTerrain( |
169 | float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient); | 169 | float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient); |
170 | 170 | ||
171 | public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); | 171 | public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); |
172 | 172 | ||
173 | public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq); | 173 | public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID, int seq); |
174 | 174 | ||
175 | public delegate void LinkObjects(uint parent, List<uint> children); | 175 | public delegate void LinkObjects(uint parent, List<uint> children); |
176 | 176 | ||
177 | public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); | 177 | public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); |
178 | 178 | ||
179 | public delegate void TeleportLocationRequest( | 179 | public delegate void TeleportLocationRequest( |
180 | IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags); | 180 | IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags); |
181 | 181 | ||
182 | public delegate void DisconnectUser(); | 182 | public delegate void DisconnectUser(); |
183 | 183 | ||
184 | public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID); | 184 | public delegate void RequestAvatarProperties(IClientAPI remoteClient, LLUUID avatarID); |
185 | 185 | ||
186 | public delegate void GenericCall(IClientAPI remoteClient); | 186 | public delegate void GenericCall(IClientAPI remoteClient); |
187 | 187 | ||
188 | public delegate void GenericCall2(); | 188 | public delegate void GenericCall2(); |
189 | 189 | ||
190 | public delegate void GenericCall3(Packet packet); | 190 | public delegate void GenericCall3(Packet packet); |
191 | 191 | ||
192 | // really don't want to be passing packets in these events, so this is very temporary. | 192 | // really don't want to be passing packets in these events, so this is very temporary. |
193 | public delegate void GenericCall4(Packet packet, IClientAPI remoteClient); | 193 | public delegate void GenericCall4(Packet packet, IClientAPI remoteClient); |
194 | 194 | ||
195 | public delegate void GenericCall5(IClientAPI remoteClient, bool status); | 195 | public delegate void GenericCall5(IClientAPI remoteClient, bool status); |
196 | 196 | ||
197 | public delegate void GenericCall6(LLUUID uid); | 197 | public delegate void GenericCall6(LLUUID uid); |
198 | 198 | ||
199 | public delegate void GenericCall7(uint localID, string message); | 199 | public delegate void GenericCall7(uint localID, string message); |
200 | 200 | ||
201 | public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock); | 201 | public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock); |
202 | 202 | ||
203 | public delegate void ObjectExtraParams(uint localID, ushort type, bool inUse, byte[] data); | 203 | public delegate void ObjectExtraParams(uint localID, ushort type, bool inUse, byte[] data); |
204 | 204 | ||
205 | public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); | 205 | public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); |
206 | 206 | ||
207 | public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); | 207 | public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); |
208 | 208 | ||
209 | public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient); | 209 | public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient); |
210 | 210 | ||
211 | public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient); | 211 | public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient); |
212 | 212 | ||
213 | public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient); | 213 | public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient); |
214 | 214 | ||
215 | public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); | 215 | public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); |
216 | 216 | ||
217 | public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); | 217 | public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); |
218 | 218 | ||
219 | public delegate void UpdatePrimGroupRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient); | 219 | public delegate void UpdatePrimGroupRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient); |
220 | 220 | ||
221 | public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags); | 221 | public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags); |
222 | 222 | ||
223 | public delegate void StatusChange(bool status); | 223 | public delegate void StatusChange(bool status); |
224 | 224 | ||
225 | public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); | 225 | public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); |
226 | 226 | ||
227 | public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation); | 227 | public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation); |
228 | 228 | ||
229 | public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset); | 229 | public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset); |
230 | 230 | ||
231 | public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID); | 231 | public delegate void AgentSit(IClientAPI remoteClient, LLUUID agentID); |
232 | 232 | ||
233 | public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient); | 233 | public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient); |
234 | 234 | ||
235 | public delegate void ParcelPropertiesRequest( | 235 | public delegate void ParcelPropertiesRequest( |
236 | int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client); | 236 | int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client); |
237 | 237 | ||
238 | public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client); | 238 | public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client); |
239 | 239 | ||
240 | public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client); | 240 | public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client); |
241 | 241 | ||
242 | public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); | 242 | public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); |
243 | 243 | ||
244 | public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client); | 244 | public delegate void ParcelSelectObjects(int land_local_id, int request_type, IClientAPI remote_client); |
245 | 245 | ||
246 | public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); | 246 | public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); |
247 | 247 | ||
248 | public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); | 248 | public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); |
249 | 249 | ||
250 | public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); | 250 | public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); |
251 | 251 | ||
252 | public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape); | 252 | public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape); |
253 | 253 | ||
254 | public delegate void CreateInventoryFolder( | 254 | public delegate void CreateInventoryFolder( |
255 | IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID); | 255 | IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID); |
256 | 256 | ||
257 | public delegate void CreateNewInventoryItem( | 257 | public delegate void CreateNewInventoryItem( |
258 | IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, | 258 | IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, |
259 | sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask); | 259 | sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask); |
260 | 260 | ||
261 | public delegate void FetchInventoryDescendents( | 261 | public delegate void FetchInventoryDescendents( |
262 | IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); | 262 | IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); |
263 | 263 | ||
264 | public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID); | 264 | public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID); |
265 | 265 | ||
266 | public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID); | 266 | public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID); |
267 | 267 | ||
268 | public delegate void UpdateInventoryItemTransaction( | 268 | public delegate void UpdateInventoryItemTransaction( |
269 | IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID); | 269 | IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID); |
270 | 270 | ||
271 | public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID); | 271 | public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID); |
272 | 272 | ||
273 | public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID); | 273 | public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID); |
274 | 274 | ||
275 | public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID); | 275 | public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID); |
276 | 276 | ||
277 | public delegate void UDPAssetUploadRequest( | 277 | public delegate void UDPAssetUploadRequest( |
278 | IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal); | 278 | IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal); |
279 | 279 | ||
280 | public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); | 280 | public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); |
281 | 281 | ||
282 | public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName); | 282 | public delegate void RequestXfer(IClientAPI remoteClient, ulong xferID, string fileName); |
283 | 283 | ||
284 | public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID); | 284 | public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID); |
285 | 285 | ||
286 | public interface IClientAPI | 286 | public interface IClientAPI |
287 | { | 287 | { |
288 | event ImprovedInstantMessage OnInstantMessage; | 288 | event ImprovedInstantMessage OnInstantMessage; |
289 | event ChatFromViewer OnChatFromViewer; | 289 | event ChatFromViewer OnChatFromViewer; |
290 | event TextureRequest OnRequestTexture; | 290 | event TextureRequest OnRequestTexture; |
291 | event RezObject OnRezObject; | 291 | event RezObject OnRezObject; |
292 | event ModifyTerrain OnModifyTerrain; | 292 | event ModifyTerrain OnModifyTerrain; |
293 | event SetAppearance OnSetAppearance; | 293 | event SetAppearance OnSetAppearance; |
294 | event StartAnim OnStartAnim; | 294 | event StartAnim OnStartAnim; |
295 | event LinkObjects OnLinkObjects; | 295 | event LinkObjects OnLinkObjects; |
296 | event RequestMapBlocks OnRequestMapBlocks; | 296 | event RequestMapBlocks OnRequestMapBlocks; |
297 | event TeleportLocationRequest OnTeleportLocationRequest; | 297 | event TeleportLocationRequest OnTeleportLocationRequest; |
298 | event DisconnectUser OnDisconnectUser; | 298 | event DisconnectUser OnDisconnectUser; |
299 | event RequestAvatarProperties OnRequestAvatarProperties; | 299 | event RequestAvatarProperties OnRequestAvatarProperties; |
300 | 300 | ||
301 | event GenericCall4 OnDeRezObject; | 301 | event GenericCall4 OnDeRezObject; |
302 | event GenericCall OnRegionHandShakeReply; | 302 | event GenericCall OnRegionHandShakeReply; |
303 | event GenericCall OnRequestWearables; | 303 | event GenericCall OnRequestWearables; |
304 | event GenericCall2 OnCompleteMovementToRegion; | 304 | event GenericCall2 OnCompleteMovementToRegion; |
305 | event UpdateAgent OnAgentUpdate; | 305 | event UpdateAgent OnAgentUpdate; |
306 | event AgentRequestSit OnAgentRequestSit; | 306 | event AgentRequestSit OnAgentRequestSit; |
307 | event AgentSit OnAgentSit; | 307 | event AgentSit OnAgentSit; |
308 | event GenericCall OnRequestAvatarsData; | 308 | event GenericCall OnRequestAvatarsData; |
309 | event AddNewPrim OnAddPrim; | 309 | event AddNewPrim OnAddPrim; |
310 | event ObjectDuplicate OnObjectDuplicate; | 310 | event ObjectDuplicate OnObjectDuplicate; |
311 | event UpdateVector OnGrabObject; | 311 | event UpdateVector OnGrabObject; |
312 | event ObjectSelect OnDeGrabObject; | 312 | event ObjectSelect OnDeGrabObject; |
313 | event MoveObject OnGrabUpdate; | 313 | event MoveObject OnGrabUpdate; |
314 | 314 | ||
315 | event UpdateShape OnUpdatePrimShape; | 315 | event UpdateShape OnUpdatePrimShape; |
316 | event ObjectExtraParams OnUpdateExtraParams; | 316 | event ObjectExtraParams OnUpdateExtraParams; |
317 | event ObjectSelect OnObjectSelect; | 317 | event ObjectSelect OnObjectSelect; |
318 | event ObjectDeselect OnObjectDeselect; | 318 | event ObjectDeselect OnObjectDeselect; |
319 | event GenericCall7 OnObjectDescription; | 319 | event GenericCall7 OnObjectDescription; |
320 | event GenericCall7 OnObjectName; | 320 | event GenericCall7 OnObjectName; |
321 | event UpdatePrimFlags OnUpdatePrimFlags; | 321 | event UpdatePrimFlags OnUpdatePrimFlags; |
322 | event UpdatePrimTexture OnUpdatePrimTexture; | 322 | event UpdatePrimTexture OnUpdatePrimTexture; |
323 | event UpdateVector OnUpdatePrimGroupPosition; | 323 | event UpdateVector OnUpdatePrimGroupPosition; |
324 | event UpdateVector OnUpdatePrimSinglePosition; | 324 | event UpdateVector OnUpdatePrimSinglePosition; |
325 | event UpdatePrimRotation OnUpdatePrimGroupRotation; | 325 | event UpdatePrimRotation OnUpdatePrimGroupRotation; |
326 | event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; | 326 | event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; |
327 | event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; | 327 | event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; |
328 | event UpdateVector OnUpdatePrimScale; | 328 | event UpdateVector OnUpdatePrimScale; |
329 | event StatusChange OnChildAgentStatus; | 329 | event StatusChange OnChildAgentStatus; |
330 | event GenericCall2 OnStopMovement; | 330 | event GenericCall2 OnStopMovement; |
331 | event GenericCall6 OnRemoveAvatar; | 331 | event GenericCall6 OnRemoveAvatar; |
332 | 332 | ||
333 | event CreateNewInventoryItem OnCreateNewInventoryItem; | 333 | event CreateNewInventoryItem OnCreateNewInventoryItem; |
334 | event CreateInventoryFolder OnCreateNewInventoryFolder; | 334 | event CreateInventoryFolder OnCreateNewInventoryFolder; |
335 | event FetchInventoryDescendents OnFetchInventoryDescendents; | 335 | event FetchInventoryDescendents OnFetchInventoryDescendents; |
336 | event FetchInventory OnFetchInventory; | 336 | event FetchInventory OnFetchInventory; |
337 | event RequestTaskInventory OnRequestTaskInventory; | 337 | event RequestTaskInventory OnRequestTaskInventory; |
338 | event UpdateInventoryItemTransaction OnUpdateInventoryItem; | 338 | event UpdateInventoryItemTransaction OnUpdateInventoryItem; |
339 | event UDPAssetUploadRequest OnAssetUploadRequest; | 339 | event UDPAssetUploadRequest OnAssetUploadRequest; |
340 | event XferReceive OnXferReceive; | 340 | event XferReceive OnXferReceive; |
341 | event RequestXfer OnRequestXfer; | 341 | event RequestXfer OnRequestXfer; |
342 | event ConfirmXfer OnConfirmXfer; | 342 | event ConfirmXfer OnConfirmXfer; |
343 | event RezScript OnRezScript; | 343 | event RezScript OnRezScript; |
344 | event UpdateTaskInventory OnUpdateTaskInventory; | 344 | event UpdateTaskInventory OnUpdateTaskInventory; |
345 | event RemoveTaskInventory OnRemoveTaskItem; | 345 | event RemoveTaskInventory OnRemoveTaskItem; |
346 | 346 | ||
347 | event UUIDNameRequest OnNameFromUUIDRequest; | 347 | event UUIDNameRequest OnNameFromUUIDRequest; |
348 | 348 | ||
349 | event ParcelPropertiesRequest OnParcelPropertiesRequest; | 349 | event ParcelPropertiesRequest OnParcelPropertiesRequest; |
350 | event ParcelDivideRequest OnParcelDivideRequest; | 350 | event ParcelDivideRequest OnParcelDivideRequest; |
351 | event ParcelJoinRequest OnParcelJoinRequest; | 351 | event ParcelJoinRequest OnParcelJoinRequest; |
352 | event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; | 352 | event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; |
353 | event ParcelSelectObjects OnParcelSelectObjects; | 353 | event ParcelSelectObjects OnParcelSelectObjects; |
354 | event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; | 354 | event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; |
355 | event EstateOwnerMessageRequest OnEstateOwnerMessage; | 355 | event EstateOwnerMessageRequest OnEstateOwnerMessage; |
356 | 356 | ||
357 | LLVector3 StartPos { get; set; } | 357 | LLVector3 StartPos { get; set; } |
358 | 358 | ||
359 | LLUUID AgentId { get; } | 359 | LLUUID AgentId { get; } |
360 | 360 | ||
361 | LLUUID SessionId { get; } | 361 | LLUUID SessionId { get; } |
362 | 362 | ||
363 | string FirstName { get; } | 363 | string FirstName { get; } |
364 | 364 | ||
365 | string LastName { get; } | 365 | string LastName { get; } |
366 | 366 | ||
367 | uint CircuitCode { get; set; } | 367 | uint CircuitCode { get; set; } |
368 | 368 | ||
369 | void OutPacket(Packet newPack); | 369 | void OutPacket(Packet newPack); |
370 | void SendWearables(AvatarWearable[] wearables); | 370 | void SendWearables(AvatarWearable[] wearables); |
371 | void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry); | 371 | void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry); |
372 | void SendStartPingCheck(byte seq); | 372 | void SendStartPingCheck(byte seq); |
373 | void SendKillObject(ulong regionHandle, uint localID); | 373 | void SendKillObject(ulong regionHandle, uint localID); |
374 | void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId); | 374 | void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId); |
375 | void SendRegionHandshake(RegionInfo regionInfo); | 375 | void SendRegionHandshake(RegionInfo regionInfo); |
376 | void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); | 376 | void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); |
377 | void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); | 377 | void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); |
378 | 378 | ||
379 | void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, | 379 | void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, |
380 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp); | 380 | LLUUID imSessionID, string fromName, byte dialog, uint timeStamp); |
381 | 381 | ||
382 | void SendLayerData(float[] map); | 382 | void SendLayerData(float[] map); |
383 | void SendLayerData(int px, int py, float[] map); | 383 | void SendLayerData(int px, int py, float[] map); |
384 | void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); | 384 | void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); |
385 | void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint); | 385 | void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint); |
386 | AgentCircuitData RequestClientInfo(); | 386 | AgentCircuitData RequestClientInfo(); |
387 | 387 | ||
388 | void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, | 388 | void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint, |
389 | string capsURL); | 389 | string capsURL); |
390 | 390 | ||
391 | void SendMapBlock(List<MapBlockData> mapBlocks); | 391 | void SendMapBlock(List<MapBlockData> mapBlocks); |
392 | void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags); | 392 | void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags); |
393 | 393 | ||
394 | void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, | 394 | void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, |
395 | uint flags, string capsURL); | 395 | uint flags, string capsURL); |
396 | 396 | ||
397 | void SendTeleportCancel(); | 397 | void SendTeleportCancel(); |
398 | void SendTeleportLocationStart(); | 398 | void SendTeleportLocationStart(); |
399 | void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance); | 399 | void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance); |
400 | 400 | ||
401 | void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, | 401 | void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, |
402 | LLVector3 Pos, byte[] textureEntry, uint parentID); | 402 | LLVector3 Pos, byte[] textureEntry, uint parentID); |
403 | 403 | ||
404 | void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 404 | void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, |
405 | LLVector3 velocity, LLQuaternion rotation); | 405 | LLVector3 velocity, LLQuaternion rotation); |
406 | 406 | ||
407 | void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations); | 407 | void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations); |
408 | 408 | ||
409 | void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); | 409 | void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); |
410 | 410 | ||
411 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 411 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, |
412 | LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, | 412 | LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, |
413 | uint parentID, byte[] particleSystem, LLQuaternion rotation); | 413 | uint parentID, byte[] particleSystem, LLQuaternion rotation); |
414 | 414 | ||
415 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 415 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, |
416 | LLQuaternion rotation); | 416 | LLQuaternion rotation); |
417 | 417 | ||
418 | void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items); | 418 | void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items); |
419 | void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); | 419 | void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); |
420 | void SendInventoryItemUpdate(InventoryItemBase Item); | 420 | void SendInventoryItemUpdate(InventoryItemBase Item); |
421 | void SendRemoveInventoryItem(LLUUID itemID); | 421 | void SendRemoveInventoryItem(LLUUID itemID); |
422 | void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); | 422 | void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); |
423 | void SendXferPacket(ulong xferID, uint packet, byte[] data); | 423 | void SendXferPacket(ulong xferID, uint packet, byte[] data); |
424 | 424 | ||
425 | void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID); | 425 | void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID); |
426 | void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags); | 426 | void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, byte flags); |
427 | 427 | ||
428 | void SendNameReply(LLUUID profileId, string firstname, string lastname); | 428 | void SendNameReply(LLUUID profileId, string firstname, string lastname); |
429 | void SendAlertMessage(string message); | 429 | void SendAlertMessage(string message); |
430 | void SendAgentAlertMessage(string message, bool modal); | 430 | void SendAgentAlertMessage(string message, bool modal); |
431 | void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url); | 431 | void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url); |
432 | bool AddMoney(int debit); | 432 | bool AddMoney(int debit); |
433 | 433 | ||
434 | void SendViewerTime(int phase); | 434 | void SendViewerTime(int phase); |
435 | 435 | ||
436 | void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, | 436 | void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, |
437 | uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID); | 437 | uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID); |
438 | 438 | ||
439 | void SetDebug(int newDebug); | 439 | void SetDebug(int newDebug); |
440 | void InPacket(Packet NewPack); | 440 | void InPacket(Packet NewPack); |
441 | void Close(); | 441 | void Close(); |
442 | event ViewerEffectEventHandler OnViewerEffect; | 442 | event ViewerEffectEventHandler OnViewerEffect; |
443 | event Action<IClientAPI> OnLogout; | 443 | event Action<IClientAPI> OnLogout; |
444 | event Action<IClientAPI> OnConnectionClosed; | 444 | event Action<IClientAPI> OnConnectionClosed; |
445 | void SendLogoutPacket(); | 445 | void SendLogoutPacket(); |
446 | } | 446 | } |
447 | } \ No newline at end of file | 447 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/IGenericConfig.cs b/OpenSim/Framework/General/IGenericConfig.cs index 0c9ee1e..889d178 100644 --- a/OpenSim/Framework/General/IGenericConfig.cs +++ b/OpenSim/Framework/General/IGenericConfig.cs | |||
@@ -1,40 +1,40 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | namespace OpenSim.Framework | 28 | namespace OpenSim.Framework |
29 | { | 29 | { |
30 | public interface IGenericConfig | 30 | public interface IGenericConfig |
31 | { | 31 | { |
32 | void SetFileName(string fileName); | 32 | void SetFileName(string fileName); |
33 | void LoadData(); | 33 | void LoadData(); |
34 | void LoadDataFromString(string data); | 34 | void LoadDataFromString(string data); |
35 | string GetAttribute(string attributeName); | 35 | string GetAttribute(string attributeName); |
36 | bool SetAttribute(string attributeName, string attributeValue); | 36 | bool SetAttribute(string attributeName, string attributeValue); |
37 | void Commit(); | 37 | void Commit(); |
38 | void Close(); | 38 | void Close(); |
39 | } | 39 | } |
40 | } \ No newline at end of file | 40 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/IPlugin.cs b/OpenSim/Framework/General/IPlugin.cs index cc835da..e649274 100644 --- a/OpenSim/Framework/General/IPlugin.cs +++ b/OpenSim/Framework/General/IPlugin.cs | |||
@@ -1,53 +1,53 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | namespace OpenSim.Framework | 29 | namespace OpenSim.Framework |
30 | { | 30 | { |
31 | /// <summary> | 31 | /// <summary> |
32 | /// This interface, describes a generic plugin | 32 | /// This interface, describes a generic plugin |
33 | /// </summary> | 33 | /// </summary> |
34 | public interface IPlugin | 34 | public interface IPlugin |
35 | { | 35 | { |
36 | /// <summary> | 36 | /// <summary> |
37 | /// Returns the plugin version | 37 | /// Returns the plugin version |
38 | /// </summary> | 38 | /// </summary> |
39 | /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns> | 39 | /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns> |
40 | string Version { get; } | 40 | string Version { get; } |
41 | 41 | ||
42 | /// <summary> | 42 | /// <summary> |
43 | /// Returns the plugin name | 43 | /// Returns the plugin name |
44 | /// </summary> | 44 | /// </summary> |
45 | /// <returns>Plugin name, eg MySQL User Provider</returns> | 45 | /// <returns>Plugin name, eg MySQL User Provider</returns> |
46 | string Name { get; } | 46 | string Name { get; } |
47 | 47 | ||
48 | /// <summary> | 48 | /// <summary> |
49 | /// Initialises the plugin (artificial constructor) | 49 | /// Initialises the plugin (artificial constructor) |
50 | /// </summary> | 50 | /// </summary> |
51 | void Initialise(); | 51 | void Initialise(); |
52 | } | 52 | } |
53 | } \ No newline at end of file | 53 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/IScene.cs b/OpenSim/Framework/General/IScene.cs index cf5ee93..3d6ca1c 100644 --- a/OpenSim/Framework/General/IScene.cs +++ b/OpenSim/Framework/General/IScene.cs | |||
@@ -1,43 +1,43 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework | 30 | namespace OpenSim.Framework |
31 | { | 31 | { |
32 | public interface IScene | 32 | public interface IScene |
33 | { | 33 | { |
34 | void AddNewClient(IClientAPI client, bool child); | 34 | void AddNewClient(IClientAPI client, bool child); |
35 | void RemoveClient(LLUUID agentID); | 35 | void RemoveClient(LLUUID agentID); |
36 | 36 | ||
37 | RegionInfo RegionInfo { get; } | 37 | RegionInfo RegionInfo { get; } |
38 | object SyncRoot { get; } | 38 | object SyncRoot { get; } |
39 | uint NextLocalId { get; } | 39 | uint NextLocalId { get; } |
40 | 40 | ||
41 | ClientManager ClientManager { get; } | 41 | ClientManager ClientManager { get; } |
42 | } | 42 | } |
43 | } \ No newline at end of file | 43 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/IUserData.cs b/OpenSim/Framework/General/IUserData.cs index b955ef1..cb2502a 100644 --- a/OpenSim/Framework/General/IUserData.cs +++ b/OpenSim/Framework/General/IUserData.cs | |||
@@ -1,134 +1,134 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework | 30 | namespace OpenSim.Framework |
31 | { | 31 | { |
32 | /// <summary> | 32 | /// <summary> |
33 | /// An interface for connecting to user storage servers. | 33 | /// An interface for connecting to user storage servers. |
34 | /// </summary> | 34 | /// </summary> |
35 | public interface IUserData | 35 | public interface IUserData |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Returns a user profile from a database via their UUID | 38 | /// Returns a user profile from a database via their UUID |
39 | /// </summary> | 39 | /// </summary> |
40 | /// <param name="user">The accounts UUID</param> | 40 | /// <param name="user">The accounts UUID</param> |
41 | /// <returns>The user data profile</returns> | 41 | /// <returns>The user data profile</returns> |
42 | UserProfileData GetUserByUUID(LLUUID user); | 42 | UserProfileData GetUserByUUID(LLUUID user); |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
45 | /// Returns a users profile by searching their username | 45 | /// Returns a users profile by searching their username |
46 | /// </summary> | 46 | /// </summary> |
47 | /// <param name="name">The users username</param> | 47 | /// <param name="name">The users username</param> |
48 | /// <returns>The user data profile</returns> | 48 | /// <returns>The user data profile</returns> |
49 | UserProfileData GetUserByName(string name); | 49 | UserProfileData GetUserByName(string name); |
50 | 50 | ||
51 | /// <summary> | 51 | /// <summary> |
52 | /// Returns a users profile by searching their username parts | 52 | /// Returns a users profile by searching their username parts |
53 | /// </summary> | 53 | /// </summary> |
54 | /// <param name="fname">Account firstname</param> | 54 | /// <param name="fname">Account firstname</param> |
55 | /// <param name="lname">Account lastname</param> | 55 | /// <param name="lname">Account lastname</param> |
56 | /// <returns>The user data profile</returns> | 56 | /// <returns>The user data profile</returns> |
57 | UserProfileData GetUserByName(string fname, string lname); | 57 | UserProfileData GetUserByName(string fname, string lname); |
58 | 58 | ||
59 | /// <summary> | 59 | /// <summary> |
60 | /// Returns the current agent for a user searching by it's UUID | 60 | /// Returns the current agent for a user searching by it's UUID |
61 | /// </summary> | 61 | /// </summary> |
62 | /// <param name="user">The users UUID</param> | 62 | /// <param name="user">The users UUID</param> |
63 | /// <returns>The current agent session</returns> | 63 | /// <returns>The current agent session</returns> |
64 | UserAgentData GetAgentByUUID(LLUUID user); | 64 | UserAgentData GetAgentByUUID(LLUUID user); |
65 | 65 | ||
66 | /// <summary> | 66 | /// <summary> |
67 | /// Returns the current session agent for a user searching by username | 67 | /// Returns the current session agent for a user searching by username |
68 | /// </summary> | 68 | /// </summary> |
69 | /// <param name="name">The users account name</param> | 69 | /// <param name="name">The users account name</param> |
70 | /// <returns>The current agent session</returns> | 70 | /// <returns>The current agent session</returns> |
71 | UserAgentData GetAgentByName(string name); | 71 | UserAgentData GetAgentByName(string name); |
72 | 72 | ||
73 | /// <summary> | 73 | /// <summary> |
74 | /// Returns the current session agent for a user searching by username parts | 74 | /// Returns the current session agent for a user searching by username parts |
75 | /// </summary> | 75 | /// </summary> |
76 | /// <param name="fname">The users first account name</param> | 76 | /// <param name="fname">The users first account name</param> |
77 | /// <param name="lname">The users account surname</param> | 77 | /// <param name="lname">The users account surname</param> |
78 | /// <returns>The current agent session</returns> | 78 | /// <returns>The current agent session</returns> |
79 | UserAgentData GetAgentByName(string fname, string lname); | 79 | UserAgentData GetAgentByName(string fname, string lname); |
80 | 80 | ||
81 | /// <summary> | 81 | /// <summary> |
82 | /// Adds a new User profile to the database | 82 | /// Adds a new User profile to the database |
83 | /// </summary> | 83 | /// </summary> |
84 | /// <param name="user">UserProfile to add</param> | 84 | /// <param name="user">UserProfile to add</param> |
85 | void AddNewUserProfile(UserProfileData user); | 85 | void AddNewUserProfile(UserProfileData user); |
86 | 86 | ||
87 | /// <summary> | 87 | /// <summary> |
88 | /// Updates an existing user profile | 88 | /// Updates an existing user profile |
89 | /// </summary> | 89 | /// </summary> |
90 | /// <param name="user">UserProfile to update</param> | 90 | /// <param name="user">UserProfile to update</param> |
91 | bool UpdateUserProfile(UserProfileData user); | 91 | bool UpdateUserProfile(UserProfileData user); |
92 | 92 | ||
93 | /// <summary> | 93 | /// <summary> |
94 | /// Adds a new agent to the database | 94 | /// Adds a new agent to the database |
95 | /// </summary> | 95 | /// </summary> |
96 | /// <param name="agent">The agent to add</param> | 96 | /// <param name="agent">The agent to add</param> |
97 | void AddNewUserAgent(UserAgentData agent); | 97 | void AddNewUserAgent(UserAgentData agent); |
98 | 98 | ||
99 | /// <summary> | 99 | /// <summary> |
100 | /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES) | 100 | /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES) |
101 | /// </summary> | 101 | /// </summary> |
102 | /// <param name="from">The account to transfer from</param> | 102 | /// <param name="from">The account to transfer from</param> |
103 | /// <param name="to">The account to transfer to</param> | 103 | /// <param name="to">The account to transfer to</param> |
104 | /// <param name="amount">The amount to transfer</param> | 104 | /// <param name="amount">The amount to transfer</param> |
105 | /// <returns>Successful?</returns> | 105 | /// <returns>Successful?</returns> |
106 | bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount); | 106 | bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount); |
107 | 107 | ||
108 | /// <summary> | 108 | /// <summary> |
109 | /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account. | 109 | /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account. |
110 | /// </summary> | 110 | /// </summary> |
111 | /// <param name="from">User to transfer from</param> | 111 | /// <param name="from">User to transfer from</param> |
112 | /// <param name="to">User to transfer to</param> | 112 | /// <param name="to">User to transfer to</param> |
113 | /// <param name="inventory">Specified inventory item</param> | 113 | /// <param name="inventory">Specified inventory item</param> |
114 | /// <returns>Successful?</returns> | 114 | /// <returns>Successful?</returns> |
115 | bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); | 115 | bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); |
116 | 116 | ||
117 | /// <summary> | 117 | /// <summary> |
118 | /// Returns the plugin version | 118 | /// Returns the plugin version |
119 | /// </summary> | 119 | /// </summary> |
120 | /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns> | 120 | /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns> |
121 | string GetVersion(); | 121 | string GetVersion(); |
122 | 122 | ||
123 | /// <summary> | 123 | /// <summary> |
124 | /// Returns the plugin name | 124 | /// Returns the plugin name |
125 | /// </summary> | 125 | /// </summary> |
126 | /// <returns>Plugin name, eg MySQL User Provider</returns> | 126 | /// <returns>Plugin name, eg MySQL User Provider</returns> |
127 | string getName(); | 127 | string getName(); |
128 | 128 | ||
129 | /// <summary> | 129 | /// <summary> |
130 | /// Initialises the plugin (artificial constructor) | 130 | /// Initialises the plugin (artificial constructor) |
131 | /// </summary> | 131 | /// </summary> |
132 | void Initialise(); | 132 | void Initialise(); |
133 | } | 133 | } |
134 | } \ No newline at end of file | 134 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/IUserService.cs b/OpenSim/Framework/General/IUserService.cs index bf1c7e8..ed9032b 100644 --- a/OpenSim/Framework/General/IUserService.cs +++ b/OpenSim/Framework/General/IUserService.cs | |||
@@ -1,48 +1,48 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework.Interfaces | 30 | namespace OpenSim.Framework.Interfaces |
31 | { | 31 | { |
32 | public interface IUserService | 32 | public interface IUserService |
33 | { | 33 | { |
34 | UserProfileData GetUserProfile(string firstName, string lastName); | 34 | UserProfileData GetUserProfile(string firstName, string lastName); |
35 | UserProfileData GetUserProfile(string name); | 35 | UserProfileData GetUserProfile(string name); |
36 | UserProfileData GetUserProfile(LLUUID userId); | 36 | UserProfileData GetUserProfile(LLUUID userId); |
37 | void clearUserAgent(LLUUID avatarID); | 37 | void clearUserAgent(LLUUID avatarID); |
38 | 38 | ||
39 | UserProfileData SetupMasterUser(string firstName, string lastName); | 39 | UserProfileData SetupMasterUser(string firstName, string lastName); |
40 | UserProfileData SetupMasterUser(string firstName, string lastName, string password); | 40 | UserProfileData SetupMasterUser(string firstName, string lastName, string password); |
41 | 41 | ||
42 | /// <summary> | 42 | /// <summary> |
43 | /// | 43 | /// |
44 | /// </summary> | 44 | /// </summary> |
45 | /// <param name="user"></param> | 45 | /// <param name="user"></param> |
46 | void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); | 46 | void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); |
47 | } | 47 | } |
48 | } \ No newline at end of file | 48 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/InventoryConfig.cs b/OpenSim/Framework/General/InventoryConfig.cs index 9ba3e07..8e64b68 100644 --- a/OpenSim/Framework/General/InventoryConfig.cs +++ b/OpenSim/Framework/General/InventoryConfig.cs | |||
@@ -1,67 +1,67 @@ | |||
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 | 4 | ||
5 | namespace OpenSim.Framework | 5 | namespace OpenSim.Framework |
6 | { | 6 | { |
7 | /// <summary> | 7 | /// <summary> |
8 | /// UserConfig -- For User Server Configuration | 8 | /// UserConfig -- For User Server Configuration |
9 | /// </summary> | 9 | /// </summary> |
10 | public class InventoryConfig | 10 | public class InventoryConfig |
11 | { | 11 | { |
12 | public string DefaultStartupMsg = ""; | 12 | public string DefaultStartupMsg = ""; |
13 | public string UserServerURL = ""; | 13 | public string UserServerURL = ""; |
14 | public string UserSendKey = ""; | 14 | public string UserSendKey = ""; |
15 | public string UserRecvKey = ""; | 15 | public string UserRecvKey = ""; |
16 | 16 | ||
17 | public string DatabaseProvider = ""; | 17 | public string DatabaseProvider = ""; |
18 | public static uint DefaultHttpPort = 8004; | 18 | public static uint DefaultHttpPort = 8004; |
19 | 19 | ||
20 | public int HttpPort = 8004; | 20 | public int HttpPort = 8004; |
21 | 21 | ||
22 | private ConfigurationMember configMember; | 22 | private ConfigurationMember configMember; |
23 | 23 | ||
24 | public InventoryConfig(string description, string filename) | 24 | public InventoryConfig(string description, string filename) |
25 | { | 25 | { |
26 | configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); | 26 | configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); |
27 | configMember.performConfigurationRetrieve(); | 27 | configMember.performConfigurationRetrieve(); |
28 | } | 28 | } |
29 | 29 | ||
30 | public void loadConfigurationOptions() | 30 | public void loadConfigurationOptions() |
31 | { | 31 | { |
32 | configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); | 32 | configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); |
33 | configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString(), false); | 33 | configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString(), false); |
34 | configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false); | 34 | configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false); |
35 | configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false); | 35 | configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false); |
36 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); | 36 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); |
37 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Http Listener port", DefaultHttpPort.ToString(), false); | 37 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Http Listener port", DefaultHttpPort.ToString(), false); |
38 | } | 38 | } |
39 | 39 | ||
40 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 40 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
41 | { | 41 | { |
42 | switch (configuration_key) | 42 | switch (configuration_key) |
43 | { | 43 | { |
44 | case "default_startup_message": | 44 | case "default_startup_message": |
45 | this.DefaultStartupMsg = (string)configuration_result; | 45 | this.DefaultStartupMsg = (string)configuration_result; |
46 | break; | 46 | break; |
47 | case "default_user_server": | 47 | case "default_user_server": |
48 | this.UserServerURL = (string)configuration_result; | 48 | this.UserServerURL = (string)configuration_result; |
49 | break; | 49 | break; |
50 | case "user_send_key": | 50 | case "user_send_key": |
51 | this.UserSendKey = (string)configuration_result; | 51 | this.UserSendKey = (string)configuration_result; |
52 | break; | 52 | break; |
53 | case "user_recv_key": | 53 | case "user_recv_key": |
54 | this.UserRecvKey = (string)configuration_result; | 54 | this.UserRecvKey = (string)configuration_result; |
55 | break; | 55 | break; |
56 | case "database_provider": | 56 | case "database_provider": |
57 | this.DatabaseProvider = (string)configuration_result; | 57 | this.DatabaseProvider = (string)configuration_result; |
58 | break; | 58 | break; |
59 | case "http_port": | 59 | case "http_port": |
60 | HttpPort = (int)configuration_result; | 60 | HttpPort = (int)configuration_result; |
61 | break; | 61 | break; |
62 | } | 62 | } |
63 | 63 | ||
64 | return true; | 64 | return true; |
65 | } | 65 | } |
66 | } | 66 | } |
67 | } | 67 | } |
diff --git a/OpenSim/Framework/General/InventoryItemBase.cs b/OpenSim/Framework/General/InventoryItemBase.cs index f782913..331013f 100644 --- a/OpenSim/Framework/General/InventoryItemBase.cs +++ b/OpenSim/Framework/General/InventoryItemBase.cs | |||
@@ -1,273 +1,273 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Xml.Serialization; | 29 | using System.Xml.Serialization; |
30 | using System.Collections; | 30 | using System.Collections; |
31 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | 33 | ||
34 | namespace OpenSim.Framework | 34 | namespace OpenSim.Framework |
35 | { | 35 | { |
36 | /// <summary> | 36 | /// <summary> |
37 | /// Inventory Item - contains all the properties associated with an individual inventory piece. | 37 | /// Inventory Item - contains all the properties associated with an individual inventory piece. |
38 | /// </summary> | 38 | /// </summary> |
39 | public class InventoryItemBase | 39 | public class InventoryItemBase |
40 | { | 40 | { |
41 | /// <summary> | 41 | /// <summary> |
42 | /// A UUID containing the ID for the inventory item itself | 42 | /// A UUID containing the ID for the inventory item itself |
43 | /// </summary> | 43 | /// </summary> |
44 | public LLUUID inventoryID; | 44 | public LLUUID inventoryID; |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
47 | /// The UUID of the associated asset on the asset server | 47 | /// The UUID of the associated asset on the asset server |
48 | /// </summary> | 48 | /// </summary> |
49 | public LLUUID assetID; | 49 | public LLUUID assetID; |
50 | 50 | ||
51 | /// <summary> | 51 | /// <summary> |
52 | /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) | 52 | /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) |
53 | /// </summary> | 53 | /// </summary> |
54 | public int assetType; | 54 | public int assetType; |
55 | 55 | ||
56 | /// <summary> | 56 | /// <summary> |
57 | /// The type of inventory item. (Can be slightly different to the asset type | 57 | /// The type of inventory item. (Can be slightly different to the asset type |
58 | /// </summary> | 58 | /// </summary> |
59 | public int invType; | 59 | public int invType; |
60 | 60 | ||
61 | /// <summary> | 61 | /// <summary> |
62 | /// The folder this item is contained in | 62 | /// The folder this item is contained in |
63 | /// </summary> | 63 | /// </summary> |
64 | public LLUUID parentFolderID; | 64 | public LLUUID parentFolderID; |
65 | 65 | ||
66 | /// <summary> | 66 | /// <summary> |
67 | /// The owner of this inventory item | 67 | /// The owner of this inventory item |
68 | /// </summary> | 68 | /// </summary> |
69 | public LLUUID avatarID; | 69 | public LLUUID avatarID; |
70 | 70 | ||
71 | /// <summary> | 71 | /// <summary> |
72 | /// The creator of this item | 72 | /// The creator of this item |
73 | /// </summary> | 73 | /// </summary> |
74 | public LLUUID creatorsID; | 74 | public LLUUID creatorsID; |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// The name of the inventory item (must be less than 64 characters) | 77 | /// The name of the inventory item (must be less than 64 characters) |
78 | /// </summary> | 78 | /// </summary> |
79 | public string inventoryName; | 79 | public string inventoryName; |
80 | 80 | ||
81 | /// <summary> | 81 | /// <summary> |
82 | /// The description of the inventory item (must be less than 64 characters) | 82 | /// The description of the inventory item (must be less than 64 characters) |
83 | /// </summary> | 83 | /// </summary> |
84 | public string inventoryDescription; | 84 | public string inventoryDescription; |
85 | 85 | ||
86 | /// <summary> | 86 | /// <summary> |
87 | /// A mask containing the permissions for the next owner (cannot be enforced) | 87 | /// A mask containing the permissions for the next owner (cannot be enforced) |
88 | /// </summary> | 88 | /// </summary> |
89 | public uint inventoryNextPermissions; | 89 | public uint inventoryNextPermissions; |
90 | 90 | ||
91 | /// <summary> | 91 | /// <summary> |
92 | /// A mask containing permissions for the current owner (cannot be enforced) | 92 | /// A mask containing permissions for the current owner (cannot be enforced) |
93 | /// </summary> | 93 | /// </summary> |
94 | public uint inventoryCurrentPermissions; | 94 | public uint inventoryCurrentPermissions; |
95 | 95 | ||
96 | /// <summary> | 96 | /// <summary> |
97 | /// | 97 | /// |
98 | /// </summary> | 98 | /// </summary> |
99 | public uint inventoryBasePermissions; | 99 | public uint inventoryBasePermissions; |
100 | 100 | ||
101 | /// <summary> | 101 | /// <summary> |
102 | /// | 102 | /// |
103 | /// </summary> | 103 | /// </summary> |
104 | public uint inventoryEveryOnePermissions; | 104 | public uint inventoryEveryOnePermissions; |
105 | } | 105 | } |
106 | 106 | ||
107 | /// <summary> | 107 | /// <summary> |
108 | /// A Class for folders which contain users inventory | 108 | /// A Class for folders which contain users inventory |
109 | /// </summary> | 109 | /// </summary> |
110 | public class InventoryFolderBase | 110 | public class InventoryFolderBase |
111 | { | 111 | { |
112 | /// <summary> | 112 | /// <summary> |
113 | /// The name of the folder (64 characters or less) | 113 | /// The name of the folder (64 characters or less) |
114 | /// </summary> | 114 | /// </summary> |
115 | public string name; | 115 | public string name; |
116 | 116 | ||
117 | /// <summary> | 117 | /// <summary> |
118 | /// The agent who's inventory this is contained by | 118 | /// The agent who's inventory this is contained by |
119 | /// </summary> | 119 | /// </summary> |
120 | public LLUUID agentID; | 120 | public LLUUID agentID; |
121 | 121 | ||
122 | /// <summary> | 122 | /// <summary> |
123 | /// The folder this folder is contained in | 123 | /// The folder this folder is contained in |
124 | /// </summary> | 124 | /// </summary> |
125 | public LLUUID parentID; | 125 | public LLUUID parentID; |
126 | 126 | ||
127 | /// <summary> | 127 | /// <summary> |
128 | /// The UUID for this folder | 128 | /// The UUID for this folder |
129 | /// </summary> | 129 | /// </summary> |
130 | public LLUUID folderID; | 130 | public LLUUID folderID; |
131 | 131 | ||
132 | /// <summary> | 132 | /// <summary> |
133 | /// Tyep of Items normally stored in this folder | 133 | /// Tyep of Items normally stored in this folder |
134 | /// </summary> | 134 | /// </summary> |
135 | public short type; | 135 | public short type; |
136 | 136 | ||
137 | /// <summary> | 137 | /// <summary> |
138 | /// | 138 | /// |
139 | /// </summary> | 139 | /// </summary> |
140 | public ushort version; | 140 | public ushort version; |
141 | } | 141 | } |
142 | 142 | ||
143 | /// <summary> | 143 | /// <summary> |
144 | /// An interface for accessing inventory data from a storage server | 144 | /// An interface for accessing inventory data from a storage server |
145 | /// </summary> | 145 | /// </summary> |
146 | public interface IInventoryData | 146 | public interface IInventoryData |
147 | { | 147 | { |
148 | /// <summary> | 148 | /// <summary> |
149 | /// Initialises the interface | 149 | /// Initialises the interface |
150 | /// </summary> | 150 | /// </summary> |
151 | void Initialise(); | 151 | void Initialise(); |
152 | 152 | ||
153 | /// <summary> | 153 | /// <summary> |
154 | /// Closes the interface | 154 | /// Closes the interface |
155 | /// </summary> | 155 | /// </summary> |
156 | void Close(); | 156 | void Close(); |
157 | 157 | ||
158 | /// <summary> | 158 | /// <summary> |
159 | /// The plugin being loaded | 159 | /// The plugin being loaded |
160 | /// </summary> | 160 | /// </summary> |
161 | /// <returns>A string containing the plugin name</returns> | 161 | /// <returns>A string containing the plugin name</returns> |
162 | string getName(); | 162 | string getName(); |
163 | 163 | ||
164 | /// <summary> | 164 | /// <summary> |
165 | /// The plugins version | 165 | /// The plugins version |
166 | /// </summary> | 166 | /// </summary> |
167 | /// <returns>A string containing the plugin version</returns> | 167 | /// <returns>A string containing the plugin version</returns> |
168 | string getVersion(); | 168 | string getVersion(); |
169 | 169 | ||
170 | /// <summary> | 170 | /// <summary> |
171 | /// Returns a list of inventory items contained within the specified folder | 171 | /// Returns a list of inventory items contained within the specified folder |
172 | /// </summary> | 172 | /// </summary> |
173 | /// <param name="folderID">The UUID of the target folder</param> | 173 | /// <param name="folderID">The UUID of the target folder</param> |
174 | /// <returns>A List of InventoryItemBase items</returns> | 174 | /// <returns>A List of InventoryItemBase items</returns> |
175 | List<InventoryItemBase> getInventoryInFolder(LLUUID folderID); | 175 | List<InventoryItemBase> getInventoryInFolder(LLUUID folderID); |
176 | 176 | ||
177 | /// <summary> | 177 | /// <summary> |
178 | /// Returns a list of the root folders within a users inventory | 178 | /// Returns a list of the root folders within a users inventory |
179 | /// </summary> | 179 | /// </summary> |
180 | /// <param name="user">The user whos inventory is to be searched</param> | 180 | /// <param name="user">The user whos inventory is to be searched</param> |
181 | /// <returns>A list of folder objects</returns> | 181 | /// <returns>A list of folder objects</returns> |
182 | List<InventoryFolderBase> getUserRootFolders(LLUUID user); | 182 | List<InventoryFolderBase> getUserRootFolders(LLUUID user); |
183 | 183 | ||
184 | /// <summary> | 184 | /// <summary> |
185 | /// Returns the users inventory root folder. | 185 | /// Returns the users inventory root folder. |
186 | /// </summary> | 186 | /// </summary> |
187 | /// <param name="user">The UUID of the user who is having inventory being returned</param> | 187 | /// <param name="user">The UUID of the user who is having inventory being returned</param> |
188 | /// <returns>Root inventory folder</returns> | 188 | /// <returns>Root inventory folder</returns> |
189 | InventoryFolderBase getUserRootFolder(LLUUID user); | 189 | InventoryFolderBase getUserRootFolder(LLUUID user); |
190 | 190 | ||
191 | /// <summary> | 191 | /// <summary> |
192 | /// Returns a list of inventory folders contained in the folder 'parentID' | 192 | /// Returns a list of inventory folders contained in the folder 'parentID' |
193 | /// </summary> | 193 | /// </summary> |
194 | /// <param name="parentID">The folder to get subfolders for</param> | 194 | /// <param name="parentID">The folder to get subfolders for</param> |
195 | /// <returns>A list of inventory folders</returns> | 195 | /// <returns>A list of inventory folders</returns> |
196 | List<InventoryFolderBase> getInventoryFolders(LLUUID parentID); | 196 | List<InventoryFolderBase> getInventoryFolders(LLUUID parentID); |
197 | 197 | ||
198 | /// <summary> | 198 | /// <summary> |
199 | /// Returns an inventory item by its UUID | 199 | /// Returns an inventory item by its UUID |
200 | /// </summary> | 200 | /// </summary> |
201 | /// <param name="item">The UUID of the item to be returned</param> | 201 | /// <param name="item">The UUID of the item to be returned</param> |
202 | /// <returns>A class containing item information</returns> | 202 | /// <returns>A class containing item information</returns> |
203 | InventoryItemBase getInventoryItem(LLUUID item); | 203 | InventoryItemBase getInventoryItem(LLUUID item); |
204 | 204 | ||
205 | /// <summary> | 205 | /// <summary> |
206 | /// Returns a specified inventory folder by its UUID | 206 | /// Returns a specified inventory folder by its UUID |
207 | /// </summary> | 207 | /// </summary> |
208 | /// <param name="folder">The UUID of the folder to be returned</param> | 208 | /// <param name="folder">The UUID of the folder to be returned</param> |
209 | /// <returns>A class containing folder information</returns> | 209 | /// <returns>A class containing folder information</returns> |
210 | InventoryFolderBase getInventoryFolder(LLUUID folder); | 210 | InventoryFolderBase getInventoryFolder(LLUUID folder); |
211 | 211 | ||
212 | /// <summary> | 212 | /// <summary> |
213 | /// Creates a new inventory item based on item | 213 | /// Creates a new inventory item based on item |
214 | /// </summary> | 214 | /// </summary> |
215 | /// <param name="item">The item to be created</param> | 215 | /// <param name="item">The item to be created</param> |
216 | void addInventoryItem(InventoryItemBase item); | 216 | void addInventoryItem(InventoryItemBase item); |
217 | 217 | ||
218 | /// <summary> | 218 | /// <summary> |
219 | /// Updates an inventory item with item (updates based on ID) | 219 | /// Updates an inventory item with item (updates based on ID) |
220 | /// </summary> | 220 | /// </summary> |
221 | /// <param name="item">The updated item</param> | 221 | /// <param name="item">The updated item</param> |
222 | void updateInventoryItem(InventoryItemBase item); | 222 | void updateInventoryItem(InventoryItemBase item); |
223 | 223 | ||
224 | /// <summary> | 224 | /// <summary> |
225 | /// | 225 | /// |
226 | /// </summary> | 226 | /// </summary> |
227 | /// <param name="item"></param> | 227 | /// <param name="item"></param> |
228 | void deleteInventoryItem(LLUUID item); | 228 | void deleteInventoryItem(LLUUID item); |
229 | 229 | ||
230 | /// <summary> | 230 | /// <summary> |
231 | /// Adds a new folder specified by folder | 231 | /// Adds a new folder specified by folder |
232 | /// </summary> | 232 | /// </summary> |
233 | /// <param name="folder">The inventory folder</param> | 233 | /// <param name="folder">The inventory folder</param> |
234 | void addInventoryFolder(InventoryFolderBase folder); | 234 | void addInventoryFolder(InventoryFolderBase folder); |
235 | 235 | ||
236 | /// <summary> | 236 | /// <summary> |
237 | /// Updates a folder based on its ID with folder | 237 | /// Updates a folder based on its ID with folder |
238 | /// </summary> | 238 | /// </summary> |
239 | /// <param name="folder">The inventory folder</param> | 239 | /// <param name="folder">The inventory folder</param> |
240 | void updateInventoryFolder(InventoryFolderBase folder); | 240 | void updateInventoryFolder(InventoryFolderBase folder); |
241 | 241 | ||
242 | /// <summary> | 242 | /// <summary> |
243 | /// Deletes a folder based on its ID with folder | 243 | /// Deletes a folder based on its ID with folder |
244 | /// </summary> | 244 | /// </summary> |
245 | /// <param name="folder">The id of the folder</param> | 245 | /// <param name="folder">The id of the folder</param> |
246 | void deleteInventoryFolder(LLUUID folder); | 246 | void deleteInventoryFolder(LLUUID folder); |
247 | } | 247 | } |
248 | 248 | ||
249 | /* | 249 | /* |
250 | * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder | 250 | * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder |
251 | * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize | 251 | * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize |
252 | * into this simpler class, and then use that. | 252 | * into this simpler class, and then use that. |
253 | */ | 253 | */ |
254 | [XmlRoot(ElementName = "inventory", IsNullable = true)] | 254 | [XmlRoot(ElementName = "inventory", IsNullable = true)] |
255 | public class SerializableInventory | 255 | public class SerializableInventory |
256 | { | 256 | { |
257 | [XmlRoot(ElementName = "folder", IsNullable = true)] | 257 | [XmlRoot(ElementName = "folder", IsNullable = true)] |
258 | public class SerializableFolder : InventoryFolderBase | 258 | public class SerializableFolder : InventoryFolderBase |
259 | { | 259 | { |
260 | [XmlArray(ElementName = "folders", IsNullable = true)] | 260 | [XmlArray(ElementName = "folders", IsNullable = true)] |
261 | [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof(SerializableFolder))] | 261 | [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof(SerializableFolder))] |
262 | public ArrayList SubFolders; | 262 | public ArrayList SubFolders; |
263 | 263 | ||
264 | [XmlArray(ElementName = "items", IsNullable = true)] | 264 | [XmlArray(ElementName = "items", IsNullable = true)] |
265 | [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof(InventoryItemBase))] | 265 | [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof(InventoryItemBase))] |
266 | public ArrayList Items; | 266 | public ArrayList Items; |
267 | } | 267 | } |
268 | 268 | ||
269 | [XmlElement(ElementName = "folder", IsNullable = true)] | 269 | [XmlElement(ElementName = "folder", IsNullable = true)] |
270 | public SerializableFolder root; | 270 | public SerializableFolder root; |
271 | } | 271 | } |
272 | 272 | ||
273 | } | 273 | } |
diff --git a/OpenSim/Framework/General/LandData.cs b/OpenSim/Framework/General/LandData.cs index cab71a9..ca948ef 100644 --- a/OpenSim/Framework/General/LandData.cs +++ b/OpenSim/Framework/General/LandData.cs | |||
@@ -1,123 +1,123 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework | 30 | namespace OpenSim.Framework |
31 | { | 31 | { |
32 | public class LandData | 32 | public class LandData |
33 | { | 33 | { |
34 | public byte[] landBitmapByteArray = new byte[512]; | 34 | public byte[] landBitmapByteArray = new byte[512]; |
35 | public string landName = "Your Parcel"; | 35 | public string landName = "Your Parcel"; |
36 | public string landDesc = ""; | 36 | public string landDesc = ""; |
37 | public LLUUID ownerID = new LLUUID(); | 37 | public LLUUID ownerID = new LLUUID(); |
38 | public bool isGroupOwned = false; | 38 | public bool isGroupOwned = false; |
39 | public LLVector3 AABBMin = new LLVector3(); | 39 | public LLVector3 AABBMin = new LLVector3(); |
40 | public LLVector3 AABBMax = new LLVector3(); | 40 | public LLVector3 AABBMax = new LLVector3(); |
41 | public int area = 0; | 41 | public int area = 0; |
42 | public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned | 42 | public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned |
43 | public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID | 43 | public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID |
44 | public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category | 44 | public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category |
45 | public int claimDate = 0; //Unemplemented | 45 | public int claimDate = 0; //Unemplemented |
46 | public int claimPrice = 0; //Unemplemented | 46 | public int claimPrice = 0; //Unemplemented |
47 | public LLUUID groupID = new LLUUID(); //Unemplemented | 47 | public LLUUID groupID = new LLUUID(); //Unemplemented |
48 | public int groupPrims = 0; | 48 | public int groupPrims = 0; |
49 | public int otherPrims = 0; | 49 | public int otherPrims = 0; |
50 | public int ownerPrims = 0; | 50 | public int ownerPrims = 0; |
51 | public int selectedPrims = 0; | 51 | public int selectedPrims = 0; |
52 | public int simwidePrims = 0; | 52 | public int simwidePrims = 0; |
53 | public int simwideArea = 0; | 53 | public int simwideArea = 0; |
54 | public int salePrice = 0; //Unemeplemented. Parcels price. | 54 | public int salePrice = 0; //Unemeplemented. Parcels price. |
55 | public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased; | 55 | public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased; |
56 | 56 | ||
57 | public uint landFlags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark | | 57 | public uint landFlags = (uint) Parcel.ParcelFlags.AllowFly | (uint) Parcel.ParcelFlags.AllowLandmark | |
58 | (uint) Parcel.ParcelFlags.AllowAllObjectEntry | | 58 | (uint) Parcel.ParcelFlags.AllowAllObjectEntry | |
59 | (uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform | | 59 | (uint) Parcel.ParcelFlags.AllowDeedToGroup | (uint) Parcel.ParcelFlags.AllowTerraform | |
60 | (uint) Parcel.ParcelFlags.CreateObjects | (uint) Parcel.ParcelFlags.AllowOtherScripts | | 60 | (uint) Parcel.ParcelFlags.CreateObjects | (uint) Parcel.ParcelFlags.AllowOtherScripts | |
61 | (uint) Parcel.ParcelFlags.SoundLocal; | 61 | (uint) Parcel.ParcelFlags.SoundLocal; |
62 | 62 | ||
63 | public byte landingType = 0; | 63 | public byte landingType = 0; |
64 | public byte mediaAutoScale = 0; | 64 | public byte mediaAutoScale = 0; |
65 | public LLUUID mediaID = LLUUID.Zero; | 65 | public LLUUID mediaID = LLUUID.Zero; |
66 | public int localID = 0; | 66 | public int localID = 0; |
67 | public LLUUID globalID = new LLUUID(); | 67 | public LLUUID globalID = new LLUUID(); |
68 | 68 | ||
69 | public string mediaURL = ""; | 69 | public string mediaURL = ""; |
70 | public string musicURL = ""; | 70 | public string musicURL = ""; |
71 | public float passHours = 0; | 71 | public float passHours = 0; |
72 | public int passPrice = 0; | 72 | public int passPrice = 0; |
73 | public LLUUID snapshotID = LLUUID.Zero; | 73 | public LLUUID snapshotID = LLUUID.Zero; |
74 | public LLVector3 userLocation = new LLVector3(); | 74 | public LLVector3 userLocation = new LLVector3(); |
75 | public LLVector3 userLookAt = new LLVector3(); | 75 | public LLVector3 userLookAt = new LLVector3(); |
76 | 76 | ||
77 | public LandData() | 77 | public LandData() |
78 | { | 78 | { |
79 | globalID = LLUUID.Random(); | 79 | globalID = LLUUID.Random(); |
80 | } | 80 | } |
81 | 81 | ||
82 | public LandData Copy() | 82 | public LandData Copy() |
83 | { | 83 | { |
84 | LandData landData = new LandData(); | 84 | LandData landData = new LandData(); |
85 | 85 | ||
86 | landData.AABBMax = AABBMax; | 86 | landData.AABBMax = AABBMax; |
87 | landData.AABBMin = AABBMin; | 87 | landData.AABBMin = AABBMin; |
88 | landData.area = area; | 88 | landData.area = area; |
89 | landData.auctionID = auctionID; | 89 | landData.auctionID = auctionID; |
90 | landData.authBuyerID = authBuyerID; | 90 | landData.authBuyerID = authBuyerID; |
91 | landData.category = category; | 91 | landData.category = category; |
92 | landData.claimDate = claimDate; | 92 | landData.claimDate = claimDate; |
93 | landData.claimPrice = claimPrice; | 93 | landData.claimPrice = claimPrice; |
94 | landData.globalID = globalID; | 94 | landData.globalID = globalID; |
95 | landData.groupID = groupID; | 95 | landData.groupID = groupID; |
96 | landData.groupPrims = groupPrims; | 96 | landData.groupPrims = groupPrims; |
97 | landData.otherPrims = otherPrims; | 97 | landData.otherPrims = otherPrims; |
98 | landData.ownerPrims = ownerPrims; | 98 | landData.ownerPrims = ownerPrims; |
99 | landData.selectedPrims = selectedPrims; | 99 | landData.selectedPrims = selectedPrims; |
100 | landData.isGroupOwned = isGroupOwned; | 100 | landData.isGroupOwned = isGroupOwned; |
101 | landData.localID = localID; | 101 | landData.localID = localID; |
102 | landData.landingType = landingType; | 102 | landData.landingType = landingType; |
103 | landData.mediaAutoScale = mediaAutoScale; | 103 | landData.mediaAutoScale = mediaAutoScale; |
104 | landData.mediaID = mediaID; | 104 | landData.mediaID = mediaID; |
105 | landData.mediaURL = mediaURL; | 105 | landData.mediaURL = mediaURL; |
106 | landData.musicURL = musicURL; | 106 | landData.musicURL = musicURL; |
107 | landData.ownerID = ownerID; | 107 | landData.ownerID = ownerID; |
108 | landData.landBitmapByteArray = (byte[]) landBitmapByteArray.Clone(); | 108 | landData.landBitmapByteArray = (byte[]) landBitmapByteArray.Clone(); |
109 | landData.landDesc = landDesc; | 109 | landData.landDesc = landDesc; |
110 | landData.landFlags = landFlags; | 110 | landData.landFlags = landFlags; |
111 | landData.landName = landName; | 111 | landData.landName = landName; |
112 | landData.landStatus = landStatus; | 112 | landData.landStatus = landStatus; |
113 | landData.passHours = passHours; | 113 | landData.passHours = passHours; |
114 | landData.passPrice = passPrice; | 114 | landData.passPrice = passPrice; |
115 | landData.salePrice = salePrice; | 115 | landData.salePrice = salePrice; |
116 | landData.snapshotID = snapshotID; | 116 | landData.snapshotID = snapshotID; |
117 | landData.userLocation = userLocation; | 117 | landData.userLocation = userLocation; |
118 | landData.userLookAt = userLookAt; | 118 | landData.userLookAt = userLookAt; |
119 | 119 | ||
120 | return landData; | 120 | return landData; |
121 | } | 121 | } |
122 | } | 122 | } |
123 | } \ No newline at end of file | 123 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/Login.cs b/OpenSim/Framework/General/Login.cs index d9a5ab2..7ceed19 100644 --- a/OpenSim/Framework/General/Login.cs +++ b/OpenSim/Framework/General/Login.cs | |||
@@ -1,50 +1,50 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | 29 | ||
30 | namespace OpenSim.Framework | 30 | namespace OpenSim.Framework |
31 | { | 31 | { |
32 | public class Login | 32 | public class Login |
33 | { | 33 | { |
34 | public string First = "Test"; | 34 | public string First = "Test"; |
35 | public string Last = "User"; | 35 | public string Last = "User"; |
36 | public LLUUID Agent; | 36 | public LLUUID Agent; |
37 | public LLUUID Session; | 37 | public LLUUID Session; |
38 | public LLUUID SecureSession = LLUUID.Zero; | 38 | public LLUUID SecureSession = LLUUID.Zero; |
39 | public LLUUID InventoryFolder; | 39 | public LLUUID InventoryFolder; |
40 | public LLUUID BaseFolder; | 40 | public LLUUID BaseFolder; |
41 | public uint CircuitCode; | 41 | public uint CircuitCode; |
42 | public string CapsPath = ""; | 42 | public string CapsPath = ""; |
43 | public LLVector3 StartPos; | 43 | public LLVector3 StartPos; |
44 | 44 | ||
45 | public Login() | 45 | public Login() |
46 | { | 46 | { |
47 | StartPos = new LLVector3(128, 128, 70); | 47 | StartPos = new LLVector3(128, 128, 70); |
48 | } | 48 | } |
49 | } | 49 | } |
50 | } \ No newline at end of file | 50 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/MapBlockData.cs b/OpenSim/Framework/General/MapBlockData.cs index d794015..8609533 100644 --- a/OpenSim/Framework/General/MapBlockData.cs +++ b/OpenSim/Framework/General/MapBlockData.cs | |||
@@ -1,50 +1,50 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | 31 | ||
32 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
33 | { | 33 | { |
34 | public class MapBlockData | 34 | public class MapBlockData |
35 | { | 35 | { |
36 | public uint Flags; | 36 | public uint Flags; |
37 | public ushort X; | 37 | public ushort X; |
38 | public ushort Y; | 38 | public ushort Y; |
39 | public byte Agents; | 39 | public byte Agents; |
40 | public byte Access; | 40 | public byte Access; |
41 | public byte WaterHeight; | 41 | public byte WaterHeight; |
42 | public LLUUID MapImageId; | 42 | public LLUUID MapImageId; |
43 | public String Name; | 43 | public String Name; |
44 | public uint RegionFlags; | 44 | public uint RegionFlags; |
45 | 45 | ||
46 | public MapBlockData() | 46 | public MapBlockData() |
47 | { | 47 | { |
48 | } | 48 | } |
49 | } | 49 | } |
50 | } \ No newline at end of file | 50 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/NeighbourInfo.cs b/OpenSim/Framework/General/NeighbourInfo.cs index 457f7d0..d5a0a2f 100644 --- a/OpenSim/Framework/General/NeighbourInfo.cs +++ b/OpenSim/Framework/General/NeighbourInfo.cs | |||
@@ -1,42 +1,42 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | namespace OpenSim.Framework | 28 | namespace OpenSim.Framework |
29 | { | 29 | { |
30 | public class NeighbourInfo | 30 | public class NeighbourInfo |
31 | { | 31 | { |
32 | public NeighbourInfo() | 32 | public NeighbourInfo() |
33 | { | 33 | { |
34 | } | 34 | } |
35 | 35 | ||
36 | public ulong regionhandle; | 36 | public ulong regionhandle; |
37 | public uint RegionLocX; | 37 | public uint RegionLocX; |
38 | public uint RegionLocY; | 38 | public uint RegionLocY; |
39 | public string sim_ip; | 39 | public string sim_ip; |
40 | public uint sim_port; | 40 | public uint sim_port; |
41 | } | 41 | } |
42 | } \ No newline at end of file | 42 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/NetworkServersInfo.cs b/OpenSim/Framework/General/NetworkServersInfo.cs index aa8aa2b..b9ce143 100644 --- a/OpenSim/Framework/General/NetworkServersInfo.cs +++ b/OpenSim/Framework/General/NetworkServersInfo.cs | |||
@@ -1,100 +1,100 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using Nini.Config; | 29 | using Nini.Config; |
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
33 | public class NetworkServersInfo | 33 | public class NetworkServersInfo |
34 | { | 34 | { |
35 | public string AssetURL = "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"; | 35 | public string AssetURL = "http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"; |
36 | public string AssetSendKey = ""; | 36 | public string AssetSendKey = ""; |
37 | 37 | ||
38 | public string GridURL = ""; | 38 | public string GridURL = ""; |
39 | public string GridSendKey = ""; | 39 | public string GridSendKey = ""; |
40 | public string GridRecvKey = ""; | 40 | public string GridRecvKey = ""; |
41 | public string UserURL = ""; | 41 | public string UserURL = ""; |
42 | public string UserSendKey = ""; | 42 | public string UserSendKey = ""; |
43 | public string UserRecvKey = ""; | 43 | public string UserRecvKey = ""; |
44 | public bool isSandbox; | 44 | public bool isSandbox; |
45 | 45 | ||
46 | public string InventoryURL = ""; | 46 | public string InventoryURL = ""; |
47 | 47 | ||
48 | public static int DefaultHttpListenerPort = 9000; | 48 | public static int DefaultHttpListenerPort = 9000; |
49 | public int HttpListenerPort = DefaultHttpListenerPort; | 49 | public int HttpListenerPort = DefaultHttpListenerPort; |
50 | 50 | ||
51 | public static int RemotingListenerPort = 8895; | 51 | public static int RemotingListenerPort = 8895; |
52 | 52 | ||
53 | 53 | ||
54 | public NetworkServersInfo() | 54 | public NetworkServersInfo() |
55 | { | 55 | { |
56 | } | 56 | } |
57 | 57 | ||
58 | public NetworkServersInfo(uint defaultHomeLocX, uint defaultHomeLocY) | 58 | public NetworkServersInfo(uint defaultHomeLocX, uint defaultHomeLocY) |
59 | { | 59 | { |
60 | m_defaultHomeLocX = defaultHomeLocX; | 60 | m_defaultHomeLocX = defaultHomeLocX; |
61 | m_defaultHomeLocY = defaultHomeLocY; | 61 | m_defaultHomeLocY = defaultHomeLocY; |
62 | } | 62 | } |
63 | 63 | ||
64 | private uint? m_defaultHomeLocX; | 64 | private uint? m_defaultHomeLocX; |
65 | 65 | ||
66 | public uint DefaultHomeLocX | 66 | public uint DefaultHomeLocX |
67 | { | 67 | { |
68 | get { return m_defaultHomeLocX.Value; } | 68 | get { return m_defaultHomeLocX.Value; } |
69 | } | 69 | } |
70 | 70 | ||
71 | private uint? m_defaultHomeLocY; | 71 | private uint? m_defaultHomeLocY; |
72 | 72 | ||
73 | public uint DefaultHomeLocY | 73 | public uint DefaultHomeLocY |
74 | { | 74 | { |
75 | get { return m_defaultHomeLocY.Value; } | 75 | get { return m_defaultHomeLocY.Value; } |
76 | } | 76 | } |
77 | 77 | ||
78 | public void loadFromConfiguration(IConfigSource config) | 78 | public void loadFromConfiguration(IConfigSource config) |
79 | { | 79 | { |
80 | m_defaultHomeLocX = (uint) config.Configs["StandAlone"].GetInt("default_location_x", 1000); | 80 | m_defaultHomeLocX = (uint) config.Configs["StandAlone"].GetInt("default_location_x", 1000); |
81 | m_defaultHomeLocY = (uint) config.Configs["StandAlone"].GetInt("default_location_y", 1000); | 81 | m_defaultHomeLocY = (uint) config.Configs["StandAlone"].GetInt("default_location_y", 1000); |
82 | 82 | ||
83 | HttpListenerPort = config.Configs["Network"].GetInt("http_listener_port", DefaultHttpListenerPort); | 83 | HttpListenerPort = config.Configs["Network"].GetInt("http_listener_port", DefaultHttpListenerPort); |
84 | RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", RemotingListenerPort); | 84 | RemotingListenerPort = config.Configs["Network"].GetInt("remoting_listener_port", RemotingListenerPort); |
85 | GridURL = | 85 | GridURL = |
86 | config.Configs["Network"].GetString("grid_server_url", | 86 | config.Configs["Network"].GetString("grid_server_url", |
87 | "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString()); | 87 | "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString()); |
88 | GridSendKey = config.Configs["Network"].GetString("grid_send_key", "null"); | 88 | GridSendKey = config.Configs["Network"].GetString("grid_send_key", "null"); |
89 | GridRecvKey = config.Configs["Network"].GetString("grid_recv_key", "null"); | 89 | GridRecvKey = config.Configs["Network"].GetString("grid_recv_key", "null"); |
90 | UserURL = | 90 | UserURL = |
91 | config.Configs["Network"].GetString("user_server_url", | 91 | config.Configs["Network"].GetString("user_server_url", |
92 | "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString()); | 92 | "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString()); |
93 | UserSendKey = config.Configs["Network"].GetString("user_send_key", "null"); | 93 | UserSendKey = config.Configs["Network"].GetString("user_send_key", "null"); |
94 | UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null"); | 94 | UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null"); |
95 | AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL); | 95 | AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL); |
96 | InventoryURL = config.Configs["Network"].GetString("inventory_server_url", | 96 | InventoryURL = config.Configs["Network"].GetString("inventory_server_url", |
97 | "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString()); | 97 | "http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString()); |
98 | } | 98 | } |
99 | } | 99 | } |
100 | } | 100 | } |
diff --git a/OpenSim/Framework/General/PrimitiveBaseShape.cs b/OpenSim/Framework/General/PrimitiveBaseShape.cs index 2123ecb..5cdbfb2 100644 --- a/OpenSim/Framework/General/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/PrimitiveBaseShape.cs | |||
@@ -1,214 +1,214 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System.Xml.Serialization; | 29 | using System.Xml.Serialization; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | 31 | ||
32 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
33 | { | 33 | { |
34 | public enum ProfileShape : byte | 34 | public enum ProfileShape : byte |
35 | { | 35 | { |
36 | Circle = 0, | 36 | Circle = 0, |
37 | Square = 1, | 37 | Square = 1, |
38 | IsometricTriangle = 2, | 38 | IsometricTriangle = 2, |
39 | EquilateralTriangle = 3, | 39 | EquilateralTriangle = 3, |
40 | RightTriangle = 4, | 40 | RightTriangle = 4, |
41 | HalfCircle = 5 | 41 | HalfCircle = 5 |
42 | } | 42 | } |
43 | 43 | ||
44 | public enum HollowShape : byte | 44 | public enum HollowShape : byte |
45 | { | 45 | { |
46 | Same = 0, | 46 | Same = 0, |
47 | Circle = 16, | 47 | Circle = 16, |
48 | Square = 32, | 48 | Square = 32, |
49 | Triangle = 48 | 49 | Triangle = 48 |
50 | } | 50 | } |
51 | 51 | ||
52 | public enum PCodeEnum : byte | 52 | public enum PCodeEnum : byte |
53 | { | 53 | { |
54 | Primitive = 9, | 54 | Primitive = 9, |
55 | Avatar = 47 | 55 | Avatar = 47 |
56 | } | 56 | } |
57 | 57 | ||
58 | public enum Extrusion : byte | 58 | public enum Extrusion : byte |
59 | { | 59 | { |
60 | Straight = 16, | 60 | Straight = 16, |
61 | Curve1 = 32, | 61 | Curve1 = 32, |
62 | Curve2 = 48, | 62 | Curve2 = 48, |
63 | Flexible = 128 | 63 | Flexible = 128 |
64 | } | 64 | } |
65 | 65 | ||
66 | public class PrimitiveBaseShape | 66 | public class PrimitiveBaseShape |
67 | { | 67 | { |
68 | private static byte[] m_defaultTextureEntry; | 68 | private static byte[] m_defaultTextureEntry; |
69 | 69 | ||
70 | public byte PCode; | 70 | public byte PCode; |
71 | public ushort PathBegin; | 71 | public ushort PathBegin; |
72 | public ushort PathEnd; | 72 | public ushort PathEnd; |
73 | public byte PathScaleX; | 73 | public byte PathScaleX; |
74 | public byte PathScaleY; | 74 | public byte PathScaleY; |
75 | public byte PathShearX; | 75 | public byte PathShearX; |
76 | public byte PathShearY; | 76 | public byte PathShearY; |
77 | public sbyte PathSkew; | 77 | public sbyte PathSkew; |
78 | public ushort ProfileBegin; | 78 | public ushort ProfileBegin; |
79 | public ushort ProfileEnd; | 79 | public ushort ProfileEnd; |
80 | public LLVector3 Scale; | 80 | public LLVector3 Scale; |
81 | public byte PathCurve; | 81 | public byte PathCurve; |
82 | public byte ProfileCurve; | 82 | public byte ProfileCurve; |
83 | public ushort ProfileHollow; | 83 | public ushort ProfileHollow; |
84 | public sbyte PathRadiusOffset; | 84 | public sbyte PathRadiusOffset; |
85 | public byte PathRevolutions; | 85 | public byte PathRevolutions; |
86 | public sbyte PathTaperX; | 86 | public sbyte PathTaperX; |
87 | public sbyte PathTaperY; | 87 | public sbyte PathTaperY; |
88 | public sbyte PathTwist; | 88 | public sbyte PathTwist; |
89 | public sbyte PathTwistBegin; | 89 | public sbyte PathTwistBegin; |
90 | public byte[] TextureEntry; // a LL textureEntry in byte[] format | 90 | public byte[] TextureEntry; // a LL textureEntry in byte[] format |
91 | public byte[] ExtraParams; | 91 | public byte[] ExtraParams; |
92 | 92 | ||
93 | public ProfileShape ProfileShape | 93 | public ProfileShape ProfileShape |
94 | { | 94 | { |
95 | get { return (ProfileShape) (ProfileCurve & 0xf); } | 95 | get { return (ProfileShape) (ProfileCurve & 0xf); } |
96 | set | 96 | set |
97 | { | 97 | { |
98 | byte oldValueMasked = (byte) (ProfileCurve & 0xf0); | 98 | byte oldValueMasked = (byte) (ProfileCurve & 0xf0); |
99 | ProfileCurve = (byte) (oldValueMasked | (byte) value); | 99 | ProfileCurve = (byte) (oldValueMasked | (byte) value); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | [XmlIgnore] | 103 | [XmlIgnore] |
104 | public HollowShape HollowShape | 104 | public HollowShape HollowShape |
105 | { | 105 | { |
106 | get { return (HollowShape) (ProfileHollow & 0xf0); } | 106 | get { return (HollowShape) (ProfileHollow & 0xf0); } |
107 | set | 107 | set |
108 | { | 108 | { |
109 | byte oldValueMasked = (byte) (ProfileHollow & 0xf0); | 109 | byte oldValueMasked = (byte) (ProfileHollow & 0xf0); |
110 | ProfileHollow = (byte) (oldValueMasked | (byte) value); | 110 | ProfileHollow = (byte) (oldValueMasked | (byte) value); |
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | public LLVector3 PrimScale | 114 | public LLVector3 PrimScale |
115 | { | 115 | { |
116 | get { return Scale; } | 116 | get { return Scale; } |
117 | } | 117 | } |
118 | 118 | ||
119 | static PrimitiveBaseShape() | 119 | static PrimitiveBaseShape() |
120 | { | 120 | { |
121 | m_defaultTextureEntry = | 121 | m_defaultTextureEntry = |
122 | new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); | 122 | new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")).ToBytes(); |
123 | } | 123 | } |
124 | 124 | ||
125 | public PrimitiveBaseShape() | 125 | public PrimitiveBaseShape() |
126 | { | 126 | { |
127 | PCode = (byte) PCodeEnum.Primitive; | 127 | PCode = (byte) PCodeEnum.Primitive; |
128 | ExtraParams = new byte[1]; | 128 | ExtraParams = new byte[1]; |
129 | TextureEntry = m_defaultTextureEntry; | 129 | TextureEntry = m_defaultTextureEntry; |
130 | } | 130 | } |
131 | 131 | ||
132 | //void returns need to change of course | 132 | //void returns need to change of course |
133 | public virtual void GetMesh() | 133 | public virtual void GetMesh() |
134 | { | 134 | { |
135 | } | 135 | } |
136 | 136 | ||
137 | public PrimitiveBaseShape Copy() | 137 | public PrimitiveBaseShape Copy() |
138 | { | 138 | { |
139 | return (PrimitiveBaseShape) MemberwiseClone(); | 139 | return (PrimitiveBaseShape) MemberwiseClone(); |
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
143 | public class GenericShape : PrimitiveBaseShape | 143 | public class GenericShape : PrimitiveBaseShape |
144 | { | 144 | { |
145 | public GenericShape() | 145 | public GenericShape() |
146 | : base() | 146 | : base() |
147 | { | 147 | { |
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
151 | public class BoxShape : PrimitiveBaseShape | 151 | public class BoxShape : PrimitiveBaseShape |
152 | { | 152 | { |
153 | public BoxShape() | 153 | public BoxShape() |
154 | : base() | 154 | : base() |
155 | { | 155 | { |
156 | PathCurve = (byte) Extrusion.Straight; | 156 | PathCurve = (byte) Extrusion.Straight; |
157 | ProfileShape = ProfileShape.Square; | 157 | ProfileShape = ProfileShape.Square; |
158 | PathScaleX = 100; | 158 | PathScaleX = 100; |
159 | PathScaleY = 100; | 159 | PathScaleY = 100; |
160 | } | 160 | } |
161 | 161 | ||
162 | public BoxShape(float side) | 162 | public BoxShape(float side) |
163 | : this() | 163 | : this() |
164 | { | 164 | { |
165 | SetSide(side); | 165 | SetSide(side); |
166 | } | 166 | } |
167 | 167 | ||
168 | public void SetSide(float side) | 168 | public void SetSide(float side) |
169 | { | 169 | { |
170 | Scale = new LLVector3(side, side, side); | 170 | Scale = new LLVector3(side, side, side); |
171 | } | 171 | } |
172 | 172 | ||
173 | public static BoxShape Default | 173 | public static BoxShape Default |
174 | { | 174 | { |
175 | get | 175 | get |
176 | { | 176 | { |
177 | BoxShape boxShape = new BoxShape(); | 177 | BoxShape boxShape = new BoxShape(); |
178 | 178 | ||
179 | boxShape.SetSide(0.5f); | 179 | boxShape.SetSide(0.5f); |
180 | 180 | ||
181 | return boxShape; | 181 | return boxShape; |
182 | } | 182 | } |
183 | } | 183 | } |
184 | } | 184 | } |
185 | 185 | ||
186 | public class CylinderShape : PrimitiveBaseShape | 186 | public class CylinderShape : PrimitiveBaseShape |
187 | { | 187 | { |
188 | public CylinderShape() | 188 | public CylinderShape() |
189 | : base() | 189 | : base() |
190 | { | 190 | { |
191 | PathCurve = (byte) Extrusion.Straight; | 191 | PathCurve = (byte) Extrusion.Straight; |
192 | ProfileShape = ProfileShape.Circle; | 192 | ProfileShape = ProfileShape.Circle; |
193 | PathScaleX = 100; | 193 | PathScaleX = 100; |
194 | PathScaleY = 100; | 194 | PathScaleY = 100; |
195 | } | 195 | } |
196 | 196 | ||
197 | public CylinderShape(float radius, float heigth) | 197 | public CylinderShape(float radius, float heigth) |
198 | : this() | 198 | : this() |
199 | { | 199 | { |
200 | SetRadius(radius); | 200 | SetRadius(radius); |
201 | SetHeigth(heigth); | 201 | SetHeigth(heigth); |
202 | } | 202 | } |
203 | 203 | ||
204 | private void SetHeigth(float heigth) | 204 | private void SetHeigth(float heigth) |
205 | { | 205 | { |
206 | Scale.Z = heigth; | 206 | Scale.Z = heigth; |
207 | } | 207 | } |
208 | 208 | ||
209 | private void SetRadius(float radius) | 209 | private void SetRadius(float radius) |
210 | { | 210 | { |
211 | Scale.X = Scale.Y = radius*2f; | 211 | Scale.X = Scale.Y = radius*2f; |
212 | } | 212 | } |
213 | } | 213 | } |
214 | } \ No newline at end of file | 214 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/RegionHandle.cs b/OpenSim/Framework/General/RegionHandle.cs index 807a17c..440aaf6 100644 --- a/OpenSim/Framework/General/RegionHandle.cs +++ b/OpenSim/Framework/General/RegionHandle.cs | |||
@@ -1,150 +1,150 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Net.Sockets; | 31 | using System.Net.Sockets; |
32 | 32 | ||
33 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// A class for manipulating RegionHandle coordinates | 36 | /// A class for manipulating RegionHandle coordinates |
37 | /// </summary> | 37 | /// </summary> |
38 | internal class RegionHandle | 38 | internal class RegionHandle |
39 | { | 39 | { |
40 | private UInt64 handle; | 40 | private UInt64 handle; |
41 | 41 | ||
42 | /// <summary> | 42 | /// <summary> |
43 | /// Initialises a new grid-aware RegionHandle | 43 | /// Initialises a new grid-aware RegionHandle |
44 | /// </summary> | 44 | /// </summary> |
45 | /// <param name="ip">IP Address of the Grid Server for this region</param> | 45 | /// <param name="ip">IP Address of the Grid Server for this region</param> |
46 | /// <param name="x">Grid X Coordinate</param> | 46 | /// <param name="x">Grid X Coordinate</param> |
47 | /// <param name="y">Grid Y Coordinate</param> | 47 | /// <param name="y">Grid Y Coordinate</param> |
48 | public RegionHandle(string ip, short x, short y) | 48 | public RegionHandle(string ip, short x, short y) |
49 | { | 49 | { |
50 | IPAddress addr = IPAddress.Parse(ip); | 50 | IPAddress addr = IPAddress.Parse(ip); |
51 | 51 | ||
52 | if (addr.AddressFamily != AddressFamily.InterNetwork) | 52 | if (addr.AddressFamily != AddressFamily.InterNetwork) |
53 | throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address"); | 53 | throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address"); |
54 | 54 | ||
55 | uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0); | 55 | uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0); |
56 | 56 | ||
57 | // Split the IP address in half | 57 | // Split the IP address in half |
58 | short a = (short) ((baseHandle << 16) & 0xFFFF); | 58 | short a = (short) ((baseHandle << 16) & 0xFFFF); |
59 | short b = (short) ((baseHandle << 0) & 0xFFFF); | 59 | short b = (short) ((baseHandle << 0) & 0xFFFF); |
60 | 60 | ||
61 | // Raise the bounds a little | 61 | // Raise the bounds a little |
62 | uint nx = (uint) x; | 62 | uint nx = (uint) x; |
63 | uint ny = (uint) y; | 63 | uint ny = (uint) y; |
64 | 64 | ||
65 | // Multiply grid coords to get region coords | 65 | // Multiply grid coords to get region coords |
66 | nx *= 256; | 66 | nx *= 256; |
67 | ny *= 256; | 67 | ny *= 256; |
68 | 68 | ||
69 | // Stuff the IP address in too | 69 | // Stuff the IP address in too |
70 | nx = (uint) a << 16; | 70 | nx = (uint) a << 16; |
71 | ny = (uint) b << 16; | 71 | ny = (uint) b << 16; |
72 | 72 | ||
73 | handle = ((UInt64) nx << 32) | (uint) ny; | 73 | handle = ((UInt64) nx << 32) | (uint) ny; |
74 | } | 74 | } |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// Initialises a new RegionHandle that is not inter-grid aware | 77 | /// Initialises a new RegionHandle that is not inter-grid aware |
78 | /// </summary> | 78 | /// </summary> |
79 | /// <param name="x">Grid X Coordinate</param> | 79 | /// <param name="x">Grid X Coordinate</param> |
80 | /// <param name="y">Grid Y Coordinate</param> | 80 | /// <param name="y">Grid Y Coordinate</param> |
81 | public RegionHandle(uint x, uint y) | 81 | public RegionHandle(uint x, uint y) |
82 | { | 82 | { |
83 | handle = ((x*256) << 32) | (y*256); | 83 | handle = ((x*256) << 32) | (y*256); |
84 | } | 84 | } |
85 | 85 | ||
86 | /// <summary> | 86 | /// <summary> |
87 | /// Initialises a new RegionHandle from an existing value | 87 | /// Initialises a new RegionHandle from an existing value |
88 | /// </summary> | 88 | /// </summary> |
89 | /// <param name="Region">A U64 RegionHandle</param> | 89 | /// <param name="Region">A U64 RegionHandle</param> |
90 | public RegionHandle(UInt64 Region) | 90 | public RegionHandle(UInt64 Region) |
91 | { | 91 | { |
92 | handle = Region; | 92 | handle = Region; |
93 | } | 93 | } |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
96 | /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy. | 96 | /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy. |
97 | /// </summary> | 97 | /// </summary> |
98 | /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks> | 98 | /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks> |
99 | /// <returns>Region Handle including IP Address encoding</returns> | 99 | /// <returns>Region Handle including IP Address encoding</returns> |
100 | public UInt64 getTeleportHandle() | 100 | public UInt64 getTeleportHandle() |
101 | { | 101 | { |
102 | return handle; | 102 | return handle; |
103 | } | 103 | } |
104 | 104 | ||
105 | /// <summary> | 105 | /// <summary> |
106 | /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds. | 106 | /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds. |
107 | /// </summary> | 107 | /// </summary> |
108 | /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns> | 108 | /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns> |
109 | public UInt64 getNeighbourHandle() | 109 | public UInt64 getNeighbourHandle() |
110 | { | 110 | { |
111 | UInt64 mask = 0x0000FFFF0000FFFF; | 111 | UInt64 mask = 0x0000FFFF0000FFFF; |
112 | 112 | ||
113 | return handle | mask; | 113 | return handle | mask; |
114 | } | 114 | } |
115 | 115 | ||
116 | /// <summary> | 116 | /// <summary> |
117 | /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle | 117 | /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle |
118 | /// </summary> | 118 | /// </summary> |
119 | /// <returns>Grid Server IP Address</returns> | 119 | /// <returns>Grid Server IP Address</returns> |
120 | public IPAddress getGridIP() | 120 | public IPAddress getGridIP() |
121 | { | 121 | { |
122 | uint a = (uint) ((handle >> 16) & 0xFFFF); | 122 | uint a = (uint) ((handle >> 16) & 0xFFFF); |
123 | uint b = (uint) ((handle >> 48) & 0xFFFF); | 123 | uint b = (uint) ((handle >> 48) & 0xFFFF); |
124 | 124 | ||
125 | return new IPAddress((long) (a << 16) | (long) b); | 125 | return new IPAddress((long) (a << 16) | (long) b); |
126 | } | 126 | } |
127 | 127 | ||
128 | /// <summary> | 128 | /// <summary> |
129 | /// Returns the X Coordinate from a Grid-Encoded RegionHandle | 129 | /// Returns the X Coordinate from a Grid-Encoded RegionHandle |
130 | /// </summary> | 130 | /// </summary> |
131 | /// <returns>X Coordinate</returns> | 131 | /// <returns>X Coordinate</returns> |
132 | public uint getGridX() | 132 | public uint getGridX() |
133 | { | 133 | { |
134 | uint x = (uint) ((handle >> 32) & 0xFFFF); | 134 | uint x = (uint) ((handle >> 32) & 0xFFFF); |
135 | 135 | ||
136 | return x; | 136 | return x; |
137 | } | 137 | } |
138 | 138 | ||
139 | /// <summary> | 139 | /// <summary> |
140 | /// Returns the Y Coordinate from a Grid-Encoded RegionHandle | 140 | /// Returns the Y Coordinate from a Grid-Encoded RegionHandle |
141 | /// </summary> | 141 | /// </summary> |
142 | /// <returns>Y Coordinate</returns> | 142 | /// <returns>Y Coordinate</returns> |
143 | public uint getGridY() | 143 | public uint getGridY() |
144 | { | 144 | { |
145 | uint y = (uint) ((handle >> 0) & 0xFFFF); | 145 | uint y = (uint) ((handle >> 0) & 0xFFFF); |
146 | 146 | ||
147 | return y; | 147 | return y; |
148 | } | 148 | } |
149 | } | 149 | } |
150 | } \ No newline at end of file | 150 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/RegionInfo.cs b/OpenSim/Framework/General/RegionInfo.cs index c14afd2..1257849 100644 --- a/OpenSim/Framework/General/RegionInfo.cs +++ b/OpenSim/Framework/General/RegionInfo.cs | |||
@@ -1,328 +1,328 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Net; | 29 | using System.Net; |
30 | using System.Net.Sockets; | 30 | using System.Net.Sockets; |
31 | using libsecondlife; | 31 | using libsecondlife; |
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | 33 | ||
34 | namespace OpenSim.Framework | 34 | namespace OpenSim.Framework |
35 | { | 35 | { |
36 | public class SimpleRegionInfo | 36 | public class SimpleRegionInfo |
37 | { | 37 | { |
38 | public SimpleRegionInfo() | 38 | public SimpleRegionInfo() |
39 | { | 39 | { |
40 | } | 40 | } |
41 | 41 | ||
42 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) | 42 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) |
43 | { | 43 | { |
44 | m_regionLocX = regionLocX; | 44 | m_regionLocX = regionLocX; |
45 | m_regionLocY = regionLocY; | 45 | m_regionLocY = regionLocY; |
46 | 46 | ||
47 | m_internalEndPoint = internalEndPoint; | 47 | m_internalEndPoint = internalEndPoint; |
48 | m_externalHostName = externalUri; | 48 | m_externalHostName = externalUri; |
49 | } | 49 | } |
50 | 50 | ||
51 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port) | 51 | public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, int port) |
52 | { | 52 | { |
53 | m_regionLocX = regionLocX; | 53 | m_regionLocX = regionLocX; |
54 | m_regionLocY = regionLocY; | 54 | m_regionLocY = regionLocY; |
55 | 55 | ||
56 | m_externalHostName = externalUri; | 56 | m_externalHostName = externalUri; |
57 | 57 | ||
58 | m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port); | 58 | m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), port); |
59 | } | 59 | } |
60 | 60 | ||
61 | public LLUUID RegionID = new LLUUID(); | 61 | public LLUUID RegionID = new LLUUID(); |
62 | 62 | ||
63 | private uint m_remotingPort; | 63 | private uint m_remotingPort; |
64 | 64 | ||
65 | public uint RemotingPort | 65 | public uint RemotingPort |
66 | { | 66 | { |
67 | get { return m_remotingPort; } | 67 | get { return m_remotingPort; } |
68 | set { m_remotingPort = value; } | 68 | set { m_remotingPort = value; } |
69 | } | 69 | } |
70 | 70 | ||
71 | public string RemotingAddress; | 71 | public string RemotingAddress; |
72 | 72 | ||
73 | 73 | ||
74 | public IPEndPoint ExternalEndPoint | 74 | public IPEndPoint ExternalEndPoint |
75 | { | 75 | { |
76 | get | 76 | get |
77 | { | 77 | { |
78 | // Old one defaults to IPv6 | 78 | // Old one defaults to IPv6 |
79 | //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); | 79 | //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); |
80 | 80 | ||
81 | IPAddress ia = null; | 81 | IPAddress ia = null; |
82 | // If it is already an IP, don't resolve it - just return directly | 82 | // If it is already an IP, don't resolve it - just return directly |
83 | if (IPAddress.TryParse(m_externalHostName, out ia)) | 83 | if (IPAddress.TryParse(m_externalHostName, out ia)) |
84 | return new IPEndPoint(ia, m_internalEndPoint.Port); | 84 | return new IPEndPoint(ia, m_internalEndPoint.Port); |
85 | 85 | ||
86 | // Reset for next check | 86 | // Reset for next check |
87 | ia = null; | 87 | ia = null; |
88 | 88 | ||
89 | 89 | ||
90 | // New method favors IPv4 | 90 | // New method favors IPv4 |
91 | foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) | 91 | foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) |
92 | { | 92 | { |
93 | if (ia == null) | 93 | if (ia == null) |
94 | ia = Adr; | 94 | ia = Adr; |
95 | 95 | ||
96 | if (Adr.AddressFamily == AddressFamily.InterNetwork) | 96 | if (Adr.AddressFamily == AddressFamily.InterNetwork) |
97 | { | 97 | { |
98 | ia = Adr; | 98 | ia = Adr; |
99 | break; | 99 | break; |
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | return new IPEndPoint(ia, m_internalEndPoint.Port); | 103 | return new IPEndPoint(ia, m_internalEndPoint.Port); |
104 | } | 104 | } |
105 | 105 | ||
106 | set { m_externalHostName = value.ToString(); } | 106 | set { m_externalHostName = value.ToString(); } |
107 | } | 107 | } |
108 | 108 | ||
109 | protected string m_externalHostName; | 109 | protected string m_externalHostName; |
110 | 110 | ||
111 | public string ExternalHostName | 111 | public string ExternalHostName |
112 | { | 112 | { |
113 | get { return m_externalHostName; } | 113 | get { return m_externalHostName; } |
114 | set { m_externalHostName = value; } | 114 | set { m_externalHostName = value; } |
115 | } | 115 | } |
116 | 116 | ||
117 | protected IPEndPoint m_internalEndPoint; | 117 | protected IPEndPoint m_internalEndPoint; |
118 | 118 | ||
119 | public IPEndPoint InternalEndPoint | 119 | public IPEndPoint InternalEndPoint |
120 | { | 120 | { |
121 | get { return m_internalEndPoint; } | 121 | get { return m_internalEndPoint; } |
122 | set { m_internalEndPoint = value; } | 122 | set { m_internalEndPoint = value; } |
123 | } | 123 | } |
124 | 124 | ||
125 | protected uint? m_regionLocX; | 125 | protected uint? m_regionLocX; |
126 | 126 | ||
127 | public uint RegionLocX | 127 | public uint RegionLocX |
128 | { | 128 | { |
129 | get { return m_regionLocX.Value; } | 129 | get { return m_regionLocX.Value; } |
130 | set { m_regionLocX = value; } | 130 | set { m_regionLocX = value; } |
131 | } | 131 | } |
132 | 132 | ||
133 | protected uint? m_regionLocY; | 133 | protected uint? m_regionLocY; |
134 | 134 | ||
135 | public uint RegionLocY | 135 | public uint RegionLocY |
136 | { | 136 | { |
137 | get { return m_regionLocY.Value; } | 137 | get { return m_regionLocY.Value; } |
138 | set { m_regionLocY = value; } | 138 | set { m_regionLocY = value; } |
139 | } | 139 | } |
140 | 140 | ||
141 | public ulong RegionHandle | 141 | public ulong RegionHandle |
142 | { | 142 | { |
143 | get { return Util.UIntsToLong((RegionLocX*256), (RegionLocY*256)); } | 143 | get { return Util.UIntsToLong((RegionLocX*256), (RegionLocY*256)); } |
144 | } | 144 | } |
145 | } | 145 | } |
146 | 146 | ||
147 | public class RegionInfo : SimpleRegionInfo | 147 | public class RegionInfo : SimpleRegionInfo |
148 | { | 148 | { |
149 | public string RegionName = ""; | 149 | public string RegionName = ""; |
150 | 150 | ||
151 | public string DataStore = ""; | 151 | public string DataStore = ""; |
152 | public bool isSandbox = false; | 152 | public bool isSandbox = false; |
153 | 153 | ||
154 | public LLUUID MasterAvatarAssignedUUID = new LLUUID(); | 154 | public LLUUID MasterAvatarAssignedUUID = new LLUUID(); |
155 | public string MasterAvatarFirstName = ""; | 155 | public string MasterAvatarFirstName = ""; |
156 | public string MasterAvatarLastName = ""; | 156 | public string MasterAvatarLastName = ""; |
157 | public string MasterAvatarSandboxPassword = ""; | 157 | public string MasterAvatarSandboxPassword = ""; |
158 | 158 | ||
159 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. | 159 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. |
160 | private static EstateSettings m_estateSettings; | 160 | private static EstateSettings m_estateSettings; |
161 | 161 | ||
162 | public EstateSettings EstateSettings | 162 | public EstateSettings EstateSettings |
163 | { | 163 | { |
164 | get | 164 | get |
165 | { | 165 | { |
166 | if (m_estateSettings == null) | 166 | if (m_estateSettings == null) |
167 | { | 167 | { |
168 | m_estateSettings = new EstateSettings(); | 168 | m_estateSettings = new EstateSettings(); |
169 | } | 169 | } |
170 | 170 | ||
171 | return m_estateSettings; | 171 | return m_estateSettings; |
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | public ConfigurationMember configMember; | 175 | public ConfigurationMember configMember; |
176 | 176 | ||
177 | public RegionInfo(string description, string filename) | 177 | public RegionInfo(string description, string filename) |
178 | { | 178 | { |
179 | configMember = | 179 | configMember = |
180 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); | 180 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); |
181 | configMember.performConfigurationRetrieve(); | 181 | configMember.performConfigurationRetrieve(); |
182 | } | 182 | } |
183 | 183 | ||
184 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) : | 184 | public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) : |
185 | base(regionLocX, regionLocY, internalEndPoint, externalUri) | 185 | base(regionLocX, regionLocY, internalEndPoint, externalUri) |
186 | { | 186 | { |
187 | } | 187 | } |
188 | 188 | ||
189 | public RegionInfo() | 189 | public RegionInfo() |
190 | { | 190 | { |
191 | } | 191 | } |
192 | 192 | ||
193 | //not in use, should swap to nini though. | 193 | //not in use, should swap to nini though. |
194 | public void LoadFromNiniSource(IConfigSource source) | 194 | public void LoadFromNiniSource(IConfigSource source) |
195 | { | 195 | { |
196 | LoadFromNiniSource(source, "RegionInfo"); | 196 | LoadFromNiniSource(source, "RegionInfo"); |
197 | } | 197 | } |
198 | 198 | ||
199 | //not in use, should swap to nini though. | 199 | //not in use, should swap to nini though. |
200 | public void LoadFromNiniSource(IConfigSource source, string sectionName) | 200 | public void LoadFromNiniSource(IConfigSource source, string sectionName) |
201 | { | 201 | { |
202 | string errorMessage = ""; | 202 | string errorMessage = ""; |
203 | RegionID = | 203 | RegionID = |
204 | new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated())); | 204 | new LLUUID(source.Configs[sectionName].GetString("Region_ID", LLUUID.Random().ToStringHyphenated())); |
205 | RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); | 205 | RegionName = source.Configs[sectionName].GetString("sim_name", "OpenSim Test"); |
206 | m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); | 206 | m_regionLocX = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_x", "1000")); |
207 | m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); | 207 | m_regionLocY = Convert.ToUInt32(source.Configs[sectionName].GetString("sim_location_y", "1000")); |
208 | DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db"); | 208 | DataStore = source.Configs[sectionName].GetString("datastore", "OpenSim.db"); |
209 | 209 | ||
210 | string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0"); | 210 | string ipAddress = source.Configs[sectionName].GetString("internal_ip_address", "0.0.0.0"); |
211 | IPAddress ipAddressResult; | 211 | IPAddress ipAddressResult; |
212 | if (IPAddress.TryParse(ipAddress, out ipAddressResult)) | 212 | if (IPAddress.TryParse(ipAddress, out ipAddressResult)) |
213 | { | 213 | { |
214 | m_internalEndPoint = new IPEndPoint(ipAddressResult, 0); | 214 | m_internalEndPoint = new IPEndPoint(ipAddressResult, 0); |
215 | } | 215 | } |
216 | else | 216 | else |
217 | { | 217 | { |
218 | errorMessage = "needs an IP Address (IPAddress)"; | 218 | errorMessage = "needs an IP Address (IPAddress)"; |
219 | } | 219 | } |
220 | m_internalEndPoint.Port = | 220 | m_internalEndPoint.Port = |
221 | source.Configs[sectionName].GetInt("internal_ip_port", NetworkServersInfo.DefaultHttpListenerPort); | 221 | source.Configs[sectionName].GetInt("internal_ip_port", NetworkServersInfo.DefaultHttpListenerPort); |
222 | 222 | ||
223 | string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); | 223 | string externalHost = source.Configs[sectionName].GetString("external_host_name", "127.0.0.1"); |
224 | if (externalHost != "SYSTEMIP") | 224 | if (externalHost != "SYSTEMIP") |
225 | { | 225 | { |
226 | m_externalHostName = externalHost; | 226 | m_externalHostName = externalHost; |
227 | } | 227 | } |
228 | else | 228 | else |
229 | { | 229 | { |
230 | m_externalHostName = Util.GetLocalHost().ToString(); | 230 | m_externalHostName = Util.GetLocalHost().ToString(); |
231 | } | 231 | } |
232 | 232 | ||
233 | MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test"); | 233 | MasterAvatarFirstName = source.Configs[sectionName].GetString("master_avatar_first", "Test"); |
234 | MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User"); | 234 | MasterAvatarLastName = source.Configs[sectionName].GetString("master_avatar_last", "User"); |
235 | MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test"); | 235 | MasterAvatarSandboxPassword = source.Configs[sectionName].GetString("master_avatar_pass", "test"); |
236 | 236 | ||
237 | if (errorMessage != "") | 237 | if (errorMessage != "") |
238 | { | 238 | { |
239 | // a error | 239 | // a error |
240 | } | 240 | } |
241 | } | 241 | } |
242 | 242 | ||
243 | public void loadConfigurationOptions() | 243 | public void loadConfigurationOptions() |
244 | { | 244 | { |
245 | configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, | 245 | configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, |
246 | "UUID of Region (Default is recommended, random UUID)", | 246 | "UUID of Region (Default is recommended, random UUID)", |
247 | LLUUID.Random().ToString(), true); | 247 | LLUUID.Random().ToString(), true); |
248 | configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 248 | configMember.addConfigurationOption("sim_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
249 | "Region Name", "OpenSim Test", false); | 249 | "Region Name", "OpenSim Test", false); |
250 | configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 250 | configMember.addConfigurationOption("sim_location_x", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
251 | "Grid Location (X Axis)", "1000", false); | 251 | "Grid Location (X Axis)", "1000", false); |
252 | configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 252 | configMember.addConfigurationOption("sim_location_y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
253 | "Grid Location (Y Axis)", "1000", false); | 253 | "Grid Location (Y Axis)", "1000", false); |
254 | configMember.addConfigurationOption("datastore", | 254 | configMember.addConfigurationOption("datastore", |
255 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 255 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
256 | "Filename for local storage", "OpenSim.db", false); | 256 | "Filename for local storage", "OpenSim.db", false); |
257 | configMember.addConfigurationOption("internal_ip_address", | 257 | configMember.addConfigurationOption("internal_ip_address", |
258 | ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, | 258 | ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS, |
259 | "Internal IP Address for incoming UDP client connections", "0.0.0.0", | 259 | "Internal IP Address for incoming UDP client connections", "0.0.0.0", |
260 | false); | 260 | false); |
261 | configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, | 261 | configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
262 | "Internal IP Port for incoming UDP client connections", | 262 | "Internal IP Port for incoming UDP client connections", |
263 | NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); | 263 | NetworkServersInfo.DefaultHttpListenerPort.ToString(), false); |
264 | configMember.addConfigurationOption("external_host_name", | 264 | configMember.addConfigurationOption("external_host_name", |
265 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 265 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
266 | "External Host Name", "127.0.0.1", false); | 266 | "External Host Name", "127.0.0.1", false); |
267 | configMember.addConfigurationOption("master_avatar_first", | 267 | configMember.addConfigurationOption("master_avatar_first", |
268 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 268 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
269 | "First Name of Master Avatar", "Test", false); | 269 | "First Name of Master Avatar", "Test", false); |
270 | configMember.addConfigurationOption("master_avatar_last", | 270 | configMember.addConfigurationOption("master_avatar_last", |
271 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 271 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
272 | "Last Name of Master Avatar", "User", false); | 272 | "Last Name of Master Avatar", "User", false); |
273 | configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 273 | configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
274 | "(Sandbox Mode Only)Password for Master Avatar account", "test", false); | 274 | "(Sandbox Mode Only)Password for Master Avatar account", "test", false); |
275 | } | 275 | } |
276 | 276 | ||
277 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 277 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
278 | { | 278 | { |
279 | switch (configuration_key) | 279 | switch (configuration_key) |
280 | { | 280 | { |
281 | case "sim_UUID": | 281 | case "sim_UUID": |
282 | RegionID = (LLUUID) configuration_result; | 282 | RegionID = (LLUUID) configuration_result; |
283 | break; | 283 | break; |
284 | case "sim_name": | 284 | case "sim_name": |
285 | RegionName = (string) configuration_result; | 285 | RegionName = (string) configuration_result; |
286 | break; | 286 | break; |
287 | case "sim_location_x": | 287 | case "sim_location_x": |
288 | m_regionLocX = (uint) configuration_result; | 288 | m_regionLocX = (uint) configuration_result; |
289 | break; | 289 | break; |
290 | case "sim_location_y": | 290 | case "sim_location_y": |
291 | m_regionLocY = (uint) configuration_result; | 291 | m_regionLocY = (uint) configuration_result; |
292 | break; | 292 | break; |
293 | case "datastore": | 293 | case "datastore": |
294 | DataStore = (string) configuration_result; | 294 | DataStore = (string) configuration_result; |
295 | break; | 295 | break; |
296 | case "internal_ip_address": | 296 | case "internal_ip_address": |
297 | IPAddress address = (IPAddress) configuration_result; | 297 | IPAddress address = (IPAddress) configuration_result; |
298 | m_internalEndPoint = new IPEndPoint(address, 0); | 298 | m_internalEndPoint = new IPEndPoint(address, 0); |
299 | break; | 299 | break; |
300 | case "internal_ip_port": | 300 | case "internal_ip_port": |
301 | m_internalEndPoint.Port = (int) configuration_result; | 301 | m_internalEndPoint.Port = (int) configuration_result; |
302 | break; | 302 | break; |
303 | case "external_host_name": | 303 | case "external_host_name": |
304 | if ((string) configuration_result != "SYSTEMIP") | 304 | if ((string) configuration_result != "SYSTEMIP") |
305 | { | 305 | { |
306 | m_externalHostName = (string) configuration_result; | 306 | m_externalHostName = (string) configuration_result; |
307 | } | 307 | } |
308 | else | 308 | else |
309 | { | 309 | { |
310 | m_externalHostName = Util.GetLocalHost().ToString(); | 310 | m_externalHostName = Util.GetLocalHost().ToString(); |
311 | } | 311 | } |
312 | break; | 312 | break; |
313 | case "master_avatar_first": | 313 | case "master_avatar_first": |
314 | MasterAvatarFirstName = (string) configuration_result; | 314 | MasterAvatarFirstName = (string) configuration_result; |
315 | break; | 315 | break; |
316 | case "master_avatar_last": | 316 | case "master_avatar_last": |
317 | MasterAvatarLastName = (string) configuration_result; | 317 | MasterAvatarLastName = (string) configuration_result; |
318 | break; | 318 | break; |
319 | case "master_avatar_pass": | 319 | case "master_avatar_pass": |
320 | string tempMD5Passwd = (string) configuration_result; | 320 | string tempMD5Passwd = (string) configuration_result; |
321 | MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); | 321 | MasterAvatarSandboxPassword = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); |
322 | break; | 322 | break; |
323 | } | 323 | } |
324 | 324 | ||
325 | return true; | 325 | return true; |
326 | } | 326 | } |
327 | } | 327 | } |
328 | } \ No newline at end of file | 328 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/UUID.cs b/OpenSim/Framework/General/UUID.cs index f27cd6c..3b292b1 100644 --- a/OpenSim/Framework/General/UUID.cs +++ b/OpenSim/Framework/General/UUID.cs | |||
@@ -1,155 +1,155 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | 31 | ||
32 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
33 | { | 33 | { |
34 | internal class UUID | 34 | internal class UUID |
35 | { | 35 | { |
36 | public LLUUID llUUID; | 36 | public LLUUID llUUID; |
37 | 37 | ||
38 | public UUID(string uuid) | 38 | public UUID(string uuid) |
39 | { | 39 | { |
40 | llUUID = new LLUUID(uuid); | 40 | llUUID = new LLUUID(uuid); |
41 | } | 41 | } |
42 | 42 | ||
43 | public UUID(byte[] uuid) | 43 | public UUID(byte[] uuid) |
44 | { | 44 | { |
45 | llUUID = new LLUUID(uuid, 0); | 45 | llUUID = new LLUUID(uuid, 0); |
46 | } | 46 | } |
47 | 47 | ||
48 | public UUID(byte[] uuid, int offset) | 48 | public UUID(byte[] uuid, int offset) |
49 | { | 49 | { |
50 | llUUID = new LLUUID(uuid, offset); | 50 | llUUID = new LLUUID(uuid, offset); |
51 | } | 51 | } |
52 | 52 | ||
53 | public UUID() | 53 | public UUID() |
54 | { | 54 | { |
55 | llUUID = LLUUID.Zero; | 55 | llUUID = LLUUID.Zero; |
56 | } | 56 | } |
57 | 57 | ||
58 | public UUID(ulong uuid) | 58 | public UUID(ulong uuid) |
59 | { | 59 | { |
60 | llUUID = new LLUUID(uuid); | 60 | llUUID = new LLUUID(uuid); |
61 | } | 61 | } |
62 | 62 | ||
63 | public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth) | 63 | public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth) |
64 | { | 64 | { |
65 | byte[] uuid = new byte[16]; | 65 | byte[] uuid = new byte[16]; |
66 | 66 | ||
67 | byte[] n = BitConverter.GetBytes(first); | 67 | byte[] n = BitConverter.GetBytes(first); |
68 | n.CopyTo(uuid, 0); | 68 | n.CopyTo(uuid, 0); |
69 | n = BitConverter.GetBytes(second); | 69 | n = BitConverter.GetBytes(second); |
70 | n.CopyTo(uuid, 4); | 70 | n.CopyTo(uuid, 4); |
71 | n = BitConverter.GetBytes(third); | 71 | n = BitConverter.GetBytes(third); |
72 | n.CopyTo(uuid, 8); | 72 | n.CopyTo(uuid, 8); |
73 | n = BitConverter.GetBytes(fourth); | 73 | n = BitConverter.GetBytes(fourth); |
74 | n.CopyTo(uuid, 12); | 74 | n.CopyTo(uuid, 12); |
75 | 75 | ||
76 | llUUID = new LLUUID(uuid, 0); | 76 | llUUID = new LLUUID(uuid, 0); |
77 | } | 77 | } |
78 | 78 | ||
79 | public override string ToString() | 79 | public override string ToString() |
80 | { | 80 | { |
81 | return llUUID.ToString(); | 81 | return llUUID.ToString(); |
82 | } | 82 | } |
83 | 83 | ||
84 | public string ToStringHyphenated() | 84 | public string ToStringHyphenated() |
85 | { | 85 | { |
86 | return llUUID.ToStringHyphenated(); | 86 | return llUUID.ToStringHyphenated(); |
87 | } | 87 | } |
88 | 88 | ||
89 | public byte[] GetBytes() | 89 | public byte[] GetBytes() |
90 | { | 90 | { |
91 | return llUUID.GetBytes(); | 91 | return llUUID.GetBytes(); |
92 | } | 92 | } |
93 | 93 | ||
94 | public UInt32[] GetInts() | 94 | public UInt32[] GetInts() |
95 | { | 95 | { |
96 | UInt32[] ints = new UInt32[4]; | 96 | UInt32[] ints = new UInt32[4]; |
97 | ints[0] = BitConverter.ToUInt32(llUUID.Data, 0); | 97 | ints[0] = BitConverter.ToUInt32(llUUID.Data, 0); |
98 | ints[1] = BitConverter.ToUInt32(llUUID.Data, 4); | 98 | ints[1] = BitConverter.ToUInt32(llUUID.Data, 4); |
99 | ints[2] = BitConverter.ToUInt32(llUUID.Data, 8); | 99 | ints[2] = BitConverter.ToUInt32(llUUID.Data, 8); |
100 | ints[3] = BitConverter.ToUInt32(llUUID.Data, 12); | 100 | ints[3] = BitConverter.ToUInt32(llUUID.Data, 12); |
101 | 101 | ||
102 | return ints; | 102 | return ints; |
103 | } | 103 | } |
104 | 104 | ||
105 | public LLUUID GetLLUUID() | 105 | public LLUUID GetLLUUID() |
106 | { | 106 | { |
107 | return llUUID; | 107 | return llUUID; |
108 | } | 108 | } |
109 | 109 | ||
110 | public uint CRC() | 110 | public uint CRC() |
111 | { | 111 | { |
112 | return llUUID.CRC(); | 112 | return llUUID.CRC(); |
113 | } | 113 | } |
114 | 114 | ||
115 | public override int GetHashCode() | 115 | public override int GetHashCode() |
116 | { | 116 | { |
117 | return llUUID.GetHashCode(); | 117 | return llUUID.GetHashCode(); |
118 | } | 118 | } |
119 | 119 | ||
120 | public void Combine(UUID other) | 120 | public void Combine(UUID other) |
121 | { | 121 | { |
122 | llUUID.Combine(other.GetLLUUID()); | 122 | llUUID.Combine(other.GetLLUUID()); |
123 | } | 123 | } |
124 | 124 | ||
125 | public void Combine(LLUUID other) | 125 | public void Combine(LLUUID other) |
126 | { | 126 | { |
127 | llUUID.Combine(other); | 127 | llUUID.Combine(other); |
128 | } | 128 | } |
129 | 129 | ||
130 | public override bool Equals(Object other) | 130 | public override bool Equals(Object other) |
131 | { | 131 | { |
132 | return llUUID.Equals(other); | 132 | return llUUID.Equals(other); |
133 | } | 133 | } |
134 | 134 | ||
135 | public static bool operator ==(UUID a, UUID b) | 135 | public static bool operator ==(UUID a, UUID b) |
136 | { | 136 | { |
137 | return a.llUUID.Equals(b.GetLLUUID()); | 137 | return a.llUUID.Equals(b.GetLLUUID()); |
138 | } | 138 | } |
139 | 139 | ||
140 | public static bool operator !=(UUID a, UUID b) | 140 | public static bool operator !=(UUID a, UUID b) |
141 | { | 141 | { |
142 | return !a.llUUID.Equals(b.GetLLUUID()); | 142 | return !a.llUUID.Equals(b.GetLLUUID()); |
143 | } | 143 | } |
144 | 144 | ||
145 | public static bool operator ==(UUID a, LLUUID b) | 145 | public static bool operator ==(UUID a, LLUUID b) |
146 | { | 146 | { |
147 | return a.Equals(b); | 147 | return a.Equals(b); |
148 | } | 148 | } |
149 | 149 | ||
150 | public static bool operator !=(UUID a, LLUUID b) | 150 | public static bool operator !=(UUID a, LLUUID b) |
151 | { | 151 | { |
152 | return !a.Equals(b); | 152 | return !a.Equals(b); |
153 | } | 153 | } |
154 | } | 154 | } |
155 | } \ No newline at end of file | 155 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/UserConfig.cs b/OpenSim/Framework/General/UserConfig.cs index 9abe61f..fdb8f82 100644 --- a/OpenSim/Framework/General/UserConfig.cs +++ b/OpenSim/Framework/General/UserConfig.cs | |||
@@ -1,103 +1,103 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | namespace OpenSim.Framework | 29 | namespace OpenSim.Framework |
30 | { | 30 | { |
31 | /// <summary> | 31 | /// <summary> |
32 | /// UserConfig -- For User Server Configuration | 32 | /// UserConfig -- For User Server Configuration |
33 | /// </summary> | 33 | /// </summary> |
34 | public class UserConfig | 34 | public class UserConfig |
35 | { | 35 | { |
36 | public string DefaultStartupMsg = ""; | 36 | public string DefaultStartupMsg = ""; |
37 | public string GridServerURL = ""; | 37 | public string GridServerURL = ""; |
38 | public string GridSendKey = ""; | 38 | public string GridSendKey = ""; |
39 | public string GridRecvKey = ""; | 39 | public string GridRecvKey = ""; |
40 | 40 | ||
41 | public string DatabaseProvider = ""; | 41 | public string DatabaseProvider = ""; |
42 | 42 | ||
43 | public static uint DefaultHttpPort = 8002; | 43 | public static uint DefaultHttpPort = 8002; |
44 | public uint HttpPort = DefaultHttpPort; | 44 | public uint HttpPort = DefaultHttpPort; |
45 | 45 | ||
46 | private ConfigurationMember configMember; | 46 | private ConfigurationMember configMember; |
47 | 47 | ||
48 | public UserConfig(string description, string filename) | 48 | public UserConfig(string description, string filename) |
49 | { | 49 | { |
50 | configMember = | 50 | configMember = |
51 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); | 51 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration); |
52 | configMember.performConfigurationRetrieve(); | 52 | configMember.performConfigurationRetrieve(); |
53 | } | 53 | } |
54 | 54 | ||
55 | public void loadConfigurationOptions() | 55 | public void loadConfigurationOptions() |
56 | { | 56 | { |
57 | configMember.addConfigurationOption("default_startup_message", | 57 | configMember.addConfigurationOption("default_startup_message", |
58 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 58 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
59 | "Default Startup Message", "Welcome to OGS", false); | 59 | "Default Startup Message", "Welcome to OGS", false); |
60 | 60 | ||
61 | configMember.addConfigurationOption("default_grid_server", | 61 | configMember.addConfigurationOption("default_grid_server", |
62 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 62 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
63 | "Default Grid Server URI", | 63 | "Default Grid Server URI", |
64 | "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/", false); | 64 | "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/", false); |
65 | configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 65 | configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
66 | "Key to send to grid server", "null", false); | 66 | "Key to send to grid server", "null", false); |
67 | configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 67 | configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
68 | "Key to expect from grid server", "null", false); | 68 | "Key to expect from grid server", "null", false); |
69 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | 69 | configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, |
70 | "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); | 70 | "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false); |
71 | 71 | ||
72 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 72 | configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
73 | "Http Listener port", DefaultHttpPort.ToString(), false); | 73 | "Http Listener port", DefaultHttpPort.ToString(), false); |
74 | } | 74 | } |
75 | 75 | ||
76 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 76 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
77 | { | 77 | { |
78 | switch (configuration_key) | 78 | switch (configuration_key) |
79 | { | 79 | { |
80 | case "default_startup_message": | 80 | case "default_startup_message": |
81 | DefaultStartupMsg = (string) configuration_result; | 81 | DefaultStartupMsg = (string) configuration_result; |
82 | break; | 82 | break; |
83 | case "default_grid_server": | 83 | case "default_grid_server": |
84 | GridServerURL = (string) configuration_result; | 84 | GridServerURL = (string) configuration_result; |
85 | break; | 85 | break; |
86 | case "grid_send_key": | 86 | case "grid_send_key": |
87 | GridSendKey = (string) configuration_result; | 87 | GridSendKey = (string) configuration_result; |
88 | break; | 88 | break; |
89 | case "grid_recv_key": | 89 | case "grid_recv_key": |
90 | GridRecvKey = (string) configuration_result; | 90 | GridRecvKey = (string) configuration_result; |
91 | break; | 91 | break; |
92 | case "database_provider": | 92 | case "database_provider": |
93 | DatabaseProvider = (string) configuration_result; | 93 | DatabaseProvider = (string) configuration_result; |
94 | break; | 94 | break; |
95 | case "http_port": | 95 | case "http_port": |
96 | HttpPort = (uint) configuration_result; | 96 | HttpPort = (uint) configuration_result; |
97 | break; | 97 | break; |
98 | } | 98 | } |
99 | 99 | ||
100 | return true; | 100 | return true; |
101 | } | 101 | } |
102 | } | 102 | } |
103 | } \ No newline at end of file | 103 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/General/UserProfileData.cs b/OpenSim/Framework/General/UserProfileData.cs index ed70246..d10aa36 100644 --- a/OpenSim/Framework/General/UserProfileData.cs +++ b/OpenSim/Framework/General/UserProfileData.cs | |||
@@ -1,214 +1,214 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | 30 | ||
31 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
32 | { | 32 | { |
33 | /// <summary> | 33 | /// <summary> |
34 | /// Information about a particular user known to the userserver | 34 | /// Information about a particular user known to the userserver |
35 | /// </summary> | 35 | /// </summary> |
36 | public class UserProfileData | 36 | public class UserProfileData |
37 | { | 37 | { |
38 | /// <summary> | 38 | /// <summary> |
39 | /// The ID value for this user | 39 | /// The ID value for this user |
40 | /// </summary> | 40 | /// </summary> |
41 | public LLUUID UUID; | 41 | public LLUUID UUID; |
42 | 42 | ||
43 | /// <summary> | 43 | /// <summary> |
44 | /// The first component of a users account name | 44 | /// The first component of a users account name |
45 | /// </summary> | 45 | /// </summary> |
46 | public string username; | 46 | public string username; |
47 | 47 | ||
48 | /// <summary> | 48 | /// <summary> |
49 | /// The second component of a users account name | 49 | /// The second component of a users account name |
50 | /// </summary> | 50 | /// </summary> |
51 | public string surname; | 51 | public string surname; |
52 | 52 | ||
53 | /// <summary> | 53 | /// <summary> |
54 | /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) | 54 | /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) |
55 | /// </summary> | 55 | /// </summary> |
56 | /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> | 56 | /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> |
57 | public string passwordHash; | 57 | public string passwordHash; |
58 | 58 | ||
59 | /// <summary> | 59 | /// <summary> |
60 | /// The salt used for the users hash, should be 32 bytes or longer | 60 | /// The salt used for the users hash, should be 32 bytes or longer |
61 | /// </summary> | 61 | /// </summary> |
62 | public string passwordSalt; | 62 | public string passwordSalt; |
63 | 63 | ||
64 | /// <summary> | 64 | /// <summary> |
65 | /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into | 65 | /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into |
66 | /// </summary> | 66 | /// </summary> |
67 | public ulong homeRegion | 67 | public ulong homeRegion |
68 | { | 68 | { |
69 | get { return Helpers.UIntsToLong((homeRegionX*256), (homeRegionY*256)); } | 69 | get { return Helpers.UIntsToLong((homeRegionX*256), (homeRegionY*256)); } |
70 | set | 70 | set |
71 | { | 71 | { |
72 | homeRegionX = (uint) (value >> 40); | 72 | homeRegionX = (uint) (value >> 40); |
73 | homeRegionY = (((uint) (value)) >> 8); | 73 | homeRegionY = (((uint) (value)) >> 8); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | public uint homeRegionX; | 77 | public uint homeRegionX; |
78 | public uint homeRegionY; | 78 | public uint homeRegionY; |
79 | 79 | ||
80 | /// <summary> | 80 | /// <summary> |
81 | /// The coordinates inside the region of the home location | 81 | /// The coordinates inside the region of the home location |
82 | /// </summary> | 82 | /// </summary> |
83 | public LLVector3 homeLocation; | 83 | public LLVector3 homeLocation; |
84 | 84 | ||
85 | /// <summary> | 85 | /// <summary> |
86 | /// Where the user will be looking when they rez. | 86 | /// Where the user will be looking when they rez. |
87 | /// </summary> | 87 | /// </summary> |
88 | public LLVector3 homeLookAt; | 88 | public LLVector3 homeLookAt; |
89 | 89 | ||
90 | /// <summary> | 90 | /// <summary> |
91 | /// A UNIX Timestamp (seconds since epoch) for the users creation | 91 | /// A UNIX Timestamp (seconds since epoch) for the users creation |
92 | /// </summary> | 92 | /// </summary> |
93 | public int created; | 93 | public int created; |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
96 | /// A UNIX Timestamp for the users last login date / time | 96 | /// A UNIX Timestamp for the users last login date / time |
97 | /// </summary> | 97 | /// </summary> |
98 | public int lastLogin; | 98 | public int lastLogin; |
99 | 99 | ||
100 | public LLUUID rootInventoryFolderID; | 100 | public LLUUID rootInventoryFolderID; |
101 | 101 | ||
102 | /// <summary> | 102 | /// <summary> |
103 | /// A URI to the users inventory server, used for foreigners and large grids | 103 | /// A URI to the users inventory server, used for foreigners and large grids |
104 | /// </summary> | 104 | /// </summary> |
105 | public string userInventoryURI = String.Empty; | 105 | public string userInventoryURI = String.Empty; |
106 | 106 | ||
107 | /// <summary> | 107 | /// <summary> |
108 | /// A URI to the users asset server, used for foreigners and large grids. | 108 | /// A URI to the users asset server, used for foreigners and large grids. |
109 | /// </summary> | 109 | /// </summary> |
110 | public string userAssetURI = String.Empty; | 110 | public string userAssetURI = String.Empty; |
111 | 111 | ||
112 | /// <summary> | 112 | /// <summary> |
113 | /// A uint mask containing the "I can do" fields of the users profile | 113 | /// A uint mask containing the "I can do" fields of the users profile |
114 | /// </summary> | 114 | /// </summary> |
115 | public uint profileCanDoMask; | 115 | public uint profileCanDoMask; |
116 | 116 | ||
117 | /// <summary> | 117 | /// <summary> |
118 | /// A uint mask containing the "I want to do" part of the users profile | 118 | /// A uint mask containing the "I want to do" part of the users profile |
119 | /// </summary> | 119 | /// </summary> |
120 | public uint profileWantDoMask; // Profile window "I want to" mask | 120 | public uint profileWantDoMask; // Profile window "I want to" mask |
121 | 121 | ||
122 | /// <summary> | 122 | /// <summary> |
123 | /// The about text listed in a users profile. | 123 | /// The about text listed in a users profile. |
124 | /// </summary> | 124 | /// </summary> |
125 | public string profileAboutText = String.Empty; | 125 | public string profileAboutText = String.Empty; |
126 | 126 | ||
127 | /// <summary> | 127 | /// <summary> |
128 | /// The first life about text listed in a users profile | 128 | /// The first life about text listed in a users profile |
129 | /// </summary> | 129 | /// </summary> |
130 | public string profileFirstText = String.Empty; | 130 | public string profileFirstText = String.Empty; |
131 | 131 | ||
132 | /// <summary> | 132 | /// <summary> |
133 | /// The profile image for an avatar stored on the asset server | 133 | /// The profile image for an avatar stored on the asset server |
134 | /// </summary> | 134 | /// </summary> |
135 | public LLUUID profileImage; | 135 | public LLUUID profileImage; |
136 | 136 | ||
137 | /// <summary> | 137 | /// <summary> |
138 | /// The profile image for the users first life tab | 138 | /// The profile image for the users first life tab |
139 | /// </summary> | 139 | /// </summary> |
140 | public LLUUID profileFirstImage; | 140 | public LLUUID profileFirstImage; |
141 | 141 | ||
142 | /// <summary> | 142 | /// <summary> |
143 | /// The users last registered agent (filled in on the user server) | 143 | /// The users last registered agent (filled in on the user server) |
144 | /// </summary> | 144 | /// </summary> |
145 | public UserAgentData currentAgent; | 145 | public UserAgentData currentAgent; |
146 | } | 146 | } |
147 | 147 | ||
148 | /// <summary> | 148 | /// <summary> |
149 | /// Information about a users session | 149 | /// Information about a users session |
150 | /// </summary> | 150 | /// </summary> |
151 | public class UserAgentData | 151 | public class UserAgentData |
152 | { | 152 | { |
153 | /// <summary> | 153 | /// <summary> |
154 | /// The UUID of the users avatar (not the agent!) | 154 | /// The UUID of the users avatar (not the agent!) |
155 | /// </summary> | 155 | /// </summary> |
156 | public LLUUID UUID; | 156 | public LLUUID UUID; |
157 | 157 | ||
158 | /// <summary> | 158 | /// <summary> |
159 | /// The IP address of the user | 159 | /// The IP address of the user |
160 | /// </summary> | 160 | /// </summary> |
161 | public string agentIP = String.Empty; | 161 | public string agentIP = String.Empty; |
162 | 162 | ||
163 | /// <summary> | 163 | /// <summary> |
164 | /// The port of the user | 164 | /// The port of the user |
165 | /// </summary> | 165 | /// </summary> |
166 | public uint agentPort; | 166 | public uint agentPort; |
167 | 167 | ||
168 | /// <summary> | 168 | /// <summary> |
169 | /// Is the user online? | 169 | /// Is the user online? |
170 | /// </summary> | 170 | /// </summary> |
171 | public bool agentOnline; | 171 | public bool agentOnline; |
172 | 172 | ||
173 | /// <summary> | 173 | /// <summary> |
174 | /// The session ID for the user (also the agent ID) | 174 | /// The session ID for the user (also the agent ID) |
175 | /// </summary> | 175 | /// </summary> |
176 | public LLUUID sessionID; | 176 | public LLUUID sessionID; |
177 | 177 | ||
178 | /// <summary> | 178 | /// <summary> |
179 | /// The "secure" session ID for the user | 179 | /// The "secure" session ID for the user |
180 | /// </summary> | 180 | /// </summary> |
181 | /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks> | 181 | /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks> |
182 | public LLUUID secureSessionID; | 182 | public LLUUID secureSessionID; |
183 | 183 | ||
184 | /// <summary> | 184 | /// <summary> |
185 | /// The region the user logged into initially | 185 | /// The region the user logged into initially |
186 | /// </summary> | 186 | /// </summary> |
187 | public LLUUID regionID; | 187 | public LLUUID regionID; |
188 | 188 | ||
189 | /// <summary> | 189 | /// <summary> |
190 | /// A unix timestamp from when the user logged in | 190 | /// A unix timestamp from when the user logged in |
191 | /// </summary> | 191 | /// </summary> |
192 | public int loginTime; | 192 | public int loginTime; |
193 | 193 | ||
194 | /// <summary> | 194 | /// <summary> |
195 | /// When this agent expired and logged out, 0 if still online | 195 | /// When this agent expired and logged out, 0 if still online |
196 | /// </summary> | 196 | /// </summary> |
197 | public int logoutTime; | 197 | public int logoutTime; |
198 | 198 | ||
199 | /// <summary> | 199 | /// <summary> |
200 | /// Current region the user is logged into | 200 | /// Current region the user is logged into |
201 | /// </summary> | 201 | /// </summary> |
202 | public LLUUID currentRegion; | 202 | public LLUUID currentRegion; |
203 | 203 | ||
204 | /// <summary> | 204 | /// <summary> |
205 | /// Region handle of the current region the user is in | 205 | /// Region handle of the current region the user is in |
206 | /// </summary> | 206 | /// </summary> |
207 | public ulong currentHandle; | 207 | public ulong currentHandle; |
208 | 208 | ||
209 | /// <summary> | 209 | /// <summary> |
210 | /// The position of the user within the region | 210 | /// The position of the user within the region |
211 | /// </summary> | 211 | /// </summary> |
212 | public LLVector3 currentPos; | 212 | public LLVector3 currentPos; |
213 | } | 213 | } |
214 | } \ No newline at end of file | 214 | } \ No newline at end of file |