aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Common/OpenSim.Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Common/OpenSim.Framework.Console/AssemblyInfo.cs58
-rw-r--r--Common/OpenSim.Framework.Console/ConsoleBase.cs220
-rw-r--r--Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs39
-rw-r--r--Common/OpenSim.Framework.Console/MainConsole.cs49
-rw-r--r--Common/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj89
-rw-r--r--Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build42
-rw-r--r--Common/OpenSim.Framework/AgentInventory.cs278
-rw-r--r--Common/OpenSim.Framework/BlockingQueue.cs60
-rw-r--r--Common/OpenSim.Framework/HeightMapGenHills.cs150
-rw-r--r--Common/OpenSim.Framework/Interfaces/IAssetServer.cs68
-rw-r--r--Common/OpenSim.Framework/Interfaces/IClientAPI.cs35
-rw-r--r--Common/OpenSim.Framework/Interfaces/IConfig.cs76
-rw-r--r--Common/OpenSim.Framework/Interfaces/IGenericConfig.cs15
-rw-r--r--Common/OpenSim.Framework/Interfaces/IGridConfig.cs64
-rw-r--r--Common/OpenSim.Framework/Interfaces/IGridServer.cs81
-rw-r--r--Common/OpenSim.Framework/Interfaces/ILocalStorage.cs68
-rw-r--r--Common/OpenSim.Framework/Interfaces/IScriptAPI.cs14
-rw-r--r--Common/OpenSim.Framework/Interfaces/IScriptEngine.cs14
-rw-r--r--Common/OpenSim.Framework/Interfaces/IUserConfig.cs58
-rw-r--r--Common/OpenSim.Framework/Interfaces/IUserServer.cs15
-rw-r--r--Common/OpenSim.Framework/Interfaces/LocalGridBase.cs24
-rw-r--r--Common/OpenSim.Framework/Interfaces/RemoteGridBase.cs37
-rw-r--r--Common/OpenSim.Framework/LoginService.cs42
-rw-r--r--Common/OpenSim.Framework/OpenSim.Framework.csproj200
-rw-r--r--Common/OpenSim.Framework/OpenSim.Framework.dll.build77
-rw-r--r--Common/OpenSim.Framework/Properties/AssemblyInfo.cs33
-rw-r--r--Common/OpenSim.Framework/Remoting.cs137
-rw-r--r--Common/OpenSim.Framework/SimProfile.cs110
-rw-r--r--Common/OpenSim.Framework/SimProfileBase.cs54
-rw-r--r--Common/OpenSim.Framework/Types/AgentCircuitData.cs50
-rw-r--r--Common/OpenSim.Framework/Types/AssetBase.cs49
-rw-r--r--Common/OpenSim.Framework/Types/AssetLandmark.cs61
-rw-r--r--Common/OpenSim.Framework/Types/AssetStorage.cs50
-rw-r--r--Common/OpenSim.Framework/Types/EstateSettings.cs96
-rw-r--r--Common/OpenSim.Framework/Types/Login.cs52
-rw-r--r--Common/OpenSim.Framework/Types/NeighbourInfo.cs47
-rw-r--r--Common/OpenSim.Framework/Types/OSVector3.cs46
-rw-r--r--Common/OpenSim.Framework/Types/ParcelData.cs115
-rw-r--r--Common/OpenSim.Framework/Types/PrimData.cs201
-rw-r--r--Common/OpenSim.Framework/UserProfile.cs89
-rw-r--r--Common/OpenSim.Framework/UserProfileManager.cs299
-rw-r--r--Common/OpenSim.Framework/UserProfileManagerBase.cs152
-rw-r--r--Common/OpenSim.Framework/Util.cs178
43 files changed, 0 insertions, 3692 deletions
diff --git a/Common/OpenSim.Framework.Console/AssemblyInfo.cs b/Common/OpenSim.Framework.Console/AssemblyInfo.cs
deleted file mode 100644
index 8f715d2..0000000
--- a/Common/OpenSim.Framework.Console/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("ServerConsole")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("ServerConsole")]
43[assembly: AssemblyCopyright("")]
44[assembly: AssemblyTrademark("")]
45[assembly: AssemblyCulture("")]
46
47// This sets the default COM visibility of types in the assembly to invisible.
48// If you need to expose a type to COM, use [ComVisible(true)] on that type.
49[assembly: ComVisible(false)]
50
51// The assembly version has following format :
52//
53// Major.Minor.Build.Revision
54//
55// You can specify all values by your own or you can build default build and revision
56// numbers with the '*' character (the default):
57
58[assembly: AssemblyVersion("1.0.*")]
diff --git a/Common/OpenSim.Framework.Console/ConsoleBase.cs b/Common/OpenSim.Framework.Console/ConsoleBase.cs
deleted file mode 100644
index 30854fe..0000000
--- a/Common/OpenSim.Framework.Console/ConsoleBase.cs
+++ /dev/null
@@ -1,220 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.IO;
30
31namespace OpenSim.Framework.Console
32{
33 public enum LogPriority : int
34 {
35 CRITICAL,
36 HIGH,
37 MEDIUM,
38 NORMAL,
39 LOW,
40 VERBOSE,
41 EXTRAVERBOSE
42 }
43
44 public class ConsoleBase
45 {
46 StreamWriter Log;
47 public conscmd_callback cmdparser;
48 public string componentname;
49 private bool m_silent;
50
51 public ConsoleBase(string LogFile, string componentname, conscmd_callback cmdparser, bool silent )
52 {
53 this.componentname = componentname;
54 this.cmdparser = cmdparser;
55 this.m_silent = silent;
56 System.Console.WriteLine("ServerConsole.cs - creating new local console");
57 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
58 Log = File.AppendText(LogFile);
59 Log.WriteLine("========================================================================");
60 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
61 }
62
63 public void Close()
64 {
65 Log.WriteLine("Shutdown at " + DateTime.Now.ToString());
66 Log.Close();
67 }
68
69 public void Write(string format, params object[] args)
70 {
71 Notice(format,args);
72 return;
73 }
74
75 public void Warn(string format, params object[] args)
76 {
77 WriteNewLine(ConsoleColor.Yellow, format, args);
78 return;
79 }
80
81 public void Notice(string format, params object[] args)
82 {
83 WriteNewLine(ConsoleColor.White, format, args);
84 return;
85 }
86
87 public void Error(string format, params object[] args)
88 {
89 WriteNewLine(ConsoleColor.Red, format, args);
90 return;
91 }
92
93 public void Verbose(string format, params object[] args)
94 {
95 WriteNewLine(ConsoleColor.Gray, format, args);
96 return;
97 }
98
99 public void Status(string format, params object[] args)
100 {
101 WriteNewLine(ConsoleColor.Blue, format, args);
102 return;
103 }
104
105 private void WriteNewLine(System.ConsoleColor color, string format, params object[] args)
106 {
107 Log.WriteLine(format, args);
108 Log.Flush();
109 if (!m_silent)
110 {
111 try
112 {
113 System.Console.ForegroundColor = color;
114 System.Console.WriteLine(format, args);
115 System.Console.ResetColor();
116 } // Because mono and old debian sucks.
117 catch (System.ArgumentNullException)
118 {
119 System.Console.WriteLine(format, args);
120 }
121 }
122 return;
123 }
124
125 public string ReadLine()
126 {
127 string TempStr = System.Console.ReadLine();
128 Log.WriteLine(TempStr);
129 return TempStr;
130 }
131
132 public int Read()
133 {
134 int TempInt = System.Console.Read();
135 Log.Write((char)TempInt);
136 return TempInt;
137 }
138
139 // Displays a prompt and waits for the user to enter a string, then returns that string
140 // Done with no echo and suitable for passwords
141 public string PasswdPrompt(string prompt)
142 {
143 // FIXME: Needs to be better abstracted
144 Log.WriteLine(prompt);
145 this.Write(prompt);
146 ConsoleColor oldfg = System.Console.ForegroundColor;
147 System.Console.ForegroundColor = System.Console.BackgroundColor;
148 string temp = System.Console.ReadLine();
149 System.Console.ForegroundColor = oldfg;
150 return temp;
151 }
152
153 // Displays a command prompt and waits for the user to enter a string, then returns that string
154 public string CmdPrompt(string prompt)
155 {
156 this.Write(String.Format("{0}: ", prompt));
157 return this.ReadLine();
158 }
159
160 // Displays a command prompt and returns a default value if the user simply presses enter
161 public string CmdPrompt(string prompt, string defaultresponse)
162 {
163 string temp = CmdPrompt(String.Format( "{0} [{1}]", prompt, defaultresponse ));
164 if (temp == "")
165 {
166 return defaultresponse;
167 }
168 else
169 {
170 return temp;
171 }
172 }
173
174 // Displays a command prompt and returns a default value, user may only enter 1 of 2 options
175 public string CmdPrompt(string prompt, string defaultresponse, string OptionA, string OptionB)
176 {
177 bool itisdone = false;
178 string temp = CmdPrompt(prompt, defaultresponse);
179 while (itisdone == false)
180 {
181 if ((temp == OptionA) || (temp == OptionB))
182 {
183 itisdone = true;
184 }
185 else
186 {
187 Notice("Valid options are " + OptionA + " or " + OptionB);
188 temp = CmdPrompt(prompt, defaultresponse);
189 }
190 }
191 return temp;
192 }
193
194 // Runs a command with a number of parameters
195 public Object RunCmd(string Cmd, string[] cmdparams)
196 {
197 cmdparser.RunCmd(Cmd, cmdparams);
198 return null;
199 }
200
201 // Shows data about something
202 public void ShowCommands(string ShowWhat)
203 {
204 cmdparser.Show(ShowWhat);
205 }
206
207 public void MainConsolePrompt()
208 {
209 string[] tempstrarray;
210 string tempstr = this.CmdPrompt(this.componentname + "# ");
211 tempstrarray = tempstr.Split(' ');
212 string cmd = tempstrarray[0];
213 Array.Reverse(tempstrarray);
214 Array.Resize<string>(ref tempstrarray, tempstrarray.Length - 1);
215 Array.Reverse(tempstrarray);
216 string[] cmdparams = (string[])tempstrarray;
217 RunCmd(cmd, cmdparams);
218 }
219 }
220}
diff --git a/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs b/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs
deleted file mode 100644
index e3847be..0000000
--- a/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Framework.Console
33{
34 public interface conscmd_callback
35 {
36 void RunCmd(string cmd, string[] cmdparams);
37 void Show(string ShowWhat);
38 }
39}
diff --git a/Common/OpenSim.Framework.Console/MainConsole.cs b/Common/OpenSim.Framework.Console/MainConsole.cs
deleted file mode 100644
index 01aa3d1..0000000
--- a/Common/OpenSim.Framework.Console/MainConsole.cs
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29
30namespace OpenSim.Framework.Console
31{
32 public class MainConsole {
33
34 private static ConsoleBase instance;
35
36 public static ConsoleBase Instance
37 {
38 get
39 {
40 return instance;
41 }
42 set
43 {
44 instance = value;
45 }
46 }
47 }
48
49}
diff --git a/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj b/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj
deleted file mode 100644
index 7af0eca..0000000
--- a/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj
+++ /dev/null
@@ -1,89 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{A7CD0630-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Framework.Console</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Framework.Console</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="System" >
62 <HintPath>System.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 </ItemGroup>
66 <ItemGroup>
67 </ItemGroup>
68 <ItemGroup>
69 <Compile Include="AssemblyInfo.cs">
70 <SubType>Code</SubType>
71 </Compile>
72 <Compile Include="ConsoleBase.cs">
73 <SubType>Code</SubType>
74 </Compile>
75 <Compile Include="ConsoleCallbacksBase.cs">
76 <SubType>Code</SubType>
77 </Compile>
78 <Compile Include="MainConsole.cs">
79 <SubType>Code</SubType>
80 </Compile>
81 </ItemGroup>
82 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
83 <PropertyGroup>
84 <PreBuildEvent>
85 </PreBuildEvent>
86 <PostBuildEvent>
87 </PostBuildEvent>
88 </PropertyGroup>
89</Project>
diff --git a/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build b/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build
deleted file mode 100644
index 9a03b54..0000000
--- a/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build
+++ /dev/null
@@ -1,42 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.Console" default="build">
3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}">
8 </fileset>
9 </copy>
10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
11 <resources prefix="OpenSim.Framework.Console" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="ConsoleBase.cs" />
16 <include name="ConsoleCallbacksBase.cs" />
17 <include name="MainConsole.cs" />
18 </sources>
19 <references basedir="${project::get-base-directory()}">
20 <lib>
21 <include name="${project::get-base-directory()}" />
22 <include name="${project::get-base-directory()}/${build.dir}" />
23 </lib>
24 <include name="System.dll" />
25 </references>
26 </csc>
27 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
28 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
29 <copy todir="${project::get-base-directory()}/../../bin/">
30 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
31 <include name="*.dll"/>
32 <include name="*.exe"/>
33 </fileset>
34 </copy>
35 </target>
36 <target name="clean">
37 <delete dir="${bin.dir}" failonerror="false" />
38 <delete dir="${obj.dir}" failonerror="false" />
39 </target>
40 <target name="doc" description="Creates documentation.">
41 </target>
42</project>
diff --git a/Common/OpenSim.Framework/AgentInventory.cs b/Common/OpenSim.Framework/AgentInventory.cs
deleted file mode 100644
index b36982a..0000000
--- a/Common/OpenSim.Framework/AgentInventory.cs
+++ /dev/null
@@ -1,278 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using libsecondlife.Packets;
33using OpenSim.Framework.Types;
34using OpenSim.Framework.Utilities;
35
36namespace OpenSim.Framework.Inventory
37{
38 public class AgentInventory
39 {
40 //Holds the local copy of Inventory info for a agent
41 public Dictionary<LLUUID, InventoryFolder> InventoryFolders;
42 public Dictionary<LLUUID, InventoryItem> InventoryItems;
43 public InventoryFolder InventoryRoot;
44 public int LastCached; //maybe used by opensim app, time this was last stored/compared to user server
45 public LLUUID AgentID;
46 public AvatarWearable[] Wearables;
47
48 public AgentInventory()
49 {
50 InventoryFolders = new Dictionary<LLUUID, InventoryFolder>();
51 InventoryItems = new Dictionary<LLUUID, InventoryItem>();
52 this.Initialise();
53 }
54
55 public virtual void Initialise()
56 {
57 Wearables = new AvatarWearable[13]; //should be 12 of these
58 for (int i = 0; i < 13; i++)
59 {
60 Wearables[i] = new AvatarWearable();
61 }
62
63 }
64
65 public bool CreateNewFolder(LLUUID folderID, ushort type)
66 {
67 InventoryFolder Folder = new InventoryFolder();
68 Folder.FolderID = folderID;
69 Folder.OwnerID = this.AgentID;
70 Folder.DefaultType = type;
71 this.InventoryFolders.Add(Folder.FolderID, Folder);
72 return (true);
73 }
74
75 public void CreateRootFolder(LLUUID newAgentID, bool createTextures)
76 {
77 this.AgentID = newAgentID;
78 InventoryRoot = new InventoryFolder();
79 InventoryRoot.FolderID = LLUUID.Random();
80 InventoryRoot.ParentID = new LLUUID();
81 InventoryRoot.Version = 1;
82 InventoryRoot.DefaultType = 8;
83 InventoryRoot.OwnerID = this.AgentID;
84 InventoryRoot.FolderName = "My Inventory";
85 InventoryFolders.Add(InventoryRoot.FolderID, InventoryRoot);
86 InventoryRoot.OwnerID = this.AgentID;
87 if (createTextures)
88 {
89 this.CreateNewFolder(LLUUID.Random(), 0, "Textures", InventoryRoot.FolderID);
90 }
91 }
92
93 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName)
94 {
95 InventoryFolder Folder = new InventoryFolder();
96 Folder.FolderID = folderID;
97 Folder.OwnerID = this.AgentID;
98 Folder.DefaultType = type;
99 Folder.FolderName = folderName;
100 this.InventoryFolders.Add(Folder.FolderID, Folder);
101
102 return (true);
103 }
104
105 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent)
106 {
107 if (!this.InventoryFolders.ContainsKey(folderID))
108 {
109 Console.WriteLine("creating new folder called " + folderName + " in agents inventory");
110 InventoryFolder Folder = new InventoryFolder();
111 Folder.FolderID = folderID;
112 Folder.OwnerID = this.AgentID;
113 Folder.DefaultType = type;
114 Folder.FolderName = folderName;
115 Folder.ParentID = parent;
116 this.InventoryFolders.Add(Folder.FolderID, Folder);
117 }
118
119 return (true);
120 }
121
122 public bool HasFolder(LLUUID folderID)
123 {
124 if (this.InventoryFolders.ContainsKey(folderID))
125 {
126 return true;
127 }
128 return false;
129 }
130
131 public LLUUID GetFolderID(string folderName)
132 {
133 foreach (InventoryFolder inv in this.InventoryFolders.Values)
134 {
135 if (inv.FolderName == folderName)
136 {
137 return inv.FolderID;
138 }
139 }
140
141 return LLUUID.Zero;
142 }
143
144 public bool UpdateItemAsset(LLUUID itemID, AssetBase asset)
145 {
146 if(this.InventoryItems.ContainsKey(itemID))
147 {
148 InventoryItem Item = this.InventoryItems[itemID];
149 Item.AssetID = asset.FullID;
150 Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + " so it now is set to asset " + asset.FullID.ToStringHyphenated());
151 //TODO need to update the rest of the info
152 }
153 return true;
154 }
155
156 public bool UpdateItemDetails(LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet)
157 {
158 Console.WriteLine("updating inventory item details");
159 if (this.InventoryItems.ContainsKey(itemID))
160 {
161 Console.WriteLine("changing name to "+ Util.FieldToString(packet.Name));
162 InventoryItem Item = this.InventoryItems[itemID];
163 Item.Name = Util.FieldToString(packet.Name);
164 Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated());
165 //TODO need to update the rest of the info
166 }
167 return true;
168 }
169
170 public LLUUID AddToInventory(LLUUID folderID, AssetBase asset)
171 {
172 if (this.InventoryFolders.ContainsKey(folderID))
173 {
174 LLUUID NewItemID = LLUUID.Random();
175
176 InventoryItem Item = new InventoryItem();
177 Item.FolderID = folderID;
178 Item.OwnerID = AgentID;
179 Item.AssetID = asset.FullID;
180 Item.ItemID = NewItemID;
181 Item.Type = asset.Type;
182 Item.Name = asset.Name;
183 Item.Description = asset.Description;
184 Item.InvType = asset.InvType;
185 this.InventoryItems.Add(Item.ItemID, Item);
186 InventoryFolder Folder = InventoryFolders[Item.FolderID];
187 Folder.Items.Add(Item);
188 return (Item.ItemID);
189 }
190 else
191 {
192 return (null);
193 }
194 }
195
196 public bool DeleteFromInventory(LLUUID itemID)
197 {
198 bool res = false;
199 if (this.InventoryItems.ContainsKey(itemID))
200 {
201 InventoryItem item = this.InventoryItems[itemID];
202 this.InventoryItems.Remove(itemID);
203 foreach (InventoryFolder fold in InventoryFolders.Values)
204 {
205 if (fold.Items.Contains(item))
206 {
207 fold.Items.Remove(item);
208 break;
209 }
210 }
211 res = true;
212
213 }
214 return res;
215 }
216 }
217
218 public class InventoryFolder
219 {
220 public List<InventoryItem> Items;
221 //public List<InventoryFolder> Subfolders;
222 public LLUUID FolderID;
223 public LLUUID OwnerID;
224 public LLUUID ParentID = LLUUID.Zero;
225 public string FolderName;
226 public ushort DefaultType;
227 public ushort Version;
228
229 public InventoryFolder()
230 {
231 Items = new List<InventoryItem>();
232 //Subfolders = new List<InventoryFolder>();
233 }
234
235 }
236
237 public class InventoryItem
238 {
239 public LLUUID FolderID;
240 public LLUUID OwnerID;
241 public LLUUID ItemID;
242 public LLUUID AssetID;
243 public LLUUID CreatorID;
244 public sbyte InvType;
245 public sbyte Type;
246 public string Name ="";
247 public string Description;
248
249 public InventoryItem()
250 {
251 this.CreatorID = LLUUID.Zero;
252 }
253
254 public string ExportString()
255 {
256 string typ = "notecard";
257 string result = "";
258 result += "\tinv_object\t0\n\t{\n";
259 result += "\t\tobj_id\t%s\n";
260 result += "\t\tparent_id\t"+ ItemID.ToString() +"\n";
261 result += "\t\ttype\t"+ typ +"\n";
262 result += "\t\tname\t" + Name+"|\n";
263 result += "\t}\n";
264 return result;
265 }
266 }
267
268 public class AvatarWearable
269 {
270 public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000");
271 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
272
273 public AvatarWearable()
274 {
275
276 }
277 }
278}
diff --git a/Common/OpenSim.Framework/BlockingQueue.cs b/Common/OpenSim.Framework/BlockingQueue.cs
deleted file mode 100644
index 667b8d8..0000000
--- a/Common/OpenSim.Framework/BlockingQueue.cs
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Threading;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Framework.Utilities
34{
35 public class BlockingQueue<T>
36 {
37 private Queue<T> _queue = new Queue<T>();
38 private object _queueSync = new object();
39
40 public void Enqueue(T value)
41 {
42 lock (_queueSync)
43 {
44 _queue.Enqueue(value);
45 Monitor.Pulse(_queueSync);
46 }
47 }
48
49 public T Dequeue()
50 {
51 lock (_queueSync)
52 {
53 if (_queue.Count < 1)
54 Monitor.Wait(_queueSync);
55
56 return _queue.Dequeue();
57 }
58 }
59 }
60}
diff --git a/Common/OpenSim.Framework/HeightMapGenHills.cs b/Common/OpenSim.Framework/HeightMapGenHills.cs
deleted file mode 100644
index 9777b82..0000000
--- a/Common/OpenSim.Framework/HeightMapGenHills.cs
+++ /dev/null
@@ -1,150 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30
31namespace OpenSim.Framework.Terrain
32{
33 public class HeightmapGenHills
34 {
35 private Random Rand = new Random();
36 private int NumHills;
37 private float HillMin;
38 private float HillMax;
39 private bool Island;
40 private float[] heightmap;
41
42 public float[] GenerateHeightmap(int numHills, float hillMin, float hillMax, bool island)
43 {
44 NumHills = numHills;
45 HillMin = hillMin;
46 HillMax = hillMax;
47 Island = island;
48
49 heightmap = new float[256 * 256];
50
51 for (int i = 0; i < numHills; i++)
52 {
53 AddHill();
54 }
55
56 Normalize();
57
58 return heightmap;
59 }
60
61 private void AddHill()
62 {
63 float x, y;
64 float radius = RandomRange(HillMin, HillMax);
65
66 if (Island)
67 {
68 // Which direction from the center of the map the hill is placed
69 float theta = RandomRange(0, 6.28f);
70
71 // How far from the center of the map to place the hill. The radius
72 // is subtracted from the range to prevent any part of the hill from
73 // reaching the edge of the map
74 float distance = RandomRange(radius / 2.0f, 128.0f - radius);
75
76 x = 128.0f + (float)Math.Cos(theta) * distance;
77 y = 128.0f + (float)Math.Sin(theta) * distance;
78 }
79 else
80 {
81 x = RandomRange(-radius, 256.0f + radius);
82 y = RandomRange(-radius, 256.0f + radius);
83 }
84
85 float radiusSq = radius * radius;
86 float distSq;
87 float height;
88
89 int xMin = (int)(x - radius) - 1;
90 int xMax = (int)(x + radius) + 1;
91 if (xMin < 0) xMin = 0;
92 if (xMax > 255) xMax = 255;
93
94 int yMin = (int)(y - radius) - 1;
95 int yMax = (int)(y + radius) + 1;
96 if (yMin < 0) yMin = 0;
97 if (yMax > 255) yMax = 255;
98
99 // Loop through each affected cell and determine the height at that point
100 for (int v = yMin; v <= yMax; ++v)
101 {
102 float fv = (float)v;
103
104 for (int h = xMin; h <= xMax; ++h)
105 {
106 float fh = (float)h;
107
108 // Determine how far from the center of this hill this point is
109 distSq = (x - fh) * (x - fh) + (y - fv) * (y - fv);
110 height = radiusSq - distSq;
111
112 // Don't add negative hill values
113 if (height > 0.0f) heightmap[h + v * 256] += height;
114 }
115 }
116 }
117
118 private void Normalize()
119 {
120 float min = heightmap[0];
121 float max = heightmap[0];
122
123 for (int x = 0; x < 256; x++)
124 {
125 for (int y = 0; y < 256; y++)
126 {
127 if (heightmap[x + y * 256] < min) min = heightmap[x + y * 256];
128 if (heightmap[x + y * 256] > max) max = heightmap[x + y * 256];
129 }
130 }
131
132 // Avoid a rare divide by zero
133 if (min != max)
134 {
135 for (int x = 0; x < 256; x++)
136 {
137 for (int y = 0; y < 256; y++)
138 {
139 heightmap[x + y * 256] = ((heightmap[x + y * 256] - min) / (max - min)) * (HillMax - HillMin);
140 }
141 }
142 }
143 }
144
145 private float RandomRange(float min, float max)
146 {
147 return (float)Rand.NextDouble() * (max - min) + min;
148 }
149 }
150}
diff --git a/Common/OpenSim.Framework/Interfaces/IAssetServer.cs b/Common/OpenSim.Framework/Interfaces/IAssetServer.cs
deleted file mode 100644
index 3f86acc..0000000
--- a/Common/OpenSim.Framework/Interfaces/IAssetServer.cs
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
27using System;
28using System.Net;
29using System.Net.Sockets;
30using System.IO;
31using System.Threading;
32using libsecondlife;
33using OpenSim.Framework.Types;
34
35namespace OpenSim.Framework.Interfaces
36{
37 /// <summary>
38 /// Description of IAssetServer.
39 /// </summary>
40
41 public interface IAssetServer
42 {
43 void SetReceiver(IAssetReceiver receiver);
44 void RequestAsset(LLUUID assetID, bool isTexture);
45 void UpdateAsset(AssetBase asset);
46 void UploadNewAsset(AssetBase asset);
47 void SetServerInfo(string ServerUrl, string ServerKey);
48 void Close();
49 }
50
51 // could change to delegate?
52 public interface IAssetReceiver
53 {
54 void AssetReceived(AssetBase asset, bool IsTexture);
55 void AssetNotFound(AssetBase asset);
56 }
57
58 public interface IAssetPlugin
59 {
60 IAssetServer GetAssetServer();
61 }
62
63 public struct ARequest
64 {
65 public LLUUID AssetID;
66 public bool IsTexture;
67 }
68}
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
deleted file mode 100644
index 9f7b619..0000000
--- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Inventory;
5using libsecondlife;
6using libsecondlife.Packets;
7using OpenSim.Framework.Types;
8
9namespace OpenSim.Framework.Interfaces
10{
11 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
12 public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
13 public delegate void ModifyTerrain(byte action, float north, float west);
14 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
15 public delegate void StartAnim(LLUUID animID, int seq);
16 public delegate void LinkObjects(uint parent, List<uint> children);
17
18 public interface IClientAPI
19 {
20 event ChatFromViewer OnChatFromViewer;
21 event RezObject OnRezObject;
22 event ModifyTerrain OnModifyTerrain;
23 event SetAppearance OnSetAppearance;
24 event StartAnim OnStartAnim;
25 event LinkObjects OnLinkObjects;
26
27 LLVector3 StartPos
28 {
29 get;
30 set;
31 }
32 void SendAppearance(AvatarWearable[] wearables);
33 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
34 }
35}
diff --git a/Common/OpenSim.Framework/Interfaces/IConfig.cs b/Common/OpenSim.Framework/Interfaces/IConfig.cs
deleted file mode 100644
index 7b4c040..0000000
--- a/Common/OpenSim.Framework/Interfaces/IConfig.cs
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3
4* Copyright (c) <year>, <copyright holder>
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30using System;
31using System.Collections.Generic;
32using System.IO;
33using libsecondlife;
34//using OpenSim.world;
35
36namespace OpenSim.Framework.Interfaces
37{
38 /// <summary>
39 /// This class handles connection to the underlying database used for configuration of the region.
40 /// Region content is also stored by this class. The main entry point is InitConfig() which attempts to locate
41 /// opensim.yap in the current working directory. If opensim.yap can not be found, default settings are loaded from
42 /// what is hardcoded here and then saved into opensim.yap for future startups.
43 /// </summary>
44
45
46 public abstract class SimConfig
47 {
48 public string RegionName;
49
50 public uint RegionLocX;
51 public uint RegionLocY;
52 public ulong RegionHandle;
53
54 public int IPListenPort;
55 public string IPListenAddr;
56
57 public string AssetURL;
58 public string AssetSendKey;
59
60 public string GridURL;
61 public string GridSendKey;
62 public string GridRecvKey;
63 public string UserURL;
64 public string UserSendKey;
65 public string UserRecvKey;
66
67 public abstract void InitConfig(bool sandboxMode);
68 public abstract void LoadFromGrid();
69
70 }
71
72 public interface ISimConfig
73 {
74 SimConfig GetConfigObject();
75 }
76}
diff --git a/Common/OpenSim.Framework/Interfaces/IGenericConfig.cs b/Common/OpenSim.Framework/Interfaces/IGenericConfig.cs
deleted file mode 100644
index a853fe4..0000000
--- a/Common/OpenSim.Framework/Interfaces/IGenericConfig.cs
+++ /dev/null
@@ -1,15 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public interface IGenericConfig
8 {
9 void LoadData();
10 string GetAttribute(string attributeName);
11 bool SetAttribute(string attributeName, string attributeValue);
12 void Commit();
13 void Close();
14 }
15}
diff --git a/Common/OpenSim.Framework/Interfaces/IGridConfig.cs b/Common/OpenSim.Framework/Interfaces/IGridConfig.cs
deleted file mode 100644
index b2f26da..0000000
--- a/Common/OpenSim.Framework/Interfaces/IGridConfig.cs
+++ /dev/null
@@ -1,64 +0,0 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3
4* Copyright (c) <year>, <copyright holder>
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30using System;
31using System.Collections.Generic;
32using System.IO;
33using libsecondlife;
34//using OpenSim.world;
35
36namespace OpenSim.Framework.Interfaces
37{
38 /// <summary>
39 /// </summary>
40
41
42 public abstract class GridConfig
43 {
44 public string GridOwner;
45 public string DefaultStartupMsg;
46 public string DefaultAssetServer;
47 public string AssetSendKey;
48 public string AssetRecvKey;
49 public string DefaultUserServer;
50 public string UserSendKey;
51 public string UserRecvKey;
52 public string SimSendKey;
53 public string SimRecvKey;
54
55
56 public abstract void InitConfig();
57
58 }
59
60 public interface IGridConfig
61 {
62 GridConfig GetConfigObject();
63 }
64}
diff --git a/Common/OpenSim.Framework/Interfaces/IGridServer.cs b/Common/OpenSim.Framework/Interfaces/IGridServer.cs
deleted file mode 100644
index e67ea98..0000000
--- a/Common/OpenSim.Framework/Interfaces/IGridServer.cs
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
27
28
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using System.Net;
33using System.Net.Sockets;
34using System.IO;
35using libsecondlife;
36using OpenSim;
37using OpenSim.Framework.Types;
38
39namespace OpenSim.Framework.Interfaces
40{
41 /// <summary>
42 /// Handles connection to Grid Servers.
43 /// also Sim to Sim connections?
44 /// </summary>
45
46 public interface IGridServer
47 {
48 UUIDBlock RequestUUIDBlock();
49 NeighbourInfo[] RequestNeighbours(); //should return a array of neighbouring regions
50 AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
51 bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
52 string GetName();
53 bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port);
54 void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
55 IList RequestMapBlocks(int minX, int minY, int maxX, int maxY);
56 void Close();
57 }
58
59 public struct UUIDBlock
60 {
61 public LLUUID BlockStart;
62 public LLUUID BlockEnd;
63 }
64
65 public class AuthenticateResponse
66 {
67 public bool Authorised;
68 public Login LoginInfo;
69
70 public AuthenticateResponse()
71 {
72
73 }
74
75 }
76
77 public interface IGridPlugin
78 {
79 IGridServer GetGridServer();
80 }
81}
diff --git a/Common/OpenSim.Framework/Interfaces/ILocalStorage.cs b/Common/OpenSim.Framework/Interfaces/ILocalStorage.cs
deleted file mode 100644
index dd17b72..0000000
--- a/Common/OpenSim.Framework/Interfaces/ILocalStorage.cs
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
27
28using System;
29using libsecondlife;
30using OpenSim.Framework.Types;
31
32namespace OpenSim.Framework.Interfaces
33{
34 /// <summary>
35 /// ILocalStorage. Really hacked together right now needs cleaning up
36 /// </summary>
37 public interface ILocalStorage
38 {
39 void Initialise(string datastore);
40
41 void StorePrim(PrimData prim);
42 void RemovePrim(LLUUID primID);
43 void LoadPrimitives(ILocalStorageReceiver receiver);
44
45 float[] LoadWorld();
46 void SaveMap(float[] heightmap);
47
48 void SaveParcels(ParcelData[] parcels);
49 void SaveParcel(ParcelData parcel);
50 void RemoveParcel(ParcelData parcel);
51 void RemoveAllParcels();
52 void LoadParcels(ILocalStorageParcelReceiver recv);
53
54 void ShutDown();
55 }
56
57 public interface ILocalStorageReceiver
58 {
59 void PrimFromStorage(PrimData prim);
60 }
61
62 public interface ILocalStorageParcelReceiver
63 {
64 void ParcelFromStorage(ParcelData data);
65 void NoParcelDataFromStorage();
66 }
67}
68
diff --git a/Common/OpenSim.Framework/Interfaces/IScriptAPI.cs b/Common/OpenSim.Framework/Interfaces/IScriptAPI.cs
deleted file mode 100644
index 3ad0f06..0000000
--- a/Common/OpenSim.Framework/Interfaces/IScriptAPI.cs
+++ /dev/null
@@ -1,14 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Types;
5
6namespace OpenSim.Framework.Interfaces
7{
8 public interface IScriptAPI
9 {
10 OSVector3 GetEntityPosition(uint localID);
11 void SetEntityPosition(uint localID, float x, float y, float z);
12 uint GetRandomAvatarID();
13 }
14}
diff --git a/Common/OpenSim.Framework/Interfaces/IScriptEngine.cs b/Common/OpenSim.Framework/Interfaces/IScriptEngine.cs
deleted file mode 100644
index ed8974c..0000000
--- a/Common/OpenSim.Framework/Interfaces/IScriptEngine.cs
+++ /dev/null
@@ -1,14 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public interface IScriptEngine
8 {
9 bool Init(IScriptAPI api);
10 string GetName();
11 void LoadScript(string script, string scriptName, uint entityID);
12 void OnFrame();
13 }
14}
diff --git a/Common/OpenSim.Framework/Interfaces/IUserConfig.cs b/Common/OpenSim.Framework/Interfaces/IUserConfig.cs
deleted file mode 100644
index e15867d..0000000
--- a/Common/OpenSim.Framework/Interfaces/IUserConfig.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3
4* Copyright (c) <year>, <copyright holder>
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30using System;
31using System.Collections.Generic;
32using System.IO;
33using libsecondlife;
34//using OpenSim.world;
35
36namespace OpenSim.Framework.Interfaces
37{
38 /// <summary>
39 /// </summary>
40
41
42 public abstract class UserConfig
43 {
44 public string DefaultStartupMsg;
45 public string GridServerURL;
46 public string GridSendKey;
47 public string GridRecvKey;
48
49
50 public abstract void InitConfig();
51
52 }
53
54 public interface IUserConfig
55 {
56 UserConfig GetConfigObject();
57 }
58}
diff --git a/Common/OpenSim.Framework/Interfaces/IUserServer.cs b/Common/OpenSim.Framework/Interfaces/IUserServer.cs
deleted file mode 100644
index 21f2721..0000000
--- a/Common/OpenSim.Framework/Interfaces/IUserServer.cs
+++ /dev/null
@@ -1,15 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Inventory;
5using libsecondlife;
6
7namespace OpenSim.Framework.Interfaces
8{
9 public interface IUserServer
10 {
11 AgentInventory RequestAgentsInventory(LLUUID agentID);
12 void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
13 bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory);
14 }
15}
diff --git a/Common/OpenSim.Framework/Interfaces/LocalGridBase.cs b/Common/OpenSim.Framework/Interfaces/LocalGridBase.cs
deleted file mode 100644
index ff46502..0000000
--- a/Common/OpenSim.Framework/Interfaces/LocalGridBase.cs
+++ /dev/null
@@ -1,24 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Types;
6using System.Collections;
7
8namespace OpenSim.Framework.Interfaces
9{
10 public abstract class LocalGridBase : IGridServer
11 {
12 public abstract UUIDBlock RequestUUIDBlock();
13 public abstract NeighbourInfo[] RequestNeighbours();
14 public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
15 public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
16 public abstract string GetName();
17 public abstract bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port);
18 public abstract void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
19 public abstract void AddNewSession(Login session);
20 public abstract IList RequestMapBlocks(int minX, int minY, int maxX, int maxY);
21 public abstract void Close();
22 }
23
24}
diff --git a/Common/OpenSim.Framework/Interfaces/RemoteGridBase.cs b/Common/OpenSim.Framework/Interfaces/RemoteGridBase.cs
deleted file mode 100644
index ed13ed5..0000000
--- a/Common/OpenSim.Framework/Interfaces/RemoteGridBase.cs
+++ /dev/null
@@ -1,37 +0,0 @@
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.Text;
5using libsecondlife;
6using OpenSim.Framework.Types;
7
8namespace OpenSim.Framework.Interfaces
9{
10 public abstract class RemoteGridBase : IGridServer
11 {
12 public abstract Dictionary<uint, AgentCircuitData> agentcircuits
13 {
14 get;
15 set;
16 }
17
18 public abstract UUIDBlock RequestUUIDBlock();
19 public abstract NeighbourInfo[] RequestNeighbours();
20 public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
21 public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
22 public abstract string GetName();
23 public abstract bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port);
24 public abstract void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
25 public abstract IList RequestMapBlocks(int minX, int minY, int maxX, int maxY);
26 public abstract void Close();
27 public abstract Hashtable GridData {
28 get;
29 set;
30 }
31
32 public abstract ArrayList neighbours {
33 get;
34 set;
35 }
36 }
37}
diff --git a/Common/OpenSim.Framework/LoginService.cs b/Common/OpenSim.Framework/LoginService.cs
deleted file mode 100644
index a4f3cc8..0000000
--- a/Common/OpenSim.Framework/LoginService.cs
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using System.Text;
33using Nwc.XmlRpc;
34using libsecondlife;
35
36namespace OpenSim.Framework.Grid
37{
38 public abstract class LoginService
39 {
40
41 }
42} \ No newline at end of file
diff --git a/Common/OpenSim.Framework/OpenSim.Framework.csproj b/Common/OpenSim.Framework/OpenSim.Framework.csproj
deleted file mode 100644
index 4cedbd9..0000000
--- a/Common/OpenSim.Framework/OpenSim.Framework.csproj
+++ /dev/null
@@ -1,200 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{8ACA2445-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Framework</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Framework</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="Db4objects.Db4o.dll" >
62 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="libsecondlife.dll" >
66 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System" >
70 <HintPath>System.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="System.Xml" >
74 <HintPath>System.Xml.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup>
78 <ItemGroup>
79 <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
80 <Name>XMLRPC</Name>
81 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private>
84 </ProjectReference>
85 </ItemGroup>
86 <ItemGroup>
87 <Compile Include="AgentInventory.cs">
88 <SubType>Code</SubType>
89 </Compile>
90 <Compile Include="BlockingQueue.cs">
91 <SubType>Code</SubType>
92 </Compile>
93 <Compile Include="HeightMapGenHills.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="LoginService.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="Remoting.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="SimProfile.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 <Compile Include="SimProfileBase.cs">
106 <SubType>Code</SubType>
107 </Compile>
108 <Compile Include="UserProfile.cs">
109 <SubType>Code</SubType>
110 </Compile>
111 <Compile Include="UserProfileManager.cs">
112 <SubType>Code</SubType>
113 </Compile>
114 <Compile Include="UserProfileManagerBase.cs">
115 <SubType>Code</SubType>
116 </Compile>
117 <Compile Include="Util.cs">
118 <SubType>Code</SubType>
119 </Compile>
120 <Compile Include="Interfaces\IAssetServer.cs">
121 <SubType>Code</SubType>
122 </Compile>
123 <Compile Include="Interfaces\IClientAPI.cs">
124 <SubType>Code</SubType>
125 </Compile>
126 <Compile Include="Interfaces\IConfig.cs">
127 <SubType>Code</SubType>
128 </Compile>
129 <Compile Include="Interfaces\IGenericConfig.cs">
130 <SubType>Code</SubType>
131 </Compile>
132 <Compile Include="Interfaces\IGridConfig.cs">
133 <SubType>Code</SubType>
134 </Compile>
135 <Compile Include="Interfaces\IGridServer.cs">
136 <SubType>Code</SubType>
137 </Compile>
138 <Compile Include="Interfaces\ILocalStorage.cs">
139 <SubType>Code</SubType>
140 </Compile>
141 <Compile Include="Interfaces\IScriptAPI.cs">
142 <SubType>Code</SubType>
143 </Compile>
144 <Compile Include="Interfaces\IScriptEngine.cs">
145 <SubType>Code</SubType>
146 </Compile>
147 <Compile Include="Interfaces\IUserConfig.cs">
148 <SubType>Code</SubType>
149 </Compile>
150 <Compile Include="Interfaces\IUserServer.cs">
151 <SubType>Code</SubType>
152 </Compile>
153 <Compile Include="Interfaces\LocalGridBase.cs">
154 <SubType>Code</SubType>
155 </Compile>
156 <Compile Include="Interfaces\RemoteGridBase.cs">
157 <SubType>Code</SubType>
158 </Compile>
159 <Compile Include="Properties\AssemblyInfo.cs">
160 <SubType>Code</SubType>
161 </Compile>
162 <Compile Include="Types\AgentCircuitData.cs">
163 <SubType>Code</SubType>
164 </Compile>
165 <Compile Include="Types\AssetBase.cs">
166 <SubType>Code</SubType>
167 </Compile>
168 <Compile Include="Types\AssetLandmark.cs">
169 <SubType>Code</SubType>
170 </Compile>
171 <Compile Include="Types\AssetStorage.cs">
172 <SubType>Code</SubType>
173 </Compile>
174 <Compile Include="Types\EstateSettings.cs">
175 <SubType>Code</SubType>
176 </Compile>
177 <Compile Include="Types\Login.cs">
178 <SubType>Code</SubType>
179 </Compile>
180 <Compile Include="Types\NeighbourInfo.cs">
181 <SubType>Code</SubType>
182 </Compile>
183 <Compile Include="Types\OSVector3.cs">
184 <SubType>Code</SubType>
185 </Compile>
186 <Compile Include="Types\ParcelData.cs">
187 <SubType>Code</SubType>
188 </Compile>
189 <Compile Include="Types\PrimData.cs">
190 <SubType>Code</SubType>
191 </Compile>
192 </ItemGroup>
193 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
194 <PropertyGroup>
195 <PreBuildEvent>
196 </PreBuildEvent>
197 <PostBuildEvent>
198 </PostBuildEvent>
199 </PropertyGroup>
200</Project>
diff --git a/Common/OpenSim.Framework/OpenSim.Framework.dll.build b/Common/OpenSim.Framework/OpenSim.Framework.dll.build
deleted file mode 100644
index 4d95c7d..0000000
--- a/Common/OpenSim.Framework/OpenSim.Framework.dll.build
+++ /dev/null
@@ -1,77 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework" default="build">
3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}">
8 </fileset>
9 </copy>
10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
11 <resources prefix="OpenSim.Framework" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AgentInventory.cs" />
15 <include name="BlockingQueue.cs" />
16 <include name="HeightMapGenHills.cs" />
17 <include name="LoginService.cs" />
18 <include name="Remoting.cs" />
19 <include name="SimProfile.cs" />
20 <include name="SimProfileBase.cs" />
21 <include name="UserProfile.cs" />
22 <include name="UserProfileManager.cs" />
23 <include name="UserProfileManagerBase.cs" />
24 <include name="Util.cs" />
25 <include name="Interfaces/IAssetServer.cs" />
26 <include name="Interfaces/IClientAPI.cs" />
27 <include name="Interfaces/IConfig.cs" />
28 <include name="Interfaces/IGenericConfig.cs" />
29 <include name="Interfaces/IGridConfig.cs" />
30 <include name="Interfaces/IGridServer.cs" />
31 <include name="Interfaces/ILocalStorage.cs" />
32 <include name="Interfaces/IScriptAPI.cs" />
33 <include name="Interfaces/IScriptEngine.cs" />
34 <include name="Interfaces/IUserConfig.cs" />
35 <include name="Interfaces/IUserServer.cs" />
36 <include name="Interfaces/LocalGridBase.cs" />
37 <include name="Interfaces/RemoteGridBase.cs" />
38 <include name="Properties/AssemblyInfo.cs" />
39 <include name="Types/AgentCircuitData.cs" />
40 <include name="Types/AssetBase.cs" />
41 <include name="Types/AssetLandmark.cs" />
42 <include name="Types/AssetStorage.cs" />
43 <include name="Types/EstateSettings.cs" />
44 <include name="Types/Login.cs" />
45 <include name="Types/NeighbourInfo.cs" />
46 <include name="Types/OSVector3.cs" />
47 <include name="Types/ParcelData.cs" />
48 <include name="Types/PrimData.cs" />
49 </sources>
50 <references basedir="${project::get-base-directory()}">
51 <lib>
52 <include name="${project::get-base-directory()}" />
53 <include name="${project::get-base-directory()}/${build.dir}" />
54 </lib>
55 <include name="../../bin/Db4objects.Db4o.dll" />
56 <include name="../../bin/libsecondlife.dll" />
57 <include name="System.dll" />
58 <include name="System.Xml.dll" />
59 <include name="../../bin/XMLRPC.dll" />
60 </references>
61 </csc>
62 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
63 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
64 <copy todir="${project::get-base-directory()}/../../bin/">
65 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
66 <include name="*.dll"/>
67 <include name="*.exe"/>
68 </fileset>
69 </copy>
70 </target>
71 <target name="clean">
72 <delete dir="${bin.dir}" failonerror="false" />
73 <delete dir="${obj.dir}" failonerror="false" />
74 </target>
75 <target name="doc" description="Creates documentation.">
76 </target>
77</project>
diff --git a/Common/OpenSim.Framework/Properties/AssemblyInfo.cs b/Common/OpenSim.Framework/Properties/AssemblyInfo.cs
deleted file mode 100644
index 86f5cdb..0000000
--- a/Common/OpenSim.Framework/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.FrameWork")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.FrameWork")]
13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")]
16
17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)]
21
22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("a08e20c7-f191-4137-b1f0-9291408fa521")]
24
25// Version information for an assembly consists of the following four values:
26//
27// Major Version
28// Minor Version
29// Build Number
30// Revision
31//
32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Common/OpenSim.Framework/Remoting.cs b/Common/OpenSim.Framework/Remoting.cs
deleted file mode 100644
index 660cdde..0000000
--- a/Common/OpenSim.Framework/Remoting.cs
+++ /dev/null
@@ -1,137 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using System.Security.Cryptography;
33
34namespace OpenSim.Framework
35{
36 /// <summary>
37 /// NEEDS AUDIT.
38 /// </summary>
39 /// <remarks>
40 /// Suggested implementation
41 /// <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>
42 /// <para>When sending data to the foreign host - run 'Sign' on the data and affix the returned byte[] to the message.</para>
43 /// <para>When recieving data from the foreign host - run 'Authenticate' against the data and the attached byte[].</para>
44 /// <para>Both hosts should be performing these operations for this to be effective.</para>
45 /// </remarks>
46 class RemoteDigest
47 {
48 private byte[] currentHash;
49 private byte[] secret;
50
51 private SHA512Managed SHA512;
52
53 /// <summary>
54 /// Initialises a new RemoteDigest authentication mechanism
55 /// </summary>
56 /// <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>
57 /// <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>
58 /// <param name="salt">Binary salt - some common value - to be decided what</param>
59 /// <param name="challenge">The challenge key provided by the third party</param>
60 public RemoteDigest(string sharedSecret, byte[] salt, string challenge)
61 {
62 SHA512 = new SHA512Managed();
63 Rfc2898DeriveBytes RFC2898 = new Rfc2898DeriveBytes(sharedSecret,salt);
64 secret = RFC2898.GetBytes(512);
65 ASCIIEncoding ASCII = new ASCIIEncoding();
66
67 currentHash = SHA512.ComputeHash(AppendArrays(secret, ASCII.GetBytes(challenge)));
68 }
69
70 /// <summary>
71 /// Authenticates a piece of incoming data against the local digest. Upon successful authentication, digest string is incremented.
72 /// </summary>
73 /// <param name="data">The incoming data</param>
74 /// <param name="digest">The remote digest</param>
75 /// <returns></returns>
76 public bool Authenticate(byte[] data, byte[] digest)
77 {
78 byte[] newHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
79 if (digest == newHash)
80 {
81 currentHash = newHash;
82 return true;
83 }
84 else
85 {
86 throw new Exception("Hash comparison failed. Key resync required.");
87 }
88 }
89
90 /// <summary>
91 /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message.
92 /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the
93 /// hashes will get out of sync and throw an exception when validation is attempted.
94 /// </summary>
95 /// <param name="data">The outgoing data</param>
96 /// <returns>The local digest</returns>
97 public byte[] Sign(byte[] data)
98 {
99 currentHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
100 return currentHash;
101 }
102
103 /// <summary>
104 /// 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.
105 /// </summary>
106 /// <returns>A 128-character hexadecimal string containing the challenge.</returns>
107 public static string GenerateChallenge()
108 {
109 RNGCryptoServiceProvider RNG = new RNGCryptoServiceProvider();
110 byte[] bytes = new byte[64];
111 RNG.GetBytes(bytes);
112
113 StringBuilder sb = new StringBuilder(bytes.Length * 2);
114 foreach (byte b in bytes)
115 {
116 sb.AppendFormat("{0:x2}", b);
117 }
118 return sb.ToString();
119 }
120
121 /// <summary>
122 /// Helper function, merges two byte arrays
123 /// </summary>
124 /// <remarks>Sourced from MSDN Forum</remarks>
125 /// <param name="a">A</param>
126 /// <param name="b">B</param>
127 /// <returns>C</returns>
128 private byte[] AppendArrays(byte[] a, byte[] b)
129 {
130 byte[] c = new byte[a.Length + b.Length];
131 Buffer.BlockCopy(a, 0, c, 0, a.Length);
132 Buffer.BlockCopy(b, 0, c, a.Length, b.Length);
133 return c;
134 }
135
136 }
137}
diff --git a/Common/OpenSim.Framework/SimProfile.cs b/Common/OpenSim.Framework/SimProfile.cs
deleted file mode 100644
index 0d79ee9..0000000
--- a/Common/OpenSim.Framework/SimProfile.cs
+++ /dev/null
@@ -1,110 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Collections;
31using System.Xml;
32using System.Text;
33using libsecondlife;
34using Nwc.XmlRpc;
35
36namespace OpenSim.Framework.Sims
37{
38 public class SimProfile : SimProfileBase
39 {
40 public SimProfile LoadFromGrid(ulong region_handle, string GridURL, string SendKey, string RecvKey)
41 {
42 try
43 {
44 Hashtable GridReqParams = new Hashtable();
45 GridReqParams["region_handle"] = region_handle.ToString();
46 GridReqParams["authkey"] = SendKey;
47 ArrayList SendParams = new ArrayList();
48 SendParams.Add(GridReqParams);
49 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
50
51 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
52
53 Hashtable RespData = (Hashtable)GridResp.Value;
54 this.UUID = new LLUUID((string)RespData["UUID"]);
55 this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
56 this.regionname = (string)RespData["regionname"];
57 this.sim_ip = (string)RespData["sim_ip"];
58 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
59 this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
60 this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
61 this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
62 this.sendkey = SendKey;
63 this.recvkey = RecvKey;
64 }
65 catch (Exception e)
66 {
67 Console.WriteLine(e.ToString());
68 }
69 return this;
70 }
71
72 public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
73 {
74 try
75 {
76 Hashtable GridReqParams = new Hashtable();
77 GridReqParams["UUID"] = UUID.ToString();
78 GridReqParams["authkey"] = SendKey;
79 ArrayList SendParams = new ArrayList();
80 SendParams.Add(GridReqParams);
81 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
82
83 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
84
85 Hashtable RespData = (Hashtable)GridResp.Value;
86 this.UUID = new LLUUID((string)RespData["UUID"]);
87 this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
88 this.regionname = (string)RespData["regionname"];
89 this.sim_ip = (string)RespData["sim_ip"];
90 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
91 this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
92 this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
93 this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
94 this.sendkey = SendKey;
95 this.recvkey = RecvKey;
96 }
97 catch (Exception e)
98 {
99 Console.WriteLine(e.ToString());
100 }
101 return this;
102 }
103
104
105 public SimProfile()
106 {
107 }
108 }
109
110}
diff --git a/Common/OpenSim.Framework/SimProfileBase.cs b/Common/OpenSim.Framework/SimProfileBase.cs
deleted file mode 100644
index bab18be..0000000
--- a/Common/OpenSim.Framework/SimProfileBase.cs
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Sims
34{
35 [System.Obsolete("Depreciated, use SimProfileData instead")]
36 public class SimProfileBase
37 {
38 public LLUUID UUID;
39 public ulong regionhandle;
40 public string regionname;
41 public string sim_ip;
42 public uint sim_port;
43 public string caps_url;
44 public uint RegionLocX;
45 public uint RegionLocY;
46 public string sendkey;
47 public string recvkey;
48 public bool online;
49
50 public SimProfileBase()
51 {
52 }
53 }
54}
diff --git a/Common/OpenSim.Framework/Types/AgentCircuitData.cs b/Common/OpenSim.Framework/Types/AgentCircuitData.cs
deleted file mode 100644
index de79ce2..0000000
--- a/Common/OpenSim.Framework/Types/AgentCircuitData.cs
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using libsecondlife;
33
34namespace OpenSim.Framework.Types
35{
36 public class AgentCircuitData
37 {
38 public AgentCircuitData() { }
39 public LLUUID AgentID;
40 public LLUUID SessionID;
41 public LLUUID SecureSessionID;
42 public LLVector3 startpos;
43 public string firstname;
44 public string lastname;
45 public uint circuitcode;
46 public bool child;
47 public LLUUID InventoryFolder;
48 public LLUUID BaseFolder;
49 }
50}
diff --git a/Common/OpenSim.Framework/Types/AssetBase.cs b/Common/OpenSim.Framework/Types/AssetBase.cs
deleted file mode 100644
index 86586a6..0000000
--- a/Common/OpenSim.Framework/Types/AssetBase.cs
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Types
34{
35 public class AssetBase
36 {
37 public byte[] Data;
38 public LLUUID FullID;
39 public sbyte Type;
40 public sbyte InvType;
41 public string Name;
42 public string Description;
43
44 public AssetBase()
45 {
46
47 }
48 }
49}
diff --git a/Common/OpenSim.Framework/Types/AssetLandmark.cs b/Common/OpenSim.Framework/Types/AssetLandmark.cs
deleted file mode 100644
index 8a10b70..0000000
--- a/Common/OpenSim.Framework/Types/AssetLandmark.cs
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Types
34{
35 public class AssetLandmark : AssetBase
36 {
37 public int Version;
38 public LLVector3 Position;
39 public LLUUID RegionID;
40
41 public AssetLandmark(AssetBase a)
42 {
43 this.Data = a.Data;
44 this.FullID = a.FullID;
45 this.Type = a.Type;
46 this.InvType = a.InvType;
47 this.Name = a.Name;
48 this.Description = a.Description;
49 InternData();
50 }
51
52 private void InternData()
53 {
54 string temp = System.Text.Encoding.UTF8.GetString(Data).Trim();
55 string[] parts = temp.Split('\n');
56 int.TryParse(parts[0].Substring(17, 1), out Version);
57 LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID);
58 LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position);
59 }
60 }
61}
diff --git a/Common/OpenSim.Framework/Types/AssetStorage.cs b/Common/OpenSim.Framework/Types/AssetStorage.cs
deleted file mode 100644
index 8cac23a..0000000
--- a/Common/OpenSim.Framework/Types/AssetStorage.cs
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Types
34{
35 public class AssetStorage
36 {
37
38 public AssetStorage() {
39 }
40
41 public AssetStorage(LLUUID assetUUID) {
42 UUID=assetUUID;
43 }
44
45 public byte[] Data;
46 public sbyte Type;
47 public string Name;
48 public LLUUID UUID;
49 }
50}
diff --git a/Common/OpenSim.Framework/Types/EstateSettings.cs b/Common/OpenSim.Framework/Types/EstateSettings.cs
deleted file mode 100644
index baa3eef..0000000
--- a/Common/OpenSim.Framework/Types/EstateSettings.cs
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33using libsecondlife;
34
35namespace OpenSim.Framework.Types
36{
37 public class EstateSettings
38 {
39 //Settings to this island
40 public float billableFactor = (float)0.0;
41 public uint estateID = 0;
42 public uint parentEstateID = 0;
43
44 public byte maxAgents = 40;
45 public float objectBonusFactor = (float)1.0;
46
47 public int redirectGridX = 0; //??
48 public int redirectGridY = 0; //??
49 public libsecondlife.Simulator.RegionFlags regionFlags = libsecondlife.Simulator.RegionFlags.None; //Booleam values of various region settings
50 public libsecondlife.Simulator.SimAccess simAccess = libsecondlife.Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default.
51 public float sunHour = 0;
52
53 public float terrainRaiseLimit = 0;
54 public float terrainLowerLimit = 0;
55
56 public bool useFixedSun = false;
57 public int pricePerMeter = 1;
58
59 public ushort regionWaterHeight = 20;
60 public bool regionAllowTerraform = true;
61
62 // Region Information
63 // Low resolution 'base' textures. No longer used.
64 public LLUUID terrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); // Default
65 public LLUUID terrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); // Default
66 public LLUUID terrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); // Default
67 public LLUUID terrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); // Default
68
69 // Higher resolution terrain textures
70 public LLUUID terrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000");
71 public LLUUID terrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000");
72 public LLUUID terrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000");
73 public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000");
74
75 // First quad - each point is bilinearly interpolated at each meter of terrain
76 public float terrainStartHeight0 = 10.0f;
77 public float terrainStartHeight1 = 10.0f;
78 public float terrainStartHeight2 = 10.0f;
79 public float terrainStartHeight3 = 10.0f;
80
81 // Second quad - also bilinearly interpolated.
82 // Terrain texturing is done that:
83 // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y]
84 public float terrainHeightRange0 = 60.0f; //00
85 public float terrainHeightRange1 = 60.0f; //01
86 public float terrainHeightRange2 = 60.0f; //10
87 public float terrainHeightRange3 = 60.0f; //11
88
89 // Terrain Default (Must be in F32 Format!)
90 public string terrainFile = "default.r32";
91 public double terrainMultiplier = 60.0;
92 public float waterHeight = (float)20.0;
93
94
95 }
96}
diff --git a/Common/OpenSim.Framework/Types/Login.cs b/Common/OpenSim.Framework/Types/Login.cs
deleted file mode 100644
index 2737cbb..0000000
--- a/Common/OpenSim.Framework/Types/Login.cs
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using libsecondlife;
33
34namespace OpenSim.Framework.Types
35{
36 public class Login
37 {
38 public string First = "Test";
39 public string Last = "User";
40 public LLUUID Agent;
41 public LLUUID Session;
42 public LLUUID SecureSession = LLUUID.Zero;
43 public LLUUID InventoryFolder;
44 public LLUUID BaseFolder;
45 public uint CircuitCode;
46
47 public Login()
48 {
49
50 }
51 }
52}
diff --git a/Common/OpenSim.Framework/Types/NeighbourInfo.cs b/Common/OpenSim.Framework/Types/NeighbourInfo.cs
deleted file mode 100644
index e3e9dbb..0000000
--- a/Common/OpenSim.Framework/Types/NeighbourInfo.cs
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Framework.Types
34{
35 public class NeighbourInfo
36 {
37 public NeighbourInfo()
38 {
39 }
40
41 public ulong regionhandle;
42 public uint RegionLocX;
43 public uint RegionLocY;
44 public string sim_ip;
45 public uint sim_port;
46 }
47}
diff --git a/Common/OpenSim.Framework/Types/OSVector3.cs b/Common/OpenSim.Framework/Types/OSVector3.cs
deleted file mode 100644
index 7e3a849..0000000
--- a/Common/OpenSim.Framework/Types/OSVector3.cs
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Framework.Types
34{
35 public class OSVector3
36 {
37 public float X;
38 public float Y;
39 public float Z;
40
41 public OSVector3()
42 {
43
44 }
45 }
46}
diff --git a/Common/OpenSim.Framework/Types/ParcelData.cs b/Common/OpenSim.Framework/Types/ParcelData.cs
deleted file mode 100644
index 40f128a..0000000
--- a/Common/OpenSim.Framework/Types/ParcelData.cs
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Types
34{
35
36 public class ParcelData
37 {
38 public byte[] parcelBitmapByteArray = new byte[512];
39 public string parcelName = "";
40 public string parcelDesc = "";
41 public LLUUID ownerID = new LLUUID();
42 public bool isGroupOwned = false;
43 public LLVector3 AABBMin = new LLVector3();
44 public LLVector3 AABBMax = new LLVector3();
45 public int area = 0;
46 public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
47 public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID
48 public libsecondlife.Parcel.ParcelCategory category = new libsecondlife.Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
49 public int claimDate = 0; //Unemplemented
50 public int claimPrice = 0; //Unemplemented
51 public LLUUID groupID = new LLUUID(); //Unemplemented
52 public int groupPrims = 0; //Unemplemented
53 public int salePrice = 0; //Unemeplemented. Parcels price.
54 public libsecondlife.Parcel.ParcelStatus parcelStatus = libsecondlife.Parcel.ParcelStatus.None;
55 public libsecondlife.Parcel.ParcelFlags parcelFlags = libsecondlife.Parcel.ParcelFlags.None;
56 public byte landingType = 0;
57 public byte mediaAutoScale = 0;
58 public LLUUID mediaID = LLUUID.Zero;
59 public int localID = 0;
60 public LLUUID globalID = new LLUUID();
61
62 public string mediaURL = "";
63 public string musicURL = "";
64 public float passHours = 0;
65 public int passPrice = 0;
66 public LLUUID snapshotID = LLUUID.Zero;
67 public LLVector3 userLocation = new LLVector3();
68 public LLVector3 userLookAt = new LLVector3();
69
70 public ParcelData()
71 {
72 globalID = LLUUID.Random();
73 }
74
75 public ParcelData Copy()
76 {
77 ParcelData parcelData = new ParcelData();
78
79 parcelData.AABBMax = this.AABBMax;
80 parcelData.AABBMin = this.AABBMin;
81 parcelData.area = this.area;
82 parcelData.auctionID = this.auctionID;
83 parcelData.authBuyerID = this.authBuyerID;
84 parcelData.category = this.category;
85 parcelData.claimDate = this.claimDate;
86 parcelData.claimPrice = this.claimPrice;
87 parcelData.globalID = this.globalID;
88 parcelData.groupID = this.groupID;
89 parcelData.groupPrims = this.groupPrims;
90 parcelData.isGroupOwned = this.isGroupOwned;
91 parcelData.localID = this.localID;
92 parcelData.landingType = this.landingType;
93 parcelData.mediaAutoScale = this.mediaAutoScale;
94 parcelData.mediaID = this.mediaID;
95 parcelData.mediaURL = this.mediaURL;
96 parcelData.musicURL = this.musicURL;
97 parcelData.ownerID = this.ownerID;
98 parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone();
99 parcelData.parcelDesc = this.parcelDesc;
100 parcelData.parcelFlags = this.parcelFlags;
101 parcelData.parcelName = this.parcelName;
102 parcelData.parcelStatus = this.parcelStatus;
103 parcelData.passHours = this.passHours;
104 parcelData.passPrice = this.passPrice;
105 parcelData.salePrice = this.salePrice;
106 parcelData.snapshotID = this.snapshotID;
107 parcelData.userLocation = this.userLocation;
108 parcelData.userLookAt = this.userLookAt;
109
110 return parcelData;
111
112 }
113 }
114
115}
diff --git a/Common/OpenSim.Framework/Types/PrimData.cs b/Common/OpenSim.Framework/Types/PrimData.cs
deleted file mode 100644
index a63be76..0000000
--- a/Common/OpenSim.Framework/Types/PrimData.cs
+++ /dev/null
@@ -1,201 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using libsecondlife;
33
34namespace OpenSim.Framework.Types
35{
36 public class PrimData
37 {
38 private const uint FULL_MASK_PERMISSIONS = 2147483647;
39
40 public LLUUID OwnerID;
41 public byte PCode;
42 public ushort PathBegin;
43 public ushort PathEnd;
44 public byte PathScaleX;
45 public byte PathScaleY;
46 public byte PathShearX;
47 public byte PathShearY;
48 public sbyte PathSkew;
49 public ushort ProfileBegin;
50 public ushort ProfileEnd;
51 public LLVector3 Scale;
52 public byte PathCurve;
53 public byte ProfileCurve;
54 public uint ParentID = 0;
55 public ushort ProfileHollow;
56 public sbyte PathRadiusOffset;
57 public byte PathRevolutions;
58 public sbyte PathTaperX;
59 public sbyte PathTaperY;
60 public sbyte PathTwist;
61 public sbyte PathTwistBegin;
62 public byte[] Texture;
63
64
65 public Int32 CreationDate;
66 public uint OwnerMask = FULL_MASK_PERMISSIONS;
67 public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
68 public uint GroupMask = FULL_MASK_PERMISSIONS;
69 public uint EveryoneMask = FULL_MASK_PERMISSIONS;
70 public uint BaseMask = FULL_MASK_PERMISSIONS;
71
72 //following only used during prim storage
73 public LLVector3 Position;
74 public LLQuaternion Rotation = new LLQuaternion(0,1,0,0);
75 public uint LocalID;
76 public LLUUID FullID;
77
78 public PrimData()
79 {
80
81 }
82
83 public PrimData(byte[] data)
84 {
85 int i =0;
86
87 this.OwnerID = new LLUUID(data, i); i += 16;
88 this.PCode = data[i++];
89 this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
90 this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
91 this.PathScaleX = data[i++];
92 this.PathScaleY = data[i++];
93 this.PathShearX = data[i++];
94 this.PathShearY = data[i++];
95 this.PathSkew = (sbyte)data[i++];
96 this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
97 this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
98 this.Scale = new LLVector3(data, i); i += 12;
99 this.PathCurve = data[i++];
100 this.ProfileCurve = data[i++];
101 this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
102 this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8));
103 this.PathRadiusOffset = (sbyte)data[i++];
104 this.PathRevolutions = data[i++];
105 this.PathTaperX = (sbyte)data[i++];
106 this.PathTaperY =(sbyte) data[i++];
107 this.PathTwist = (sbyte) data[i++];
108 this.PathTwistBegin = (sbyte) data[i++];
109 ushort length = (ushort)(data[i++] + (data[i++] << 8));
110 this.Texture = new byte[length];
111 Array.Copy(data, i, Texture, 0, length); i += length;
112 this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
113 this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
114 this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
115 this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
116 this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
117 this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
118 this.Position = new LLVector3(data, i); i += 12;
119 this.Rotation = new LLQuaternion(data,i, true); i += 12;
120 this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
121 this.FullID = new LLUUID(data, i); i += 16;
122
123 }
124
125 public byte[] ToBytes()
126 {
127 int i = 0;
128 byte[] bytes = new byte[126 + Texture.Length];
129 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
130 bytes[i++] = this.PCode;
131 bytes[i++] = (byte)(this.PathBegin % 256);
132 bytes[i++] = (byte)((this.PathBegin >> 8) % 256);
133 bytes[i++] = (byte)(this.PathEnd % 256);
134 bytes[i++] = (byte)((this.PathEnd >> 8) % 256);
135 bytes[i++] = this.PathScaleX;
136 bytes[i++] = this.PathScaleY;
137 bytes[i++] = this.PathShearX;
138 bytes[i++] = this.PathShearY;
139 bytes[i++] = (byte)this.PathSkew;
140 bytes[i++] = (byte)(this.ProfileBegin % 256);
141 bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256);
142 bytes[i++] = (byte)(this.ProfileEnd % 256);
143 bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256);
144 Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12;
145 bytes[i++] = this.PathCurve;
146 bytes[i++] = this.ProfileCurve;
147 bytes[i++] = (byte)(ParentID % 256);
148 bytes[i++] = (byte)((ParentID >> 8) % 256);
149 bytes[i++] = (byte)((ParentID >> 16) % 256);
150 bytes[i++] = (byte)((ParentID >> 24) % 256);
151 bytes[i++] = (byte)(this.ProfileHollow %256);
152 bytes[i++] = (byte)((this.ProfileHollow >> 8)% 256);
153 bytes[i++] = ((byte)this.PathRadiusOffset);
154 bytes[i++] = this.PathRevolutions;
155 bytes[i++] = ((byte) this.PathTaperX);
156 bytes[i++] = ((byte) this.PathTaperY);
157 bytes[i++] = ((byte) this.PathTwist);
158 bytes[i++] = ((byte) this.PathTwistBegin);
159 bytes[i++] = (byte)(Texture.Length % 256);
160 bytes[i++] = (byte)((Texture.Length >> 8) % 256);
161 Array.Copy(Texture, 0, bytes, i, Texture.Length); i += Texture.Length;
162 bytes[i++] = (byte)(this.CreationDate % 256);
163 bytes[i++] = (byte)((this.CreationDate >> 8) % 256);
164 bytes[i++] = (byte)((this.CreationDate >> 16) % 256);
165 bytes[i++] = (byte)((this.CreationDate >> 24) % 256);
166 bytes[i++] = (byte)(this.OwnerMask % 256);
167 bytes[i++] = (byte)((this.OwnerMask >> 8) % 256);
168 bytes[i++] = (byte)((this.OwnerMask >> 16) % 256);
169 bytes[i++] = (byte)((this.OwnerMask >> 24) % 256);
170 bytes[i++] = (byte)(this.NextOwnerMask % 256);
171 bytes[i++] = (byte)((this.NextOwnerMask >> 8) % 256);
172 bytes[i++] = (byte)((this.NextOwnerMask >> 16) % 256);
173 bytes[i++] = (byte)((this.NextOwnerMask >> 24) % 256);
174 bytes[i++] = (byte)(this.GroupMask % 256);
175 bytes[i++] = (byte)((this.GroupMask >> 8) % 256);
176 bytes[i++] = (byte)((this.GroupMask >> 16) % 256);
177 bytes[i++] = (byte)((this.GroupMask >> 24) % 256);
178 bytes[i++] = (byte)(this.EveryoneMask % 256);
179 bytes[i++] = (byte)((this.EveryoneMask >> 8) % 256);
180 bytes[i++] = (byte)((this.EveryoneMask >> 16) % 256);
181 bytes[i++] = (byte)((this.EveryoneMask >> 24) % 256);
182 bytes[i++] = (byte)(this.BaseMask % 256);
183 bytes[i++] = (byte)((this.BaseMask >> 8) % 256);
184 bytes[i++] = (byte)((this.BaseMask >> 16) % 256);
185 bytes[i++] = (byte)((this.BaseMask >> 24) % 256);
186 Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12;
187 if (this.Rotation == new LLQuaternion(0,0,0,0))
188 {
189 this.Rotation = new LLQuaternion(0, 1, 0, 0);
190 }
191 Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12;
192 bytes[i++] = (byte)(this.LocalID % 256);
193 bytes[i++] = (byte)((this.LocalID >> 8) % 256);
194 bytes[i++] = (byte)((this.LocalID >> 16) % 256);
195 bytes[i++] = (byte)((this.LocalID >> 24) % 256);
196 Array.Copy(FullID.GetBytes(), 0, bytes, i, 16); i += 16;
197
198 return bytes;
199 }
200 }
201}
diff --git a/Common/OpenSim.Framework/UserProfile.cs b/Common/OpenSim.Framework/UserProfile.cs
deleted file mode 100644
index 04ff20b..0000000
--- a/Common/OpenSim.Framework/UserProfile.cs
+++ /dev/null
@@ -1,89 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using OpenSim.Framework.Inventory;
33using System.Security.Cryptography;
34
35namespace OpenSim.Framework.User
36{
37 public class UserProfile
38 {
39
40 public string firstname;
41 public string lastname;
42 public ulong homeregionhandle;
43 public LLVector3 homepos;
44 public LLVector3 homelookat;
45
46 public bool IsGridGod = false;
47 public bool IsLocal = true; // will be used in future for visitors from foreign grids
48 public string AssetURL;
49 public string MD5passwd;
50
51 public LLUUID CurrentSessionID;
52 public LLUUID CurrentSecureSessionID;
53 public LLUUID UUID;
54 public Dictionary<LLUUID, uint> Circuits = new Dictionary<LLUUID, uint>(); // tracks circuit codes
55
56 public AgentInventory Inventory;
57
58 public UserProfile()
59 {
60 Circuits = new Dictionary<LLUUID, uint>();
61 Inventory = new AgentInventory();
62 homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256));
63 homepos = new LLVector3();
64 homelookat = new LLVector3();
65 }
66
67 public void InitSessionData()
68 {
69 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
70
71 byte[] randDataS = new byte[16];
72 byte[] randDataSS = new byte[16];
73
74 rand.GetBytes(randDataS);
75 rand.GetBytes(randDataSS);
76
77 CurrentSecureSessionID = new LLUUID(randDataSS,0);
78 CurrentSessionID = new LLUUID(randDataS,0);
79
80 }
81
82 public void AddSimCircuit(uint circuitCode, LLUUID regionUUID)
83 {
84 if (this.Circuits.ContainsKey(regionUUID) == false)
85 this.Circuits.Add(regionUUID, circuitCode);
86 }
87
88 }
89}
diff --git a/Common/OpenSim.Framework/UserProfileManager.cs b/Common/OpenSim.Framework/UserProfileManager.cs
deleted file mode 100644
index a4dac05..0000000
--- a/Common/OpenSim.Framework/UserProfileManager.cs
+++ /dev/null
@@ -1,299 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Collections;
31using System.Text;
32using System.Text.RegularExpressions;
33using System.Xml;
34using libsecondlife;
35using Nwc.XmlRpc;
36using OpenSim.Framework.Sims;
37using OpenSim.Framework.Inventory;
38using OpenSim.Framework.Utilities;
39
40namespace OpenSim.Framework.User
41{
42 public class UserProfileManager : UserProfileManagerBase
43 {
44 public string GridURL;
45 public string GridSendKey;
46 public string GridRecvKey;
47 public string DefaultStartupMsg;
48
49 public UserProfileManager()
50 {
51
52 }
53
54 public void SetKeys(string sendKey, string recvKey, string url, string message)
55 {
56 GridRecvKey = recvKey;
57 GridSendKey = sendKey;
58 GridURL = url;
59 DefaultStartupMsg = message;
60 }
61
62 public virtual string ParseXMLRPC(string requestBody)
63 {
64
65 XmlRpcRequest request = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody);
66
67 switch (request.MethodName)
68 {
69 case "login_to_simulator":
70 XmlRpcResponse response = XmlRpcLoginMethod(request);
71
72 return (Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(response), "utf-16", "utf-8"));
73 }
74
75 return "";
76 }
77
78 public string RestDeleteUserSessionMethod( string request, string path, string param )
79 {
80 LLUUID sessionid = new LLUUID(param); // get usersessions/sessionid
81 foreach (libsecondlife.LLUUID UUID in UserProfiles.Keys)
82 {
83 if ( UserProfiles[UUID].CurrentSessionID == sessionid)
84 {
85 UserProfiles[UUID].CurrentSessionID = null;
86 UserProfiles[UUID].CurrentSecureSessionID = null;
87 UserProfiles[UUID].Circuits.Clear();
88 }
89 }
90
91 return "OK";
92 }
93
94 public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
95 {
96 XmlRpcResponse response = new XmlRpcResponse();
97 Hashtable requestData = (Hashtable)request.Params[0];
98
99 bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd"));
100 bool GoodLogin = false;
101 string firstname = "";
102 string lastname = "";
103 string passwd = "";
104
105 if (GoodXML)
106 {
107 firstname = (string)requestData["first"];
108 lastname = (string)requestData["last"];
109 passwd = (string)requestData["passwd"];
110 GoodLogin = AuthenticateUser(firstname, lastname, passwd);
111 }
112
113
114 if (!(GoodXML && GoodLogin))
115 {
116 response = CreateErrorConnectingToGridResponse();
117 }
118 else
119 {
120 UserProfile TheUser = GetProfileByName(firstname, lastname);
121 //we need to sort out how sessions are logged out , currently the sim tells the gridserver
122 //but if as this suggests the userserver handles it then please have the sim telling the userserver instead
123 //as it really makes things messy for sandbox mode
124 //if (!((TheUser.CurrentSessionID == null) && (TheUser.CurrentSecureSessionID == null)))
125 // {
126 // response = CreateAlreadyLoggedInResponse();
127 // }
128 //else
129 //{
130 try
131 {
132 Hashtable responseData = new Hashtable();
133
134 LLUUID AgentID = TheUser.UUID;
135 TheUser.InitSessionData();
136
137 //for loading data from a grid server, make any changes in CustomiseResponse() (or create a sub class of this and override that method)
138 //SimProfile SimInfo = new SimProfile();
139 //SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
140
141
142 Hashtable GlobalT = new Hashtable();
143 GlobalT["sun_texture_id"] = "cce0f112-878f-4586-a2e2-a8f104bba271";
144 GlobalT["cloud_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
145 GlobalT["moon_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
146 ArrayList GlobalTextures = new ArrayList();
147 GlobalTextures.Add(GlobalT);
148
149 Hashtable LoginFlagsHash = new Hashtable();
150 LoginFlagsHash["daylight_savings"] = "N";
151 LoginFlagsHash["stipend_since_login"] = "N";
152 LoginFlagsHash["gendered"] = "Y";
153 LoginFlagsHash["ever_logged_in"] = "Y";
154 ArrayList LoginFlags = new ArrayList();
155 LoginFlags.Add(LoginFlagsHash);
156
157 Hashtable uiconfig = new Hashtable();
158 uiconfig["allow_first_life"] = "Y";
159 ArrayList ui_config = new ArrayList();
160 ui_config.Add(uiconfig);
161
162 Hashtable ClassifiedCategoriesHash = new Hashtable();
163 ClassifiedCategoriesHash["category_name"] = "bla bla";
164 ClassifiedCategoriesHash["category_id"] = (Int32)1;
165 ArrayList ClassifiedCategories = new ArrayList();
166 ClassifiedCategories.Add(ClassifiedCategoriesHash);
167
168 ArrayList AgentInventory = new ArrayList();
169 Console.WriteLine("adding inventory to response");
170 Hashtable TempHash;
171 foreach (InventoryFolder InvFolder in TheUser.Inventory.InventoryFolders.Values)
172 {
173 TempHash = new Hashtable();
174 Console.WriteLine("adding folder " + InvFolder.FolderName + ", ID: " + InvFolder.FolderID.ToStringHyphenated() + " with parent: " + InvFolder.ParentID.ToStringHyphenated());
175 TempHash["name"] = InvFolder.FolderName;
176 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
177 TempHash["version"] = (Int32)InvFolder.Version;
178 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
179 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
180 AgentInventory.Add(TempHash);
181 }
182
183 Hashtable InventoryRootHash = new Hashtable();
184 InventoryRootHash["folder_id"] = TheUser.Inventory.InventoryRoot.FolderID.ToStringHyphenated();
185 ArrayList InventoryRoot = new ArrayList();
186 InventoryRoot.Add(InventoryRootHash);
187
188 Hashtable InitialOutfitHash = new Hashtable();
189 InitialOutfitHash["folder_name"] = "Nightclub Female";
190 InitialOutfitHash["gender"] = "female";
191 ArrayList InitialOutfit = new ArrayList();
192 InitialOutfit.Add(InitialOutfitHash);
193
194 uint circode = (uint)(Util.RandomClass.Next());
195 //TheUser.AddSimCircuit(circode, SimInfo.UUID);
196
197 responseData["last_name"] = TheUser.lastname;
198 responseData["ui-config"] = ui_config;
199 responseData["sim_ip"] = "127.0.0.1"; //SimInfo.sim_ip.ToString();
200 responseData["login-flags"] = LoginFlags;
201 responseData["global-textures"] = GlobalTextures;
202 responseData["classified_categories"] = ClassifiedCategories;
203 responseData["event_categories"] = new ArrayList();
204 responseData["inventory-skeleton"] = AgentInventory;
205 responseData["inventory-skel-lib"] = new ArrayList();
206 responseData["inventory-root"] = InventoryRoot;
207 responseData["event_notifications"] = new ArrayList();
208 responseData["gestures"] = new ArrayList();
209 responseData["inventory-lib-owner"] = new ArrayList();
210 responseData["initial-outfit"] = InitialOutfit;
211 responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
212 responseData["start_location"] = "last";
213 responseData["home"] = "{'region_handle':[r" + (0 * 256).ToString() + ",r" + (0 * 256).ToString() + "], 'position':[r" + TheUser.homepos.X.ToString() + ",r" + TheUser.homepos.Y.ToString() + ",r" + TheUser.homepos.Z.ToString() + "], 'look_at':[r" + TheUser.homelookat.X.ToString() + ",r" + TheUser.homelookat.Y.ToString() + ",r" + TheUser.homelookat.Z.ToString() + "]}";
214 responseData["message"] = DefaultStartupMsg;
215 responseData["first_name"] = TheUser.firstname;
216 responseData["circuit_code"] = (Int32)circode;
217 responseData["sim_port"] = 0; //(Int32)SimInfo.sim_port;
218 responseData["secure_session_id"] = TheUser.CurrentSecureSessionID.ToStringHyphenated();
219 responseData["look_at"] = "\n[r" + TheUser.homelookat.X.ToString() + ",r" + TheUser.homelookat.Y.ToString() + ",r" + TheUser.homelookat.Z.ToString() + "]\n";
220 responseData["agent_id"] = AgentID.ToStringHyphenated();
221 responseData["region_y"] = (Int32)0 * 256; // (Int32)SimInfo.RegionLocY * 256;
222 responseData["region_x"] = (Int32)0 * 256; //SimInfo.RegionLocX * 256;
223 responseData["seed_capability"] = "";
224 responseData["agent_access"] = "M";
225 responseData["session_id"] = TheUser.CurrentSessionID.ToStringHyphenated();
226 responseData["login"] = "true";
227
228 this.CustomiseResponse(ref responseData, TheUser);
229 response.Value = responseData;
230 // TheUser.SendDataToSim(SimInfo);
231 return response;
232
233 }
234 catch (Exception E)
235 {
236 Console.WriteLine(E.ToString());
237 }
238 //}
239 }
240 return response;
241
242 }
243
244 private static XmlRpcResponse CreateErrorConnectingToGridResponse()
245 {
246 XmlRpcResponse response = new XmlRpcResponse();
247 Hashtable ErrorRespData = new Hashtable();
248 ErrorRespData["reason"] = "key";
249 ErrorRespData["message"] = "Error connecting to grid. Please double check your login details and check with the grid owner if you are sure these are correct";
250 ErrorRespData["login"] = "false";
251 response.Value = ErrorRespData;
252 return response;
253 }
254
255 private static XmlRpcResponse CreateAlreadyLoggedInResponse()
256 {
257 XmlRpcResponse response = new XmlRpcResponse();
258 Hashtable PresenceErrorRespData = new Hashtable();
259 PresenceErrorRespData["reason"] = "presence";
260 PresenceErrorRespData["message"] = "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner";
261 PresenceErrorRespData["login"] = "false";
262 response.Value = PresenceErrorRespData;
263 return response;
264 }
265
266 public virtual void CustomiseResponse(ref Hashtable response, UserProfile theUser)
267 {
268 //default method set up to act as ogs user server
269 SimProfile SimInfo= new SimProfile();
270 //get siminfo from grid server
271 SimInfo = SimInfo.LoadFromGrid(theUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
272 Int32 circode = (Int32)Convert.ToUInt32(response["circuit_code"]);
273 theUser.AddSimCircuit((uint)circode, SimInfo.UUID);
274 response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], 'position':[r" + theUser.homepos.X.ToString() + ",r" + theUser.homepos.Y.ToString() + ",r" + theUser.homepos.Z.ToString() + "], 'look_at':[r" + theUser.homelookat.X.ToString() + ",r" + theUser.homelookat.Y.ToString() + ",r" + theUser.homelookat.Z.ToString() + "]}";
275 response["sim_ip"] = SimInfo.sim_ip;
276 response["sim_port"] = (Int32)SimInfo.sim_port;
277 response["region_y"] = (Int32)SimInfo.RegionLocY * 256;
278 response["region_x"] = (Int32)SimInfo.RegionLocX * 256;
279
280 //default is ogs user server, so let the sim know about the user via a XmlRpcRequest
281 Console.WriteLine(SimInfo.caps_url);
282 Hashtable SimParams = new Hashtable();
283 SimParams["session_id"] = theUser.CurrentSessionID.ToString();
284 SimParams["secure_session_id"] = theUser.CurrentSecureSessionID.ToString();
285 SimParams["firstname"] = theUser.firstname;
286 SimParams["lastname"] = theUser.lastname;
287 SimParams["agent_id"] = theUser.UUID.ToString();
288 SimParams["circuit_code"] = (Int32)circode;
289 SimParams["startpos_x"] = theUser.homepos.X.ToString();
290 SimParams["startpos_y"] = theUser.homepos.Y.ToString();
291 SimParams["startpos_z"] = theUser.homepos.Z.ToString();
292 ArrayList SendParams = new ArrayList();
293 SendParams.Add(SimParams);
294
295 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
296 XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000);
297 }
298 }
299}
diff --git a/Common/OpenSim.Framework/UserProfileManagerBase.cs b/Common/OpenSim.Framework/UserProfileManagerBase.cs
deleted file mode 100644
index e0c0174..0000000
--- a/Common/OpenSim.Framework/UserProfileManagerBase.cs
+++ /dev/null
@@ -1,152 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using OpenSim.Framework.Utilities;
33using OpenSim.Framework.Inventory;
34using Db4objects.Db4o;
35
36namespace OpenSim.Framework.User
37{
38 public class UserProfileManagerBase
39 {
40
41 public Dictionary<LLUUID, UserProfile> UserProfiles = new Dictionary<LLUUID, UserProfile>();
42
43 public UserProfileManagerBase()
44 {
45 }
46
47 public virtual void InitUserProfiles()
48 {
49 IObjectContainer db;
50 db = Db4oFactory.OpenFile("userprofiles.yap");
51 IObjectSet result = db.Get(typeof(UserProfile));
52 foreach (UserProfile userprof in result)
53 {
54 UserProfiles.Add(userprof.UUID, userprof);
55 }
56 Console.WriteLine("UserProfiles.Cs:InitUserProfiles() - Successfully loaded " + result.Count.ToString() + " from database");
57 db.Close();
58 }
59
60 public virtual void SaveUserProfiles() // ZOMG! INEFFICIENT!
61 {
62 IObjectContainer db;
63 db = Db4oFactory.OpenFile("userprofiles.yap");
64 IObjectSet result = db.Get(typeof(UserProfile));
65 foreach (UserProfile userprof in result)
66 {
67 db.Delete(userprof);
68 db.Commit();
69 }
70 foreach (UserProfile userprof in UserProfiles.Values)
71 {
72 db.Set(userprof);
73 db.Commit();
74 }
75 db.Close();
76 }
77
78 public UserProfile GetProfileByName(string firstname, string lastname)
79 {
80 foreach (libsecondlife.LLUUID UUID in UserProfiles.Keys)
81 {
82 if (UserProfiles[UUID].firstname.Equals(firstname)) if (UserProfiles[UUID].lastname.Equals(lastname))
83 {
84 return UserProfiles[UUID];
85 }
86 }
87 return null;
88 }
89
90 public UserProfile GetProfileByLLUUID(LLUUID ProfileLLUUID)
91 {
92 return UserProfiles[ProfileLLUUID];
93 }
94
95 public virtual bool AuthenticateUser(string firstname, string lastname, string passwd)
96 {
97 UserProfile TheUser = GetProfileByName(firstname, lastname);
98 passwd = passwd.Remove(0, 3); //remove $1$
99 if (TheUser != null)
100 {
101 if (TheUser.MD5passwd == passwd)
102 {
103 Console.WriteLine("UserProfile - authorised " + firstname + " " + lastname);
104 return true;
105 }
106 else
107 {
108 Console.WriteLine("UserProfile - not authorised, password not match " + TheUser.MD5passwd + " and " + passwd);
109 return false;
110 }
111 }
112 else
113 {
114 Console.WriteLine("UserProfile - not authorised , unkown: " + firstname + " , " + lastname);
115 return false;
116 }
117
118 }
119
120 public void SetGod(LLUUID GodID)
121 {
122 this.UserProfiles[GodID].IsGridGod = true;
123 }
124
125 public virtual UserProfile CreateNewProfile(string firstname, string lastname, string MD5passwd)
126 {
127 Console.WriteLine("creating new profile for : " + firstname + " , " + lastname);
128 UserProfile newprofile = new UserProfile();
129 newprofile.homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256));
130 newprofile.firstname = firstname;
131 newprofile.lastname = lastname;
132 newprofile.MD5passwd = MD5passwd;
133 newprofile.UUID = LLUUID.Random();
134 newprofile.Inventory.CreateRootFolder(newprofile.UUID, true);
135 this.UserProfiles.Add(newprofile.UUID, newprofile);
136 SaveUserProfiles();
137 return newprofile;
138 }
139
140 public virtual AgentInventory GetUsersInventory(LLUUID agentID)
141 {
142 UserProfile user = this.GetProfileByLLUUID(agentID);
143 if (user != null)
144 {
145 return user.Inventory;
146 }
147
148 return null;
149 }
150
151 }
152}
diff --git a/Common/OpenSim.Framework/Util.cs b/Common/OpenSim.Framework/Util.cs
deleted file mode 100644
index 10e3fdf..0000000
--- a/Common/OpenSim.Framework/Util.cs
+++ /dev/null
@@ -1,178 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
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
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
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Security.Cryptography;
30using System.Collections.Generic;
31using System.Text;
32using libsecondlife;
33using libsecondlife.Packets;
34
35namespace OpenSim.Framework.Utilities
36{
37 public class Util
38 {
39 private static Random randomClass = new Random();
40 private static uint nextXferID = 5000;
41 private static object XferLock = new object();
42
43 public static ulong UIntsToLong(uint X, uint Y)
44 {
45 return Helpers.UIntsToLong(X, Y);
46 }
47
48 public static Random RandomClass
49 {
50 get
51 {
52 return randomClass;
53 }
54 }
55
56 public static uint GetNextXferID()
57 {
58 uint id = 0;
59 lock(XferLock)
60 {
61 id = nextXferID;
62 nextXferID++;
63 }
64 return id;
65 }
66
67 public static int UnixTimeSinceEpoch()
68 {
69 TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
70 int timestamp = (int)t.TotalSeconds;
71 return timestamp;
72 }
73
74 public static string Md5Hash(string pass)
75 {
76 MD5 md5 = MD5CryptoServiceProvider.Create();
77 byte[] dataMd5 = md5.ComputeHash(Encoding.Default.GetBytes(pass));
78 StringBuilder sb = new StringBuilder();
79 for (int i = 0; i < dataMd5.Length; i++)
80 sb.AppendFormat("{0:x2}", dataMd5[i]);
81 return sb.ToString();
82 }
83
84 //public static int fast_distance2d(int x, int y)
85 //{
86 // x = System.Math.Abs(x);
87 // y = System.Math.Abs(y);
88
89 // int min = System.Math.Min(x, y);
90
91 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4));
92 //}
93
94 public static string FieldToString(byte[] bytes)
95 {
96 return FieldToString(bytes, String.Empty);
97 }
98
99 /// <summary>
100 /// Convert a variable length field (byte array) to a string, with a
101 /// field name prepended to each line of the output
102 /// </summary>
103 /// <remarks>If the byte array has unprintable characters in it, a
104 /// hex dump will be put in the string instead</remarks>
105 /// <param name="bytes">The byte array to convert to a string</param>
106 /// <param name="fieldName">A field name to prepend to each line of output</param>
107 /// <returns>An ASCII string or a string containing a hex dump, minus
108 /// the null terminator</returns>
109 public static string FieldToString(byte[] bytes, string fieldName)
110 {
111 // Check for a common case
112 if (bytes.Length == 0) return String.Empty;
113
114 StringBuilder output = new StringBuilder();
115 bool printable = true;
116
117 for (int i = 0; i < bytes.Length; ++i)
118 {
119 // Check if there are any unprintable characters in the array
120 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09
121 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00)
122 {
123 printable = false;
124 break;
125 }
126 }
127
128 if (printable)
129 {
130 if (fieldName.Length > 0)
131 {
132 output.Append(fieldName);
133 output.Append(": ");
134 }
135
136 if (bytes[bytes.Length - 1] == 0x00)
137 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1));
138 else
139 output.Append(UTF8Encoding.UTF8.GetString(bytes));
140 }
141 else
142 {
143 for (int i = 0; i < bytes.Length; i += 16)
144 {
145 if (i != 0)
146 output.Append(Environment.NewLine);
147 if (fieldName.Length > 0)
148 {
149 output.Append(fieldName);
150 output.Append(": ");
151 }
152
153 for (int j = 0; j < 16; j++)
154 {
155 if ((i + j) < bytes.Length)
156 output.Append(String.Format("{0:X2} ", bytes[i + j]));
157 else
158 output.Append(" ");
159 }
160
161 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++)
162 {
163 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E)
164 output.Append((char)bytes[i + j]);
165 else
166 output.Append(".");
167 }
168 }
169 }
170
171 return output.ToString();
172 }
173 public Util()
174 {
175
176 }
177 }
178}