Small clean up of files and directories

0.1-prestable
MW 2007-04-25 13:03:48 +00:00
parent 46eaa79cd9
commit f7b51d63a8
56 changed files with 515 additions and 594 deletions

View File

@ -43,84 +43,101 @@ namespace OpenGridServices.GridServer
{
/// <summary>
/// </summary>
public class SimProfileManager {
public class SimProfileManager
{
public Dictionary<LLUUID, SimProfileBase> SimProfiles = new Dictionary<LLUUID, SimProfileBase>();
private OpenGrid_Main m_gridManager;
public SimProfileManager(OpenGrid_Main gridManager) {
public SimProfileManager(OpenGrid_Main gridManager)
{
m_gridManager = gridManager;
}
public void LoadProfiles() { // should abstract this out
public void LoadProfiles()
{ // should abstract this out
IObjectContainer db;
db = Db4oFactory.OpenFile("simprofiles.yap");
IObjectSet result = db.Get(typeof(SimProfileBase));
foreach (SimProfileBase simprof in result) {
foreach (SimProfileBase simprof in result)
{
SimProfiles.Add(simprof.UUID, simprof);
}
MainConsole.Instance.WriteLine("SimProfiles.Cs:LoadProfiles() - Successfully loaded " + result.Count.ToString() + " from database");
db.Close();
}
public SimProfileBase GetProfileByHandle(ulong reqhandle) {
foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys) {
if(SimProfiles[UUID].regionhandle==reqhandle) return SimProfiles[UUID];
public SimProfileBase GetProfileByHandle(ulong reqhandle)
{
foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys)
{
if (SimProfiles[UUID].regionhandle == reqhandle) return SimProfiles[UUID];
}
return null;
}
public SimProfileBase GetProfileByLLUUID(LLUUID ProfileLLUUID) {
foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys) {
if(SimProfiles[UUID].UUID==ProfileLLUUID) return SimProfiles[UUID];
public SimProfileBase GetProfileByLLUUID(LLUUID ProfileLLUUID)
{
foreach (libsecondlife.LLUUID UUID in SimProfiles.Keys)
{
if (SimProfiles[UUID].UUID == ProfileLLUUID) return SimProfiles[UUID];
}
return null;
}
public bool AuthenticateSim(LLUUID RegionUUID, uint regionhandle, string simrecvkey) {
SimProfileBase TheSim=GetProfileByHandle(regionhandle);
if(TheSim != null)
if(TheSim.recvkey==simrecvkey) {
public bool AuthenticateSim(LLUUID RegionUUID, uint regionhandle, string simrecvkey)
{
SimProfileBase TheSim = GetProfileByHandle(regionhandle);
if (TheSim != null)
if (TheSim.recvkey == simrecvkey)
{
return true;
} else {
}
else
{
return false;
} else return false;
}
else return false;
}
public string GetXMLNeighbours(ulong reqhandle) {
string response="";
public string GetXMLNeighbours(ulong reqhandle)
{
string response = "";
SimProfileBase central_region = GetProfileByHandle(reqhandle);
SimProfileBase neighbour;
for(int x=-1; x<2; x++) for(int y=-1; y<2; y++) {
if(GetProfileByHandle(Util.UIntsToLong((uint)((central_region.RegionLocX+x)*256), (uint)(central_region.RegionLocY+y)*256))!=null) {
neighbour=GetProfileByHandle(Util.UIntsToLong((uint)((central_region.RegionLocX+x)*256), (uint)(central_region.RegionLocY+y)*256));
response+="<neighbour>";
response+="<sim_ip>" + neighbour.sim_ip + "</sim_ip>";
response+="<sim_port>" + neighbour.sim_port.ToString() + "</sim_port>";
response+="<locx>" + neighbour.RegionLocX.ToString() + "</locx>";
response+="<locy>" + neighbour.RegionLocY.ToString() + "</locy>";
response+="<regionhandle>" + neighbour.regionhandle.ToString() + "</regionhandle>";
response+="</neighbour>";
for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++)
{
if (GetProfileByHandle(Util.UIntsToLong((uint)((central_region.RegionLocX + x) * 256), (uint)(central_region.RegionLocY + y) * 256)) != null)
{
neighbour = GetProfileByHandle(Util.UIntsToLong((uint)((central_region.RegionLocX + x) * 256), (uint)(central_region.RegionLocY + y) * 256));
response += "<neighbour>";
response += "<sim_ip>" + neighbour.sim_ip + "</sim_ip>";
response += "<sim_port>" + neighbour.sim_port.ToString() + "</sim_port>";
response += "<locx>" + neighbour.RegionLocX.ToString() + "</locx>";
response += "<locy>" + neighbour.RegionLocY.ToString() + "</locy>";
response += "<regionhandle>" + neighbour.regionhandle.ToString() + "</regionhandle>";
response += "</neighbour>";
}
}
return response;
}
public SimProfileBase CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey) {
public SimProfileBase CreateNewProfile(string regionname, string caps_url, string sim_ip, uint sim_port, uint RegionLocX, uint RegionLocY, string sendkey, string recvkey)
{
SimProfileBase newprofile = new SimProfileBase();
newprofile.regionname=regionname;
newprofile.sim_ip=sim_ip;
newprofile.sim_port=sim_port;
newprofile.RegionLocX=RegionLocX;
newprofile.RegionLocY=RegionLocY;
newprofile.caps_url="http://" + sim_ip + ":9000/";
newprofile.sendkey=sendkey;
newprofile.recvkey=recvkey;
newprofile.regionhandle=Util.UIntsToLong((RegionLocX*256), (RegionLocY*256));
newprofile.UUID=LLUUID.Random();
this.SimProfiles.Add(newprofile.UUID,newprofile);
newprofile.regionname = regionname;
newprofile.sim_ip = sim_ip;
newprofile.sim_port = sim_port;
newprofile.RegionLocX = RegionLocX;
newprofile.RegionLocY = RegionLocY;
newprofile.caps_url = "http://" + sim_ip + ":9000/";
newprofile.sendkey = sendkey;
newprofile.recvkey = recvkey;
newprofile.regionhandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
newprofile.UUID = LLUUID.Random();
this.SimProfiles.Add(newprofile.UUID, newprofile);
return newprofile;
}
@ -166,7 +183,7 @@ namespace OpenGridServices.GridServer
NeighbourBlock["region_locy"] = neighbour.RegionLocY.ToString();
NeighbourBlock["UUID"] = neighbour.UUID.ToString();
if(neighbour.UUID!=TheSim.UUID) SimNeighboursData.Add(NeighbourBlock);
if (neighbour.UUID != TheSim.UUID) SimNeighboursData.Add(NeighbourBlock);
}
}
@ -196,15 +213,16 @@ namespace OpenGridServices.GridServer
Console.WriteLine("SimProfiles.cs:RestSetSimMethod() - processing request......");
SimProfileBase TheSim;
TheSim = GetProfileByLLUUID(new LLUUID(param));
if ((TheSim) == null) {
if ((TheSim) == null)
{
TheSim = new SimProfileBase();
LLUUID UUID = new LLUUID(param);
TheSim.UUID=UUID;
TheSim.UUID = UUID;
}
XmlDocument doc = new XmlDocument();
doc.LoadXml(request);
XmlNode rootnode=doc.FirstChild;
XmlNode rootnode = doc.FirstChild;
XmlNode authkeynode = rootnode.ChildNodes[0];
if (authkeynode.Name != "authkey")
{
@ -221,8 +239,10 @@ namespace OpenGridServices.GridServer
{
return "ERROR! invalid key";
}
for (int i = 0; i < simnode.ChildNodes.Count; i++) {
switch (simnode.ChildNodes[i].Name) {
for (int i = 0; i < simnode.ChildNodes.Count; i++)
{
switch (simnode.ChildNodes[i].Name)
{
case "regionname":
TheSim.regionname = simnode.ChildNodes[i].InnerText;
break;
@ -247,32 +267,35 @@ namespace OpenGridServices.GridServer
}
}
try {
try
{
SimProfiles.Add(TheSim.UUID, TheSim);
IObjectContainer db;
db = Db4oFactory.OpenFile("simprofiles.yap");
db.Set(TheSim);
db.Close();
return "OK";
} catch(Exception e) {
}
catch (Exception e)
{
return "ERROR! could not save to database!";
}
}
public string RestGetRegionMethod(string request, string path, string param )
public string RestGetRegionMethod(string request, string path, string param)
{
SimProfileBase TheSim = GetProfileByHandle((ulong)Convert.ToUInt64(param));
return RestGetSimMethod("", "/sims/", param);
}
public string RestSetRegionMethod(string request, string path, string param )
public string RestSetRegionMethod(string request, string path, string param)
{
SimProfileBase TheSim = GetProfileByHandle((ulong)Convert.ToUInt64(param));
return RestSetSimMethod("", "/sims/", param);
}
public string RestGetSimMethod(string request, string path, string param )
public string RestGetSimMethod(string request, string path, string param)
{
string respstring = String.Empty;

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Inventory
{

View File

@ -30,7 +30,7 @@ using System.Net.Sockets;
using System.IO;
using System.Threading;
using libsecondlife;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Interfaces
{

View File

@ -34,6 +34,7 @@ using System.Net.Sockets;
using System.IO;
using libsecondlife;
using OpenSim;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Interfaces
{

View File

@ -27,7 +27,7 @@
using System;
using libsecondlife;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Interfaces
{

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Interfaces
{

View File

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Interfaces
{

View File

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Interfaces
{

View File

@ -78,72 +78,18 @@
<ItemGroup>
</ItemGroup>
<ItemGroup>
<Compile Include="AgentCiruitData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="AgentInventory.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="AssetBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="BlockingQueue.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="HeightMapGenHills.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IAssetServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IGenericConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IGridConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IGridServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ILocalStorage.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IScriptAPI.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IScriptEngine.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IUserConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IUserServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="LocalGridBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Login.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="LoginService.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="NeighbourInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="OSVector3.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="PrimData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="RemoteGridBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SimProfile.cs">
<SubType>Code</SubType>
</Compile>
@ -162,9 +108,63 @@
<Compile Include="Util.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IAssetServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IGenericConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IGridConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IGridServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\ILocalStorage.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IScriptAPI.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IScriptEngine.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IUserConfig.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\IUserServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\LocalGridBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Interfaces\RemoteGridBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AgentCiruitData.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\AssetBase.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\Login.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\NeighbourInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\OSVector3.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Types\PrimData.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>

View File

@ -11,35 +11,35 @@
<resources prefix="OpenSim.Framework" dynamicprefix="true" >
</resources>
<sources failonempty="true">
<include name="AgentCiruitData.cs" />
<include name="AgentInventory.cs" />
<include name="AssetBase.cs" />
<include name="BlockingQueue.cs" />
<include name="HeightMapGenHills.cs" />
<include name="IAssetServer.cs" />
<include name="IConfig.cs" />
<include name="IGenericConfig.cs" />
<include name="IGridConfig.cs" />
<include name="IGridServer.cs" />
<include name="ILocalStorage.cs" />
<include name="IScriptAPI.cs" />
<include name="IScriptEngine.cs" />
<include name="IUserConfig.cs" />
<include name="IUserServer.cs" />
<include name="LocalGridBase.cs" />
<include name="Login.cs" />
<include name="LoginService.cs" />
<include name="NeighbourInfo.cs" />
<include name="OSVector3.cs" />
<include name="PrimData.cs" />
<include name="RemoteGridBase.cs" />
<include name="SimProfile.cs" />
<include name="SimProfileBase.cs" />
<include name="UserProfile.cs" />
<include name="UserProfileManager.cs" />
<include name="UserProfileManagerBase.cs" />
<include name="Util.cs" />
<include name="Interfaces/IAssetServer.cs" />
<include name="Interfaces/IConfig.cs" />
<include name="Interfaces/IGenericConfig.cs" />
<include name="Interfaces/IGridConfig.cs" />
<include name="Interfaces/IGridServer.cs" />
<include name="Interfaces/ILocalStorage.cs" />
<include name="Interfaces/IScriptAPI.cs" />
<include name="Interfaces/IScriptEngine.cs" />
<include name="Interfaces/IUserConfig.cs" />
<include name="Interfaces/IUserServer.cs" />
<include name="Interfaces/LocalGridBase.cs" />
<include name="Interfaces/RemoteGridBase.cs" />
<include name="Properties/AssemblyInfo.cs" />
<include name="Types/AgentCiruitData.cs" />
<include name="Types/AssetBase.cs" />
<include name="Types/Login.cs" />
<include name="Types/NeighbourInfo.cs" />
<include name="Types/OSVector3.cs" />
<include name="Types/PrimData.cs" />
</sources>
<references basedir="${project::get-base-directory()}">
<lib>

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using libsecondlife;
namespace OpenSim.Framework.Interfaces
namespace OpenSim.Framework.Types
{
public class AgentCircuitData
{

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using libsecondlife;
namespace OpenSim.Framework.Assets
namespace OpenSim.Framework.Types
{
public class AssetBase
{

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using libsecondlife;
namespace OpenSim.Framework.Interfaces
namespace OpenSim.Framework.Types
{
public class Login
{

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Framework.Interfaces
namespace OpenSim.Framework.Types
{
public class NeighbourInfo
{

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Framework
namespace OpenSim.Framework.Types
{
public class OSVector3
{

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using libsecondlife;
namespace OpenSim.Framework.Assets
namespace OpenSim.Framework.Types
{
public class PrimData
{

View File

@ -103,7 +103,8 @@ namespace OpenSim.Framework.User
newprofile.firstname = firstname;
newprofile.lastname = lastname;
newprofile.MD5passwd = MD5passwd;
newprofile.UUID = LLUUID.Random(); newprofile.Inventory.CreateRootFolder(newprofile.UUID, true);
newprofile.UUID = LLUUID.Random();
newprofile.Inventory.CreateRootFolder(newprofile.UUID, true);
this.UserProfiles.Add(newprofile.UUID, newprofile);
return newprofile;
}

View File

@ -4,7 +4,7 @@ using System.Text;
using System.Threading;
using System.IO;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using libsecondlife;
using Db4objects.Db4o;

View File

@ -29,7 +29,7 @@ using System.Collections.Generic;
using System.Threading;
using System.IO;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using libsecondlife;
using Db4objects.Db4o;
using Db4objects.Db4o.Query;

View File

@ -7,7 +7,7 @@ using System.Net.Sockets;
using System.IO;
using libsecondlife;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
namespace OpenSim.GridInterfaces.Remote

View File

@ -34,7 +34,7 @@ using System.IO;
using libsecondlife;
using Nwc.XmlRpc;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
namespace OpenSim.GridInterfaces.Remote
{

View File

@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Assets;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using libsecondlife;
using libsecondlife.Packets;

View File

@ -32,7 +32,7 @@ using libsecondlife;
using libsecondlife.Packets;
using OpenSim;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
namespace OpenSim.Assets

View File

@ -32,7 +32,7 @@ using OpenSim;
using libsecondlife.Packets;
//using OpenSim.GridServers;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Interfaces;
namespace OpenSim.Assets
@ -125,7 +125,7 @@ namespace OpenSim.Assets
return res;
}
public LLUUID AddNewInventoryItem(SimClient remoteClient, LLUUID folderID, OpenSim.Framework.Assets.AssetBase asset)
public LLUUID AddNewInventoryItem(SimClient remoteClient, LLUUID folderID, OpenSim.Framework.Types.AssetBase asset)
{
LLUUID newItem = null;
if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
@ -161,7 +161,7 @@ namespace OpenSim.Assets
return res;
}
public bool UpdateInventoryItemAsset(SimClient remoteClient, LLUUID itemID, OpenSim.Framework.Assets.AssetBase asset)
public bool UpdateInventoryItemAsset(SimClient remoteClient, LLUUID itemID, OpenSim.Framework.Types.AssetBase asset)
{
if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
{

View File

@ -121,9 +121,6 @@
<Compile Include="AgentAssetUpload.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ConsoleCmds.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Grid.cs">
<SubType>Code</SubType>
</Compile>
@ -145,9 +142,6 @@
<Compile Include="SimClient.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="SimConsole.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="VersionInfo.cs">
<SubType>Code</SubType>
</Compile>
@ -187,12 +181,6 @@
<Compile Include="world\Primitive2.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="world\ScriptEngine.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="world\SurfacePatch.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="world\World.cs">
<SubType>Code</SubType>
</Compile>
@ -202,9 +190,6 @@
<Compile Include="world\WorldScripting.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="world\scripting\IScript.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="world\scripting\IScriptContext.cs">
<SubType>Code</SubType>
</Compile>

View File

@ -12,7 +12,6 @@
</resources>
<sources failonempty="true">
<include name="AgentAssetUpload.cs" />
<include name="ConsoleCmds.cs" />
<include name="Grid.cs" />
<include name="OpenSimMain.cs" />
<include name="OpenSimNetworkHandler.cs" />
@ -20,7 +19,6 @@
<include name="QueItem.cs" />
<include name="RegionInfo.cs" />
<include name="SimClient.cs" />
<include name="SimConsole.cs" />
<include name="VersionInfo.cs" />
<include name="Assets/AssetCache.cs" />
<include name="Assets/InventoryCache.cs" />
@ -34,12 +32,9 @@
<include name="world/Entity.cs" />
<include name="world/Primitive.cs" />
<include name="world/Primitive2.cs" />
<include name="world/ScriptEngine.cs" />
<include name="world/SurfacePatch.cs" />
<include name="world/World.cs" />
<include name="world/WorldPacketHandlers.cs" />
<include name="world/WorldScripting.cs" />
<include name="world/scripting/IScript.cs" />
<include name="world/scripting/IScriptContext.cs" />
<include name="world/scripting/IScriptEntity.cs" />
<include name="world/scripting/IScriptHandler.cs" />

View File

@ -41,6 +41,7 @@ using libsecondlife.Packets;
using OpenSim.world;
using OpenSim.Terrain;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.UserServer;
using OpenSim.Assets;
using OpenSim.CAPS;
@ -206,7 +207,7 @@ namespace OpenSim
if (gridServer.GetName() == "Remote")
{
// should startup the OGS protocol server here
OGSServer = new OpenGridProtocolServer(8500);
//OGSServer = new OpenGridProtocolServer(8500);
// we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server
httpServer.AddXmlRPCHandler("expect_user",
@ -299,7 +300,8 @@ namespace OpenSim
m_console.WriteLine("Main.cs:Startup() - Starting HTTP server");
httpServer.Start();
if(gridServer.GetName() == "Remote") {
if (gridServer.GetName() == "Remote")
{
m_console.WriteLine("Main.cs:Startup() - Starting up OGS protocol server");
OGSServer.Start();
}
@ -523,7 +525,7 @@ namespace OpenSim
case "terrain":
string result = "";
if (!LocalWorld.Terrain.RunTerrainCmd(cmdparams,ref result))
if (!LocalWorld.Terrain.RunTerrainCmd(cmdparams, ref result))
{
m_console.WriteLine(result);
}

View File

@ -36,7 +36,7 @@ using System.IO;
using System.Threading;
using System.Timers;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Utilities;
using OpenSim.world;

View File

@ -6,7 +6,7 @@ using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Interfaces;
using OpenSim.Physics.Manager;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
namespace OpenSim.world
{

View File

@ -6,7 +6,7 @@ using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Interfaces;
using OpenSim.Physics.Manager;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Inventory;
namespace OpenSim.world

View File

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.world
{
public class ScriptEngine
{
public ScriptEngine(World env)
{
}
public void LoadScript()
{
}
}
}

View File

@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.world
{
public class SurfacePatch
{
public float[] HeightMap;
public SurfacePatch() {
HeightMap = new float[16*16];
int xinc;
int yinc;
for(xinc=0; xinc<16; xinc++) for(yinc=0; yinc<16; yinc++) {
HeightMap[xinc+(yinc*16)]=100.0f;
}
}
}
}

View File

@ -8,11 +8,11 @@ using System.IO;
using System.Threading;
using OpenSim.Physics.Manager;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Terrain;
using OpenSim.Framework.Inventory;
using OpenSim.Assets;
using OpenSim.world.scripting;
//using OpenSim.world.scripting;
using OpenSim.RegionServer.world.scripting;
using OpenSim.RegionServer.world.scripting.Scripts;
using OpenSim.Terrain;
@ -25,7 +25,7 @@ namespace OpenSim.world
public Dictionary<libsecondlife.LLUUID, Entity> Entities;
public Dictionary<libsecondlife.LLUUID, Avatar> Avatars;
public Dictionary<libsecondlife.LLUUID, Primitive> Prims;
public ScriptEngine Scripts;
//public ScriptEngine Scripts;
public TerrainEngine Terrain; //TODO: Replace TerrainManager with this.
public uint _localNumber = 0;
private PhysicsScene phyScene;

View File

@ -5,7 +5,7 @@ using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Physics.Manager;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Terrain;
using OpenSim.Framework.Inventory;
using OpenSim.Assets;

View File

@ -5,6 +5,7 @@ using System.IO;
using System.Reflection;
using OpenSim.Framework;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using libsecondlife;
namespace OpenSim.world

View File

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.world.scripting
{
public interface IScriptHost {
bool Register(IScript iscript);
}
public interface IScript
{
string Name{get;set;}
IScriptHost Host{get;set;}
void Show();
}
}

View File

@ -5,6 +5,7 @@ using OpenSim.Scripting.EmbeddedJVM.Types;
using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework;
using OpenSim.Framework.Types;
namespace OpenSim.Scripting.EmbeddedJVM
{

View File

@ -33,6 +33,7 @@ using OpenSim.Framework.User;
using OpenSim.Framework.Grid;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using libsecondlife;
namespace OpenSim.UserServer

View File

@ -43,6 +43,7 @@ using OpenSim.Framework.Grid;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.User;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Types;
namespace OpenSim.UserServer
{

View File

@ -20,27 +20,31 @@ namespace OpenSim.Servers
private int m_port;
private ArrayList m_clients;
private class ClientHandler {
private class ClientHandler
{
private Thread m_clientThread;
private Socket m_socketHandle;
public ClientHandler(Socket clientSocketHandle) {
m_socketHandle=clientSocketHandle;
public ClientHandler(Socket clientSocketHandle)
{
m_socketHandle = clientSocketHandle;
m_clientThread = new Thread(new ThreadStart(DoWork));
m_clientThread.IsBackground = true;
m_clientThread.Start();
}
private void DoWork() {
private void DoWork()
{
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("OpenGridProtocol.cs: ClientHandler.DoWork() - Got new client");
this.WriteLine("OpenSim 0.1, running OGS protocol 1.0");
}
private void WriteLine(string theline) {
theline+="\n";
private void WriteLine(string theline)
{
theline += "\n";
byte[] thelinebuffer = System.Text.Encoding.ASCII.GetBytes(theline.ToCharArray());
m_socketHandle.Send(thelinebuffer,theline.Length,0);
m_socketHandle.Send(thelinebuffer, theline.Length, 0);
}
}
@ -75,7 +79,8 @@ namespace OpenSim.Servers
while (true)
{
sockethandle = m_listenerSocket.Accept();
lock(m_clients.SyncRoot) {
lock (m_clients.SyncRoot)
{
m_clients.Add(new OpenGridProtocolServer.ClientHandler(sockethandle));
}
}

View File

@ -33,7 +33,7 @@ using System.Collections.Generic;
using System.Data;
using libsecondlife;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Terrain;
using BerkeleyDb;
using Kds.Serialization;

View File

@ -30,7 +30,7 @@ using Db4objects.Db4o;
using Db4objects.Db4o.Query;
using libsecondlife;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Terrain;
namespace OpenSim.Storage.LocalStorageDb4o

View File

@ -5,7 +5,7 @@ using Db4objects.Db4o;
using Db4objects.Db4o.Query;
using libsecondlife;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
namespace OpenSim.Storage.LocalStorageDb4o
{

View File

@ -34,7 +34,7 @@ using System.Data;
using System.Data.SQLite;
using libsecondlife;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Terrain;
namespace OpenSim.Storage.LocalStorageSQLite

View File

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
# Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.RegionServer", "OpenSim.RegionServer\OpenSim.RegionServer.csproj", "{632E1BFD-0000-0000-0000-000000000000}"
@ -47,48 +47,6 @@ Global
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
({632E1BFD-0000-0000-0000-000000000000}).5 = ({2270B8FE-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).8 = ({E88EF749-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).9 = ({8BE16150-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).10 = ({8BB20F0A-0000-0000-0000-000000000000})
({63A05FE9-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
({EE9E5D96-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
({EE9E5D96-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).7 = ({8BE16150-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).8 = ({8BB20F0A-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).9 = ({632E1BFD-0000-0000-0000-000000000000})
({E88EF749-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({8BE16150-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({8BE16150-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({97A82740-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).5 = ({8BB20F0A-0000-0000-0000-000000000000})
({4F874463-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
({B0027747-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
({B0027747-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
({988F0AC4-0000-0000-0000-000000000000}).3 = ({8BE16150-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
({E1B79ECF-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
({E1B79ECF-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
({6B20B603-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
({6B20B603-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
({7E494328-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
({7E494328-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
({546099CD-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
({546099CD-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).5 = ({8BB20F0A-0000-0000-0000-000000000000})
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU