aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General
diff options
context:
space:
mode:
authorSean Dague2007-07-16 15:40:11 +0000
committerSean Dague2007-07-16 15:40:11 +0000
commit2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6 (patch)
treee3f80ad51736cf17e856547b1bcf956010927434 /OpenSim/Framework/General
parent*Trunk compiles now (diff)
downloadopensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.zip
opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.gz
opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.bz2
opensim-SC_OLD-2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6.tar.xz
changed to native line ending encoding
Diffstat (limited to 'OpenSim/Framework/General')
-rw-r--r--OpenSim/Framework/General/AgentInventory.cs530
-rw-r--r--OpenSim/Framework/General/AuthenticateSessionBase.cs258
-rw-r--r--OpenSim/Framework/General/BlockingQueue.cs116
-rw-r--r--OpenSim/Framework/General/ClientManager.cs72
-rw-r--r--OpenSim/Framework/General/IRegionCommsListener.cs92
-rw-r--r--OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs86
-rw-r--r--OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs76
-rw-r--r--OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs118
-rw-r--r--OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs106
-rw-r--r--OpenSim/Framework/General/Interfaces/IAssetServer.cs128
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs390
-rw-r--r--OpenSim/Framework/General/Interfaces/ILocalStorage.cs142
-rw-r--r--OpenSim/Framework/General/Interfaces/IUserServer.cs78
-rw-r--r--OpenSim/Framework/General/Interfaces/IWorld.cs84
-rw-r--r--OpenSim/Framework/General/NpcClientBase.cs254
-rw-r--r--OpenSim/Framework/General/Properties/AssemblyInfo.cs62
-rw-r--r--OpenSim/Framework/General/RegionCommsListener.cs206
-rw-r--r--OpenSim/Framework/General/Remoting.cs270
-rw-r--r--OpenSim/Framework/General/Types/AgentCiruitData.cs98
-rw-r--r--OpenSim/Framework/General/Types/AgentWearable.cs114
-rw-r--r--OpenSim/Framework/General/Types/AssetBase.cs92
-rw-r--r--OpenSim/Framework/General/Types/AssetLandmark.cs118
-rw-r--r--OpenSim/Framework/General/Types/AssetStorage.cs94
-rw-r--r--OpenSim/Framework/General/Types/EstateSettings.cs186
-rw-r--r--OpenSim/Framework/General/Types/Login.cs98
-rw-r--r--OpenSim/Framework/General/Types/MapBlockData.cs46
-rw-r--r--OpenSim/Framework/General/Types/NeighbourInfo.cs84
-rw-r--r--OpenSim/Framework/General/Types/NetworkServersInfo.cs438
-rw-r--r--OpenSim/Framework/General/Types/ParcelData.cs240
-rw-r--r--OpenSim/Framework/General/Types/PrimData.cs456
-rw-r--r--OpenSim/Framework/General/Types/PrimitiveBaseShape.cs218
-rw-r--r--OpenSim/Framework/General/Types/RegionHandle.cs242
-rw-r--r--OpenSim/Framework/General/Types/RegionInfo.cs684
-rw-r--r--OpenSim/Framework/General/Types/UUID.cs254
-rw-r--r--OpenSim/Framework/General/UserProfile.cs174
-rw-r--r--OpenSim/Framework/General/Util.cs368
36 files changed, 3536 insertions, 3536 deletions
diff --git a/OpenSim/Framework/General/AgentInventory.cs b/OpenSim/Framework/General/AgentInventory.cs
index e45a0cd..0aeb0b3 100644
--- a/OpenSim/Framework/General/AgentInventory.cs
+++ b/OpenSim/Framework/General/AgentInventory.cs
@@ -1,265 +1,265 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using libsecondlife;
30using libsecondlife.Packets; 30using libsecondlife.Packets;
31using OpenSim.Framework.Types; 31using OpenSim.Framework.Types;
32using OpenSim.Framework.Utilities; 32using OpenSim.Framework.Utilities;
33 33
34namespace OpenSim.Framework.Inventory 34namespace OpenSim.Framework.Inventory
35{ 35{
36 public class AgentInventory 36 public class AgentInventory
37 { 37 {
38 //Holds the local copy of Inventory info for a agent 38 //Holds the local copy of Inventory info for a agent
39 public Dictionary<LLUUID, InventoryFolder> InventoryFolders; 39 public Dictionary<LLUUID, InventoryFolder> InventoryFolders;
40 public Dictionary<LLUUID, InventoryItem> InventoryItems; 40 public Dictionary<LLUUID, InventoryItem> InventoryItems;
41 public InventoryFolder InventoryRoot; 41 public InventoryFolder InventoryRoot;
42 public int LastCached; //maybe used by opensim app, time this was last stored/compared to user server 42 public int LastCached; //maybe used by opensim app, time this was last stored/compared to user server
43 public LLUUID AgentID; 43 public LLUUID AgentID;
44 public AvatarWearable[] Wearables; 44 public AvatarWearable[] Wearables;
45 45
46 public AgentInventory() 46 public AgentInventory()
47 { 47 {
48 InventoryFolders = new Dictionary<LLUUID, InventoryFolder>(); 48 InventoryFolders = new Dictionary<LLUUID, InventoryFolder>();
49 InventoryItems = new Dictionary<LLUUID, InventoryItem>(); 49 InventoryItems = new Dictionary<LLUUID, InventoryItem>();
50 this.Initialise(); 50 this.Initialise();
51 } 51 }
52 52
53 public virtual void Initialise() 53 public virtual void Initialise()
54 { 54 {
55 Wearables = new AvatarWearable[13]; //should be 12 of these 55 Wearables = new AvatarWearable[13]; //should be 12 of these
56 for (int i = 0; i < 13; i++) 56 for (int i = 0; i < 13; i++)
57 { 57 {
58 Wearables[i] = new AvatarWearable(); 58 Wearables[i] = new AvatarWearable();
59 } 59 }
60 60
61 } 61 }
62 62
63 public bool CreateNewFolder(LLUUID folderID, ushort type) 63 public bool CreateNewFolder(LLUUID folderID, ushort type)
64 { 64 {
65 InventoryFolder Folder = new InventoryFolder(); 65 InventoryFolder Folder = new InventoryFolder();
66 Folder.FolderID = folderID; 66 Folder.FolderID = folderID;
67 Folder.OwnerID = this.AgentID; 67 Folder.OwnerID = this.AgentID;
68 Folder.DefaultType = type; 68 Folder.DefaultType = type;
69 this.InventoryFolders.Add(Folder.FolderID, Folder); 69 this.InventoryFolders.Add(Folder.FolderID, Folder);
70 return (true); 70 return (true);
71 } 71 }
72 72
73 public void CreateRootFolder(LLUUID newAgentID, bool createTextures) 73 public void CreateRootFolder(LLUUID newAgentID, bool createTextures)
74 { 74 {
75 this.AgentID = newAgentID; 75 this.AgentID = newAgentID;
76 InventoryRoot = new InventoryFolder(); 76 InventoryRoot = new InventoryFolder();
77 InventoryRoot.FolderID = LLUUID.Random(); 77 InventoryRoot.FolderID = LLUUID.Random();
78 InventoryRoot.ParentID = new LLUUID(); 78 InventoryRoot.ParentID = new LLUUID();
79 InventoryRoot.Version = 1; 79 InventoryRoot.Version = 1;
80 InventoryRoot.DefaultType = 8; 80 InventoryRoot.DefaultType = 8;
81 InventoryRoot.OwnerID = this.AgentID; 81 InventoryRoot.OwnerID = this.AgentID;
82 InventoryRoot.FolderName = "My Inventory"; 82 InventoryRoot.FolderName = "My Inventory";
83 InventoryFolders.Add(InventoryRoot.FolderID, InventoryRoot); 83 InventoryFolders.Add(InventoryRoot.FolderID, InventoryRoot);
84 InventoryRoot.OwnerID = this.AgentID; 84 InventoryRoot.OwnerID = this.AgentID;
85 if (createTextures) 85 if (createTextures)
86 { 86 {
87 this.CreateNewFolder(LLUUID.Random(), 0, "Textures", InventoryRoot.FolderID); 87 this.CreateNewFolder(LLUUID.Random(), 0, "Textures", InventoryRoot.FolderID);
88 } 88 }
89 } 89 }
90 90
91 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName) 91 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName)
92 { 92 {
93 InventoryFolder Folder = new InventoryFolder(); 93 InventoryFolder Folder = new InventoryFolder();
94 Folder.FolderID = folderID; 94 Folder.FolderID = folderID;
95 Folder.OwnerID = this.AgentID; 95 Folder.OwnerID = this.AgentID;
96 Folder.DefaultType = type; 96 Folder.DefaultType = type;
97 Folder.FolderName = folderName; 97 Folder.FolderName = folderName;
98 this.InventoryFolders.Add(Folder.FolderID, Folder); 98 this.InventoryFolders.Add(Folder.FolderID, Folder);
99 99
100 return (true); 100 return (true);
101 } 101 }
102 102
103 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent) 103 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent)
104 { 104 {
105 if (!this.InventoryFolders.ContainsKey(folderID)) 105 if (!this.InventoryFolders.ContainsKey(folderID))
106 { 106 {
107 System.Console.WriteLine("creating new folder called " + folderName + " in agents inventory"); 107 System.Console.WriteLine("creating new folder called " + folderName + " in agents inventory");
108 InventoryFolder Folder = new InventoryFolder(); 108 InventoryFolder Folder = new InventoryFolder();
109 Folder.FolderID = folderID; 109 Folder.FolderID = folderID;
110 Folder.OwnerID = this.AgentID; 110 Folder.OwnerID = this.AgentID;
111 Folder.DefaultType = type; 111 Folder.DefaultType = type;
112 Folder.FolderName = folderName; 112 Folder.FolderName = folderName;
113 Folder.ParentID = parent; 113 Folder.ParentID = parent;
114 this.InventoryFolders.Add(Folder.FolderID, Folder); 114 this.InventoryFolders.Add(Folder.FolderID, Folder);
115 } 115 }
116 116
117 return (true); 117 return (true);
118 } 118 }
119 119
120 public bool HasFolder(LLUUID folderID) 120 public bool HasFolder(LLUUID folderID)
121 { 121 {
122 if (this.InventoryFolders.ContainsKey(folderID)) 122 if (this.InventoryFolders.ContainsKey(folderID))
123 { 123 {
124 return true; 124 return true;
125 } 125 }
126 return false; 126 return false;
127 } 127 }
128 128
129 public LLUUID GetFolderID(string folderName) 129 public LLUUID GetFolderID(string folderName)
130 { 130 {
131 foreach (InventoryFolder inv in this.InventoryFolders.Values) 131 foreach (InventoryFolder inv in this.InventoryFolders.Values)
132 { 132 {
133 if (inv.FolderName == folderName) 133 if (inv.FolderName == folderName)
134 { 134 {
135 return inv.FolderID; 135 return inv.FolderID;
136 } 136 }
137 } 137 }
138 138
139 return LLUUID.Zero; 139 return LLUUID.Zero;
140 } 140 }
141 141
142 public bool UpdateItemAsset(LLUUID itemID, AssetBase asset) 142 public bool UpdateItemAsset(LLUUID itemID, AssetBase asset)
143 { 143 {
144 if(this.InventoryItems.ContainsKey(itemID)) 144 if(this.InventoryItems.ContainsKey(itemID))
145 { 145 {
146 InventoryItem Item = this.InventoryItems[itemID]; 146 InventoryItem Item = this.InventoryItems[itemID];
147 Item.AssetID = asset.FullID; 147 Item.AssetID = asset.FullID;
148 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + " so it now is set to asset " + asset.FullID.ToStringHyphenated()); 148 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + " so it now is set to asset " + asset.FullID.ToStringHyphenated());
149 //TODO need to update the rest of the info 149 //TODO need to update the rest of the info
150 } 150 }
151 return true; 151 return true;
152 } 152 }
153 153
154 public bool UpdateItemDetails(LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet) 154 public bool UpdateItemDetails(LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet)
155 { 155 {
156 System.Console.WriteLine("updating inventory item details"); 156 System.Console.WriteLine("updating inventory item details");
157 if (this.InventoryItems.ContainsKey(itemID)) 157 if (this.InventoryItems.ContainsKey(itemID))
158 { 158 {
159 System.Console.WriteLine("changing name to "+ Util.FieldToString(packet.Name)); 159 System.Console.WriteLine("changing name to "+ Util.FieldToString(packet.Name));
160 InventoryItem Item = this.InventoryItems[itemID]; 160 InventoryItem Item = this.InventoryItems[itemID];
161 Item.Name = Util.FieldToString(packet.Name); 161 Item.Name = Util.FieldToString(packet.Name);
162 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated()); 162 System.Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated());
163 //TODO need to update the rest of the info 163 //TODO need to update the rest of the info
164 } 164 }
165 return true; 165 return true;
166 } 166 }
167 167
168 public LLUUID AddToInventory(LLUUID folderID, AssetBase asset) 168 public LLUUID AddToInventory(LLUUID folderID, AssetBase asset)
169 { 169 {
170 if (this.InventoryFolders.ContainsKey(folderID)) 170 if (this.InventoryFolders.ContainsKey(folderID))
171 { 171 {
172 LLUUID NewItemID = LLUUID.Random(); 172 LLUUID NewItemID = LLUUID.Random();
173 173
174 InventoryItem Item = new InventoryItem(); 174 InventoryItem Item = new InventoryItem();
175 Item.FolderID = folderID; 175 Item.FolderID = folderID;
176 Item.OwnerID = AgentID; 176 Item.OwnerID = AgentID;
177 Item.AssetID = asset.FullID; 177 Item.AssetID = asset.FullID;
178 Item.ItemID = NewItemID; 178 Item.ItemID = NewItemID;
179 Item.Type = asset.Type; 179 Item.Type = asset.Type;
180 Item.Name = asset.Name; 180 Item.Name = asset.Name;
181 Item.Description = asset.Description; 181 Item.Description = asset.Description;
182 Item.InvType = asset.InvType; 182 Item.InvType = asset.InvType;
183 this.InventoryItems.Add(Item.ItemID, Item); 183 this.InventoryItems.Add(Item.ItemID, Item);
184 InventoryFolder Folder = InventoryFolders[Item.FolderID]; 184 InventoryFolder Folder = InventoryFolders[Item.FolderID];
185 Folder.Items.Add(Item); 185 Folder.Items.Add(Item);
186 return (Item.ItemID); 186 return (Item.ItemID);
187 } 187 }
188 else 188 else
189 { 189 {
190 return (null); 190 return (null);
191 } 191 }
192 } 192 }
193 193
194 public bool DeleteFromInventory(LLUUID itemID) 194 public bool DeleteFromInventory(LLUUID itemID)
195 { 195 {
196 bool res = false; 196 bool res = false;
197 if (this.InventoryItems.ContainsKey(itemID)) 197 if (this.InventoryItems.ContainsKey(itemID))
198 { 198 {
199 InventoryItem item = this.InventoryItems[itemID]; 199 InventoryItem item = this.InventoryItems[itemID];
200 this.InventoryItems.Remove(itemID); 200 this.InventoryItems.Remove(itemID);
201 foreach (InventoryFolder fold in InventoryFolders.Values) 201 foreach (InventoryFolder fold in InventoryFolders.Values)
202 { 202 {
203 if (fold.Items.Contains(item)) 203 if (fold.Items.Contains(item))
204 { 204 {
205 fold.Items.Remove(item); 205 fold.Items.Remove(item);
206 break; 206 break;
207 } 207 }
208 } 208 }
209 res = true; 209 res = true;
210 210
211 } 211 }
212 return res; 212 return res;
213 } 213 }
214 } 214 }
215 215
216 public class InventoryFolder 216 public class InventoryFolder
217 { 217 {
218 public List<InventoryItem> Items; 218 public List<InventoryItem> Items;
219 //public List<InventoryFolder> Subfolders; 219 //public List<InventoryFolder> Subfolders;
220 public LLUUID FolderID; 220 public LLUUID FolderID;
221 public LLUUID OwnerID; 221 public LLUUID OwnerID;
222 public LLUUID ParentID = LLUUID.Zero; 222 public LLUUID ParentID = LLUUID.Zero;
223 public string FolderName; 223 public string FolderName;
224 public ushort DefaultType; 224 public ushort DefaultType;
225 public ushort Version; 225 public ushort Version;
226 226
227 public InventoryFolder() 227 public InventoryFolder()
228 { 228 {
229 Items = new List<InventoryItem>(); 229 Items = new List<InventoryItem>();
230 //Subfolders = new List<InventoryFolder>(); 230 //Subfolders = new List<InventoryFolder>();
231 } 231 }
232 232
233 } 233 }
234 234
235 public class InventoryItem 235 public class InventoryItem
236 { 236 {
237 public LLUUID FolderID; 237 public LLUUID FolderID;
238 public LLUUID OwnerID; 238 public LLUUID OwnerID;
239 public LLUUID ItemID; 239 public LLUUID ItemID;
240 public LLUUID AssetID; 240 public LLUUID AssetID;
241 public LLUUID CreatorID; 241 public LLUUID CreatorID;
242 public sbyte InvType; 242 public sbyte InvType;
243 public sbyte Type; 243 public sbyte Type;
244 public string Name =""; 244 public string Name ="";
245 public string Description; 245 public string Description;
246 246
247 public InventoryItem() 247 public InventoryItem()
248 { 248 {
249 this.CreatorID = LLUUID.Zero; 249 this.CreatorID = LLUUID.Zero;
250 } 250 }
251 251
252 public string ExportString() 252 public string ExportString()
253 { 253 {
254 string typ = "notecard"; 254 string typ = "notecard";
255 string result = ""; 255 string result = "";
256 result += "\tinv_object\t0\n\t{\n"; 256 result += "\tinv_object\t0\n\t{\n";
257 result += "\t\tobj_id\t%s\n"; 257 result += "\t\tobj_id\t%s\n";
258 result += "\t\tparent_id\t"+ ItemID.ToString() +"\n"; 258 result += "\t\tparent_id\t"+ ItemID.ToString() +"\n";
259 result += "\t\ttype\t"+ typ +"\n"; 259 result += "\t\ttype\t"+ typ +"\n";
260 result += "\t\tname\t" + Name+"|\n"; 260 result += "\t\tname\t" + Name+"|\n";
261 result += "\t}\n"; 261 result += "\t}\n";
262 return result; 262 return result;
263 } 263 }
264 } 264 }
265} 265}
diff --git a/OpenSim/Framework/General/AuthenticateSessionBase.cs b/OpenSim/Framework/General/AuthenticateSessionBase.cs
index 71616e3..2d02286 100644
--- a/OpenSim/Framework/General/AuthenticateSessionBase.cs
+++ b/OpenSim/Framework/General/AuthenticateSessionBase.cs
@@ -1,130 +1,130 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Interfaces; 30using OpenSim.Framework.Interfaces;
31using OpenSim.Framework.Types; 31using OpenSim.Framework.Types;
32 32
33namespace OpenSim.Framework 33namespace OpenSim.Framework
34{ 34{
35 public class AuthenticateSessionsBase 35 public class AuthenticateSessionsBase
36 { 36 {
37 public Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>(); 37 public Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>();
38 38
39 public AuthenticateSessionsBase() 39 public AuthenticateSessionsBase()
40 { 40 {
41 41
42 } 42 }
43 43
44 public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode) 44 public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode)
45 { 45 {
46 AgentCircuitData validcircuit = null; 46 AgentCircuitData validcircuit = null;
47 if (this.AgentCircuits.ContainsKey(circuitcode)) 47 if (this.AgentCircuits.ContainsKey(circuitcode))
48 { 48 {
49 validcircuit = this.AgentCircuits[circuitcode]; 49 validcircuit = this.AgentCircuits[circuitcode];
50 } 50 }
51 AuthenticateResponse user = new AuthenticateResponse(); 51 AuthenticateResponse user = new AuthenticateResponse();
52 if (validcircuit == null) 52 if (validcircuit == null)
53 { 53 {
54 //don't have this circuit code in our list 54 //don't have this circuit code in our list
55 user.Authorised = false; 55 user.Authorised = false;
56 return (user); 56 return (user);
57 } 57 }
58 58
59 if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID)) 59 if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID))
60 { 60 {
61 user.Authorised = true; 61 user.Authorised = true;
62 user.LoginInfo = new Login(); 62 user.LoginInfo = new Login();
63 user.LoginInfo.Agent = agentID; 63 user.LoginInfo.Agent = agentID;
64 user.LoginInfo.Session = sessionID; 64 user.LoginInfo.Session = sessionID;
65 user.LoginInfo.SecureSession = validcircuit.SecureSessionID; 65 user.LoginInfo.SecureSession = validcircuit.SecureSessionID;
66 user.LoginInfo.First = validcircuit.firstname; 66 user.LoginInfo.First = validcircuit.firstname;
67 user.LoginInfo.Last = validcircuit.lastname; 67 user.LoginInfo.Last = validcircuit.lastname;
68 user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder; 68 user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder;
69 user.LoginInfo.BaseFolder = validcircuit.BaseFolder; 69 user.LoginInfo.BaseFolder = validcircuit.BaseFolder;
70 } 70 }
71 else 71 else
72 { 72 {
73 // Invalid 73 // Invalid
74 user.Authorised = false; 74 user.Authorised = false;
75 } 75 }
76 76
77 return (user); 77 return (user);
78 } 78 }
79 79
80 public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData) 80 public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
81 { 81 {
82 if (this.AgentCircuits.ContainsKey(circuitCode)) 82 if (this.AgentCircuits.ContainsKey(circuitCode))
83 { 83 {
84 this.AgentCircuits[circuitCode] = agentData; 84 this.AgentCircuits[circuitCode] = agentData;
85 } 85 }
86 else 86 else
87 { 87 {
88 this.AgentCircuits.Add(circuitCode, agentData); 88 this.AgentCircuits.Add(circuitCode, agentData);
89 } 89 }
90 } 90 }
91 91
92 public LLVector3 GetPosition(uint circuitCode) 92 public LLVector3 GetPosition(uint circuitCode)
93 { 93 {
94 LLVector3 vec = new LLVector3(); 94 LLVector3 vec = new LLVector3();
95 if (this.AgentCircuits.ContainsKey(circuitCode)) 95 if (this.AgentCircuits.ContainsKey(circuitCode))
96 { 96 {
97 vec = this.AgentCircuits[circuitCode].startpos; 97 vec = this.AgentCircuits[circuitCode].startpos;
98 } 98 }
99 return vec; 99 return vec;
100 } 100 }
101 101
102 public void UpdateAgentData(AgentCircuitData agentData) 102 public void UpdateAgentData(AgentCircuitData agentData)
103 { 103 {
104 if (this.AgentCircuits.ContainsKey((uint)agentData.circuitcode)) 104 if (this.AgentCircuits.ContainsKey((uint)agentData.circuitcode))
105 { 105 {
106 this.AgentCircuits[(uint)agentData.circuitcode].firstname = agentData.firstname; 106 this.AgentCircuits[(uint)agentData.circuitcode].firstname = agentData.firstname;
107 this.AgentCircuits[(uint)agentData.circuitcode].lastname = agentData.lastname; 107 this.AgentCircuits[(uint)agentData.circuitcode].lastname = agentData.lastname;
108 this.AgentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos; 108 this.AgentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos;
109 // Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z); 109 // Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
110 } 110 }
111 } 111 }
112 112
113 public void UpdateAgentChildStatus(uint circuitcode, bool childstatus) 113 public void UpdateAgentChildStatus(uint circuitcode, bool childstatus)
114 { 114 {
115 if (this.AgentCircuits.ContainsKey(circuitcode)) 115 if (this.AgentCircuits.ContainsKey(circuitcode))
116 { 116 {
117 this.AgentCircuits[circuitcode].child = childstatus; 117 this.AgentCircuits[circuitcode].child = childstatus;
118 } 118 }
119 } 119 }
120 120
121 public bool GetAgentChildStatus(uint circuitcode) 121 public bool GetAgentChildStatus(uint circuitcode)
122 { 122 {
123 if (this.AgentCircuits.ContainsKey(circuitcode)) 123 if (this.AgentCircuits.ContainsKey(circuitcode))
124 { 124 {
125 return this.AgentCircuits[circuitcode].child; 125 return this.AgentCircuits[circuitcode].child;
126 } 126 }
127 return false; 127 return false;
128 } 128 }
129 } 129 }
130} \ No newline at end of file 130} \ No newline at end of file
diff --git a/OpenSim/Framework/General/BlockingQueue.cs b/OpenSim/Framework/General/BlockingQueue.cs
index 0cc8124..e263d71 100644
--- a/OpenSim/Framework/General/BlockingQueue.cs
+++ b/OpenSim/Framework/General/BlockingQueue.cs
@@ -1,58 +1,58 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Threading; 29using System.Threading;
30 30
31namespace OpenSim.Framework.Utilities 31namespace OpenSim.Framework.Utilities
32{ 32{
33 public class BlockingQueue<T> 33 public class BlockingQueue<T>
34 { 34 {
35 private Queue<T> _queue = new Queue<T>(); 35 private Queue<T> _queue = new Queue<T>();
36 private object _queueSync = new object(); 36 private object _queueSync = new object();
37 37
38 public void Enqueue(T value) 38 public void Enqueue(T value)
39 { 39 {
40 lock (_queueSync) 40 lock (_queueSync)
41 { 41 {
42 _queue.Enqueue(value); 42 _queue.Enqueue(value);
43 Monitor.Pulse(_queueSync); 43 Monitor.Pulse(_queueSync);
44 } 44 }
45 } 45 }
46 46
47 public T Dequeue() 47 public T Dequeue()
48 { 48 {
49 lock (_queueSync) 49 lock (_queueSync)
50 { 50 {
51 if (_queue.Count < 1) 51 if (_queue.Count < 1)
52 Monitor.Wait(_queueSync); 52 Monitor.Wait(_queueSync);
53 53
54 return _queue.Dequeue(); 54 return _queue.Dequeue();
55 } 55 }
56 } 56 }
57 } 57 }
58} 58}
diff --git a/OpenSim/Framework/General/ClientManager.cs b/OpenSim/Framework/General/ClientManager.cs
index b560ca8..0e45d03 100644
--- a/OpenSim/Framework/General/ClientManager.cs
+++ b/OpenSim/Framework/General/ClientManager.cs
@@ -1,36 +1,36 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Interfaces; 4using OpenSim.Framework.Interfaces;
5 5
6namespace OpenSim.Framework 6namespace OpenSim.Framework
7{ 7{
8 public delegate void ForEachClientDelegate( IClientAPI client ); 8 public delegate void ForEachClientDelegate( IClientAPI client );
9 public class ClientManager 9 public class ClientManager
10 { 10 {
11 private Dictionary<uint, IClientAPI> m_clients; 11 private Dictionary<uint, IClientAPI> m_clients;
12 12
13 public void ForEachClient(ForEachClientDelegate whatToDo) 13 public void ForEachClient(ForEachClientDelegate whatToDo)
14 { 14 {
15 foreach (IClientAPI client in m_clients.Values) 15 foreach (IClientAPI client in m_clients.Values)
16 { 16 {
17 whatToDo(client); 17 whatToDo(client);
18 } 18 }
19 } 19 }
20 20
21 public ClientManager() 21 public ClientManager()
22 { 22 {
23 m_clients = new Dictionary<uint, IClientAPI>(); 23 m_clients = new Dictionary<uint, IClientAPI>();
24 } 24 }
25 25
26 public void Remove(uint id) 26 public void Remove(uint id)
27 { 27 {
28 m_clients.Remove(id); 28 m_clients.Remove(id);
29 } 29 }
30 30
31 public void Add(uint id, IClientAPI client ) 31 public void Add(uint id, IClientAPI client )
32 { 32 {
33 m_clients.Add( id, client ); 33 m_clients.Add( id, client );
34 } 34 }
35 } 35 }
36} 36}
diff --git a/OpenSim/Framework/General/IRegionCommsListener.cs b/OpenSim/Framework/General/IRegionCommsListener.cs
index 32444f9..81da5d4 100644
--- a/OpenSim/Framework/General/IRegionCommsListener.cs
+++ b/OpenSim/Framework/General/IRegionCommsListener.cs
@@ -1,46 +1,46 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Interfaces; 30using OpenSim.Framework.Interfaces;
31using OpenSim.Framework.Types; 31using OpenSim.Framework.Types;
32 32
33namespace OpenSim.Framework 33namespace OpenSim.Framework
34{ 34{
35 public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent); 35 public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent);
36 public delegate void UpdateNeighbours(List<RegionInfo> neighbours); 36 public delegate void UpdateNeighbours(List<RegionInfo> neighbours);
37 public delegate void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position); 37 public delegate void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position);
38 38
39 public interface IRegionCommsListener 39 public interface IRegionCommsListener
40 { 40 {
41 event ExpectUserDelegate OnExpectUser; 41 event ExpectUserDelegate OnExpectUser;
42 event GenericCall2 OnExpectChildAgent; 42 event GenericCall2 OnExpectChildAgent;
43 event AgentCrossing OnAvatarCrossingIntoRegion; 43 event AgentCrossing OnAvatarCrossingIntoRegion;
44 event UpdateNeighbours OnNeighboursUpdate; 44 event UpdateNeighbours OnNeighboursUpdate;
45 } 45 }
46} 46}
diff --git a/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs b/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs
index 508485b..7c49785 100644
--- a/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs
+++ b/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs
@@ -1,43 +1,43 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using OpenSim.Framework.Types; 28using OpenSim.Framework.Types;
29 29
30namespace OpenSim.Framework.Interfaces 30namespace OpenSim.Framework.Interfaces
31{ 31{
32 public class AuthenticateResponse 32 public class AuthenticateResponse
33 { 33 {
34 public bool Authorised; 34 public bool Authorised;
35 public Login LoginInfo; 35 public Login LoginInfo;
36 36
37 public AuthenticateResponse() 37 public AuthenticateResponse()
38 { 38 {
39 39
40 } 40 }
41 41
42 } 42 }
43} 43}
diff --git a/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs
index 2c379dd..57aa0c0 100644
--- a/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs
+++ b/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs
@@ -1,38 +1,38 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28namespace OpenSim.Framework.Interfaces 28namespace OpenSim.Framework.Interfaces
29{ 29{
30 public interface IGenericConfig 30 public interface IGenericConfig
31 { 31 {
32 void LoadData(); 32 void LoadData();
33 string GetAttribute(string attributeName); 33 string GetAttribute(string attributeName);
34 bool SetAttribute(string attributeName, string attributeValue); 34 bool SetAttribute(string attributeName, string attributeValue);
35 void Commit(); 35 void Commit();
36 void Close(); 36 void Close();
37 } 37 }
38} 38}
diff --git a/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs
index 81dc293..20cc320 100644
--- a/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs
+++ b/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs
@@ -1,59 +1,59 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim.world; 29//using OpenSim.world;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// </summary> 34 /// </summary>
35 35
36 36
37 public abstract class GridConfig 37 public abstract class GridConfig
38 { 38 {
39 public string GridOwner; 39 public string GridOwner;
40 public string DefaultStartupMsg; 40 public string DefaultStartupMsg;
41 public string DefaultAssetServer; 41 public string DefaultAssetServer;
42 public string AssetSendKey; 42 public string AssetSendKey;
43 public string AssetRecvKey; 43 public string AssetRecvKey;
44 public string DefaultUserServer; 44 public string DefaultUserServer;
45 public string UserSendKey; 45 public string UserSendKey;
46 public string UserRecvKey; 46 public string UserRecvKey;
47 public string SimSendKey; 47 public string SimSendKey;
48 public string SimRecvKey; 48 public string SimRecvKey;
49 49
50 50
51 public abstract void InitConfig(); 51 public abstract void InitConfig();
52 52
53 } 53 }
54 54
55 public interface IGridConfig 55 public interface IGridConfig
56 { 56 {
57 GridConfig GetConfigObject(); 57 GridConfig GetConfigObject();
58 } 58 }
59} 59}
diff --git a/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs
index ae6cedb..a17804a 100644
--- a/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs
+++ b/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs
@@ -1,53 +1,53 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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 OpenSim.world; 29//using OpenSim.world;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// </summary> 34 /// </summary>
35 35
36 36
37 public abstract class UserConfig 37 public abstract class UserConfig
38 { 38 {
39 public string DefaultStartupMsg; 39 public string DefaultStartupMsg;
40 public string GridServerURL; 40 public string GridServerURL;
41 public string GridSendKey; 41 public string GridSendKey;
42 public string GridRecvKey; 42 public string GridRecvKey;
43 43
44 44
45 public abstract void InitConfig(); 45 public abstract void InitConfig();
46 46
47 } 47 }
48 48
49 public interface IUserConfig 49 public interface IUserConfig
50 { 50 {
51 UserConfig GetConfigObject(); 51 UserConfig GetConfigObject();
52 } 52 }
53} 53}
diff --git a/OpenSim/Framework/General/Interfaces/IAssetServer.cs b/OpenSim/Framework/General/Interfaces/IAssetServer.cs
index ab60dd7..cbb5c36 100644
--- a/OpenSim/Framework/General/Interfaces/IAssetServer.cs
+++ b/OpenSim/Framework/General/Interfaces/IAssetServer.cs
@@ -1,64 +1,64 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Types; 29using OpenSim.Framework.Types;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// Description of IAssetServer. 34 /// Description of IAssetServer.
35 /// </summary> 35 /// </summary>
36 36
37 public interface IAssetServer 37 public interface IAssetServer
38 { 38 {
39 void SetReceiver(IAssetReceiver receiver); 39 void SetReceiver(IAssetReceiver receiver);
40 void RequestAsset(LLUUID assetID, bool isTexture); 40 void RequestAsset(LLUUID assetID, bool isTexture);
41 void UpdateAsset(AssetBase asset); 41 void UpdateAsset(AssetBase asset);
42 void UploadNewAsset(AssetBase asset); 42 void UploadNewAsset(AssetBase asset);
43 void SetServerInfo(string ServerUrl, string ServerKey); 43 void SetServerInfo(string ServerUrl, string ServerKey);
44 void Close(); 44 void Close();
45 } 45 }
46 46
47 // could change to delegate? 47 // could change to delegate?
48 public interface IAssetReceiver 48 public interface IAssetReceiver
49 { 49 {
50 void AssetReceived(AssetBase asset, bool IsTexture); 50 void AssetReceived(AssetBase asset, bool IsTexture);
51 void AssetNotFound(AssetBase asset); 51 void AssetNotFound(AssetBase asset);
52 } 52 }
53 53
54 public interface IAssetPlugin 54 public interface IAssetPlugin
55 { 55 {
56 IAssetServer GetAssetServer(); 56 IAssetServer GetAssetServer();
57 } 57 }
58 58
59 public struct ARequest 59 public struct ARequest
60 { 60 {
61 public LLUUID AssetID; 61 public LLUUID AssetID;
62 public bool IsTexture; 62 public bool IsTexture;
63 } 63 }
64} 64}
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
index bd258a3..0606e43 100644
--- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -1,195 +1,195 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Net; 29using System.Net;
30using libsecondlife; 30using libsecondlife;
31using libsecondlife.Packets; 31using libsecondlife.Packets;
32using OpenSim.Framework.Types; 32using OpenSim.Framework.Types;
33using OpenSim.Framework.Data; 33using OpenSim.Framework.Data;
34 34
35namespace OpenSim.Framework.Interfaces 35namespace OpenSim.Framework.Interfaces
36{ 36{
37 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 37 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
38 public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list 38 public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list
39 public delegate void RezObject(AssetBase primAsset, LLVector3 pos); 39 public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
40 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west); 40 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west);
41 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); 41 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
42 public delegate void StartAnim(LLUUID animID, int seq); 42 public delegate void StartAnim(LLUUID animID, int seq);
43 public delegate void LinkObjects(uint parent, List<uint> children); 43 public delegate void LinkObjects(uint parent, List<uint> children);
44 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY); 44 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
45 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags); 45 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
46 46
47 public delegate void GenericCall(IClientAPI remoteClient); 47 public delegate void GenericCall(IClientAPI remoteClient);
48 public delegate void GenericCall2(); 48 public delegate void GenericCall2();
49 public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary. 49 public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary.
50 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient); 50 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
51 public delegate void GenericCall5(IClientAPI remoteClient, bool status); 51 public delegate void GenericCall5(IClientAPI remoteClient, bool status);
52 public delegate void GenericCall6(LLUUID uid); 52 public delegate void GenericCall6(LLUUID uid);
53 public delegate void GenericCall7(uint localID, string message); 53 public delegate void GenericCall7(uint localID, string message);
54 54
55 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock); 55 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
56 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient); 56 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
57 public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient); 57 public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
58 public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient); 58 public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
59 public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient); 59 public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
60 public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient); 60 public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
61 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); 61 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
62 public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient); 62 public delegate void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
63 public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient); 63 public delegate void UpdatePrimGroupRotation(uint localID,LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient);
64 public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags); 64 public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags);
65 public delegate void StatusChange(bool status); 65 public delegate void StatusChange(bool status);
66 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); 66 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
67 public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation); 67 public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation);
68 public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient); 68 public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
69 69
70 public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client); 70 public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
71 public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client); 71 public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
72 public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client); 72 public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
73 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); 73 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client);
74 public delegate void ParcelSelectObjects(int parcel_local_id, int request_type, IClientAPI remote_client); 74 public delegate void ParcelSelectObjects(int parcel_local_id, int request_type, IClientAPI remote_client);
75 public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); 75 public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
76 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); 76 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
77 77
78 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); 78 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
79 79
80 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape); 80 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape);
81 81
82 82
83 83
84 public interface IClientAPI 84 public interface IClientAPI
85 { 85 {
86 event ImprovedInstantMessage OnInstantMessage; 86 event ImprovedInstantMessage OnInstantMessage;
87 event ChatFromViewer OnChatFromViewer; 87 event ChatFromViewer OnChatFromViewer;
88 event RezObject OnRezObject; 88 event RezObject OnRezObject;
89 event ModifyTerrain OnModifyTerrain; 89 event ModifyTerrain OnModifyTerrain;
90 event SetAppearance OnSetAppearance; 90 event SetAppearance OnSetAppearance;
91 event StartAnim OnStartAnim; 91 event StartAnim OnStartAnim;
92 event LinkObjects OnLinkObjects; 92 event LinkObjects OnLinkObjects;
93 event RequestMapBlocks OnRequestMapBlocks; 93 event RequestMapBlocks OnRequestMapBlocks;
94 event TeleportLocationRequest OnTeleportLocationRequest; 94 event TeleportLocationRequest OnTeleportLocationRequest;
95 95
96 event GenericCall4 OnDeRezObject; 96 event GenericCall4 OnDeRezObject;
97 event GenericCall OnRegionHandShakeReply; 97 event GenericCall OnRegionHandShakeReply;
98 event GenericCall OnRequestWearables; 98 event GenericCall OnRequestWearables;
99 event GenericCall2 OnCompleteMovementToRegion; 99 event GenericCall2 OnCompleteMovementToRegion;
100 event UpdateAgent OnAgentUpdate; 100 event UpdateAgent OnAgentUpdate;
101 event GenericCall OnRequestAvatarsData; 101 event GenericCall OnRequestAvatarsData;
102 event AddNewPrim OnAddPrim; 102 event AddNewPrim OnAddPrim;
103 event ObjectDuplicate OnObjectDuplicate; 103 event ObjectDuplicate OnObjectDuplicate;
104 event UpdateVector OnGrapObject; 104 event UpdateVector OnGrapObject;
105 event ObjectSelect OnDeGrapObject; 105 event ObjectSelect OnDeGrapObject;
106 event MoveObject OnGrapUpdate; 106 event MoveObject OnGrapUpdate;
107 107
108 event UpdateShape OnUpdatePrimShape; 108 event UpdateShape OnUpdatePrimShape;
109 event ObjectSelect OnObjectSelect; 109 event ObjectSelect OnObjectSelect;
110 event ObjectDeselect OnObjectDeselect; 110 event ObjectDeselect OnObjectDeselect;
111 event GenericCall7 OnObjectDescription; 111 event GenericCall7 OnObjectDescription;
112 event GenericCall7 OnObjectName; 112 event GenericCall7 OnObjectName;
113 event UpdatePrimFlags OnUpdatePrimFlags; 113 event UpdatePrimFlags OnUpdatePrimFlags;
114 event UpdatePrimTexture OnUpdatePrimTexture; 114 event UpdatePrimTexture OnUpdatePrimTexture;
115 event UpdateVector OnUpdatePrimGroupPosition; 115 event UpdateVector OnUpdatePrimGroupPosition;
116 event UpdateVector OnUpdatePrimSinglePosition; 116 event UpdateVector OnUpdatePrimSinglePosition;
117 event UpdatePrimRotation OnUpdatePrimGroupRotation; 117 event UpdatePrimRotation OnUpdatePrimGroupRotation;
118 event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 118 event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
119 event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; 119 event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
120 event UpdateVector OnUpdatePrimScale; 120 event UpdateVector OnUpdatePrimScale;
121 event StatusChange OnChildAgentStatus; 121 event StatusChange OnChildAgentStatus;
122 event GenericCall2 OnStopMovement; 122 event GenericCall2 OnStopMovement;
123 event NewAvatar OnNewAvatar; 123 event NewAvatar OnNewAvatar;
124 event GenericCall6 OnRemoveAvatar; 124 event GenericCall6 OnRemoveAvatar;
125 125
126 event UUIDNameRequest OnNameFromUUIDRequest; 126 event UUIDNameRequest OnNameFromUUIDRequest;
127 127
128 event ParcelPropertiesRequest OnParcelPropertiesRequest; 128 event ParcelPropertiesRequest OnParcelPropertiesRequest;
129 event ParcelDivideRequest OnParcelDivideRequest; 129 event ParcelDivideRequest OnParcelDivideRequest;
130 event ParcelJoinRequest OnParcelJoinRequest; 130 event ParcelJoinRequest OnParcelJoinRequest;
131 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 131 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
132 event ParcelSelectObjects OnParcelSelectObjects; 132 event ParcelSelectObjects OnParcelSelectObjects;
133 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 133 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
134 event EstateOwnerMessageRequest OnEstateOwnerMessage; 134 event EstateOwnerMessageRequest OnEstateOwnerMessage;
135 135
136 LLVector3 StartPos 136 LLVector3 StartPos
137 { 137 {
138 get; 138 get;
139 set; 139 set;
140 } 140 }
141 141
142 LLUUID AgentId 142 LLUUID AgentId
143 { 143 {
144 get; 144 get;
145 } 145 }
146 146
147 string FirstName 147 string FirstName
148 { 148 {
149 get; 149 get;
150 } 150 }
151 151
152 string LastName 152 string LastName
153 { 153 {
154 get; 154 get;
155 } 155 }
156 156
157 void OutPacket(Packet newPack); 157 void OutPacket(Packet newPack);
158 void SendWearables(AvatarWearable[] wearables); 158 void SendWearables(AvatarWearable[] wearables);
159 void SendStartPingCheck(byte seq); 159 void SendStartPingCheck(byte seq);
160 void SendKillObject(ulong regionHandle, uint avatarLocalID); 160 void SendKillObject(ulong regionHandle, uint avatarLocalID);
161 void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId); 161 void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId);
162 void SendRegionHandshake(RegionInfo regionInfo); 162 void SendRegionHandshake(RegionInfo regionInfo);
163 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 163 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
164 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 164 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
165 void SendInstantMessage(string message, LLUUID target, string fromName); 165 void SendInstantMessage(string message, LLUUID target, string fromName);
166 void SendLayerData(float[] map); 166 void SendLayerData(float[] map);
167 void SendLayerData(int px, int py, float[] map); 167 void SendLayerData(int px, int py, float[] map);
168 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); 168 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
169 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint ); 169 void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint );
170 AgentCircuitData RequestClientInfo(); 170 AgentCircuitData RequestClientInfo();
171 void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint ); 171 void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint );
172 void SendMapBlock(List<MapBlockData> mapBlocks); 172 void SendMapBlock(List<MapBlockData> mapBlocks);
173 void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags); 173 void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
174 void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags); 174 void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags);
175 void SendTeleportCancel(); 175 void SendTeleportCancel();
176 void SendTeleportLocationStart(); 176 void SendTeleportLocationStart();
177 void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance); 177 void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
178 178
179 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry); 179 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry);
180 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity); 180 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity);
181 181
182 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); 182 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
183 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID , uint flags); 183 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID , uint flags);
184 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags); 184 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags);
185 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID); 185 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID);
186 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID); 186 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID);
187 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation); 187 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation);
188 188
189 void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items); 189 void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items);
190 void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item); 190 void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item);
191 void SendNameReply(LLUUID profileId, string firstname, string lastname); 191 void SendNameReply(LLUUID profileId, string firstname, string lastname);
192 192
193 193
194 } 194 }
195} 195}
diff --git a/OpenSim/Framework/General/Interfaces/ILocalStorage.cs b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs
index 7093121..c7c0b5f 100644
--- a/OpenSim/Framework/General/Interfaces/ILocalStorage.cs
+++ b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs
@@ -1,71 +1,71 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Types; 30using OpenSim.Framework.Types;
31 31
32namespace OpenSim.Framework.Interfaces 32namespace OpenSim.Framework.Interfaces
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// ILocalStorage. Really hacked together right now needs cleaning up 35 /// ILocalStorage. Really hacked together right now needs cleaning up
36 /// </summary> 36 /// </summary>
37 [System.Obsolete("Redundant, use IRegionDataStore instead")] 37 [System.Obsolete("Redundant, use IRegionDataStore instead")]
38 public interface ILocalStorage 38 public interface ILocalStorage
39 { 39 {
40 void Initialise(string datastore); 40 void Initialise(string datastore);
41 41
42 void StorePrim(PrimData prim); 42 void StorePrim(PrimData prim);
43 void RemovePrim(LLUUID primID); 43 void RemovePrim(LLUUID primID);
44 void LoadPrimitives(ILocalStorageReceiver receiver); 44 void LoadPrimitives(ILocalStorageReceiver receiver);
45 45
46 [System.Obsolete("Use DataStorage instead")] 46 [System.Obsolete("Use DataStorage instead")]
47 float[] LoadWorld(); 47 float[] LoadWorld();
48 [System.Obsolete("Use DataStorage instead")] 48 [System.Obsolete("Use DataStorage instead")]
49 void SaveMap(float[] heightmap); 49 void SaveMap(float[] heightmap);
50 50
51 void SaveParcels(ParcelData[] parcels); 51 void SaveParcels(ParcelData[] parcels);
52 void SaveParcel(ParcelData parcel); 52 void SaveParcel(ParcelData parcel);
53 void RemoveParcel(ParcelData parcel); 53 void RemoveParcel(ParcelData parcel);
54 void RemoveAllParcels(); 54 void RemoveAllParcels();
55 void LoadParcels(ILocalStorageParcelReceiver recv); 55 void LoadParcels(ILocalStorageParcelReceiver recv);
56 56
57 void ShutDown(); 57 void ShutDown();
58 } 58 }
59 59
60 public interface ILocalStorageReceiver 60 public interface ILocalStorageReceiver
61 { 61 {
62 void PrimFromStorage(PrimData prim); 62 void PrimFromStorage(PrimData prim);
63 } 63 }
64 64
65 public interface ILocalStorageParcelReceiver 65 public interface ILocalStorageParcelReceiver
66 { 66 {
67 void ParcelFromStorage(ParcelData data); 67 void ParcelFromStorage(ParcelData data);
68 void NoParcelDataFromStorage(); 68 void NoParcelDataFromStorage();
69 } 69 }
70} 70}
71 71
diff --git a/OpenSim/Framework/General/Interfaces/IUserServer.cs b/OpenSim/Framework/General/Interfaces/IUserServer.cs
index b3700d2..ca5816d 100644
--- a/OpenSim/Framework/General/Interfaces/IUserServer.cs
+++ b/OpenSim/Framework/General/Interfaces/IUserServer.cs
@@ -1,39 +1,39 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Inventory; 29using OpenSim.Framework.Inventory;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 public interface IUserServer 33 public interface IUserServer
34 { 34 {
35 AgentInventory RequestAgentsInventory(LLUUID agentID); 35 AgentInventory RequestAgentsInventory(LLUUID agentID);
36 void SetServerInfo(string ServerUrl, string SendKey, string RecvKey); 36 void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
37 bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory); 37 bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory);
38 } 38 }
39} 39}
diff --git a/OpenSim/Framework/General/Interfaces/IWorld.cs b/OpenSim/Framework/General/Interfaces/IWorld.cs
index 204c01b..a474636 100644
--- a/OpenSim/Framework/General/Interfaces/IWorld.cs
+++ b/OpenSim/Framework/General/Interfaces/IWorld.cs
@@ -1,42 +1,42 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Types; 29using OpenSim.Framework.Types;
30 30
31namespace OpenSim.Framework.Interfaces 31namespace OpenSim.Framework.Interfaces
32{ 32{
33 public interface IWorld 33 public interface IWorld
34 { 34 {
35 void AddNewClient(IClientAPI client, bool child); 35 void AddNewClient(IClientAPI client, bool child);
36 void RemoveClient(LLUUID agentID); 36 void RemoveClient(LLUUID agentID);
37 37
38 RegionInfo RegionInfo { get; } 38 RegionInfo RegionInfo { get; }
39 object SyncRoot { get; } 39 object SyncRoot { get; }
40 uint NextLocalId { get; } 40 uint NextLocalId { get; }
41 } 41 }
42} 42}
diff --git a/OpenSim/Framework/General/NpcClientBase.cs b/OpenSim/Framework/General/NpcClientBase.cs
index 44d6d3c..044431b 100644
--- a/OpenSim/Framework/General/NpcClientBase.cs
+++ b/OpenSim/Framework/General/NpcClientBase.cs
@@ -1,127 +1,127 @@
1using System.Collections.Generic; 1using System.Collections.Generic;
2using System.Net; 2using System.Net;
3using OpenSim.Framework.Interfaces; 3using OpenSim.Framework.Interfaces;
4using OpenSim.Framework.Types; 4using OpenSim.Framework.Types;
5using OpenSim.Framework.Data; 5using OpenSim.Framework.Data;
6using libsecondlife; 6using libsecondlife;
7using libsecondlife.Packets; 7using libsecondlife.Packets;
8 8
9 9
10namespace OpenSim.Framework 10namespace OpenSim.Framework
11{ 11{
12 public class NpcClientBase :IClientAPI 12 public class NpcClientBase :IClientAPI
13 { 13 {
14 public event ImprovedInstantMessage OnInstantMessage; 14 public event ImprovedInstantMessage OnInstantMessage;
15 public event ChatFromViewer OnChatFromViewer; 15 public event ChatFromViewer OnChatFromViewer;
16 public event RezObject OnRezObject; 16 public event RezObject OnRezObject;
17 public event ModifyTerrain OnModifyTerrain; 17 public event ModifyTerrain OnModifyTerrain;
18 public event SetAppearance OnSetAppearance; 18 public event SetAppearance OnSetAppearance;
19 public event StartAnim OnStartAnim; 19 public event StartAnim OnStartAnim;
20 public event LinkObjects OnLinkObjects; 20 public event LinkObjects OnLinkObjects;
21 public event RequestMapBlocks OnRequestMapBlocks; 21 public event RequestMapBlocks OnRequestMapBlocks;
22 public event TeleportLocationRequest OnTeleportLocationRequest; 22 public event TeleportLocationRequest OnTeleportLocationRequest;
23 23
24 public event GenericCall4 OnDeRezObject; 24 public event GenericCall4 OnDeRezObject;
25 public event GenericCall OnRegionHandShakeReply; 25 public event GenericCall OnRegionHandShakeReply;
26 public event GenericCall OnRequestWearables; 26 public event GenericCall OnRequestWearables;
27 public event GenericCall2 OnCompleteMovementToRegion; 27 public event GenericCall2 OnCompleteMovementToRegion;
28 public event UpdateAgent OnAgentUpdate; 28 public event UpdateAgent OnAgentUpdate;
29 public event GenericCall OnRequestAvatarsData; 29 public event GenericCall OnRequestAvatarsData;
30 public event AddNewPrim OnAddPrim; 30 public event AddNewPrim OnAddPrim;
31 public event ObjectDuplicate OnObjectDuplicate; 31 public event ObjectDuplicate OnObjectDuplicate;
32 public event UpdateVector OnGrapObject; 32 public event UpdateVector OnGrapObject;
33 public event ObjectSelect OnDeGrapObject; 33 public event ObjectSelect OnDeGrapObject;
34 public event MoveObject OnGrapUpdate; 34 public event MoveObject OnGrapUpdate;
35 35
36 public event UpdateShape OnUpdatePrimShape; 36 public event UpdateShape OnUpdatePrimShape;
37 public event ObjectSelect OnObjectSelect; 37 public event ObjectSelect OnObjectSelect;
38 public event GenericCall7 OnObjectDescription; 38 public event GenericCall7 OnObjectDescription;
39 public event GenericCall7 OnObjectName; 39 public event GenericCall7 OnObjectName;
40 public event UpdatePrimFlags OnUpdatePrimFlags; 40 public event UpdatePrimFlags OnUpdatePrimFlags;
41 public event UpdatePrimTexture OnUpdatePrimTexture; 41 public event UpdatePrimTexture OnUpdatePrimTexture;
42 public event UpdateVector OnUpdatePrimGroupPosition; 42 public event UpdateVector OnUpdatePrimGroupPosition;
43 public event UpdateVector OnUpdatePrimSinglePosition; 43 public event UpdateVector OnUpdatePrimSinglePosition;
44 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 44 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
45 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 45 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
46 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; 46 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
47 public event UpdateVector OnUpdatePrimScale; 47 public event UpdateVector OnUpdatePrimScale;
48 public event StatusChange OnChildAgentStatus; 48 public event StatusChange OnChildAgentStatus;
49 public event GenericCall2 OnStopMovement; 49 public event GenericCall2 OnStopMovement;
50 public event NewAvatar OnNewAvatar; 50 public event NewAvatar OnNewAvatar;
51 public event GenericCall6 OnRemoveAvatar; 51 public event GenericCall6 OnRemoveAvatar;
52 52
53 public event UUIDNameRequest OnNameFromUUIDRequest; 53 public event UUIDNameRequest OnNameFromUUIDRequest;
54 54
55 public event ParcelPropertiesRequest OnParcelPropertiesRequest; 55 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
56 public event ParcelDivideRequest OnParcelDivideRequest; 56 public event ParcelDivideRequest OnParcelDivideRequest;
57 public event ParcelJoinRequest OnParcelJoinRequest; 57 public event ParcelJoinRequest OnParcelJoinRequest;
58 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 58 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
59 public event ParcelSelectObjects OnParcelSelectObjects; 59 public event ParcelSelectObjects OnParcelSelectObjects;
60 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 60 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
61 public event ObjectDeselect OnObjectDeselect; 61 public event ObjectDeselect OnObjectDeselect;
62 62
63 63
64 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 64 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
65 65
66 public virtual LLVector3 StartPos 66 public virtual LLVector3 StartPos
67 { 67 {
68 get { return new LLVector3(); } 68 get { return new LLVector3(); }
69 set { } 69 set { }
70 } 70 }
71 71
72 public virtual LLUUID AgentId 72 public virtual LLUUID AgentId
73 { 73 {
74 get { return LLUUID.Random(); } 74 get { return LLUUID.Random(); }
75 } 75 }
76 76
77 public virtual string FirstName 77 public virtual string FirstName
78 { 78 {
79 get { return ""; } 79 get { return ""; }
80 } 80 }
81 81
82 public virtual string LastName 82 public virtual string LastName
83 { 83 {
84 get { return ""; } 84 get { return ""; }
85 } 85 }
86 86
87 public NpcClientBase() 87 public NpcClientBase()
88 { 88 {
89 } 89 }
90 90
91 public virtual void OutPacket(Packet newPack){} 91 public virtual void OutPacket(Packet newPack){}
92 public virtual void SendWearables(AvatarWearable[] wearables){} 92 public virtual void SendWearables(AvatarWearable[] wearables){}
93 public virtual void SendStartPingCheck(byte seq){} 93 public virtual void SendStartPingCheck(byte seq){}
94 public virtual void SendKillObject(ulong regionHandle, uint avatarLocalID){} 94 public virtual void SendKillObject(ulong regionHandle, uint avatarLocalID){}
95 public virtual void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId){} 95 public virtual void SendAnimation(LLUUID animID, int seq, LLUUID sourceAgentId){}
96 public virtual void SendRegionHandshake(RegionInfo regionInfo){} 96 public virtual void SendRegionHandshake(RegionInfo regionInfo){}
97 public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){} 97 public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){}
98 public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){} 98 public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID){}
99 public virtual void SendInstantMessage(string message, LLUUID target, string fromName){} 99 public virtual void SendInstantMessage(string message, LLUUID target, string fromName){}
100 public virtual void SendLayerData(float[] map){} 100 public virtual void SendLayerData(float[] map){}
101 public virtual void SendLayerData(int px, int py, float[] map){} 101 public virtual void SendLayerData(int px, int py, float[] map){}
102 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look){} 102 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look){}
103 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint){} 103 public virtual void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint){}
104 public virtual AgentCircuitData RequestClientInfo() { return new AgentCircuitData(); } 104 public virtual AgentCircuitData RequestClientInfo() { return new AgentCircuitData(); }
105 public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint){} 105 public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, IPEndPoint newRegionExternalEndPoint){}
106 public virtual void SendMapBlock(List<MapBlockData> mapBlocks){} 106 public virtual void SendMapBlock(List<MapBlockData> mapBlocks){}
107 public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags){} 107 public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags){}
108 public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags){} 108 public virtual void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags){}
109 public virtual void SendTeleportCancel(){} 109 public virtual void SendTeleportCancel(){}
110 public virtual void SendTeleportLocationStart(){} 110 public virtual void SendTeleportLocationStart(){}
111 public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance){} 111 public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance){}
112 112
113 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry){} 113 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry){}
114 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity){} 114 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity){}
115 115
116 public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint){} 116 public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint){}
117 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags){} 117 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags){}
118 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags){} 118 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags){}
119 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID){} 119 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, LLQuaternion rotation, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID){}
120 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID){} 120 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, uint parentID){}
121 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation){} 121 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation){}
122 122
123 public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items){} 123 public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items){}
124 public virtual void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item){} 124 public virtual void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item){}
125 public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname){} 125 public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname){}
126 } 126 }
127} 127}
diff --git a/OpenSim/Framework/General/Properties/AssemblyInfo.cs b/OpenSim/Framework/General/Properties/AssemblyInfo.cs
index 004040b..655cffc 100644
--- a/OpenSim/Framework/General/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/General/Properties/AssemblyInfo.cs
@@ -1,31 +1,31 @@
1using System.Reflection; 1using System.Reflection;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3// General Information about an assembly is controlled through the following 3// General Information about an assembly is controlled through the following
4// set of attributes. Change these attribute values to modify the information 4// set of attributes. Change these attribute values to modify the information
5// associated with an assembly. 5// associated with an assembly.
6[assembly: AssemblyTitle("OpenSim.FrameWork")] 6[assembly: AssemblyTitle("OpenSim.FrameWork")]
7[assembly: AssemblyDescription("")] 7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")] 8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")] 9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("OpenSim.FrameWork")] 10[assembly: AssemblyProduct("OpenSim.FrameWork")]
11[assembly: AssemblyCopyright("Copyright © 2007")] 11[assembly: AssemblyCopyright("Copyright © 2007")]
12[assembly: AssemblyTrademark("")] 12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")] 13[assembly: AssemblyCulture("")]
14 14
15// Setting ComVisible to false makes the types in this assembly not visible 15// Setting ComVisible to false makes the types in this assembly not visible
16// to COM components. If you need to access a type in this assembly from 16// to COM components. If you need to access a type in this assembly from
17// COM, set the ComVisible attribute to true on that type. 17// COM, set the ComVisible attribute to true on that type.
18[assembly: ComVisible(false)] 18[assembly: ComVisible(false)]
19 19
20// The following GUID is for the ID of the typelib if this project is exposed to COM 20// The following GUID is for the ID of the typelib if this project is exposed to COM
21[assembly: Guid("a08e20c7-f191-4137-b1f0-9291408fa521")] 21[assembly: Guid("a08e20c7-f191-4137-b1f0-9291408fa521")]
22 22
23// Version information for an assembly consists of the following four values: 23// Version information for an assembly consists of the following four values:
24// 24//
25// Major Version 25// Major Version
26// Minor Version 26// Minor Version
27// Build Number 27// Build Number
28// Revision 28// Revision
29// 29//
30[assembly: AssemblyVersion("1.0.0.0")] 30[assembly: AssemblyVersion("1.0.0.0")]
31[assembly: AssemblyFileVersion("1.0.0.0")] 31[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/General/RegionCommsListener.cs b/OpenSim/Framework/General/RegionCommsListener.cs
index 4d6b59c..f5b8272 100644
--- a/OpenSim/Framework/General/RegionCommsListener.cs
+++ b/OpenSim/Framework/General/RegionCommsListener.cs
@@ -1,103 +1,103 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework.Interfaces; 29using OpenSim.Framework.Interfaces;
30using OpenSim.Framework.Types; 30using OpenSim.Framework.Types;
31 31
32using System.Collections.Generic; 32using System.Collections.Generic;
33 33
34namespace OpenSim.Framework 34namespace OpenSim.Framework
35{ 35{
36 public class RegionCommsListener :IRegionCommsListener 36 public class RegionCommsListener :IRegionCommsListener
37 { 37 {
38 public event ExpectUserDelegate OnExpectUser; 38 public event ExpectUserDelegate OnExpectUser;
39 public event GenericCall2 OnExpectChildAgent; 39 public event GenericCall2 OnExpectChildAgent;
40 public event AgentCrossing OnAvatarCrossingIntoRegion; 40 public event AgentCrossing OnAvatarCrossingIntoRegion;
41 public event UpdateNeighbours OnNeighboursUpdate; 41 public event UpdateNeighbours OnNeighboursUpdate;
42 42
43 /// <summary> 43 /// <summary>
44 /// 44 ///
45 /// </summary> 45 /// </summary>
46 /// <param name="agent"></param> 46 /// <param name="agent"></param>
47 /// <returns></returns> 47 /// <returns></returns>
48 public virtual bool TriggerExpectUser(ulong regionHandle, AgentCircuitData agent) 48 public virtual bool TriggerExpectUser(ulong regionHandle, AgentCircuitData agent)
49 { 49 {
50 if(OnExpectUser != null) 50 if(OnExpectUser != null)
51 { 51 {
52 52
53 OnExpectUser(regionHandle, agent); 53 OnExpectUser(regionHandle, agent);
54 return true; 54 return true;
55 } 55 }
56 56
57 return false; 57 return false;
58 } 58 }
59 59
60 public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) 60 public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
61 { 61 {
62 if (OnAvatarCrossingIntoRegion != null) 62 if (OnAvatarCrossingIntoRegion != null)
63 { 63 {
64 OnAvatarCrossingIntoRegion(regionHandle, agentID, position); 64 OnAvatarCrossingIntoRegion(regionHandle, agentID, position);
65 return true; 65 return true;
66 } 66 }
67 return false; 67 return false;
68 } 68 }
69 69
70 /// <summary> 70 /// <summary>
71 /// 71 ///
72 /// </summary> 72 /// </summary>
73 /// <remarks>TODO: Doesnt take any args??</remarks> 73 /// <remarks>TODO: Doesnt take any args??</remarks>
74 /// <returns></returns> 74 /// <returns></returns>
75 public virtual bool TriggerExpectChildAgent() 75 public virtual bool TriggerExpectChildAgent()
76 { 76 {
77 if (OnExpectChildAgent != null) 77 if (OnExpectChildAgent != null)
78 { 78 {
79 OnExpectChildAgent(); 79 OnExpectChildAgent();
80 return true; 80 return true;
81 } 81 }
82 82
83 return false; 83 return false;
84 } 84 }
85 85
86 /// <summary> 86 /// <summary>
87 /// 87 ///
88 /// </summary> 88 /// </summary>
89 /// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks> 89 /// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks>
90 /// <param name="neighbours"></param> 90 /// <param name="neighbours"></param>
91 /// <returns></returns> 91 /// <returns></returns>
92 public virtual bool TriggerOnNeighboursUpdate(List<RegionInfo> neighbours) 92 public virtual bool TriggerOnNeighboursUpdate(List<RegionInfo> neighbours)
93 { 93 {
94 if (OnNeighboursUpdate != null) 94 if (OnNeighboursUpdate != null)
95 { 95 {
96 OnNeighboursUpdate(neighbours); 96 OnNeighboursUpdate(neighbours);
97 return true; 97 return true;
98 } 98 }
99 99
100 return false; 100 return false;
101 } 101 }
102 } 102 }
103} 103}
diff --git a/OpenSim/Framework/General/Remoting.cs b/OpenSim/Framework/General/Remoting.cs
index df32db2..0e94b90 100644
--- a/OpenSim/Framework/General/Remoting.cs
+++ b/OpenSim/Framework/General/Remoting.cs
@@ -1,135 +1,135 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System; 28using System;
29using System.Security.Cryptography; 29using System.Security.Cryptography;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Framework 32namespace OpenSim.Framework
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// NEEDS AUDIT. 35 /// NEEDS AUDIT.
36 /// </summary> 36 /// </summary>
37 /// <remarks> 37 /// <remarks>
38 /// Suggested implementation 38 /// Suggested implementation
39 /// <para>Store two digests for each foreign host. A local copy of the local hash using the local challenge (when issued), and a local copy of the remote hash using the remote challenge.</para> 39 /// <para>Store two digests for each foreign host. A local copy of the local hash using the local challenge (when issued), and a local copy of the remote hash using the remote challenge.</para>
40 /// <para>When sending data to the foreign host - run 'Sign' on the data and affix the returned byte[] to the message.</para> 40 /// <para>When sending data to the foreign host - run 'Sign' on the data and affix the returned byte[] to the message.</para>
41 /// <para>When recieving data from the foreign host - run 'Authenticate' against the data and the attached byte[].</para> 41 /// <para>When recieving data from the foreign host - run 'Authenticate' against the data and the attached byte[].</para>
42 /// <para>Both hosts should be performing these operations for this to be effective.</para> 42 /// <para>Both hosts should be performing these operations for this to be effective.</para>
43 /// </remarks> 43 /// </remarks>
44 class RemoteDigest 44 class RemoteDigest
45 { 45 {
46 private byte[] currentHash; 46 private byte[] currentHash;
47 private byte[] secret; 47 private byte[] secret;
48 48
49 private SHA512Managed SHA512; 49 private SHA512Managed SHA512;
50 50
51 /// <summary> 51 /// <summary>
52 /// Initialises a new RemoteDigest authentication mechanism 52 /// Initialises a new RemoteDigest authentication mechanism
53 /// </summary> 53 /// </summary>
54 /// <remarks>Needs an audit by a cryptographic professional - was not "roll your own"'d by choice but rather a serious lack of decent authentication mechanisms in .NET remoting</remarks> 54 /// <remarks>Needs an audit by a cryptographic professional - was not "roll your own"'d by choice but rather a serious lack of decent authentication mechanisms in .NET remoting</remarks>
55 /// <param name="sharedSecret">The shared secret between systems (for inter-sim, this is provided in encrypted form during connection, for grid this is input manually in setup)</param> 55 /// <param name="sharedSecret">The shared secret between systems (for inter-sim, this is provided in encrypted form during connection, for grid this is input manually in setup)</param>
56 /// <param name="salt">Binary salt - some common value - to be decided what</param> 56 /// <param name="salt">Binary salt - some common value - to be decided what</param>
57 /// <param name="challenge">The challenge key provided by the third party</param> 57 /// <param name="challenge">The challenge key provided by the third party</param>
58 public RemoteDigest(string sharedSecret, byte[] salt, string challenge) 58 public RemoteDigest(string sharedSecret, byte[] salt, string challenge)
59 { 59 {
60 SHA512 = new SHA512Managed(); 60 SHA512 = new SHA512Managed();
61 Rfc2898DeriveBytes RFC2898 = new Rfc2898DeriveBytes(sharedSecret,salt); 61 Rfc2898DeriveBytes RFC2898 = new Rfc2898DeriveBytes(sharedSecret,salt);
62 secret = RFC2898.GetBytes(512); 62 secret = RFC2898.GetBytes(512);
63 ASCIIEncoding ASCII = new ASCIIEncoding(); 63 ASCIIEncoding ASCII = new ASCIIEncoding();
64 64
65 currentHash = SHA512.ComputeHash(AppendArrays(secret, ASCII.GetBytes(challenge))); 65 currentHash = SHA512.ComputeHash(AppendArrays(secret, ASCII.GetBytes(challenge)));
66 } 66 }
67 67
68 /// <summary> 68 /// <summary>
69 /// Authenticates a piece of incoming data against the local digest. Upon successful authentication, digest string is incremented. 69 /// Authenticates a piece of incoming data against the local digest. Upon successful authentication, digest string is incremented.
70 /// </summary> 70 /// </summary>
71 /// <param name="data">The incoming data</param> 71 /// <param name="data">The incoming data</param>
72 /// <param name="digest">The remote digest</param> 72 /// <param name="digest">The remote digest</param>
73 /// <returns></returns> 73 /// <returns></returns>
74 public bool Authenticate(byte[] data, byte[] digest) 74 public bool Authenticate(byte[] data, byte[] digest)
75 { 75 {
76 byte[] newHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data)); 76 byte[] newHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
77 if (digest == newHash) 77 if (digest == newHash)
78 { 78 {
79 currentHash = newHash; 79 currentHash = newHash;
80 return true; 80 return true;
81 } 81 }
82 else 82 else
83 { 83 {
84 throw new Exception("Hash comparison failed. Key resync required."); 84 throw new Exception("Hash comparison failed. Key resync required.");
85 } 85 }
86 } 86 }
87 87
88 /// <summary> 88 /// <summary>
89 /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message. 89 /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message.
90 /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the 90 /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the
91 /// hashes will get out of sync and throw an exception when validation is attempted. 91 /// hashes will get out of sync and throw an exception when validation is attempted.
92 /// </summary> 92 /// </summary>
93 /// <param name="data">The outgoing data</param> 93 /// <param name="data">The outgoing data</param>
94 /// <returns>The local digest</returns> 94 /// <returns>The local digest</returns>
95 public byte[] Sign(byte[] data) 95 public byte[] Sign(byte[] data)
96 { 96 {
97 currentHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data)); 97 currentHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
98 return currentHash; 98 return currentHash;
99 } 99 }
100 100
101 /// <summary> 101 /// <summary>
102 /// Generates a new challenge string to be issued to a foreign host. Challenges are 1024-bit (effective strength of less than 512-bits) messages generated using the Crytographic Random Number Generator. 102 /// Generates a new challenge string to be issued to a foreign host. Challenges are 1024-bit (effective strength of less than 512-bits) messages generated using the Crytographic Random Number Generator.
103 /// </summary> 103 /// </summary>
104 /// <returns>A 128-character hexadecimal string containing the challenge.</returns> 104 /// <returns>A 128-character hexadecimal string containing the challenge.</returns>
105 public static string GenerateChallenge() 105 public static string GenerateChallenge()
106 { 106 {
107 RNGCryptoServiceProvider RNG = new RNGCryptoServiceProvider(); 107 RNGCryptoServiceProvider RNG = new RNGCryptoServiceProvider();
108 byte[] bytes = new byte[64]; 108 byte[] bytes = new byte[64];
109 RNG.GetBytes(bytes); 109 RNG.GetBytes(bytes);
110 110
111 StringBuilder sb = new StringBuilder(bytes.Length * 2); 111 StringBuilder sb = new StringBuilder(bytes.Length * 2);
112 foreach (byte b in bytes) 112 foreach (byte b in bytes)
113 { 113 {
114 sb.AppendFormat("{0:x2}", b); 114 sb.AppendFormat("{0:x2}", b);
115 } 115 }
116 return sb.ToString(); 116 return sb.ToString();
117 } 117 }
118 118
119 /// <summary> 119 /// <summary>
120 /// Helper function, merges two byte arrays 120 /// Helper function, merges two byte arrays
121 /// </summary> 121 /// </summary>
122 /// <remarks>Sourced from MSDN Forum</remarks> 122 /// <remarks>Sourced from MSDN Forum</remarks>
123 /// <param name="a">A</param> 123 /// <param name="a">A</param>
124 /// <param name="b">B</param> 124 /// <param name="b">B</param>
125 /// <returns>C</returns> 125 /// <returns>C</returns>
126 private byte[] AppendArrays(byte[] a, byte[] b) 126 private byte[] AppendArrays(byte[] a, byte[] b)
127 { 127 {
128 byte[] c = new byte[a.Length + b.Length]; 128 byte[] c = new byte[a.Length + b.Length];
129 Buffer.BlockCopy(a, 0, c, 0, a.Length); 129 Buffer.BlockCopy(a, 0, c, 0, a.Length);
130 Buffer.BlockCopy(b, 0, c, a.Length, b.Length); 130 Buffer.BlockCopy(b, 0, c, a.Length, b.Length);
131 return c; 131 return c;
132 } 132 }
133 133
134 } 134 }
135} 135}
diff --git a/OpenSim/Framework/General/Types/AgentCiruitData.cs b/OpenSim/Framework/General/Types/AgentCiruitData.cs
index ed9ee3c..36bb26d 100644
--- a/OpenSim/Framework/General/Types/AgentCiruitData.cs
+++ b/OpenSim/Framework/General/Types/AgentCiruitData.cs
@@ -1,49 +1,49 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29using System; 29using System;
30 30
31namespace OpenSim.Framework.Types 31namespace OpenSim.Framework.Types
32{ 32{
33 [Serializable] 33 [Serializable]
34 public class AgentCircuitData 34 public class AgentCircuitData
35 { 35 {
36 public AgentCircuitData() { } 36 public AgentCircuitData() { }
37 public LLUUID AgentID; 37 public LLUUID AgentID;
38 public LLUUID SessionID; 38 public LLUUID SessionID;
39 public LLUUID SecureSessionID; 39 public LLUUID SecureSessionID;
40 public LLVector3 startpos; 40 public LLVector3 startpos;
41 public string firstname; 41 public string firstname;
42 public string lastname; 42 public string lastname;
43 public uint circuitcode; 43 public uint circuitcode;
44 public bool child; 44 public bool child;
45 public LLUUID InventoryFolder; 45 public LLUUID InventoryFolder;
46 public LLUUID BaseFolder; 46 public LLUUID BaseFolder;
47 public string CapsPath = ""; 47 public string CapsPath = "";
48 } 48 }
49} 49}
diff --git a/OpenSim/Framework/General/Types/AgentWearable.cs b/OpenSim/Framework/General/Types/AgentWearable.cs
index 6152b7d..404df0d 100644
--- a/OpenSim/Framework/General/Types/AgentWearable.cs
+++ b/OpenSim/Framework/General/Types/AgentWearable.cs
@@ -1,57 +1,57 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
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 41
42 public static AvatarWearable[] DefaultWearables 42 public static AvatarWearable[] DefaultWearables
43 { 43 {
44 get 44 get
45 { 45 {
46 AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these 46 AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these
47 for (int i = 0; i < 13; i++) 47 for (int i = 0; i < 13; i++)
48 { 48 {
49 defaultWearables[i] = new AvatarWearable(); 49 defaultWearables[i] = new AvatarWearable();
50 } 50 }
51 defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); 51 defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
52 defaultWearables[0].ItemID = LLUUID.Random(); 52 defaultWearables[0].ItemID = LLUUID.Random();
53 return defaultWearables; 53 return defaultWearables;
54 } 54 }
55 } 55 }
56 } 56 }
57} 57}
diff --git a/OpenSim/Framework/General/Types/AssetBase.cs b/OpenSim/Framework/General/Types/AssetBase.cs
index c203f51..181e1e3 100644
--- a/OpenSim/Framework/General/Types/AssetBase.cs
+++ b/OpenSim/Framework/General/Types/AssetBase.cs
@@ -1,46 +1,46 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
31{ 31{
32 public class AssetBase 32 public class AssetBase
33 { 33 {
34 public byte[] Data; 34 public byte[] Data;
35 public LLUUID FullID; 35 public LLUUID FullID;
36 public sbyte Type; 36 public sbyte Type;
37 public sbyte InvType; 37 public sbyte InvType;
38 public string Name; 38 public string Name;
39 public string Description; 39 public string Description;
40 40
41 public AssetBase() 41 public AssetBase()
42 { 42 {
43 43
44 } 44 }
45 } 45 }
46} 46}
diff --git a/OpenSim/Framework/General/Types/AssetLandmark.cs b/OpenSim/Framework/General/Types/AssetLandmark.cs
index 8aa872e..7cec6f6 100644
--- a/OpenSim/Framework/General/Types/AssetLandmark.cs
+++ b/OpenSim/Framework/General/Types/AssetLandmark.cs
@@ -1,59 +1,59 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System.Text; 28using System.Text;
29using libsecondlife; 29using libsecondlife;
30 30
31namespace OpenSim.Framework.Types 31namespace OpenSim.Framework.Types
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 this.Data = a.Data; 41 this.Data = a.Data;
42 this.FullID = a.FullID; 42 this.FullID = a.FullID;
43 this.Type = a.Type; 43 this.Type = a.Type;
44 this.InvType = a.InvType; 44 this.InvType = a.InvType;
45 this.Name = a.Name; 45 this.Name = a.Name;
46 this.Description = a.Description; 46 this.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} 59}
diff --git a/OpenSim/Framework/General/Types/AssetStorage.cs b/OpenSim/Framework/General/Types/AssetStorage.cs
index 3681336..d49e9e8 100644
--- a/OpenSim/Framework/General/Types/AssetStorage.cs
+++ b/OpenSim/Framework/General/Types/AssetStorage.cs
@@ -1,47 +1,47 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
31{ 31{
32 public class AssetStorage 32 public class AssetStorage
33 { 33 {
34 34
35 public AssetStorage() { 35 public AssetStorage() {
36 } 36 }
37 37
38 public AssetStorage(LLUUID assetUUID) { 38 public AssetStorage(LLUUID assetUUID) {
39 UUID=assetUUID; 39 UUID=assetUUID;
40 } 40 }
41 41
42 public byte[] Data; 42 public byte[] Data;
43 public sbyte Type; 43 public sbyte Type;
44 public string Name; 44 public string Name;
45 public LLUUID UUID; 45 public LLUUID UUID;
46 } 46 }
47} 47}
diff --git a/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs
index 436b109..25b3b18 100644
--- a/OpenSim/Framework/General/Types/EstateSettings.cs
+++ b/OpenSim/Framework/General/Types/EstateSettings.cs
@@ -1,93 +1,93 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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
29using libsecondlife; 29using libsecondlife;
30 30
31namespace OpenSim.Framework.Types 31namespace OpenSim.Framework.Types
32{ 32{
33 public class EstateSettings 33 public class EstateSettings
34 { 34 {
35 //Settings to this island 35 //Settings to this island
36 public float billableFactor = (float)0.0; 36 public float billableFactor = (float)0.0;
37 public uint estateID = 0; 37 public uint estateID = 0;
38 public uint parentEstateID = 0; 38 public uint parentEstateID = 0;
39 39
40 public byte maxAgents = 40; 40 public byte maxAgents = 40;
41 public float objectBonusFactor = (float)1.0; 41 public float objectBonusFactor = (float)1.0;
42 42
43 public int redirectGridX = 0; //?? 43 public int redirectGridX = 0; //??
44 public int redirectGridY = 0; //?? 44 public int redirectGridY = 0; //??
45 public Simulator.RegionFlags regionFlags = Simulator.RegionFlags.None; //Booleam values of various region settings 45 public Simulator.RegionFlags regionFlags = Simulator.RegionFlags.None; //Booleam values of various region settings
46 public Simulator.SimAccess simAccess = Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default. 46 public Simulator.SimAccess simAccess = Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default.
47 public float sunHour = 0; 47 public float sunHour = 0;
48 48
49 public float terrainRaiseLimit = 0; 49 public float terrainRaiseLimit = 0;
50 public float terrainLowerLimit = 0; 50 public float terrainLowerLimit = 0;
51 51
52 public bool useFixedSun = false; 52 public bool useFixedSun = false;
53 public int pricePerMeter = 1; 53 public int pricePerMeter = 1;
54 54
55 public ushort regionWaterHeight = 20; 55 public ushort regionWaterHeight = 20;
56 public bool regionAllowTerraform = true; 56 public bool regionAllowTerraform = true;
57 57
58 // Region Information 58 // Region Information
59 // Low resolution 'base' textures. No longer used. 59 // Low resolution 'base' textures. No longer used.
60 public LLUUID terrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); // Default 60 public LLUUID terrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); // Default
61 public LLUUID terrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); // Default 61 public LLUUID terrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); // Default
62 public LLUUID terrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); // Default 62 public LLUUID terrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); // Default
63 public LLUUID terrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); // Default 63 public LLUUID terrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); // Default
64 64
65 // Higher resolution terrain textures 65 // Higher resolution terrain textures
66 public LLUUID terrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000"); 66 public LLUUID terrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000");
67 public LLUUID terrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000"); 67 public LLUUID terrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000");
68 public LLUUID terrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000"); 68 public LLUUID terrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000");
69 public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000"); 69 public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000");
70 70
71 // First quad - each point is bilinearly interpolated at each meter of terrain 71 // First quad - each point is bilinearly interpolated at each meter of terrain
72 public float terrainStartHeight0 = 10.0f; 72 public float terrainStartHeight0 = 10.0f;
73 public float terrainStartHeight1 = 10.0f; 73 public float terrainStartHeight1 = 10.0f;
74 public float terrainStartHeight2 = 10.0f; 74 public float terrainStartHeight2 = 10.0f;
75 public float terrainStartHeight3 = 10.0f; 75 public float terrainStartHeight3 = 10.0f;
76 76
77 // Second quad - also bilinearly interpolated. 77 // Second quad - also bilinearly interpolated.
78 // Terrain texturing is done that: 78 // Terrain texturing is done that:
79 // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y] 79 // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y]
80 public float terrainHeightRange0 = 60.0f; //00 80 public float terrainHeightRange0 = 60.0f; //00
81 public float terrainHeightRange1 = 60.0f; //01 81 public float terrainHeightRange1 = 60.0f; //01
82 public float terrainHeightRange2 = 60.0f; //10 82 public float terrainHeightRange2 = 60.0f; //10
83 public float terrainHeightRange3 = 60.0f; //11 83 public float terrainHeightRange3 = 60.0f; //11
84 84
85 // Terrain Default (Must be in F32 Format!) 85 // Terrain Default (Must be in F32 Format!)
86 public string terrainFile = "default.r32"; 86 public string terrainFile = "default.r32";
87 public double terrainMultiplier = 60.0; 87 public double terrainMultiplier = 60.0;
88 public float waterHeight = (float)20.0; 88 public float waterHeight = (float)20.0;
89 89
90 public LLUUID terrainImageID = LLUUID.Zero; // the assetID that is the current Map image for this region 90 public LLUUID terrainImageID = LLUUID.Zero; // the assetID that is the current Map image for this region
91 91
92 } 92 }
93} 93}
diff --git a/OpenSim/Framework/General/Types/Login.cs b/OpenSim/Framework/General/Types/Login.cs
index d54c019..3aaf613 100644
--- a/OpenSim/Framework/General/Types/Login.cs
+++ b/OpenSim/Framework/General/Types/Login.cs
@@ -1,49 +1,49 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
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 43
44 public Login() 44 public Login()
45 { 45 {
46 46
47 } 47 }
48 } 48 }
49} 49}
diff --git a/OpenSim/Framework/General/Types/MapBlockData.cs b/OpenSim/Framework/General/Types/MapBlockData.cs
index fbb3b73..212ce4b 100644
--- a/OpenSim/Framework/General/Types/MapBlockData.cs
+++ b/OpenSim/Framework/General/Types/MapBlockData.cs
@@ -1,23 +1,23 @@
1using System; 1using System;
2using libsecondlife; 2using libsecondlife;
3 3
4namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
5{ 5{
6 public class MapBlockData 6 public class MapBlockData
7 { 7 {
8 public uint Flags; 8 public uint Flags;
9 public ushort X; 9 public ushort X;
10 public ushort Y; 10 public ushort Y;
11 public byte Agents; 11 public byte Agents;
12 public byte Access; 12 public byte Access;
13 public byte WaterHeight; 13 public byte WaterHeight;
14 public LLUUID MapImageId; 14 public LLUUID MapImageId;
15 public String Name; 15 public String Name;
16 public uint RegionFlags; 16 public uint RegionFlags;
17 17
18 public MapBlockData() 18 public MapBlockData()
19 { 19 {
20 20
21 } 21 }
22 } 22 }
23} 23}
diff --git a/OpenSim/Framework/General/Types/NeighbourInfo.cs b/OpenSim/Framework/General/Types/NeighbourInfo.cs
index bb67981..7e83ffc 100644
--- a/OpenSim/Framework/General/Types/NeighbourInfo.cs
+++ b/OpenSim/Framework/General/Types/NeighbourInfo.cs
@@ -1,42 +1,42 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28namespace OpenSim.Framework.Types 28namespace OpenSim.Framework.Types
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} 42}
diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs
index 900354c..6259d7b 100644
--- a/OpenSim/Framework/General/Types/NetworkServersInfo.cs
+++ b/OpenSim/Framework/General/Types/NetworkServersInfo.cs
@@ -1,219 +1,219 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System; 28using System;
29using OpenSim.Framework.Console; 29using OpenSim.Framework.Console;
30using OpenSim.Framework.Interfaces; 30using OpenSim.Framework.Interfaces;
31 31
32namespace OpenSim.Framework.Types 32namespace OpenSim.Framework.Types
33{ 33{
34 public class NetworkServersInfo 34 public class NetworkServersInfo
35 { 35 {
36 public string AssetURL = "http://127.0.0.1:8003/"; 36 public string AssetURL = "http://127.0.0.1:8003/";
37 public string AssetSendKey = ""; 37 public string AssetSendKey = "";
38 38
39 public string GridURL = ""; 39 public string GridURL = "";
40 public string GridSendKey = ""; 40 public string GridSendKey = "";
41 public string GridRecvKey = ""; 41 public string GridRecvKey = "";
42 public string UserURL = ""; 42 public string UserURL = "";
43 public string UserSendKey = ""; 43 public string UserSendKey = "";
44 public string UserRecvKey = ""; 44 public string UserRecvKey = "";
45 public bool isSandbox; 45 public bool isSandbox;
46 46
47 public uint DefaultHomeLocX = 1000; 47 public uint DefaultHomeLocX = 1000;
48 public uint DefaultHomeLocY = 1000; 48 public uint DefaultHomeLocY = 1000;
49 49
50 public int HttpListenerPort = 9000; 50 public int HttpListenerPort = 9000;
51 public int RemotingListenerPort = 8895; 51 public int RemotingListenerPort = 8895;
52 52
53 public void InitConfig(bool sandboxMode, IGenericConfig configData) 53 public void InitConfig(bool sandboxMode, IGenericConfig configData)
54 { 54 {
55 this.isSandbox = sandboxMode; 55 this.isSandbox = sandboxMode;
56 56
57 try 57 try
58 { 58 {
59 string attri = ""; 59 string attri = "";
60 60
61 attri = ""; 61 attri = "";
62 attri = configData.GetAttribute("HttpListenerPort"); 62 attri = configData.GetAttribute("HttpListenerPort");
63 if (attri == "") 63 if (attri == "")
64 { 64 {
65 string location = MainLog.Instance.CmdPrompt("Http Listener Port", "9000"); 65 string location = MainLog.Instance.CmdPrompt("Http Listener Port", "9000");
66 configData.SetAttribute("HttpListenerPort", location); 66 configData.SetAttribute("HttpListenerPort", location);
67 this.HttpListenerPort = Convert.ToInt32(location); 67 this.HttpListenerPort = Convert.ToInt32(location);
68 } 68 }
69 else 69 else
70 { 70 {
71 this.HttpListenerPort = Convert.ToInt32(attri); 71 this.HttpListenerPort = Convert.ToInt32(attri);
72 } 72 }
73 73
74 attri = ""; 74 attri = "";
75 attri = configData.GetAttribute("RemotingListenerPort"); 75 attri = configData.GetAttribute("RemotingListenerPort");
76 if (attri == "") 76 if (attri == "")
77 { 77 {
78 string location = MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895"); 78 string location = MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895");
79 configData.SetAttribute("RemotingListenerPort", location); 79 configData.SetAttribute("RemotingListenerPort", location);
80 this.RemotingListenerPort = Convert.ToInt32(location); 80 this.RemotingListenerPort = Convert.ToInt32(location);
81 } 81 }
82 else 82 else
83 { 83 {
84 this.RemotingListenerPort = Convert.ToInt32(attri); 84 this.RemotingListenerPort = Convert.ToInt32(attri);
85 } 85 }
86 86
87 if (sandboxMode) 87 if (sandboxMode)
88 { 88 {
89 // default home location X 89 // default home location X
90 attri = ""; 90 attri = "";
91 attri = configData.GetAttribute("DefaultLocationX"); 91 attri = configData.GetAttribute("DefaultLocationX");
92 if (attri == "") 92 if (attri == "")
93 { 93 {
94 string location = MainLog.Instance.CmdPrompt("Default Home Location X", "1000"); 94 string location = MainLog.Instance.CmdPrompt("Default Home Location X", "1000");
95 configData.SetAttribute("DefaultLocationX", location); 95 configData.SetAttribute("DefaultLocationX", location);
96 this.DefaultHomeLocX = (uint)Convert.ToUInt32(location); 96 this.DefaultHomeLocX = (uint)Convert.ToUInt32(location);
97 } 97 }
98 else 98 else
99 { 99 {
100 this.DefaultHomeLocX = (uint)Convert.ToUInt32(attri); 100 this.DefaultHomeLocX = (uint)Convert.ToUInt32(attri);
101 } 101 }
102 102
103 // default home location Y 103 // default home location Y
104 attri = ""; 104 attri = "";
105 attri = configData.GetAttribute("DefaultLocationY"); 105 attri = configData.GetAttribute("DefaultLocationY");
106 if (attri == "") 106 if (attri == "")
107 { 107 {
108 string location = MainLog.Instance.CmdPrompt("Default Home Location Y", "1000"); 108 string location = MainLog.Instance.CmdPrompt("Default Home Location Y", "1000");
109 configData.SetAttribute("DefaultLocationY", location); 109 configData.SetAttribute("DefaultLocationY", location);
110 this.DefaultHomeLocY = (uint)Convert.ToUInt32(location); 110 this.DefaultHomeLocY = (uint)Convert.ToUInt32(location);
111 } 111 }
112 else 112 else
113 { 113 {
114 this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri); 114 this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri);
115 } 115 }
116 } 116 }
117 if (!isSandbox) 117 if (!isSandbox)
118 { 118 {
119 //Grid Server 119 //Grid Server
120 attri = ""; 120 attri = "";
121 attri = configData.GetAttribute("GridServerURL"); 121 attri = configData.GetAttribute("GridServerURL");
122 if (attri == "") 122 if (attri == "")
123 { 123 {
124 this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/"); 124 this.GridURL = MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/");
125 configData.SetAttribute("GridServerURL", this.GridURL); 125 configData.SetAttribute("GridServerURL", this.GridURL);
126 } 126 }
127 else 127 else
128 { 128 {
129 this.GridURL = attri; 129 this.GridURL = attri;
130 } 130 }
131 131
132 //Grid Send Key 132 //Grid Send Key
133 attri = ""; 133 attri = "";
134 attri = configData.GetAttribute("GridSendKey"); 134 attri = configData.GetAttribute("GridSendKey");
135 if (attri == "") 135 if (attri == "")
136 { 136 {
137 this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server", "null"); 137 this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server", "null");
138 configData.SetAttribute("GridSendKey", this.GridSendKey); 138 configData.SetAttribute("GridSendKey", this.GridSendKey);
139 } 139 }
140 else 140 else
141 { 141 {
142 this.GridSendKey = attri; 142 this.GridSendKey = attri;
143 } 143 }
144 144
145 //Grid Receive Key 145 //Grid Receive Key
146 attri = ""; 146 attri = "";
147 attri = configData.GetAttribute("GridRecvKey"); 147 attri = configData.GetAttribute("GridRecvKey");
148 if (attri == "") 148 if (attri == "")
149 { 149 {
150 this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server", "null"); 150 this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server", "null");
151 configData.SetAttribute("GridRecvKey", this.GridRecvKey); 151 configData.SetAttribute("GridRecvKey", this.GridRecvKey);
152 } 152 }
153 else 153 else
154 { 154 {
155 this.GridRecvKey = attri; 155 this.GridRecvKey = attri;
156 } 156 }
157 157
158 //Grid Server 158 //Grid Server
159 attri = ""; 159 attri = "";
160 attri = configData.GetAttribute("UserServerURL"); 160 attri = configData.GetAttribute("UserServerURL");
161 if (attri == "") 161 if (attri == "")
162 { 162 {
163 this.UserURL= MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/"); 163 this.UserURL= MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/");
164 configData.SetAttribute("UserServerURL", this.UserURL); 164 configData.SetAttribute("UserServerURL", this.UserURL);
165 } 165 }
166 else 166 else
167 { 167 {
168 this.UserURL = attri; 168 this.UserURL = attri;
169 } 169 }
170 170
171 //Grid Send Key 171 //Grid Send Key
172 attri = ""; 172 attri = "";
173 attri = configData.GetAttribute("UserSendKey"); 173 attri = configData.GetAttribute("UserSendKey");
174 if (attri == "") 174 if (attri == "")
175 { 175 {
176 this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server", "null"); 176 this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server", "null");
177 configData.SetAttribute("UserSendKey", this.UserSendKey); 177 configData.SetAttribute("UserSendKey", this.UserSendKey);
178 } 178 }
179 else 179 else
180 { 180 {
181 this.UserSendKey = attri; 181 this.UserSendKey = attri;
182 } 182 }
183 183
184 //Grid Receive Key 184 //Grid Receive Key
185 attri = ""; 185 attri = "";
186 attri = configData.GetAttribute("UserRecvKey"); 186 attri = configData.GetAttribute("UserRecvKey");
187 if (attri == "") 187 if (attri == "")
188 { 188 {
189 this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server", "null"); 189 this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server", "null");
190 configData.SetAttribute("UserRecvKey", this.UserRecvKey); 190 configData.SetAttribute("UserRecvKey", this.UserRecvKey);
191 } 191 }
192 else 192 else
193 { 193 {
194 this.UserRecvKey = attri; 194 this.UserRecvKey = attri;
195 } 195 }
196 196
197 attri = ""; 197 attri = "";
198 attri = configData.GetAttribute("AssetServerURL"); 198 attri = configData.GetAttribute("AssetServerURL");
199 if (attri == "") 199 if (attri == "")
200 { 200 {
201 this.AssetURL = MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/"); 201 this.AssetURL = MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/");
202 configData.SetAttribute("AssetServerURL", this.GridURL); 202 configData.SetAttribute("AssetServerURL", this.GridURL);
203 } 203 }
204 else 204 else
205 { 205 {
206 this.AssetURL = attri; 206 this.AssetURL = attri;
207 } 207 }
208 208
209 } 209 }
210 configData.Commit(); 210 configData.Commit();
211 } 211 }
212 catch (Exception e) 212 catch (Exception e)
213 { 213 {
214 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); 214 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
215 MainLog.Instance.Warn(e.ToString()); 215 MainLog.Instance.Warn(e.ToString());
216 } 216 }
217 } 217 }
218 } 218 }
219} 219}
diff --git a/OpenSim/Framework/General/Types/ParcelData.cs b/OpenSim/Framework/General/Types/ParcelData.cs
index 17de655..5626299 100644
--- a/OpenSim/Framework/General/Types/ParcelData.cs
+++ b/OpenSim/Framework/General/Types/ParcelData.cs
@@ -1,120 +1,120 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using libsecondlife; 28using libsecondlife;
29 29
30namespace OpenSim.Framework.Types 30namespace OpenSim.Framework.Types
31{ 31{
32 32
33 public class ParcelData 33 public class ParcelData
34 { 34 {
35 public byte[] parcelBitmapByteArray = new byte[512]; 35 public byte[] parcelBitmapByteArray = new byte[512];
36 public string parcelName = "Your Parcel"; 36 public string parcelName = "Your Parcel";
37 public string parcelDesc = ""; 37 public string parcelDesc = "";
38 public LLUUID ownerID = new LLUUID(); 38 public LLUUID ownerID = new LLUUID();
39 public bool isGroupOwned = false; 39 public bool isGroupOwned = false;
40 public LLVector3 AABBMin = new LLVector3(); 40 public LLVector3 AABBMin = new LLVector3();
41 public LLVector3 AABBMax = new LLVector3(); 41 public LLVector3 AABBMax = new LLVector3();
42 public int area = 0; 42 public int area = 0;
43 public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned 43 public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
44 public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID 44 public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID
45 public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category 45 public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
46 public int claimDate = 0; //Unemplemented 46 public int claimDate = 0; //Unemplemented
47 public int claimPrice = 0; //Unemplemented 47 public int claimPrice = 0; //Unemplemented
48 public LLUUID groupID = new LLUUID(); //Unemplemented 48 public LLUUID groupID = new LLUUID(); //Unemplemented
49 public int groupPrims = 0; 49 public int groupPrims = 0;
50 public int otherPrims = 0; 50 public int otherPrims = 0;
51 public int ownerPrims = 0; 51 public int ownerPrims = 0;
52 public int selectedPrims = 0; 52 public int selectedPrims = 0;
53 public int simwidePrims = 0; 53 public int simwidePrims = 0;
54 public int simwideArea = 0; 54 public int simwideArea = 0;
55 public int salePrice = 0; //Unemeplemented. Parcels price. 55 public int salePrice = 0; //Unemeplemented. Parcels price.
56 public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.Leased; 56 public Parcel.ParcelStatus parcelStatus = Parcel.ParcelStatus.Leased;
57 public uint parcelFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts; 57 public uint parcelFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts;
58 public byte landingType = 0; 58 public byte landingType = 0;
59 public byte mediaAutoScale = 0; 59 public byte mediaAutoScale = 0;
60 public LLUUID mediaID = LLUUID.Zero; 60 public LLUUID mediaID = LLUUID.Zero;
61 public int localID = 0; 61 public int localID = 0;
62 public LLUUID globalID = new LLUUID(); 62 public LLUUID globalID = new LLUUID();
63 63
64 public string mediaURL = ""; 64 public string mediaURL = "";
65 public string musicURL = ""; 65 public string musicURL = "";
66 public float passHours = 0; 66 public float passHours = 0;
67 public int passPrice = 0; 67 public int passPrice = 0;
68 public LLUUID snapshotID = LLUUID.Zero; 68 public LLUUID snapshotID = LLUUID.Zero;
69 public LLVector3 userLocation = new LLVector3(); 69 public LLVector3 userLocation = new LLVector3();
70 public LLVector3 userLookAt = new LLVector3(); 70 public LLVector3 userLookAt = new LLVector3();
71 71
72 public ParcelData() 72 public ParcelData()
73 { 73 {
74 globalID = LLUUID.Random(); 74 globalID = LLUUID.Random();
75 } 75 }
76 76
77 public ParcelData Copy() 77 public ParcelData Copy()
78 { 78 {
79 ParcelData parcelData = new ParcelData(); 79 ParcelData parcelData = new ParcelData();
80 80
81 parcelData.AABBMax = this.AABBMax; 81 parcelData.AABBMax = this.AABBMax;
82 parcelData.AABBMin = this.AABBMin; 82 parcelData.AABBMin = this.AABBMin;
83 parcelData.area = this.area; 83 parcelData.area = this.area;
84 parcelData.auctionID = this.auctionID; 84 parcelData.auctionID = this.auctionID;
85 parcelData.authBuyerID = this.authBuyerID; 85 parcelData.authBuyerID = this.authBuyerID;
86 parcelData.category = this.category; 86 parcelData.category = this.category;
87 parcelData.claimDate = this.claimDate; 87 parcelData.claimDate = this.claimDate;
88 parcelData.claimPrice = this.claimPrice; 88 parcelData.claimPrice = this.claimPrice;
89 parcelData.globalID = this.globalID; 89 parcelData.globalID = this.globalID;
90 parcelData.groupID = this.groupID; 90 parcelData.groupID = this.groupID;
91 parcelData.groupPrims = this.groupPrims; 91 parcelData.groupPrims = this.groupPrims;
92 parcelData.otherPrims = this.otherPrims; 92 parcelData.otherPrims = this.otherPrims;
93 parcelData.ownerPrims = this.ownerPrims; 93 parcelData.ownerPrims = this.ownerPrims;
94 parcelData.selectedPrims = this.selectedPrims; 94 parcelData.selectedPrims = this.selectedPrims;
95 parcelData.isGroupOwned = this.isGroupOwned; 95 parcelData.isGroupOwned = this.isGroupOwned;
96 parcelData.localID = this.localID; 96 parcelData.localID = this.localID;
97 parcelData.landingType = this.landingType; 97 parcelData.landingType = this.landingType;
98 parcelData.mediaAutoScale = this.mediaAutoScale; 98 parcelData.mediaAutoScale = this.mediaAutoScale;
99 parcelData.mediaID = this.mediaID; 99 parcelData.mediaID = this.mediaID;
100 parcelData.mediaURL = this.mediaURL; 100 parcelData.mediaURL = this.mediaURL;
101 parcelData.musicURL = this.musicURL; 101 parcelData.musicURL = this.musicURL;
102 parcelData.ownerID = this.ownerID; 102 parcelData.ownerID = this.ownerID;
103 parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone(); 103 parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone();
104 parcelData.parcelDesc = this.parcelDesc; 104 parcelData.parcelDesc = this.parcelDesc;
105 parcelData.parcelFlags = this.parcelFlags; 105 parcelData.parcelFlags = this.parcelFlags;
106 parcelData.parcelName = this.parcelName; 106 parcelData.parcelName = this.parcelName;
107 parcelData.parcelStatus = this.parcelStatus; 107 parcelData.parcelStatus = this.parcelStatus;
108 parcelData.passHours = this.passHours; 108 parcelData.passHours = this.passHours;
109 parcelData.passPrice = this.passPrice; 109 parcelData.passPrice = this.passPrice;
110 parcelData.salePrice = this.salePrice; 110 parcelData.salePrice = this.salePrice;
111 parcelData.snapshotID = this.snapshotID; 111 parcelData.snapshotID = this.snapshotID;
112 parcelData.userLocation = this.userLocation; 112 parcelData.userLocation = this.userLocation;
113 parcelData.userLookAt = this.userLookAt; 113 parcelData.userLookAt = this.userLookAt;
114 114
115 return parcelData; 115 return parcelData;
116 116
117 } 117 }
118 } 118 }
119 119
120} 120}
diff --git a/OpenSim/Framework/General/Types/PrimData.cs b/OpenSim/Framework/General/Types/PrimData.cs
index ff81bcd..6b8fa3a 100644
--- a/OpenSim/Framework/General/Types/PrimData.cs
+++ b/OpenSim/Framework/General/Types/PrimData.cs
@@ -1,228 +1,228 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System; 28using System;
29using libsecondlife; 29using libsecondlife;
30 30
31namespace OpenSim.Framework.Types 31namespace OpenSim.Framework.Types
32{ 32{
33 public class PrimData 33 public class PrimData
34 { 34 {
35 private const uint FULL_MASK_PERMISSIONS = 2147483647; 35 private const uint FULL_MASK_PERMISSIONS = 2147483647;
36 36
37 public LLUUID OwnerID; 37 public LLUUID OwnerID;
38 public byte PCode; 38 public byte PCode;
39 public ushort PathBegin; 39 public ushort PathBegin;
40 public ushort PathEnd; 40 public ushort PathEnd;
41 public byte PathScaleX; 41 public byte PathScaleX;
42 public byte PathScaleY; 42 public byte PathScaleY;
43 public byte PathShearX; 43 public byte PathShearX;
44 public byte PathShearY; 44 public byte PathShearY;
45 public sbyte PathSkew; 45 public sbyte PathSkew;
46 public ushort ProfileBegin; 46 public ushort ProfileBegin;
47 public ushort ProfileEnd; 47 public ushort ProfileEnd;
48 public LLVector3 Scale; 48 public LLVector3 Scale;
49 public byte PathCurve; 49 public byte PathCurve;
50 public byte ProfileCurve; 50 public byte ProfileCurve;
51 public uint ParentID = 0; 51 public uint ParentID = 0;
52 public ushort ProfileHollow; 52 public ushort ProfileHollow;
53 public sbyte PathRadiusOffset; 53 public sbyte PathRadiusOffset;
54 public byte PathRevolutions; 54 public byte PathRevolutions;
55 public sbyte PathTaperX; 55 public sbyte PathTaperX;
56 public sbyte PathTaperY; 56 public sbyte PathTaperY;
57 public sbyte PathTwist; 57 public sbyte PathTwist;
58 public sbyte PathTwistBegin; 58 public sbyte PathTwistBegin;
59 public byte[] TextureEntry; // a LL textureEntry in byte[] format 59 public byte[] TextureEntry; // a LL textureEntry in byte[] format
60 60
61 public Int32 CreationDate; 61 public Int32 CreationDate;
62 public uint OwnerMask = FULL_MASK_PERMISSIONS; 62 public uint OwnerMask = FULL_MASK_PERMISSIONS;
63 public uint NextOwnerMask = FULL_MASK_PERMISSIONS; 63 public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
64 public uint GroupMask = FULL_MASK_PERMISSIONS; 64 public uint GroupMask = FULL_MASK_PERMISSIONS;
65 public uint EveryoneMask = FULL_MASK_PERMISSIONS; 65 public uint EveryoneMask = FULL_MASK_PERMISSIONS;
66 public uint BaseMask = FULL_MASK_PERMISSIONS; 66 public uint BaseMask = FULL_MASK_PERMISSIONS;
67 67
68 //following only used during prim storage 68 //following only used during prim storage
69 public LLVector3 Position; 69 public LLVector3 Position;
70 public LLQuaternion Rotation = new LLQuaternion(0, 1, 0, 0); 70 public LLQuaternion Rotation = new LLQuaternion(0, 1, 0, 0);
71 public uint LocalID; 71 public uint LocalID;
72 public LLUUID FullID; 72 public LLUUID FullID;
73 73
74 public PrimData() 74 public PrimData()
75 { 75 {
76 76
77 } 77 }
78 78
79 public PrimData(byte[] data) 79 public PrimData(byte[] data)
80 { 80 {
81 int i = 0; 81 int i = 0;
82 82
83 this.OwnerID = new LLUUID(data, i); i += 16; 83 this.OwnerID = new LLUUID(data, i); i += 16;
84 this.PCode = data[i++]; 84 this.PCode = data[i++];
85 this.PathBegin = (ushort)(data[i++] + (data[i++] << 8)); 85 this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
86 this.PathEnd = (ushort)(data[i++] + (data[i++] << 8)); 86 this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
87 this.PathScaleX = data[i++]; 87 this.PathScaleX = data[i++];
88 this.PathScaleY = data[i++]; 88 this.PathScaleY = data[i++];
89 this.PathShearX = data[i++]; 89 this.PathShearX = data[i++];
90 this.PathShearY = data[i++]; 90 this.PathShearY = data[i++];
91 this.PathSkew = (sbyte)data[i++]; 91 this.PathSkew = (sbyte)data[i++];
92 this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8)); 92 this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
93 this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8)); 93 this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
94 this.Scale = new LLVector3(data, i); i += 12; 94 this.Scale = new LLVector3(data, i); i += 12;
95 this.PathCurve = data[i++]; 95 this.PathCurve = data[i++];
96 this.ProfileCurve = data[i++]; 96 this.ProfileCurve = data[i++];
97 this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 97 this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
98 this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8)); 98 this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8));
99 this.PathRadiusOffset = (sbyte)data[i++]; 99 this.PathRadiusOffset = (sbyte)data[i++];
100 this.PathRevolutions = data[i++]; 100 this.PathRevolutions = data[i++];
101 this.PathTaperX = (sbyte)data[i++]; 101 this.PathTaperX = (sbyte)data[i++];
102 this.PathTaperY = (sbyte)data[i++]; 102 this.PathTaperY = (sbyte)data[i++];
103 this.PathTwist = (sbyte)data[i++]; 103 this.PathTwist = (sbyte)data[i++];
104 this.PathTwistBegin = (sbyte)data[i++]; 104 this.PathTwistBegin = (sbyte)data[i++];
105 ushort length = (ushort)(data[i++] + (data[i++] << 8)); 105 ushort length = (ushort)(data[i++] + (data[i++] << 8));
106 this.TextureEntry = new byte[length]; 106 this.TextureEntry = new byte[length];
107 Array.Copy(data, i, TextureEntry, 0, length); i += length; 107 Array.Copy(data, i, TextureEntry, 0, length); i += length;
108 this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 108 this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
109 this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 109 this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
110 this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 110 this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
111 this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 111 this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
112 this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 112 this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
113 this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 113 this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
114 this.Position = new LLVector3(data, i); i += 12; 114 this.Position = new LLVector3(data, i); i += 12;
115 this.Rotation = new LLQuaternion(data, i, true); i += 12; 115 this.Rotation = new LLQuaternion(data, i, true); i += 12;
116 this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 116 this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
117 this.FullID = new LLUUID(data, i); i += 16; 117 this.FullID = new LLUUID(data, i); i += 16;
118 118
119 } 119 }
120 120
121 public byte[] ToBytes() 121 public byte[] ToBytes()
122 { 122 {
123 int i = 0; 123 int i = 0;
124 byte[] bytes = new byte[126 + TextureEntry.Length]; 124 byte[] bytes = new byte[126 + TextureEntry.Length];
125 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16; 125 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
126 bytes[i++] = this.PCode; 126 bytes[i++] = this.PCode;
127 bytes[i++] = (byte)(this.PathBegin % 256); 127 bytes[i++] = (byte)(this.PathBegin % 256);
128 bytes[i++] = (byte)((this.PathBegin >> 8) % 256); 128 bytes[i++] = (byte)((this.PathBegin >> 8) % 256);
129 bytes[i++] = (byte)(this.PathEnd % 256); 129 bytes[i++] = (byte)(this.PathEnd % 256);
130 bytes[i++] = (byte)((this.PathEnd >> 8) % 256); 130 bytes[i++] = (byte)((this.PathEnd >> 8) % 256);
131 bytes[i++] = this.PathScaleX; 131 bytes[i++] = this.PathScaleX;
132 bytes[i++] = this.PathScaleY; 132 bytes[i++] = this.PathScaleY;
133 bytes[i++] = this.PathShearX; 133 bytes[i++] = this.PathShearX;
134 bytes[i++] = this.PathShearY; 134 bytes[i++] = this.PathShearY;
135 bytes[i++] = (byte)this.PathSkew; 135 bytes[i++] = (byte)this.PathSkew;
136 bytes[i++] = (byte)(this.ProfileBegin % 256); 136 bytes[i++] = (byte)(this.ProfileBegin % 256);
137 bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256); 137 bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256);
138 bytes[i++] = (byte)(this.ProfileEnd % 256); 138 bytes[i++] = (byte)(this.ProfileEnd % 256);
139 bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256); 139 bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256);
140 Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12; 140 Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12;
141 bytes[i++] = this.PathCurve; 141 bytes[i++] = this.PathCurve;
142 bytes[i++] = this.ProfileCurve; 142 bytes[i++] = this.ProfileCurve;
143 bytes[i++] = (byte)(ParentID % 256); 143 bytes[i++] = (byte)(ParentID % 256);
144 bytes[i++] = (byte)((ParentID >> 8) % 256); 144 bytes[i++] = (byte)((ParentID >> 8) % 256);
145 bytes[i++] = (byte)((ParentID >> 16) % 256); 145 bytes[i++] = (byte)((ParentID >> 16) % 256);
146 bytes[i++] = (byte)((ParentID >> 24) % 256); 146 bytes[i++] = (byte)((ParentID >> 24) % 256);
147 bytes[i++] = (byte)(this.ProfileHollow % 256); 147 bytes[i++] = (byte)(this.ProfileHollow % 256);
148 bytes[i++] = (byte)((this.ProfileHollow >> 8) % 256); 148 bytes[i++] = (byte)((this.ProfileHollow >> 8) % 256);
149 bytes[i++] = ((byte)this.PathRadiusOffset); 149 bytes[i++] = ((byte)this.PathRadiusOffset);
150 bytes[i++] = this.PathRevolutions; 150 bytes[i++] = this.PathRevolutions;
151 bytes[i++] = ((byte)this.PathTaperX); 151 bytes[i++] = ((byte)this.PathTaperX);
152 bytes[i++] = ((byte)this.PathTaperY); 152 bytes[i++] = ((byte)this.PathTaperY);
153 bytes[i++] = ((byte)this.PathTwist); 153 bytes[i++] = ((byte)this.PathTwist);
154 bytes[i++] = ((byte)this.PathTwistBegin); 154 bytes[i++] = ((byte)this.PathTwistBegin);
155 bytes[i++] = (byte)(TextureEntry.Length % 256); 155 bytes[i++] = (byte)(TextureEntry.Length % 256);
156 bytes[i++] = (byte)((TextureEntry.Length >> 8) % 256); 156 bytes[i++] = (byte)((TextureEntry.Length >> 8) % 256);
157 Array.Copy(TextureEntry, 0, bytes, i, TextureEntry.Length); i += TextureEntry.Length; 157 Array.Copy(TextureEntry, 0, bytes, i, TextureEntry.Length); i += TextureEntry.Length;
158 bytes[i++] = (byte)(this.CreationDate % 256); 158 bytes[i++] = (byte)(this.CreationDate % 256);
159 bytes[i++] = (byte)((this.CreationDate >> 8) % 256); 159 bytes[i++] = (byte)((this.CreationDate >> 8) % 256);
160 bytes[i++] = (byte)((this.CreationDate >> 16) % 256); 160 bytes[i++] = (byte)((this.CreationDate >> 16) % 256);
161 bytes[i++] = (byte)((this.CreationDate >> 24) % 256); 161 bytes[i++] = (byte)((this.CreationDate >> 24) % 256);
162 bytes[i++] = (byte)(this.OwnerMask % 256); 162 bytes[i++] = (byte)(this.OwnerMask % 256);
163 bytes[i++] = (byte)((this.OwnerMask >> 8) % 256); 163 bytes[i++] = (byte)((this.OwnerMask >> 8) % 256);
164 bytes[i++] = (byte)((this.OwnerMask >> 16) % 256); 164 bytes[i++] = (byte)((this.OwnerMask >> 16) % 256);
165 bytes[i++] = (byte)((this.OwnerMask >> 24) % 256); 165 bytes[i++] = (byte)((this.OwnerMask >> 24) % 256);
166 bytes[i++] = (byte)(this.NextOwnerMask % 256); 166 bytes[i++] = (byte)(this.NextOwnerMask % 256);
167 bytes[i++] = (byte)((this.NextOwnerMask >> 8) % 256); 167 bytes[i++] = (byte)((this.NextOwnerMask >> 8) % 256);
168 bytes[i++] = (byte)((this.NextOwnerMask >> 16) % 256); 168 bytes[i++] = (byte)((this.NextOwnerMask >> 16) % 256);
169 bytes[i++] = (byte)((this.NextOwnerMask >> 24) % 256); 169 bytes[i++] = (byte)((this.NextOwnerMask >> 24) % 256);
170 bytes[i++] = (byte)(this.GroupMask % 256); 170 bytes[i++] = (byte)(this.GroupMask % 256);
171 bytes[i++] = (byte)((this.GroupMask >> 8) % 256); 171 bytes[i++] = (byte)((this.GroupMask >> 8) % 256);
172 bytes[i++] = (byte)((this.GroupMask >> 16) % 256); 172 bytes[i++] = (byte)((this.GroupMask >> 16) % 256);
173 bytes[i++] = (byte)((this.GroupMask >> 24) % 256); 173 bytes[i++] = (byte)((this.GroupMask >> 24) % 256);
174 bytes[i++] = (byte)(this.EveryoneMask % 256); 174 bytes[i++] = (byte)(this.EveryoneMask % 256);
175 bytes[i++] = (byte)((this.EveryoneMask >> 8) % 256); 175 bytes[i++] = (byte)((this.EveryoneMask >> 8) % 256);
176 bytes[i++] = (byte)((this.EveryoneMask >> 16) % 256); 176 bytes[i++] = (byte)((this.EveryoneMask >> 16) % 256);
177 bytes[i++] = (byte)((this.EveryoneMask >> 24) % 256); 177 bytes[i++] = (byte)((this.EveryoneMask >> 24) % 256);
178 bytes[i++] = (byte)(this.BaseMask % 256); 178 bytes[i++] = (byte)(this.BaseMask % 256);
179 bytes[i++] = (byte)((this.BaseMask >> 8) % 256); 179 bytes[i++] = (byte)((this.BaseMask >> 8) % 256);
180 bytes[i++] = (byte)((this.BaseMask >> 16) % 256); 180 bytes[i++] = (byte)((this.BaseMask >> 16) % 256);
181 bytes[i++] = (byte)((this.BaseMask >> 24) % 256); 181 bytes[i++] = (byte)((this.BaseMask >> 24) % 256);
182 Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12; 182 Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12;
183 if (this.Rotation == new LLQuaternion(0, 0, 0, 0)) 183 if (this.Rotation == new LLQuaternion(0, 0, 0, 0))
184 { 184 {
185 this.Rotation = new LLQuaternion(0, 1, 0, 0); 185 this.Rotation = new LLQuaternion(0, 1, 0, 0);
186 } 186 }
187 Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12; 187 Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12;
188 bytes[i++] = (byte)(this.LocalID % 256); 188 bytes[i++] = (byte)(this.LocalID % 256);
189 bytes[i++] = (byte)((this.LocalID >> 8) % 256); 189 bytes[i++] = (byte)((this.LocalID >> 8) % 256);
190 bytes[i++] = (byte)((this.LocalID >> 16) % 256); 190 bytes[i++] = (byte)((this.LocalID >> 16) % 256);
191 bytes[i++] = (byte)((this.LocalID >> 24) % 256); 191 bytes[i++] = (byte)((this.LocalID >> 24) % 256);
192 Array.Copy(FullID.GetBytes(), 0, bytes, i, 16); i += 16; 192 Array.Copy(FullID.GetBytes(), 0, bytes, i, 16); i += 16;
193 193
194 return bytes; 194 return bytes;
195 } 195 }
196 196
197 public static PrimData DefaultCube() 197 public static PrimData DefaultCube()
198 { 198 {
199 PrimData primData = new PrimData(); 199 PrimData primData = new PrimData();
200 primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 200 primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
201 primData.FullID = LLUUID.Random(); 201 primData.FullID = LLUUID.Random();
202 primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 202 primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
203 primData.Rotation = new LLQuaternion(0, 0, 0, 1); 203 primData.Rotation = new LLQuaternion(0, 0, 0, 1);
204 primData.PCode = 9; 204 primData.PCode = 9;
205 primData.ParentID = 0; 205 primData.ParentID = 0;
206 primData.PathBegin = 0; 206 primData.PathBegin = 0;
207 primData.PathEnd = 0; 207 primData.PathEnd = 0;
208 primData.PathScaleX = 0; 208 primData.PathScaleX = 0;
209 primData.PathScaleY = 0; 209 primData.PathScaleY = 0;
210 primData.PathShearX = 0; 210 primData.PathShearX = 0;
211 primData.PathShearY = 0; 211 primData.PathShearY = 0;
212 primData.PathSkew = 0; 212 primData.PathSkew = 0;
213 primData.ProfileBegin = 0; 213 primData.ProfileBegin = 0;
214 primData.ProfileEnd = 0; 214 primData.ProfileEnd = 0;
215 primData.PathCurve = 16; 215 primData.PathCurve = 16;
216 primData.ProfileCurve = 1; 216 primData.ProfileCurve = 1;
217 primData.ProfileHollow = 0; 217 primData.ProfileHollow = 0;
218 primData.PathRadiusOffset = 0; 218 primData.PathRadiusOffset = 0;
219 primData.PathRevolutions = 0; 219 primData.PathRevolutions = 0;
220 primData.PathTaperX = 0; 220 primData.PathTaperX = 0;
221 primData.PathTaperY = 0; 221 primData.PathTaperY = 0;
222 primData.PathTwist = 0; 222 primData.PathTwist = 0;
223 primData.PathTwistBegin = 0; 223 primData.PathTwistBegin = 0;
224 224
225 return primData; 225 return primData;
226 } 226 }
227 } 227 }
228} 228}
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
index a085a44..e058c07 100644
--- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs
@@ -1,109 +1,109 @@
1using libsecondlife; 1using libsecondlife;
2using libsecondlife.Packets; 2using libsecondlife.Packets;
3 3
4namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
5{ 5{
6 public enum ShapeType 6 public enum ShapeType
7 { 7 {
8 Box, 8 Box,
9 Sphere, 9 Sphere,
10 Ring, 10 Ring,
11 Tube, 11 Tube,
12 Torus, 12 Torus,
13 Prism, 13 Prism,
14 Scuplted, 14 Scuplted,
15 Cylinder, 15 Cylinder,
16 Foliage, 16 Foliage,
17 Unknown 17 Unknown
18 } 18 }
19 19
20 public class PrimitiveBaseShape 20 public class PrimitiveBaseShape
21 { 21 {
22 private ShapeType type = ShapeType.Unknown; 22 private ShapeType type = ShapeType.Unknown;
23 23
24 public byte PCode; 24 public byte PCode;
25 public ushort PathBegin; 25 public ushort PathBegin;
26 public ushort PathEnd; 26 public ushort PathEnd;
27 public byte PathScaleX; 27 public byte PathScaleX;
28 public byte PathScaleY; 28 public byte PathScaleY;
29 public byte PathShearX; 29 public byte PathShearX;
30 public byte PathShearY; 30 public byte PathShearY;
31 public sbyte PathSkew; 31 public sbyte PathSkew;
32 public ushort ProfileBegin; 32 public ushort ProfileBegin;
33 public ushort ProfileEnd; 33 public ushort ProfileEnd;
34 public LLVector3 Scale; 34 public LLVector3 Scale;
35 public byte PathCurve; 35 public byte PathCurve;
36 public byte ProfileCurve; 36 public byte ProfileCurve;
37 public ushort ProfileHollow; 37 public ushort ProfileHollow;
38 public sbyte PathRadiusOffset; 38 public sbyte PathRadiusOffset;
39 public byte PathRevolutions; 39 public byte PathRevolutions;
40 public sbyte PathTaperX; 40 public sbyte PathTaperX;
41 public sbyte PathTaperY; 41 public sbyte PathTaperY;
42 public sbyte PathTwist; 42 public sbyte PathTwist;
43 public sbyte PathTwistBegin; 43 public sbyte PathTwistBegin;
44 public byte[] TextureEntry; // a LL textureEntry in byte[] format 44 public byte[] TextureEntry; // a LL textureEntry in byte[] format
45 45
46 public ShapeType PrimType 46 public ShapeType PrimType
47 { 47 {
48 get 48 get
49 { 49 {
50 return this.type; 50 return this.type;
51 } 51 }
52 } 52 }
53 53
54 public LLVector3 PrimScale 54 public LLVector3 PrimScale
55 { 55 {
56 get 56 get
57 { 57 {
58 return this.Scale; 58 return this.Scale;
59 } 59 }
60 } 60 }
61 61
62 public PrimitiveBaseShape() 62 public PrimitiveBaseShape()
63 { 63 {
64 64
65 } 65 }
66 66
67 //void returns need to change of course 67 //void returns need to change of course
68 public void GetMesh() 68 public void GetMesh()
69 { 69 {
70 70
71 } 71 }
72 72
73 public PrimitiveBaseShape Copy() 73 public PrimitiveBaseShape Copy()
74 { 74 {
75 return (PrimitiveBaseShape) this.MemberwiseClone(); 75 return (PrimitiveBaseShape) this.MemberwiseClone();
76 } 76 }
77 77
78 public static PrimitiveBaseShape DefaultBox() 78 public static PrimitiveBaseShape DefaultBox()
79 { 79 {
80 PrimitiveBaseShape primShape = new PrimitiveBaseShape(); 80 PrimitiveBaseShape primShape = new PrimitiveBaseShape();
81 81
82 primShape.type = ShapeType.Box; 82 primShape.type = ShapeType.Box;
83 primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); 83 primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
84 primShape.PCode = 9; 84 primShape.PCode = 9;
85 primShape.PathBegin = 0; 85 primShape.PathBegin = 0;
86 primShape.PathEnd = 0; 86 primShape.PathEnd = 0;
87 primShape.PathScaleX = 0; 87 primShape.PathScaleX = 0;
88 primShape.PathScaleY = 0; 88 primShape.PathScaleY = 0;
89 primShape.PathShearX = 0; 89 primShape.PathShearX = 0;
90 primShape.PathShearY = 0; 90 primShape.PathShearY = 0;
91 primShape.PathSkew = 0; 91 primShape.PathSkew = 0;
92 primShape.ProfileBegin = 0; 92 primShape.ProfileBegin = 0;
93 primShape.ProfileEnd = 0; 93 primShape.ProfileEnd = 0;
94 primShape.PathCurve = 16; 94 primShape.PathCurve = 16;
95 primShape.ProfileCurve = 1; 95 primShape.ProfileCurve = 1;
96 primShape.ProfileHollow = 0; 96 primShape.ProfileHollow = 0;
97 primShape.PathRadiusOffset = 0; 97 primShape.PathRadiusOffset = 0;
98 primShape.PathRevolutions = 0; 98 primShape.PathRevolutions = 0;
99 primShape.PathTaperX = 0; 99 primShape.PathTaperX = 0;
100 primShape.PathTaperY = 0; 100 primShape.PathTaperY = 0;
101 primShape.PathTwist = 0; 101 primShape.PathTwist = 0;
102 primShape.PathTwistBegin = 0; 102 primShape.PathTwistBegin = 0;
103 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); 103 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
104 primShape.TextureEntry = ntex.ToBytes(); 104 primShape.TextureEntry = ntex.ToBytes();
105 105
106 return primShape; 106 return primShape;
107 } 107 }
108 } 108 }
109} 109}
diff --git a/OpenSim/Framework/General/Types/RegionHandle.cs b/OpenSim/Framework/General/Types/RegionHandle.cs
index 4a055ad..d90acc6 100644
--- a/OpenSim/Framework/General/Types/RegionHandle.cs
+++ b/OpenSim/Framework/General/Types/RegionHandle.cs
@@ -1,121 +1,121 @@
1using System; 1using System;
2using System.Net; 2using System.Net;
3 3
4namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
5{ 5{
6 /// <summary> 6 /// <summary>
7 /// A class for manipulating RegionHandle coordinates 7 /// A class for manipulating RegionHandle coordinates
8 /// </summary> 8 /// </summary>
9 class RegionHandle 9 class RegionHandle
10 { 10 {
11 private UInt64 handle; 11 private UInt64 handle;
12 12
13 /// <summary> 13 /// <summary>
14 /// Initialises a new grid-aware RegionHandle 14 /// Initialises a new grid-aware RegionHandle
15 /// </summary> 15 /// </summary>
16 /// <param name="ip">IP Address of the Grid Server for this region</param> 16 /// <param name="ip">IP Address of the Grid Server for this region</param>
17 /// <param name="x">Grid X Coordinate</param> 17 /// <param name="x">Grid X Coordinate</param>
18 /// <param name="y">Grid Y Coordinate</param> 18 /// <param name="y">Grid Y Coordinate</param>
19 public RegionHandle(string ip, short x, short y) 19 public RegionHandle(string ip, short x, short y)
20 { 20 {
21 IPAddress addr = IPAddress.Parse(ip); 21 IPAddress addr = IPAddress.Parse(ip);
22 22
23 if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork) 23 if (addr.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork)
24 throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address"); 24 throw new Exception("Bad RegionHandle Parameter - must be an IPv4 address");
25 25
26 uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0); 26 uint baseHandle = BitConverter.ToUInt32(addr.GetAddressBytes(), 0);
27 27
28 // Split the IP address in half 28 // Split the IP address in half
29 short a = (short)((baseHandle << 16) & 0xFFFF); 29 short a = (short)((baseHandle << 16) & 0xFFFF);
30 short b = (short)((baseHandle << 0) & 0xFFFF); 30 short b = (short)((baseHandle << 0) & 0xFFFF);
31 31
32 // Raise the bounds a little 32 // Raise the bounds a little
33 uint nx = (uint)x; 33 uint nx = (uint)x;
34 uint ny = (uint)y; 34 uint ny = (uint)y;
35 35
36 // Multiply grid coords to get region coords 36 // Multiply grid coords to get region coords
37 nx *= 256; 37 nx *= 256;
38 ny *= 256; 38 ny *= 256;
39 39
40 // Stuff the IP address in too 40 // Stuff the IP address in too
41 nx = (uint)a << 16; 41 nx = (uint)a << 16;
42 ny = (uint)b << 16; 42 ny = (uint)b << 16;
43 43
44 handle = ((UInt64)nx << 32) | (uint)ny; 44 handle = ((UInt64)nx << 32) | (uint)ny;
45 } 45 }
46 46
47 /// <summary> 47 /// <summary>
48 /// Initialises a new RegionHandle that is not inter-grid aware 48 /// Initialises a new RegionHandle that is not inter-grid aware
49 /// </summary> 49 /// </summary>
50 /// <param name="x">Grid X Coordinate</param> 50 /// <param name="x">Grid X Coordinate</param>
51 /// <param name="y">Grid Y Coordinate</param> 51 /// <param name="y">Grid Y Coordinate</param>
52 public RegionHandle(uint x, uint y) 52 public RegionHandle(uint x, uint y)
53 { 53 {
54 handle = ((x * 256) << 32) | (y * 256); 54 handle = ((x * 256) << 32) | (y * 256);
55 } 55 }
56 56
57 /// <summary> 57 /// <summary>
58 /// Initialises a new RegionHandle from an existing value 58 /// Initialises a new RegionHandle from an existing value
59 /// </summary> 59 /// </summary>
60 /// <param name="Region">A U64 RegionHandle</param> 60 /// <param name="Region">A U64 RegionHandle</param>
61 public RegionHandle(UInt64 Region) 61 public RegionHandle(UInt64 Region)
62 { 62 {
63 handle = Region; 63 handle = Region;
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy. 67 /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy.
68 /// </summary> 68 /// </summary>
69 /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks> 69 /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks>
70 /// <returns>Region Handle including IP Address encoding</returns> 70 /// <returns>Region Handle including IP Address encoding</returns>
71 public UInt64 getTeleportHandle() 71 public UInt64 getTeleportHandle()
72 { 72 {
73 return handle; 73 return handle;
74 } 74 }
75 75
76 /// <summary> 76 /// <summary>
77 /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds. 77 /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds.
78 /// </summary> 78 /// </summary>
79 /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns> 79 /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns>
80 public UInt64 getNeighbourHandle() 80 public UInt64 getNeighbourHandle()
81 { 81 {
82 UInt64 mask = 0x0000FFFF0000FFFF; 82 UInt64 mask = 0x0000FFFF0000FFFF;
83 83
84 return handle | mask; 84 return handle | mask;
85 } 85 }
86 86
87 /// <summary> 87 /// <summary>
88 /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle 88 /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle
89 /// </summary> 89 /// </summary>
90 /// <returns>Grid Server IP Address</returns> 90 /// <returns>Grid Server IP Address</returns>
91 public IPAddress getGridIP() 91 public IPAddress getGridIP()
92 { 92 {
93 uint a = (uint)((handle >> 16) & 0xFFFF); 93 uint a = (uint)((handle >> 16) & 0xFFFF);
94 uint b = (uint)((handle >> 48) & 0xFFFF); 94 uint b = (uint)((handle >> 48) & 0xFFFF);
95 95
96 return new IPAddress((long)(a << 16) | (long)b); 96 return new IPAddress((long)(a << 16) | (long)b);
97 } 97 }
98 98
99 /// <summary> 99 /// <summary>
100 /// Returns the X Coordinate from a Grid-Encoded RegionHandle 100 /// Returns the X Coordinate from a Grid-Encoded RegionHandle
101 /// </summary> 101 /// </summary>
102 /// <returns>X Coordinate</returns> 102 /// <returns>X Coordinate</returns>
103 public uint getGridX() 103 public uint getGridX()
104 { 104 {
105 uint x = (uint)((handle >> 32) & 0xFFFF); 105 uint x = (uint)((handle >> 32) & 0xFFFF);
106 106
107 return x; 107 return x;
108 } 108 }
109 109
110 /// <summary> 110 /// <summary>
111 /// Returns the Y Coordinate from a Grid-Encoded RegionHandle 111 /// Returns the Y Coordinate from a Grid-Encoded RegionHandle
112 /// </summary> 112 /// </summary>
113 /// <returns>Y Coordinate</returns> 113 /// <returns>Y Coordinate</returns>
114 public uint getGridY() 114 public uint getGridY()
115 { 115 {
116 uint y = (uint)((handle >> 0) & 0xFFFF); 116 uint y = (uint)((handle >> 0) & 0xFFFF);
117 117
118 return y; 118 return y;
119 } 119 }
120 } 120 }
121} 121}
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs
index cfc0925..a216b52 100644
--- a/OpenSim/Framework/General/Types/RegionInfo.cs
+++ b/OpenSim/Framework/General/Types/RegionInfo.cs
@@ -1,342 +1,342 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System; 28using System;
29using System.Globalization; 29using System.Globalization;
30using System.Net; 30using System.Net;
31using System.Net.Sockets; 31using System.Net.Sockets;
32using libsecondlife; 32using libsecondlife;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Utilities; 35using OpenSim.Framework.Utilities;
36 36
37namespace OpenSim.Framework.Types 37namespace OpenSim.Framework.Types
38{ 38{
39 public class RegionInfo 39 public class RegionInfo
40 { 40 {
41 public LLUUID SimUUID = new LLUUID(); 41 public LLUUID SimUUID = new LLUUID();
42 public string RegionName = ""; 42 public string RegionName = "";
43 43
44 private IPEndPoint m_internalEndPoint; 44 private IPEndPoint m_internalEndPoint;
45 public IPEndPoint InternalEndPoint 45 public IPEndPoint InternalEndPoint
46 { 46 {
47 get 47 get
48 { 48 {
49 return m_internalEndPoint; 49 return m_internalEndPoint;
50 } 50 }
51 } 51 }
52 52
53 public IPEndPoint ExternalEndPoint 53 public IPEndPoint ExternalEndPoint
54 { 54 {
55 get 55 get
56 { 56 {
57 // Old one defaults to IPv6 57 // Old one defaults to IPv6
58 //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port ); 58 //return new IPEndPoint( Dns.GetHostAddresses( m_externalHostName )[0], m_internalEndPoint.Port );
59 59
60 // New method favors IPv4 60 // New method favors IPv4
61 IPAddress ia = null; 61 IPAddress ia = null;
62 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName)) 62 foreach (IPAddress Adr in Dns.GetHostAddresses(m_externalHostName))
63 { 63 {
64 if (ia == null) 64 if (ia == null)
65 ia = Adr; 65 ia = Adr;
66 66
67 if (Adr.AddressFamily == AddressFamily.InterNetwork) 67 if (Adr.AddressFamily == AddressFamily.InterNetwork)
68 { 68 {
69 ia = Adr; 69 ia = Adr;
70 break; 70 break;
71 } 71 }
72 72
73 } 73 }
74 74
75 return new IPEndPoint(ia, m_internalEndPoint.Port); 75 return new IPEndPoint(ia, m_internalEndPoint.Port);
76 } 76 }
77 } 77 }
78 78
79 private string m_externalHostName; 79 private string m_externalHostName;
80 public string ExternalHostName 80 public string ExternalHostName
81 { 81 {
82 get 82 get
83 { 83 {
84 return m_externalHostName; 84 return m_externalHostName;
85 } 85 }
86 } 86 }
87 87
88 private uint? m_regionLocX; 88 private uint? m_regionLocX;
89 public uint RegionLocX 89 public uint RegionLocX
90 { 90 {
91 get 91 get
92 { 92 {
93 return m_regionLocX.Value; 93 return m_regionLocX.Value;
94 } 94 }
95 } 95 }
96 96
97 private uint? m_regionLocY; 97 private uint? m_regionLocY;
98 public uint RegionLocY 98 public uint RegionLocY
99 { 99 {
100 get 100 get
101 { 101 {
102 return m_regionLocY.Value; 102 return m_regionLocY.Value;
103 } 103 }
104 } 104 }
105 105
106 private ulong? m_regionHandle; 106 private ulong? m_regionHandle;
107 public ulong RegionHandle 107 public ulong RegionHandle
108 { 108 {
109 get 109 get
110 { 110 {
111 if (!m_regionHandle.HasValue) 111 if (!m_regionHandle.HasValue)
112 { 112 {
113 m_regionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256)); 113 m_regionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
114 } 114 }
115 115
116 return m_regionHandle.Value; 116 return m_regionHandle.Value;
117 } 117 }
118 } 118 }
119 119
120 // Only used for remote regions , ie ones not in the current instance 120 // Only used for remote regions , ie ones not in the current instance
121 private uint m_remotingPort; 121 private uint m_remotingPort;
122 public uint RemotingPort 122 public uint RemotingPort
123 { 123 {
124 get 124 get
125 { 125 {
126 return m_remotingPort; 126 return m_remotingPort;
127 } 127 }
128 set 128 set
129 { 129 {
130 m_remotingPort = value; 130 m_remotingPort = value;
131 } 131 }
132 } 132 }
133 public string RemotingAddress; 133 public string RemotingAddress;
134 134
135 public string DataStore = ""; 135 public string DataStore = "";
136 public bool isSandbox = false; 136 public bool isSandbox = false;
137 137
138 public LLUUID MasterAvatarAssignedUUID = new LLUUID(); 138 public LLUUID MasterAvatarAssignedUUID = new LLUUID();
139 public string MasterAvatarFirstName = ""; 139 public string MasterAvatarFirstName = "";
140 public string MasterAvatarLastName = ""; 140 public string MasterAvatarLastName = "";
141 public string MasterAvatarSandboxPassword = ""; 141 public string MasterAvatarSandboxPassword = "";
142 142
143 public EstateSettings estateSettings; 143 public EstateSettings estateSettings;
144 144
145 public RegionInfo() 145 public RegionInfo()
146 { 146 {
147 estateSettings = new EstateSettings(); 147 estateSettings = new EstateSettings();
148 } 148 }
149 149
150 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 150 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
151 : this() 151 : this()
152 { 152 {
153 m_regionLocX = regionLocX; 153 m_regionLocX = regionLocX;
154 m_regionLocY = regionLocY; 154 m_regionLocY = regionLocY;
155 155
156 m_internalEndPoint = internalEndPoint; 156 m_internalEndPoint = internalEndPoint;
157 m_externalHostName = externalUri; 157 m_externalHostName = externalUri;
158 } 158 }
159 159
160 public void InitConfig(bool sandboxMode, IGenericConfig configData) 160 public void InitConfig(bool sandboxMode, IGenericConfig configData)
161 { 161 {
162 this.isSandbox = sandboxMode; 162 this.isSandbox = sandboxMode;
163 try 163 try
164 { 164 {
165 string attri = ""; 165 string attri = "";
166 166
167 // Sim UUID 167 // Sim UUID
168 string simId = configData.GetAttribute("SimUUID"); 168 string simId = configData.GetAttribute("SimUUID");
169 if (String.IsNullOrEmpty( simId )) 169 if (String.IsNullOrEmpty( simId ))
170 { 170 {
171 this.SimUUID = LLUUID.Random(); 171 this.SimUUID = LLUUID.Random();
172 } 172 }
173 else 173 else
174 { 174 {
175 this.SimUUID = new LLUUID(simId); 175 this.SimUUID = new LLUUID(simId);
176 } 176 }
177 configData.SetAttribute("SimUUID", this.SimUUID.ToString()); 177 configData.SetAttribute("SimUUID", this.SimUUID.ToString());
178 178
179 this.RegionName = GetString(configData, "SimName", "OpenSim test", "Region Name"); 179 this.RegionName = GetString(configData, "SimName", "OpenSim test", "Region Name");
180 180
181 //m_regionLocX = (uint) GetInt(configData, "SimLocationX", 1000, "Grid Location X"); 181 //m_regionLocX = (uint) GetInt(configData, "SimLocationX", 1000, "Grid Location X");
182 182
183 attri = ""; 183 attri = "";
184 attri = configData.GetAttribute("SimLocationX"); 184 attri = configData.GetAttribute("SimLocationX");
185 if (attri == "") 185 if (attri == "")
186 { 186 {
187 string location = MainLog.Instance.CmdPrompt("Grid Location X", "1000"); 187 string location = MainLog.Instance.CmdPrompt("Grid Location X", "1000");
188 configData.SetAttribute("SimLocationX", location); 188 configData.SetAttribute("SimLocationX", location);
189 m_regionLocX = (uint)Convert.ToUInt32(location); 189 m_regionLocX = (uint)Convert.ToUInt32(location);
190 } 190 }
191 else 191 else
192 { 192 {
193 m_regionLocX = (uint)Convert.ToUInt32(attri); 193 m_regionLocX = (uint)Convert.ToUInt32(attri);
194 } 194 }
195 // Sim/Grid location Y 195 // Sim/Grid location Y
196 attri = ""; 196 attri = "";
197 attri = configData.GetAttribute("SimLocationY"); 197 attri = configData.GetAttribute("SimLocationY");
198 if (attri == "") 198 if (attri == "")
199 { 199 {
200 string location = MainLog.Instance.CmdPrompt("Grid Location Y", "1000"); 200 string location = MainLog.Instance.CmdPrompt("Grid Location Y", "1000");
201 configData.SetAttribute("SimLocationY", location); 201 configData.SetAttribute("SimLocationY", location);
202 m_regionLocY = (uint)Convert.ToUInt32(location); 202 m_regionLocY = (uint)Convert.ToUInt32(location);
203 } 203 }
204 else 204 else
205 { 205 {
206 m_regionLocY = (uint)Convert.ToUInt32(attri); 206 m_regionLocY = (uint)Convert.ToUInt32(attri);
207 } 207 }
208 208
209 m_regionHandle = null; 209 m_regionHandle = null;
210 210
211 this.DataStore = GetString(configData, "Datastore", "localworld.yap", "Filename for local storage"); 211 this.DataStore = GetString(configData, "Datastore", "localworld.yap", "Filename for local storage");
212 212
213 IPAddress internalAddress = GetIPAddress(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections"); 213 IPAddress internalAddress = GetIPAddress(configData, "InternalIPAddress", "0.0.0.0", "Internal IP Address for UDP client connections");
214 int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections"); 214 int internalPort = GetIPPort(configData, "InternalIPPort", "9000", "Internal IP Port for UDP client connections");
215 m_internalEndPoint = new IPEndPoint(internalAddress, internalPort); 215 m_internalEndPoint = new IPEndPoint(internalAddress, internalPort);
216 216
217 m_externalHostName = GetString(configData, "ExternalHostName", "127.0.0.1", "External Host Name"); 217 m_externalHostName = GetString(configData, "ExternalHostName", "127.0.0.1", "External Host Name");
218 218
219 estateSettings.terrainFile = 219 estateSettings.terrainFile =
220 GetString(configData, "TerrainFile", "default.r32", "GENERAL SETTING: Default Terrain File"); 220 GetString(configData, "TerrainFile", "default.r32", "GENERAL SETTING: Default Terrain File");
221 221
222 attri = ""; 222 attri = "";
223 attri = configData.GetAttribute("TerrainMultiplier"); 223 attri = configData.GetAttribute("TerrainMultiplier");
224 if (attri == "") 224 if (attri == "")
225 { 225 {
226 string re = MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0"); 226 string re = MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0");
227 this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture); 227 this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture);
228 configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString()); 228 configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString());
229 } 229 }
230 else 230 else
231 { 231 {
232 this.estateSettings.terrainMultiplier = Convert.ToDouble(attri); 232 this.estateSettings.terrainMultiplier = Convert.ToDouble(attri);
233 } 233 }
234 234
235 attri = ""; 235 attri = "";
236 attri = configData.GetAttribute("MasterAvatarFirstName"); 236 attri = configData.GetAttribute("MasterAvatarFirstName");
237 if (attri == "") 237 if (attri == "")
238 { 238 {
239 this.MasterAvatarFirstName = MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test"); 239 this.MasterAvatarFirstName = MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test");
240 240
241 configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName); 241 configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName);
242 } 242 }
243 else 243 else
244 { 244 {
245 this.MasterAvatarFirstName = attri; 245 this.MasterAvatarFirstName = attri;
246 } 246 }
247 247
248 attri = ""; 248 attri = "";
249 attri = configData.GetAttribute("MasterAvatarLastName"); 249 attri = configData.GetAttribute("MasterAvatarLastName");
250 if (attri == "") 250 if (attri == "")
251 { 251 {
252 this.MasterAvatarLastName = MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User"); 252 this.MasterAvatarLastName = MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User");
253 253
254 configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName); 254 configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName);
255 } 255 }
256 else 256 else
257 { 257 {
258 this.MasterAvatarLastName = attri; 258 this.MasterAvatarLastName = attri;
259 } 259 }
260 260
261 if (isSandbox) //Sandbox Mode Specific Settings 261 if (isSandbox) //Sandbox Mode Specific Settings
262 { 262 {
263 attri = ""; 263 attri = "";
264 attri = configData.GetAttribute("MasterAvatarSandboxPassword"); 264 attri = configData.GetAttribute("MasterAvatarSandboxPassword");
265 if (attri == "") 265 if (attri == "")
266 { 266 {
267 this.MasterAvatarSandboxPassword = MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test"); 267 this.MasterAvatarSandboxPassword = MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test");
268 268
269 //Should I store this? 269 //Should I store this?
270 configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword); 270 configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword);
271 } 271 }
272 else 272 else
273 { 273 {
274 this.MasterAvatarSandboxPassword = attri; 274 this.MasterAvatarSandboxPassword = attri;
275 } 275 }
276 } 276 }
277 277
278 configData.Commit(); 278 configData.Commit();
279 } 279 }
280 catch (Exception e) 280 catch (Exception e)
281 { 281 {
282 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); 282 MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
283 MainLog.Instance.Warn(e.ToString()); 283 MainLog.Instance.Warn(e.ToString());
284 } 284 }
285 285
286 MainLog.Instance.Verbose("Sim settings loaded:"); 286 MainLog.Instance.Verbose("Sim settings loaded:");
287 MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated()); 287 MainLog.Instance.Verbose("UUID: " + this.SimUUID.ToStringHyphenated());
288 MainLog.Instance.Verbose("Name: " + this.RegionName); 288 MainLog.Instance.Verbose("Name: " + this.RegionName);
289 MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]"); 289 MainLog.Instance.Verbose("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]");
290 MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString()); 290 MainLog.Instance.Verbose("Region Handle: " + this.RegionHandle.ToString());
291 MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() ); 291 MainLog.Instance.Verbose("Listening on IP end point: " + m_internalEndPoint.ToString() );
292 MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString()); 292 MainLog.Instance.Verbose("Sandbox Mode? " + isSandbox.ToString());
293 293
294 } 294 }
295 295
296 private uint GetInt(IGenericConfig configData, string p, int p_3, string p_4) 296 private uint GetInt(IGenericConfig configData, string p, int p_3, string p_4)
297 { 297 {
298 throw new Exception("The method or operation is not implemented."); 298 throw new Exception("The method or operation is not implemented.");
299 } 299 }
300 300
301 private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt) 301 private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt)
302 { 302 {
303 string s = configData.GetAttribute(attrName); 303 string s = configData.GetAttribute(attrName);
304 304
305 if (String.IsNullOrEmpty( s )) 305 if (String.IsNullOrEmpty( s ))
306 { 306 {
307 s = MainLog.Instance.CmdPrompt(prompt, defaultvalue); 307 s = MainLog.Instance.CmdPrompt(prompt, defaultvalue);
308 configData.SetAttribute(attrName, s ); 308 configData.SetAttribute(attrName, s );
309 } 309 }
310 return s; 310 return s;
311 } 311 }
312 312
313 private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt) 313 private IPAddress GetIPAddress(IGenericConfig configData, string attrName, string defaultvalue, string prompt)
314 { 314 {
315 string addressStr = configData.GetAttribute(attrName); 315 string addressStr = configData.GetAttribute(attrName);
316 316
317 IPAddress address; 317 IPAddress address;
318 318
319 if (!IPAddress.TryParse(addressStr, out address)) 319 if (!IPAddress.TryParse(addressStr, out address))
320 { 320 {
321 address = MainLog.Instance.CmdPromptIPAddress(prompt, defaultvalue); 321 address = MainLog.Instance.CmdPromptIPAddress(prompt, defaultvalue);
322 configData.SetAttribute(attrName, address.ToString()); 322 configData.SetAttribute(attrName, address.ToString());
323 } 323 }
324 return address; 324 return address;
325 } 325 }
326 326
327 private int GetIPPort(IGenericConfig configData, string attrName, string defaultvalue, string prompt) 327 private int GetIPPort(IGenericConfig configData, string attrName, string defaultvalue, string prompt)
328 { 328 {
329 string portStr = configData.GetAttribute(attrName); 329 string portStr = configData.GetAttribute(attrName);
330 330
331 int port; 331 int port;
332 332
333 if (!int.TryParse(portStr, out port)) 333 if (!int.TryParse(portStr, out port))
334 { 334 {
335 port = MainLog.Instance.CmdPromptIPPort(prompt, defaultvalue); 335 port = MainLog.Instance.CmdPromptIPPort(prompt, defaultvalue);
336 configData.SetAttribute(attrName, port.ToString()); 336 configData.SetAttribute(attrName, port.ToString());
337 } 337 }
338 338
339 return port; 339 return port;
340 } 340 }
341 } 341 }
342} 342}
diff --git a/OpenSim/Framework/General/Types/UUID.cs b/OpenSim/Framework/General/Types/UUID.cs
index 9cde18e..9e9654d 100644
--- a/OpenSim/Framework/General/Types/UUID.cs
+++ b/OpenSim/Framework/General/Types/UUID.cs
@@ -1,127 +1,127 @@
1using System; 1using System;
2using libsecondlife; 2using libsecondlife;
3 3
4namespace OpenSim.Framework.Types 4namespace OpenSim.Framework.Types
5{ 5{
6 class UUID 6 class UUID
7 { 7 {
8 public LLUUID llUUID; 8 public LLUUID llUUID;
9 9
10 public UUID(string uuid) 10 public UUID(string uuid)
11 { 11 {
12 llUUID = new LLUUID(uuid); 12 llUUID = new LLUUID(uuid);
13 } 13 }
14 14
15 public UUID(byte[] uuid) 15 public UUID(byte[] uuid)
16 { 16 {
17 llUUID = new LLUUID(uuid, 0); 17 llUUID = new LLUUID(uuid, 0);
18 } 18 }
19 19
20 public UUID(byte[] uuid, int offset) 20 public UUID(byte[] uuid, int offset)
21 { 21 {
22 llUUID = new LLUUID(uuid, offset); 22 llUUID = new LLUUID(uuid, offset);
23 } 23 }
24 24
25 public UUID() 25 public UUID()
26 { 26 {
27 llUUID = LLUUID.Zero; 27 llUUID = LLUUID.Zero;
28 } 28 }
29 29
30 public UUID(ulong uuid) 30 public UUID(ulong uuid)
31 { 31 {
32 llUUID = new LLUUID(uuid); 32 llUUID = new LLUUID(uuid);
33 } 33 }
34 34
35 public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth) 35 public UUID(UInt32 first, UInt32 second, UInt32 third, UInt32 fourth)
36 { 36 {
37 byte[] uuid = new byte[16]; 37 byte[] uuid = new byte[16];
38 38
39 byte[] n = BitConverter.GetBytes(first); 39 byte[] n = BitConverter.GetBytes(first);
40 n.CopyTo(uuid, 0); 40 n.CopyTo(uuid, 0);
41 n = BitConverter.GetBytes(second); 41 n = BitConverter.GetBytes(second);
42 n.CopyTo(uuid, 4); 42 n.CopyTo(uuid, 4);
43 n = BitConverter.GetBytes(third); 43 n = BitConverter.GetBytes(third);
44 n.CopyTo(uuid, 8); 44 n.CopyTo(uuid, 8);
45 n = BitConverter.GetBytes(fourth); 45 n = BitConverter.GetBytes(fourth);
46 n.CopyTo(uuid, 12); 46 n.CopyTo(uuid, 12);
47 47
48 llUUID = new LLUUID(uuid,0); 48 llUUID = new LLUUID(uuid,0);
49 } 49 }
50 50
51 public override string ToString() 51 public override string ToString()
52 { 52 {
53 return llUUID.ToString(); 53 return llUUID.ToString();
54 } 54 }
55 55
56 public string ToStringHyphenated() 56 public string ToStringHyphenated()
57 { 57 {
58 return llUUID.ToStringHyphenated(); 58 return llUUID.ToStringHyphenated();
59 } 59 }
60 60
61 public byte[] GetBytes() 61 public byte[] GetBytes()
62 { 62 {
63 return llUUID.GetBytes(); 63 return llUUID.GetBytes();
64 } 64 }
65 65
66 public UInt32[] GetInts() 66 public UInt32[] GetInts()
67 { 67 {
68 UInt32[] ints = new UInt32[4]; 68 UInt32[] ints = new UInt32[4];
69 ints[0] = BitConverter.ToUInt32(llUUID.Data, 0); 69 ints[0] = BitConverter.ToUInt32(llUUID.Data, 0);
70 ints[1] = BitConverter.ToUInt32(llUUID.Data, 4); 70 ints[1] = BitConverter.ToUInt32(llUUID.Data, 4);
71 ints[2] = BitConverter.ToUInt32(llUUID.Data, 8); 71 ints[2] = BitConverter.ToUInt32(llUUID.Data, 8);
72 ints[3] = BitConverter.ToUInt32(llUUID.Data, 12); 72 ints[3] = BitConverter.ToUInt32(llUUID.Data, 12);
73 73
74 return ints; 74 return ints;
75 } 75 }
76 76
77 public LLUUID GetLLUUID() 77 public LLUUID GetLLUUID()
78 { 78 {
79 return llUUID; 79 return llUUID;
80 } 80 }
81 81
82 public uint CRC() 82 public uint CRC()
83 { 83 {
84 return llUUID.CRC(); 84 return llUUID.CRC();
85 } 85 }
86 86
87 public override int GetHashCode() 87 public override int GetHashCode()
88 { 88 {
89 return llUUID.GetHashCode(); 89 return llUUID.GetHashCode();
90 } 90 }
91 91
92 public void Combine(UUID other) 92 public void Combine(UUID other)
93 { 93 {
94 llUUID.Combine(other.GetLLUUID()); 94 llUUID.Combine(other.GetLLUUID());
95 } 95 }
96 96
97 public void Combine(LLUUID other) 97 public void Combine(LLUUID other)
98 { 98 {
99 llUUID.Combine(other); 99 llUUID.Combine(other);
100 } 100 }
101 101
102 public override bool Equals(Object other) 102 public override bool Equals(Object other)
103 { 103 {
104 return llUUID.Equals(other); 104 return llUUID.Equals(other);
105 } 105 }
106 106
107 public static bool operator ==(UUID a, UUID b) 107 public static bool operator ==(UUID a, UUID b)
108 { 108 {
109 return a.llUUID.Equals(b.GetLLUUID()); 109 return a.llUUID.Equals(b.GetLLUUID());
110 } 110 }
111 111
112 public static bool operator !=(UUID a, UUID b) 112 public static bool operator !=(UUID a, UUID b)
113 { 113 {
114 return !a.llUUID.Equals(b.GetLLUUID()); 114 return !a.llUUID.Equals(b.GetLLUUID());
115 } 115 }
116 116
117 public static bool operator ==(UUID a, LLUUID b) 117 public static bool operator ==(UUID a, LLUUID b)
118 { 118 {
119 return a.Equals(b); 119 return a.Equals(b);
120 } 120 }
121 121
122 public static bool operator !=(UUID a, LLUUID b) 122 public static bool operator !=(UUID a, LLUUID b)
123 { 123 {
124 return !a.Equals(b); 124 return !a.Equals(b);
125 } 125 }
126 } 126 }
127} 127}
diff --git a/OpenSim/Framework/General/UserProfile.cs b/OpenSim/Framework/General/UserProfile.cs
index 243208a..ec5a485 100644
--- a/OpenSim/Framework/General/UserProfile.cs
+++ b/OpenSim/Framework/General/UserProfile.cs
@@ -1,87 +1,87 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Security.Cryptography; 29using System.Security.Cryptography;
30using libsecondlife; 30using libsecondlife;
31using OpenSim.Framework.Inventory; 31using OpenSim.Framework.Inventory;
32 32
33namespace OpenSim.Framework.User 33namespace OpenSim.Framework.User
34{ 34{
35 public class UserProfile 35 public class UserProfile
36 { 36 {
37 37
38 public string firstname; 38 public string firstname;
39 public string lastname; 39 public string lastname;
40 public ulong homeregionhandle; 40 public ulong homeregionhandle;
41 public LLVector3 homepos; 41 public LLVector3 homepos;
42 public LLVector3 homelookat; 42 public LLVector3 homelookat;
43 43
44 public bool IsGridGod = false; 44 public bool IsGridGod = false;
45 public bool IsLocal = true; // will be used in future for visitors from foreign grids 45 public bool IsLocal = true; // will be used in future for visitors from foreign grids
46 public string AssetURL; 46 public string AssetURL;
47 public string MD5passwd; 47 public string MD5passwd;
48 48
49 public LLUUID CurrentSessionID; 49 public LLUUID CurrentSessionID;
50 public LLUUID CurrentSecureSessionID; 50 public LLUUID CurrentSecureSessionID;
51 public LLUUID UUID; 51 public LLUUID UUID;
52 public Dictionary<LLUUID, uint> Circuits = new Dictionary<LLUUID, uint>(); // tracks circuit codes 52 public Dictionary<LLUUID, uint> Circuits = new Dictionary<LLUUID, uint>(); // tracks circuit codes
53 53
54 public AgentInventory Inventory; 54 public AgentInventory Inventory;
55 55
56 public UserProfile() 56 public UserProfile()
57 { 57 {
58 Circuits = new Dictionary<LLUUID, uint>(); 58 Circuits = new Dictionary<LLUUID, uint>();
59 Inventory = new AgentInventory(); 59 Inventory = new AgentInventory();
60 homeregionhandle = Helpers.UIntsToLong((1000 * 256), (1000 * 256)); 60 homeregionhandle = Helpers.UIntsToLong((1000 * 256), (1000 * 256));
61 homepos = new LLVector3(); 61 homepos = new LLVector3();
62 homelookat = new LLVector3(); 62 homelookat = new LLVector3();
63 } 63 }
64 64
65 public void InitSessionData() 65 public void InitSessionData()
66 { 66 {
67 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider(); 67 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
68 68
69 byte[] randDataS = new byte[16]; 69 byte[] randDataS = new byte[16];
70 byte[] randDataSS = new byte[16]; 70 byte[] randDataSS = new byte[16];
71 71
72 rand.GetBytes(randDataS); 72 rand.GetBytes(randDataS);
73 rand.GetBytes(randDataSS); 73 rand.GetBytes(randDataSS);
74 74
75 CurrentSecureSessionID = new LLUUID(randDataSS,0); 75 CurrentSecureSessionID = new LLUUID(randDataSS,0);
76 CurrentSessionID = new LLUUID(randDataS,0); 76 CurrentSessionID = new LLUUID(randDataS,0);
77 77
78 } 78 }
79 79
80 public void AddSimCircuit(uint circuitCode, LLUUID regionUUID) 80 public void AddSimCircuit(uint circuitCode, LLUUID regionUUID)
81 { 81 {
82 if (this.Circuits.ContainsKey(regionUUID) == false) 82 if (this.Circuits.ContainsKey(regionUUID) == false)
83 this.Circuits.Add(regionUUID, circuitCode); 83 this.Circuits.Add(regionUUID, circuitCode);
84 } 84 }
85 85
86 } 86 }
87} 87}
diff --git a/OpenSim/Framework/General/Util.cs b/OpenSim/Framework/General/Util.cs
index 13e3af2..3333ced 100644
--- a/OpenSim/Framework/General/Util.cs
+++ b/OpenSim/Framework/General/Util.cs
@@ -1,184 +1,184 @@
1/* 1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/ 2* Copyright (c) Contributors, http://www.openmetaverse.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*/
28using System; 28using System;
29using System.Security.Cryptography; 29using System.Security.Cryptography;
30using System.Text; 30using System.Text;
31using libsecondlife; 31using libsecondlife;
32 32
33namespace OpenSim.Framework.Utilities 33namespace OpenSim.Framework.Utilities
34{ 34{
35 public class Util 35 public class Util
36 { 36 {
37 private static Random randomClass = new Random(); 37 private static Random randomClass = new Random();
38 private static uint nextXferID = 5000; 38 private static uint nextXferID = 5000;
39 private static object XferLock = new object(); 39 private static object XferLock = new object();
40 40
41 public static ulong UIntsToLong(uint X, uint Y) 41 public static ulong UIntsToLong(uint X, uint Y)
42 { 42 {
43 return Helpers.UIntsToLong(X, Y); 43 return Helpers.UIntsToLong(X, Y);
44 } 44 }
45 45
46 public static Random RandomClass 46 public static Random RandomClass
47 { 47 {
48 get 48 get
49 { 49 {
50 return randomClass; 50 return randomClass;
51 } 51 }
52 } 52 }
53 53
54 public static uint GetNextXferID() 54 public static uint GetNextXferID()
55 { 55 {
56 uint id = 0; 56 uint id = 0;
57 lock(XferLock) 57 lock(XferLock)
58 { 58 {
59 id = nextXferID; 59 id = nextXferID;
60 nextXferID++; 60 nextXferID++;
61 } 61 }
62 return id; 62 return id;
63 } 63 }
64 64
65 public static int UnixTimeSinceEpoch() 65 public static int UnixTimeSinceEpoch()
66 { 66 {
67 TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1)); 67 TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
68 int timestamp = (int)t.TotalSeconds; 68 int timestamp = (int)t.TotalSeconds;
69 return timestamp; 69 return timestamp;
70 } 70 }
71 71
72 public static string Md5Hash(string pass) 72 public static string Md5Hash(string pass)
73 { 73 {
74 MD5 md5 = MD5CryptoServiceProvider.Create(); 74 MD5 md5 = MD5CryptoServiceProvider.Create();
75 byte[] dataMd5 = md5.ComputeHash(Encoding.Default.GetBytes(pass)); 75 byte[] dataMd5 = md5.ComputeHash(Encoding.Default.GetBytes(pass));
76 StringBuilder sb = new StringBuilder(); 76 StringBuilder sb = new StringBuilder();
77 for (int i = 0; i < dataMd5.Length; i++) 77 for (int i = 0; i < dataMd5.Length; i++)
78 sb.AppendFormat("{0:x2}", dataMd5[i]); 78 sb.AppendFormat("{0:x2}", dataMd5[i]);
79 return sb.ToString(); 79 return sb.ToString();
80 } 80 }
81 81
82 public static string GetRandomCapsPath() 82 public static string GetRandomCapsPath()
83 { 83 {
84 LLUUID caps = LLUUID.Random(); 84 LLUUID caps = LLUUID.Random();
85 string capsPath = caps.ToStringHyphenated(); 85 string capsPath = caps.ToStringHyphenated();
86 capsPath = capsPath.Remove(capsPath.Length - 4, 4); 86 capsPath = capsPath.Remove(capsPath.Length - 4, 4);
87 return capsPath; 87 return capsPath;
88 } 88 }
89 89
90 //public static int fast_distance2d(int x, int y) 90 //public static int fast_distance2d(int x, int y)
91 //{ 91 //{
92 // x = System.Math.Abs(x); 92 // x = System.Math.Abs(x);
93 // y = System.Math.Abs(y); 93 // y = System.Math.Abs(y);
94 94
95 // int min = System.Math.Min(x, y); 95 // int min = System.Math.Min(x, y);
96 96
97 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4)); 97 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4));
98 //} 98 //}
99 99
100 public static string FieldToString(byte[] bytes) 100 public static string FieldToString(byte[] bytes)
101 { 101 {
102 return FieldToString(bytes, String.Empty); 102 return FieldToString(bytes, String.Empty);
103 } 103 }
104 104
105 /// <summary> 105 /// <summary>
106 /// Convert a variable length field (byte array) to a string, with a 106 /// Convert a variable length field (byte array) to a string, with a
107 /// field name prepended to each line of the output 107 /// field name prepended to each line of the output
108 /// </summary> 108 /// </summary>
109 /// <remarks>If the byte array has unprintable characters in it, a 109 /// <remarks>If the byte array has unprintable characters in it, a
110 /// hex dump will be put in the string instead</remarks> 110 /// hex dump will be put in the string instead</remarks>
111 /// <param name="bytes">The byte array to convert to a string</param> 111 /// <param name="bytes">The byte array to convert to a string</param>
112 /// <param name="fieldName">A field name to prepend to each line of output</param> 112 /// <param name="fieldName">A field name to prepend to each line of output</param>
113 /// <returns>An ASCII string or a string containing a hex dump, minus 113 /// <returns>An ASCII string or a string containing a hex dump, minus
114 /// the null terminator</returns> 114 /// the null terminator</returns>
115 public static string FieldToString(byte[] bytes, string fieldName) 115 public static string FieldToString(byte[] bytes, string fieldName)
116 { 116 {
117 // Check for a common case 117 // Check for a common case
118 if (bytes.Length == 0) return String.Empty; 118 if (bytes.Length == 0) return String.Empty;
119 119
120 StringBuilder output = new StringBuilder(); 120 StringBuilder output = new StringBuilder();
121 bool printable = true; 121 bool printable = true;
122 122
123 for (int i = 0; i < bytes.Length; ++i) 123 for (int i = 0; i < bytes.Length; ++i)
124 { 124 {
125 // Check if there are any unprintable characters in the array 125 // Check if there are any unprintable characters in the array
126 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09 126 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09
127 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00) 127 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00)
128 { 128 {
129 printable = false; 129 printable = false;
130 break; 130 break;
131 } 131 }
132 } 132 }
133 133
134 if (printable) 134 if (printable)
135 { 135 {
136 if (fieldName.Length > 0) 136 if (fieldName.Length > 0)
137 { 137 {
138 output.Append(fieldName); 138 output.Append(fieldName);
139 output.Append(": "); 139 output.Append(": ");
140 } 140 }
141 141
142 if (bytes[bytes.Length - 1] == 0x00) 142 if (bytes[bytes.Length - 1] == 0x00)
143 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1)); 143 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1));
144 else 144 else
145 output.Append(UTF8Encoding.UTF8.GetString(bytes)); 145 output.Append(UTF8Encoding.UTF8.GetString(bytes));
146 } 146 }
147 else 147 else
148 { 148 {
149 for (int i = 0; i < bytes.Length; i += 16) 149 for (int i = 0; i < bytes.Length; i += 16)
150 { 150 {
151 if (i != 0) 151 if (i != 0)
152 output.Append(Environment.NewLine); 152 output.Append(Environment.NewLine);
153 if (fieldName.Length > 0) 153 if (fieldName.Length > 0)
154 { 154 {
155 output.Append(fieldName); 155 output.Append(fieldName);
156 output.Append(": "); 156 output.Append(": ");
157 } 157 }
158 158
159 for (int j = 0; j < 16; j++) 159 for (int j = 0; j < 16; j++)
160 { 160 {
161 if ((i + j) < bytes.Length) 161 if ((i + j) < bytes.Length)
162 output.Append(String.Format("{0:X2} ", bytes[i + j])); 162 output.Append(String.Format("{0:X2} ", bytes[i + j]));
163 else 163 else
164 output.Append(" "); 164 output.Append(" ");
165 } 165 }
166 166
167 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++) 167 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++)
168 { 168 {
169 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E) 169 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E)
170 output.Append((char)bytes[i + j]); 170 output.Append((char)bytes[i + j]);
171 else 171 else
172 output.Append("."); 172 output.Append(".");
173 } 173 }
174 } 174 }
175 } 175 }
176 176
177 return output.ToString(); 177 return output.ToString();
178 } 178 }
179 public Util() 179 public Util()
180 { 180 {
181 181
182 } 182 }
183 } 183 }
184} 184}