aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorlbsa712007-06-29 13:51:21 +0000
committerlbsa712007-06-29 13:51:21 +0000
commitf6deaf8a65693d022f58961a007f2492c9ac97fa (patch)
tree7428eccc93a3f64f46e08d7269bc337f3d26d8a8 /OpenSim
parentDeleted some files that are no longer in use. (I am sure I deleted these yest... (diff)
parent*Hopefully fixed the empty dialog box error on client when logging in on sand... (diff)
downloadopensim-SC-f6deaf8a65693d022f58961a007f2492c9ac97fa.zip
opensim-SC-f6deaf8a65693d022f58961a007f2492c9ac97fa.tar.gz
opensim-SC-f6deaf8a65693d022f58961a007f2492c9ac97fa.tar.bz2
opensim-SC-f6deaf8a65693d022f58961a007f2492c9ac97fa.tar.xz
Switched in NameSpaceChanges
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs70
-rw-r--r--OpenSim/Framework/Communications/IGridServices.cs51
-rw-r--r--OpenSim/Framework/Communications/IInterRegionCommunications.cs41
-rw-r--r--OpenSim/Framework/Communications/IUserServices.cs47
-rw-r--r--OpenSim/Framework/Communications/OpenSim.Framework.Communications.csproj112
-rw-r--r--OpenSim/Framework/Communications/OpenSim.Framework.Communications.dll.build47
-rw-r--r--OpenSim/Framework/Communications/Properties/AssemblyInfo.cs62
-rw-r--r--OpenSim/Framework/Console/AssemblyInfo.cs58
-rw-r--r--OpenSim/Framework/Console/ConsoleCallbacksBase.cs39
-rw-r--r--OpenSim/Framework/Console/LogBase.cs238
-rw-r--r--OpenSim/Framework/Console/MainLog.cs49
-rw-r--r--OpenSim/Framework/Console/OpenSim.Framework.Console.csproj89
-rw-r--r--OpenSim/Framework/Console/OpenSim.Framework.Console.dll.build (renamed from OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build)16
-rw-r--r--OpenSim/Framework/Data.DB4o/DB4oGridData.cs166
-rw-r--r--OpenSim/Framework/Data.DB4o/DB4oManager.cs165
-rw-r--r--OpenSim/Framework/Data.DB4o/DB4oUserData.cs205
-rw-r--r--OpenSim/Framework/Data.DB4o/OpenSim.Framework.Data.DB4o.csproj111
-rw-r--r--OpenSim/Framework/Data.DB4o/OpenSim.Framework.Data.DB4o.dll.build47
-rw-r--r--OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs192
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLManager.cs214
-rw-r--r--OpenSim/Framework/Data.MSSQL/OpenSim.Framework.Data.MSSQL.csproj104
-rw-r--r--OpenSim/Framework/Data.MSSQL/OpenSim.Framework.Data.MSSQL.dll.build45
-rw-r--r--OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLGridData.cs285
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs309
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLLogData.cs107
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLManager.cs609
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLUserData.cs257
-rw-r--r--OpenSim/Framework/Data.MySQL/OpenSim.Framework.Data.MySQL.csproj117
-rw-r--r--OpenSim/Framework/Data.MySQL/OpenSim.Framework.Data.MySQL.dll.build49
-rw-r--r--OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/Framework/Data.SQLite/OpenSim.Framework.Data.SQLite.csproj108
-rw-r--r--OpenSim/Framework/Data.SQLite/OpenSim.Framework.Data.SQLite.dll.build46
-rw-r--r--OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteGridData.cs195
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteManager.cs209
-rw-r--r--OpenSim/Framework/Data/GridData.cs113
-rw-r--r--OpenSim/Framework/Data/ILogData.cs94
-rw-r--r--OpenSim/Framework/Data/IniConfig.cs100
-rw-r--r--OpenSim/Framework/Data/InventoryData.cs187
-rw-r--r--OpenSim/Framework/Data/OpenSim.Framework.Data.csproj116
-rw-r--r--OpenSim/Framework/Data/OpenSim.Framework.Data.dll.build50
-rw-r--r--OpenSim/Framework/Data/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/Framework/Data/ReservationData.cs51
-rw-r--r--OpenSim/Framework/Data/SimProfileData.cs114
-rw-r--r--OpenSim/Framework/Data/UserData.cs131
-rw-r--r--OpenSim/Framework/Data/UserProfileData.cs182
-rw-r--r--OpenSim/Framework/General/AgentInventory.cs267
-rw-r--r--OpenSim/Framework/General/AuthenticateSessionBase.cs132
-rw-r--r--OpenSim/Framework/General/BlockingQueue.cs60
-rw-r--r--OpenSim/Framework/General/IRegionCommsListener.cs47
-rw-r--r--OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs51
-rw-r--r--OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs42
-rw-r--r--OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs63
-rw-r--r--OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs57
-rw-r--r--OpenSim/Framework/General/Interfaces/IAssetServer.cs69
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs164
-rw-r--r--OpenSim/Framework/General/Interfaces/ILocalStorage.cs69
-rw-r--r--OpenSim/Framework/General/Interfaces/IUserServer.cs42
-rw-r--r--OpenSim/Framework/General/Interfaces/IWorld.cs45
-rw-r--r--OpenSim/Framework/General/Logger.cs85
-rw-r--r--OpenSim/Framework/General/LoginService.cs41
-rw-r--r--OpenSim/Framework/General/OpenSim.Framework.csproj204
-rw-r--r--OpenSim/Framework/General/OpenSim.Framework.dll.build78
-rw-r--r--OpenSim/Framework/General/Properties/AssemblyInfo.cs33
-rw-r--r--OpenSim/Framework/General/RegionCommsListener.cs70
-rw-r--r--OpenSim/Framework/General/Remoting.cs136
-rw-r--r--OpenSim/Framework/General/SimProfile.cs122
-rw-r--r--OpenSim/Framework/General/Types/AgentCiruitData.cs50
-rw-r--r--OpenSim/Framework/General/Types/AgentWearable.cs60
-rw-r--r--OpenSim/Framework/General/Types/AssetBase.cs49
-rw-r--r--OpenSim/Framework/General/Types/AssetLandmark.cs61
-rw-r--r--OpenSim/Framework/General/Types/AssetStorage.cs50
-rw-r--r--OpenSim/Framework/General/Types/EstateSettings.cs97
-rw-r--r--OpenSim/Framework/General/Types/Login.cs52
-rw-r--r--OpenSim/Framework/General/Types/MapBlockData.cs25
-rw-r--r--OpenSim/Framework/General/Types/NeighbourInfo.cs50
-rw-r--r--OpenSim/Framework/General/Types/NetworkServersInfo.cs220
-rw-r--r--OpenSim/Framework/General/Types/ParcelData.cs115
-rw-r--r--OpenSim/Framework/General/Types/PrimData.cs230
-rw-r--r--OpenSim/Framework/General/Types/RegionHandle.cs120
-rw-r--r--OpenSim/Framework/General/Types/RegionInfo.cs304
-rw-r--r--OpenSim/Framework/General/UserProfile.cs89
-rw-r--r--OpenSim/Framework/General/Util.cs186
-rw-r--r--OpenSim/Framework/GenericConfig/Xml/OpenSim.Framework.GenericConfig.Xml.csproj93
-rw-r--r--OpenSim/Framework/GenericConfig/Xml/OpenSim.Framework.GenericConfig.Xml.dll.build42
-rw-r--r--OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs123
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs311
-rw-r--r--OpenSim/Framework/Servers/CheckSumServer.cs141
-rw-r--r--OpenSim/Framework/Servers/IRestHandler.cs35
-rw-r--r--OpenSim/Framework/Servers/OpenSim.Framework.Servers.csproj116
-rw-r--r--OpenSim/Framework/Servers/OpenSim.Framework.Servers.dll.build (renamed from OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build)11
-rw-r--r--OpenSim/Framework/Servers/UDPServerBase.cs95
-rw-r--r--OpenSim/Framework/Servers/XmlRpcMethod.cs34
-rw-r--r--OpenSim/Framework/UserManager/LoginResponse.cs646
-rw-r--r--OpenSim/Framework/UserManager/OpenSim.Framework.UserManagement.csproj125
-rw-r--r--OpenSim/Framework/UserManager/OpenSim.Framework.UserManagement.dll.build50
-rw-r--r--OpenSim/Framework/UserManager/UserManagerBase.cs634
-rw-r--r--OpenSim/Grid/AssetServer/AssetHttpServer.cs130
-rw-r--r--OpenSim/Grid/AssetServer/Main.cs337
-rw-r--r--OpenSim/Grid/AssetServer/OpenSim.Grid.AssetServer.csproj118
-rw-r--r--OpenSim/Grid/AssetServer/OpenSim.Grid.AssetServer.exe.build49
-rw-r--r--OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs60
-rw-r--r--OpenSim/Grid/Framework.Manager/GridManagementAgent.cs140
-rw-r--r--OpenSim/Grid/Framework.Manager/GridServerManager.cs94
-rw-r--r--OpenSim/Grid/Framework.Manager/OpenSim.Grid.Framework.Manager.csproj99
-rw-r--r--OpenSim/Grid/Framework.Manager/OpenSim.Grid.Framework.Manager.dll.build (renamed from OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build)21
-rw-r--r--OpenSim/Grid/GridServer.Config/AssemblyInfo.cs58
-rw-r--r--OpenSim/Grid/GridServer.Config/DbGridConfig.cs161
-rw-r--r--OpenSim/Grid/GridServer.Config/OpenSim.Grid.GridServer.Config.csproj107
-rw-r--r--OpenSim/Grid/GridServer.Config/OpenSim.Grid.GridServer.Config.dll.build (renamed from OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build)11
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs599
-rw-r--r--OpenSim/Grid/GridServer/Main.cs271
-rw-r--r--OpenSim/Grid/GridServer/OpenSim.Grid.GridServer.csproj134
-rw-r--r--OpenSim/Grid/GridServer/OpenSim.Grid.GridServer.exe.build (renamed from OpenSim/Examples/SimpleApp/SimpleApp.exe.build)26
-rw-r--r--OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs60
-rw-r--r--OpenSim/Grid/InventoryServer/InventoryManager.cs125
-rw-r--r--OpenSim/Grid/InventoryServer/Main.cs (renamed from OpenSim/OpenSim.Region/Scenes/SceneEvents.cs)68
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager.mds16
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager.userprefs39
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager.usertasks2
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/AssemblyInfo.cs32
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/BlockingQueue.cs33
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/Connect to grid server.cs16
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs29
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs106
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs96
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/MainWindow.cs76
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp43
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidbbin0 -> 12308 bytes
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/RegionBlock.cs37
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs133
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs226
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs256
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs35
-rw-r--r--OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/gui.stetic502
-rw-r--r--OpenSim/Grid/UserServer.Config/AssemblyInfo.cs58
-rw-r--r--OpenSim/Grid/UserServer.Config/DbUserConfig.cs96
-rw-r--r--OpenSim/Grid/UserServer.Config/OpenSim.Grid.UserServer.Config.csproj107
-rw-r--r--OpenSim/Grid/UserServer.Config/OpenSim.Grid.UserServer.Config.dll.build (renamed from OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build)14
-rw-r--r--OpenSim/Grid/UserServer/Main.cs219
-rw-r--r--OpenSim/Grid/UserServer/OpenSim.Grid.UserServer.csproj134
-rw-r--r--OpenSim/Grid/UserServer/OpenSim.Grid.UserServer.exe.build52
-rw-r--r--OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs33
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs104
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs184
-rw-r--r--OpenSim/OpenSim.Region/Scenes/scripting/Engines/JSharpScriptEngine.cs104
-rw-r--r--OpenSim/Region/Application/Application.cs (renamed from OpenSim/OpenSim/Application.cs)3
-rw-r--r--OpenSim/Region/Application/OpenSim.csproj (renamed from OpenSim/OpenSim/OpenSim.csproj)101
-rw-r--r--OpenSim/Region/Application/OpenSim.exe.build60
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs (renamed from OpenSim/OpenSim/OpenSimMain.cs)62
-rw-r--r--OpenSim/Region/Application/VersionInfo.cs (renamed from OpenSim/OpenSim.RegionServer/VersionInfo.cs)0
-rw-r--r--OpenSim/Region/Caches/AssetCache.cs (renamed from OpenSim/OpenSim.Caches/AssetCache.cs)2
-rw-r--r--OpenSim/Region/Caches/OpenSim.Region.Caches.csproj (renamed from OpenSim/OpenSim.Caches/OpenSim.Caches.csproj)14
-rw-r--r--OpenSim/Region/Caches/OpenSim.Region.Caches.dll.build (renamed from OpenSim/OpenSim.Caches/OpenSim.Caches.dll.build)14
-rw-r--r--OpenSim/Region/Caches/Properties/AssemblyInfo.cs (renamed from OpenSim/OpenSim.Caches/Properties/AssemblyInfo.cs)4
-rw-r--r--OpenSim/Region/Capabilities/Caps.cs (renamed from OpenSim/OpenSim.Region/Caps.cs)41
-rw-r--r--OpenSim/Region/Capabilities/LLSDArray.cs45
-rw-r--r--OpenSim/Region/Capabilities/LLSDCapEvent.cs45
-rw-r--r--OpenSim/Region/Capabilities/LLSDCapsDetails.cs19
-rw-r--r--OpenSim/Region/Capabilities/LLSDEmpty.cs42
-rw-r--r--OpenSim/Region/Capabilities/LLSDHelpers.cs165
-rw-r--r--OpenSim/Region/Capabilities/LLSDMapLayer.cs50
-rw-r--r--OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs45
-rw-r--r--OpenSim/Region/Capabilities/LLSDMapRequest.cs17
-rw-r--r--OpenSim/Region/Capabilities/LLSDTest.cs45
-rw-r--r--OpenSim/Region/Capabilities/LLSDType.cs53
-rw-r--r--OpenSim/Region/Capabilities/LLSDUploadReply.cs47
-rw-r--r--OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj143
-rw-r--r--OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build56
-rw-r--r--OpenSim/Region/ClientStack/Assets/InventoryCache.cs (renamed from OpenSim/OpenSim.RegionServer/Assets/InventoryCache.cs)1
-rw-r--r--OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs (renamed from OpenSim/OpenSim.RegionServer/ClientStackNetworkHandler.cs)2
-rw-r--r--OpenSim/Region/ClientStack/ClientView.API.cs (renamed from OpenSim/OpenSim.RegionServer/ClientView.API.cs)5
-rw-r--r--OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs (renamed from OpenSim/OpenSim.RegionServer/ClientView.AgentAssetUpload.cs)4
-rw-r--r--OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs (renamed from OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs)4
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs (renamed from OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs)10
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs (renamed from OpenSim/OpenSim.RegionServer/ClientView.cs)4
-rw-r--r--OpenSim/Region/ClientStack/ClientViewBase.cs (renamed from OpenSim/OpenSim.RegionServer/ClientViewBase.cs)2
-rw-r--r--OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.csproj (renamed from OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj)69
-rw-r--r--OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.dll.build (renamed from OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build)33
-rw-r--r--OpenSim/Region/ClientStack/PacketServer.cs (renamed from OpenSim/OpenSim.RegionServer/PacketServer.cs)4
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs (renamed from OpenSim/OpenSim.RegionServer/RegionApplicationBase.cs)9
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs (renamed from OpenSim/OpenSim.RegionServer/UDPServer.cs)9
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs (renamed from OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs)9
-rw-r--r--OpenSim/Region/Communications/Local/LocalBackEndServices.cs (renamed from OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs)5
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs (renamed from OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs)37
-rw-r--r--OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj (renamed from OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj)36
-rw-r--r--OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build (renamed from OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.dll.build)20
-rw-r--r--OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs (renamed from OpenSim/OpenSim.LocalCommunications/Properties/AssemblyInfo.cs)4
-rw-r--r--OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs18
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs248
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs70
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs109
-rw-r--r--OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj142
-rw-r--r--OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build53
-rw-r--r--OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/Region/Environment/EstateManager.cs (renamed from OpenSim/OpenSim.Region/EstateManager.cs)8
-rw-r--r--OpenSim/Region/Environment/OpenSim.Region.Environment.csproj (renamed from OpenSim/OpenSim.Region/OpenSim.Region.csproj)83
-rw-r--r--OpenSim/Region/Environment/OpenSim.Region.Environment.dll.build (renamed from OpenSim/OpenSim.Region/OpenSim.Region.dll.build)39
-rw-r--r--OpenSim/Region/Environment/ParcelManager.cs (renamed from OpenSim/OpenSim.Region/ParcelManager.cs)8
-rw-r--r--OpenSim/Region/Environment/RegionManager.cs (renamed from OpenSim/OpenSim.Region/RegionManager.cs)7
-rw-r--r--OpenSim/Region/Environment/Scenes/Entity.cs (renamed from OpenSim/OpenSim.Region/Scenes/Entity.cs)2
-rw-r--r--OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs (renamed from OpenSim/OpenSim.Region/Scenes/IScenePresenceBody.cs)2
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive.cs (renamed from OpenSim/OpenSim.Region/Scenes/Primitive.cs)6
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs (renamed from OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs)6
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs (renamed from OpenSim/OpenSim.Region/Scenes/Scene.cs)25
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs (renamed from OpenSim/OpenSim.Region/Scenes/SceneBase.cs)6
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs52
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObject.cs (renamed from OpenSim/OpenSim.Region/Scenes/SceneObject.cs)2
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs (renamed from OpenSim/OpenSim.Region/Scenes/ScenePresence.Animations.cs)4
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs (renamed from OpenSim/OpenSim.Region/Scenes/ScenePresence.Body.cs)2
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs (renamed from OpenSim/OpenSim.Region/Scenes/ScenePresence.cs)82
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/Engines/CSharpScriptEngine.cs)2
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/Engines/JScriptEngine.cs)2
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Script.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/Script.cs)8
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/ScriptInfo.cs)4
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs (renamed from OpenSim/OpenSim.Region/Scenes/scripting/ScriptManager.cs)9
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyWorld.cs (renamed from OpenSim/Examples/SimpleApp/MyWorld.cs)16
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs (renamed from OpenSim/Examples/SimpleApp/Program.cs)11
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs (renamed from OpenSim/Examples/SimpleApp/Properties/AssemblyInfo.cs)0
-rw-r--r--OpenSim/Region/Examples/SimpleApp/SimpleApp.csproj (renamed from OpenSim/Examples/SimpleApp/SimpleApp.csproj)68
-rw-r--r--OpenSim/Region/Examples/SimpleApp/SimpleApp.exe.build (renamed from OpenSim/OpenSim/OpenSim.exe.build)44
-rw-r--r--OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs (renamed from OpenSim/OpenSim.GridInterfaces/Local/AssemblyInfo.cs)0
-rw-r--r--OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs (renamed from OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs)2
-rw-r--r--OpenSim/Region/GridInterfaces/Local/OpenSim.Region.GridInterfaces.Local.csproj (renamed from OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj)18
-rw-r--r--OpenSim/Region/GridInterfaces/Local/OpenSim.Region.GridInterfaces.Local.dll.build45
-rw-r--r--OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs (renamed from OpenSim/OpenSim.GridInterfaces/Remote/AssemblyInfo.cs)0
-rw-r--r--OpenSim/Region/GridInterfaces/Remote/OpenSim.Region.GridInterfaces.Remote.csproj (renamed from OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj)26
-rw-r--r--OpenSim/Region/GridInterfaces/Remote/OpenSim.Region.GridInterfaces.Remote.dll.build45
-rw-r--r--OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs (renamed from OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs)2
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs (renamed from OpenSim/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs)0
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs (renamed from OpenSim/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs)2
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj (renamed from OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj)18
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build42
-rw-r--r--OpenSim/Region/Physics/Manager/AssemblyInfo.cs (renamed from OpenSim/OpenSim.Physics/Manager/AssemblyInfo.cs)0
-rw-r--r--OpenSim/Region/Physics/Manager/OpenSim.Region.Physics.Manager.csproj (renamed from OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj)16
-rw-r--r--OpenSim/Region/Physics/Manager/OpenSim.Region.Physics.Manager.dll.build (renamed from OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build)16
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs (renamed from OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs)0
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsManager.cs (renamed from OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs)0
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs (renamed from OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs)0
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsVector.cs (renamed from OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs)0
-rw-r--r--OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs (renamed from OpenSim/OpenSim.Physics/OdePlugin/AssemblyInfo.cs)0
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs (renamed from OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs)2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OpenSim.Region.Physics.OdePlugin.csproj (renamed from OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj)20
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OpenSim.Region.Physics.OdePlugin.dll.build43
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs (renamed from OpenSim/OpenSim.Physics/PhysXPlugin/AssemblyInfo.cs)0
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/OpenSim.Region.Physics.PhysXPlugin.csproj (renamed from OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj)20
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/OpenSim.Region.Physics.PhysXPlugin.dll.build (renamed from OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build)16
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs (renamed from OpenSim/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs)2
-rw-r--r--OpenSim/Region/Scripting/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/Region/Scripting/Script.cs32
-rw-r--r--OpenSim/Region/Scripting/ScriptAccess.cs31
-rw-r--r--OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs (renamed from OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs)2
-rw-r--r--OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Region.Storage.LocalStorageBerkeleyDB.csproj (renamed from OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj)20
-rw-r--r--OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Region.Storage.LocalStorageBerkeleyDB.dll.build46
-rw-r--r--OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build (renamed from OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build)0
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs (renamed from OpenSim/OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs)0
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs (renamed from OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs)2
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs (renamed from OpenSim/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs)2
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj (renamed from OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj)18
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.dll.build48
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs (renamed from OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDParcelQuery.cs)2
-rw-r--r--OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs (renamed from OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDPrimQuery.cs)2
-rw-r--r--OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Region.Storage.LocalStorageSQLite.csproj (renamed from OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj)18
-rw-r--r--OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Region.Storage.LocalStorageSQLite.dll.build46
-rw-r--r--OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build (renamed from OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build)0
-rw-r--r--OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs (renamed from OpenSim/OpenSim.Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs)4
-rw-r--r--OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs (renamed from OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs)2
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/OpenSim.Region.Terrain.BasicTerrain.csproj (renamed from OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj)14
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/OpenSim.Region.Terrain.BasicTerrain.dll.build (renamed from OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build)14
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs (renamed from OpenSim/OpenSim.Terrain.BasicTerrain/Properties/AssemblyInfo.cs)4
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs (renamed from OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs)2
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs (renamed from OpenSim/OpenSim.Terrain.BasicTerrain/TerrainFilter.cs)2
275 files changed, 19587 insertions, 955 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
new file mode 100644
index 0000000..b17b37b
--- /dev/null
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -0,0 +1,70 @@
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;
30using System.Collections.Generic;
31using System.Text;
32using OpenSim.Framework;
33using OpenSim.Framework.Data;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36using libsecondlife;
37using libsecondlife.Packets;
38
39namespace OpenSim.Framework.Communications
40{
41
42 public class CommunicationsManager
43 {
44 public IUserServices UserServer;
45 public IGridServices GridServer;
46 public IInterRegionCommunications InterRegion;
47
48 public NetworkServersInfo ServersInfo;
49 public CommunicationsManager(NetworkServersInfo serversInfo)
50 {
51 ServersInfo = serversInfo;
52 }
53
54 #region Packet Handlers
55 public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
56 {
57 UserProfileData profileData = this.UserServer.GetUserProfile(uuid);
58 if (profileData != null)
59 {
60 UUIDNameReplyPacket packet = new UUIDNameReplyPacket();
61 packet.UUIDNameBlock[0].ID = profileData.UUID;
62 packet.UUIDNameBlock[0].FirstName = libsecondlife.Helpers.StringToField(profileData.username);
63 packet.UUIDNameBlock[0].LastName = libsecondlife.Helpers.StringToField(profileData.surname);
64 remote_client.OutPacket((Packet)packet);
65 }
66
67 }
68 #endregion
69 }
70}
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs
new file mode 100644
index 0000000..a4812fb
--- /dev/null
+++ b/OpenSim/Framework/Communications/IGridServices.cs
@@ -0,0 +1,51 @@
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 OpenSim.Framework.Types;
33using OpenSim.Framework;
34
35namespace OpenSim.Framework.Communications
36{
37 public class GridInfo
38 {
39 public string GridServerURI = "http://grid.deepgrid.com:8001/"; // Temporarily hardcoded.
40 public string GridServerSendKey = "badger";
41 public string GridServerRecvKey = "badger";
42 }
43
44 public interface IGridServices
45 {
46 RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo);
47 List<RegionInfo> RequestNeighbours(RegionInfo regionInfo);
48 RegionInfo RequestNeighbourInfo(ulong regionHandle);
49 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
50 }
51}
diff --git a/OpenSim/Framework/Communications/IInterRegionCommunications.cs b/OpenSim/Framework/Communications/IInterRegionCommunications.cs
new file mode 100644
index 0000000..7b0d340
--- /dev/null
+++ b/OpenSim/Framework/Communications/IInterRegionCommunications.cs
@@ -0,0 +1,41 @@
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 OpenSim.Framework.Types;
32using OpenSim.Framework;
33
34namespace OpenSim.Framework.Communications
35{
36 public interface IInterRegionCommunications
37 {
38 bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData);
39 bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position);
40 }
41}
diff --git a/OpenSim/Framework/Communications/IUserServices.cs b/OpenSim/Framework/Communications/IUserServices.cs
new file mode 100644
index 0000000..37f4942
--- /dev/null
+++ b/OpenSim/Framework/Communications/IUserServices.cs
@@ -0,0 +1,47 @@
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
33using OpenSim.Framework.Data;
34
35namespace OpenSim.Framework.Communications
36{
37 public interface IUserServices
38 {
39 UserProfileData GetUserProfile(string firstName, string lastName);
40 UserProfileData GetUserProfile(string name);
41 UserProfileData GetUserProfile(LLUUID avatarID);
42
43 UserProfileData SetupMasterUser(string firstName, string lastName);
44 UserProfileData SetupMasterUser(string firstName, string lastName, string password);
45
46 }
47}
diff --git a/OpenSim/Framework/Communications/OpenSim.Framework.Communications.csproj b/OpenSim/Framework/Communications/OpenSim.Framework.Communications.csproj
new file mode 100644
index 0000000..31ab172
--- /dev/null
+++ b/OpenSim/Framework/Communications/OpenSim.Framework.Communications.csproj
@@ -0,0 +1,112 @@
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>{CB52B7E7-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.Communications</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.Communications</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="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System" >
66 <HintPath>System.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Xml" >
70 <HintPath>System.Xml.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 </ItemGroup>
74 <ItemGroup>
75 <ProjectReference Include="..\General\OpenSim.Framework.csproj">
76 <Name>OpenSim.Framework</Name>
77 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
79 <Private>False</Private>
80 </ProjectReference>
81 <ProjectReference Include="..\Data\OpenSim.Framework.Data.csproj">
82 <Name>OpenSim.Framework.Data</Name>
83 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
84 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
85 <Private>False</Private>
86 </ProjectReference>
87 </ItemGroup>
88 <ItemGroup>
89 <Compile Include="CommunicationsManager.cs">
90 <SubType>Code</SubType>
91 </Compile>
92 <Compile Include="IGridServices.cs">
93 <SubType>Code</SubType>
94 </Compile>
95 <Compile Include="IInterRegionCommunications.cs">
96 <SubType>Code</SubType>
97 </Compile>
98 <Compile Include="IUserServices.cs">
99 <SubType>Code</SubType>
100 </Compile>
101 <Compile Include="Properties\AssemblyInfo.cs">
102 <SubType>Code</SubType>
103 </Compile>
104 </ItemGroup>
105 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
106 <PropertyGroup>
107 <PreBuildEvent>
108 </PreBuildEvent>
109 <PostBuildEvent>
110 </PostBuildEvent>
111 </PropertyGroup>
112</Project>
diff --git a/OpenSim/Framework/Communications/OpenSim.Framework.Communications.dll.build b/OpenSim/Framework/Communications/OpenSim.Framework.Communications.dll.build
new file mode 100644
index 0000000..52d29f6
--- /dev/null
+++ b/OpenSim/Framework/Communications/OpenSim.Framework.Communications.dll.build
@@ -0,0 +1,47 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.Communications" 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.Communications" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="CommunicationsManager.cs" />
15 <include name="IGridServices.cs" />
16 <include name="IInterRegionCommunications.cs" />
17 <include name="IUserServices.cs" />
18 <include name="Properties/AssemblyInfo.cs" />
19 </sources>
20 <references basedir="${project::get-base-directory()}">
21 <lib>
22 <include name="${project::get-base-directory()}" />
23 <include name="${project::get-base-directory()}/${build.dir}" />
24 </lib>
25 <include name="../../../bin/libsecondlife.dll" />
26 <include name="../../../bin/OpenSim.Framework.dll" />
27 <include name="../../../bin/OpenSim.Framework.Data.dll" />
28 <include name="System.dll" />
29 <include name="System.Xml.dll" />
30 </references>
31 </csc>
32 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
33 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
34 <copy todir="${project::get-base-directory()}/../../../bin/">
35 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
36 <include name="*.dll"/>
37 <include name="*.exe"/>
38 </fileset>
39 </copy>
40 </target>
41 <target name="clean">
42 <delete dir="${bin.dir}" failonerror="false" />
43 <delete dir="${obj.dir}" failonerror="false" />
44 </target>
45 <target name="doc" description="Creates documentation.">
46 </target>
47</project>
diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..83e7dd4
--- /dev/null
+++ b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
@@ -0,0 +1,62 @@
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// General Information about an assembly is controlled through the following
33// set of attributes. Change these attribute values to modify the information
34// associated with an assembly.
35[assembly: AssemblyTitle("OpenGrid.Framework.Communications")]
36[assembly: AssemblyDescription("")]
37[assembly: AssemblyConfiguration("")]
38[assembly: AssemblyCompany("")]
39[assembly: AssemblyProduct("OpenGrid.Framework.Communications")]
40[assembly: AssemblyCopyright("Copyright © 2007")]
41[assembly: AssemblyTrademark("")]
42[assembly: AssemblyCulture("")]
43
44// Setting ComVisible to false makes the types in this assembly not visible
45// to COM components. If you need to access a type in this assembly from
46// COM, set the ComVisible attribute to true on that type.
47[assembly: ComVisible(false)]
48
49// The following GUID is for the ID of the typelib if this project is exposed to COM
50[assembly: Guid("13e7c396-78a9-4a5c-baf2-6f980ea75d95")]
51
52// Version information for an assembly consists of the following four values:
53//
54// Major Version
55// Minor Version
56// Build Number
57// Revision
58//
59// You can specify all the values or you can default the Revision and Build Numbers
60// by using the '*' as shown below:
61[assembly: AssemblyVersion("1.0.0.0")]
62[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Console/AssemblyInfo.cs b/OpenSim/Framework/Console/AssemblyInfo.cs
new file mode 100644
index 0000000..8f715d2
--- /dev/null
+++ b/OpenSim/Framework/Console/AssemblyInfo.cs
@@ -0,0 +1,58 @@
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/OpenSim/Framework/Console/ConsoleCallbacksBase.cs b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs
new file mode 100644
index 0000000..e3847be
--- /dev/null
+++ b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs
@@ -0,0 +1,39 @@
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/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
new file mode 100644
index 0000000..1a92d8e
--- /dev/null
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -0,0 +1,238 @@
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 LogBase
45 {
46 StreamWriter Log;
47 public conscmd_callback cmdparser;
48 public string componentname;
49 private bool m_silent;
50
51 public LogBase(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
58 if( String.IsNullOrEmpty( LogFile ) )
59 {
60 LogFile = componentname + ".log";
61 }
62
63 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
64 Log = File.AppendText(LogFile);
65 Log.WriteLine("========================================================================");
66 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
67 }
68
69 public void Close()
70 {
71 Log.WriteLine("Shutdown at " + DateTime.Now.ToString());
72 Log.Close();
73 }
74
75 public void Write(string format, params object[] args)
76 {
77 Notice(format,args);
78 return;
79 }
80
81 public void WriteLine(LogPriority importance, string format, params object[] args)
82 {
83 Log.WriteLine(format, args);
84 Log.Flush();
85 if (!m_silent)
86 {
87 System.Console.WriteLine(format, args);
88 }
89 return;
90 }
91
92 public void Warn(string format, params object[] args)
93 {
94 WriteNewLine(ConsoleColor.Yellow, format, args);
95 return;
96 }
97
98 public void Notice(string format, params object[] args)
99 {
100 WriteNewLine(ConsoleColor.White, format, args);
101 return;
102 }
103
104 public void Error(string format, params object[] args)
105 {
106 WriteNewLine(ConsoleColor.Red, format, args);
107 return;
108 }
109
110 public void Verbose(string format, params object[] args)
111 {
112 WriteNewLine(ConsoleColor.Gray, format, args);
113 return;
114 }
115
116 public void Status(string format, params object[] args)
117 {
118 WriteNewLine(ConsoleColor.Blue, format, args);
119 return;
120 }
121
122 private void WriteNewLine(System.ConsoleColor color, string format, params object[] args)
123 {
124 Log.WriteLine(format, args);
125 Log.Flush();
126 if (!m_silent)
127 {
128 try
129 {
130 System.Console.ForegroundColor = color;
131 System.Console.WriteLine(format, args);
132 System.Console.ResetColor();
133 }
134 catch (System.ArgumentNullException)
135 {
136 // Some older systems dont support coloured text.
137 System.Console.WriteLine(format, args);
138 }
139 }
140 return;
141 }
142
143 public string ReadLine()
144 {
145 string TempStr = System.Console.ReadLine();
146 Log.WriteLine(TempStr);
147 return TempStr;
148 }
149
150 public int Read()
151 {
152 int TempInt = System.Console.Read();
153 Log.Write((char)TempInt);
154 return TempInt;
155 }
156
157 // Displays a prompt and waits for the user to enter a string, then returns that string
158 // Done with no echo and suitable for passwords
159 public string PasswdPrompt(string prompt)
160 {
161 // FIXME: Needs to be better abstracted
162 Log.WriteLine(prompt);
163 this.Write(prompt);
164 ConsoleColor oldfg = System.Console.ForegroundColor;
165 System.Console.ForegroundColor = System.Console.BackgroundColor;
166 string temp = System.Console.ReadLine();
167 System.Console.ForegroundColor = oldfg;
168 return temp;
169 }
170
171 // Displays a command prompt and waits for the user to enter a string, then returns that string
172 public string CmdPrompt(string prompt)
173 {
174 this.Write(String.Format("{0}: ", prompt));
175 return this.ReadLine();
176 }
177
178 // Displays a command prompt and returns a default value if the user simply presses enter
179 public string CmdPrompt(string prompt, string defaultresponse)
180 {
181 string temp = CmdPrompt(String.Format( "{0} [{1}]", prompt, defaultresponse ));
182 if (temp == "")
183 {
184 return defaultresponse;
185 }
186 else
187 {
188 return temp;
189 }
190 }
191
192 // Displays a command prompt and returns a default value, user may only enter 1 of 2 options
193 public string CmdPrompt(string prompt, string defaultresponse, string OptionA, string OptionB)
194 {
195 bool itisdone = false;
196 string temp = CmdPrompt(prompt, defaultresponse);
197 while (itisdone == false)
198 {
199 if ((temp == OptionA) || (temp == OptionB))
200 {
201 itisdone = true;
202 }
203 else
204 {
205 Notice("Valid options are " + OptionA + " or " + OptionB);
206 temp = CmdPrompt(prompt, defaultresponse);
207 }
208 }
209 return temp;
210 }
211
212 // Runs a command with a number of parameters
213 public Object RunCmd(string Cmd, string[] cmdparams)
214 {
215 cmdparser.RunCmd(Cmd, cmdparams);
216 return null;
217 }
218
219 // Shows data about something
220 public void ShowCommands(string ShowWhat)
221 {
222 cmdparser.Show(ShowWhat);
223 }
224
225 public void MainLogPrompt()
226 {
227 string[] tempstrarray;
228 string tempstr = this.CmdPrompt(this.componentname + "# ");
229 tempstrarray = tempstr.Split(' ');
230 string cmd = tempstrarray[0];
231 Array.Reverse(tempstrarray);
232 Array.Resize<string>(ref tempstrarray, tempstrarray.Length - 1);
233 Array.Reverse(tempstrarray);
234 string[] cmdparams = (string[])tempstrarray;
235 RunCmd(cmd, cmdparams);
236 }
237 }
238}
diff --git a/OpenSim/Framework/Console/MainLog.cs b/OpenSim/Framework/Console/MainLog.cs
new file mode 100644
index 0000000..d7f945e
--- /dev/null
+++ b/OpenSim/Framework/Console/MainLog.cs
@@ -0,0 +1,49 @@
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 MainLog {
33
34 private static LogBase instance;
35
36 public static LogBase Instance
37 {
38 get
39 {
40 return instance;
41 }
42 set
43 {
44 instance = value;
45 }
46 }
47 }
48
49}
diff --git a/OpenSim/Framework/Console/OpenSim.Framework.Console.csproj b/OpenSim/Framework/Console/OpenSim.Framework.Console.csproj
new file mode 100644
index 0000000..f3dcec5
--- /dev/null
+++ b/OpenSim/Framework/Console/OpenSim.Framework.Console.csproj
@@ -0,0 +1,89 @@
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="ConsoleCallbacksBase.cs">
73 <SubType>Code</SubType>
74 </Compile>
75 <Compile Include="LogBase.cs">
76 <SubType>Code</SubType>
77 </Compile>
78 <Compile Include="MainLog.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/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build b/OpenSim/Framework/Console/OpenSim.Framework.Console.dll.build
index 00ca3f9..eb40c0d 100644
--- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build
+++ b/OpenSim/Framework/Console/OpenSim.Framework.Console.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.Physics.BasicPhysicsPlugin" default="build"> 2<project name="OpenSim.Framework.Console" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,25 +8,25 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.Physics.BasicPhysicsPlugin" dynamicprefix="true" > 11 <resources prefix="OpenSim.Framework.Console" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" /> 14 <include name="AssemblyInfo.cs" />
15 <include name="BasicPhysicsPlugin.cs" /> 15 <include name="ConsoleCallbacksBase.cs" />
16 <include name="LogBase.cs" />
17 <include name="MainLog.cs" />
16 </sources> 18 </sources>
17 <references basedir="${project::get-base-directory()}"> 19 <references basedir="${project::get-base-directory()}">
18 <lib> 20 <lib>
19 <include name="${project::get-base-directory()}" /> 21 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" /> 22 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib> 23 </lib>
22 <include name="../../../bin/Axiom.MathLib.dll" />
23 <include name="../../../bin/OpenSim.Physics.Manager.dll" />
24 <include name="System.dll" /> 24 <include name="System.dll" />
25 </references> 25 </references>
26 </csc> 26 </csc>
27 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/Physics/" /> 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/Physics/"/> 28 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
29 <copy todir="${project::get-base-directory()}/../../../bin/Physics/"> 29 <copy todir="${project::get-base-directory()}/../../../bin/">
30 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 30 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
31 <include name="*.dll"/> 31 <include name="*.dll"/>
32 <include name="*.exe"/> 32 <include name="*.exe"/>
diff --git a/OpenSim/Framework/Data.DB4o/DB4oGridData.cs b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs
new file mode 100644
index 0000000..dc8488e
--- /dev/null
+++ b/OpenSim/Framework/Data.DB4o/DB4oGridData.cs
@@ -0,0 +1,166 @@
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 OpenSim.Framework.Data;
33using libsecondlife;
34
35
36namespace OpenSim.Framework.Data.DB4o
37{
38 /// <summary>
39 /// A grid server storage mechanism employing the DB4o database system
40 /// </summary>
41 class DB4oGridData : IGridData
42 {
43 /// <summary>
44 /// The database manager object
45 /// </summary>
46 DB4oGridManager manager;
47
48 /// <summary>
49 /// Called when the plugin is first loaded (as constructors are not called)
50 /// </summary>
51 public void Initialise() {
52 manager = new DB4oGridManager("gridserver.yap");
53 }
54
55 /// <summary>
56 /// Returns a list of regions within the specified ranges
57 /// </summary>
58 /// <param name="a">minimum X coordinate</param>
59 /// <param name="b">minimum Y coordinate</param>
60 /// <param name="c">maximum X coordinate</param>
61 /// <param name="d">maximum Y coordinate</param>
62 /// <returns>An array of region profiles</returns>
63 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
64 {
65 return null;
66 }
67
68 /// <summary>
69 /// Returns a region located at the specified regionHandle (warning multiple regions may occupy the one spot, first found is returned)
70 /// </summary>
71 /// <param name="handle">The handle to search for</param>
72 /// <returns>A region profile</returns>
73 public SimProfileData GetProfileByHandle(ulong handle) {
74 lock (manager.simProfiles)
75 {
76 foreach (LLUUID UUID in manager.simProfiles.Keys)
77 {
78 if (manager.simProfiles[UUID].regionHandle == handle)
79 {
80 return manager.simProfiles[UUID];
81 }
82 }
83 }
84 throw new Exception("Unable to find profile with handle (" + handle.ToString() + ")");
85 }
86
87 /// <summary>
88 /// Returns a specific region
89 /// </summary>
90 /// <param name="uuid">The region ID code</param>
91 /// <returns>A region profile</returns>
92 public SimProfileData GetProfileByLLUUID(LLUUID uuid)
93 {
94 lock (manager.simProfiles)
95 {
96 if (manager.simProfiles.ContainsKey(uuid))
97 return manager.simProfiles[uuid];
98 }
99 throw new Exception("Unable to find profile with UUID (" + uuid.ToStringHyphenated() + ")");
100 }
101
102 /// <summary>
103 /// Adds a new specified region to the database
104 /// </summary>
105 /// <param name="profile">The profile to add</param>
106 /// <returns>A dataresponse enum indicating success</returns>
107 public DataResponse AddProfile(SimProfileData profile)
108 {
109 lock (manager.simProfiles)
110 {
111 if (manager.AddRow(profile))
112 {
113 return DataResponse.RESPONSE_OK;
114 }
115 else
116 {
117 return DataResponse.RESPONSE_ERROR;
118 }
119 }
120 }
121
122 /// <summary>
123 /// Authenticates a new region using the shared secrets. NOT SECURE.
124 /// </summary>
125 /// <param name="uuid">The UUID the region is authenticating with</param>
126 /// <param name="handle">The location the region is logging into (unused in Db4o)</param>
127 /// <param name="key">The shared secret</param>
128 /// <returns>Authenticated?</returns>
129 public bool AuthenticateSim(LLUUID uuid, ulong handle, string key) {
130 if (manager.simProfiles[uuid].regionRecvKey == key)
131 return true;
132 return false;
133 }
134
135 /// <summary>
136 /// Shuts down the database
137 /// </summary>
138 public void Close()
139 {
140 manager = null;
141 }
142
143 /// <summary>
144 /// Returns the providers name
145 /// </summary>
146 /// <returns>The name of the storage system</returns>
147 public string getName()
148 {
149 return "DB4o Grid Provider";
150 }
151
152 /// <summary>
153 /// Returns the providers version
154 /// </summary>
155 /// <returns>The version of the storage system</returns>
156 public string getVersion()
157 {
158 return "0.1";
159 }
160
161 public ReservationData GetReservationAtPoint(uint x, uint y)
162 {
163 return null;
164 }
165 }
166}
diff --git a/OpenSim/Framework/Data.DB4o/DB4oManager.cs b/OpenSim/Framework/Data.DB4o/DB4oManager.cs
new file mode 100644
index 0000000..3870a8c
--- /dev/null
+++ b/OpenSim/Framework/Data.DB4o/DB4oManager.cs
@@ -0,0 +1,165 @@
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 Db4objects.Db4o;
32using OpenSim.Framework.Data;
33using libsecondlife;
34
35namespace OpenSim.Framework.Data.DB4o
36{
37 /// <summary>
38 /// A Database manager for Db4o
39 /// </summary>
40 class DB4oGridManager
41 {
42 /// <summary>
43 /// A list of the current regions connected (in-memory cache)
44 /// </summary>
45 public Dictionary<LLUUID, SimProfileData> simProfiles = new Dictionary<LLUUID, SimProfileData>();
46 /// <summary>
47 /// Database File Name
48 /// </summary>
49 string dbfl;
50
51 /// <summary>
52 /// Creates a new grid storage manager
53 /// </summary>
54 /// <param name="db4odb">Filename to the database file</param>
55 public DB4oGridManager(string db4odb)
56 {
57 dbfl = db4odb;
58 IObjectContainer database;
59 database = Db4oFactory.OpenFile(dbfl);
60 IObjectSet result = database.Get(typeof(SimProfileData));
61 // Loads the file into the in-memory cache
62 foreach(SimProfileData row in result) {
63 simProfiles.Add(row.UUID, row);
64 }
65 database.Close();
66 }
67
68 /// <summary>
69 /// Adds a new profile to the database (Warning: Probably slow.)
70 /// </summary>
71 /// <param name="row">The profile to add</param>
72 /// <returns>Successful?</returns>
73 public bool AddRow(SimProfileData row)
74 {
75 if (simProfiles.ContainsKey(row.UUID))
76 {
77 simProfiles[row.UUID] = row;
78 }
79 else
80 {
81 simProfiles.Add(row.UUID, row);
82 }
83
84 try
85 {
86 IObjectContainer database;
87 database = Db4oFactory.OpenFile(dbfl);
88 database.Set(row);
89 database.Close();
90 return true;
91 }
92 catch (Exception e)
93 {
94 return false;
95 }
96 }
97
98
99 }
100
101 /// <summary>
102 /// A manager for the DB4o database (user profiles)
103 /// </summary>
104 class DB4oUserManager
105 {
106 /// <summary>
107 /// A list of the user profiles (in memory cache)
108 /// </summary>
109 public Dictionary<LLUUID, UserProfileData> userProfiles = new Dictionary<LLUUID, UserProfileData>();
110 /// <summary>
111 /// Database filename
112 /// </summary>
113 string dbfl;
114
115 /// <summary>
116 /// Initialises a new DB manager
117 /// </summary>
118 /// <param name="db4odb">The filename to the database</param>
119 public DB4oUserManager(string db4odb)
120 {
121 dbfl = db4odb;
122 IObjectContainer database;
123 database = Db4oFactory.OpenFile(dbfl);
124 // Load to cache
125 IObjectSet result = database.Get(typeof(UserProfileData));
126 foreach (UserProfileData row in result)
127 {
128 userProfiles.Add(row.UUID, row);
129 }
130 database.Close();
131 }
132
133 /// <summary>
134 /// Adds a new profile to the database (Warning: Probably slow.)
135 /// </summary>
136 /// <param name="row">The profile to add</param>
137 /// <returns>Successful?</returns>
138 public bool AddRow(UserProfileData row)
139 {
140 if (userProfiles.ContainsKey(row.UUID))
141 {
142 userProfiles[row.UUID] = row;
143 }
144 else
145 {
146 userProfiles.Add(row.UUID, row);
147 }
148
149 try
150 {
151 IObjectContainer database;
152 database = Db4oFactory.OpenFile(dbfl);
153 database.Set(row);
154 database.Close();
155 return true;
156 }
157 catch (Exception e)
158 {
159 return false;
160 }
161 }
162
163
164 }
165}
diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
new file mode 100644
index 0000000..8caa75d
--- /dev/null
+++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
@@ -0,0 +1,205 @@
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 OpenSim.Framework.Data;
32using libsecondlife;
33
34namespace OpenSim.Framework.Data.DB4o
35{
36 /// <summary>
37 /// A User storage interface for the DB4o database system
38 /// </summary>
39 public class DB4oUserData : IUserData
40 {
41 /// <summary>
42 /// The database manager
43 /// </summary>
44 DB4oUserManager manager;
45
46 /// <summary>
47 /// Artificial constructor called upon plugin load
48 /// </summary>
49 public void Initialise()
50 {
51 manager = new DB4oUserManager("userprofiles.yap");
52 }
53
54 /// <summary>
55 /// Loads a specified user profile from a UUID
56 /// </summary>
57 /// <param name="uuid">The users UUID</param>
58 /// <returns>A user profile</returns>
59 public UserProfileData getUserByUUID(LLUUID uuid)
60 {
61 if(manager.userProfiles.ContainsKey(uuid))
62 return manager.userProfiles[uuid];
63 return null;
64 }
65
66 /// <summary>
67 /// Returns a user by searching for its name
68 /// </summary>
69 /// <param name="name">The users account name</param>
70 /// <returns>A matching users profile</returns>
71 public UserProfileData getUserByName(string name)
72 {
73 return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
74 }
75
76 /// <summary>
77 /// Returns a user by searching for its name
78 /// </summary>
79 /// <param name="fname">The first part of the users account name</param>
80 /// <param name="lname">The second part of the users account name</param>
81 /// <returns>A matching users profile</returns>
82 public UserProfileData getUserByName(string fname, string lname)
83 {
84 foreach (UserProfileData profile in manager.userProfiles.Values)
85 {
86 if (profile.username == fname && profile.surname == lname)
87 return profile;
88 }
89 return null;
90 }
91
92 /// <summary>
93 /// Returns a user by UUID direct
94 /// </summary>
95 /// <param name="uuid">The users account ID</param>
96 /// <returns>A matching users profile</returns>
97 public UserAgentData getAgentByUUID(LLUUID uuid)
98 {
99 try
100 {
101 return getUserByUUID(uuid).currentAgent;
102 }
103 catch (Exception e)
104 {
105 return null;
106 }
107 }
108
109 /// <summary>
110 /// Returns a session by account name
111 /// </summary>
112 /// <param name="name">The account name</param>
113 /// <returns>The users session agent</returns>
114 public UserAgentData getAgentByName(string name)
115 {
116 return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
117 }
118
119 /// <summary>
120 /// Returns a session by account name
121 /// </summary>
122 /// <param name="fname">The first part of the users account name</param>
123 /// <param name="lname">The second part of the users account name</param>
124 /// <returns>A user agent</returns>
125 public UserAgentData getAgentByName(string fname, string lname)
126 {
127 try
128 {
129 return getUserByName(fname,lname).currentAgent;
130 }
131 catch (Exception e)
132 {
133 return null;
134 }
135 }
136
137 /// <summary>
138 /// Creates a new user profile
139 /// </summary>
140 /// <param name="user">The profile to add to the database</param>
141 public void addNewUserProfile(UserProfileData user)
142 {
143 try
144 {
145 manager.AddRow(user);
146 }
147 catch (Exception e)
148 {
149 Console.WriteLine(e.ToString());
150 }
151 }
152
153 /// <summary>
154 /// Creates a new user agent
155 /// </summary>
156 /// <param name="agent">The agent to add to the database</param>
157 public void addNewUserAgent(UserAgentData agent)
158 {
159 // Do nothing. yet.
160 }
161
162 /// <summary>
163 /// Transfers money between two user accounts
164 /// </summary>
165 /// <param name="from">Starting account</param>
166 /// <param name="to">End account</param>
167 /// <param name="amount">The amount to move</param>
168 /// <returns>Success?</returns>
169 public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
170 {
171 return true;
172 }
173
174 /// <summary>
175 /// Transfers inventory between two accounts
176 /// </summary>
177 /// <remarks>Move to inventory server</remarks>
178 /// <param name="from">Senders account</param>
179 /// <param name="to">Recievers account</param>
180 /// <param name="item">Inventory item</param>
181 /// <returns>Success?</returns>
182 public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
183 {
184 return true;
185 }
186
187 /// <summary>
188 /// Returns the name of the storage provider
189 /// </summary>
190 /// <returns>Storage provider name</returns>
191 public string getName()
192 {
193 return "DB4o Userdata";
194 }
195
196 /// <summary>
197 /// Returns the version of the storage provider
198 /// </summary>
199 /// <returns>Storage provider version</returns>
200 public string getVersion()
201 {
202 return "0.1";
203 }
204 }
205}
diff --git a/OpenSim/Framework/Data.DB4o/OpenSim.Framework.Data.DB4o.csproj b/OpenSim/Framework/Data.DB4o/OpenSim.Framework.Data.DB4o.csproj
new file mode 100644
index 0000000..b09cecf
--- /dev/null
+++ b/OpenSim/Framework/Data.DB4o/OpenSim.Framework.Data.DB4o.csproj
@@ -0,0 +1,111 @@
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>{FD2D303D-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.Data.DB4o</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.Data.DB4o</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.Data" >
74 <HintPath>System.Data.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="System.Xml" >
78 <HintPath>System.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 <ProjectReference Include="..\Data\OpenSim.Framework.Data.csproj">
84 <Name>OpenSim.Framework.Data</Name>
85 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private>
88 </ProjectReference>
89 </ItemGroup>
90 <ItemGroup>
91 <Compile Include="DB4oGridData.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="DB4oManager.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="DB4oUserData.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 <Compile Include="Properties\AssemblyInfo.cs">
101 <SubType>Code</SubType>
102 </Compile>
103 </ItemGroup>
104 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
105 <PropertyGroup>
106 <PreBuildEvent>
107 </PreBuildEvent>
108 <PostBuildEvent>
109 </PostBuildEvent>
110 </PropertyGroup>
111</Project>
diff --git a/OpenSim/Framework/Data.DB4o/OpenSim.Framework.Data.DB4o.dll.build b/OpenSim/Framework/Data.DB4o/OpenSim.Framework.Data.DB4o.dll.build
new file mode 100644
index 0000000..f124eb5
--- /dev/null
+++ b/OpenSim/Framework/Data.DB4o/OpenSim.Framework.Data.DB4o.dll.build
@@ -0,0 +1,47 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.Data.DB4o" 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.Data.DB4o" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="DB4oGridData.cs" />
15 <include name="DB4oManager.cs" />
16 <include name="DB4oUserData.cs" />
17 <include name="Properties/AssemblyInfo.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="../../../bin/Db4objects.Db4o.dll" />
25 <include name="../../../bin/libsecondlife.dll" />
26 <include name="../../../bin/OpenSim.Framework.Data.dll" />
27 <include name="System.dll" />
28 <include name="System.Data.dll" />
29 <include name="System.Xml.dll" />
30 </references>
31 </csc>
32 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
33 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
34 <copy todir="${project::get-base-directory()}/../../../bin/">
35 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
36 <include name="*.dll"/>
37 <include name="*.exe"/>
38 </fileset>
39 </copy>
40 </target>
41 <target name="clean">
42 <delete dir="${bin.dir}" failonerror="false" />
43 <delete dir="${obj.dir}" failonerror="false" />
44 </target>
45 <target name="doc" description="Creates documentation.">
46 </target>
47</project>
diff --git a/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..68395a1
--- /dev/null
+++ b/OpenSim/Framework/Data.DB4o/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
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.Data.DB4o")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Framework.Data.DB4o")]
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("57991e15-79da-41b7-aa06-2e6b49165a63")]
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// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs
new file mode 100644
index 0000000..5bdceaf
--- /dev/null
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs
@@ -0,0 +1,192 @@
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 OpenSim.Framework.Data;
32
33namespace OpenSim.Framework.Data.MSSQL
34{
35 /// <summary>
36 /// A grid data interface for Microsoft SQL Server
37 /// </summary>
38 public class SqlGridData : IGridData
39 {
40 /// <summary>
41 /// Database manager
42 /// </summary>
43 private MSSqlManager database;
44
45 /// <summary>
46 /// Initialises the Grid Interface
47 /// </summary>
48 public void Initialise()
49 {
50 database = new MSSqlManager("localhost", "db", "user", "password", "false");
51 }
52
53 /// <summary>
54 /// Shuts down the grid interface
55 /// </summary>
56 public void Close()
57 {
58 database.Close();
59 }
60
61 /// <summary>
62 /// Returns the storage system name
63 /// </summary>
64 /// <returns>A string containing the storage system name</returns>
65 public string getName()
66 {
67 return "Sql OpenGridData";
68 }
69
70 /// <summary>
71 /// Returns the storage system version
72 /// </summary>
73 /// <returns>A string containing the storage system version</returns>
74 public string getVersion()
75 {
76 return "0.1";
77 }
78
79 /// <summary>
80 /// Returns a list of regions within the specified ranges
81 /// </summary>
82 /// <param name="a">minimum X coordinate</param>
83 /// <param name="b">minimum Y coordinate</param>
84 /// <param name="c">maximum X coordinate</param>
85 /// <param name="d">maximum Y coordinate</param>
86 /// <returns>An array of region profiles</returns>
87 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
88 {
89 return null;
90 }
91
92 /// <summary>
93 /// Returns a sim profile from it's location
94 /// </summary>
95 /// <param name="handle">Region location handle</param>
96 /// <returns>Sim profile</returns>
97 public SimProfileData GetProfileByHandle(ulong handle)
98 {
99 Dictionary<string, string> param = new Dictionary<string, string>();
100 param["handle"] = handle.ToString();
101
102 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
103 System.Data.IDataReader reader = result.ExecuteReader();
104
105 SimProfileData row = database.getRow(reader);
106 reader.Close();
107 result.Dispose();
108
109 return row;
110 }
111
112 /// <summary>
113 /// Returns a sim profile from it's UUID
114 /// </summary>
115 /// <param name="uuid">The region UUID</param>
116 /// <returns>The sim profile</returns>
117 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
118 {
119 Dictionary<string, string> param = new Dictionary<string, string>();
120 param["uuid"] = uuid.ToStringHyphenated();
121
122 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
123 System.Data.IDataReader reader = result.ExecuteReader();
124
125 SimProfileData row = database.getRow(reader);
126 reader.Close();
127 result.Dispose();
128
129 return row;
130 }
131
132 /// <summary>
133 /// Adds a new specified region to the database
134 /// </summary>
135 /// <param name="profile">The profile to add</param>
136 /// <returns>A dataresponse enum indicating success</returns>
137 public DataResponse AddProfile(SimProfileData profile)
138 {
139 if (database.insertRow(profile))
140 {
141 return DataResponse.RESPONSE_OK;
142 }
143 else
144 {
145 return DataResponse.RESPONSE_ERROR;
146 }
147 }
148
149 /// <summary>
150 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
151 /// </summary>
152 /// <param name="uuid">The UUID of the challenger</param>
153 /// <param name="handle">The attempted regionHandle of the challenger</param>
154 /// <param name="authkey">The secret</param>
155 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
156 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
157 {
158 bool throwHissyFit = false; // Should be true by 1.0
159
160 if (throwHissyFit)
161 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
162
163 SimProfileData data = GetProfileByLLUUID(uuid);
164
165 return (handle == data.regionHandle && authkey == data.regionSecret);
166 }
167
168 /// <summary>
169 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
170 /// </summary>
171 /// <remarks>This requires a security audit.</remarks>
172 /// <param name="uuid"></param>
173 /// <param name="handle"></param>
174 /// <param name="authhash"></param>
175 /// <param name="challenge"></param>
176 /// <returns></returns>
177 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge)
178 {
179 System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed();
180 System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding();
181
182 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
183 byte[] hash = HashProvider.ComputeHash(stream);
184 return false;
185 }
186 public ReservationData GetReservationAtPoint(uint x, uint y)
187 {
188 return null;
189 }
190 }
191
192}
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs
new file mode 100644
index 0000000..7cf1a56
--- /dev/null
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs
@@ -0,0 +1,214 @@
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 System.Data;
32
33using System.Data.SqlClient;
34
35using OpenSim.Framework.Data;
36
37namespace OpenSim.Framework.Data.MSSQL
38{
39 /// <summary>
40 /// A management class for the MS SQL Storage Engine
41 /// </summary>
42 class MSSqlManager
43 {
44 /// <summary>
45 /// The database connection object
46 /// </summary>
47 IDbConnection dbcon;
48
49 /// <summary>
50 /// Initialises and creates a new Sql connection and maintains it.
51 /// </summary>
52 /// <param name="hostname">The Sql server being connected to</param>
53 /// <param name="database">The name of the Sql database being used</param>
54 /// <param name="username">The username logging into the database</param>
55 /// <param name="password">The password for the user logging in</param>
56 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
57 public MSSqlManager(string hostname, string database, string username, string password, string cpooling)
58 {
59 try
60 {
61 string connectionString = "Server=" + hostname + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";";
62 dbcon = new SqlConnection(connectionString);
63
64 dbcon.Open();
65 }
66 catch (Exception e)
67 {
68 throw new Exception("Error initialising Sql Database: " + e.ToString());
69 }
70 }
71
72 /// <summary>
73 /// Shuts down the database connection
74 /// </summary>
75 public void Close()
76 {
77 dbcon.Close();
78 dbcon = null;
79 }
80
81 /// <summary>
82 /// Runs a query with protection against SQL Injection by using parameterised input.
83 /// </summary>
84 /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
85 /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
86 /// <returns>A Sql DB Command</returns>
87 public IDbCommand Query(string sql, Dictionary<string, string> parameters)
88 {
89 SqlCommand dbcommand = (SqlCommand)dbcon.CreateCommand();
90 dbcommand.CommandText = sql;
91 foreach (KeyValuePair<string, string> param in parameters)
92 {
93 dbcommand.Parameters.AddWithValue(param.Key, param.Value);
94 }
95
96 return (IDbCommand)dbcommand;
97 }
98
99 /// <summary>
100 /// Runs a database reader object and returns a region row
101 /// </summary>
102 /// <param name="reader">An active database reader</param>
103 /// <returns>A region row</returns>
104 public SimProfileData getRow(IDataReader reader)
105 {
106 SimProfileData regionprofile = new SimProfileData();
107
108 if (reader.Read())
109 {
110 // Region Main
111 regionprofile.regionHandle = (ulong)reader["regionHandle"];
112 regionprofile.regionName = (string)reader["regionName"];
113 regionprofile.UUID = new libsecondlife.LLUUID((string)reader["uuid"]);
114
115 // Secrets
116 regionprofile.regionRecvKey = (string)reader["regionRecvKey"];
117 regionprofile.regionSecret = (string)reader["regionSecret"];
118 regionprofile.regionSendKey = (string)reader["regionSendKey"];
119
120 // Region Server
121 regionprofile.regionDataURI = (string)reader["regionDataURI"];
122 regionprofile.regionOnline = false; // Needs to be pinged before this can be set.
123 regionprofile.serverIP = (string)reader["serverIP"];
124 regionprofile.serverPort = (uint)reader["serverPort"];
125 regionprofile.serverURI = (string)reader["serverURI"];
126
127 // Location
128 regionprofile.regionLocX = (uint)((int)reader["locX"]);
129 regionprofile.regionLocY = (uint)((int)reader["locY"]);
130 regionprofile.regionLocZ = (uint)((int)reader["locZ"]);
131
132 // Neighbours - 0 = No Override
133 regionprofile.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"];
134 regionprofile.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"];
135 regionprofile.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"];
136 regionprofile.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"];
137
138 // Assets
139 regionprofile.regionAssetURI = (string)reader["regionAssetURI"];
140 regionprofile.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
141 regionprofile.regionAssetSendKey = (string)reader["regionAssetSendKey"];
142
143 // Userserver
144 regionprofile.regionUserURI = (string)reader["regionUserURI"];
145 regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"];
146 regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"];
147 }
148 else
149 {
150 throw new Exception("No rows to return");
151 }
152 return regionprofile;
153 }
154
155 /// <summary>
156 /// Creates a new region in the database
157 /// </summary>
158 /// <param name="profile">The region profile to insert</param>
159 /// <returns>Successful?</returns>
160 public bool insertRow(SimProfileData profile)
161 {
162 string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
163 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
164 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES ";
165
166 sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, ";
167 sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, ";
168 sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);";
169
170 Dictionary<string, string> parameters = new Dictionary<string, string>();
171
172 parameters["regionHandle"] = profile.regionHandle.ToString();
173 parameters["regionName"] = profile.regionName;
174 parameters["uuid"] = profile.UUID.ToString();
175 parameters["regionRecvKey"] = profile.regionRecvKey;
176 parameters["regionSendKey"] = profile.regionSendKey;
177 parameters["regionDataURI"] = profile.regionDataURI;
178 parameters["serverIP"] = profile.serverIP;
179 parameters["serverPort"] = profile.serverPort.ToString();
180 parameters["serverURI"] = profile.serverURI;
181 parameters["locX"] = profile.regionLocX.ToString();
182 parameters["locY"] = profile.regionLocY.ToString();
183 parameters["locZ"] = profile.regionLocZ.ToString();
184 parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString();
185 parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString();
186 parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString();
187 parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString();
188 parameters["regionAssetURI"] = profile.regionAssetURI;
189 parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey;
190 parameters["regionAssetSendKey"] = profile.regionAssetSendKey;
191 parameters["regionUserURI"] = profile.regionUserURI;
192 parameters["regionUserRecvKey"] = profile.regionUserRecvKey;
193 parameters["regionUserSendKey"] = profile.regionUserSendKey;
194
195 bool returnval = false;
196
197 try
198 {
199 IDbCommand result = Query(sql, parameters);
200
201 if (result.ExecuteNonQuery() == 1)
202 returnval = true;
203
204 result.Dispose();
205 }
206 catch (Exception e)
207 {
208 return false;
209 }
210
211 return returnval;
212 }
213 }
214}
diff --git a/OpenSim/Framework/Data.MSSQL/OpenSim.Framework.Data.MSSQL.csproj b/OpenSim/Framework/Data.MSSQL/OpenSim.Framework.Data.MSSQL.csproj
new file mode 100644
index 0000000..4c41a4f
--- /dev/null
+++ b/OpenSim/Framework/Data.MSSQL/OpenSim.Framework.Data.MSSQL.csproj
@@ -0,0 +1,104 @@
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>{17F7F694-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.Data.MSSQL</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.Data.MSSQL</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="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System" >
66 <HintPath>System.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Data" >
70 <HintPath>System.Data.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="..\Data\OpenSim.Framework.Data.csproj">
80 <Name>OpenSim.Framework.Data</Name>
81 <Project>{36B72A9B-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="MSSQLGridData.cs">
88 <SubType>Code</SubType>
89 </Compile>
90 <Compile Include="MSSQLManager.cs">
91 <SubType>Code</SubType>
92 </Compile>
93 <Compile Include="Properties\AssemblyInfo.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 </ItemGroup>
97 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
98 <PropertyGroup>
99 <PreBuildEvent>
100 </PreBuildEvent>
101 <PostBuildEvent>
102 </PostBuildEvent>
103 </PropertyGroup>
104</Project>
diff --git a/OpenSim/Framework/Data.MSSQL/OpenSim.Framework.Data.MSSQL.dll.build b/OpenSim/Framework/Data.MSSQL/OpenSim.Framework.Data.MSSQL.dll.build
new file mode 100644
index 0000000..a2b2e3d
--- /dev/null
+++ b/OpenSim/Framework/Data.MSSQL/OpenSim.Framework.Data.MSSQL.dll.build
@@ -0,0 +1,45 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.Data.MSSQL" 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.Data.MSSQL" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="MSSQLGridData.cs" />
15 <include name="MSSQLManager.cs" />
16 <include name="Properties/AssemblyInfo.cs" />
17 </sources>
18 <references basedir="${project::get-base-directory()}">
19 <lib>
20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib>
23 <include name="../../../bin/libsecondlife.dll" />
24 <include name="../../../bin/OpenSim.Framework.Data.dll" />
25 <include name="System.dll" />
26 <include name="System.Data.dll" />
27 <include name="System.Xml.dll" />
28 </references>
29 </csc>
30 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
31 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
32 <copy todir="${project::get-base-directory()}/../../../bin/">
33 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
34 <include name="*.dll"/>
35 <include name="*.exe"/>
36 </fileset>
37 </copy>
38 </target>
39 <target name="clean">
40 <delete dir="${bin.dir}" failonerror="false" />
41 <delete dir="${obj.dir}" failonerror="false" />
42 </target>
43 <target name="doc" description="Creates documentation.">
44 </target>
45</project>
diff --git a/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..af310e8
--- /dev/null
+++ b/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
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.Data.MSSQL")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Framework.Data.MSSQL")]
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("0e1c1ca4-2cf2-4315-b0e7-432c02feea8a")]
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// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
new file mode 100644
index 0000000..43e3054
--- /dev/null
+++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs
@@ -0,0 +1,285 @@
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 OpenSim.Framework.Data;
32
33namespace OpenSim.Framework.Data.MySQL
34{
35 /// <summary>
36 /// A MySQL Interface for the Grid Server
37 /// </summary>
38 public class MySQLGridData : IGridData
39 {
40 /// <summary>
41 /// MySQL Database Manager
42 /// </summary>
43 private MySQLManager database;
44
45 /// <summary>
46 /// Initialises the Grid Interface
47 /// </summary>
48 public void Initialise()
49 {
50 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
51 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
52 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
53 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
54 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
55 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
56 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
57
58 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
59 }
60
61 /// <summary>
62 /// Shuts down the grid interface
63 /// </summary>
64 public void Close()
65 {
66 database.Close();
67 }
68
69 /// <summary>
70 /// Returns the plugin name
71 /// </summary>
72 /// <returns>Plugin name</returns>
73 public string getName()
74 {
75 return "MySql OpenGridData";
76 }
77
78 /// <summary>
79 /// Returns the plugin version
80 /// </summary>
81 /// <returns>Plugin version</returns>
82 public string getVersion()
83 {
84 return "0.1";
85 }
86
87 /// <summary>
88 /// Returns all the specified region profiles within coordates -- coordinates are inclusive
89 /// </summary>
90 /// <param name="xmin">Minimum X coordinate</param>
91 /// <param name="ymin">Minimum Y coordinate</param>
92 /// <param name="xmax">Maximum X coordinate</param>
93 /// <param name="ymax">Maximum Y coordinate</param>
94 /// <returns></returns>
95 public SimProfileData[] GetProfilesInRange(uint xmin, uint ymin, uint xmax, uint ymax)
96 {
97 try
98 {
99 lock (database)
100 {
101 Dictionary<string, string> param = new Dictionary<string, string>();
102 param["?xmin"] = xmin.ToString();
103 param["?ymin"] = ymin.ToString();
104 param["?xmax"] = xmax.ToString();
105 param["?ymax"] = ymax.ToString();
106
107 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE locX >= ?xmin AND locX <= ?xmax AND locY >= ?ymin AND locY <= ?ymax", param);
108 System.Data.IDataReader reader = result.ExecuteReader();
109
110 SimProfileData row;
111
112 List<SimProfileData> rows = new List<SimProfileData>();
113
114 while ((row = database.readSimRow(reader)) != null)
115 {
116 rows.Add(row);
117 }
118 reader.Close();
119 result.Dispose();
120
121 return rows.ToArray();
122
123 }
124 }
125 catch (Exception e)
126 {
127 database.Reconnect();
128 Console.WriteLine(e.ToString());
129 return null;
130 }
131 }
132
133 /// <summary>
134 /// Returns a sim profile from it's location
135 /// </summary>
136 /// <param name="handle">Region location handle</param>
137 /// <returns>Sim profile</returns>
138 public SimProfileData GetProfileByHandle(ulong handle)
139 {
140 try
141 {
142 lock (database)
143 {
144 Dictionary<string, string> param = new Dictionary<string, string>();
145 param["?handle"] = handle.ToString();
146
147 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE regionHandle = ?handle", param);
148 System.Data.IDataReader reader = result.ExecuteReader();
149
150 SimProfileData row = database.readSimRow(reader);
151 reader.Close();
152 result.Dispose();
153
154 return row;
155 }
156 }
157 catch (Exception e)
158 {
159 database.Reconnect();
160 Console.WriteLine(e.ToString());
161 return null;
162 }
163 }
164
165 /// <summary>
166 /// Returns a sim profile from it's UUID
167 /// </summary>
168 /// <param name="uuid">The region UUID</param>
169 /// <returns>The sim profile</returns>
170 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
171 {
172 try
173 {
174 lock (database)
175 {
176 Dictionary<string, string> param = new Dictionary<string, string>();
177 param["?uuid"] = uuid.ToStringHyphenated();
178
179 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param);
180 System.Data.IDataReader reader = result.ExecuteReader();
181
182 SimProfileData row = database.readSimRow(reader);
183 reader.Close();
184 result.Dispose();
185
186 return row;
187 }
188 }
189 catch (Exception e)
190 {
191 database.Reconnect();
192 Console.WriteLine(e.ToString());
193 return null;
194 }
195 }
196
197 /// <summary>
198 /// Adds a new profile to the database
199 /// </summary>
200 /// <param name="profile">The profile to add</param>
201 /// <returns>Successful?</returns>
202 public DataResponse AddProfile(SimProfileData profile)
203 {
204 lock (database)
205 {
206 if (database.insertRegion(profile))
207 {
208 return DataResponse.RESPONSE_OK;
209 }
210 else
211 {
212 return DataResponse.RESPONSE_ERROR;
213 }
214 }
215 }
216
217 /// <summary>
218 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
219 /// </summary>
220 /// <param name="uuid">The UUID of the challenger</param>
221 /// <param name="handle">The attempted regionHandle of the challenger</param>
222 /// <param name="authkey">The secret</param>
223 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
224 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
225 {
226 bool throwHissyFit = false; // Should be true by 1.0
227
228 if (throwHissyFit)
229 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
230
231 SimProfileData data = GetProfileByLLUUID(uuid);
232
233 return (handle == data.regionHandle && authkey == data.regionSecret);
234 }
235
236 /// <summary>
237 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
238 /// </summary>
239 /// <remarks>This requires a security audit.</remarks>
240 /// <param name="uuid"></param>
241 /// <param name="handle"></param>
242 /// <param name="authhash"></param>
243 /// <param name="challenge"></param>
244 /// <returns></returns>
245 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge)
246 {
247 System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed();
248 System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding();
249
250 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
251 byte[] hash = HashProvider.ComputeHash(stream);
252
253 return false;
254 }
255
256 public ReservationData GetReservationAtPoint(uint x, uint y)
257 {
258 try
259 {
260 lock (database)
261 {
262 Dictionary<string, string> param = new Dictionary<string, string>();
263 param["?x"] = x.ToString();
264 param["?y"] = y.ToString();
265 System.Data.IDbCommand result = database.Query("SELECT * FROM reservations WHERE resXMin <= ?x AND resXMax >= ?x AND resYMin <= ?y AND resYMax >= ?y", param);
266 System.Data.IDataReader reader = result.ExecuteReader();
267
268 ReservationData row = database.readReservationRow(reader);
269 reader.Close();
270 result.Dispose();
271
272 return row;
273 }
274 }
275 catch (Exception e)
276 {
277 database.Reconnect();
278 Console.WriteLine(e.ToString());
279 return null;
280 }
281 }
282 }
283
284
285}
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
new file mode 100644
index 0000000..434df1a
--- /dev/null
+++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs
@@ -0,0 +1,309 @@
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.Data.MySQL
34{
35 /// <summary>
36 /// A MySQL interface for the inventory server
37 /// </summary>
38 class MySQLInventoryData : IInventoryData
39 {
40 /// <summary>
41 /// The database manager
42 /// </summary>
43 public MySQLManager database;
44
45 /// <summary>
46 /// Loads and initialises this database plugin
47 /// </summary>
48 public void Initialise()
49 {
50 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
51 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
52 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
53 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
54 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
55 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
56 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
57
58 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
59 }
60
61 /// <summary>
62 /// The name of this DB provider
63 /// </summary>
64 /// <returns>Name of DB provider</returns>
65 public string getName()
66 {
67 return "MySQL Inventory Data Interface";
68 }
69
70 /// <summary>
71 /// Closes this DB provider
72 /// </summary>
73 public void Close()
74 {
75 // Do nothing.
76 }
77
78 /// <summary>
79 /// Returns the version of this DB provider
80 /// </summary>
81 /// <returns>A string containing the DB provider</returns>
82 public string getVersion()
83 {
84 return "0.1";
85 }
86
87 /// <summary>
88 /// Returns a list of items in a specified folder
89 /// </summary>
90 /// <param name="folderID">The folder to search</param>
91 /// <returns>A list containing inventory items</returns>
92 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID)
93 {
94 try
95 {
96 lock (database)
97 {
98 Dictionary<string, string> param = new Dictionary<string, string>();
99 param["?uuid"] = folderID.ToStringHyphenated();
100
101 System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", param);
102 System.Data.IDataReader reader = result.ExecuteReader();
103
104 List<InventoryItemBase> items = database.readInventoryItems(reader);
105
106 reader.Close();
107 result.Dispose();
108
109 return items;
110 }
111 }
112 catch (Exception e)
113 {
114 database.Reconnect();
115 Console.WriteLine(e.ToString());
116 return null;
117 }
118 }
119
120 /// <summary>
121 /// Returns a list of the root folders within a users inventory
122 /// </summary>
123 /// <param name="user">The user whos inventory is to be searched</param>
124 /// <returns>A list of folder objects</returns>
125 public List<InventoryFolderBase> getUserRootFolders(LLUUID user)
126 {
127 try
128 {
129 lock (database)
130 {
131 Dictionary<string, string> param = new Dictionary<string, string>();
132 param["?uuid"] = user.ToStringHyphenated();
133 param["?zero"] = LLUUID.Zero.ToStringHyphenated();
134
135 System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param);
136 System.Data.IDataReader reader = result.ExecuteReader();
137
138 List<InventoryFolderBase> items = database.readInventoryFolders(reader);
139
140 reader.Close();
141 result.Dispose();
142
143 return items;
144 }
145 }
146 catch (Exception e)
147 {
148 database.Reconnect();
149 Console.WriteLine(e.ToString());
150 return null;
151 }
152 }
153
154 /// <summary>
155 /// Returns a list of folders in a users inventory contained within the specified folder
156 /// </summary>
157 /// <param name="parentID">The folder to search</param>
158 /// <returns>A list of inventory folders</returns>
159 public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID)
160 {
161 try
162 {
163 lock (database)
164 {
165 Dictionary<string, string> param = new Dictionary<string, string>();
166 param["?uuid"] = parentID.ToStringHyphenated();
167
168 System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", param);
169 System.Data.IDataReader reader = result.ExecuteReader();
170
171 List<InventoryFolderBase> items = database.readInventoryFolders(reader);
172
173 reader.Close();
174 result.Dispose();
175
176 return items;
177 }
178 }
179 catch (Exception e)
180 {
181 database.Reconnect();
182 Console.WriteLine(e.ToString());
183 return null;
184 }
185 }
186
187 /// <summary>
188 /// Returns a specified inventory item
189 /// </summary>
190 /// <param name="item">The item to return</param>
191 /// <returns>An inventory item</returns>
192 public InventoryItemBase getInventoryItem(LLUUID item)
193 {
194 try
195 {
196 lock (database)
197 {
198 Dictionary<string, string> param = new Dictionary<string, string>();
199 param["?uuid"] = item.ToStringHyphenated();
200
201 System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", param);
202 System.Data.IDataReader reader = result.ExecuteReader();
203
204 List<InventoryItemBase> items = database.readInventoryItems(reader);
205
206 reader.Close();
207 result.Dispose();
208
209 if (items.Count > 0)
210 {
211 return items[0];
212 }
213 else
214 {
215 return null;
216 }
217 }
218 }
219 catch (Exception e)
220 {
221 database.Reconnect();
222 Console.WriteLine(e.ToString());
223 return null;
224 }
225 }
226
227 /// <summary>
228 /// Returns a specified inventory folder
229 /// </summary>
230 /// <param name="folder">The folder to return</param>
231 /// <returns>A folder class</returns>
232 public InventoryFolderBase getInventoryFolder(LLUUID folder)
233 {
234 try
235 {
236 lock (database)
237 {
238 Dictionary<string, string> param = new Dictionary<string, string>();
239 param["?uuid"] = folder.ToStringHyphenated();
240
241 System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", param);
242 System.Data.IDataReader reader = result.ExecuteReader();
243
244 List<InventoryFolderBase> items = database.readInventoryFolders(reader);
245
246 reader.Close();
247 result.Dispose();
248
249 if (items.Count > 0)
250 {
251 return items[0];
252 }
253 else
254 {
255 return null;
256 }
257 }
258 }
259 catch (Exception e)
260 {
261 database.Reconnect();
262 Console.WriteLine(e.ToString());
263 return null;
264 }
265 }
266
267 /// <summary>
268 /// Adds a specified item to the database
269 /// </summary>
270 /// <param name="item">The inventory item</param>
271 public void addInventoryItem(InventoryItemBase item)
272 {
273 lock (database)
274 {
275 database.insertItem(item);
276 }
277 }
278
279 /// <summary>
280 /// Updates the specified inventory item
281 /// </summary>
282 /// <param name="item">Inventory item to update</param>
283 public void updateInventoryItem(InventoryItemBase item)
284 {
285 addInventoryItem(item);
286 }
287
288 /// <summary>
289 /// Creates a new inventory folder
290 /// </summary>
291 /// <param name="folder">Folder to create</param>
292 public void addInventoryFolder(InventoryFolderBase folder)
293 {
294 lock (database)
295 {
296 database.insertFolder(folder);
297 }
298 }
299
300 /// <summary>
301 /// Updates an inventory folder
302 /// </summary>
303 /// <param name="folder">Folder to update</param>
304 public void updateInventoryFolder(InventoryFolderBase folder)
305 {
306 addInventoryFolder(folder);
307 }
308 }
309}
diff --git a/OpenSim/Framework/Data.MySQL/MySQLLogData.cs b/OpenSim/Framework/Data.MySQL/MySQLLogData.cs
new file mode 100644
index 0000000..8265614
--- /dev/null
+++ b/OpenSim/Framework/Data.MySQL/MySQLLogData.cs
@@ -0,0 +1,107 @@
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.Data.MySQL
33{
34 /// <summary>
35 /// An interface to the log database for MySQL
36 /// </summary>
37 class MySQLLogData : ILogData
38 {
39 /// <summary>
40 /// The database manager
41 /// </summary>
42 public MySQLManager database;
43
44 /// <summary>
45 /// Artificial constructor called when the plugin is loaded
46 /// </summary>
47 public void Initialise()
48 {
49 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
50 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
51 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
52 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
53 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
54 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
55 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
56
57 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
58 }
59
60 /// <summary>
61 /// Saves a log item to the database
62 /// </summary>
63 /// <param name="serverDaemon">The daemon triggering the event</param>
64 /// <param name="target">The target of the action (region / agent UUID, etc)</param>
65 /// <param name="methodCall">The method call where the problem occured</param>
66 /// <param name="arguments">The arguments passed to the method</param>
67 /// <param name="priority">How critical is this?</param>
68 /// <param name="logMessage">The message to log</param>
69 public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
70 {
71 try
72 {
73 database.insertLogRow(serverDaemon, target, methodCall, arguments, priority, logMessage);
74 }
75 catch (Exception e)
76 {
77 database.Reconnect();
78 }
79 }
80
81 /// <summary>
82 /// Returns the name of this DB provider
83 /// </summary>
84 /// <returns>A string containing the DB provider name</returns>
85 public string getName()
86 {
87 return "MySQL Logdata Interface";
88 }
89
90 /// <summary>
91 /// Closes the database provider
92 /// </summary>
93 public void Close()
94 {
95 // Do nothing.
96 }
97
98 /// <summary>
99 /// Returns the version of this DB provider
100 /// </summary>
101 /// <returns>A string containing the provider version</returns>
102 public string getVersion()
103 {
104 return "0.1";
105 }
106 }
107}
diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
new file mode 100644
index 0000000..b2f398b
--- /dev/null
+++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
@@ -0,0 +1,609 @@
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 System.Data;
32
33// MySQL Native
34using MySql;
35using MySql.Data;
36using MySql.Data.Types;
37using MySql.Data.MySqlClient;
38
39using OpenSim.Framework.Data;
40
41namespace OpenSim.Framework.Data.MySQL
42{
43 /// <summary>
44 /// A MySQL Database manager
45 /// </summary>
46 class MySQLManager
47 {
48 /// <summary>
49 /// The database connection object
50 /// </summary>
51 IDbConnection dbcon;
52 /// <summary>
53 /// Connection string for ADO.net
54 /// </summary>
55 string connectionString;
56
57 /// <summary>
58 /// Initialises and creates a new MySQL connection and maintains it.
59 /// </summary>
60 /// <param name="hostname">The MySQL server being connected to</param>
61 /// <param name="database">The name of the MySQL database being used</param>
62 /// <param name="username">The username logging into the database</param>
63 /// <param name="password">The password for the user logging in</param>
64 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
65 public MySQLManager(string hostname, string database, string username, string password, string cpooling, string port)
66 {
67 try
68 {
69 connectionString = "Server=" + hostname + ";Port=" + port + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";";
70 dbcon = new MySqlConnection(connectionString);
71
72 dbcon.Open();
73
74 System.Console.WriteLine("MySQL connection established");
75 }
76 catch (Exception e)
77 {
78 throw new Exception("Error initialising MySql Database: " + e.ToString());
79 }
80 }
81
82 /// <summary>
83 /// Shuts down the database connection
84 /// </summary>
85 public void Close()
86 {
87 dbcon.Close();
88 dbcon = null;
89 }
90
91 /// <summary>
92 /// Reconnects to the database
93 /// </summary>
94 public void Reconnect()
95 {
96 lock (dbcon)
97 {
98 try
99 {
100 // Close the DB connection
101 dbcon.Close();
102 // Try reopen it
103 dbcon = new MySqlConnection(connectionString);
104 dbcon.Open();
105 }
106 catch (Exception e)
107 {
108 Console.WriteLine("Unable to reconnect to database " + e.ToString());
109 }
110 }
111 }
112
113 /// <summary>
114 /// Runs a query with protection against SQL Injection by using parameterised input.
115 /// </summary>
116 /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
117 /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
118 /// <returns>A MySQL DB Command</returns>
119 public IDbCommand Query(string sql, Dictionary<string, string> parameters)
120 {
121 try
122 {
123 MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand();
124 dbcommand.CommandText = sql;
125 foreach (KeyValuePair<string, string> param in parameters)
126 {
127 dbcommand.Parameters.Add(param.Key, param.Value);
128 }
129
130 return (IDbCommand)dbcommand;
131 }
132 catch
133 {
134 lock (dbcon)
135 {
136 // Close the DB connection
137 try
138 {
139 dbcon.Close();
140 }
141 catch { }
142
143 // Try reopen it
144 try
145 {
146 dbcon = new MySqlConnection(connectionString);
147 dbcon.Open();
148 }
149 catch (Exception e)
150 {
151 Console.WriteLine("Unable to reconnect to database " + e.ToString());
152 }
153
154 // Run the query again
155 try
156 {
157 MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand();
158 dbcommand.CommandText = sql;
159 foreach (KeyValuePair<string, string> param in parameters)
160 {
161 dbcommand.Parameters.Add(param.Key, param.Value);
162 }
163
164 return (IDbCommand)dbcommand;
165 }
166 catch (Exception e)
167 {
168 // Return null if it fails.
169 Console.WriteLine("Failed during Query generation: " + e.ToString());
170 return null;
171 }
172 }
173 }
174 }
175
176 /// <summary>
177 /// Reads a region row from a database reader
178 /// </summary>
179 /// <param name="reader">An active database reader</param>
180 /// <returns>A region profile</returns>
181 public SimProfileData readSimRow(IDataReader reader)
182 {
183 SimProfileData retval = new SimProfileData();
184
185 if (reader.Read())
186 {
187 // Region Main
188 retval.regionHandle = Convert.ToUInt64(reader["regionHandle"].ToString());
189 retval.regionName = (string)reader["regionName"];
190 retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]);
191
192 // Secrets
193 retval.regionRecvKey = (string)reader["regionRecvKey"];
194 retval.regionSecret = (string)reader["regionSecret"];
195 retval.regionSendKey = (string)reader["regionSendKey"];
196
197 // Region Server
198 retval.regionDataURI = (string)reader["regionDataURI"];
199 retval.regionOnline = false; // Needs to be pinged before this can be set.
200 retval.serverIP = (string)reader["serverIP"];
201 retval.serverPort = (uint)reader["serverPort"];
202 retval.serverURI = (string)reader["serverURI"];
203
204 // Location
205 retval.regionLocX = Convert.ToUInt32(reader["locX"].ToString());
206 retval.regionLocY = Convert.ToUInt32(reader["locY"].ToString());
207 retval.regionLocZ = Convert.ToUInt32(reader["locZ"].ToString());
208
209 // Neighbours - 0 = No Override
210 retval.regionEastOverrideHandle = Convert.ToUInt64(reader["eastOverrideHandle"].ToString());
211 retval.regionWestOverrideHandle = Convert.ToUInt64(reader["westOverrideHandle"].ToString());
212 retval.regionSouthOverrideHandle = Convert.ToUInt64(reader["southOverrideHandle"].ToString());
213 retval.regionNorthOverrideHandle = Convert.ToUInt64(reader["northOverrideHandle"].ToString());
214
215 // Assets
216 retval.regionAssetURI = (string)reader["regionAssetURI"];
217 retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
218 retval.regionAssetSendKey = (string)reader["regionAssetSendKey"];
219
220 // Userserver
221 retval.regionUserURI = (string)reader["regionUserURI"];
222 retval.regionUserRecvKey = (string)reader["regionUserRecvKey"];
223 retval.regionUserSendKey = (string)reader["regionUserSendKey"];
224
225 // World Map Addition
226 string tempRegionMap = reader["regionMapTexture"].ToString();
227 if (tempRegionMap != "")
228 {
229 retval.regionMapTextureID = new libsecondlife.LLUUID(tempRegionMap);
230 }
231 else
232 {
233 retval.regionMapTextureID = new libsecondlife.LLUUID();
234 }
235 }
236 else
237 {
238 return null;
239 }
240 return retval;
241 }
242
243 /// <summary>
244 /// Reads a reservation row from a database reader
245 /// </summary>
246 /// <param name="reader">An active database reader</param>
247 /// <returns>A reservation data object</returns>
248 public ReservationData readReservationRow(IDataReader reader)
249 {
250 ReservationData retval = new ReservationData();
251 if (reader.Read())
252 {
253 retval.gridRecvKey = (string)reader["gridRecvKey"];
254 retval.gridSendKey = (string)reader["gridSendKey"];
255 retval.reservationCompany = (string)reader["resCompany"];
256 retval.reservationMaxX = (int)reader["resXMax"];
257 retval.reservationMaxY = (int)reader["resYMax"];
258 retval.reservationMinX = (int)reader["resXMin"];
259 retval.reservationMinY = (int)reader["resYMin"];
260 retval.reservationName = (string)reader["resName"];
261 retval.status = (bool)reader["status"];
262 retval.userUUID = new libsecondlife.LLUUID((string)reader["userUUID"]);
263
264 }
265 else
266 {
267 return null;
268 }
269 return retval;
270 }
271 /// <summary>
272 /// Reads an agent row from a database reader
273 /// </summary>
274 /// <param name="reader">An active database reader</param>
275 /// <returns>A user session agent</returns>
276 public UserAgentData readAgentRow(IDataReader reader)
277 {
278 UserAgentData retval = new UserAgentData();
279
280 if (reader.Read())
281 {
282 // Agent IDs
283 retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
284 retval.sessionID = new libsecondlife.LLUUID((string)reader["sessionID"]);
285 retval.secureSessionID = new libsecondlife.LLUUID((string)reader["secureSessionID"]);
286
287 // Agent Who?
288 retval.agentIP = (string)reader["agentIP"];
289 retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString());
290 retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString());
291
292 // Login/Logout times (UNIX Epoch)
293 retval.loginTime = Convert.ToInt32(reader["loginTime"].ToString());
294 retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString());
295
296 // Current position
297 retval.currentRegion = (string)reader["currentRegion"];
298 retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString());
299 libsecondlife.LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos);
300 }
301 else
302 {
303 return null;
304 }
305 return retval;
306 }
307
308 /// <summary>
309 /// Reads a user profile from an active data reader
310 /// </summary>
311 /// <param name="reader">An active database reader</param>
312 /// <returns>A user profile</returns>
313 public UserProfileData readUserRow(IDataReader reader)
314 {
315 UserProfileData retval = new UserProfileData();
316
317 if (reader.Read())
318 {
319 retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
320 retval.username = (string)reader["username"];
321 retval.surname = (string)reader["lastname"];
322
323 retval.passwordHash = (string)reader["passwordHash"];
324 retval.passwordSalt = (string)reader["passwordSalt"];
325
326 retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
327 retval.homeLocation = new libsecondlife.LLVector3(
328 Convert.ToSingle(reader["homeLocationX"].ToString()),
329 Convert.ToSingle(reader["homeLocationY"].ToString()),
330 Convert.ToSingle(reader["homeLocationZ"].ToString()));
331 retval.homeLookAt = new libsecondlife.LLVector3(
332 Convert.ToSingle(reader["homeLookAtX"].ToString()),
333 Convert.ToSingle(reader["homeLookAtY"].ToString()),
334 Convert.ToSingle(reader["homeLookAtZ"].ToString()));
335
336 retval.created = Convert.ToInt32(reader["created"].ToString());
337 retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
338
339 retval.userInventoryURI = (string)reader["userInventoryURI"];
340 retval.userAssetURI = (string)reader["userAssetURI"];
341
342 retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
343 retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
344
345 retval.profileAboutText = (string)reader["profileAboutText"];
346 retval.profileFirstText = (string)reader["profileFirstText"];
347
348 retval.profileImage = new libsecondlife.LLUUID((string)reader["profileImage"]);
349 retval.profileFirstImage = new libsecondlife.LLUUID((string)reader["profileFirstImage"]);
350
351 }
352 else
353 {
354 return null;
355 }
356 return retval;
357 }
358
359 /// <summary>
360 /// Reads a list of inventory folders returned by a query.
361 /// </summary>
362 /// <param name="reader">A MySQL Data Reader</param>
363 /// <returns>A List containing inventory folders</returns>
364 public List<InventoryFolderBase> readInventoryFolders(IDataReader reader)
365 {
366 List<InventoryFolderBase> rows = new List<InventoryFolderBase>();
367
368 while(reader.Read())
369 {
370 try
371 {
372 InventoryFolderBase folder = new InventoryFolderBase();
373
374 folder.agentID = new libsecondlife.LLUUID((string)reader["agentID"]);
375 folder.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
376 folder.folderID = new libsecondlife.LLUUID((string)reader["folderID"]);
377 folder.name = (string)reader["folderName"];
378
379 rows.Add(folder);
380 }
381 catch (Exception e)
382 {
383 Console.WriteLine(e.ToString());
384 }
385 }
386
387 return rows;
388 }
389
390 /// <summary>
391 /// Reads a collection of items from an SQL result
392 /// </summary>
393 /// <param name="reader">The SQL Result</param>
394 /// <returns>A List containing Inventory Items</returns>
395 public List<InventoryItemBase> readInventoryItems(IDataReader reader)
396 {
397 List<InventoryItemBase> rows = new List<InventoryItemBase>();
398
399 while (reader.Read())
400 {
401 try
402 {
403 InventoryItemBase item = new InventoryItemBase();
404
405 item.assetID = new libsecondlife.LLUUID((string)reader["assetID"]);
406 item.avatarID = new libsecondlife.LLUUID((string)reader["avatarID"]);
407 item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString());
408 item.inventoryDescription = (string)reader["inventoryDescription"];
409 item.inventoryID = new libsecondlife.LLUUID((string)reader["inventoryID"]);
410 item.inventoryName = (string)reader["inventoryName"];
411 item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString());
412 item.parentFolderID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
413 item.type = Convert.ToInt32(reader["type"].ToString());
414
415 rows.Add(item);
416 }
417 catch (Exception e)
418 {
419 Console.WriteLine(e.ToString());
420 }
421 }
422
423 return rows;
424 }
425
426 /// <summary>
427 /// Inserts a new row into the log database
428 /// </summary>
429 /// <param name="serverDaemon">The daemon which triggered this event</param>
430 /// <param name="target">Who were we operating on when this occured (region UUID, user UUID, etc)</param>
431 /// <param name="methodCall">The method call where the problem occured</param>
432 /// <param name="arguments">The arguments passed to the method</param>
433 /// <param name="priority">How critical is this?</param>
434 /// <param name="logMessage">Extra message info</param>
435 /// <returns>Saved successfully?</returns>
436 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
437 {
438 string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES ";
439 sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)";
440
441 Dictionary<string, string> parameters = new Dictionary<string, string>();
442 parameters["?server"] = serverDaemon;
443 parameters["?target"] = target;
444 parameters["?method"] = methodCall;
445 parameters["?arguments"] = arguments;
446 parameters["?priority"] = priority.ToString();
447 parameters["?message"] = logMessage;
448
449 bool returnval = false;
450
451 try
452 {
453 IDbCommand result = Query(sql, parameters);
454
455 if (result.ExecuteNonQuery() == 1)
456 returnval = true;
457
458 result.Dispose();
459 }
460 catch (Exception e)
461 {
462 Console.WriteLine(e.ToString());
463 return false;
464 }
465
466 return returnval;
467 }
468
469 /// <summary>
470 /// Inserts a new item into the database
471 /// </summary>
472 /// <param name="item">The item</param>
473 /// <returns>Success?</returns>
474 public bool insertItem(InventoryItemBase item)
475 {
476 string sql = "REPLACE INTO inventoryitems (inventoryID, assetID, type, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions) VALUES ";
477 sql += "(?inventoryID, ?assetID, ?type, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription, ?inventoryNextPermissions, ?inventoryCurrentPermissions)";
478
479 Dictionary<string, string> parameters = new Dictionary<string, string>();
480 parameters["?inventoryID"] = item.inventoryID.ToStringHyphenated();
481 parameters["?assetID"] = item.assetID.ToStringHyphenated();
482 parameters["?type"] = item.type.ToString();
483 parameters["?parentFolderID"] = item.parentFolderID.ToStringHyphenated();
484 parameters["?avatarID"] = item.avatarID.ToStringHyphenated();
485 parameters["?inventoryName"] = item.inventoryName;
486 parameters["?inventoryDescription"] = item.inventoryDescription;
487 parameters["?inventoryNextPermissions"] = item.inventoryNextPermissions.ToString();
488 parameters["?inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString();
489
490 bool returnval = false;
491
492 try
493 {
494 IDbCommand result = Query(sql, parameters);
495
496 if (result.ExecuteNonQuery() == 1)
497 returnval = true;
498
499 result.Dispose();
500 }
501 catch (Exception e)
502 {
503 Console.WriteLine(e.ToString());
504 return false;
505 }
506
507 return returnval;
508 }
509
510 /// <summary>
511 /// Inserts a new folder into the database
512 /// </summary>
513 /// <param name="folder">The folder</param>
514 /// <returns>Success?</returns>
515 public bool insertFolder(InventoryFolderBase folder)
516 {
517 string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName) VALUES ";
518 sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName)";
519
520 Dictionary<string, string> parameters = new Dictionary<string, string>();
521 parameters["?folderID"] = folder.folderID.ToStringHyphenated();
522 parameters["?agentID"] = folder.agentID.ToStringHyphenated();
523 parameters["?parentFolderID"] = folder.parentID.ToStringHyphenated();
524 parameters["?folderName"] = folder.name;
525
526 bool returnval = false;
527 try
528 {
529 IDbCommand result = Query(sql, parameters);
530
531 if (result.ExecuteNonQuery() == 1)
532 returnval = true;
533
534 result.Dispose();
535 }
536 catch (Exception e)
537 {
538 Console.WriteLine(e.ToString());
539 return false;
540 }
541 return returnval;
542 }
543
544 /// <summary>
545 /// Inserts a new region into the database
546 /// </summary>
547 /// <param name="profile">The region to insert</param>
548 /// <returns>Success?</returns>
549 public bool insertRegion(SimProfileData regiondata)
550 {
551 string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
552 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
553 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture) VALUES ";
554
555 sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, ";
556 sql += "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, ";
557 sql += "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture);";
558
559 Dictionary<string, string> parameters = new Dictionary<string, string>();
560
561 parameters["?regionHandle"] = regiondata.regionHandle.ToString();
562 parameters["?regionName"] = regiondata.regionName.ToString();
563 parameters["?uuid"] = regiondata.UUID.ToStringHyphenated();
564 parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString();
565 parameters["?regionSecret"] = regiondata.regionSecret.ToString();
566 parameters["?regionSendKey"] = regiondata.regionSendKey.ToString();
567 parameters["?regionDataURI"] = regiondata.regionDataURI.ToString();
568 parameters["?serverIP"] = regiondata.serverIP.ToString();
569 parameters["?serverPort"] = regiondata.serverPort.ToString();
570 parameters["?serverURI"] = regiondata.serverURI.ToString();
571 parameters["?locX"] = regiondata.regionLocX.ToString();
572 parameters["?locY"] = regiondata.regionLocY.ToString();
573 parameters["?locZ"] = regiondata.regionLocZ.ToString();
574 parameters["?eastOverrideHandle"] = regiondata.regionEastOverrideHandle.ToString();
575 parameters["?westOverrideHandle"] = regiondata.regionWestOverrideHandle.ToString();
576 parameters["?northOverrideHandle"] = regiondata.regionNorthOverrideHandle.ToString();
577 parameters["?southOverrideHandle"] = regiondata.regionSouthOverrideHandle.ToString();
578 parameters["?regionAssetURI"] = regiondata.regionAssetURI.ToString();
579 parameters["?regionAssetRecvKey"] = regiondata.regionAssetRecvKey.ToString();
580 parameters["?regionAssetSendKey"] = regiondata.regionAssetSendKey.ToString();
581 parameters["?regionUserURI"] = regiondata.regionUserURI.ToString();
582 parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString();
583 parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString();
584 parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated();
585
586 bool returnval = false;
587
588 try
589 {
590
591 IDbCommand result = Query(sql, parameters);
592
593 //Console.WriteLine(result.CommandText);
594
595 if (result.ExecuteNonQuery() == 1)
596 returnval = true;
597
598 result.Dispose();
599 }
600 catch (Exception e)
601 {
602 Console.WriteLine(e.ToString());
603 return false;
604 }
605
606 return returnval;
607 }
608 }
609}
diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
new file mode 100644
index 0000000..0304452
--- /dev/null
+++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
@@ -0,0 +1,257 @@
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 OpenSim.Framework.Data;
32using libsecondlife;
33
34namespace OpenSim.Framework.Data.MySQL
35{
36 /// <summary>
37 /// A database interface class to a user profile storage system
38 /// </summary>
39 class MySQLUserData : IUserData
40 {
41 /// <summary>
42 /// Database manager for MySQL
43 /// </summary>
44 public MySQLManager database;
45
46 /// <summary>
47 /// Loads and initialises the MySQL storage plugin
48 /// </summary>
49 public void Initialise()
50 {
51 // Load from an INI file connection details
52 // TODO: move this to XML?
53 IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
54 string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
55 string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
56 string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
57 string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
58 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
59 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
60
61 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
62 }
63
64 /// <summary>
65 /// Searches the database for a specified user profile
66 /// </summary>
67 /// <param name="name">The account name of the user</param>
68 /// <returns>A user profile</returns>
69 public UserProfileData getUserByName(string name)
70 {
71 return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
72 }
73
74 /// <summary>
75 /// Searches the database for a specified user profile by name components
76 /// </summary>
77 /// <param name="user">The first part of the account name</param>
78 /// <param name="last">The second part of the account name</param>
79 /// <returns>A user profile</returns>
80 public UserProfileData getUserByName(string user, string last)
81 {
82 try
83 {
84 lock (database)
85 {
86 Dictionary<string, string> param = new Dictionary<string, string>();
87 param["?first"] = user;
88 param["?second"] = last;
89
90 System.Data.IDbCommand result = database.Query("SELECT * FROM users WHERE username = ?first AND lastname = ?second", param);
91 System.Data.IDataReader reader = result.ExecuteReader();
92
93 UserProfileData row = database.readUserRow(reader);
94
95 reader.Close();
96 result.Dispose();
97
98 return row;
99 }
100 }
101 catch (Exception e)
102 {
103 database.Reconnect();
104 Console.WriteLine(e.ToString());
105 return null;
106 }
107 }
108
109 /// <summary>
110 /// Searches the database for a specified user profile by UUID
111 /// </summary>
112 /// <param name="uuid">The account ID</param>
113 /// <returns>The users profile</returns>
114 public UserProfileData getUserByUUID(LLUUID uuid)
115 {
116 try
117 {
118 lock (database)
119 {
120 Dictionary<string, string> param = new Dictionary<string, string>();
121 param["?uuid"] = uuid.ToStringHyphenated();
122
123 System.Data.IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param);
124 System.Data.IDataReader reader = result.ExecuteReader();
125
126 UserProfileData row = database.readUserRow(reader);
127
128 reader.Close();
129 result.Dispose();
130
131 return row;
132 }
133 }
134 catch (Exception e)
135 {
136 database.Reconnect();
137 Console.WriteLine(e.ToString());
138 return null;
139 }
140 }
141
142 /// <summary>
143 /// Returns a user session searching by name
144 /// </summary>
145 /// <param name="name">The account name</param>
146 /// <returns>The users session</returns>
147 public UserAgentData getAgentByName(string name)
148 {
149 return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
150 }
151
152 /// <summary>
153 /// Returns a user session by account name
154 /// </summary>
155 /// <param name="user">First part of the users account name</param>
156 /// <param name="last">Second part of the users account name</param>
157 /// <returns>The users session</returns>
158 public UserAgentData getAgentByName(string user, string last)
159 {
160 UserProfileData profile = getUserByName(user, last);
161 return getAgentByUUID(profile.UUID);
162 }
163
164 /// <summary>
165 /// Returns an agent session by account UUID
166 /// </summary>
167 /// <param name="uuid">The accounts UUID</param>
168 /// <returns>The users session</returns>
169 public UserAgentData getAgentByUUID(LLUUID uuid)
170 {
171 try
172 {
173 lock (database)
174 {
175 Dictionary<string, string> param = new Dictionary<string, string>();
176 param["?uuid"] = uuid.ToStringHyphenated();
177
178 System.Data.IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param);
179 System.Data.IDataReader reader = result.ExecuteReader();
180
181 UserAgentData row = database.readAgentRow(reader);
182
183 reader.Close();
184 result.Dispose();
185
186 return row;
187 }
188 }
189 catch (Exception e)
190 {
191 database.Reconnect();
192 Console.WriteLine(e.ToString());
193 return null;
194 }
195 }
196
197 /// <summary>
198 /// Creates a new users profile
199 /// </summary>
200 /// <param name="user">The user profile to create</param>
201 public void addNewUserProfile(UserProfileData user)
202 {
203 }
204
205 /// <summary>
206 /// Creates a new agent
207 /// </summary>
208 /// <param name="agent">The agent to create</param>
209 public void addNewUserAgent(UserAgentData agent)
210 {
211 // Do nothing.
212 }
213
214 /// <summary>
215 /// Performs a money transfer request between two accounts
216 /// </summary>
217 /// <param name="from">The senders account ID</param>
218 /// <param name="to">The recievers account ID</param>
219 /// <param name="amount">The amount to transfer</param>
220 /// <returns>Success?</returns>
221 public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
222 {
223 return false;
224 }
225
226 /// <summary>
227 /// Performs an inventory transfer request between two accounts
228 /// </summary>
229 /// <remarks>TODO: Move to inventory server</remarks>
230 /// <param name="from">The senders account ID</param>
231 /// <param name="to">The recievers account ID</param>
232 /// <param name="item">The item to transfer</param>
233 /// <returns>Success?</returns>
234 public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
235 {
236 return false;
237 }
238
239 /// <summary>
240 /// Database provider name
241 /// </summary>
242 /// <returns>Provider name</returns>
243 public string getName()
244 {
245 return "MySQL Userdata Interface";
246 }
247
248 /// <summary>
249 /// Database provider version
250 /// </summary>
251 /// <returns>provider version</returns>
252 public string getVersion()
253 {
254 return "0.1";
255 }
256 }
257}
diff --git a/OpenSim/Framework/Data.MySQL/OpenSim.Framework.Data.MySQL.csproj b/OpenSim/Framework/Data.MySQL/OpenSim.Framework.Data.MySQL.csproj
new file mode 100644
index 0000000..62e3887
--- /dev/null
+++ b/OpenSim/Framework/Data.MySQL/OpenSim.Framework.Data.MySQL.csproj
@@ -0,0 +1,117 @@
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>{17F7F6BE-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.Data.MySQL</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.Data.MySQL</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="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="MySql.Data.dll" >
66 <HintPath>..\..\..\bin\MySql.Data.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.Data" >
74 <HintPath>System.Data.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="System.Xml" >
78 <HintPath>System.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 <ProjectReference Include="..\Data\OpenSim.Framework.Data.csproj">
84 <Name>OpenSim.Framework.Data</Name>
85 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private>
88 </ProjectReference>
89 </ItemGroup>
90 <ItemGroup>
91 <Compile Include="MySQLGridData.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="MySQLInventoryData.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="MySQLLogData.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 <Compile Include="MySQLManager.cs">
101 <SubType>Code</SubType>
102 </Compile>
103 <Compile Include="MySQLUserData.cs">
104 <SubType>Code</SubType>
105 </Compile>
106 <Compile Include="Properties\AssemblyInfo.cs">
107 <SubType>Code</SubType>
108 </Compile>
109 </ItemGroup>
110 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
111 <PropertyGroup>
112 <PreBuildEvent>
113 </PreBuildEvent>
114 <PostBuildEvent>
115 </PostBuildEvent>
116 </PropertyGroup>
117</Project>
diff --git a/OpenSim/Framework/Data.MySQL/OpenSim.Framework.Data.MySQL.dll.build b/OpenSim/Framework/Data.MySQL/OpenSim.Framework.Data.MySQL.dll.build
new file mode 100644
index 0000000..594ec52
--- /dev/null
+++ b/OpenSim/Framework/Data.MySQL/OpenSim.Framework.Data.MySQL.dll.build
@@ -0,0 +1,49 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.Data.MySQL" 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.Data.MySQL" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="MySQLGridData.cs" />
15 <include name="MySQLInventoryData.cs" />
16 <include name="MySQLLogData.cs" />
17 <include name="MySQLManager.cs" />
18 <include name="MySQLUserData.cs" />
19 <include name="Properties/AssemblyInfo.cs" />
20 </sources>
21 <references basedir="${project::get-base-directory()}">
22 <lib>
23 <include name="${project::get-base-directory()}" />
24 <include name="${project::get-base-directory()}/${build.dir}" />
25 </lib>
26 <include name="../../../bin/libsecondlife.dll" />
27 <include name="../../../bin/MySql.Data.dll" />
28 <include name="../../../bin/OpenSim.Framework.Data.dll" />
29 <include name="System.dll" />
30 <include name="System.Data.dll" />
31 <include name="System.Xml.dll" />
32 </references>
33 </csc>
34 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
35 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
36 <copy todir="${project::get-base-directory()}/../../../bin/">
37 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
38 <include name="*.dll"/>
39 <include name="*.exe"/>
40 </fileset>
41 </copy>
42 </target>
43 <target name="clean">
44 <delete dir="${bin.dir}" failonerror="false" />
45 <delete dir="${obj.dir}" failonerror="false" />
46 </target>
47 <target name="doc" description="Creates documentation.">
48 </target>
49</project>
diff --git a/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..d67ccf6
--- /dev/null
+++ b/OpenSim/Framework/Data.MySQL/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
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.Data.MySQL")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Framework.Data.MySQL")]
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("e49826b2-dcef-41be-a5bd-596733fa3304")]
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// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data.SQLite/OpenSim.Framework.Data.SQLite.csproj b/OpenSim/Framework/Data.SQLite/OpenSim.Framework.Data.SQLite.csproj
new file mode 100644
index 0000000..4ba24f1
--- /dev/null
+++ b/OpenSim/Framework/Data.SQLite/OpenSim.Framework.Data.SQLite.csproj
@@ -0,0 +1,108 @@
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>{6ECC56A9-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.Data.SQLite</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.Data.SQLite</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="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System" >
66 <HintPath>System.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Data" >
70 <HintPath>System.Data.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="System.Data.SQLite.dll" >
74 <HintPath>..\..\..\bin\System.Data.SQLite.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="System.Xml" >
78 <HintPath>System.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 <ProjectReference Include="..\Data\OpenSim.Framework.Data.csproj">
84 <Name>OpenSim.Framework.Data</Name>
85 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private>
88 </ProjectReference>
89 </ItemGroup>
90 <ItemGroup>
91 <Compile Include="SQLiteGridData.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="SQLiteManager.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="Properties\AssemblyInfo.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 </ItemGroup>
101 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
102 <PropertyGroup>
103 <PreBuildEvent>
104 </PreBuildEvent>
105 <PostBuildEvent>
106 </PostBuildEvent>
107 </PropertyGroup>
108</Project>
diff --git a/OpenSim/Framework/Data.SQLite/OpenSim.Framework.Data.SQLite.dll.build b/OpenSim/Framework/Data.SQLite/OpenSim.Framework.Data.SQLite.dll.build
new file mode 100644
index 0000000..e28d0a6
--- /dev/null
+++ b/OpenSim/Framework/Data.SQLite/OpenSim.Framework.Data.SQLite.dll.build
@@ -0,0 +1,46 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.Data.SQLite" 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.Data.SQLite" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="SQLiteGridData.cs" />
15 <include name="SQLiteManager.cs" />
16 <include name="Properties/AssemblyInfo.cs" />
17 </sources>
18 <references basedir="${project::get-base-directory()}">
19 <lib>
20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib>
23 <include name="../../../bin/libsecondlife.dll" />
24 <include name="../../../bin/OpenSim.Framework.Data.dll" />
25 <include name="System.dll" />
26 <include name="System.Data.dll" />
27 <include name="../../../bin/System.Data.SQLite.dll" />
28 <include name="System.Xml.dll" />
29 </references>
30 </csc>
31 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
32 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
33 <copy todir="${project::get-base-directory()}/../../../bin/">
34 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
35 <include name="*.dll"/>
36 <include name="*.exe"/>
37 </fileset>
38 </copy>
39 </target>
40 <target name="clean">
41 <delete dir="${bin.dir}" failonerror="false" />
42 <delete dir="${obj.dir}" failonerror="false" />
43 </target>
44 <target name="doc" description="Creates documentation.">
45 </target>
46</project>
diff --git a/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..f811825
--- /dev/null
+++ b/OpenSim/Framework/Data.SQLite/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
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.Data.SQLite")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Framework.Data.SQLite")]
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("6113d5ce-4547-49f4-9236-0dcc503457b1")]
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// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
new file mode 100644
index 0000000..800e26c
--- /dev/null
+++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs
@@ -0,0 +1,195 @@
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 OpenSim.Framework.Data;
32
33namespace OpenSim.Framework.Data.SQLite
34{
35 /// <summary>
36 /// A Grid Interface to the SQLite database
37 /// </summary>
38 public class SQLiteGridData : IGridData
39 {
40 /// <summary>
41 /// A database manager
42 /// </summary>
43 private SQLiteManager database;
44
45 /// <summary>
46 /// Initialises the Grid Interface
47 /// </summary>
48 public void Initialise()
49 {
50 database = new SQLiteManager("localhost", "db", "user", "password", "false");
51 }
52
53 /// <summary>
54 /// Shuts down the grid interface
55 /// </summary>
56 public void Close()
57 {
58 database.Close();
59 }
60
61 /// <summary>
62 /// Returns the name of this grid interface
63 /// </summary>
64 /// <returns>A string containing the grid interface</returns>
65 public string getName()
66 {
67 return "SQLite OpenGridData";
68 }
69
70 /// <summary>
71 /// Returns the version of this grid interface
72 /// </summary>
73 /// <returns>A string containing the version</returns>
74 public string getVersion()
75 {
76 return "0.1";
77 }
78
79 /// <summary>
80 /// Returns a list of regions within the specified ranges
81 /// </summary>
82 /// <param name="a">minimum X coordinate</param>
83 /// <param name="b">minimum Y coordinate</param>
84 /// <param name="c">maximum X coordinate</param>
85 /// <param name="d">maximum Y coordinate</param>
86 /// <returns>An array of region profiles</returns>
87 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
88 {
89 return null;
90 }
91
92 /// <summary>
93 /// Returns a sim profile from it's location
94 /// </summary>
95 /// <param name="handle">Region location handle</param>
96 /// <returns>Sim profile</returns>
97 public SimProfileData GetProfileByHandle(ulong handle)
98 {
99 Dictionary<string, string> param = new Dictionary<string, string>();
100 param["handle"] = handle.ToString();
101
102 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
103 System.Data.IDataReader reader = result.ExecuteReader();
104
105 SimProfileData row = database.getRow(reader);
106 reader.Close();
107 result.Dispose();
108
109 return row;
110 }
111
112 /// <summary>
113 /// Returns a sim profile from it's UUID
114 /// </summary>
115 /// <param name="uuid">The region UUID</param>
116 /// <returns>The sim profile</returns>
117 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
118 {
119 Dictionary<string, string> param = new Dictionary<string, string>();
120 param["uuid"] = uuid.ToStringHyphenated();
121
122 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
123 System.Data.IDataReader reader = result.ExecuteReader();
124
125 SimProfileData row = database.getRow(reader);
126 reader.Close();
127 result.Dispose();
128
129 return row;
130 }
131
132 /// <summary>
133 /// Adds a new specified region to the database
134 /// </summary>
135 /// <param name="profile">The profile to add</param>
136 /// <returns>A dataresponse enum indicating success</returns>
137 public DataResponse AddProfile(SimProfileData profile)
138 {
139 if (database.insertRow(profile))
140 {
141 return DataResponse.RESPONSE_OK;
142 }
143 else
144 {
145 return DataResponse.RESPONSE_ERROR;
146 }
147 }
148
149 /// <summary>
150 /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
151 /// </summary>
152 /// <param name="uuid">The UUID of the challenger</param>
153 /// <param name="handle">The attempted regionHandle of the challenger</param>
154 /// <param name="authkey">The secret</param>
155 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
156 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
157 {
158 bool throwHissyFit = false; // Should be true by 1.0
159
160 if (throwHissyFit)
161 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
162
163 SimProfileData data = GetProfileByLLUUID(uuid);
164
165 return (handle == data.regionHandle && authkey == data.regionSecret);
166 }
167
168 /// <summary>
169 /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
170 /// </summary>
171 /// <remarks>This requires a security audit.</remarks>
172 /// <param name="uuid"></param>
173 /// <param name="handle"></param>
174 /// <param name="authhash"></param>
175 /// <param name="challenge"></param>
176 /// <returns></returns>
177 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge)
178 {
179 System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed();
180 System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding();
181
182 byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
183 byte[] hash = HashProvider.ComputeHash(stream);
184
185 return false;
186 }
187
188 public ReservationData GetReservationAtPoint(uint x, uint y)
189 {
190 return null;
191 }
192 }
193
194
195}
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
new file mode 100644
index 0000000..b67b79c
--- /dev/null
+++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
@@ -0,0 +1,209 @@
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 System.Data;
32
33using System.Data.SQLite;
34
35using OpenSim.Framework.Data;
36
37namespace OpenSim.Framework.Data.SQLite
38{
39 class SQLiteManager
40 {
41 IDbConnection dbcon;
42
43 /// <summary>
44 /// Initialises and creates a new SQLite connection and maintains it.
45 /// </summary>
46 /// <param name="hostname">The SQLite server being connected to</param>
47 /// <param name="database">The name of the SQLite database being used</param>
48 /// <param name="username">The username logging into the database</param>
49 /// <param name="password">The password for the user logging in</param>
50 /// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
51 public SQLiteManager(string hostname, string database, string username, string password, string cpooling)
52 {
53 try
54 {
55 string connectionString = "URI=file:GridServerSqlite.db;";
56 dbcon = new SQLiteConnection(connectionString);
57
58 dbcon.Open();
59 }
60 catch (Exception e)
61 {
62 throw new Exception("Error initialising SQLite Database: " + e.ToString());
63 }
64 }
65
66 /// <summary>
67 /// Shuts down the database connection
68 /// </summary>
69 public void Close()
70 {
71 dbcon.Close();
72 dbcon = null;
73 }
74
75 /// <summary>
76 /// Runs a query with protection against SQL Injection by using parameterised input.
77 /// </summary>
78 /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
79 /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
80 /// <returns>A SQLite DB Command</returns>
81 public IDbCommand Query(string sql, Dictionary<string, string> parameters)
82 {
83 SQLiteCommand dbcommand = (SQLiteCommand)dbcon.CreateCommand();
84 dbcommand.CommandText = sql;
85 foreach (KeyValuePair<string, string> param in parameters)
86 {
87 SQLiteParameter paramx = new SQLiteParameter(param.Key,param.Value);
88 dbcommand.Parameters.Add(paramx);
89 }
90
91 return (IDbCommand)dbcommand;
92 }
93
94 /// <summary>
95 /// Reads a region row from a database reader
96 /// </summary>
97 /// <param name="reader">An active database reader</param>
98 /// <returns>A region profile</returns>
99 public SimProfileData getRow(IDataReader reader)
100 {
101 SimProfileData retval = new SimProfileData();
102
103 if (reader.Read())
104 {
105 // Region Main
106 retval.regionHandle = (ulong)reader["regionHandle"];
107 retval.regionName = (string)reader["regionName"];
108 retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]);
109
110 // Secrets
111 retval.regionRecvKey = (string)reader["regionRecvKey"];
112 retval.regionSecret = (string)reader["regionSecret"];
113 retval.regionSendKey = (string)reader["regionSendKey"];
114
115 // Region Server
116 retval.regionDataURI = (string)reader["regionDataURI"];
117 retval.regionOnline = false; // Needs to be pinged before this can be set.
118 retval.serverIP = (string)reader["serverIP"];
119 retval.serverPort = (uint)reader["serverPort"];
120 retval.serverURI = (string)reader["serverURI"];
121
122 // Location
123 retval.regionLocX = (uint)((int)reader["locX"]);
124 retval.regionLocY = (uint)((int)reader["locY"]);
125 retval.regionLocZ = (uint)((int)reader["locZ"]);
126
127 // Neighbours - 0 = No Override
128 retval.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"];
129 retval.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"];
130 retval.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"];
131 retval.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"];
132
133 // Assets
134 retval.regionAssetURI = (string)reader["regionAssetURI"];
135 retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
136 retval.regionAssetSendKey = (string)reader["regionAssetSendKey"];
137
138 // Userserver
139 retval.regionUserURI = (string)reader["regionUserURI"];
140 retval.regionUserRecvKey = (string)reader["regionUserRecvKey"];
141 retval.regionUserSendKey = (string)reader["regionUserSendKey"];
142 }
143 else
144 {
145 throw new Exception("No rows to return");
146 }
147 return retval;
148 }
149
150 /// <summary>
151 /// Inserts a new region into the database
152 /// </summary>
153 /// <param name="profile">The region to insert</param>
154 /// <returns>Success?</returns>
155 public bool insertRow(SimProfileData profile)
156 {
157 string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
158 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
159 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES ";
160
161 sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, ";
162 sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, ";
163 sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);";
164
165 Dictionary<string, string> parameters = new Dictionary<string, string>();
166
167 parameters["regionHandle"] = profile.regionHandle.ToString();
168 parameters["regionName"] = profile.regionName;
169 parameters["uuid"] = profile.UUID.ToString();
170 parameters["regionRecvKey"] = profile.regionRecvKey;
171 parameters["regionSendKey"] = profile.regionSendKey;
172 parameters["regionDataURI"] = profile.regionDataURI;
173 parameters["serverIP"] = profile.serverIP;
174 parameters["serverPort"] = profile.serverPort.ToString();
175 parameters["serverURI"] = profile.serverURI;
176 parameters["locX"] = profile.regionLocX.ToString();
177 parameters["locY"] = profile.regionLocY.ToString();
178 parameters["locZ"] = profile.regionLocZ.ToString();
179 parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString();
180 parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString();
181 parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString();
182 parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString();
183 parameters["regionAssetURI"] = profile.regionAssetURI;
184 parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey;
185 parameters["regionAssetSendKey"] = profile.regionAssetSendKey;
186 parameters["regionUserURI"] = profile.regionUserURI;
187 parameters["regionUserRecvKey"] = profile.regionUserRecvKey;
188 parameters["regionUserSendKey"] = profile.regionUserSendKey;
189
190 bool returnval = false;
191
192 try
193 {
194 IDbCommand result = Query(sql, parameters);
195
196 if (result.ExecuteNonQuery() == 1)
197 returnval = true;
198
199 result.Dispose();
200 }
201 catch (Exception e)
202 {
203 return false;
204 }
205
206 return returnval;
207 }
208 }
209}
diff --git a/OpenSim/Framework/Data/GridData.cs b/OpenSim/Framework/Data/GridData.cs
new file mode 100644
index 0000000..7f8fdaf
--- /dev/null
+++ b/OpenSim/Framework/Data/GridData.cs
@@ -0,0 +1,113 @@
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.Data
33{
34 public enum DataResponse
35 {
36 RESPONSE_OK,
37 RESPONSE_AUTHREQUIRED,
38 RESPONSE_INVALIDCREDENTIALS,
39 RESPONSE_ERROR
40 }
41
42 /// <summary>
43 /// A standard grid interface
44 /// </summary>
45 public interface IGridData
46 {
47 /// <summary>
48 /// Returns a sim profile from a regionHandle
49 /// </summary>
50 /// <param name="regionHandle">A 64bit Region Handle</param>
51 /// <returns>A simprofile</returns>
52 SimProfileData GetProfileByHandle(ulong regionHandle);
53
54 /// <summary>
55 /// Returns a sim profile from a UUID
56 /// </summary>
57 /// <param name="UUID">A 128bit UUID</param>
58 /// <returns>A sim profile</returns>
59 SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID);
60
61 /// <summary>
62 /// Returns all profiles within the specified range
63 /// </summary>
64 /// <param name="Xmin">Minimum sim coordinate (X)</param>
65 /// <param name="Ymin">Minimum sim coordinate (Y)</param>
66 /// <param name="Xmax">Maximum sim coordinate (X)</param>
67 /// <param name="Ymin">Maximum sim coordinate (Y)</param>
68 /// <returns>An array containing all the sim profiles in the specified range</returns>
69 SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
70
71 /// <summary>
72 /// Authenticates a sim by use of it's recv key.
73 /// WARNING: Insecure
74 /// </summary>
75 /// <param name="UUID">The UUID sent by the sim</param>
76 /// <param name="regionHandle">The regionhandle sent by the sim</param>
77 /// <param name="simrecvkey">The recieving key sent by the sim</param>
78 /// <returns>Whether the sim has been authenticated</returns>
79 bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey);
80
81 /// <summary>
82 /// Initialises the interface
83 /// </summary>
84 void Initialise();
85
86 /// <summary>
87 /// Closes the interface
88 /// </summary>
89 void Close();
90
91 /// <summary>
92 /// The plugin being loaded
93 /// </summary>
94 /// <returns>A string containing the plugin name</returns>
95 string getName();
96
97 /// <summary>
98 /// The plugins version
99 /// </summary>
100 /// <returns>A string containing the plugin version</returns>
101 string getVersion();
102
103 /// <summary>
104 /// Adds a new profile to the database
105 /// </summary>
106 /// <param name="profile">The profile to add</param>
107 /// <returns>RESPONSE_OK if successful, error if not.</returns>
108 DataResponse AddProfile(SimProfileData profile);
109
110 ReservationData GetReservationAtPoint(uint x, uint y);
111
112 }
113}
diff --git a/OpenSim/Framework/Data/ILogData.cs b/OpenSim/Framework/Data/ILogData.cs
new file mode 100644
index 0000000..ccb3b84
--- /dev/null
+++ b/OpenSim/Framework/Data/ILogData.cs
@@ -0,0 +1,94 @@
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.Data
33{
34 /// <summary>
35 /// The severity of an individual log message
36 /// </summary>
37 public enum LogSeverity : int
38 {
39 /// <summary>
40 /// Critical: systems failure
41 /// </summary>
42 CRITICAL = 1,
43 /// <summary>
44 /// Major: warning prior to systems failure
45 /// </summary>
46 MAJOR = 2,
47 /// <summary>
48 /// Medium: an individual non-critical task failed
49 /// </summary>
50 MEDIUM = 3,
51 /// <summary>
52 /// Low: Informational warning
53 /// </summary>
54 LOW = 4,
55 /// <summary>
56 /// Info: Information
57 /// </summary>
58 INFO = 5,
59 /// <summary>
60 /// Verbose: Debug Information
61 /// </summary>
62 VERBOSE = 6
63 }
64
65 /// <summary>
66 /// An interface to a LogData storage system
67 /// </summary>
68 public interface ILogData
69 {
70 void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage);
71 /// <summary>
72 /// Initialises the interface
73 /// </summary>
74 void Initialise();
75
76 /// <summary>
77 /// Closes the interface
78 /// </summary>
79 void Close();
80
81 /// <summary>
82 /// The plugin being loaded
83 /// </summary>
84 /// <returns>A string containing the plugin name</returns>
85 string getName();
86
87 /// <summary>
88 /// The plugins version
89 /// </summary>
90 /// <returns>A string containing the plugin version</returns>
91 string getVersion();
92 }
93
94}
diff --git a/OpenSim/Framework/Data/IniConfig.cs b/OpenSim/Framework/Data/IniConfig.cs
new file mode 100644
index 0000000..2f002c1
--- /dev/null
+++ b/OpenSim/Framework/Data/IniConfig.cs
@@ -0,0 +1,100 @@
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 System.IO;
32using System.Text.RegularExpressions;
33
34/*
35 Taken from public code listing at by Alex Pinsker
36 http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html
37 */
38
39namespace OpenSim.Framework.Data
40{
41 /// <summary>
42 /// Parse settings from ini-like files
43 /// </summary>
44 public class IniFile
45 {
46 static IniFile()
47 {
48 _iniKeyValuePatternRegex = new Regex(
49 @"((\s)*(?<Key>([^\=^\s^\n]+))[\s^\n]*
50 # key part (surrounding whitespace stripped)
51 \=
52 (\s)*(?<Value>([^\n^\s]+(\n){0,1})))
53 # value part (surrounding whitespace stripped)
54 ",
55 RegexOptions.IgnorePatternWhitespace |
56 RegexOptions.Compiled |
57 RegexOptions.CultureInvariant);
58 }
59 static private Regex _iniKeyValuePatternRegex;
60
61 public IniFile(string iniFileName)
62 {
63 _iniFileName = iniFileName;
64 }
65
66 public string ParseFileReadValue(string key)
67 {
68 using (StreamReader reader =
69 new StreamReader(_iniFileName))
70 {
71 do
72 {
73 string line = reader.ReadLine();
74 Match match =
75 _iniKeyValuePatternRegex.Match(line);
76 if (match.Success)
77 {
78 string currentKey =
79 match.Groups["Key"].Value as string;
80 if (currentKey != null &&
81 currentKey.Trim().CompareTo(key) == 0)
82 {
83 string value =
84 match.Groups["Value"].Value as string;
85 return value;
86 }
87 }
88
89 }
90 while (reader.Peek() != -1);
91 }
92 return null;
93 }
94
95 public string IniFileName
96 {
97 get { return _iniFileName; }
98 } private string _iniFileName;
99 }
100}
diff --git a/OpenSim/Framework/Data/InventoryData.cs b/OpenSim/Framework/Data/InventoryData.cs
new file mode 100644
index 0000000..8a3a664
--- /dev/null
+++ b/OpenSim/Framework/Data/InventoryData.cs
@@ -0,0 +1,187 @@
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.Data
34{
35 /// <summary>
36 /// Inventory Item - contains all the properties associated with an individual inventory piece.
37 /// </summary>
38 public class InventoryItemBase
39 {
40 /// <summary>
41 /// A UUID containing the ID for the inventory item itself
42 /// </summary>
43 public LLUUID inventoryID;
44 /// <summary>
45 /// The UUID of the associated asset on the asset server
46 /// </summary>
47 public LLUUID assetID;
48 /// <summary>
49 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
50 /// </summary>
51 public int type;
52 /// <summary>
53 /// The folder this item is contained in (NULL_KEY = Inventory Root)
54 /// </summary>
55 public LLUUID parentFolderID;
56 /// <summary>
57 /// The owner of this inventory item
58 /// </summary>
59 public LLUUID avatarID;
60 /// <summary>
61 /// The name of the inventory item (must be less than 64 characters)
62 /// </summary>
63 public string inventoryName;
64 /// <summary>
65 /// The description of the inventory item (must be less than 64 characters)
66 /// </summary>
67 public string inventoryDescription;
68 /// <summary>
69 /// A mask containing the permissions for the next owner (cannot be enforced)
70 /// </summary>
71 public uint inventoryNextPermissions;
72 /// <summary>
73 /// A mask containing permissions for the current owner (cannot be enforced)
74 /// </summary>
75 public uint inventoryCurrentPermissions;
76 }
77
78 /// <summary>
79 /// A Class for folders which contain users inventory
80 /// </summary>
81 public class InventoryFolderBase
82 {
83 /// <summary>
84 /// The name of the folder (64 characters or less)
85 /// </summary>
86 public string name;
87 /// <summary>
88 /// The agent who's inventory this is contained by
89 /// </summary>
90 public LLUUID agentID;
91 /// <summary>
92 /// The folder this folder is contained in (NULL_KEY for root)
93 /// </summary>
94 public LLUUID parentID;
95 /// <summary>
96 /// The UUID for this folder
97 /// </summary>
98 public LLUUID folderID;
99 }
100
101 /// <summary>
102 /// An interface for accessing inventory data from a storage server
103 /// </summary>
104 public interface IInventoryData
105 {
106 /// <summary>
107 /// Initialises the interface
108 /// </summary>
109 void Initialise();
110
111 /// <summary>
112 /// Closes the interface
113 /// </summary>
114 void Close();
115
116 /// <summary>
117 /// The plugin being loaded
118 /// </summary>
119 /// <returns>A string containing the plugin name</returns>
120 string getName();
121
122 /// <summary>
123 /// The plugins version
124 /// </summary>
125 /// <returns>A string containing the plugin version</returns>
126 string getVersion();
127
128 /// <summary>
129 /// Returns a list of inventory items contained within the specified folder
130 /// </summary>
131 /// <param name="folderID">The UUID of the target folder</param>
132 /// <returns>A List of InventoryItemBase items</returns>
133 List<InventoryItemBase> getInventoryInFolder(LLUUID folderID);
134
135 /// <summary>
136 /// Returns a list of folders in the users inventory root.
137 /// </summary>
138 /// <param name="user">The UUID of the user who is having inventory being returned</param>
139 /// <returns>A list of folders</returns>
140 List<InventoryFolderBase> getUserRootFolders(LLUUID user);
141
142 /// <summary>
143 /// Returns a list of inventory folders contained in the folder 'parentID'
144 /// </summary>
145 /// <param name="parentID">The folder to get subfolders for</param>
146 /// <returns>A list of inventory folders</returns>
147 List<InventoryFolderBase> getInventoryFolders(LLUUID parentID);
148
149 /// <summary>
150 /// Returns an inventory item by its UUID
151 /// </summary>
152 /// <param name="item">The UUID of the item to be returned</param>
153 /// <returns>A class containing item information</returns>
154 InventoryItemBase getInventoryItem(LLUUID item);
155
156 /// <summary>
157 /// Returns a specified inventory folder by its UUID
158 /// </summary>
159 /// <param name="folder">The UUID of the folder to be returned</param>
160 /// <returns>A class containing folder information</returns>
161 InventoryFolderBase getInventoryFolder(LLUUID folder);
162
163 /// <summary>
164 /// Creates a new inventory item based on item
165 /// </summary>
166 /// <param name="item">The item to be created</param>
167 void addInventoryItem(InventoryItemBase item);
168
169 /// <summary>
170 /// Updates an inventory item with item (updates based on ID)
171 /// </summary>
172 /// <param name="item">The updated item</param>
173 void updateInventoryItem(InventoryItemBase item);
174
175 /// <summary>
176 /// Adds a new folder specified by folder
177 /// </summary>
178 /// <param name="folder">The inventory folder</param>
179 void addInventoryFolder(InventoryFolderBase folder);
180
181 /// <summary>
182 /// Updates a folder based on its ID with folder
183 /// </summary>
184 /// <param name="folder">The inventory folder</param>
185 void updateInventoryFolder(InventoryFolderBase folder);
186 }
187}
diff --git a/OpenSim/Framework/Data/OpenSim.Framework.Data.csproj b/OpenSim/Framework/Data/OpenSim.Framework.Data.csproj
new file mode 100644
index 0000000..dcafbcd
--- /dev/null
+++ b/OpenSim/Framework/Data/OpenSim.Framework.Data.csproj
@@ -0,0 +1,116 @@
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>{36B72A9B-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.Data</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.Data</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="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System" >
66 <HintPath>System.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Data" >
70 <HintPath>System.Data.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 </ItemGroup>
80 <ItemGroup>
81 <Compile Include="GridData.cs">
82 <SubType>Code</SubType>
83 </Compile>
84 <Compile Include="ILogData.cs">
85 <SubType>Code</SubType>
86 </Compile>
87 <Compile Include="IniConfig.cs">
88 <SubType>Code</SubType>
89 </Compile>
90 <Compile Include="InventoryData.cs">
91 <SubType>Code</SubType>
92 </Compile>
93 <Compile Include="ReservationData.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="SimProfileData.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="UserData.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="UserProfileData.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 <Compile Include="Properties\AssemblyInfo.cs">
106 <SubType>Code</SubType>
107 </Compile>
108 </ItemGroup>
109 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
110 <PropertyGroup>
111 <PreBuildEvent>
112 </PreBuildEvent>
113 <PostBuildEvent>
114 </PostBuildEvent>
115 </PropertyGroup>
116</Project>
diff --git a/OpenSim/Framework/Data/OpenSim.Framework.Data.dll.build b/OpenSim/Framework/Data/OpenSim.Framework.Data.dll.build
new file mode 100644
index 0000000..aefb02b
--- /dev/null
+++ b/OpenSim/Framework/Data/OpenSim.Framework.Data.dll.build
@@ -0,0 +1,50 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.Data" 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.Data" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="GridData.cs" />
15 <include name="ILogData.cs" />
16 <include name="IniConfig.cs" />
17 <include name="InventoryData.cs" />
18 <include name="ReservationData.cs" />
19 <include name="SimProfileData.cs" />
20 <include name="UserData.cs" />
21 <include name="UserProfileData.cs" />
22 <include name="Properties/AssemblyInfo.cs" />
23 </sources>
24 <references basedir="${project::get-base-directory()}">
25 <lib>
26 <include name="${project::get-base-directory()}" />
27 <include name="${project::get-base-directory()}/${build.dir}" />
28 </lib>
29 <include name="../../../bin/libsecondlife.dll" />
30 <include name="System.dll" />
31 <include name="System.Data.dll" />
32 <include name="System.Xml.dll" />
33 </references>
34 </csc>
35 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
36 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
37 <copy todir="${project::get-base-directory()}/../../../bin/">
38 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
39 <include name="*.dll"/>
40 <include name="*.exe"/>
41 </fileset>
42 </copy>
43 </target>
44 <target name="clean">
45 <delete dir="${bin.dir}" failonerror="false" />
46 <delete dir="${obj.dir}" failonerror="false" />
47 </target>
48 <target name="doc" description="Creates documentation.">
49 </target>
50</project>
diff --git a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..7d749d5
--- /dev/null
+++ b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
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.Data")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Framework.Data")]
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("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")]
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// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Data/ReservationData.cs b/OpenSim/Framework/Data/ReservationData.cs
new file mode 100644
index 0000000..f404ebd
--- /dev/null
+++ b/OpenSim/Framework/Data/ReservationData.cs
@@ -0,0 +1,51 @@
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
32using libsecondlife;
33
34namespace OpenSim.Framework.Data
35{
36 public class ReservationData
37 {
38 public LLUUID userUUID = new LLUUID();
39 public int reservationMinX = 0;
40 public int reservationMinY = 0;
41 public int reservationMaxX = 65536;
42 public int reservationMaxY = 65536;
43
44 public string reservationName = "";
45 public string reservationCompany = "";
46 public bool status = true;
47
48 public string gridSendKey = "";
49 public string gridRecvKey = "";
50 }
51}
diff --git a/OpenSim/Framework/Data/SimProfileData.cs b/OpenSim/Framework/Data/SimProfileData.cs
new file mode 100644
index 0000000..201aa01
--- /dev/null
+++ b/OpenSim/Framework/Data/SimProfileData.cs
@@ -0,0 +1,114 @@
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.Data
33{
34 /// <summary>
35 /// A class which contains information known to the grid server about a region
36 /// </summary>
37 public class SimProfileData
38 {
39 /// <summary>
40 /// The name of the region
41 /// </summary>
42 public string regionName = "";
43
44 /// <summary>
45 /// A 64-bit number combining map position into a (mostly) unique ID
46 /// </summary>
47 public ulong regionHandle;
48
49 /// <summary>
50 /// OGS/OpenSim Specific ID for a region
51 /// </summary>
52 public libsecondlife.LLUUID UUID;
53
54 /// <summary>
55 /// Coordinates of the region
56 /// </summary>
57 public uint regionLocX;
58 public uint regionLocY;
59 public uint regionLocZ; // Reserved (round-robin, layers, etc)
60
61 /// <summary>
62 /// Authentication secrets
63 /// </summary>
64 /// <remarks>Not very secure, needs improvement.</remarks>
65 public string regionSendKey = "";
66 public string regionRecvKey = "";
67 public string regionSecret = "";
68
69 /// <summary>
70 /// Whether the region is online
71 /// </summary>
72 public bool regionOnline;
73
74 /// <summary>
75 /// Information about the server that the region is currently hosted on
76 /// </summary>
77 public string serverIP = "";
78 public uint serverPort;
79 public string serverURI = "";
80
81 /// <summary>
82 /// Set of optional overrides. Can be used to create non-eulicidean spaces.
83 /// </summary>
84 public ulong regionNorthOverrideHandle;
85 public ulong regionSouthOverrideHandle;
86 public ulong regionEastOverrideHandle;
87 public ulong regionWestOverrideHandle;
88
89 /// <summary>
90 /// Optional: URI Location of the region database
91 /// </summary>
92 /// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks>
93 public string regionDataURI = "";
94
95 /// <summary>
96 /// Region Asset Details
97 /// </summary>
98 public string regionAssetURI = "";
99 public string regionAssetSendKey = "";
100 public string regionAssetRecvKey = "";
101
102 /// <summary>
103 /// Region Userserver Details
104 /// </summary>
105 public string regionUserURI = "";
106 public string regionUserSendKey = "";
107 public string regionUserRecvKey = "";
108
109 /// <summary>
110 /// Region Map Texture Asset
111 /// </summary>
112 public libsecondlife.LLUUID regionMapTextureID = new libsecondlife.LLUUID("00000000-0000-0000-9999-000000000006");
113 }
114}
diff --git a/OpenSim/Framework/Data/UserData.cs b/OpenSim/Framework/Data/UserData.cs
new file mode 100644
index 0000000..2e15b47
--- /dev/null
+++ b/OpenSim/Framework/Data/UserData.cs
@@ -0,0 +1,131 @@
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.Data
34{
35 /// <summary>
36 /// An interface for connecting to user storage servers.
37 /// </summary>
38 public interface IUserData
39 {
40 /// <summary>
41 /// Returns a user profile from a database via their UUID
42 /// </summary>
43 /// <param name="user">The accounts UUID</param>
44 /// <returns>The user data profile</returns>
45 UserProfileData getUserByUUID(LLUUID user);
46
47 /// <summary>
48 /// Returns a users profile by searching their username
49 /// </summary>
50 /// <param name="name">The users username</param>
51 /// <returns>The user data profile</returns>
52 UserProfileData getUserByName(string name);
53
54 /// <summary>
55 /// Returns a users profile by searching their username parts
56 /// </summary>
57 /// <param name="fname">Account firstname</param>
58 /// <param name="lname">Account lastname</param>
59 /// <returns>The user data profile</returns>
60 UserProfileData getUserByName(string fname, string lname);
61
62 /// <summary>
63 /// Returns the current agent for a user searching by it's UUID
64 /// </summary>
65 /// <param name="user">The users UUID</param>
66 /// <returns>The current agent session</returns>
67 UserAgentData getAgentByUUID(LLUUID user);
68
69 /// <summary>
70 /// Returns the current session agent for a user searching by username
71 /// </summary>
72 /// <param name="name">The users account name</param>
73 /// <returns>The current agent session</returns>
74 UserAgentData getAgentByName(string name);
75
76 /// <summary>
77 /// Returns the current session agent for a user searching by username parts
78 /// </summary>
79 /// <param name="fname">The users first account name</param>
80 /// <param name="lname">The users account surname</param>
81 /// <returns>The current agent session</returns>
82 UserAgentData getAgentByName(string fname, string lname);
83
84 /// <summary>
85 /// Adds a new User profile to the database
86 /// </summary>
87 /// <param name="user">UserProfile to add</param>
88 void addNewUserProfile(UserProfileData user);
89
90 /// <summary>
91 /// Adds a new agent to the database
92 /// </summary>
93 /// <param name="agent">The agent to add</param>
94 void addNewUserAgent(UserAgentData agent);
95
96 /// <summary>
97 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
98 /// </summary>
99 /// <param name="from">The account to transfer from</param>
100 /// <param name="to">The account to transfer to</param>
101 /// <param name="amount">The amount to transfer</param>
102 /// <returns>Successful?</returns>
103 bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount);
104
105 /// <summary>
106 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
107 /// </summary>
108 /// <param name="from">User to transfer from</param>
109 /// <param name="to">User to transfer to</param>
110 /// <param name="inventory">Specified inventory item</param>
111 /// <returns>Successful?</returns>
112 bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
113
114 /// <summary>
115 /// Returns the plugin version
116 /// </summary>
117 /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
118 string getVersion();
119
120 /// <summary>
121 /// Returns the plugin name
122 /// </summary>
123 /// <returns>Plugin name, eg MySQL User Provider</returns>
124 string getName();
125
126 /// <summary>
127 /// Initialises the plugin (artificial constructor)
128 /// </summary>
129 void Initialise();
130 }
131}
diff --git a/OpenSim/Framework/Data/UserProfileData.cs b/OpenSim/Framework/Data/UserProfileData.cs
new file mode 100644
index 0000000..00d422d
--- /dev/null
+++ b/OpenSim/Framework/Data/UserProfileData.cs
@@ -0,0 +1,182 @@
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.Data
34{
35 /// <summary>
36 /// Information about a particular user known to the userserver
37 /// </summary>
38 public class UserProfileData
39 {
40 /// <summary>
41 /// The ID value for this user
42 /// </summary>
43 public LLUUID UUID;
44
45 /// <summary>
46 /// The first component of a users account name
47 /// </summary>
48 public string username;
49 /// <summary>
50 /// The second component of a users account name
51 /// </summary>
52 public string surname;
53
54 /// <summary>
55 /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
56 /// </summary>
57 /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
58 public string passwordHash;
59 /// <summary>
60 /// The salt used for the users hash, should be 32 bytes or longer
61 /// </summary>
62 public string passwordSalt;
63
64 /// <summary>
65 /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into
66 /// </summary>
67 public ulong homeRegion;
68 /// <summary>
69 /// The coordinates inside the region of the home location
70 /// </summary>
71 public LLVector3 homeLocation;
72 /// <summary>
73 /// Where the user will be looking when they rez.
74 /// </summary>
75 public LLVector3 homeLookAt;
76
77 /// <summary>
78 /// A UNIX Timestamp (seconds since epoch) for the users creation
79 /// </summary>
80 public int created;
81 /// <summary>
82 /// A UNIX Timestamp for the users last login date / time
83 /// </summary>
84 public int lastLogin;
85
86 /// <summary>
87 /// A URI to the users inventory server, used for foreigners and large grids
88 /// </summary>
89 public string userInventoryURI;
90 /// <summary>
91 /// A URI to the users asset server, used for foreigners and large grids.
92 /// </summary>
93 public string userAssetURI;
94
95 /// <summary>
96 /// A uint mask containing the "I can do" fields of the users profile
97 /// </summary>
98 public uint profileCanDoMask;
99 /// <summary>
100 /// A uint mask containing the "I want to do" part of the users profile
101 /// </summary>
102 public uint profileWantDoMask; // Profile window "I want to" mask
103
104 /// <summary>
105 /// The about text listed in a users profile.
106 /// </summary>
107 public string profileAboutText;
108 /// <summary>
109 /// The first life about text listed in a users profile
110 /// </summary>
111 public string profileFirstText;
112
113 /// <summary>
114 /// The profile image for an avatar stored on the asset server
115 /// </summary>
116 public LLUUID profileImage;
117 /// <summary>
118 /// The profile image for the users first life tab
119 /// </summary>
120 public LLUUID profileFirstImage;
121 /// <summary>
122 /// The users last registered agent (filled in on the user server)
123 /// </summary>
124 public UserAgentData currentAgent;
125 }
126
127 /// <summary>
128 /// Information about a users session
129 /// </summary>
130 public class UserAgentData
131 {
132 /// <summary>
133 /// The UUID of the users avatar (not the agent!)
134 /// </summary>
135 public LLUUID UUID;
136 /// <summary>
137 /// The IP address of the user
138 /// </summary>
139 public string agentIP;
140 /// <summary>
141 /// The port of the user
142 /// </summary>
143 public uint agentPort;
144 /// <summary>
145 /// Is the user online?
146 /// </summary>
147 public bool agentOnline;
148 /// <summary>
149 /// The session ID for the user (also the agent ID)
150 /// </summary>
151 public LLUUID sessionID;
152 /// <summary>
153 /// The "secure" session ID for the user
154 /// </summary>
155 /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
156 public LLUUID secureSessionID;
157 /// <summary>
158 /// The region the user logged into initially
159 /// </summary>
160 public LLUUID regionID;
161 /// <summary>
162 /// A unix timestamp from when the user logged in
163 /// </summary>
164 public int loginTime;
165 /// <summary>
166 /// When this agent expired and logged out, 0 if still online
167 /// </summary>
168 public int logoutTime;
169 /// <summary>
170 /// Current region the user is logged into
171 /// </summary>
172 public LLUUID currentRegion;
173 /// <summary>
174 /// Region handle of the current region the user is in
175 /// </summary>
176 public ulong currentHandle;
177 /// <summary>
178 /// The position of the user within the region
179 /// </summary>
180 public LLVector3 currentPos;
181 }
182}
diff --git a/OpenSim/Framework/General/AgentInventory.cs b/OpenSim/Framework/General/AgentInventory.cs
new file mode 100644
index 0000000..fbf4d23
--- /dev/null
+++ b/OpenSim/Framework/General/AgentInventory.cs
@@ -0,0 +1,267 @@
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 System.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 System.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 System.Console.WriteLine("updating inventory item details");
159 if (this.InventoryItems.ContainsKey(itemID))
160 {
161 System.Console.WriteLine("changing name to "+ Util.FieldToString(packet.Name));
162 InventoryItem Item = this.InventoryItems[itemID];
163 Item.Name = Util.FieldToString(packet.Name);
164 System.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}
diff --git a/OpenSim/Framework/General/AuthenticateSessionBase.cs b/OpenSim/Framework/General/AuthenticateSessionBase.cs
new file mode 100644
index 0000000..73dd3e2
--- /dev/null
+++ b/OpenSim/Framework/General/AuthenticateSessionBase.cs
@@ -0,0 +1,132 @@
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.Interfaces;
33using OpenSim.Framework.Types;
34
35namespace OpenSim.Framework
36{
37 public class AuthenticateSessionsBase
38 {
39 public Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>();
40
41 public AuthenticateSessionsBase()
42 {
43
44 }
45
46 public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode)
47 {
48 AgentCircuitData validcircuit = null;
49 if (this.AgentCircuits.ContainsKey(circuitcode))
50 {
51 validcircuit = this.AgentCircuits[circuitcode];
52 }
53 AuthenticateResponse user = new AuthenticateResponse();
54 if (validcircuit == null)
55 {
56 //don't have this circuit code in our list
57 user.Authorised = false;
58 return (user);
59 }
60
61 if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID))
62 {
63 user.Authorised = true;
64 user.LoginInfo = new Login();
65 user.LoginInfo.Agent = agentID;
66 user.LoginInfo.Session = sessionID;
67 user.LoginInfo.SecureSession = validcircuit.SecureSessionID;
68 user.LoginInfo.First = validcircuit.firstname;
69 user.LoginInfo.Last = validcircuit.lastname;
70 user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder;
71 user.LoginInfo.BaseFolder = validcircuit.BaseFolder;
72 }
73 else
74 {
75 // Invalid
76 user.Authorised = false;
77 }
78
79 return (user);
80 }
81
82 public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
83 {
84 if (this.AgentCircuits.ContainsKey(circuitCode))
85 {
86 this.AgentCircuits[circuitCode] = agentData;
87 }
88 else
89 {
90 this.AgentCircuits.Add(circuitCode, agentData);
91 }
92 }
93
94 public LLVector3 GetPosition(uint circuitCode)
95 {
96 LLVector3 vec = new LLVector3();
97 if (this.AgentCircuits.ContainsKey(circuitCode))
98 {
99 vec = this.AgentCircuits[circuitCode].startpos;
100 }
101 return vec;
102 }
103
104 public void UpdateAgentData(AgentCircuitData agentData)
105 {
106 if (this.AgentCircuits.ContainsKey((uint)agentData.circuitcode))
107 {
108 this.AgentCircuits[(uint)agentData.circuitcode].firstname = agentData.firstname;
109 this.AgentCircuits[(uint)agentData.circuitcode].lastname = agentData.lastname;
110 this.AgentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos;
111 // Console.WriteLine("update user start pos is " + agentData.startpos.X + " , " + agentData.startpos.Y + " , " + agentData.startpos.Z);
112 }
113 }
114
115 public void UpdateAgentChildStatus(uint circuitcode, bool childstatus)
116 {
117 if (this.AgentCircuits.ContainsKey(circuitcode))
118 {
119 this.AgentCircuits[circuitcode].child = childstatus;
120 }
121 }
122
123 public bool GetAgentChildStatus(uint circuitcode)
124 {
125 if (this.AgentCircuits.ContainsKey(circuitcode))
126 {
127 return this.AgentCircuits[circuitcode].child;
128 }
129 return false;
130 }
131 }
132} \ No newline at end of file
diff --git a/OpenSim/Framework/General/BlockingQueue.cs b/OpenSim/Framework/General/BlockingQueue.cs
new file mode 100644
index 0000000..667b8d8
--- /dev/null
+++ b/OpenSim/Framework/General/BlockingQueue.cs
@@ -0,0 +1,60 @@
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/OpenSim/Framework/General/IRegionCommsListener.cs b/OpenSim/Framework/General/IRegionCommsListener.cs
new file mode 100644
index 0000000..0e80941
--- /dev/null
+++ b/OpenSim/Framework/General/IRegionCommsListener.cs
@@ -0,0 +1,47 @@
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 OpenSim.Framework.Interfaces;
32using OpenSim.Framework.Types;
33
34namespace OpenSim.Framework
35{
36 public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent);
37 public delegate void UpdateNeighbours(List<RegionInfo> neighbours);
38 public delegate void AgentCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position);
39
40 public interface IRegionCommsListener
41 {
42 event ExpectUserDelegate OnExpectUser;
43 event GenericCall2 OnExpectChildAgent;
44 event AgentCrossing OnAvatarCrossingIntoRegion;
45 event UpdateNeighbours OnNeighboursUpdate;
46 }
47}
diff --git a/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs b/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs
new file mode 100644
index 0000000..462e2c5
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/AuthenticateResponse.cs
@@ -0,0 +1,51 @@
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;
30using System.Collections.Generic;
31using System.Net;
32using System.Net.Sockets;
33using System.IO;
34using libsecondlife;
35using OpenSim;
36using OpenSim.Framework.Types;
37
38namespace OpenSim.Framework.Interfaces
39{
40 public class AuthenticateResponse
41 {
42 public bool Authorised;
43 public Login LoginInfo;
44
45 public AuthenticateResponse()
46 {
47
48 }
49
50 }
51}
diff --git a/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs
new file mode 100644
index 0000000..13980fe
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/Config/IGenericConfig.cs
@@ -0,0 +1,42 @@
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.Interfaces
33{
34 public interface IGenericConfig
35 {
36 void LoadData();
37 string GetAttribute(string attributeName);
38 bool SetAttribute(string attributeName, string attributeValue);
39 void Commit();
40 void Close();
41 }
42}
diff --git a/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs
new file mode 100644
index 0000000..0fafe1a
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/Config/IGridConfig.cs
@@ -0,0 +1,63 @@
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.IO;
32using libsecondlife;
33//using OpenSim.world;
34
35namespace OpenSim.Framework.Interfaces
36{
37 /// <summary>
38 /// </summary>
39
40
41 public abstract class GridConfig
42 {
43 public string GridOwner;
44 public string DefaultStartupMsg;
45 public string DefaultAssetServer;
46 public string AssetSendKey;
47 public string AssetRecvKey;
48 public string DefaultUserServer;
49 public string UserSendKey;
50 public string UserRecvKey;
51 public string SimSendKey;
52 public string SimRecvKey;
53
54
55 public abstract void InitConfig();
56
57 }
58
59 public interface IGridConfig
60 {
61 GridConfig GetConfigObject();
62 }
63}
diff --git a/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs b/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs
new file mode 100644
index 0000000..2f4b340
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/Config/IUserConfig.cs
@@ -0,0 +1,57 @@
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.IO;
32using libsecondlife;
33//using OpenSim.world;
34
35namespace OpenSim.Framework.Interfaces
36{
37 /// <summary>
38 /// </summary>
39
40
41 public abstract class UserConfig
42 {
43 public string DefaultStartupMsg;
44 public string GridServerURL;
45 public string GridSendKey;
46 public string GridRecvKey;
47
48
49 public abstract void InitConfig();
50
51 }
52
53 public interface IUserConfig
54 {
55 UserConfig GetConfigObject();
56 }
57}
diff --git a/OpenSim/Framework/General/Interfaces/IAssetServer.cs b/OpenSim/Framework/General/Interfaces/IAssetServer.cs
new file mode 100644
index 0000000..826392d
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/IAssetServer.cs
@@ -0,0 +1,69 @@
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.Net;
30using System.Net.Sockets;
31using System.IO;
32using System.Threading;
33using libsecondlife;
34using OpenSim.Framework.Types;
35
36namespace OpenSim.Framework.Interfaces
37{
38 /// <summary>
39 /// Description of IAssetServer.
40 /// </summary>
41
42 public interface IAssetServer
43 {
44 void SetReceiver(IAssetReceiver receiver);
45 void RequestAsset(LLUUID assetID, bool isTexture);
46 void UpdateAsset(AssetBase asset);
47 void UploadNewAsset(AssetBase asset);
48 void SetServerInfo(string ServerUrl, string ServerKey);
49 void Close();
50 }
51
52 // could change to delegate?
53 public interface IAssetReceiver
54 {
55 void AssetReceived(AssetBase asset, bool IsTexture);
56 void AssetNotFound(AssetBase asset);
57 }
58
59 public interface IAssetPlugin
60 {
61 IAssetServer GetAssetServer();
62 }
63
64 public struct ARequest
65 {
66 public LLUUID AssetID;
67 public bool IsTexture;
68 }
69}
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
new file mode 100644
index 0000000..4e8ac1a
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -0,0 +1,164 @@
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 OpenSim.Framework.Inventory;
32using libsecondlife;
33using libsecondlife.Packets;
34using OpenSim.Framework.Types;
35
36namespace OpenSim.Framework.Interfaces
37{
38 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
39 public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
40 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west);
41 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
42 public delegate void StartAnim(LLUUID animID, int seq);
43 public delegate void LinkObjects(uint parent, List<uint> children);
44 public delegate void RequestMapBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY);
45 public delegate void TeleportLocationRequest(IClientAPI remoteClient, ulong regionHandle, LLVector3 position, LLVector3 lookAt, uint flags);
46
47 public delegate void GenericCall(IClientAPI remoteClient);
48 public delegate void GenericCall2();
49 public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary.
50 public delegate void GenericCall4(Packet packet, IClientAPI remoteClient);
51 public delegate void GenericCall5(IClientAPI remoteClient, bool status);
52 public delegate void GenericCall6(LLUUID uid);
53
54 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
55 public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
56 public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
57 public delegate void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient);
58 public delegate void UpdateVector(uint localID, LLVector3 pos, IClientAPI remoteClient);
59 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient);
60 public delegate void StatusChange(bool status);
61 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
62 public delegate void UpdateAgent(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation);
63 public delegate void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 grapPos, IClientAPI remoteClient);
64
65 public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client);
66 public delegate void ParcelDivideRequest(int west, int south, int east, int north, IClientAPI remote_client);
67 public delegate void ParcelJoinRequest(int west, int south, int east, int north, IClientAPI remote_client);
68 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client); // NOTETOSELFremove the packet part
69
70 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client);
71
72 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
73
74 public interface IClientAPI
75 {
76 event ChatFromViewer OnChatFromViewer;
77 event RezObject OnRezObject;
78 event ModifyTerrain OnModifyTerrain;
79 event SetAppearance OnSetAppearance;
80 event StartAnim OnStartAnim;
81 event LinkObjects OnLinkObjects;
82 event RequestMapBlocks OnRequestMapBlocks;
83 event TeleportLocationRequest OnTeleportLocationRequest;
84
85 event GenericCall4 OnDeRezObject;
86 event GenericCall OnRegionHandShakeReply;
87 event GenericCall OnRequestWearables;
88 event GenericCall2 OnCompleteMovementToRegion;
89 event UpdateAgent OnAgentUpdate;
90 event GenericCall OnRequestAvatarsData;
91 event GenericCall4 OnAddPrim;
92 event UpdateVector OnGrapObject;
93 event ObjectSelect OnDeGrapObject;
94 event MoveObject OnGrapUpdate;
95
96 event UpdateShape OnUpdatePrimShape;
97 event ObjectSelect OnObjectSelect;
98 event UpdatePrimFlags OnUpdatePrimFlags;
99 event UpdatePrimTexture OnUpdatePrimTexture;
100 event UpdateVector OnUpdatePrimPosition;
101 event UpdatePrimRotation OnUpdatePrimRotation;
102 event UpdateVector OnUpdatePrimScale;
103 event StatusChange OnChildAgentStatus;
104 event GenericCall2 OnStopMovement;
105 event NewAvatar OnNewAvatar;
106 event GenericCall6 OnRemoveAvatar;
107
108 event UUIDNameRequest OnNameFromUUIDRequest;
109
110 event ParcelPropertiesRequest OnParcelPropertiesRequest;
111 event ParcelDivideRequest OnParcelDivideRequest;
112 event ParcelJoinRequest OnParcelJoinRequest;
113 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
114
115 event EstateOwnerMessageRequest OnEstateOwnerMessage;
116
117 LLVector3 StartPos
118 {
119 get;
120 set;
121 }
122
123 LLUUID AgentId
124 {
125 get;
126 }
127
128 string FirstName
129 {
130 get;
131 }
132
133 string LastName
134 {
135 get;
136 }
137
138 void OutPacket(Packet newPack);
139 void SendWearables(AvatarWearable[] wearables);
140 void SendRegionHandshake(RegionInfo regionInfo);
141 void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
142 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
143 void SendLayerData(float[] map);
144 void SendLayerData(int px, int py, float[] map);
145 void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look);
146 void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort);
147 AgentCircuitData RequestClientInfo();
148 void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, System.Net.IPAddress newRegionIP, ushort newRegionPort);
149 void SendMapBlock(List<MapBlockData> mapBlocks);
150 void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags);
151 void SendRegionTeleport(ulong regionHandle, byte simAccess, string ipAddress, ushort ipPort, uint locationID, uint flags);
152 void SendTeleportCancel();
153 void SendTeleportLocationStart();
154 void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance);
155
156 void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry);
157 void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity);
158
159 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
160 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID , uint flags);
161 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID, uint flags);
162 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation);
163 }
164}
diff --git a/OpenSim/Framework/General/Interfaces/ILocalStorage.cs b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs
new file mode 100644
index 0000000..4987d10
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/ILocalStorage.cs
@@ -0,0 +1,69 @@
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 libsecondlife;
31using OpenSim.Framework.Types;
32
33namespace OpenSim.Framework.Interfaces
34{
35 /// <summary>
36 /// ILocalStorage. Really hacked together right now needs cleaning up
37 /// </summary>
38 public interface ILocalStorage
39 {
40 void Initialise(string datastore);
41
42 void StorePrim(PrimData prim);
43 void RemovePrim(LLUUID primID);
44 void LoadPrimitives(ILocalStorageReceiver receiver);
45
46 float[] LoadWorld();
47 void SaveMap(float[] heightmap);
48
49 void SaveParcels(ParcelData[] parcels);
50 void SaveParcel(ParcelData parcel);
51 void RemoveParcel(ParcelData parcel);
52 void RemoveAllParcels();
53 void LoadParcels(ILocalStorageParcelReceiver recv);
54
55 void ShutDown();
56 }
57
58 public interface ILocalStorageReceiver
59 {
60 void PrimFromStorage(PrimData prim);
61 }
62
63 public interface ILocalStorageParcelReceiver
64 {
65 void ParcelFromStorage(ParcelData data);
66 void NoParcelDataFromStorage();
67 }
68}
69
diff --git a/OpenSim/Framework/General/Interfaces/IUserServer.cs b/OpenSim/Framework/General/Interfaces/IUserServer.cs
new file mode 100644
index 0000000..c6e2223
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/IUserServer.cs
@@ -0,0 +1,42 @@
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 OpenSim.Framework.Inventory;
32using libsecondlife;
33
34namespace OpenSim.Framework.Interfaces
35{
36 public interface IUserServer
37 {
38 AgentInventory RequestAgentsInventory(LLUUID agentID);
39 void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
40 bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory);
41 }
42}
diff --git a/OpenSim/Framework/General/Interfaces/IWorld.cs b/OpenSim/Framework/General/Interfaces/IWorld.cs
new file mode 100644
index 0000000..4857417
--- /dev/null
+++ b/OpenSim/Framework/General/Interfaces/IWorld.cs
@@ -0,0 +1,45 @@
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.Types;
33
34namespace OpenSim.Framework.Interfaces
35{
36 public interface IWorld
37 {
38 void AddNewClient(IClientAPI remoteClient, LLUUID agentID, bool child);
39 void RemoveClient(LLUUID agentID);
40
41 RegionInfo RegionInfo { get; }
42 object SyncRoot { get; }
43 uint NextLocalId { get; }
44 }
45}
diff --git a/OpenSim/Framework/General/Logger.cs b/OpenSim/Framework/General/Logger.cs
new file mode 100644
index 0000000..e7eaa03
--- /dev/null
+++ b/OpenSim/Framework/General/Logger.cs
@@ -0,0 +1,85 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework
6{
7 public class Logger
8 {
9 public static Logger Instance = new Logger( false );
10
11 public delegate void LoggerMethodDelegate();
12 private delegate bool LoggerDelegate( LoggerMethodDelegate whatToDo );
13
14
15 private LoggerDelegate m_delegate;
16
17 public Logger( bool log )
18 {
19 if( log )
20 {
21 m_delegate = CatchAndLog;
22 }
23 else
24 {
25 m_delegate = DontCatch;
26 }
27 }
28
29 public bool Wrap( LoggerMethodDelegate whatToDo )
30 {
31 return m_delegate( whatToDo );
32 }
33
34
35 private bool CatchAndLog(LoggerMethodDelegate whatToDo)
36 {
37 try
38 {
39 whatToDo();
40 return true;
41 }
42 catch(Exception e)
43 {
44 System.Console.WriteLine( "Exception logged!!! Woah!!!!" );
45 return false;
46 }
47 }
48
49 private bool DontCatch(LoggerMethodDelegate whatToDo)
50 {
51 whatToDo();
52 return true;
53 }
54
55 public class LoggerExample
56 {
57 public void TryWrap()
58 {
59 // This will log and ignore
60 Logger log = new Logger(true);
61
62 log.Wrap(delegate()
63 {
64 Int16.Parse("waa!");
65 });
66
67 // This will throw;
68 try
69 {
70
71 log = new Logger(false);
72
73 log.Wrap(delegate()
74 {
75 Int16.Parse("waa!");
76 });
77 }
78 catch
79 {
80 System.Console.WriteLine("Example barfed!");
81 }
82 }
83 }
84 }
85}
diff --git a/OpenSim/Framework/General/LoginService.cs b/OpenSim/Framework/General/LoginService.cs
new file mode 100644
index 0000000..f14754f
--- /dev/null
+++ b/OpenSim/Framework/General/LoginService.cs
@@ -0,0 +1,41 @@
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;
30using System.Collections.Generic;
31using System.Text;
32using Nwc.XmlRpc;
33using libsecondlife;
34
35namespace OpenSim.Framework.Grid
36{
37 public abstract class LoginService
38 {
39
40 }
41} \ No newline at end of file
diff --git a/OpenSim/Framework/General/OpenSim.Framework.csproj b/OpenSim/Framework/General/OpenSim.Framework.csproj
new file mode 100644
index 0000000..48db634
--- /dev/null
+++ b/OpenSim/Framework/General/OpenSim.Framework.csproj
@@ -0,0 +1,204 @@
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 <Reference Include="XMLRPC.dll" >
78 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 <ProjectReference Include="..\Console\OpenSim.Framework.Console.csproj">
84 <Name>OpenSim.Framework.Console</Name>
85 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private>
88 </ProjectReference>
89 </ItemGroup>
90 <ItemGroup>
91 <Compile Include="AgentInventory.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="AuthenticateSessionBase.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="BlockingQueue.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 <Compile Include="IRegionCommsListener.cs">
101 <SubType>Code</SubType>
102 </Compile>
103 <Compile Include="Logger.cs">
104 <SubType>Code</SubType>
105 </Compile>
106 <Compile Include="LoginService.cs">
107 <SubType>Code</SubType>
108 </Compile>
109 <Compile Include="RegionCommsListener.cs">
110 <SubType>Code</SubType>
111 </Compile>
112 <Compile Include="Remoting.cs">
113 <SubType>Code</SubType>
114 </Compile>
115 <Compile Include="SimProfile.cs">
116 <SubType>Code</SubType>
117 </Compile>
118 <Compile Include="UserProfile.cs">
119 <SubType>Code</SubType>
120 </Compile>
121 <Compile Include="Util.cs">
122 <SubType>Code</SubType>
123 </Compile>
124 <Compile Include="Interfaces\AuthenticateResponse.cs">
125 <SubType>Code</SubType>
126 </Compile>
127 <Compile Include="Interfaces\IAssetServer.cs">
128 <SubType>Code</SubType>
129 </Compile>
130 <Compile Include="Interfaces\IClientAPI.cs">
131 <SubType>Code</SubType>
132 </Compile>
133 <Compile Include="Interfaces\ILocalStorage.cs">
134 <SubType>Code</SubType>
135 </Compile>
136 <Compile Include="Interfaces\IUserServer.cs">
137 <SubType>Code</SubType>
138 </Compile>
139 <Compile Include="Interfaces\IWorld.cs">
140 <SubType>Code</SubType>
141 </Compile>
142 <Compile Include="Interfaces\Config\IGenericConfig.cs">
143 <SubType>Code</SubType>
144 </Compile>
145 <Compile Include="Interfaces\Config\IGridConfig.cs">
146 <SubType>Code</SubType>
147 </Compile>
148 <Compile Include="Interfaces\Config\IUserConfig.cs">
149 <SubType>Code</SubType>
150 </Compile>
151 <Compile Include="Properties\AssemblyInfo.cs">
152 <SubType>Code</SubType>
153 </Compile>
154 <Compile Include="Types\AgentCiruitData.cs">
155 <SubType>Code</SubType>
156 </Compile>
157 <Compile Include="Types\AgentWearable.cs">
158 <SubType>Code</SubType>
159 </Compile>
160 <Compile Include="Types\AssetBase.cs">
161 <SubType>Code</SubType>
162 </Compile>
163 <Compile Include="Types\AssetLandmark.cs">
164 <SubType>Code</SubType>
165 </Compile>
166 <Compile Include="Types\AssetStorage.cs">
167 <SubType>Code</SubType>
168 </Compile>
169 <Compile Include="Types\EstateSettings.cs">
170 <SubType>Code</SubType>
171 </Compile>
172 <Compile Include="Types\Login.cs">
173 <SubType>Code</SubType>
174 </Compile>
175 <Compile Include="Types\MapBlockData.cs">
176 <SubType>Code</SubType>
177 </Compile>
178 <Compile Include="Types\NeighbourInfo.cs">
179 <SubType>Code</SubType>
180 </Compile>
181 <Compile Include="Types\NetworkServersInfo.cs">
182 <SubType>Code</SubType>
183 </Compile>
184 <Compile Include="Types\ParcelData.cs">
185 <SubType>Code</SubType>
186 </Compile>
187 <Compile Include="Types\PrimData.cs">
188 <SubType>Code</SubType>
189 </Compile>
190 <Compile Include="Types\RegionHandle.cs">
191 <SubType>Code</SubType>
192 </Compile>
193 <Compile Include="Types\RegionInfo.cs">
194 <SubType>Code</SubType>
195 </Compile>
196 </ItemGroup>
197 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
198 <PropertyGroup>
199 <PreBuildEvent>
200 </PreBuildEvent>
201 <PostBuildEvent>
202 </PostBuildEvent>
203 </PropertyGroup>
204</Project>
diff --git a/OpenSim/Framework/General/OpenSim.Framework.dll.build b/OpenSim/Framework/General/OpenSim.Framework.dll.build
new file mode 100644
index 0000000..a18838b
--- /dev/null
+++ b/OpenSim/Framework/General/OpenSim.Framework.dll.build
@@ -0,0 +1,78 @@
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="AuthenticateSessionBase.cs" />
16 <include name="BlockingQueue.cs" />
17 <include name="IRegionCommsListener.cs" />
18 <include name="Logger.cs" />
19 <include name="LoginService.cs" />
20 <include name="RegionCommsListener.cs" />
21 <include name="Remoting.cs" />
22 <include name="SimProfile.cs" />
23 <include name="UserProfile.cs" />
24 <include name="Util.cs" />
25 <include name="Interfaces/AuthenticateResponse.cs" />
26 <include name="Interfaces/IAssetServer.cs" />
27 <include name="Interfaces/IClientAPI.cs" />
28 <include name="Interfaces/ILocalStorage.cs" />
29 <include name="Interfaces/IUserServer.cs" />
30 <include name="Interfaces/IWorld.cs" />
31 <include name="Interfaces/Config/IGenericConfig.cs" />
32 <include name="Interfaces/Config/IGridConfig.cs" />
33 <include name="Interfaces/Config/IUserConfig.cs" />
34 <include name="Properties/AssemblyInfo.cs" />
35 <include name="Types/AgentCiruitData.cs" />
36 <include name="Types/AgentWearable.cs" />
37 <include name="Types/AssetBase.cs" />
38 <include name="Types/AssetLandmark.cs" />
39 <include name="Types/AssetStorage.cs" />
40 <include name="Types/EstateSettings.cs" />
41 <include name="Types/Login.cs" />
42 <include name="Types/MapBlockData.cs" />
43 <include name="Types/NeighbourInfo.cs" />
44 <include name="Types/NetworkServersInfo.cs" />
45 <include name="Types/ParcelData.cs" />
46 <include name="Types/PrimData.cs" />
47 <include name="Types/RegionHandle.cs" />
48 <include name="Types/RegionInfo.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="../../../bin/OpenSim.Framework.Console.dll" />
58 <include name="System.dll" />
59 <include name="System.Xml.dll" />
60 <include name="../../../bin/XMLRPC.dll" />
61 </references>
62 </csc>
63 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
64 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
65 <copy todir="${project::get-base-directory()}/../../../bin/">
66 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
67 <include name="*.dll"/>
68 <include name="*.exe"/>
69 </fileset>
70 </copy>
71 </target>
72 <target name="clean">
73 <delete dir="${bin.dir}" failonerror="false" />
74 <delete dir="${obj.dir}" failonerror="false" />
75 </target>
76 <target name="doc" description="Creates documentation.">
77 </target>
78</project>
diff --git a/OpenSim/Framework/General/Properties/AssemblyInfo.cs b/OpenSim/Framework/General/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..86f5cdb
--- /dev/null
+++ b/OpenSim/Framework/General/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
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/OpenSim/Framework/General/RegionCommsListener.cs b/OpenSim/Framework/General/RegionCommsListener.cs
new file mode 100644
index 0000000..5fa2f58
--- /dev/null
+++ b/OpenSim/Framework/General/RegionCommsListener.cs
@@ -0,0 +1,70 @@
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 OpenSim.Framework.Interfaces;
32using OpenSim.Framework.Types;
33
34namespace OpenSim.Framework
35{
36 public class RegionCommsListener :IRegionCommsListener
37 {
38 public event ExpectUserDelegate OnExpectUser;
39 public event GenericCall2 OnExpectChildAgent;
40 public event AgentCrossing OnAvatarCrossingIntoRegion;
41 public event UpdateNeighbours OnNeighboursUpdate;
42
43 /// <summary>
44 ///
45 /// </summary>
46 /// <param name="agent"></param>
47 /// <returns></returns>
48 public virtual bool TriggerExpectUser(ulong regionHandle, AgentCircuitData agent)
49 {
50 if(OnExpectUser != null)
51 {
52
53 OnExpectUser(regionHandle, agent);
54 return true;
55 }
56
57 return false;
58 }
59
60 public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
61 {
62 if (OnAvatarCrossingIntoRegion != null)
63 {
64 OnAvatarCrossingIntoRegion(regionHandle, agentID, position);
65 return true;
66 }
67 return false;
68 }
69 }
70}
diff --git a/OpenSim/Framework/General/Remoting.cs b/OpenSim/Framework/General/Remoting.cs
new file mode 100644
index 0000000..e6fdf70
--- /dev/null
+++ b/OpenSim/Framework/General/Remoting.cs
@@ -0,0 +1,136 @@
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 System.Security.Cryptography;
32
33namespace OpenSim.Framework
34{
35 /// <summary>
36 /// NEEDS AUDIT.
37 /// </summary>
38 /// <remarks>
39 /// Suggested implementation
40 /// <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>
41 /// <para>When sending data to the foreign host - run 'Sign' on the data and affix the returned byte[] to the message.</para>
42 /// <para>When recieving data from the foreign host - run 'Authenticate' against the data and the attached byte[].</para>
43 /// <para>Both hosts should be performing these operations for this to be effective.</para>
44 /// </remarks>
45 class RemoteDigest
46 {
47 private byte[] currentHash;
48 private byte[] secret;
49
50 private SHA512Managed SHA512;
51
52 /// <summary>
53 /// Initialises a new RemoteDigest authentication mechanism
54 /// </summary>
55 /// <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>
56 /// <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>
57 /// <param name="salt">Binary salt - some common value - to be decided what</param>
58 /// <param name="challenge">The challenge key provided by the third party</param>
59 public RemoteDigest(string sharedSecret, byte[] salt, string challenge)
60 {
61 SHA512 = new SHA512Managed();
62 Rfc2898DeriveBytes RFC2898 = new Rfc2898DeriveBytes(sharedSecret,salt);
63 secret = RFC2898.GetBytes(512);
64 ASCIIEncoding ASCII = new ASCIIEncoding();
65
66 currentHash = SHA512.ComputeHash(AppendArrays(secret, ASCII.GetBytes(challenge)));
67 }
68
69 /// <summary>
70 /// Authenticates a piece of incoming data against the local digest. Upon successful authentication, digest string is incremented.
71 /// </summary>
72 /// <param name="data">The incoming data</param>
73 /// <param name="digest">The remote digest</param>
74 /// <returns></returns>
75 public bool Authenticate(byte[] data, byte[] digest)
76 {
77 byte[] newHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
78 if (digest == newHash)
79 {
80 currentHash = newHash;
81 return true;
82 }
83 else
84 {
85 throw new Exception("Hash comparison failed. Key resync required.");
86 }
87 }
88
89 /// <summary>
90 /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message.
91 /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the
92 /// hashes will get out of sync and throw an exception when validation is attempted.
93 /// </summary>
94 /// <param name="data">The outgoing data</param>
95 /// <returns>The local digest</returns>
96 public byte[] Sign(byte[] data)
97 {
98 currentHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
99 return currentHash;
100 }
101
102 /// <summary>
103 /// 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.
104 /// </summary>
105 /// <returns>A 128-character hexadecimal string containing the challenge.</returns>
106 public static string GenerateChallenge()
107 {
108 RNGCryptoServiceProvider RNG = new RNGCryptoServiceProvider();
109 byte[] bytes = new byte[64];
110 RNG.GetBytes(bytes);
111
112 StringBuilder sb = new StringBuilder(bytes.Length * 2);
113 foreach (byte b in bytes)
114 {
115 sb.AppendFormat("{0:x2}", b);
116 }
117 return sb.ToString();
118 }
119
120 /// <summary>
121 /// Helper function, merges two byte arrays
122 /// </summary>
123 /// <remarks>Sourced from MSDN Forum</remarks>
124 /// <param name="a">A</param>
125 /// <param name="b">B</param>
126 /// <returns>C</returns>
127 private byte[] AppendArrays(byte[] a, byte[] b)
128 {
129 byte[] c = new byte[a.Length + b.Length];
130 Buffer.BlockCopy(a, 0, c, 0, a.Length);
131 Buffer.BlockCopy(b, 0, c, a.Length, b.Length);
132 return c;
133 }
134
135 }
136}
diff --git a/OpenSim/Framework/General/SimProfile.cs b/OpenSim/Framework/General/SimProfile.cs
new file mode 100644
index 0000000..cfa5e50
--- /dev/null
+++ b/OpenSim/Framework/General/SimProfile.cs
@@ -0,0 +1,122 @@
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
39 {
40 public LLUUID UUID;
41 public ulong regionhandle;
42 public string regionname;
43 public string sim_ip;
44 public uint sim_port;
45 public string caps_url;
46 public uint RegionLocX;
47 public uint RegionLocY;
48 public string sendkey;
49 public string recvkey;
50 public bool online;
51
52 public SimProfile LoadFromGrid(ulong region_handle, string GridURL, string SendKey, string RecvKey)
53 {
54 try
55 {
56 Hashtable GridReqParams = new Hashtable();
57 GridReqParams["region_handle"] = region_handle.ToString();
58 GridReqParams["authkey"] = SendKey;
59 ArrayList SendParams = new ArrayList();
60 SendParams.Add(GridReqParams);
61 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
62
63 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
64
65 Hashtable RespData = (Hashtable)GridResp.Value;
66 this.UUID = new LLUUID((string)RespData["UUID"]);
67 this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
68 this.regionname = (string)RespData["regionname"];
69 this.sim_ip = (string)RespData["sim_ip"];
70 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
71 this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
72 this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
73 this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
74 this.sendkey = SendKey;
75 this.recvkey = RecvKey;
76 }
77 catch (Exception e)
78 {
79 System.Console.WriteLine(e.ToString());
80 }
81 return this;
82 }
83
84 public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
85 {
86 try
87 {
88 Hashtable GridReqParams = new Hashtable();
89 GridReqParams["UUID"] = UUID.ToString();
90 GridReqParams["authkey"] = SendKey;
91 ArrayList SendParams = new ArrayList();
92 SendParams.Add(GridReqParams);
93 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
94
95 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
96
97 Hashtable RespData = (Hashtable)GridResp.Value;
98 this.UUID = new LLUUID((string)RespData["UUID"]);
99 this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
100 this.regionname = (string)RespData["regionname"];
101 this.sim_ip = (string)RespData["sim_ip"];
102 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
103 this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
104 this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
105 this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
106 this.sendkey = SendKey;
107 this.recvkey = RecvKey;
108 }
109 catch (Exception e)
110 {
111 System.Console.WriteLine(e.ToString());
112 }
113 return this;
114 }
115
116
117 public SimProfile()
118 {
119 }
120 }
121
122}
diff --git a/OpenSim/Framework/General/Types/AgentCiruitData.cs b/OpenSim/Framework/General/Types/AgentCiruitData.cs
new file mode 100644
index 0000000..a650343
--- /dev/null
+++ b/OpenSim/Framework/General/Types/AgentCiruitData.cs
@@ -0,0 +1,50 @@
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 AgentCircuitData
36 {
37 public AgentCircuitData() { }
38 public LLUUID AgentID;
39 public LLUUID SessionID;
40 public LLUUID SecureSessionID;
41 public LLVector3 startpos;
42 public string firstname;
43 public string lastname;
44 public uint circuitcode;
45 public bool child;
46 public LLUUID InventoryFolder;
47 public LLUUID BaseFolder;
48 public string CapsPath = "";
49 }
50}
diff --git a/OpenSim/Framework/General/Types/AgentWearable.cs b/OpenSim/Framework/General/Types/AgentWearable.cs
new file mode 100644
index 0000000..4c93da7
--- /dev/null
+++ b/OpenSim/Framework/General/Types/AgentWearable.cs
@@ -0,0 +1,60 @@
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 AvatarWearable
36 {
37 public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000");
38 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
39
40 public AvatarWearable()
41 {
42
43 }
44
45 public static AvatarWearable[] DefaultWearables
46 {
47 get
48 {
49 AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these
50 for (int i = 0; i < 13; i++)
51 {
52 defaultWearables[i] = new AvatarWearable();
53 }
54 defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
55 defaultWearables[0].ItemID = LLUUID.Random();
56 return defaultWearables;
57 }
58 }
59 }
60}
diff --git a/OpenSim/Framework/General/Types/AssetBase.cs b/OpenSim/Framework/General/Types/AssetBase.cs
new file mode 100644
index 0000000..86586a6
--- /dev/null
+++ b/OpenSim/Framework/General/Types/AssetBase.cs
@@ -0,0 +1,49 @@
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/OpenSim/Framework/General/Types/AssetLandmark.cs b/OpenSim/Framework/General/Types/AssetLandmark.cs
new file mode 100644
index 0000000..8a10b70
--- /dev/null
+++ b/OpenSim/Framework/General/Types/AssetLandmark.cs
@@ -0,0 +1,61 @@
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/OpenSim/Framework/General/Types/AssetStorage.cs b/OpenSim/Framework/General/Types/AssetStorage.cs
new file mode 100644
index 0000000..8cac23a
--- /dev/null
+++ b/OpenSim/Framework/General/Types/AssetStorage.cs
@@ -0,0 +1,50 @@
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/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs
new file mode 100644
index 0000000..778c893
--- /dev/null
+++ b/OpenSim/Framework/General/Types/EstateSettings.cs
@@ -0,0 +1,97 @@
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 public LLUUID terrainImageID = LLUUID.Zero; // the assetID that is the current Map image for this region
95
96 }
97}
diff --git a/OpenSim/Framework/General/Types/Login.cs b/OpenSim/Framework/General/Types/Login.cs
new file mode 100644
index 0000000..3180a16
--- /dev/null
+++ b/OpenSim/Framework/General/Types/Login.cs
@@ -0,0 +1,52 @@
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 Login
36 {
37 public string First = "Test";
38 public string Last = "User";
39 public LLUUID Agent;
40 public LLUUID Session;
41 public LLUUID SecureSession = LLUUID.Zero;
42 public LLUUID InventoryFolder;
43 public LLUUID BaseFolder;
44 public uint CircuitCode;
45 public string CapsPath ="";
46
47 public Login()
48 {
49
50 }
51 }
52}
diff --git a/OpenSim/Framework/General/Types/MapBlockData.cs b/OpenSim/Framework/General/Types/MapBlockData.cs
new file mode 100644
index 0000000..2e6f56e
--- /dev/null
+++ b/OpenSim/Framework/General/Types/MapBlockData.cs
@@ -0,0 +1,25 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5
6namespace OpenSim.Framework.Types
7{
8 public class MapBlockData
9 {
10 public uint Flags;
11 public ushort X;
12 public ushort Y;
13 public byte Agents;
14 public byte Access;
15 public byte WaterHeight;
16 public LLUUID MapImageId;
17 public String Name;
18 public uint RegionFlags;
19
20 public MapBlockData()
21 {
22
23 }
24 }
25}
diff --git a/OpenSim/Framework/General/Types/NeighbourInfo.cs b/OpenSim/Framework/General/Types/NeighbourInfo.cs
new file mode 100644
index 0000000..310fd1c
--- /dev/null
+++ b/OpenSim/Framework/General/Types/NeighbourInfo.cs
@@ -0,0 +1,50 @@
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 OpenSim.Framework.Interfaces;
32using OpenSim.Framework.Utilities;
33using OpenSim.Framework.Console;
34using libsecondlife;
35
36namespace OpenSim.Framework.Types
37{
38 public class NeighbourInfo
39 {
40 public NeighbourInfo()
41 {
42 }
43
44 public ulong regionhandle;
45 public uint RegionLocX;
46 public uint RegionLocY;
47 public string sim_ip;
48 public uint sim_port;
49 }
50}
diff --git a/OpenSim/Framework/General/Types/NetworkServersInfo.cs b/OpenSim/Framework/General/Types/NetworkServersInfo.cs
new file mode 100644
index 0000000..c6b81a7
--- /dev/null
+++ b/OpenSim/Framework/General/Types/NetworkServersInfo.cs
@@ -0,0 +1,220 @@
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 OpenSim.Framework.Interfaces;
32
33namespace OpenSim.Framework.Types
34{
35 public class NetworkServersInfo
36 {
37 public string AssetURL = "http://127.0.0.1:8003/";
38 public string AssetSendKey = "";
39
40 public string GridURL = "";
41 public string GridSendKey = "";
42 public string GridRecvKey = "";
43 public string UserURL = "";
44 public string UserSendKey = "";
45 public string UserRecvKey = "";
46 public bool isSandbox;
47
48 public uint DefaultHomeLocX = 0;
49 public uint DefaultHomeLocY = 0;
50
51 public int HttpListenerPort = 9000;
52 public int RemotingListenerPort = 8895;
53
54 public void InitConfig(bool sandboxMode, IGenericConfig configData)
55 {
56 this.isSandbox = sandboxMode;
57
58 try
59 {
60 string attri = "";
61
62 attri = "";
63 attri = configData.GetAttribute("HttpListenerPort");
64 if (attri == "")
65 {
66 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Http Listener Port", "9000");
67 configData.SetAttribute("HttpListenerPort", location);
68 this.HttpListenerPort = Convert.ToInt32(location);
69 }
70 else
71 {
72 this.HttpListenerPort = Convert.ToInt32(attri);
73 }
74
75 attri = "";
76 attri = configData.GetAttribute("RemotingListenerPort");
77 if (attri == "")
78 {
79 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895");
80 configData.SetAttribute("RemotingListenerPort", location);
81 this.RemotingListenerPort = Convert.ToInt32(location);
82 }
83 else
84 {
85 this.RemotingListenerPort = Convert.ToInt32(attri);
86 }
87
88 if (sandboxMode)
89 {
90 // default home location X
91 attri = "";
92 attri = configData.GetAttribute("DefaultLocationX");
93 if (attri == "")
94 {
95 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location X", "1000");
96 configData.SetAttribute("DefaultLocationX", location);
97 this.DefaultHomeLocX = (uint)Convert.ToUInt32(location);
98 }
99 else
100 {
101 this.DefaultHomeLocX = (uint)Convert.ToUInt32(attri);
102 }
103
104 // default home location Y
105 attri = "";
106 attri = configData.GetAttribute("DefaultLocationY");
107 if (attri == "")
108 {
109 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default Home Location Y", "1000");
110 configData.SetAttribute("DefaultLocationY", location);
111 this.DefaultHomeLocY = (uint)Convert.ToUInt32(location);
112 }
113 else
114 {
115 this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri);
116 }
117 }
118 if (!isSandbox)
119 {
120 //Grid Server
121 attri = "";
122 attri = configData.GetAttribute("GridServerURL");
123 if (attri == "")
124 {
125 this.GridURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL", "http://127.0.0.1:8001/");
126 configData.SetAttribute("GridServerURL", this.GridURL);
127 }
128 else
129 {
130 this.GridURL = attri;
131 }
132
133 //Grid Send Key
134 attri = "";
135 attri = configData.GetAttribute("GridSendKey");
136 if (attri == "")
137 {
138 this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server", "null");
139 configData.SetAttribute("GridSendKey", this.GridSendKey);
140 }
141 else
142 {
143 this.GridSendKey = attri;
144 }
145
146 //Grid Receive Key
147 attri = "";
148 attri = configData.GetAttribute("GridRecvKey");
149 if (attri == "")
150 {
151 this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server", "null");
152 configData.SetAttribute("GridRecvKey", this.GridRecvKey);
153 }
154 else
155 {
156 this.GridRecvKey = attri;
157 }
158
159 //Grid Server
160 attri = "";
161 attri = configData.GetAttribute("UserServerURL");
162 if (attri == "")
163 {
164 this.UserURL= OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("User server URL", "http://127.0.0.1:8002/");
165 configData.SetAttribute("UserServerURL", this.UserURL);
166 }
167 else
168 {
169 this.UserURL = attri;
170 }
171
172 //Grid Send Key
173 attri = "";
174 attri = configData.GetAttribute("UserSendKey");
175 if (attri == "")
176 {
177 this.UserSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to user server", "null");
178 configData.SetAttribute("UserSendKey", this.UserSendKey);
179 }
180 else
181 {
182 this.UserSendKey = attri;
183 }
184
185 //Grid Receive Key
186 attri = "";
187 attri = configData.GetAttribute("UserRecvKey");
188 if (attri == "")
189 {
190 this.UserRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from user server", "null");
191 configData.SetAttribute("GridRecvKey", this.UserRecvKey);
192 }
193 else
194 {
195 this.UserRecvKey = attri;
196 }
197
198 attri = "";
199 attri = configData.GetAttribute("AssetServerURL");
200 if (attri == "")
201 {
202 this.AssetURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Asset server URL", "http://127.0.0.1:8003/");
203 configData.SetAttribute("AssetServerURL", this.GridURL);
204 }
205 else
206 {
207 this.AssetURL = attri;
208 }
209
210 }
211 configData.Commit();
212 }
213 catch (Exception e)
214 {
215 OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
216 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
217 }
218 }
219 }
220}
diff --git a/OpenSim/Framework/General/Types/ParcelData.cs b/OpenSim/Framework/General/Types/ParcelData.cs
new file mode 100644
index 0000000..40f128a
--- /dev/null
+++ b/OpenSim/Framework/General/Types/ParcelData.cs
@@ -0,0 +1,115 @@
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/OpenSim/Framework/General/Types/PrimData.cs b/OpenSim/Framework/General/Types/PrimData.cs
new file mode 100644
index 0000000..f84ae3e
--- /dev/null
+++ b/OpenSim/Framework/General/Types/PrimData.cs
@@ -0,0 +1,230 @@
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 PrimData
36 {
37 private const uint FULL_MASK_PERMISSIONS = 2147483647;
38
39 public LLUUID OwnerID;
40 public byte PCode;
41 public ushort PathBegin;
42 public ushort PathEnd;
43 public byte PathScaleX;
44 public byte PathScaleY;
45 public byte PathShearX;
46 public byte PathShearY;
47 public sbyte PathSkew;
48 public ushort ProfileBegin;
49 public ushort ProfileEnd;
50 public LLVector3 Scale;
51 public byte PathCurve;
52 public byte ProfileCurve;
53 public uint ParentID = 0;
54 public ushort ProfileHollow;
55 public sbyte PathRadiusOffset;
56 public byte PathRevolutions;
57 public sbyte PathTaperX;
58 public sbyte PathTaperY;
59 public sbyte PathTwist;
60 public sbyte PathTwistBegin;
61 public byte[] TextureEntry; // a LL textureEntry in byte[] format
62
63 public Int32 CreationDate;
64 public uint OwnerMask = FULL_MASK_PERMISSIONS;
65 public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
66 public uint GroupMask = FULL_MASK_PERMISSIONS;
67 public uint EveryoneMask = FULL_MASK_PERMISSIONS;
68 public uint BaseMask = FULL_MASK_PERMISSIONS;
69
70 //following only used during prim storage
71 public LLVector3 Position;
72 public LLQuaternion Rotation = new LLQuaternion(0, 1, 0, 0);
73 public uint LocalID;
74 public LLUUID FullID;
75
76 public PrimData()
77 {
78
79 }
80
81 public PrimData(byte[] data)
82 {
83 int i = 0;
84
85 this.OwnerID = new LLUUID(data, i); i += 16;
86 this.PCode = data[i++];
87 this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
88 this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
89 this.PathScaleX = data[i++];
90 this.PathScaleY = data[i++];
91 this.PathShearX = data[i++];
92 this.PathShearY = data[i++];
93 this.PathSkew = (sbyte)data[i++];
94 this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
95 this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
96 this.Scale = new LLVector3(data, i); i += 12;
97 this.PathCurve = data[i++];
98 this.ProfileCurve = data[i++];
99 this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
100 this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8));
101 this.PathRadiusOffset = (sbyte)data[i++];
102 this.PathRevolutions = data[i++];
103 this.PathTaperX = (sbyte)data[i++];
104 this.PathTaperY = (sbyte)data[i++];
105 this.PathTwist = (sbyte)data[i++];
106 this.PathTwistBegin = (sbyte)data[i++];
107 ushort length = (ushort)(data[i++] + (data[i++] << 8));
108 this.TextureEntry = new byte[length];
109 Array.Copy(data, i, TextureEntry, 0, length); i += length;
110 this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
111 this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
112 this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
113 this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
114 this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
115 this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
116 this.Position = new LLVector3(data, i); i += 12;
117 this.Rotation = new LLQuaternion(data, i, true); i += 12;
118 this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
119 this.FullID = new LLUUID(data, i); i += 16;
120
121 }
122
123 public byte[] ToBytes()
124 {
125 int i = 0;
126 byte[] bytes = new byte[126 + TextureEntry.Length];
127 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
128 bytes[i++] = this.PCode;
129 bytes[i++] = (byte)(this.PathBegin % 256);
130 bytes[i++] = (byte)((this.PathBegin >> 8) % 256);
131 bytes[i++] = (byte)(this.PathEnd % 256);
132 bytes[i++] = (byte)((this.PathEnd >> 8) % 256);
133 bytes[i++] = this.PathScaleX;
134 bytes[i++] = this.PathScaleY;
135 bytes[i++] = this.PathShearX;
136 bytes[i++] = this.PathShearY;
137 bytes[i++] = (byte)this.PathSkew;
138 bytes[i++] = (byte)(this.ProfileBegin % 256);
139 bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256);
140 bytes[i++] = (byte)(this.ProfileEnd % 256);
141 bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256);
142 Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12;
143 bytes[i++] = this.PathCurve;
144 bytes[i++] = this.ProfileCurve;
145 bytes[i++] = (byte)(ParentID % 256);
146 bytes[i++] = (byte)((ParentID >> 8) % 256);
147 bytes[i++] = (byte)((ParentID >> 16) % 256);
148 bytes[i++] = (byte)((ParentID >> 24) % 256);
149 bytes[i++] = (byte)(this.ProfileHollow % 256);
150 bytes[i++] = (byte)((this.ProfileHollow >> 8) % 256);
151 bytes[i++] = ((byte)this.PathRadiusOffset);
152 bytes[i++] = this.PathRevolutions;
153 bytes[i++] = ((byte)this.PathTaperX);
154 bytes[i++] = ((byte)this.PathTaperY);
155 bytes[i++] = ((byte)this.PathTwist);
156 bytes[i++] = ((byte)this.PathTwistBegin);
157 bytes[i++] = (byte)(TextureEntry.Length % 256);
158 bytes[i++] = (byte)((TextureEntry.Length >> 8) % 256);
159 Array.Copy(TextureEntry, 0, bytes, i, TextureEntry.Length); i += TextureEntry.Length;
160 bytes[i++] = (byte)(this.CreationDate % 256);
161 bytes[i++] = (byte)((this.CreationDate >> 8) % 256);
162 bytes[i++] = (byte)((this.CreationDate >> 16) % 256);
163 bytes[i++] = (byte)((this.CreationDate >> 24) % 256);
164 bytes[i++] = (byte)(this.OwnerMask % 256);
165 bytes[i++] = (byte)((this.OwnerMask >> 8) % 256);
166 bytes[i++] = (byte)((this.OwnerMask >> 16) % 256);
167 bytes[i++] = (byte)((this.OwnerMask >> 24) % 256);
168 bytes[i++] = (byte)(this.NextOwnerMask % 256);
169 bytes[i++] = (byte)((this.NextOwnerMask >> 8) % 256);
170 bytes[i++] = (byte)((this.NextOwnerMask >> 16) % 256);
171 bytes[i++] = (byte)((this.NextOwnerMask >> 24) % 256);
172 bytes[i++] = (byte)(this.GroupMask % 256);
173 bytes[i++] = (byte)((this.GroupMask >> 8) % 256);
174 bytes[i++] = (byte)((this.GroupMask >> 16) % 256);
175 bytes[i++] = (byte)((this.GroupMask >> 24) % 256);
176 bytes[i++] = (byte)(this.EveryoneMask % 256);
177 bytes[i++] = (byte)((this.EveryoneMask >> 8) % 256);
178 bytes[i++] = (byte)((this.EveryoneMask >> 16) % 256);
179 bytes[i++] = (byte)((this.EveryoneMask >> 24) % 256);
180 bytes[i++] = (byte)(this.BaseMask % 256);
181 bytes[i++] = (byte)((this.BaseMask >> 8) % 256);
182 bytes[i++] = (byte)((this.BaseMask >> 16) % 256);
183 bytes[i++] = (byte)((this.BaseMask >> 24) % 256);
184 Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12;
185 if (this.Rotation == new LLQuaternion(0, 0, 0, 0))
186 {
187 this.Rotation = new LLQuaternion(0, 1, 0, 0);
188 }
189 Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12;
190 bytes[i++] = (byte)(this.LocalID % 256);
191 bytes[i++] = (byte)((this.LocalID >> 8) % 256);
192 bytes[i++] = (byte)((this.LocalID >> 16) % 256);
193 bytes[i++] = (byte)((this.LocalID >> 24) % 256);
194 Array.Copy(FullID.GetBytes(), 0, bytes, i, 16); i += 16;
195
196 return bytes;
197 }
198
199 public static PrimData DefaultCube()
200 {
201 PrimData primData = new PrimData();
202 primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
203 primData.FullID = LLUUID.Random();
204 primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
205 primData.Rotation = new LLQuaternion(0, 0, 0, 1);
206 primData.PCode = 9;
207 primData.ParentID = 0;
208 primData.PathBegin = 0;
209 primData.PathEnd = 0;
210 primData.PathScaleX = 0;
211 primData.PathScaleY = 0;
212 primData.PathShearX = 0;
213 primData.PathShearY = 0;
214 primData.PathSkew = 0;
215 primData.ProfileBegin = 0;
216 primData.ProfileEnd = 0;
217 primData.PathCurve = 16;
218 primData.ProfileCurve = 1;
219 primData.ProfileHollow = 0;
220 primData.PathRadiusOffset = 0;
221 primData.PathRevolutions = 0;
222 primData.PathTaperX = 0;
223 primData.PathTaperY = 0;
224 primData.PathTwist = 0;
225 primData.PathTwistBegin = 0;
226
227 return primData;
228 }
229 }
230}
diff --git a/OpenSim/Framework/General/Types/RegionHandle.cs b/OpenSim/Framework/General/Types/RegionHandle.cs
new file mode 100644
index 0000000..1271d04
--- /dev/null
+++ b/OpenSim/Framework/General/Types/RegionHandle.cs
@@ -0,0 +1,120 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Net;
5
6namespace OpenSim.Framework.Types
7{
8 /// <summary>
9 /// A class for manipulating RegionHandle coordinates
10 /// </summary>
11 class RegionHandle
12 {
13 private UInt64 handle;
14
15 /// <summary>
16 /// Initialises a new grid-aware RegionHandle
17 /// </summary>
18 /// <param name="ip">IP Address of the Grid Server for this region</param>
19 /// <param name="x">Grid X Coordinate</param>
20 /// <param name="y">Grid Y Coordinate</param>
21 public RegionHandle(string ip, short x, short y)
22 {
23 IPAddress addr = IPAddress.Parse(ip);
24
25 long baseHandle = addr.Address;
26
27 // Split the IP address in half
28 short a = (short)((baseHandle << 16) & 0xFFFF);
29 short b = (short)((baseHandle << 0) & 0xFFFF);
30
31 // Raise the bounds a little
32 uint nx = (uint)x;
33 uint ny = (uint)y;
34
35 // Multiply grid coords to get region coords
36 nx *= 256;
37 ny *= 256;
38
39 // Stuff the IP address in too
40 nx = (uint)a << 16;
41 ny = (uint)b << 16;
42
43 handle = ((UInt64)nx << 32) | (uint)ny;
44 }
45
46 /// <summary>
47 /// Initialises a new RegionHandle that is not inter-grid aware
48 /// </summary>
49 /// <param name="x">Grid X Coordinate</param>
50 /// <param name="y">Grid Y Coordinate</param>
51 public RegionHandle(uint x, uint y)
52 {
53 handle = ((x * 256) << 32) | (y * 256);
54 }
55
56 /// <summary>
57 /// Initialises a new RegionHandle from an existing value
58 /// </summary>
59 /// <param name="Region">A U64 RegionHandle</param>
60 public RegionHandle(UInt64 Region)
61 {
62 handle = Region;
63 }
64
65 /// <summary>
66 /// Returns the Grid Masked RegionHandle - For use in Teleport packets and other packets where sending the grid IP address may be handy.
67 /// </summary>
68 /// <remarks>Do not use for SimulatorEnable packets. The client will choke.</remarks>
69 /// <returns>Region Handle including IP Address encoding</returns>
70 public UInt64 getTeleportHandle()
71 {
72 return handle;
73 }
74
75 /// <summary>
76 /// Returns a RegionHandle which may be used for SimulatorEnable packets. Removes the IP address encoding and returns the lower bounds.
77 /// </summary>
78 /// <returns>A U64 RegionHandle for use in SimulatorEnable packets.</returns>
79 public UInt64 getNeighbourHandle()
80 {
81 UInt64 mask = 0x0000FFFF0000FFFF;
82
83 return handle | mask;
84 }
85
86 /// <summary>
87 /// Returns the IP Address of the GridServer from a Grid-Encoded RegionHandle
88 /// </summary>
89 /// <returns>Grid Server IP Address</returns>
90 public IPAddress getGridIP()
91 {
92 uint a = (uint)((handle >> 16) & 0xFFFF);
93 uint b = (uint)((handle >> 48) & 0xFFFF);
94
95 return new IPAddress((long)(a << 16) | (long)b);
96 }
97
98 /// <summary>
99 /// Returns the X Coordinate from a Grid-Encoded RegionHandle
100 /// </summary>
101 /// <returns>X Coordinate</returns>
102 public uint getGridX()
103 {
104 uint x = (uint)((handle >> 32) & 0xFFFF);
105
106 return x;
107 }
108
109 /// <summary>
110 /// Returns the Y Coordinate from a Grid-Encoded RegionHandle
111 /// </summary>
112 /// <returns>Y Coordinate</returns>
113 public uint getGridY()
114 {
115 uint y = (uint)((handle >> 0) & 0xFFFF);
116
117 return y;
118 }
119 }
120}
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs
new file mode 100644
index 0000000..0fba6ca
--- /dev/null
+++ b/OpenSim/Framework/General/Types/RegionInfo.cs
@@ -0,0 +1,304 @@
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 System.Globalization;
32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Utilities;
34using OpenSim.Framework.Console;
35using libsecondlife;
36
37namespace OpenSim.Framework.Types
38{
39 public class RegionInfo
40 {
41 public LLUUID SimUUID = new LLUUID();
42 public string RegionName = "";
43 public uint RegionLocX = 0;
44 public uint RegionLocY = 0;
45 public ulong RegionHandle = 0;
46
47 public string DataStore = "";
48 public bool isSandbox = false;
49
50 public LLUUID MasterAvatarAssignedUUID = new LLUUID();
51 public string MasterAvatarFirstName = "";
52 public string MasterAvatarLastName = "";
53 public string MasterAvatarSandboxPassword = "";
54
55 /// <summary>
56 /// Port used for listening (TCP and UDP)
57 /// </summary>
58 /// <remarks>Seperate TCP and UDP</remarks>
59 public int CommsIPListenPort = 0;
60 /// <summary>
61 /// Address used for internal listening (default: 0.0.0.0?)
62 /// </summary>
63 public string CommsIPListenAddr = "";
64 /// <summary>
65 /// Address used for external addressing (DNS or IP)
66 /// </summary>
67 public string CommsExternalAddress = "";
68
69
70 public EstateSettings estateSettings;
71
72 public RegionInfo()
73 {
74 estateSettings = new EstateSettings();
75 }
76
77
78 public void InitConfig(bool sandboxMode, IGenericConfig configData)
79 {
80 this.isSandbox = sandboxMode;
81 try
82 {
83 // Sim UUID
84 string attri = "";
85 attri = configData.GetAttribute("SimUUID");
86 if (attri == "")
87 {
88 this.SimUUID = LLUUID.Random();
89 configData.SetAttribute("SimUUID", this.SimUUID.ToString());
90 }
91 else
92 {
93 this.SimUUID = new LLUUID(attri);
94 }
95
96 // Sim name
97 attri = "";
98 attri = configData.GetAttribute("SimName");
99 if (attri == "")
100 {
101 this.RegionName = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Name", "OpenSim test");
102 configData.SetAttribute("SimName", this.RegionName);
103 }
104 else
105 {
106 this.RegionName = attri;
107 }
108 // Sim/Grid location X
109 attri = "";
110 attri = configData.GetAttribute("SimLocationX");
111 if (attri == "")
112 {
113 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid Location X", "1000");
114 configData.SetAttribute("SimLocationX", location);
115 this.RegionLocX = (uint)Convert.ToUInt32(location);
116 }
117 else
118 {
119 this.RegionLocX = (uint)Convert.ToUInt32(attri);
120 }
121 // Sim/Grid location Y
122 attri = "";
123 attri = configData.GetAttribute("SimLocationY");
124 if (attri == "")
125 {
126 string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid Location Y", "1000");
127 configData.SetAttribute("SimLocationY", location);
128 this.RegionLocY = (uint)Convert.ToUInt32(location);
129 }
130 else
131 {
132 this.RegionLocY = (uint)Convert.ToUInt32(attri);
133 }
134
135 // Local storage datastore
136 attri = "";
137 attri = configData.GetAttribute("Datastore");
138 if (attri == "")
139 {
140 string datastore = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Filename for local storage", "localworld.yap");
141 configData.SetAttribute("Datastore", datastore);
142 this.DataStore = datastore;
143 }
144 else
145 {
146 this.DataStore = attri;
147 }
148
149 //Sim Listen Port
150 attri = "";
151 attri = configData.GetAttribute("SimListenPort");
152 if (attri == "")
153 {
154 string port = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("UDP port for client connections", "9000");
155 configData.SetAttribute("SimListenPort", port);
156 this.CommsIPListenPort = Convert.ToInt32(port);
157 }
158 else
159 {
160 this.CommsIPListenPort = Convert.ToInt32(attri);
161 }
162
163 //Sim Listen Address
164 attri = "";
165 attri = configData.GetAttribute("SimListenAddress");
166 if (attri == "")
167 {
168 this.CommsIPListenAddr = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP Address to listen on for client connections", "0.0.0.0");
169 configData.SetAttribute("SimListenAddress", this.CommsIPListenAddr);
170 }
171 else
172 {
173 // Probably belongs elsewhere, but oh well.
174 if (attri.Trim().StartsWith("SYSTEMIP"))
175 {
176 string localhostname = System.Net.Dns.GetHostName();
177 System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname);
178 try
179 {
180 this.CommsIPListenAddr = "0.0.0.0"; // Incase a IPv4 address isnt found
181
182 foreach (System.Net.IPAddress ip in ips)
183 {
184 if (ip.AddressFamily.ToString() == System.Net.Sockets.ProtocolFamily.InterNetwork.ToString())
185 {
186 this.CommsIPListenAddr = ip.ToString();
187 break;
188 }
189 }
190 }
191 catch (Exception e)
192 {
193 e.ToString();
194 this.CommsIPListenAddr = "0.0.0.0"; // Use the default if we fail
195 }
196 }
197 else
198 {
199 this.CommsIPListenAddr = attri;
200 }
201 }
202
203 // Sim External Address
204 attri = "";
205 attri = configData.GetAttribute("SimExternalAddress");
206 if (attri == "")
207 {
208 this.CommsExternalAddress = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("IP or DNS address to send external clients to", "localhost");
209 configData.SetAttribute("SimExternalAddress", this.CommsExternalAddress);
210 }
211 else
212 {
213 this.CommsExternalAddress = attri;
214 }
215
216 attri = "";
217 attri = configData.GetAttribute("TerrainFile");
218 if (attri == "")
219 {
220 this.estateSettings.terrainFile = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("GENERAL SETTING: Default Terrain File", "default.r32");
221 configData.SetAttribute("TerrainFile", this.estateSettings.terrainFile);
222 }
223 else
224 {
225 this.estateSettings.terrainFile = attri;
226 }
227
228 attri = "";
229 attri = configData.GetAttribute("TerrainMultiplier");
230 if (attri == "")
231 {
232 string re = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0");
233 this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture);
234 configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString());
235 }
236 else
237 {
238 this.estateSettings.terrainMultiplier = Convert.ToDouble(attri);
239 }
240
241 attri = "";
242 attri = configData.GetAttribute("MasterAvatarFirstName");
243 if (attri == "")
244 {
245 this.MasterAvatarFirstName = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("First name of Master Avatar (Land and Region Owner)", "Test");
246
247 configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName);
248 }
249 else
250 {
251 this.MasterAvatarFirstName = attri;
252 }
253
254 attri = "";
255 attri = configData.GetAttribute("MasterAvatarLastName");
256 if (attri == "")
257 {
258 this.MasterAvatarLastName = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Last name of Master Avatar (Land and Region Owner)", "User");
259
260 configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName);
261 }
262 else
263 {
264 this.MasterAvatarLastName = attri;
265 }
266
267 if (isSandbox) //Sandbox Mode Specific Settings
268 {
269 attri = "";
270 attri = configData.GetAttribute("MasterAvatarSandboxPassword");
271 if (attri == "")
272 {
273 this.MasterAvatarSandboxPassword = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Password of Master Avatar (Needed for sandbox mode account creation only)", "test");
274
275 //Should I store this?
276 configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword);
277 }
278 else
279 {
280 this.MasterAvatarSandboxPassword = attri;
281 }
282 }
283
284 this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
285
286 configData.Commit();
287 }
288 catch (Exception e)
289 {
290 OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
291 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
292 }
293
294 OpenSim.Framework.Console.MainLog.Instance.Verbose("Sim settings loaded:");
295 OpenSim.Framework.Console.MainLog.Instance.Verbose( "UUID: " + this.SimUUID.ToStringHyphenated());
296 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Name: " + this.RegionName);
297 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]");
298 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Region Handle: " + this.RegionHandle.ToString());
299 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Listening on IP: " + this.CommsIPListenAddr + ":" + this.CommsIPListenPort);
300 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Sandbox Mode? " + isSandbox.ToString());
301
302 }
303 }
304}
diff --git a/OpenSim/Framework/General/UserProfile.cs b/OpenSim/Framework/General/UserProfile.cs
new file mode 100644
index 0000000..263dba2
--- /dev/null
+++ b/OpenSim/Framework/General/UserProfile.cs
@@ -0,0 +1,89 @@
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((1000 * 256), (1000 * 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/OpenSim/Framework/General/Util.cs b/OpenSim/Framework/General/Util.cs
new file mode 100644
index 0000000..8c34c9b
--- /dev/null
+++ b/OpenSim/Framework/General/Util.cs
@@ -0,0 +1,186 @@
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 string GetRandomCapsPath()
85 {
86 LLUUID caps = LLUUID.Random();
87 string capsPath = caps.ToStringHyphenated();
88 capsPath = capsPath.Remove(capsPath.Length - 4, 4);
89 return capsPath;
90 }
91
92 //public static int fast_distance2d(int x, int y)
93 //{
94 // x = System.Math.Abs(x);
95 // y = System.Math.Abs(y);
96
97 // int min = System.Math.Min(x, y);
98
99 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4));
100 //}
101
102 public static string FieldToString(byte[] bytes)
103 {
104 return FieldToString(bytes, String.Empty);
105 }
106
107 /// <summary>
108 /// Convert a variable length field (byte array) to a string, with a
109 /// field name prepended to each line of the output
110 /// </summary>
111 /// <remarks>If the byte array has unprintable characters in it, a
112 /// hex dump will be put in the string instead</remarks>
113 /// <param name="bytes">The byte array to convert to a string</param>
114 /// <param name="fieldName">A field name to prepend to each line of output</param>
115 /// <returns>An ASCII string or a string containing a hex dump, minus
116 /// the null terminator</returns>
117 public static string FieldToString(byte[] bytes, string fieldName)
118 {
119 // Check for a common case
120 if (bytes.Length == 0) return String.Empty;
121
122 StringBuilder output = new StringBuilder();
123 bool printable = true;
124
125 for (int i = 0; i < bytes.Length; ++i)
126 {
127 // Check if there are any unprintable characters in the array
128 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09
129 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00)
130 {
131 printable = false;
132 break;
133 }
134 }
135
136 if (printable)
137 {
138 if (fieldName.Length > 0)
139 {
140 output.Append(fieldName);
141 output.Append(": ");
142 }
143
144 if (bytes[bytes.Length - 1] == 0x00)
145 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1));
146 else
147 output.Append(UTF8Encoding.UTF8.GetString(bytes));
148 }
149 else
150 {
151 for (int i = 0; i < bytes.Length; i += 16)
152 {
153 if (i != 0)
154 output.Append(Environment.NewLine);
155 if (fieldName.Length > 0)
156 {
157 output.Append(fieldName);
158 output.Append(": ");
159 }
160
161 for (int j = 0; j < 16; j++)
162 {
163 if ((i + j) < bytes.Length)
164 output.Append(String.Format("{0:X2} ", bytes[i + j]));
165 else
166 output.Append(" ");
167 }
168
169 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++)
170 {
171 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E)
172 output.Append((char)bytes[i + j]);
173 else
174 output.Append(".");
175 }
176 }
177 }
178
179 return output.ToString();
180 }
181 public Util()
182 {
183
184 }
185 }
186}
diff --git a/OpenSim/Framework/GenericConfig/Xml/OpenSim.Framework.GenericConfig.Xml.csproj b/OpenSim/Framework/GenericConfig/Xml/OpenSim.Framework.GenericConfig.Xml.csproj
new file mode 100644
index 0000000..aae8cd2
--- /dev/null
+++ b/OpenSim/Framework/GenericConfig/Xml/OpenSim.Framework.GenericConfig.Xml.csproj
@@ -0,0 +1,93 @@
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>{C74E4A30-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.GenericConfig.Xml</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.GenericConfig.Xml</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 <Reference Include="System.Xml" >
66 <HintPath>System.Xml.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 </ItemGroup>
70 <ItemGroup>
71 <ProjectReference Include="..\..\General\OpenSim.Framework.csproj">
72 <Name>OpenSim.Framework</Name>
73 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
74 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
75 <Private>False</Private>
76 </ProjectReference>
77 </ItemGroup>
78 <ItemGroup>
79 <Compile Include="XmlConfig.cs">
80 <SubType>Code</SubType>
81 </Compile>
82 <Compile Include="Properties\AssemblyInfo.cs">
83 <SubType>Code</SubType>
84 </Compile>
85 </ItemGroup>
86 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
87 <PropertyGroup>
88 <PreBuildEvent>
89 </PreBuildEvent>
90 <PostBuildEvent>
91 </PostBuildEvent>
92 </PropertyGroup>
93</Project>
diff --git a/OpenSim/Framework/GenericConfig/Xml/OpenSim.Framework.GenericConfig.Xml.dll.build b/OpenSim/Framework/GenericConfig/Xml/OpenSim.Framework.GenericConfig.Xml.dll.build
new file mode 100644
index 0000000..a4617cc
--- /dev/null
+++ b/OpenSim/Framework/GenericConfig/Xml/OpenSim.Framework.GenericConfig.Xml.dll.build
@@ -0,0 +1,42 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.GenericConfig.Xml" 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.GenericConfig.Xml" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="XmlConfig.cs" />
15 <include name="Properties/AssemblyInfo.cs" />
16 </sources>
17 <references basedir="${project::get-base-directory()}">
18 <lib>
19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib>
22 <include name="../../../../bin/OpenSim.Framework.dll" />
23 <include name="System.dll" />
24 <include name="System.Xml.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/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs b/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..de5f48d
--- /dev/null
+++ b/OpenSim/Framework/GenericConfig/Xml/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
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.GenericConfig")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.GenericConfig")]
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("285a3047-f165-46c8-8767-b51428738a09")]
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// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs b/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs
new file mode 100644
index 0000000..c526aec
--- /dev/null
+++ b/OpenSim/Framework/GenericConfig/Xml/XmlConfig.cs
@@ -0,0 +1,123 @@
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 System.Xml;
32using OpenSim.Framework.Interfaces;
33
34namespace OpenSim.GenericConfig
35{
36 public class XmlConfig : IGenericConfig
37 {
38 private XmlDocument doc;
39 private XmlNode rootNode;
40 private XmlNode configNode;
41 private string fileName;
42 private bool createdFile = false;
43
44 public XmlConfig(string filename)
45 {
46 fileName = filename;
47 }
48
49 public void LoadData()
50 {
51 doc = new XmlDocument();
52
53 if (System.IO.File.Exists(fileName))
54 {
55 XmlTextReader reader = new XmlTextReader(fileName);
56 reader.WhitespaceHandling = WhitespaceHandling.None;
57 doc.Load(reader);
58 reader.Close();
59 }
60 else
61 {
62 createdFile = true;
63 rootNode = doc.CreateNode(XmlNodeType.Element, "Root", "");
64 doc.AppendChild(rootNode);
65 configNode = doc.CreateNode(XmlNodeType.Element, "Config", "");
66 rootNode.AppendChild(configNode);
67 }
68
69
70 rootNode = doc.FirstChild;
71 if (rootNode.Name != "Root")
72 throw new Exception("Error: Invalid .xml File. Missing <Root>");
73
74 configNode = rootNode.FirstChild;
75 if (configNode.Name != "Config")
76 throw new Exception("Error: Invalid .xml File. <Root> first child should be <Config>");
77
78 if (createdFile)
79 {
80 this.Commit();
81 }
82 }
83
84 public string GetAttribute(string attributeName)
85 {
86 string result = "";
87 if (configNode.Attributes[attributeName] != null)
88 {
89 result = ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value;
90 }
91 return result;
92 }
93
94 public bool SetAttribute(string attributeName, string attributeValue)
95 {
96 if (configNode.Attributes[attributeName] != null)
97 {
98 ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value = attributeValue;
99 }
100 else
101 {
102 XmlAttribute attri;
103 attri = doc.CreateAttribute(attributeName);
104 attri.Value = attributeValue;
105 configNode.Attributes.Append(attri);
106 }
107 return true;
108 }
109
110 public void Commit()
111 {
112 doc.Save(fileName);
113 }
114
115 public void Close()
116 {
117 configNode = null;
118 rootNode = null;
119 doc = null;
120 }
121
122 }
123}
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
new file mode 100644
index 0000000..8c8204a
--- /dev/null
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -0,0 +1,311 @@
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.Net;
31using System.Text;
32using System.Text.RegularExpressions;
33using System.Threading;
34using Nwc.XmlRpc;
35using System.Collections;
36using OpenSim.Framework.Console;
37
38namespace OpenSim.Framework.Servers
39{
40 public class BaseHttpServer
41 {
42 protected class RestMethodEntry
43 {
44 private string m_path;
45 public string Path
46 {
47 get { return m_path; }
48 }
49
50 private RestMethod m_restMethod;
51 public RestMethod RestMethod
52 {
53 get { return m_restMethod; }
54 }
55
56 public RestMethodEntry(string path, RestMethod restMethod)
57 {
58 m_path = path;
59 m_restMethod = restMethod;
60 }
61 }
62
63 protected Thread m_workerThread;
64 protected HttpListener m_httpListener;
65 protected Dictionary<string, RestMethodEntry> m_restHandlers = new Dictionary<string, RestMethodEntry>();
66 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
67 protected int m_port;
68 protected bool firstcaps = true;
69
70 public BaseHttpServer(int port)
71 {
72 m_port = port;
73 }
74
75 public bool AddRestHandler(string method, string path, RestMethod handler)
76 {
77 //Console.WriteLine("adding new REST handler for path " + path);
78 string methodKey = String.Format("{0}: {1}", method, path);
79
80 if (!this.m_restHandlers.ContainsKey(methodKey))
81 {
82 this.m_restHandlers.Add(methodKey, new RestMethodEntry(path, handler));
83 return true;
84 }
85
86 //must already have a handler for that path so return false
87 return false;
88 }
89
90 public bool RemoveRestHandler(string method, string path)
91 {
92 string methodKey = String.Format("{0}: {1}", method, path);
93 if (this.m_restHandlers.ContainsKey(methodKey))
94 {
95 this.m_restHandlers.Remove(methodKey);
96 return true;
97 }
98 return false;
99 }
100
101 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler)
102 {
103 if (!this.m_rpcHandlers.ContainsKey(method))
104 {
105 this.m_rpcHandlers.Add(method, handler);
106 return true;
107 }
108
109 //must already have a handler for that path so return false
110 return false;
111 }
112
113 protected virtual string ProcessXMLRPCMethod(string methodName, XmlRpcRequest request)
114 {
115 XmlRpcResponse response;
116
117 XmlRpcMethod method;
118 if (this.m_rpcHandlers.TryGetValue(methodName, out method))
119 {
120 response = method(request);
121 }
122 else
123 {
124 response = new XmlRpcResponse();
125 Hashtable unknownMethodError = new Hashtable();
126 unknownMethodError["reason"] = "XmlRequest"; ;
127 unknownMethodError["message"] = "Unknown Rpc request";
128 unknownMethodError["login"] = "false";
129 response.Value = unknownMethodError;
130 }
131
132 return XmlRpcResponseSerializer.Singleton.Serialize(response);
133 }
134
135 protected virtual string ParseREST(string request, string path, string method)
136 {
137 string response;
138
139 string requestKey = String.Format("{0}: {1}", method, path);
140
141 string bestMatch = String.Empty;
142 foreach (string currentKey in m_restHandlers.Keys)
143 {
144 if (requestKey.StartsWith(currentKey))
145 {
146 if (currentKey.Length > bestMatch.Length)
147 {
148 bestMatch = currentKey;
149 }
150 }
151 }
152
153 RestMethodEntry restMethodEntry;
154 if (m_restHandlers.TryGetValue(bestMatch, out restMethodEntry))
155 {
156 RestMethod restMethod = restMethodEntry.RestMethod;
157
158 string param = path.Substring(restMethodEntry.Path.Length);
159 response = restMethod(request, path, param);
160
161 }
162 else
163 {
164 response = String.Empty;
165 }
166
167 return response;
168 }
169
170 protected virtual string ParseLLSDXML(string requestBody)
171 {
172 // dummy function for now - IMPLEMENT ME!
173 //Console.WriteLine("LLSD request "+requestBody);
174 string resp = "";
175 if (firstcaps)
176 {
177 resp = "<llsd><map><key>MapLayer</key><string>http://127.0.0.1:9000/CAPS/</string></map></llsd>";
178 firstcaps = false;
179 }
180 return resp;
181 }
182
183 protected virtual string ParseXMLRPC(string requestBody)
184 {
185 string responseString = String.Empty;
186
187 try
188 {
189 XmlRpcRequest request = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody);
190
191 string methodName = request.MethodName;
192
193 responseString = ProcessXMLRPCMethod(methodName, request);
194 }
195 catch (Exception e)
196 {
197 //Console.WriteLine(e.ToString());
198 }
199 return responseString;
200 }
201
202 public virtual void HandleRequest(Object stateinfo)
203 {
204 try
205 {
206 HttpListenerContext context = (HttpListenerContext)stateinfo;
207
208 HttpListenerRequest request = context.Request;
209 HttpListenerResponse response = context.Response;
210
211 response.KeepAlive = false;
212 response.SendChunked = false;
213
214 System.IO.Stream body = request.InputStream;
215 System.Text.Encoding encoding = System.Text.Encoding.UTF8;
216 System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding);
217
218 string requestBody = reader.ReadToEnd();
219 body.Close();
220 reader.Close();
221
222 //Console.WriteLine(request.HttpMethod + " " + request.RawUrl + " Http/" + request.ProtocolVersion.ToString() + " content type: " + request.ContentType);
223 //Console.WriteLine(requestBody);
224
225 string responseString = "";
226 // Console.WriteLine("new request " + request.ContentType +" at "+ request.RawUrl);
227 switch (request.ContentType)
228 {
229 case "text/xml":
230 // must be XML-RPC, so pass to the XML-RPC parser
231
232 responseString = ParseXMLRPC(requestBody);
233 responseString = Regex.Replace(responseString, "utf-16", "utf-8");
234
235 response.AddHeader("Content-type", "text/xml");
236 break;
237
238 case "application/xml":
239 // probably LLSD we hope, otherwise it should be ignored by the parser
240 // responseString = ParseLLSDXML(requestBody);
241 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
242 response.AddHeader("Content-type", "application/xml");
243 break;
244
245 case "application/octet-stream":
246 // probably LLSD we hope, otherwise it should be ignored by the parser
247 // responseString = ParseLLSDXML(requestBody);
248 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
249 response.AddHeader("Content-type", "application/xml");
250 break;
251
252 case "application/x-www-form-urlencoded":
253 // a form data POST so send to the REST parser
254 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
255 response.AddHeader("Content-type", "text/html");
256 break;
257
258 case null:
259 // must be REST or invalid crap, so pass to the REST parser
260 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
261 response.AddHeader("Content-type", "text/html");
262 break;
263
264 }
265
266 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
267 System.IO.Stream output = response.OutputStream;
268 response.SendChunked = false;
269 response.ContentLength64 = buffer.Length;
270 output.Write(buffer, 0, buffer.Length);
271 output.Close();
272 }
273 catch (Exception e)
274 {
275 //Console.WriteLine(e.ToString());
276 }
277 }
278
279 public void Start()
280 {
281 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server");
282
283 m_workerThread = new Thread(new ThreadStart(StartHTTP));
284 m_workerThread.IsBackground = true;
285 m_workerThread.Start();
286 }
287
288 private void StartHTTP()
289 {
290 try
291 {
292 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK");
293 m_httpListener = new HttpListener();
294
295 m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
296 m_httpListener.Start();
297
298 HttpListenerContext context;
299 while (true)
300 {
301 context = m_httpListener.GetContext();
302 ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context);
303 }
304 }
305 catch (Exception e)
306 {
307 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message);
308 }
309 }
310 }
311}
diff --git a/OpenSim/Framework/Servers/CheckSumServer.cs b/OpenSim/Framework/Servers/CheckSumServer.cs
new file mode 100644
index 0000000..6aeb58c
--- /dev/null
+++ b/OpenSim/Framework/Servers/CheckSumServer.cs
@@ -0,0 +1,141 @@
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.Text;
30using System.IO;
31using System.Threading;
32using System.Net;
33using System.Net.Sockets;
34using System.Timers;
35using System.Reflection;
36using System.Collections;
37using System.Collections.Generic;
38using libsecondlife;
39using libsecondlife.Packets;
40using OpenSim.Framework.Console;
41
42
43namespace OpenSim.Framework.Servers
44{
45/* public class CheckSumServer : UDPServerBase
46 {
47 //protected ConsoleBase m_log;
48
49 public CheckSumServer(int port)
50 : base(port)
51 {
52 }
53
54 protected override void OnReceivedData(IAsyncResult result)
55 {
56 ipeSender = new IPEndPoint(IPAddress.Any, 0);
57 epSender = (EndPoint)ipeSender;
58 Packet packet = null;
59 int numBytes = Server.EndReceiveFrom(result, ref epSender);
60 int packetEnd = numBytes - 1;
61
62 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
63
64 if (packet.Type == PacketType.SecuredTemplateChecksumRequest)
65 {
66 SecuredTemplateChecksumRequestPacket checksum = (SecuredTemplateChecksumRequestPacket)packet;
67 TemplateChecksumReplyPacket checkreply = new TemplateChecksumReplyPacket();
68 checkreply.DataBlock.Checksum = 3220703154;//180572585;
69 checkreply.DataBlock.Flags = 0;
70 checkreply.DataBlock.MajorVersion = 1;
71 checkreply.DataBlock.MinorVersion = 15;
72 checkreply.DataBlock.PatchVersion = 0;
73 checkreply.DataBlock.ServerVersion = 0;
74 checkreply.TokenBlock.Token = checksum.TokenBlock.Token;
75 this.SendPacket(checkreply, epSender);
76
77 /*
78 //if we wanted to echo the the checksum/ version from the client (so that any client worked)
79 SecuredTemplateChecksumRequestPacket checkrequest = new SecuredTemplateChecksumRequestPacket();
80 checkrequest.TokenBlock.Token = checksum.TokenBlock.Token;
81 this.SendPacket(checkrequest, epSender);
82
83 }
84 else if (packet.Type == PacketType.TemplateChecksumReply)
85 {
86 //echo back the client checksum reply (Hegemon's method)
87 TemplateChecksumReplyPacket checksum2 = (TemplateChecksumReplyPacket)packet;
88 TemplateChecksumReplyPacket checkreply2 = new TemplateChecksumReplyPacket();
89 checkreply2.DataBlock.Checksum = checksum2.DataBlock.Checksum;
90 checkreply2.DataBlock.Flags = checksum2.DataBlock.Flags;
91 checkreply2.DataBlock.MajorVersion = checksum2.DataBlock.MajorVersion;
92 checkreply2.DataBlock.MinorVersion = checksum2.DataBlock.MinorVersion;
93 checkreply2.DataBlock.PatchVersion = checksum2.DataBlock.PatchVersion;
94 checkreply2.DataBlock.ServerVersion = checksum2.DataBlock.ServerVersion;
95 checkreply2.TokenBlock.Token = checksum2.TokenBlock.Token;
96 this.SendPacket(checkreply2, epSender);
97 }
98 else
99 {
100 }
101
102 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
103 }
104
105 private void SendPacket(Packet Pack, EndPoint endp)
106 {
107 if (!Pack.Header.Resent)
108 {
109 Pack.Header.Sequence = 1;
110 }
111
112 byte[] ZeroOutBuffer = new byte[4096];
113 byte[] sendbuffer;
114 sendbuffer = Pack.ToBytes();
115
116 try
117 {
118 if (Pack.Header.Zerocoded)
119 {
120 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer);
121 this.SendPackTo(ZeroOutBuffer, packetsize, SocketFlags.None, endp);
122 }
123 else
124 {
125 this.SendPackTo(sendbuffer, sendbuffer.Length, SocketFlags.None, endp);
126 }
127 }
128 catch (Exception)
129 {
130 OpenSim.Framework.Console.MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection ");
131
132 }
133 }
134
135 private void SendPackTo(byte[] buffer, int size, SocketFlags flags, EndPoint endp)
136 {
137 this.Server.SendTo(buffer, size, flags, endp);
138 }
139 *
140 }*/
141} \ No newline at end of file
diff --git a/OpenSim/Framework/Servers/IRestHandler.cs b/OpenSim/Framework/Servers/IRestHandler.cs
new file mode 100644
index 0000000..a2b6bf0
--- /dev/null
+++ b/OpenSim/Framework/Servers/IRestHandler.cs
@@ -0,0 +1,35 @@
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.Servers
33{
34 public delegate string RestMethod( string request, string path, string param );
35}
diff --git a/OpenSim/Framework/Servers/OpenSim.Framework.Servers.csproj b/OpenSim/Framework/Servers/OpenSim.Framework.Servers.csproj
new file mode 100644
index 0000000..399f456
--- /dev/null
+++ b/OpenSim/Framework/Servers/OpenSim.Framework.Servers.csproj
@@ -0,0 +1,116 @@
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>{2CC71860-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.Servers</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.Servers</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="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System" >
66 <HintPath>System.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Xml" >
70 <HintPath>System.Xml.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="XMLRPC.dll" >
74 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup>
78 <ItemGroup>
79 <ProjectReference Include="..\General\OpenSim.Framework.csproj">
80 <Name>OpenSim.Framework</Name>
81 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private>
84 </ProjectReference>
85 <ProjectReference Include="..\Console\OpenSim.Framework.Console.csproj">
86 <Name>OpenSim.Framework.Console</Name>
87 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
89 <Private>False</Private>
90 </ProjectReference>
91 </ItemGroup>
92 <ItemGroup>
93 <Compile Include="BaseHttpServer.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="CheckSumServer.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="IRestHandler.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="UDPServerBase.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 <Compile Include="XmlRpcMethod.cs">
106 <SubType>Code</SubType>
107 </Compile>
108 </ItemGroup>
109 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
110 <PropertyGroup>
111 <PreBuildEvent>
112 </PreBuildEvent>
113 <PostBuildEvent>
114 </PostBuildEvent>
115 </PropertyGroup>
116</Project>
diff --git a/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build b/OpenSim/Framework/Servers/OpenSim.Framework.Servers.dll.build
index 7c3eb68..7401b07 100644
--- a/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build
+++ b/OpenSim/Framework/Servers/OpenSim.Framework.Servers.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.GridInterfaces.Remote" default="build"> 2<project name="OpenSim.Framework.Servers" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,11 +8,14 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.GridInterfaces.Remote" dynamicprefix="true" > 11 <resources prefix="OpenSim.Framework.Servers" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" /> 14 <include name="BaseHttpServer.cs" />
15 <include name="RemoteAssetServer.cs" /> 15 <include name="CheckSumServer.cs" />
16 <include name="IRestHandler.cs" />
17 <include name="UDPServerBase.cs" />
18 <include name="XmlRpcMethod.cs" />
16 </sources> 19 </sources>
17 <references basedir="${project::get-base-directory()}"> 20 <references basedir="${project::get-base-directory()}">
18 <lib> 21 <lib>
diff --git a/OpenSim/Framework/Servers/UDPServerBase.cs b/OpenSim/Framework/Servers/UDPServerBase.cs
new file mode 100644
index 0000000..610d23b
--- /dev/null
+++ b/OpenSim/Framework/Servers/UDPServerBase.cs
@@ -0,0 +1,95 @@
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.Text;
30using System.IO;
31using System.Threading;
32using System.Net;
33using System.Net.Sockets;
34using System.Timers;
35using System.Reflection;
36using System.Collections;
37using System.Collections.Generic;
38using libsecondlife;
39using libsecondlife.Packets;
40
41namespace OpenSim.Framework.Servers
42{
43 public class UDPServerBase
44 {
45 public Socket Server;
46 protected IPEndPoint ServerIncoming;
47 protected byte[] RecvBuffer = new byte[4096];
48 protected byte[] ZeroBuffer = new byte[8192];
49 protected IPEndPoint ipeSender;
50 protected EndPoint epSender;
51 protected AsyncCallback ReceivedData;
52 protected int listenPort;
53
54 public UDPServerBase(int port)
55 {
56 listenPort = port;
57 }
58
59 protected virtual void OnReceivedData(IAsyncResult result)
60 {
61 ipeSender = new IPEndPoint(IPAddress.Any, 0);
62 epSender = (EndPoint)ipeSender;
63 Packet packet = null;
64 int numBytes = Server.EndReceiveFrom(result, ref epSender);
65 int packetEnd = numBytes - 1;
66
67 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
68
69 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
70 }
71
72 protected virtual void AddNewClient(Packet packet)
73 {
74 }
75
76 public virtual void ServerListener()
77 {
78
79 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
80 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
81 Server.Bind(ServerIncoming);
82
83 ipeSender = new IPEndPoint(IPAddress.Any, 0);
84 epSender = (EndPoint)ipeSender;
85 ReceivedData = new AsyncCallback(this.OnReceivedData);
86 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
87 }
88
89 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
90 {
91
92 }
93 }
94}
95
diff --git a/OpenSim/Framework/Servers/XmlRpcMethod.cs b/OpenSim/Framework/Servers/XmlRpcMethod.cs
new file mode 100644
index 0000000..51b3303
--- /dev/null
+++ b/OpenSim/Framework/Servers/XmlRpcMethod.cs
@@ -0,0 +1,34 @@
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 Nwc.XmlRpc;
30
31namespace OpenSim.Framework.Servers
32{
33 public delegate XmlRpcResponse XmlRpcMethod( XmlRpcRequest request );
34}
diff --git a/OpenSim/Framework/UserManager/LoginResponse.cs b/OpenSim/Framework/UserManager/LoginResponse.cs
new file mode 100644
index 0000000..d1cd8cf
--- /dev/null
+++ b/OpenSim/Framework/UserManager/LoginResponse.cs
@@ -0,0 +1,646 @@
1using System;
2using System.Text;
3using System.Text.RegularExpressions;
4using System.Threading;
5using System.Collections;
6using System.Xml;
7using libsecondlife;
8using OpenSim.Framework.Utilities;
9using OpenSim.Framework.Interfaces;
10using Nwc.XmlRpc;
11
12namespace OpenSim.Framework.UserManagement
13{
14
15 /// <summary>
16 /// A temp class to handle login response.
17 /// Should make use of UserProfileManager where possible.
18 /// </summary>
19
20 public class LoginResponse
21 {
22 private Hashtable loginFlagsHash;
23 private Hashtable globalTexturesHash;
24 private Hashtable loginError;
25 private Hashtable eventCategoriesHash;
26 private Hashtable uiConfigHash;
27 private Hashtable classifiedCategoriesHash;
28
29 private ArrayList loginFlags;
30 private ArrayList globalTextures;
31 private ArrayList eventCategories;
32 private ArrayList uiConfig;
33 private ArrayList classifiedCategories;
34 private ArrayList inventoryRoot;
35 private ArrayList initialOutfit;
36 private ArrayList agentInventory;
37
38 private UserInfo userProfile;
39
40 private LLUUID agentID;
41 private LLUUID sessionID;
42 private LLUUID secureSessionID;
43
44 // Login Flags
45 private string dst;
46 private string stipendSinceLogin;
47 private string gendered;
48 private string everLoggedIn;
49 private string login;
50 private int simPort;
51 private string simAddress;
52 private string agentAccess;
53 private Int32 circuitCode;
54 private uint regionX;
55 private uint regionY;
56
57 // Login
58 private string firstname;
59 private string lastname;
60
61 // Global Textures
62 private string sunTexture;
63 private string cloudTexture;
64 private string moonTexture;
65
66 // Error Flags
67 private string errorReason;
68 private string errorMessage;
69
70 // Response
71 private XmlRpcResponse xmlRpcResponse;
72 private XmlRpcResponse defaultXmlRpcResponse;
73
74 private string welcomeMessage;
75 private string startLocation;
76 private string allowFirstLife;
77 private string home;
78 private string seedCapability;
79 private string lookAt;
80
81 public LoginResponse()
82 {
83 this.loginFlags = new ArrayList();
84 this.globalTextures = new ArrayList();
85 this.eventCategories = new ArrayList();
86 this.uiConfig = new ArrayList();
87 this.classifiedCategories = new ArrayList();
88
89 this.loginError = new Hashtable();
90 this.eventCategoriesHash = new Hashtable();
91 this.classifiedCategoriesHash = new Hashtable();
92 this.uiConfigHash = new Hashtable();
93
94 this.defaultXmlRpcResponse = new XmlRpcResponse();
95 this.userProfile = new UserInfo();
96 this.inventoryRoot = new ArrayList();
97 this.initialOutfit = new ArrayList();
98 this.agentInventory = new ArrayList();
99
100 this.xmlRpcResponse = new XmlRpcResponse();
101 this.defaultXmlRpcResponse = new XmlRpcResponse();
102
103 this.SetDefaultValues();
104 } // LoginServer
105
106 public void SetDefaultValues()
107 {
108 this.DST = "N";
109 this.StipendSinceLogin = "N";
110 this.Gendered = "Y";
111 this.EverLoggedIn = "Y";
112 this.login = "false";
113 this.firstname = "Test";
114 this.lastname = "User";
115 this.agentAccess = "M";
116 this.startLocation = "last";
117 this.allowFirstLife = "Y";
118
119 this.SunTexture = "cce0f112-878f-4586-a2e2-a8f104bba271";
120 this.CloudTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
121 this.MoonTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
122
123 this.ErrorMessage = "You have entered an invalid name/password combination. Check Caps/lock.";
124 this.ErrorReason = "key";
125 this.welcomeMessage = "Welcome to OpenSim!";
126 this.seedCapability = "";
127 this.home = "{'region_handle':[r" + (1000 * 256).ToString() + ",r" + (1000 * 256).ToString() + "], 'position':[r" + this.userProfile.homepos.X.ToString() + ",r" + this.userProfile.homepos.Y.ToString() + ",r" + this.userProfile.homepos.Z.ToString() + "], 'look_at':[r" + this.userProfile.homelookat.X.ToString() + ",r" + this.userProfile.homelookat.Y.ToString() + ",r" + this.userProfile.homelookat.Z.ToString() + "]}";
128 this.lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]";
129 this.RegionX = (uint)255232;
130 this.RegionY = (uint)254976;
131
132 // Classifieds;
133 this.AddClassifiedCategory((Int32)1, "Shopping");
134 this.AddClassifiedCategory((Int32)2, "Land Rental");
135 this.AddClassifiedCategory((Int32)3, "Property Rental");
136 this.AddClassifiedCategory((Int32)4, "Special Attraction");
137 this.AddClassifiedCategory((Int32)5, "New Products");
138 this.AddClassifiedCategory((Int32)6, "Employment");
139 this.AddClassifiedCategory((Int32)7, "Wanted");
140 this.AddClassifiedCategory((Int32)8, "Service");
141 this.AddClassifiedCategory((Int32)9, "Personal");
142
143
144 this.SessionID = LLUUID.Random();
145 this.SecureSessionID = LLUUID.Random();
146 this.AgentID = LLUUID.Random();
147
148 Hashtable InitialOutfitHash = new Hashtable();
149 InitialOutfitHash["folder_name"] = "Nightclub Female";
150 InitialOutfitHash["gender"] = "female";
151 this.initialOutfit.Add(InitialOutfitHash);
152
153
154 } // SetDefaultValues
155
156 #region Login Failure Methods
157 public XmlRpcResponse GenerateFailureResponse(string reason, string message, string login)
158 {
159 // Overwrite any default values;
160 this.xmlRpcResponse = new XmlRpcResponse();
161
162 // Ensure Login Failed message/reason;
163 this.ErrorMessage = message;
164 this.ErrorReason = reason;
165
166 this.loginError["reason"] = this.ErrorReason;
167 this.loginError["message"] = this.ErrorMessage;
168 this.loginError["login"] = login;
169 this.xmlRpcResponse.Value = this.loginError;
170 return (this.xmlRpcResponse);
171 } // GenerateResponse
172
173 public XmlRpcResponse CreateFailedResponse()
174 {
175 return (this.CreateLoginFailedResponse());
176 } // CreateErrorConnectingToGridResponse()
177
178 public XmlRpcResponse CreateLoginFailedResponse()
179 {
180 return (this.GenerateFailureResponse("key", "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", "false"));
181 } // LoginFailedResponse
182
183 public XmlRpcResponse CreateAlreadyLoggedInResponse()
184 {
185 return (this.GenerateFailureResponse("presence", "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", "false"));
186 } // CreateAlreadyLoggedInResponse()
187
188 public XmlRpcResponse CreateDeadRegionResponse()
189 {
190 return (this.GenerateFailureResponse("key", "The region you are attempting to log into is not responding. Please select another region and try again.", "false"));
191 }
192
193 public XmlRpcResponse CreateGridErrorResponse()
194 {
195 return (this.GenerateFailureResponse("key", "Error connecting to grid. Could not percieve credentials from login XML.", "false"));
196 }
197
198 #endregion
199
200 public XmlRpcResponse ToXmlRpcResponse()
201 {
202 try
203 {
204
205 Hashtable responseData = new Hashtable();
206
207 this.loginFlagsHash = new Hashtable();
208 this.loginFlagsHash["daylight_savings"] = this.DST;
209 this.loginFlagsHash["stipend_since_login"] = this.StipendSinceLogin;
210 this.loginFlagsHash["gendered"] = this.Gendered;
211 this.loginFlagsHash["ever_logged_in"] = this.EverLoggedIn;
212 this.loginFlags.Add(this.loginFlagsHash);
213
214 responseData["first_name"] = this.Firstname;
215 responseData["last_name"] = this.Lastname;
216 responseData["agent_access"] = this.agentAccess;
217
218 this.globalTexturesHash = new Hashtable();
219 this.globalTexturesHash["sun_texture_id"] = this.SunTexture;
220 this.globalTexturesHash["cloud_texture_id"] = this.CloudTexture;
221 this.globalTexturesHash["moon_texture_id"] = this.MoonTexture;
222 this.globalTextures.Add(this.globalTexturesHash);
223 this.eventCategories.Add(this.eventCategoriesHash);
224
225 this.AddToUIConfig("allow_first_life", this.allowFirstLife);
226 this.uiConfig.Add(this.uiConfigHash);
227
228 responseData["sim_port"] =(Int32) this.SimPort;
229 responseData["sim_ip"] = this.SimAddress;
230 Console.MainLog.Instance.Warn("SIM IP: " + responseData["sim_ip"] + "; SIM PORT: " + responseData["sim_port"]);
231 responseData["agent_id"] = this.AgentID.ToStringHyphenated();
232 responseData["session_id"] = this.SessionID.ToStringHyphenated();
233 responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated();
234 responseData["circuit_code"] = this.CircuitCode;
235 responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
236 responseData["login-flags"] = this.loginFlags;
237 responseData["global-textures"] = this.globalTextures;
238 responseData["seed_capability"] = this.seedCapability;
239
240 responseData["event_categories"] = this.eventCategories;
241 responseData["event_notifications"] = new ArrayList(); // todo
242 responseData["classified_categories"] = this.classifiedCategories;
243 responseData["ui-config"] = this.uiConfig;
244
245 responseData["inventory-skeleton"] = this.agentInventory;
246 responseData["inventory-skel-lib"] = new ArrayList(); // todo
247 responseData["inventory-root"] = this.inventoryRoot;
248 responseData["gestures"] = new ArrayList(); // todo
249 responseData["inventory-lib-owner"] = new ArrayList(); // todo
250 responseData["initial-outfit"] = this.initialOutfit;
251 responseData["start_location"] = this.startLocation;
252 responseData["seed_capability"] = this.seedCapability;
253 responseData["home"] = this.home;
254 responseData["look_at"] = this.lookAt;
255 responseData["message"] = this.welcomeMessage;
256 responseData["region_x"] = (Int32)this.RegionX * 256;
257 responseData["region_y"] = (Int32)this.RegionY * 256;
258
259 //responseData["inventory-lib-root"] = new ArrayList(); // todo
260 //responseData["buddy-list"] = new ArrayList(); // todo
261
262 responseData["login"] = "true";
263 this.xmlRpcResponse.Value = responseData;
264
265 return (this.xmlRpcResponse);
266 }
267 catch (Exception e)
268 {
269 OpenSim.Framework.Console.MainLog.Instance.WriteLine(
270 OpenSim.Framework.Console.LogPriority.LOW,
271 "LoginResponse: Error creating XML-RPC Response: " + e.Message
272 );
273 return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false"));
274
275 }
276
277 } // ToXmlRpcResponse
278
279 public void SetEventCategories(string category, string value)
280 {
281 this.eventCategoriesHash[category] = value;
282 } // SetEventCategories
283
284 public void AddToUIConfig(string itemName, string item)
285 {
286 this.uiConfigHash[itemName] = item;
287 } // SetUIConfig
288
289 public void AddClassifiedCategory(Int32 ID, string categoryName)
290 {
291 this.classifiedCategoriesHash["category_name"] = categoryName;
292 this.classifiedCategoriesHash["category_id"] = ID;
293 this.classifiedCategories.Add(this.classifiedCategoriesHash);
294 // this.classifiedCategoriesHash.Clear();
295 } // SetClassifiedCategory
296
297 #region Properties
298 public string Login
299 {
300 get
301 {
302 return this.login;
303 }
304 set
305 {
306 this.login = value;
307 }
308 } // Login
309
310 public string DST
311 {
312 get
313 {
314 return this.dst;
315 }
316 set
317 {
318 this.dst = value;
319 }
320 } // DST
321
322 public string StipendSinceLogin
323 {
324 get
325 {
326 return this.stipendSinceLogin;
327 }
328 set
329 {
330 this.stipendSinceLogin = value;
331 }
332 } // StipendSinceLogin
333
334 public string Gendered
335 {
336 get
337 {
338 return this.gendered;
339 }
340 set
341 {
342 this.gendered = value;
343 }
344 } // Gendered
345
346 public string EverLoggedIn
347 {
348 get
349 {
350 return this.everLoggedIn;
351 }
352 set
353 {
354 this.everLoggedIn = value;
355 }
356 } // EverLoggedIn
357
358 public int SimPort
359 {
360 get
361 {
362 return this.simPort;
363 }
364 set
365 {
366 this.simPort = value;
367 }
368 } // SimPort
369
370 public string SimAddress
371 {
372 get
373 {
374 return this.simAddress;
375 }
376 set
377 {
378 this.simAddress = value;
379 }
380 } // SimAddress
381
382 public LLUUID AgentID
383 {
384 get
385 {
386 return this.agentID;
387 }
388 set
389 {
390 this.agentID = value;
391 }
392 } // AgentID
393
394 public LLUUID SessionID
395 {
396 get
397 {
398 return this.sessionID;
399 }
400 set
401 {
402 this.sessionID = value;
403 }
404 } // SessionID
405
406 public LLUUID SecureSessionID
407 {
408 get
409 {
410 return this.secureSessionID;
411 }
412 set
413 {
414 this.secureSessionID = value;
415 }
416 } // SecureSessionID
417
418 public Int32 CircuitCode
419 {
420 get
421 {
422 return this.circuitCode;
423 }
424 set
425 {
426 this.circuitCode = value;
427 }
428 } // CircuitCode
429
430 public uint RegionX
431 {
432 get
433 {
434 return this.regionX;
435 }
436 set
437 {
438 this.regionX = value;
439 }
440 } // RegionX
441
442 public uint RegionY
443 {
444 get
445 {
446 return this.regionY;
447 }
448 set
449 {
450 this.regionY = value;
451 }
452 } // RegionY
453
454 public string SunTexture
455 {
456 get
457 {
458 return this.sunTexture;
459 }
460 set
461 {
462 this.sunTexture = value;
463 }
464 } // SunTexture
465
466 public string CloudTexture
467 {
468 get
469 {
470 return this.cloudTexture;
471 }
472 set
473 {
474 this.cloudTexture = value;
475 }
476 } // CloudTexture
477
478 public string MoonTexture
479 {
480 get
481 {
482 return this.moonTexture;
483 }
484 set
485 {
486 this.moonTexture = value;
487 }
488 } // MoonTexture
489
490 public string Firstname
491 {
492 get
493 {
494 return this.firstname;
495 }
496 set
497 {
498 this.firstname = value;
499 }
500 } // Firstname
501
502 public string Lastname
503 {
504 get
505 {
506 return this.lastname;
507 }
508 set
509 {
510 this.lastname = value;
511 }
512 } // Lastname
513
514 public string AgentAccess
515 {
516 get
517 {
518 return this.agentAccess;
519 }
520 set
521 {
522 this.agentAccess = value;
523 }
524 }
525
526 public string StartLocation
527 {
528 get
529 {
530 return this.startLocation;
531 }
532 set
533 {
534 this.startLocation = value;
535 }
536 } // StartLocation
537
538 public string LookAt
539 {
540 get
541 {
542 return this.lookAt;
543 }
544 set
545 {
546 this.lookAt = value;
547 }
548 }
549
550 public string SeedCapability
551 {
552 get
553 {
554 return this.seedCapability;
555 }
556 set
557 {
558 this.seedCapability = value;
559 }
560 } // SeedCapability
561
562 public string ErrorReason
563 {
564 get
565 {
566 return this.errorReason;
567 }
568 set
569 {
570 this.errorReason = value;
571 }
572 } // ErrorReason
573
574 public string ErrorMessage
575 {
576 get
577 {
578 return this.errorMessage;
579 }
580 set
581 {
582 this.errorMessage = value;
583 }
584 } // ErrorMessage
585
586 public ArrayList InventoryRoot
587 {
588 get
589 {
590 return this.inventoryRoot;
591 }
592 set
593 {
594 this.inventoryRoot = value;
595 }
596 }
597
598 public ArrayList InventorySkeleton
599 {
600 get
601 {
602 return this.agentInventory;
603 }
604 set
605 {
606 this.agentInventory = value;
607 }
608 }
609
610 public string Home
611 {
612 get
613 {
614 return this.home;
615 }
616 set
617 {
618 this.home = value;
619 }
620 }
621
622 public string Message
623 {
624 get
625 {
626 return this.welcomeMessage;
627 }
628 set
629 {
630 this.welcomeMessage = value;
631 }
632 }
633 #endregion
634
635
636 public class UserInfo
637 {
638 public string firstname;
639 public string lastname;
640 public ulong homeregionhandle;
641 public LLVector3 homepos;
642 public LLVector3 homelookat;
643 }
644 }
645}
646
diff --git a/OpenSim/Framework/UserManager/OpenSim.Framework.UserManagement.csproj b/OpenSim/Framework/UserManager/OpenSim.Framework.UserManagement.csproj
new file mode 100644
index 0000000..02aa3f3
--- /dev/null
+++ b/OpenSim/Framework/UserManager/OpenSim.Framework.UserManagement.csproj
@@ -0,0 +1,125 @@
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>{586E2916-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.UserManagement</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.UserManagement</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="OpenSim.Framework" >
70 <HintPath>OpenSim.Framework.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="OpenSim.Framework.Console" >
74 <HintPath>OpenSim.Framework.Console.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="OpenSim.Framework.GenericConfig.Xml" >
78 <HintPath>OpenSim.Framework.GenericConfig.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="OpenSim.Framework.Servers" >
82 <HintPath>OpenSim.Framework.Servers.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="System" >
86 <HintPath>System.dll</HintPath>
87 <Private>False</Private>
88 </Reference>
89 <Reference Include="System.Data" >
90 <HintPath>System.Data.dll</HintPath>
91 <Private>False</Private>
92 </Reference>
93 <Reference Include="System.Xml" >
94 <HintPath>System.Xml.dll</HintPath>
95 <Private>False</Private>
96 </Reference>
97 <Reference Include="XMLRPC.dll" >
98 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
99 <Private>False</Private>
100 </Reference>
101 </ItemGroup>
102 <ItemGroup>
103 <ProjectReference Include="..\Data\OpenSim.Framework.Data.csproj">
104 <Name>OpenSim.Framework.Data</Name>
105 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
106 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
107 <Private>False</Private>
108 </ProjectReference>
109 </ItemGroup>
110 <ItemGroup>
111 <Compile Include="LoginResponse.cs">
112 <SubType>Code</SubType>
113 </Compile>
114 <Compile Include="UserManagerBase.cs">
115 <SubType>Code</SubType>
116 </Compile>
117 </ItemGroup>
118 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
119 <PropertyGroup>
120 <PreBuildEvent>
121 </PreBuildEvent>
122 <PostBuildEvent>
123 </PostBuildEvent>
124 </PropertyGroup>
125</Project>
diff --git a/OpenSim/Framework/UserManager/OpenSim.Framework.UserManagement.dll.build b/OpenSim/Framework/UserManager/OpenSim.Framework.UserManagement.dll.build
new file mode 100644
index 0000000..d2f4345
--- /dev/null
+++ b/OpenSim/Framework/UserManager/OpenSim.Framework.UserManagement.dll.build
@@ -0,0 +1,50 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.UserManagement" 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.UserManagement" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="LoginResponse.cs" />
15 <include name="UserManagerBase.cs" />
16 </sources>
17 <references basedir="${project::get-base-directory()}">
18 <lib>
19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib>
22 <include name="../../../bin/Db4objects.Db4o.dll" />
23 <include name="../../../bin/libsecondlife.dll" />
24 <include name="OpenSim.Framework.dll" />
25 <include name="OpenSim.Framework.Console.dll" />
26 <include name="../../../bin/OpenSim.Framework.Data.dll" />
27 <include name="OpenSim.Framework.GenericConfig.Xml.dll" />
28 <include name="OpenSim.Framework.Servers.dll" />
29 <include name="System.dll" />
30 <include name="System.Data.dll" />
31 <include name="System.Xml.dll" />
32 <include name="../../../bin/XMLRPC.dll" />
33 </references>
34 </csc>
35 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
36 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
37 <copy todir="${project::get-base-directory()}/../../../bin/">
38 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
39 <include name="*.dll"/>
40 <include name="*.exe"/>
41 </fileset>
42 </copy>
43 </target>
44 <target name="clean">
45 <delete dir="${bin.dir}" failonerror="false" />
46 <delete dir="${obj.dir}" failonerror="false" />
47 </target>
48 <target name="doc" description="Creates documentation.">
49 </target>
50</project>
diff --git a/OpenSim/Framework/UserManager/UserManagerBase.cs b/OpenSim/Framework/UserManager/UserManagerBase.cs
new file mode 100644
index 0000000..d06059e
--- /dev/null
+++ b/OpenSim/Framework/UserManager/UserManagerBase.cs
@@ -0,0 +1,634 @@
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;
30using System.Collections.Generic;
31using System.Text;
32using OpenSim.Framework.Data;
33using libsecondlife;
34using System.Reflection;
35
36using System.Xml;
37using Nwc.XmlRpc;
38using OpenSim.Framework.Sims;
39using OpenSim.Framework.Inventory;
40using OpenSim.Framework.Utilities;
41
42using System.Security.Cryptography;
43
44namespace OpenSim.Framework.UserManagement
45{
46 public class UserManagerBase
47 {
48 public OpenSim.Framework.Interfaces.UserConfig _config;
49 Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
50
51 /// <summary>
52 /// Adds a new user server plugin - user servers will be requested in the order they were loaded.
53 /// </summary>
54 /// <param name="FileName">The filename to the user server plugin DLL</param>
55 public void AddPlugin(string FileName)
56 {
57 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Attempting to load " + FileName);
58 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
59
60 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
61 foreach (Type pluginType in pluginAssembly.GetTypes())
62 {
63 if (!pluginType.IsAbstract)
64 {
65 Type typeInterface = pluginType.GetInterface("IUserData", true);
66
67 if (typeInterface != null)
68 {
69 IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
70 plug.Initialise();
71 this._plugins.Add(plug.getName(), plug);
72 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface");
73 }
74
75 typeInterface = null;
76 }
77 }
78
79 pluginAssembly = null;
80 }
81
82 #region Get UserProfile
83 /// <summary>
84 /// Loads a user profile from a database by UUID
85 /// </summary>
86 /// <param name="uuid">The target UUID</param>
87 /// <returns>A user profile</returns>
88 public UserProfileData getUserProfile(LLUUID uuid)
89 {
90 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
91 {
92 try
93 {
94 UserProfileData profile = plugin.Value.getUserByUUID(uuid);
95 profile.currentAgent = getUserAgent(profile.UUID);
96 return profile;
97 }
98 catch (Exception e)
99 {
100 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
101 }
102 }
103
104 return null;
105 }
106
107
108 /// <summary>
109 /// Loads a user profile by name
110 /// </summary>
111 /// <param name="name">The target name</param>
112 /// <returns>A user profile</returns>
113 public UserProfileData getUserProfile(string name)
114 {
115 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
116 {
117 try
118 {
119 UserProfileData profile = plugin.Value.getUserByName(name);
120 profile.currentAgent = getUserAgent(profile.UUID);
121 return profile;
122 }
123 catch (Exception e)
124 {
125 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
126 }
127 }
128
129 return null;
130 }
131
132 /// <summary>
133 /// Loads a user profile by name
134 /// </summary>
135 /// <param name="fname">First name</param>
136 /// <param name="lname">Last name</param>
137 /// <returns>A user profile</returns>
138 public UserProfileData getUserProfile(string fname, string lname)
139 {
140 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
141 {
142 try
143 {
144 UserProfileData profile = plugin.Value.getUserByName(fname,lname);
145 try
146 {
147 profile.currentAgent = getUserAgent(profile.UUID);
148 }
149 catch (Exception e)
150 {
151 // Ignore
152 }
153 return profile;
154 }
155 catch (Exception e)
156 {
157 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
158 }
159 }
160
161 return null;
162 }
163 #endregion
164
165 #region Get UserAgent
166 /// <summary>
167 /// Loads a user agent by uuid (not called directly)
168 /// </summary>
169 /// <param name="uuid">The agents UUID</param>
170 /// <returns>Agent profiles</returns>
171 public UserAgentData getUserAgent(LLUUID uuid)
172 {
173 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
174 {
175 try
176 {
177 return plugin.Value.getAgentByUUID(uuid);
178 }
179 catch (Exception e)
180 {
181 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
182 }
183 }
184
185 return null;
186 }
187
188 /// <summary>
189 /// Loads a user agent by name (not called directly)
190 /// </summary>
191 /// <param name="name">The agents name</param>
192 /// <returns>A user agent</returns>
193 public UserAgentData getUserAgent(string name)
194 {
195 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
196 {
197 try
198 {
199 return plugin.Value.getAgentByName(name);
200 }
201 catch (Exception e)
202 {
203 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
204 }
205 }
206
207 return null;
208 }
209
210 /// <summary>
211 /// Loads a user agent by name (not called directly)
212 /// </summary>
213 /// <param name="fname">The agents firstname</param>
214 /// <param name="lname">The agents lastname</param>
215 /// <returns>A user agent</returns>
216 public UserAgentData getUserAgent(string fname, string lname)
217 {
218 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
219 {
220 try
221 {
222 return plugin.Value.getAgentByName(fname,lname);
223 }
224 catch (Exception e)
225 {
226 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
227 }
228 }
229
230 return null;
231 }
232
233 #endregion
234
235 #region CreateAgent
236 /// <summary>
237 /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB
238 /// </summary>
239 /// <param name="profile">The users profile</param>
240 /// <param name="request">The users loginrequest</param>
241 public void CreateAgent(ref UserProfileData profile, XmlRpcRequest request)
242 {
243 Hashtable requestData = (Hashtable)request.Params[0];
244
245 UserAgentData agent = new UserAgentData();
246
247 // User connection
248 agent.agentIP = "";
249 agent.agentOnline = true;
250 agent.agentPort = 0;
251
252 // Generate sessions
253 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
254 byte[] randDataS = new byte[16];
255 byte[] randDataSS = new byte[16];
256 rand.GetBytes(randDataS);
257 rand.GetBytes(randDataSS);
258
259 agent.secureSessionID = new LLUUID(randDataSS, 0);
260 agent.sessionID = new LLUUID(randDataS, 0);
261
262 // Profile UUID
263 agent.UUID = profile.UUID;
264
265 // Current position (from Home)
266 agent.currentHandle = profile.homeRegion;
267 agent.currentPos = profile.homeLocation;
268
269 // If user specified additional start, use that
270 if (requestData.ContainsKey("start"))
271 {
272 string startLoc = ((string)requestData["start"]).Trim();
273 if (!(startLoc == "last" || startLoc == "home"))
274 {
275 // Format: uri:Ahern&162&213&34
276 try
277 {
278 string[] parts = startLoc.Remove(0, 4).Split('&');
279 string region = parts[0];
280
281 ////////////////////////////////////////////////////
282 //SimProfile SimInfo = new SimProfile();
283 //SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
284 }
285 catch (Exception e)
286 {
287
288 }
289 }
290 }
291
292 // What time did the user login?
293 agent.loginTime = Util.UnixTimeSinceEpoch();
294 agent.logoutTime = 0;
295
296 // Current location
297 agent.regionID = new LLUUID(); // Fill in later
298 agent.currentRegion = new LLUUID(); // Fill in later
299
300 profile.currentAgent = agent;
301 }
302
303 /// <summary>
304 /// Saves a target agent to the database
305 /// </summary>
306 /// <param name="profile">The users profile</param>
307 /// <returns>Successful?</returns>
308 public bool CommitAgent(ref UserProfileData profile)
309 {
310 // Saves the agent to database
311 return true;
312 }
313
314 #endregion
315
316 /// <summary>
317 /// Checks a user against it's password hash
318 /// </summary>
319 /// <param name="profile">The users profile</param>
320 /// <param name="password">The supplied password</param>
321 /// <returns>Authenticated?</returns>
322 public virtual bool AuthenticateUser(ref UserProfileData profile, string password)
323 {
324 OpenSim.Framework.Console.MainLog.Instance.Verbose(
325 "Authenticating " + profile.username + " " + profile.surname);
326
327 password = password.Remove(0, 3); //remove $1$
328
329 string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
330
331 return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
332 }
333
334 #region Xml Response
335
336 /// <summary>
337 ///
338 /// </summary>
339 /// <param name="firstname"></param>
340 /// <param name="lastname"></param>
341 /// <returns></returns>
342 public virtual UserProfileData GetTheUser(string firstname, string lastname)
343 {
344 return getUserProfile(firstname, lastname);
345 }
346
347 /// <summary>
348 ///
349 /// </summary>
350 /// <returns></returns>
351 public virtual string GetMessage()
352 {
353 return _config.DefaultStartupMsg;
354 }
355
356 /// <summary>
357 /// Customises the login response and fills in missing values.
358 /// </summary>
359 /// <param name="response">The existing response</param>
360 /// <param name="theUser">The user profile</param>
361 public virtual void CustomiseResponse(ref LoginResponse response, ref UserProfileData theUser)
362 {
363
364 }
365
366 /// <summary>
367 /// Main user login function
368 /// </summary>
369 /// <param name="request">The XMLRPC request</param>
370 /// <returns>The response to send</returns>
371 public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
372 {
373 XmlRpcResponse response = new XmlRpcResponse();
374 Hashtable requestData = (Hashtable)request.Params[0];
375
376 bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd"));
377 bool GoodLogin = false;
378 string firstname = "";
379 string lastname = "";
380 string passwd = "";
381
382 UserProfileData TheUser;
383 LoginResponse logResponse = new LoginResponse();
384
385 if (GoodXML)
386 {
387 firstname = (string)requestData["first"];
388 lastname = (string)requestData["last"];
389 passwd = (string)requestData["passwd"];
390
391 TheUser = GetTheUser(firstname, lastname);
392 if (TheUser == null)
393 return logResponse.CreateLoginFailedResponse();
394
395 GoodLogin = AuthenticateUser(ref TheUser, passwd);
396 }
397 else
398 {
399 return logResponse.CreateGridErrorResponse();
400 }
401
402 if (!GoodLogin)
403 {
404 return logResponse.CreateLoginFailedResponse();
405 }
406 else
407 {
408 // If we already have a session...
409 if (TheUser.currentAgent != null && TheUser.currentAgent.agentOnline)
410 {
411 // Reject the login
412 return logResponse.CreateAlreadyLoggedInResponse();
413 }
414 // Otherwise...
415 // Create a new agent session
416 CreateAgent(ref TheUser, request);
417
418 try
419 {
420
421 LLUUID AgentID = TheUser.UUID;
422
423 // Inventory Library Section
424 ArrayList AgentInventoryArray = new ArrayList();
425 Hashtable TempHash;
426
427 AgentInventory Library = new AgentInventory();
428 Library.CreateRootFolder(AgentID, true);
429
430 foreach (InventoryFolder InvFolder in Library.InventoryFolders.Values)
431 {
432 TempHash = new Hashtable();
433 TempHash["name"] = InvFolder.FolderName;
434 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
435 TempHash["version"] = (Int32)InvFolder.Version;
436 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
437 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
438 AgentInventoryArray.Add(TempHash);
439 }
440
441 Hashtable InventoryRootHash = new Hashtable();
442 InventoryRootHash["folder_id"] = Library.InventoryRoot.FolderID.ToStringHyphenated();
443 ArrayList InventoryRoot = new ArrayList();
444 InventoryRoot.Add(InventoryRootHash);
445
446 // Circuit Code
447 uint circode = (uint)(Util.RandomClass.Next());
448
449 logResponse.Lastname = TheUser.surname;
450 logResponse.Firstname = TheUser.username;
451 logResponse.AgentID = AgentID.ToStringHyphenated();
452 logResponse.SessionID = TheUser.currentAgent.sessionID.ToStringHyphenated();
453 logResponse.SecureSessionID = TheUser.currentAgent.secureSessionID.ToStringHyphenated();
454 logResponse.InventoryRoot = InventoryRoot;
455 logResponse.InventorySkeleton = AgentInventoryArray;
456 logResponse.CircuitCode = (Int32)circode;
457 logResponse.RegionX = 0; //overwritten
458 logResponse.RegionY = 0; //overwritten
459 logResponse.Home = "!!null temporary value {home}!!"; // Overwritten
460 //logResponse.LookAt = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n";
461 logResponse.SimAddress = "127.0.0.1"; //overwritten
462 logResponse.SimPort = 0; //overwritten
463 logResponse.Message = this.GetMessage();
464
465 try
466 {
467 this.CustomiseResponse(ref logResponse, ref TheUser);
468 }
469 catch (Exception e)
470 {
471 System.Console.WriteLine(e.ToString());
472 return logResponse.CreateDeadRegionResponse();
473 }
474 CommitAgent(ref TheUser);
475 return logResponse.ToXmlRpcResponse();
476
477 }
478 catch (Exception E)
479 {
480 System.Console.WriteLine(E.ToString());
481 }
482 //}
483 }
484 return response;
485
486 }
487
488 #endregion
489
490 /// <summary>
491 /// Deletes an active agent session
492 /// </summary>
493 /// <param name="request">The request</param>
494 /// <param name="path">The path (eg /bork/narf/test)</param>
495 /// <param name="param">Parameters sent</param>
496 /// <returns>Success "OK" else error</returns>
497 public string RestDeleteUserSessionMethod(string request, string path, string param)
498 {
499 // TODO! Important!
500
501 return "OK";
502 }
503
504 /// <summary>
505 ///
506 /// </summary>
507 /// <param name="user"></param>
508 public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
509 {
510 UserProfileData user = new UserProfileData();
511 user.homeLocation = new LLVector3(128, 128, 100);
512 user.UUID = LLUUID.Random();
513 user.username = firstName;
514 user.surname = lastName;
515 user.passwordHash = pass;
516 user.passwordSalt = "";
517 user.created = Util.UnixTimeSinceEpoch();
518 user.homeLookAt = new LLVector3(100, 100, 100);
519 user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256));
520
521 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
522 {
523 try
524 {
525 plugin.Value.addNewUserProfile(user);
526
527 }
528 catch (Exception e)
529 {
530 OpenSim.Framework.Console.MainLog.Instance.Verbose("Unable to add user via " + plugin.Key + "(" + e.ToString() + ")");
531 }
532 }
533 }
534
535 /// <summary>
536 /// Returns an error message that the user could not be found in the database
537 /// </summary>
538 /// <returns>XML string consisting of a error element containing individual error(s)</returns>
539 public XmlRpcResponse CreateUnknownUserErrorResponse()
540 {
541 XmlRpcResponse response = new XmlRpcResponse();
542 Hashtable responseData = new Hashtable();
543 responseData["error_type"] = "unknown_user";
544 responseData["error_desc"] = "The user requested is not in the database";
545
546 response.Value = responseData;
547 return response;
548 }
549
550 /// <summary>
551 /// Converts a user profile to an XML element which can be returned
552 /// </summary>
553 /// <param name="profile">The user profile</param>
554 /// <returns>A string containing an XML Document of the user profile</returns>
555 public XmlRpcResponse ProfileToXmlRPCResponse(UserProfileData profile)
556 {
557 XmlRpcResponse response = new XmlRpcResponse();
558 Hashtable responseData = new Hashtable();
559
560 // Account information
561 responseData["firstname"] = profile.username;
562 responseData["lastname"] = profile.surname;
563 responseData["uuid"] = profile.UUID.ToStringHyphenated();
564 // Server Information
565 responseData["server_inventory"] = profile.userInventoryURI;
566 responseData["server_asset"] = profile.userAssetURI;
567 // Profile Information
568 responseData["profile_about"] = profile.profileAboutText;
569 responseData["profile_firstlife_about"] = profile.profileFirstText;
570 responseData["profile_firstlife_image"] = profile.profileFirstImage.ToStringHyphenated();
571 responseData["profile_can_do"] = profile.profileCanDoMask.ToString();
572 responseData["profile_want_do"] = profile.profileWantDoMask.ToString();
573 responseData["profile_image"] = profile.profileImage.ToStringHyphenated();
574 responseData["profile_created"] = profile.created.ToString();
575 responseData["profile_lastlogin"] = profile.lastLogin.ToString();
576 // Home region information
577 responseData["home_coordinates"] = profile.homeLocation.ToString();
578 responseData["home_region"] = profile.homeRegion.ToString();
579 responseData["home_look"] = profile.homeLookAt.ToString();
580
581 response.Value = responseData;
582 return response;
583 }
584
585 #region XMLRPC User Methods
586 //should most likely move out of here and into the grid's userserver sub class
587 public XmlRpcResponse XmlRPCGetUserMethodName(XmlRpcRequest request)
588 {
589 XmlRpcResponse response = new XmlRpcResponse();
590 Hashtable requestData = (Hashtable)request.Params[0];
591 UserProfileData userProfile;
592
593 if (requestData.Contains("avatar_name"))
594 {
595 userProfile = getUserProfile((string)requestData["avatar_name"]);
596 if (userProfile == null)
597 {
598 return CreateUnknownUserErrorResponse();
599 }
600 }
601 else
602 {
603 return CreateUnknownUserErrorResponse();
604 }
605
606
607 return ProfileToXmlRPCResponse(userProfile);
608 }
609
610 public XmlRpcResponse XmlRPCGetUserMethodUUID(XmlRpcRequest request)
611 {
612 XmlRpcResponse response = new XmlRpcResponse();
613 Hashtable requestData = (Hashtable)request.Params[0];
614 UserProfileData userProfile;
615 if (requestData.Contains("avatar_uuid"))
616 {
617 userProfile = getUserProfile((LLUUID)requestData["avatar_uuid"]);
618 if (userProfile == null)
619 {
620 return CreateUnknownUserErrorResponse();
621 }
622 }
623 else
624 {
625 return CreateUnknownUserErrorResponse();
626 }
627
628
629 return ProfileToXmlRPCResponse(userProfile);
630 }
631 #endregion
632
633 }
634}
diff --git a/OpenSim/Grid/AssetServer/AssetHttpServer.cs b/OpenSim/Grid/AssetServer/AssetHttpServer.cs
new file mode 100644
index 0000000..ad8733f
--- /dev/null
+++ b/OpenSim/Grid/AssetServer/AssetHttpServer.cs
@@ -0,0 +1,130 @@
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.Net;
31using System.Text;
32using System.Text.RegularExpressions;
33using System.Threading;
34//using OpenSim.CAPS;
35using Nwc.XmlRpc;
36using System.Collections;
37using OpenSim.Framework.Console;
38using OpenSim.Framework.Servers;
39
40namespace OpenSim.Grid.AssetServer
41{
42 /// <summary>
43 /// An HTTP server for sending assets
44 /// </summary>
45 public class AssetHttpServer :BaseHttpServer
46 {
47 /// <summary>
48 /// Creates the new asset server
49 /// </summary>
50 /// <param name="port">Port to initalise on</param>
51 public AssetHttpServer(int port)
52 : base(port)
53 {
54 }
55
56 /// <summary>
57 /// Handles an HTTP request
58 /// </summary>
59 /// <param name="stateinfo">HTTP State Info</param>
60 public override void HandleRequest(Object stateinfo)
61 {
62 try
63 {
64 HttpListenerContext context = (HttpListenerContext)stateinfo;
65
66 HttpListenerRequest request = context.Request;
67 HttpListenerResponse response = context.Response;
68
69 response.KeepAlive = false;
70 response.SendChunked = false;
71
72 System.IO.Stream body = request.InputStream;
73 System.Text.Encoding encoding = System.Text.Encoding.UTF8;
74 System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding);
75
76 string requestBody = reader.ReadToEnd();
77 body.Close();
78 reader.Close();
79
80 //Console.WriteLine(request.HttpMethod + " " + request.RawUrl + " Http/" + request.ProtocolVersion.ToString() + " content type: " + request.ContentType);
81 //Console.WriteLine(requestBody);
82
83 string responseString = "";
84 switch (request.ContentType)
85 {
86 case "text/xml":
87 // must be XML-RPC, so pass to the XML-RPC parser
88
89 responseString = ParseXMLRPC(requestBody);
90 responseString = Regex.Replace(responseString, "utf-16", "utf-8");
91
92 response.AddHeader("Content-type", "text/xml");
93 break;
94
95 case "application/xml":
96 // probably LLSD we hope, otherwise it should be ignored by the parser
97 responseString = ParseLLSDXML(requestBody);
98 response.AddHeader("Content-type", "application/xml");
99 break;
100
101 case "application/x-www-form-urlencoded":
102 // a form data POST so send to the REST parser
103 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
104 response.AddHeader("Content-type", "text/plain");
105 break;
106
107 case null:
108 // must be REST or invalid crap, so pass to the REST parser
109 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
110 response.AddHeader("Content-type", "text/plain");
111 break;
112
113 }
114
115 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
116 byte[] buffer = Windows1252Encoding.GetBytes(responseString);
117 System.IO.Stream output = response.OutputStream;
118 response.SendChunked = false;
119 response.ContentLength64 = buffer.Length;
120 output.Write(buffer, 0, buffer.Length);
121 output.Close();
122 }
123 catch (Exception e)
124 {
125 Console.WriteLine(e.ToString());
126 }
127 }
128
129 }
130}
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs
new file mode 100644
index 0000000..d06998d
--- /dev/null
+++ b/OpenSim/Grid/AssetServer/Main.cs
@@ -0,0 +1,337 @@
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.IO;
31using System.Text;
32using System.Timers;
33using System.Net;
34using System.Reflection;
35using System.Threading;
36using libsecondlife;
37using OpenSim.Framework;
38using OpenSim.Framework.Sims;
39using OpenSim.Framework.Console;
40using OpenSim.Framework.Types;
41using OpenSim.Framework.Interfaces;
42using OpenSim.Framework.Utilities;
43using OpenSim.Framework.Servers;
44using Db4objects.Db4o;
45using Db4objects.Db4o.Query;
46
47namespace OpenSim.Grid.AssetServer
48{
49 /// <summary>
50 /// An asset server
51 /// </summary>
52 public class OpenAsset_Main : conscmd_callback
53 {
54 private IObjectContainer db;
55
56 public static OpenAsset_Main assetserver;
57
58 private LogBase m_console;
59
60 [STAThread]
61 public static void Main(string[] args)
62 {
63 Console.WriteLine("Starting...\n");
64
65 assetserver = new OpenAsset_Main();
66 assetserver.Startup();
67
68 assetserver.Work();
69 }
70
71 private void Work()
72 {
73 m_console.Notice("Enter help for a list of commands");
74
75 while (true)
76 {
77 m_console.MainLogPrompt();
78 }
79 }
80
81 private OpenAsset_Main()
82 {
83 m_console = new LogBase("opengrid-AssetServer-console.log", "OpenAsset", this, false);
84 OpenSim.Framework.Console.MainLog.Instance = m_console;
85 }
86
87 public void Startup()
88 {
89 m_console.Verbose( "Main.cs:Startup() - Setting up asset DB");
90 setupDB();
91
92 m_console.Verbose( "Main.cs:Startup() - Starting HTTP process");
93 AssetHttpServer httpServer = new AssetHttpServer(8003);
94
95
96 httpServer.AddRestHandler("GET", "/assets/", this.assetGetMethod);
97 httpServer.AddRestHandler("POST", "/assets/", this.assetPostMethod);
98
99 httpServer.Start();
100
101 }
102
103 public string assetPostMethod(string requestBody, string path, string param)
104 {
105 AssetBase asset = new AssetBase();
106 asset.Name = "";
107 asset.FullID = new LLUUID(param);
108 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
109 byte[] buffer = Windows1252Encoding.GetBytes(requestBody);
110 asset.Data = buffer;
111 AssetStorage store = new AssetStorage();
112 store.Data = asset.Data;
113 store.Name = asset.Name;
114 store.UUID = asset.FullID;
115 db.Set(store);
116 db.Commit();
117 return "";
118 }
119
120 public string assetGetMethod(string request, string path, string param)
121 {
122 Console.WriteLine("got a request " + param);
123 byte[] assetdata = getAssetData(new LLUUID(param), false);
124 if (assetdata != null)
125 {
126 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
127 string ret = Windows1252Encoding.GetString(assetdata);
128 //string ret = System.Text.Encoding.Unicode.GetString(assetdata);
129
130 return ret;
131
132 }
133 else
134 {
135 return "";
136 }
137
138 }
139
140 public byte[] getAssetData(LLUUID assetID, bool isTexture)
141 {
142 bool found = false;
143 AssetStorage foundAsset = null;
144
145 IObjectSet result = db.Get(new AssetStorage(assetID));
146 if (result.Count > 0)
147 {
148 foundAsset = (AssetStorage)result.Next();
149 found = true;
150 }
151
152 if (found)
153 {
154 return foundAsset.Data;
155 }
156 else
157 {
158 return null;
159 }
160 }
161
162 public void setupDB()
163 {
164 bool yapfile = System.IO.File.Exists("assets.yap");
165 try
166 {
167 db = Db4oFactory.OpenFile("assets.yap");
168 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Main.cs:setupDB() - creation");
169 }
170 catch (Exception e)
171 {
172 db.Close();
173 OpenSim.Framework.Console.MainLog.Instance.Warn("Main.cs:setupDB() - Exception occured");
174 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
175 }
176 if (!yapfile)
177 {
178 this.LoadDB();
179 }
180 }
181
182 public void LoadDB()
183 {
184 try
185 {
186
187 Console.WriteLine("setting up Asset database");
188
189 AssetBase Image = new AssetBase();
190 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
191 Image.Name = "Bricks";
192 this.LoadAsset(Image, true, "bricks.jp2");
193 AssetStorage store = new AssetStorage();
194 store.Data = Image.Data;
195 store.Name = Image.Name;
196 store.UUID = Image.FullID;
197 db.Set(store);
198 db.Commit();
199
200 Image = new AssetBase();
201 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002");
202 Image.Name = "Plywood";
203 this.LoadAsset(Image, true, "plywood.jp2");
204 store = new AssetStorage();
205 store.Data = Image.Data;
206 store.Name = Image.Name;
207 store.UUID = Image.FullID;
208 db.Set(store);
209 db.Commit();
210
211 Image = new AssetBase();
212 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003");
213 Image.Name = "Rocks";
214 this.LoadAsset(Image, true, "rocks.jp2");
215 store = new AssetStorage();
216 store.Data = Image.Data;
217 store.Name = Image.Name;
218 store.UUID = Image.FullID;
219 db.Set(store);
220 db.Commit();
221
222 Image = new AssetBase();
223 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004");
224 Image.Name = "Granite";
225 this.LoadAsset(Image, true, "granite.jp2");
226 store = new AssetStorage();
227 store.Data = Image.Data;
228 store.Name = Image.Name;
229 store.UUID = Image.FullID;
230 db.Set(store);
231 db.Commit();
232
233 Image = new AssetBase();
234 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005");
235 Image.Name = "Hardwood";
236 this.LoadAsset(Image, true, "hardwood.jp2");
237 store = new AssetStorage();
238 store.Data = Image.Data;
239 store.Name = Image.Name;
240 store.UUID = Image.FullID;
241 db.Set(store);
242 db.Commit();
243
244 Image = new AssetBase();
245 Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005");
246 Image.Name = "Prim Base Texture";
247 this.LoadAsset(Image, true, "plywood.jp2");
248 store = new AssetStorage();
249 store.Data = Image.Data;
250 store.Name = Image.Name;
251 store.UUID = Image.FullID;
252 db.Set(store);
253 db.Commit();
254
255 Image = new AssetBase();
256 Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
257 Image.Name = "Shape";
258 this.LoadAsset(Image, false, "base_shape.dat");
259 store = new AssetStorage();
260 store.Data = Image.Data;
261 store.Name = Image.Name;
262 store.UUID = Image.FullID;
263 db.Set(store);
264 db.Commit();
265 }
266 catch (Exception e)
267 {
268 Console.WriteLine(e.Message);
269 }
270 }
271
272 private void LoadAsset(AssetBase info, bool image, string filename)
273 {
274
275
276 string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
277 string fileName = Path.Combine(dataPath, filename);
278 FileInfo fInfo = new FileInfo(fileName);
279 long numBytes = fInfo.Length;
280 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
281 byte[] idata = new byte[numBytes];
282 BinaryReader br = new BinaryReader(fStream);
283 idata = br.ReadBytes((int)numBytes);
284 br.Close();
285 fStream.Close();
286 info.Data = idata;
287 //info.loaded=true;
288 }
289
290 /*private GridConfig LoadConfigDll(string dllName)
291 {
292 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
293 GridConfig config = null;
294
295 foreach (Type pluginType in pluginAssembly.GetTypes())
296 {
297 if (pluginType.IsPublic)
298 {
299 if (!pluginType.IsAbstract)
300 {
301 Type typeInterface = pluginType.GetInterface("IGridConfig", true);
302
303 if (typeInterface != null)
304 {
305 IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
306 config = plug.GetConfigObject();
307 break;
308 }
309
310 typeInterface = null;
311 }
312 }
313 }
314 pluginAssembly = null;
315 return config;
316 }*/
317
318 public void RunCmd(string cmd, string[] cmdparams)
319 {
320 switch (cmd)
321 {
322 case "help":
323 m_console.Notice("shutdown - shutdown this asset server (USE CAUTION!)");
324 break;
325
326 case "shutdown":
327 m_console.Close();
328 Environment.Exit(0);
329 break;
330 }
331 }
332
333 public void Show(string ShowWhat)
334 {
335 }
336 }
337}
diff --git a/OpenSim/Grid/AssetServer/OpenSim.Grid.AssetServer.csproj b/OpenSim/Grid/AssetServer/OpenSim.Grid.AssetServer.csproj
new file mode 100644
index 0000000..caebca3
--- /dev/null
+++ b/OpenSim/Grid/AssetServer/OpenSim.Grid.AssetServer.csproj
@@ -0,0 +1,118 @@
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>{E5F1A03B-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.Grid.AssetServer</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Exe</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Grid.AssetServer</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="OpenSim.Framework" >
70 <HintPath>OpenSim.Framework.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="OpenSim.Framework.Console" >
74 <HintPath>OpenSim.Framework.Console.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="OpenSim.Framework.Servers" >
78 <HintPath>OpenSim.Framework.Servers.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="System" >
82 <HintPath>System.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="System.Data" >
86 <HintPath>System.Data.dll</HintPath>
87 <Private>False</Private>
88 </Reference>
89 <Reference Include="System.Xml" >
90 <HintPath>System.Xml.dll</HintPath>
91 <Private>False</Private>
92 </Reference>
93 <Reference Include="XMLRPC.dll" >
94 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
95 <Private>False</Private>
96 </Reference>
97 </ItemGroup>
98 <ItemGroup>
99 </ItemGroup>
100 <ItemGroup>
101 <Compile Include="AssetHttpServer.cs">
102 <SubType>Code</SubType>
103 </Compile>
104 <Compile Include="Main.cs">
105 <SubType>Code</SubType>
106 </Compile>
107 <Compile Include="Properties\AssemblyInfo.cs">
108 <SubType>Code</SubType>
109 </Compile>
110 </ItemGroup>
111 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
112 <PropertyGroup>
113 <PreBuildEvent>
114 </PreBuildEvent>
115 <PostBuildEvent>
116 </PostBuildEvent>
117 </PropertyGroup>
118</Project>
diff --git a/OpenSim/Grid/AssetServer/OpenSim.Grid.AssetServer.exe.build b/OpenSim/Grid/AssetServer/OpenSim.Grid.AssetServer.exe.build
new file mode 100644
index 0000000..0f9540e
--- /dev/null
+++ b/OpenSim/Grid/AssetServer/OpenSim.Grid.AssetServer.exe.build
@@ -0,0 +1,49 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Grid.AssetServer" 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="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
11 <resources prefix="OpenSim.Grid.AssetServer" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssetHttpServer.cs" />
15 <include name="Main.cs" />
16 <include name="Properties/AssemblyInfo.cs" />
17 </sources>
18 <references basedir="${project::get-base-directory()}">
19 <lib>
20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib>
23 <include name="../../../bin/Db4objects.Db4o.dll" />
24 <include name="../../../bin/libsecondlife.dll" />
25 <include name="OpenSim.Framework.dll" />
26 <include name="OpenSim.Framework.Console.dll" />
27 <include name="OpenSim.Framework.Servers.dll" />
28 <include name="System.dll" />
29 <include name="System.Data.dll" />
30 <include name="System.Xml.dll" />
31 <include name="../../../bin/XMLRPC.dll" />
32 </references>
33 </csc>
34 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
35 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
36 <copy todir="${project::get-base-directory()}/../../../bin/">
37 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
38 <include name="*.dll"/>
39 <include name="*.exe"/>
40 </fileset>
41 </copy>
42 </target>
43 <target name="clean">
44 <delete dir="${bin.dir}" failonerror="false" />
45 <delete dir="${obj.dir}" failonerror="false" />
46 </target>
47 <target name="doc" description="Creates documentation.">
48 </target>
49</project>
diff --git a/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..f9a18a8
--- /dev/null
+++ b/OpenSim/Grid/AssetServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,60 @@
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// General Information about an assembly is controlled through the following
33// set of attributes. Change these attribute values to modify the information
34// associated with an assembly.
35[assembly: AssemblyTitle("OGS-AssetServer")]
36[assembly: AssemblyDescription("")]
37[assembly: AssemblyConfiguration("")]
38[assembly: AssemblyCompany("")]
39[assembly: AssemblyProduct("OGS-AssetServer")]
40[assembly: AssemblyCopyright("Copyright © 2007")]
41[assembly: AssemblyTrademark("")]
42[assembly: AssemblyCulture("")]
43
44// Setting ComVisible to false makes the types in this assembly not visible
45// to COM components. If you need to access a type in this assembly from
46// COM, set the ComVisible attribute to true on that type.
47[assembly: ComVisible(false)]
48
49// The following GUID is for the ID of the typelib if this project is exposed to COM
50[assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
51
52// Version information for an assembly consists of the following four values:
53//
54// Major Version
55// Minor Version
56// Build Number
57// Revision
58//
59[assembly: AssemblyVersion("1.0.0.0")]
60[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs b/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs
new file mode 100644
index 0000000..3f5d7dd
--- /dev/null
+++ b/OpenSim/Grid/Framework.Manager/GridManagementAgent.cs
@@ -0,0 +1,140 @@
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 Nwc.XmlRpc;
29using OpenSim.Framework;
30using OpenSim.Framework.Servers;
31using System.Collections;
32using System.Collections.Generic;
33using libsecondlife;
34
35namespace OpenSim.Framework.Manager
36{
37 /// <summary>
38 /// Used to pass messages to the gridserver
39 /// </summary>
40 /// <param name="param">Pass this argument</param>
41 public delegate void GridManagerCallback(string param);
42
43 /// <summary>
44 /// Serverside listener for grid commands
45 /// </summary>
46 public class GridManagementAgent
47 {
48 /// <summary>
49 /// Passes grid server messages
50 /// </summary>
51 private GridManagerCallback thecallback;
52
53 /// <summary>
54 /// Security keys
55 /// </summary>
56 private string sendkey;
57 private string recvkey;
58
59 /// <summary>
60 /// Our component type
61 /// </summary>
62 private string component_type;
63
64 /// <summary>
65 /// List of active sessions
66 /// </summary>
67 private static ArrayList Sessions;
68
69 /// <summary>
70 /// Initialises a new GridManagementAgent
71 /// </summary>
72 /// <param name="app_httpd">HTTP Daemon for this server</param>
73 /// <param name="component_type">What component type are we?</param>
74 /// <param name="sendkey">Security send key</param>
75 /// <param name="recvkey">Security recieve key</param>
76 /// <param name="thecallback">Message callback</param>
77 public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback)
78 {
79 this.sendkey = sendkey;
80 this.recvkey = recvkey;
81 this.component_type = component_type;
82 this.thecallback = thecallback;
83 Sessions = new ArrayList();
84
85 app_httpd.AddXmlRPCHandler("manager_login", XmlRpcLoginMethod);
86
87 switch (component_type)
88 {
89 case "gridserver":
90 GridServerManager.sendkey = this.sendkey;
91 GridServerManager.recvkey = this.recvkey;
92 GridServerManager.thecallback = thecallback;
93 app_httpd.AddXmlRPCHandler("shutdown", GridServerManager.XmlRpcShutdownMethod);
94 break;
95 }
96 }
97
98 /// <summary>
99 /// Checks if a session exists
100 /// </summary>
101 /// <param name="sessionID">The session ID</param>
102 /// <returns>Exists?</returns>
103 public static bool SessionExists(LLUUID sessionID)
104 {
105 return Sessions.Contains(sessionID);
106 }
107
108 /// <summary>
109 /// Logs a new session to the grid manager
110 /// </summary>
111 /// <param name="request">the XMLRPC request</param>
112 /// <returns>An XMLRPC reply</returns>
113 public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
114 {
115 XmlRpcResponse response = new XmlRpcResponse();
116 Hashtable requestData = (Hashtable)request.Params[0];
117 Hashtable responseData = new Hashtable();
118
119 // TODO: Switch this over to using OpenSim.Framework.Data
120 if (requestData["username"].Equals("admin") && requestData["password"].Equals("supersecret"))
121 {
122 response.IsFault = false;
123 LLUUID new_session = LLUUID.Random();
124 Sessions.Add(new_session);
125 responseData["session_id"] = new_session.ToString();
126 responseData["msg"] = "Login OK";
127 }
128 else
129 {
130 response.IsFault = true;
131 responseData["error"] = "Invalid username or password";
132 }
133
134 response.Value = responseData;
135 return response;
136
137 }
138
139 }
140}
diff --git a/OpenSim/Grid/Framework.Manager/GridServerManager.cs b/OpenSim/Grid/Framework.Manager/GridServerManager.cs
new file mode 100644
index 0000000..d5eaf6f
--- /dev/null
+++ b/OpenSim/Grid/Framework.Manager/GridServerManager.cs
@@ -0,0 +1,94 @@
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 Nwc.XmlRpc;
33using System.Threading;
34using libsecondlife;
35
36namespace OpenSim.Framework.Manager {
37
38 /// <summary>
39 /// A remote management system for the grid server
40 /// </summary>
41 public class GridServerManager
42 {
43 /// <summary>
44 /// Triggers events from the grid manager
45 /// </summary>
46 public static GridManagerCallback thecallback;
47
48 /// <summary>
49 /// Security keys
50 /// </summary>
51 public static string sendkey;
52 public static string recvkey;
53
54 /// <summary>
55 /// Disconnects the grid server and shuts it down
56 /// </summary>
57 /// <param name="request">XmlRpc Request</param>
58 /// <returns>An XmlRpc response containing either a "msg" or an "error"</returns>
59 public static XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request)
60 {
61 XmlRpcResponse response = new XmlRpcResponse();
62 Hashtable requestData = (Hashtable)request.Params[0];
63 Hashtable responseData = new Hashtable();
64
65 if(requestData.ContainsKey("session_id")) {
66 if(GridManagementAgent.SessionExists(new LLUUID((string)requestData["session_id"]))) {
67 responseData["msg"]="Shutdown command accepted";
68 (new Thread(new ThreadStart(ShutdownServer))).Start();
69 } else {
70 response.IsFault=true;
71 responseData["error"]="bad session ID";
72 }
73 } else {
74 response.IsFault=true;
75 responseData["error"]="no session ID";
76 }
77
78 response.Value = responseData;
79 return response;
80 }
81
82 /// <summary>
83 /// Shuts down the grid server
84 /// </summary>
85 public static void ShutdownServer()
86 {
87 Console.WriteLine("Shutting down the grid server - recieved a grid manager request");
88 Console.WriteLine("Terminating in three seconds...");
89 Thread.Sleep(3000);
90 thecallback("shutdown");
91 }
92 }
93}
94
diff --git a/OpenSim/Grid/Framework.Manager/OpenSim.Grid.Framework.Manager.csproj b/OpenSim/Grid/Framework.Manager/OpenSim.Grid.Framework.Manager.csproj
new file mode 100644
index 0000000..9a98ff4
--- /dev/null
+++ b/OpenSim/Grid/Framework.Manager/OpenSim.Grid.Framework.Manager.csproj
@@ -0,0 +1,99 @@
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>{4B7BFD1C-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.Grid.Framework.Manager</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.Grid.Framework.Manager</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="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="OpenSim.Framework" >
66 <HintPath>OpenSim.Framework.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="OpenSim.Framework.Servers" >
70 <HintPath>OpenSim.Framework.Servers.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="System" >
74 <HintPath>System.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="XMLRPC.dll" >
78 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 </ItemGroup>
84 <ItemGroup>
85 <Compile Include="GridManagementAgent.cs">
86 <SubType>Code</SubType>
87 </Compile>
88 <Compile Include="GridServerManager.cs">
89 <SubType>Code</SubType>
90 </Compile>
91 </ItemGroup>
92 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
93 <PropertyGroup>
94 <PreBuildEvent>
95 </PreBuildEvent>
96 <PostBuildEvent>
97 </PostBuildEvent>
98 </PropertyGroup>
99</Project>
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build b/OpenSim/Grid/Framework.Manager/OpenSim.Grid.Framework.Manager.dll.build
index c93c0c2..119967d 100644
--- a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build
+++ b/OpenSim/Grid/Framework.Manager/OpenSim.Grid.Framework.Manager.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.Physics.OdePlugin" default="build"> 2<project name="OpenSim.Grid.Framework.Manager" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,26 +8,27 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.Physics.OdePlugin" dynamicprefix="true" > 11 <resources prefix="OpenSim.Grid.Framework.Manager" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" /> 14 <include name="GridManagementAgent.cs" />
15 <include name="OdePlugin.cs" /> 15 <include name="GridServerManager.cs" />
16 </sources> 16 </sources>
17 <references basedir="${project::get-base-directory()}"> 17 <references basedir="${project::get-base-directory()}">
18 <lib> 18 <lib>
19 <include name="${project::get-base-directory()}" /> 19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" /> 20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib> 21 </lib>
22 <include name="../../../bin/Axiom.MathLib.dll" /> 22 <include name="../../../bin/libsecondlife.dll" />
23 <include name="../../../bin/Ode.NET.dll" /> 23 <include name="OpenSim.Framework.dll" />
24 <include name="../../../bin/OpenSim.Physics.Manager.dll" /> 24 <include name="OpenSim.Framework.Servers.dll" />
25 <include name="System.dll" /> 25 <include name="System.dll" />
26 <include name="../../../bin/XMLRPC.dll" />
26 </references> 27 </references>
27 </csc> 28 </csc>
28 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/Physics/" /> 29 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
29 <mkdir dir="${project::get-base-directory()}/../../../bin/Physics/"/> 30 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
30 <copy todir="${project::get-base-directory()}/../../../bin/Physics/"> 31 <copy todir="${project::get-base-directory()}/../../../bin/">
31 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 32 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
32 <include name="*.dll"/> 33 <include name="*.dll"/>
33 <include name="*.exe"/> 34 <include name="*.exe"/>
diff --git a/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs b/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs
new file mode 100644
index 0000000..c9701d6
--- /dev/null
+++ b/OpenSim/Grid/GridServer.Config/AssemblyInfo.cs
@@ -0,0 +1,58 @@
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("GridConfig")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("GridConfig")]
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/OpenSim/Grid/GridServer.Config/DbGridConfig.cs b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs
new file mode 100644
index 0000000..2218004
--- /dev/null
+++ b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs
@@ -0,0 +1,161 @@
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 OpenSim.Framework.Console;
31using OpenSim.Framework.Interfaces;
32using Db4objects.Db4o;
33
34namespace OpenGrid.Config.GridConfigDb4o
35{
36 /// <summary>
37 /// A grid configuration interface for returning the DB4o Config Provider
38 /// </summary>
39 public class Db40ConfigPlugin: IGridConfig
40 {
41 /// <summary>
42 /// Loads and returns a configuration objeect
43 /// </summary>
44 /// <returns>A grid configuration object</returns>
45 public GridConfig GetConfigObject()
46 {
47 OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading Db40Config dll");
48 return ( new DbGridConfig());
49 }
50 }
51
52 /// <summary>
53 /// A DB4o based Gridserver configuration object
54 /// </summary>
55 public class DbGridConfig : GridConfig
56 {
57 /// <summary>
58 /// The DB4o Database
59 /// </summary>
60 private IObjectContainer db;
61
62 /// <summary>
63 /// User configuration for the Grid Config interfaces
64 /// </summary>
65 public void LoadDefaults() {
66 OpenSim.Framework.Console.MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
67
68 // About the grid options
69 this.GridOwner = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid owner", "OGS development team");
70
71 // Asset Options
72 this.DefaultAssetServer = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/");
73 this.AssetSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to asset server","null");
74 this.AssetRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from asset server","null");
75
76 // User Server Options
77 this.DefaultUserServer = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/");
78 this.UserSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to user server","null");
79 this.UserRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from user server","null");
80
81 // Region Server Options
82 this.SimSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to sims","null");
83 this.SimRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from sims","null");
84 }
85
86 /// <summary>
87 /// Initialises a new configuration object
88 /// </summary>
89 public override void InitConfig() {
90 try {
91 // Perform Db4o initialisation
92 db = Db4oFactory.OpenFile("opengrid.yap");
93
94 // Locate the grid configuration object
95 IObjectSet result = db.Get(typeof(DbGridConfig));
96 // Found?
97 if(result.Count==1) {
98 OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading");
99 foreach (DbGridConfig cfg in result) {
100 // Import each setting into this class
101 // Grid Settings
102 this.GridOwner=cfg.GridOwner;
103 // Asset Settings
104 this.DefaultAssetServer=cfg.DefaultAssetServer;
105 this.AssetSendKey=cfg.AssetSendKey;
106 this.AssetRecvKey=cfg.AssetRecvKey;
107 // User Settings
108 this.DefaultUserServer=cfg.DefaultUserServer;
109 this.UserSendKey=cfg.UserSendKey;
110 this.UserRecvKey=cfg.UserRecvKey;
111 // Region Settings
112 this.SimSendKey=cfg.SimSendKey;
113 this.SimRecvKey=cfg.SimRecvKey;
114 }
115 // Create a new configuration object from this class
116 } else {
117 OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
118
119 // Load default settings into this class
120 LoadDefaults();
121
122 // Saves to the database file...
123 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Writing out default settings to local database");
124 db.Set(this);
125
126 // Closes file locks
127 db.Close();
128 }
129 } catch(Exception e) {
130 OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
131 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
132 }
133
134 // Grid Settings
135 OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid settings loaded:");
136 OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid owner: " + this.GridOwner);
137
138 // Asset Settings
139 OpenSim.Framework.Console.MainLog.Instance.Verbose("Default asset server: " + this.DefaultAssetServer);
140 OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey);
141 OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey);
142
143 // User Settings
144 OpenSim.Framework.Console.MainLog.Instance.Verbose("Default user server: " + this.DefaultUserServer);
145 OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to user server: " + this.UserSendKey);
146 OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey);
147
148 // Region Settings
149 OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to sims: " + this.SimSendKey);
150 OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey);
151 }
152
153 /// <summary>
154 /// Closes down the database and releases filesystem locks
155 /// </summary>
156 public void Shutdown() {
157 db.Close();
158 }
159 }
160
161}
diff --git a/OpenSim/Grid/GridServer.Config/OpenSim.Grid.GridServer.Config.csproj b/OpenSim/Grid/GridServer.Config/OpenSim.Grid.GridServer.Config.csproj
new file mode 100644
index 0000000..24e845c
--- /dev/null
+++ b/OpenSim/Grid/GridServer.Config/OpenSim.Grid.GridServer.Config.csproj
@@ -0,0 +1,107 @@
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>{1442B635-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.Grid.GridServer.Config</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.Grid.GridServer.Config</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="OpenSim.Framework" >
70 <HintPath>OpenSim.Framework.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="OpenSim.Framework.Console" >
74 <HintPath>OpenSim.Framework.Console.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="System" >
78 <HintPath>System.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="System.Data.dll" >
82 <HintPath>..\..\..\bin\System.Data.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="System.Xml" >
86 <HintPath>System.Xml.dll</HintPath>
87 <Private>False</Private>
88 </Reference>
89 </ItemGroup>
90 <ItemGroup>
91 </ItemGroup>
92 <ItemGroup>
93 <Compile Include="AssemblyInfo.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="DbGridConfig.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 </ItemGroup>
100 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
101 <PropertyGroup>
102 <PreBuildEvent>
103 </PreBuildEvent>
104 <PostBuildEvent>
105 </PostBuildEvent>
106 </PropertyGroup>
107</Project>
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build b/OpenSim/Grid/GridServer.Config/OpenSim.Grid.GridServer.Config.dll.build
index 1a72d0a..ff57dac 100644
--- a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build
+++ b/OpenSim/Grid/GridServer.Config/OpenSim.Grid.GridServer.Config.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.GridInterfaces.Local" default="build"> 2<project name="OpenSim.Grid.GridServer.Config" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,11 +8,11 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.GridInterfaces.Local" dynamicprefix="true" > 11 <resources prefix="OpenSim.Grid.GridServer.Config" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" /> 14 <include name="AssemblyInfo.cs" />
15 <include name="LocalAssetServer.cs" /> 15 <include name="DbGridConfig.cs" />
16 </sources> 16 </sources>
17 <references basedir="${project::get-base-directory()}"> 17 <references basedir="${project::get-base-directory()}">
18 <lib> 18 <lib>
@@ -21,9 +21,10 @@
21 </lib> 21 </lib>
22 <include name="../../../bin/Db4objects.Db4o.dll" /> 22 <include name="../../../bin/Db4objects.Db4o.dll" />
23 <include name="../../../bin/libsecondlife.dll" /> 23 <include name="../../../bin/libsecondlife.dll" />
24 <include name="../../../bin/OpenSim.Framework.dll" /> 24 <include name="OpenSim.Framework.dll" />
25 <include name="../../../bin/OpenSim.Framework.Console.dll" /> 25 <include name="OpenSim.Framework.Console.dll" />
26 <include name="System.dll" /> 26 <include name="System.dll" />
27 <include name="System.Data.dll.dll" />
27 <include name="System.Xml.dll" /> 28 <include name="System.Xml.dll" />
28 </references> 29 </references>
29 </csc> 30 </csc>
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
new file mode 100644
index 0000000..c78d14a
--- /dev/null
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -0,0 +1,599 @@
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;
30using System.Collections.Generic;
31using System.Text;
32using System.Reflection;
33using OpenSim.Framework.Data;
34using OpenSim.Framework.Utilities;
35using OpenSim.Framework.Console;
36using OpenSim.Framework.Sims;
37using libsecondlife;
38using Nwc.XmlRpc;
39using System.Xml;
40
41namespace OpenSim.Grid.GridServer
42{
43 class GridManager
44 {
45 Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>();
46 Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>();
47
48 public OpenSim.Framework.Interfaces.GridConfig config;
49
50 /// <summary>
51 /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded.
52 /// </summary>
53 /// <param name="FileName">The filename to the grid server plugin DLL</param>
54 public void AddPlugin(string FileName)
55 {
56 OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Attempting to load " + FileName);
57 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
58
59 OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
60 foreach (Type pluginType in pluginAssembly.GetTypes())
61 {
62 if (!pluginType.IsAbstract)
63 {
64 // Regions go here
65 Type typeInterface = pluginType.GetInterface("IGridData", true);
66
67 if (typeInterface != null)
68 {
69 IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
70 plug.Initialise();
71 this._plugins.Add(plug.getName(), plug);
72 OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Added IGridData Interface");
73 }
74
75 typeInterface = null;
76
77 // Logs go here
78 typeInterface = pluginType.GetInterface("ILogData", true);
79
80 if (typeInterface != null)
81 {
82 ILogData plug = (ILogData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
83 plug.Initialise();
84 this._logplugins.Add(plug.getName(), plug);
85 OpenSim.Framework.Console.MainLog.Instance.Verbose( "Storage: Added ILogData Interface");
86 }
87
88 typeInterface = null;
89 }
90 }
91
92 pluginAssembly = null;
93 }
94
95 /// <summary>
96 /// Logs a piece of information to the database
97 /// </summary>
98 /// <param name="target">What you were operating on (in grid server, this will likely be the region UUIDs)</param>
99 /// <param name="method">Which method is being called?</param>
100 /// <param name="args">What arguments are being passed?</param>
101 /// <param name="priority">How high priority is this? 1 = Max, 6 = Verbose</param>
102 /// <param name="message">The message to log</param>
103 private void logToDB(string target, string method, string args, int priority, string message)
104 {
105 foreach (KeyValuePair<string, ILogData> kvp in _logplugins)
106 {
107 try
108 {
109 kvp.Value.saveLog("Gridserver", target, method, args, priority, message);
110 }
111 catch (Exception e)
112 {
113 OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: unable to write log via " + kvp.Key);
114 }
115 }
116 }
117
118 /// <summary>
119 /// Returns a region by argument
120 /// </summary>
121 /// <param name="uuid">A UUID key of the region to return</param>
122 /// <returns>A SimProfileData for the region</returns>
123 public SimProfileData getRegion(libsecondlife.LLUUID uuid)
124 {
125 foreach(KeyValuePair<string,IGridData> kvp in _plugins) {
126 try
127 {
128 return kvp.Value.GetProfileByLLUUID(uuid);
129 }
130 catch (Exception e)
131 {
132 OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key);
133 }
134 }
135 return null;
136 }
137
138 /// <summary>
139 /// Returns a region by argument
140 /// </summary>
141 /// <param name="uuid">A regionHandle of the region to return</param>
142 /// <returns>A SimProfileData for the region</returns>
143 public SimProfileData getRegion(ulong handle)
144 {
145 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
146 {
147 try
148 {
149 return kvp.Value.GetProfileByHandle(handle);
150 }
151 catch (Exception e)
152 {
153 OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key);
154 }
155 }
156 return null;
157 }
158
159 public Dictionary<ulong, SimProfileData> getRegions(uint xmin, uint ymin, uint xmax, uint ymax)
160 {
161 Dictionary<ulong, SimProfileData> regions = new Dictionary<ulong, SimProfileData>();
162
163 SimProfileData[] neighbours;
164
165 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
166 {
167 try
168 {
169 neighbours = kvp.Value.GetProfilesInRange(xmin, ymin, xmax, ymax);
170 foreach (SimProfileData neighbour in neighbours)
171 {
172 regions[neighbour.regionHandle] = neighbour;
173 }
174 }
175 catch (Exception e)
176 {
177 OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key);
178 }
179 }
180
181 return regions;
182 }
183
184 /// <summary>
185 /// Returns a XML String containing a list of the neighbouring regions
186 /// </summary>
187 /// <param name="reqhandle">The regionhandle for the center sim</param>
188 /// <returns>An XML string containing neighbour entities</returns>
189 public string GetXMLNeighbours(ulong reqhandle)
190 {
191 string response = "";
192 SimProfileData central_region = getRegion(reqhandle);
193 SimProfileData neighbour;
194 for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++)
195 {
196 if (getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256)) != null)
197 {
198 neighbour = getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256));
199 response += "<neighbour>";
200 response += "<sim_ip>" + neighbour.serverIP + "</sim_ip>";
201 response += "<sim_port>" + neighbour.serverPort.ToString() + "</sim_port>";
202 response += "<locx>" + neighbour.regionLocX.ToString() + "</locx>";
203 response += "<locy>" + neighbour.regionLocY.ToString() + "</locy>";
204 response += "<regionhandle>" + neighbour.regionHandle.ToString() + "</regionhandle>";
205 response += "</neighbour>";
206
207 }
208 }
209 return response;
210 }
211
212 /// <summary>
213 /// Performed when a region connects to the grid server initially.
214 /// </summary>
215 /// <param name="request">The XMLRPC Request</param>
216 /// <returns>Startup parameters</returns>
217 public XmlRpcResponse XmlRpcLoginToSimulatorMethod(XmlRpcRequest request)
218 {
219 XmlRpcResponse response = new XmlRpcResponse();
220 Hashtable responseData = new Hashtable();
221 response.Value = responseData;
222
223 SimProfileData TheSim = null;
224 Hashtable requestData = (Hashtable)request.Params[0];
225
226 if (requestData.ContainsKey("UUID"))
227 {
228 TheSim = getRegion(new LLUUID((string)requestData["UUID"]));
229 logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcLoginToSimulatorMethod","", 5,"Region attempting login with UUID.");
230 }
231 else if (requestData.ContainsKey("region_handle"))
232 {
233 TheSim = getRegion((ulong)Convert.ToUInt64(requestData["region_handle"]));
234 logToDB((string)requestData["region_handle"], "XmlRpcLoginToSimulatorMethod", "", 5, "Region attempting login with regionHandle.");
235 }
236 else
237 {
238 responseData["error"] = "No UUID or region_handle passed to grid server - unable to connect you";
239 return response;
240 }
241
242 if (TheSim == null)
243 {
244 responseData["error"] = "sim not found";
245 return response;
246 }
247 else
248 {
249
250 ArrayList SimNeighboursData = new ArrayList();
251
252 SimProfileData neighbour;
253 Hashtable NeighbourBlock;
254
255 bool fastMode = false; // Only compatible with MySQL right now
256
257 if (fastMode)
258 {
259 Dictionary<ulong, SimProfileData> neighbours = getRegions(TheSim.regionLocX - 1, TheSim.regionLocY - 1, TheSim.regionLocX + 1, TheSim.regionLocY + 1);
260
261 foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours)
262 {
263 NeighbourBlock = new Hashtable();
264 NeighbourBlock["sim_ip"] = aSim.Value.serverIP.ToString();
265 NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString();
266 NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString();
267 NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString();
268 NeighbourBlock["UUID"] = aSim.Value.UUID.ToString();
269
270 if (aSim.Value.UUID != TheSim.UUID)
271 SimNeighboursData.Add(NeighbourBlock);
272 }
273 }
274 else
275 {
276 for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++)
277 {
278 if (getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256)) != null)
279 {
280 neighbour = getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256));
281
282 NeighbourBlock = new Hashtable();
283 NeighbourBlock["sim_ip"] = neighbour.serverIP;
284 NeighbourBlock["sim_port"] = neighbour.serverPort.ToString();
285 NeighbourBlock["region_locx"] = neighbour.regionLocX.ToString();
286 NeighbourBlock["region_locy"] = neighbour.regionLocY.ToString();
287 NeighbourBlock["UUID"] = neighbour.UUID.ToString();
288
289 if (neighbour.UUID != TheSim.UUID) SimNeighboursData.Add(NeighbourBlock);
290 }
291 }
292 }
293
294 responseData["UUID"] = TheSim.UUID.ToString();
295 responseData["region_locx"] = TheSim.regionLocX.ToString();
296 responseData["region_locy"] = TheSim.regionLocY.ToString();
297 responseData["regionname"] = TheSim.regionName;
298 responseData["estate_id"] = "1";
299 responseData["neighbours"] = SimNeighboursData;
300
301 responseData["sim_ip"] = TheSim.serverIP;
302 responseData["sim_port"] = TheSim.serverPort.ToString();
303 responseData["asset_url"] = TheSim.regionAssetURI;
304 responseData["asset_sendkey"] = TheSim.regionAssetSendKey;
305 responseData["asset_recvkey"] = TheSim.regionAssetRecvKey;
306 responseData["user_url"] = TheSim.regionUserURI;
307 responseData["user_sendkey"] = TheSim.regionUserSendKey;
308 responseData["user_recvkey"] = TheSim.regionUserRecvKey;
309 responseData["authkey"] = TheSim.regionSecret;
310
311 // New! If set, use as URL to local sim storage (ie http://remotehost/region.yap)
312 responseData["data_uri"] = TheSim.regionDataURI;
313 }
314
315 return response;
316 }
317
318 public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request)
319 {
320 int xmin=980, ymin=980, xmax=1020, ymax=1020;
321
322 Hashtable requestData = (Hashtable)request.Params[0];
323 if (requestData.ContainsKey("xmin"))
324 {
325 xmin = (Int32)requestData["xmin"];
326 }
327 if (requestData.ContainsKey("ymin"))
328 {
329 ymin = (Int32)requestData["ymin"];
330 }
331 if (requestData.ContainsKey("xmax"))
332 {
333 xmax = (Int32)requestData["xmax"];
334 }
335 if (requestData.ContainsKey("ymax"))
336 {
337 ymax = (Int32)requestData["ymax"];
338 }
339
340 XmlRpcResponse response = new XmlRpcResponse();
341 Hashtable responseData = new Hashtable();
342 response.Value = responseData;
343 IList simProfileList = new ArrayList();
344
345 bool fastMode = true; // MySQL Only
346
347 if (fastMode)
348 {
349 Dictionary<ulong, SimProfileData> neighbours = getRegions((uint)xmin, (uint)ymin, (uint)xmax, (uint)ymax);
350
351 foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours)
352 {
353 Hashtable simProfileBlock = new Hashtable();
354 simProfileBlock["x"] = aSim.Value.regionLocX.ToString();
355 simProfileBlock["y"] = aSim.Value.regionLocY.ToString();
356 simProfileBlock["name"] = aSim.Value.regionName;
357 simProfileBlock["access"] = 21;
358 simProfileBlock["region-flags"] = 512;
359 simProfileBlock["water-height"] = 0;
360 simProfileBlock["agents"] = 1;
361 simProfileBlock["map-image-id"] = aSim.Value.regionMapTextureID.ToString();
362
363 // For Sugilite compatibility
364 simProfileBlock["regionhandle"] = aSim.Value.regionHandle.ToString();
365 simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString();
366 simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString();
367 simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString();
368 simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated();
369
370 simProfileList.Add(simProfileBlock);
371 }
372 OpenSim.Framework.Console.MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode");
373 }
374 else
375 {
376 SimProfileData simProfile;
377 for (int x = xmin; x < xmax; x++)
378 {
379 for (int y = ymin; y < ymax; y++)
380 {
381 simProfile = getRegion(Helpers.UIntsToLong((uint)(x * 256), (uint)(y * 256)));
382 if (simProfile != null)
383 {
384 Hashtable simProfileBlock = new Hashtable();
385 simProfileBlock["x"] = x;
386 simProfileBlock["y"] = y;
387 simProfileBlock["name"] = simProfile.regionName;
388 simProfileBlock["access"] = 0;
389 simProfileBlock["region-flags"] = 0;
390 simProfileBlock["water-height"] = 20;
391 simProfileBlock["agents"] = 1;
392 simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString();
393
394 // For Sugilite compatibility
395 simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString();
396 simProfileBlock["sim_ip"] = simProfile.serverIP.ToString();
397 simProfileBlock["sim_port"] = simProfile.serverPort.ToString();
398 simProfileBlock["sim_uri"] = simProfile.serverURI.ToString();
399 simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated();
400
401 simProfileList.Add(simProfileBlock);
402 }
403 }
404 }
405 OpenSim.Framework.Console.MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode");
406 }
407
408 responseData["sim-profiles"] = simProfileList;
409
410 return response;
411 }
412
413
414
415 /// <summary>
416 /// Performs a REST Get Operation
417 /// </summary>
418 /// <param name="request"></param>
419 /// <param name="path"></param>
420 /// <param name="param"></param>
421 /// <returns></returns>
422 public string RestGetRegionMethod(string request, string path, string param)
423 {
424 return RestGetSimMethod("", "/sims/", param);
425 }
426
427 /// <summary>
428 /// Performs a REST Set Operation
429 /// </summary>
430 /// <param name="request"></param>
431 /// <param name="path"></param>
432 /// <param name="param"></param>
433 /// <returns></returns>
434 public string RestSetRegionMethod(string request, string path, string param)
435 {
436 return RestSetSimMethod("", "/sims/", param);
437 }
438
439 /// <summary>
440 /// Returns information about a sim via a REST Request
441 /// </summary>
442 /// <param name="request"></param>
443 /// <param name="path"></param>
444 /// <param name="param"></param>
445 /// <returns>Information about the sim in XML</returns>
446 public string RestGetSimMethod(string request, string path, string param)
447 {
448 string respstring = String.Empty;
449
450 SimProfileData TheSim;
451 LLUUID UUID = new LLUUID(param);
452 TheSim = getRegion(UUID);
453
454 if (!(TheSim == null))
455 {
456 respstring = "<Root>";
457 respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>";
458 respstring += "<sim>";
459 respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
460 respstring += "<regionname>" + TheSim.regionName + "</regionname>";
461 respstring += "<sim_ip>" + TheSim.serverIP + "</sim_ip>";
462 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
463 respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
464 respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
465 respstring += "<estate_id>1</estate_id>";
466 respstring += "</sim>";
467 respstring += "</Root>";
468 }
469
470 return respstring;
471 }
472
473 /// <summary>
474 /// Creates or updates a sim via a REST Method Request
475 /// BROKEN with SQL Update
476 /// </summary>
477 /// <param name="request"></param>
478 /// <param name="path"></param>
479 /// <param name="param"></param>
480 /// <returns>"OK" or an error</returns>
481 public string RestSetSimMethod(string request, string path, string param)
482 {
483 Console.WriteLine("Processing region update");
484 SimProfileData TheSim;
485 TheSim = getRegion(new LLUUID(param));
486 if ((TheSim) == null)
487 {
488 TheSim = new SimProfileData();
489 LLUUID UUID = new LLUUID(param);
490 TheSim.UUID = UUID;
491 TheSim.regionRecvKey = config.SimRecvKey;
492 }
493
494 XmlDocument doc = new XmlDocument();
495 doc.LoadXml(request);
496 XmlNode rootnode = doc.FirstChild;
497 XmlNode authkeynode = rootnode.ChildNodes[0];
498 if (authkeynode.Name != "authkey")
499 {
500 return "ERROR! bad XML - expected authkey tag";
501 }
502
503 XmlNode simnode = rootnode.ChildNodes[1];
504 if (simnode.Name != "sim")
505 {
506 return "ERROR! bad XML - expected sim tag";
507 }
508
509 if (authkeynode.InnerText != TheSim.regionRecvKey)
510 {
511 return "ERROR! invalid key";
512 }
513
514 //TheSim.regionSendKey = Cfg;
515 TheSim.regionRecvKey = config.SimRecvKey;
516 TheSim.regionSendKey = config.SimSendKey;
517 TheSim.regionSecret = config.SimRecvKey;
518 TheSim.regionDataURI = "";
519 TheSim.regionAssetURI = config.DefaultAssetServer;
520 TheSim.regionAssetRecvKey = config.AssetRecvKey;
521 TheSim.regionAssetSendKey = config.AssetSendKey;
522 TheSim.regionUserURI = config.DefaultUserServer;
523 TheSim.regionUserSendKey = config.UserSendKey;
524 TheSim.regionUserRecvKey = config.UserRecvKey;
525
526
527 for (int i = 0; i < simnode.ChildNodes.Count; i++)
528 {
529 switch (simnode.ChildNodes[i].Name)
530 {
531 case "regionname":
532 TheSim.regionName = simnode.ChildNodes[i].InnerText;
533 break;
534
535 case "sim_ip":
536 TheSim.serverIP = simnode.ChildNodes[i].InnerText;
537 break;
538
539 case "sim_port":
540 TheSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText);
541 break;
542
543 case "region_locx":
544 TheSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
545 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
546 break;
547
548 case "region_locy":
549 TheSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
550 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
551 break;
552 }
553 }
554
555 TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
556
557 bool requirePublic = false;
558
559 if (requirePublic && (TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") || TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255.")))
560 {
561 return "ERROR! Servers must register with public addresses.";
562 }
563
564
565 try
566 {
567 OpenSim.Framework.Console.MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
568 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
569 {
570 try
571 {
572 //Check reservations
573 ReservationData reserveData = kvp.Value.GetReservationAtPoint(TheSim.regionLocX, TheSim.regionLocY);
574 if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null))
575 {
576 kvp.Value.AddProfile(TheSim);
577 OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")");
578 logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid.");
579 }
580 else
581 {
582 return "Unable to update region (RestSetSimMethod): Incorrect auth key.";
583 }
584 }
585 catch (Exception e)
586 {
587 OpenSim.Framework.Console.MainLog.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString());
588 }
589 }
590 return "OK";
591 }
592 catch (Exception e)
593 {
594 return "ERROR! Could not save to database! (" + e.ToString() + ")";
595 }
596 }
597
598 }
599}
diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs
new file mode 100644
index 0000000..b225214
--- /dev/null
+++ b/OpenSim/Grid/GridServer/Main.cs
@@ -0,0 +1,271 @@
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.IO;
31using System.Text;
32using System.Timers;
33using System.Net;
34using System.Threading;
35using System.Reflection;
36using libsecondlife;
37using OpenSim.Framework.Manager;
38using OpenSim.Framework;
39using OpenSim.Framework.Sims;
40using OpenSim.Framework.Console;
41using OpenSim.Framework.Interfaces;
42using OpenSim.Framework.Servers;
43using OpenSim.GenericConfig;
44
45namespace OpenSim.Grid.GridServer
46{
47 /// <summary>
48 /// </summary>
49 public class OpenGrid_Main : conscmd_callback
50 {
51 private string ConfigDll = "OpenGrid.Config.GridConfigDb4o.dll";
52 private string GridDll = "OpenSim.Framework.Data.MySQL.dll";
53 public GridConfig Cfg;
54
55 public static OpenGrid_Main thegrid;
56 protected IGenericConfig localXMLConfig;
57
58 public static bool setuponly;
59
60 //public LLUUID highestUUID;
61
62 // private SimProfileManager m_simProfileManager;
63
64 private GridManager m_gridManager;
65
66 private LogBase m_console;
67
68 [STAThread]
69 public static void Main(string[] args)
70 {
71 if (args.Length > 0)
72 {
73 if (args[0] == "-setuponly") setuponly = true;
74 }
75 Console.WriteLine("Starting...\n");
76
77 thegrid = new OpenGrid_Main();
78 thegrid.Startup();
79
80 thegrid.Work();
81 }
82
83 private void Work()
84 {
85 while (true)
86 {
87 Thread.Sleep(5000);
88 // should flush the DB etc here
89 }
90 }
91
92 private OpenGrid_Main()
93 {
94 m_console = new LogBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
95 MainLog.Instance = m_console;
96
97
98 }
99
100 public void managercallback(string cmd)
101 {
102 switch (cmd)
103 {
104 case "shutdown":
105 RunCmd("shutdown", new string[0]);
106 break;
107 }
108 }
109
110
111 public void Startup()
112 {
113 this.localXMLConfig = new XmlConfig("GridServerConfig.xml");
114 this.localXMLConfig.LoadData();
115 this.ConfigDB(this.localXMLConfig);
116 this.localXMLConfig.Close();
117
118 m_console.Verbose( "Main.cs:Startup() - Loading configuration");
119 Cfg = this.LoadConfigDll(this.ConfigDll);
120 Cfg.InitConfig();
121 if (setuponly) Environment.Exit(0);
122
123 m_console.Verbose( "Main.cs:Startup() - Connecting to Storage Server");
124 m_gridManager = new GridManager();
125 m_gridManager.AddPlugin(GridDll); // Made of win
126 m_gridManager.config = Cfg;
127
128 m_console.Verbose( "Main.cs:Startup() - Starting HTTP process");
129 BaseHttpServer httpServer = new BaseHttpServer(8001);
130 //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback);
131
132 httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod);
133 httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod);
134
135 httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod);
136 httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod);
137 httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod);
138 httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod);
139
140
141 // lbsa71 : This code snippet taken from old http server.
142 // I have no idea what this was supposed to do - looks like an infinite recursion to me.
143 // case "regions":
144 //// DIRTY HACK ALERT
145 //Console.Notice("/regions/ accessed");
146 //TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle((ulong)Convert.ToUInt64(rest_params[1]));
147 //respstring = ParseREST("/regions/" + rest_params[1], requestBody, HTTPmethod);
148 //break;
149
150 // lbsa71 : I guess these were never used?
151 //Listener.Prefixes.Add("http://+:8001/gods/");
152 //Listener.Prefixes.Add("http://+:8001/highestuuid/");
153 //Listener.Prefixes.Add("http://+:8001/uuidblocks/");
154
155 httpServer.Start();
156
157 m_console.Verbose( "Main.cs:Startup() - Starting sim status checker");
158
159 System.Timers.Timer simCheckTimer = new System.Timers.Timer(3600000 * 3); // 3 Hours between updates.
160 simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
161 simCheckTimer.Enabled = true;
162 }
163
164 private GridConfig LoadConfigDll(string dllName)
165 {
166 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
167 GridConfig config = null;
168
169 foreach (Type pluginType in pluginAssembly.GetTypes())
170 {
171 if (pluginType.IsPublic)
172 {
173 if (!pluginType.IsAbstract)
174 {
175 Type typeInterface = pluginType.GetInterface("IGridConfig", true);
176
177 if (typeInterface != null)
178 {
179 IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
180 config = plug.GetConfigObject();
181 break;
182 }
183
184 typeInterface = null;
185 }
186 }
187 }
188 pluginAssembly = null;
189 return config;
190 }
191
192 public void CheckSims(object sender, ElapsedEventArgs e)
193 {
194 /*
195 foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values)
196 {
197 string SimResponse = "";
198 try
199 {
200 WebRequest CheckSim = WebRequest.Create("http://" + sim.sim_ip + ":" + sim.sim_port.ToString() + "/checkstatus/");
201 CheckSim.Method = "GET";
202 CheckSim.ContentType = "text/plaintext";
203 CheckSim.ContentLength = 0;
204
205 StreamWriter stOut = new StreamWriter(CheckSim.GetRequestStream(), System.Text.Encoding.ASCII);
206 stOut.Write("");
207 stOut.Close();
208
209 StreamReader stIn = new StreamReader(CheckSim.GetResponse().GetResponseStream());
210 SimResponse = stIn.ReadToEnd();
211 stIn.Close();
212 }
213 catch
214 {
215 }
216
217 if (SimResponse == "OK")
218 {
219 m_simProfileManager.SimProfiles[sim.UUID].online = true;
220 }
221 else
222 {
223 m_simProfileManager.SimProfiles[sim.UUID].online = false;
224 }
225 }
226 */
227 }
228
229 public void RunCmd(string cmd, string[] cmdparams)
230 {
231 switch (cmd)
232 {
233 case "help":
234 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
235 break;
236
237 case "shutdown":
238 m_console.Close();
239 Environment.Exit(0);
240 break;
241 }
242 }
243
244 public void Show(string ShowWhat)
245 {
246 }
247
248 private void ConfigDB(IGenericConfig configData)
249 {
250 try
251 {
252 string attri = "";
253 attri = configData.GetAttribute("DataBaseProvider");
254 if (attri == "")
255 {
256 GridDll = "OpenSim.Framework.Data.DB4o.dll";
257 configData.SetAttribute("DataBaseProvider", "OpenSim.Framework.Data.DB4o.dll");
258 }
259 else
260 {
261 GridDll = attri;
262 }
263 configData.Commit();
264 }
265 catch (Exception e)
266 {
267
268 }
269 }
270 }
271}
diff --git a/OpenSim/Grid/GridServer/OpenSim.Grid.GridServer.csproj b/OpenSim/Grid/GridServer/OpenSim.Grid.GridServer.csproj
new file mode 100644
index 0000000..424072e
--- /dev/null
+++ b/OpenSim/Grid/GridServer/OpenSim.Grid.GridServer.csproj
@@ -0,0 +1,134 @@
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>{60FCC3A6-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.Grid.GridServer</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Exe</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Grid.GridServer</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="OpenSim.Framework" >
70 <HintPath>OpenSim.Framework.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="OpenSim.Framework.Console" >
74 <HintPath>OpenSim.Framework.Console.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="OpenSim.Framework.GenericConfig.Xml" >
78 <HintPath>OpenSim.Framework.GenericConfig.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="OpenSim.Framework.Servers" >
82 <HintPath>OpenSim.Framework.Servers.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="System" >
86 <HintPath>System.dll</HintPath>
87 <Private>False</Private>
88 </Reference>
89 <Reference Include="System.Data" >
90 <HintPath>System.Data.dll</HintPath>
91 <Private>False</Private>
92 </Reference>
93 <Reference Include="System.Xml" >
94 <HintPath>System.Xml.dll</HintPath>
95 <Private>False</Private>
96 </Reference>
97 <Reference Include="XMLRPC.dll" >
98 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
99 <Private>False</Private>
100 </Reference>
101 </ItemGroup>
102 <ItemGroup>
103 <ProjectReference Include="..\..\Framework\Data\OpenSim.Framework.Data.csproj">
104 <Name>OpenSim.Framework.Data</Name>
105 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
106 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
107 <Private>False</Private>
108 </ProjectReference>
109 <ProjectReference Include="..\Framework.Manager\OpenSim.Grid.Framework.Manager.csproj">
110 <Name>OpenSim.Grid.Framework.Manager</Name>
111 <Project>{4B7BFD1C-0000-0000-0000-000000000000}</Project>
112 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
113 <Private>False</Private>
114 </ProjectReference>
115 </ItemGroup>
116 <ItemGroup>
117 <Compile Include="GridManager.cs">
118 <SubType>Code</SubType>
119 </Compile>
120 <Compile Include="Main.cs">
121 <SubType>Code</SubType>
122 </Compile>
123 <Compile Include="Properties\AssemblyInfo.cs">
124 <SubType>Code</SubType>
125 </Compile>
126 </ItemGroup>
127 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
128 <PropertyGroup>
129 <PreBuildEvent>
130 </PreBuildEvent>
131 <PostBuildEvent>
132 </PostBuildEvent>
133 </PropertyGroup>
134</Project>
diff --git a/OpenSim/Examples/SimpleApp/SimpleApp.exe.build b/OpenSim/Grid/GridServer/OpenSim.Grid.GridServer.exe.build
index 087922b..3573e89 100644
--- a/OpenSim/Examples/SimpleApp/SimpleApp.exe.build
+++ b/OpenSim/Grid/GridServer/OpenSim.Grid.GridServer.exe.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="SimpleApp" default="build"> 2<project name="OpenSim.Grid.GridServer" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,11 +8,11 @@
8 </fileset> 8 </fileset>
9 </copy> 9 </copy>
10 <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe"> 10 <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
11 <resources prefix="SimpleApp" dynamicprefix="true" > 11 <resources prefix="OpenSim.Grid.GridServer" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="MyWorld.cs" /> 14 <include name="GridManager.cs" />
15 <include name="Program.cs" /> 15 <include name="Main.cs" />
16 <include name="Properties/AssemblyInfo.cs" /> 16 <include name="Properties/AssemblyInfo.cs" />
17 </sources> 17 </sources>
18 <references basedir="${project::get-base-directory()}"> 18 <references basedir="${project::get-base-directory()}">
@@ -20,18 +20,16 @@
20 <include name="${project::get-base-directory()}" /> 20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" /> 21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib> 22 </lib>
23 <include name="../../../bin/Db4objects.Db4o.dll" />
23 <include name="../../../bin/libsecondlife.dll" /> 24 <include name="../../../bin/libsecondlife.dll" />
24 <include name="../../../bin/OpenGrid.Framework.Communications.dll" /> 25 <include name="OpenSim.Framework.dll" />
25 <include name="../../../bin/OpenSim.Caches.dll" /> 26 <include name="OpenSim.Framework.Console.dll" />
26 <include name="../../../bin/OpenSim.Framework.dll" /> 27 <include name="../../../bin/OpenSim.Framework.Data.dll" />
27 <include name="../../../bin/OpenSim.Framework.Console.dll" /> 28 <include name="OpenSim.Framework.GenericConfig.Xml.dll" />
28 <include name="../../../bin/OpenSim.GridInterfaces.Local.dll" /> 29 <include name="OpenSim.Framework.Servers.dll" />
29 <include name="../../../bin/OpenSim.LocalCommunications.dll" /> 30 <include name="../../../bin/OpenSim.Grid.Framework.Manager.dll" />
30 <include name="../../../bin/OpenSim.Region.dll" />
31 <include name="../../../bin/OpenSim.RegionServer.dll" />
32 <include name="../../../bin/OpenSim.Servers.dll" />
33 <include name="System.dll" /> 31 <include name="System.dll" />
34 <include name="System.Data.dll.dll" /> 32 <include name="System.Data.dll" />
35 <include name="System.Xml.dll" /> 33 <include name="System.Xml.dll" />
36 <include name="../../../bin/XMLRPC.dll" /> 34 <include name="../../../bin/XMLRPC.dll" />
37 </references> 35 </references>
diff --git a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..303dddf
--- /dev/null
+++ b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,60 @@
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// General Information about an assembly is controlled through the following
33// set of attributes. Change these attribute values to modify the information
34// associated with an assembly.
35[assembly: AssemblyTitle("OGS-GridServer")]
36[assembly: AssemblyDescription("")]
37[assembly: AssemblyConfiguration("")]
38[assembly: AssemblyCompany("")]
39[assembly: AssemblyProduct("OGS-GridServer")]
40[assembly: AssemblyCopyright("Copyright © 2007")]
41[assembly: AssemblyTrademark("")]
42[assembly: AssemblyCulture("")]
43
44// Setting ComVisible to false makes the types in this assembly not visible
45// to COM components. If you need to access a type in this assembly from
46// COM, set the ComVisible attribute to true on that type.
47[assembly: ComVisible(false)]
48
49// The following GUID is for the ID of the typelib if this project is exposed to COM
50[assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
51
52// Version information for an assembly consists of the following four values:
53//
54// Major Version
55// Minor Version
56// Build Number
57// Revision
58//
59[assembly: AssemblyVersion("1.0.0.0")]
60[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs
new file mode 100644
index 0000000..9ca9b5e
--- /dev/null
+++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs
@@ -0,0 +1,125 @@
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;
30using System.Collections.Generic;
31using System.Text;
32using OpenGrid.Framework.Data;
33using libsecondlife;
34using System.Reflection;
35
36using System.Xml;
37using Nwc.XmlRpc;
38using OpenSim.Framework.Sims;
39using OpenSim.Framework.Inventory;
40using OpenSim.Framework.Utilities;
41
42using System.Security.Cryptography;
43
44namespace OpenGridServices.InventoryServer
45{
46 class InventoryManager
47 {
48 Dictionary<string, IInventoryData> _plugins = new Dictionary<string, IInventoryData>();
49
50 /// <summary>
51 /// Adds a new inventory server plugin - user servers will be requested in the order they were loaded.
52 /// </summary>
53 /// <param name="FileName">The filename to the inventory server plugin DLL</param>
54 public void AddPlugin(string FileName)
55 {
56 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Attempting to load " + FileName);
57 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
58
59 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
60 foreach (Type pluginType in pluginAssembly.GetTypes())
61 {
62 if (!pluginType.IsAbstract)
63 {
64 Type typeInterface = pluginType.GetInterface("IInventoryData", true);
65
66 if (typeInterface != null)
67 {
68 IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
69 plug.Initialise();
70 this._plugins.Add(plug.getName(), plug);
71 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Added IUserData Interface");
72 }
73
74 typeInterface = null;
75 }
76 }
77
78 pluginAssembly = null;
79 }
80
81 public List<InventoryFolderBase> getRootFolders(LLUUID user)
82 {
83 foreach (KeyValuePair<string, IInventoryData> kvp in _plugins)
84 {
85 try
86 {
87 return kvp.Value.getUserRootFolders(user);
88 }
89 catch (Exception e)
90 {
91 OpenSim.Framework.Console.MainConsole.Instance.Notice("Unable to get root folders via " + kvp.Key + " (" + e.ToString() + ")");
92 }
93 }
94 return null;
95 }
96
97 public XmlRpcResponse XmlRpcInventoryRequest(XmlRpcRequest request)
98 {
99 XmlRpcResponse response = new XmlRpcResponse();
100 Hashtable requestData = (Hashtable)request.Params[0];
101
102 Hashtable responseData = new Hashtable();
103
104 // Stuff happens here
105
106 if (requestData.ContainsKey("Access-type"))
107 {
108 if (requestData["access-type"] == "rootfolders")
109 {
110// responseData["rootfolders"] =
111 }
112 }
113 else
114 {
115 responseData["error"] = "No access-type specified.";
116 }
117
118
119 // Stuff stops happening here
120
121 response.Value = responseData;
122 return response;
123 }
124 }
125}
diff --git a/OpenSim/OpenSim.Region/Scenes/SceneEvents.cs b/OpenSim/Grid/InventoryServer/Main.cs
index 4b39e51..f479a79 100644
--- a/OpenSim/OpenSim.Region/Scenes/SceneEvents.cs
+++ b/OpenSim/Grid/InventoryServer/Main.cs
@@ -26,54 +26,62 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections;
29using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection;
32using System.IO;
30using System.Text; 33using System.Text;
34using libsecondlife;
35using OpenSim.Framework.User;
36using OpenSim.Framework.Sims;
37using OpenSim.Framework.Inventory;
38using OpenSim.Framework.Interfaces;
39using OpenSim.Framework.Console;
40using OpenSim.Servers;
41using OpenSim.Framework.Utilities;
31 42
32namespace OpenSim.Region.Scenes 43namespace OpenGridServices.InventoryServer
33{ 44{
34 /// <summary> 45 public class OpenInventory_Main : BaseServer, conscmd_callback
35 /// A class for triggering remote scene events.
36 /// </summary>
37 public class EventManager
38 { 46 {
39 public delegate void OnFrameDelegate(); 47 ConsoleBase m_console;
40 public event OnFrameDelegate OnFrame; 48 InventoryManager m_inventoryManager;
41 49
42 public delegate void OnNewPresenceDelegate(ScenePresence presence); 50 public static void Main(string[] args)
43 public event OnNewPresenceDelegate OnNewPresence;
44
45 public delegate void OnNewPrimitiveDelegate(Primitive prim);
46 public event OnNewPrimitiveDelegate OnNewPrimitive;
47
48 public delegate void OnRemovePresenceDelegate(libsecondlife.LLUUID uuid);
49 public event OnRemovePresenceDelegate OnRemovePresence;
50
51 public void TriggerOnFrame()
52 { 51 {
53 if (OnFrame != null)
54 {
55 OnFrame();
56 }
57 } 52 }
58 53
59 public void TriggerOnNewPrimitive(Primitive prim) 54 public OpenInventory_Main()
60 { 55 {
61 if (OnNewPrimitive != null) 56 m_console = new ConsoleBase("opengrid-inventory-console.log", "OpenInventory", this, false);
62 OnNewPrimitive(prim); 57 MainConsole.Instance = m_console;
63 } 58 }
64 59
65 public void TriggerOnNewPresence(ScenePresence presence) 60 public void Startup()
66 { 61 {
67 if (OnNewPresence != null) 62 MainConsole.Instance.Notice("Initialising inventory manager...");
68 OnNewPresence(presence); 63 m_inventoryManager = new InventoryManager();
64
65 MainConsole.Instance.Notice("Starting HTTP server");
66 BaseHttpServer httpServer = new BaseHttpServer(8004);
67
68 httpServer.AddXmlRPCHandler("rootfolders", m_inventoryManager.XmlRpcInventoryRequest);
69 //httpServer.AddRestHandler("GET","/rootfolders/",Rest
69 } 70 }
70 71
71 public void TriggerOnRemovePresence(libsecondlife.LLUUID uuid) 72 public void RunCmd(string cmd, string[] cmdparams)
72 { 73 {
73 if (OnRemovePresence != null) 74 switch (cmd)
74 { 75 {
75 OnRemovePresence(uuid); 76 case "shutdown":
77 m_console.Close();
78 Environment.Exit(0);
79 break;
76 } 80 }
77 } 81 }
82
83 public void Show(string ShowWhat)
84 {
85 }
78 } 86 }
79} 87}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager.mds b/OpenSim/Grid/Manager/OpenGridServices.Manager.mds
new file mode 100644
index 0000000..ed7bc24
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager.mds
@@ -0,0 +1,16 @@
1<Combine name="OpenGridServices.Manager" fileversion="2.0" outputpath="../../mono-1.2.3.1/lib/monodevelop/bin" MakePkgConfig="False" MakeLibPC="True">
2 <Configurations active="Debug">
3 <Configuration name="Debug" ctype="CombineConfiguration">
4 <Entry build="True" name="OpenGridServices.Manager" configuration="Debug" />
5 </Configuration>
6 <Configuration name="Release" ctype="CombineConfiguration">
7 <Entry build="True" name="OpenGridServices.Manager" configuration="Release" />
8 </Configuration>
9 </Configurations>
10 <StartMode startupentry="OpenGridServices.Manager" single="True">
11 <Execute type="None" entry="OpenGridServices.Manager" />
12 </StartMode>
13 <Entries>
14 <Entry filename="./OpenGridServices.Manager/OpenGridServices.Manager.mdp" />
15 </Entries>
16</Combine> \ No newline at end of file
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager.userprefs b/OpenSim/Grid/Manager/OpenGridServices.Manager.userprefs
new file mode 100644
index 0000000..f221509
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager.userprefs
@@ -0,0 +1,39 @@
1<?xml version="1.0"?>
2<UserCombinePreferences filename="/home/gareth/OpenGridServices.Manager/OpenGridServices.Manager.mds">
3 <Files>
4 <File filename="Welcome" />
5 <File filename="./OpenGridServices.Manager/MainWindow.cs" />
6 <File filename="./OpenGridServices.Manager/ConnectToGridServerDialog.cs" />
7 <File filename="./OpenGridServices.Manager/Main.cs" />
8 </Files>
9 <Views>
10 <ViewMemento Id="MonoDevelop.Ide.Gui.Pads.ProjectPad">
11 <TreeView>
12 <Node expanded="True">
13 <Node name="OpenGridServices.Manager" expanded="True">
14 <Node name="References" expanded="True" />
15 <Node name="Resources" expanded="True" />
16 <Node name="UserInterface" expanded="True" />
17 <Node name="ConnectToGridServerDialog.cs" expanded="False" selected="True" />
18 </Node>
19 </Node>
20 </TreeView>
21 </ViewMemento>
22 <ViewMemento Id="MonoDevelop.Ide.Gui.Pads.ClassPad">
23 <TreeView>
24 <Node expanded="True" />
25 </TreeView>
26 </ViewMemento>
27 <ViewMemento Id="MonoDevelop.NUnit.TestPad">
28 <TreeView>
29 <Node expanded="False" />
30 </TreeView>
31 </ViewMemento>
32 </Views>
33 <Properties>
34 <Properties>
35 <Property key="ActiveConfiguration" value="Debug" />
36 <Property key="ActiveWindow" value="/home/gareth/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs" />
37 </Properties>
38 </Properties>
39</UserCombinePreferences> \ No newline at end of file
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager.usertasks b/OpenSim/Grid/Manager/OpenGridServices.Manager.usertasks
new file mode 100644
index 0000000..d887d0e
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager.usertasks
@@ -0,0 +1,2 @@
1<?xml version="1.0" encoding="utf-8"?>
2<ArrayOfUserTask xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /> \ No newline at end of file
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/AssemblyInfo.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/AssemblyInfo.cs
new file mode 100644
index 0000000..af4e275
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/AssemblyInfo.cs
@@ -0,0 +1,32 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3
4// Information about this assembly is defined by the following
5// attributes.
6//
7// change them to the information which is associated with the assembly
8// you compile.
9
10[assembly: AssemblyTitle("")]
11[assembly: AssemblyDescription("")]
12[assembly: AssemblyConfiguration("")]
13[assembly: AssemblyCompany("")]
14[assembly: AssemblyProduct("")]
15[assembly: AssemblyCopyright("")]
16[assembly: AssemblyTrademark("")]
17[assembly: AssemblyCulture("")]
18
19// The assembly version has following format :
20//
21// Major.Minor.Build.Revision
22//
23// You can specify all values by your own or you can build default build and revision
24// numbers with the '*' character (the default):
25
26[assembly: AssemblyVersion("1.0.*")]
27
28// The following attributes specify the key for the sign of your assembly. See the
29// .NET Framework documentation for more information about signing.
30// This is not required, if you don't want signing let these attributes like they're.
31[assembly: AssemblyDelaySign(false)]
32[assembly: AssemblyKeyFile("")]
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/BlockingQueue.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/BlockingQueue.cs
new file mode 100644
index 0000000..83685fc
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/BlockingQueue.cs
@@ -0,0 +1,33 @@
1using System;
2using System.Threading;
3using System.Collections.Generic;
4using System.Text;
5
6namespace OpenGridServices.Manager
7{
8 public class BlockingQueue<T>
9 {
10 private Queue<T> _queue = new Queue<T>();
11 private object _queueSync = new object();
12
13 public void Enqueue(T value)
14 {
15 lock (_queueSync)
16 {
17 _queue.Enqueue(value);
18 Monitor.Pulse(_queueSync);
19 }
20 }
21
22 public T Dequeue()
23 {
24 lock (_queueSync)
25 {
26 if (_queue.Count < 1)
27 Monitor.Wait(_queueSync);
28
29 return _queue.Dequeue();
30 }
31 }
32 }
33}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Connect to grid server.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Connect to grid server.cs
new file mode 100644
index 0000000..0d509ef
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Connect to grid server.cs
@@ -0,0 +1,16 @@
1
2using System;
3
4namespace OpenGridServices.Manager
5{
6
7
8 public partial class Connect to grid server : Gtk.Dialog
9 {
10
11 public Connect to grid server()
12 {
13 this.Build();
14 }
15 }
16}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
new file mode 100644
index 0000000..8a80b1d
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
@@ -0,0 +1,29 @@
1using Gtk;
2using System;
3
4namespace OpenGridServices.Manager {
5 public partial class ConnectToGridServerDialog : Gtk.Dialog
6 {
7
8 public ConnectToGridServerDialog()
9 {
10 this.Build();
11 }
12
13 protected virtual void OnResponse(object o, Gtk.ResponseArgs args)
14 {
15 switch(args.ResponseId) {
16 case Gtk.ResponseType.Ok:
17 MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text);
18 break;
19
20 case Gtk.ResponseType.Cancel:
21 break;
22 }
23 this.Hide();
24
25 }
26
27 }
28
29} \ No newline at end of file
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
new file mode 100644
index 0000000..6b632d6
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
@@ -0,0 +1,106 @@
1using Nwc.XmlRpc;
2using System;
3using System.Net;
4using System.IO;
5using System.Xml;
6using System.Collections;
7using System.Collections.Generic;
8using libsecondlife;
9
10namespace OpenGridServices.Manager
11{
12 public class GridServerConnectionManager
13 {
14 private string ServerURL;
15 public LLUUID SessionID;
16 public bool connected=false;
17
18 public RegionBlock[][] WorldMap;
19
20 public bool Connect(string GridServerURL, string username, string password)
21 {
22 try {
23 this.ServerURL=GridServerURL;
24 Hashtable LoginParamsHT = new Hashtable();
25 LoginParamsHT["username"]=username;
26 LoginParamsHT["password"]=password;
27 ArrayList LoginParams = new ArrayList();
28 LoginParams.Add(LoginParamsHT);
29 XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams);
30 XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000);
31 if(GridResp.IsFault) {
32 connected=false;
33 return false;
34 } else {
35 Hashtable gridrespData = (Hashtable)GridResp.Value;
36 this.SessionID = new LLUUID((string)gridrespData["session_id"]);
37 connected=true;
38 return true;
39 }
40 } catch(Exception e) {
41 Console.WriteLine(e.ToString());
42 connected=false;
43 return false;
44 }
45 }
46
47 public void DownloadMap()
48 {
49 System.Net.WebClient mapdownloader = new WebClient();
50 Stream regionliststream = mapdownloader.OpenRead(ServerURL + "/regionlist");
51
52 RegionBlock TempRegionData;
53
54 XmlDocument doc = new XmlDocument();
55 doc.Load(regionliststream);
56 regionliststream.Close();
57 XmlNode rootnode = doc.FirstChild;
58 if (rootnode.Name != "regions")
59 {
60 // TODO - ERROR!
61 }
62
63 for(int i=0; i<=rootnode.ChildNodes.Count; i++)
64 {
65 if(rootnode.ChildNodes.Item(i).Name != "region") {
66 // TODO - ERROR!
67 } else {
68 TempRegionData = new RegionBlock();
69
70
71 }
72 }
73 }
74
75 public bool RestartServer()
76 {
77 return true;
78 }
79
80 public bool ShutdownServer()
81 {
82 try {
83 Hashtable ShutdownParamsHT = new Hashtable();
84 ArrayList ShutdownParams = new ArrayList();
85 ShutdownParamsHT["session_id"]=this.SessionID.ToString();
86 ShutdownParams.Add(ShutdownParamsHT);
87 XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams);
88 XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL,3000);
89 if(GridResp.IsFault) {
90 return false;
91 } else {
92 connected=false;
93 return true;
94 }
95 } catch(Exception e) {
96 Console.WriteLine(e.ToString());
97 return false;
98 }
99 }
100
101 public void DisconnectServer()
102 {
103 this.connected=false;
104 }
105 }
106}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs
new file mode 100644
index 0000000..42e09e0
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Main.cs
@@ -0,0 +1,96 @@
1// project created on 5/14/2007 at 2:04 PM
2using System;
3using System.Threading;
4using Gtk;
5
6namespace OpenGridServices.Manager
7{
8 class MainClass
9 {
10
11 public static bool QuitReq=false;
12 public static BlockingQueue<string> PendingOperations = new BlockingQueue<string>();
13
14 private static Thread OperationsRunner;
15
16 private static GridServerConnectionManager gridserverConn;
17
18 private static MainWindow win;
19
20 public static void DoMainLoop()
21 {
22 while(!QuitReq)
23 {
24 Application.RunIteration();
25 }
26 }
27
28 public static void RunOperations()
29 {
30 string operation;
31 string cmd;
32 char[] sep = new char[1];
33 sep[0]=' ';
34 while(!QuitReq)
35 {
36 operation=PendingOperations.Dequeue();
37 Console.WriteLine(operation);
38 cmd = operation.Split(sep)[0];
39 switch(cmd) {
40 case "connect_to_gridserver":
41 win.SetStatus("Connecting to grid server...");
42 if(gridserverConn.Connect(operation.Split(sep)[1],operation.Split(sep)[2],operation.Split(sep)[3])) {
43 win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID);
44 win.SetGridServerConnected(true);
45 Thread.Sleep(3000);
46 win.SetStatus("Downloading region maps...");
47 gridserverConn.DownloadMap();
48 } else {
49 win.SetStatus("Could not connect");
50 }
51 break;
52
53 case "restart_gridserver":
54 win.SetStatus("Restarting grid server...");
55 if(gridserverConn.RestartServer()) {
56 win.SetStatus("Restarted server OK");
57 Thread.Sleep(3000);
58 win.SetStatus("");
59 } else {
60 win.SetStatus("Error restarting grid server!!!");
61 }
62 break;
63
64 case "shutdown_gridserver":
65 win.SetStatus("Shutting down grid server...");
66 if(gridserverConn.ShutdownServer()) {
67 win.SetStatus("Grid server shutdown");
68 win.SetGridServerConnected(false);
69 Thread.Sleep(3000);
70 win.SetStatus("");
71 } else {
72 win.SetStatus("Could not shutdown grid server!!!");
73 }
74 break;
75
76 case "disconnect_gridserver":
77 gridserverConn.DisconnectServer();
78 win.SetGridServerConnected(false);
79 break;
80 }
81 }
82 }
83
84 public static void Main (string[] args)
85 {
86 gridserverConn = new GridServerConnectionManager();
87 Application.Init ();
88 win = new MainWindow ();
89 win.Show ();
90 OperationsRunner = new Thread(new ThreadStart(RunOperations));
91 OperationsRunner.IsBackground=true;
92 OperationsRunner.Start();
93 DoMainLoop();
94 }
95 }
96} \ No newline at end of file
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/MainWindow.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/MainWindow.cs
new file mode 100644
index 0000000..1db38f0
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/MainWindow.cs
@@ -0,0 +1,76 @@
1using System;
2using Gtk;
3
4namespace OpenGridServices.Manager {
5 public partial class MainWindow: Gtk.Window
6 {
7 public MainWindow (): base (Gtk.WindowType.Toplevel)
8 {
9 Build ();
10 }
11
12 public void SetStatus(string statustext)
13 {
14 this.statusbar1.Pop(0);
15 this.statusbar1.Push(0,statustext);
16 }
17
18 public void DrawGrid(RegionBlock[][] regions)
19 {
20 for(int x=0; x<=regions.GetUpperBound(0); x++) {
21 for(int y=0; y<=regions.GetUpperBound(1); y++) {
22 Gdk.Image themap = new Gdk.Image(Gdk.ImageType.Fastest,Gdk.Visual.System,256,256);
23 this.drawingarea1.GdkWindow.DrawImage(new Gdk.GC(this.drawingarea1.GdkWindow),themap,0,0,x*256,y*256,256,256);
24 }
25 }
26 }
27
28 public void SetGridServerConnected(bool connected)
29 {
30 if(connected) {
31 this.ConnectToGridserver.Visible=false;
32 this.DisconnectFromGridServer.Visible=true;
33 } else {
34 this.ConnectToGridserver.Visible=true;
35 this.DisconnectFromGridServer.Visible=false;
36 }
37 }
38
39 protected void OnDeleteEvent (object sender, DeleteEventArgs a)
40 {
41 Application.Quit ();
42 MainClass.QuitReq=true;
43 a.RetVal = true;
44 }
45
46 protected virtual void QuitMenu(object sender, System.EventArgs e)
47 {
48 MainClass.QuitReq=true;
49 Application.Quit();
50 }
51
52 protected virtual void ConnectToGridServerMenu(object sender, System.EventArgs e)
53 {
54 ConnectToGridServerDialog griddialog = new ConnectToGridServerDialog ();
55 griddialog.Show();
56 }
57
58 protected virtual void RestartGridserverMenu(object sender, System.EventArgs e)
59 {
60 MainClass.PendingOperations.Enqueue("restart_gridserver");
61 }
62
63 protected virtual void ShutdownGridserverMenu(object sender, System.EventArgs e)
64 {
65 MainClass.PendingOperations.Enqueue("shutdown_gridserver");
66 }
67
68 protected virtual void DisconnectGridServerMenu(object sender, System.EventArgs e)
69 {
70 MainClass.PendingOperations.Enqueue("disconnect_gridserver");
71 }
72
73 }
74}
75
76 \ No newline at end of file
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp b/OpenSim/Grid/Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp
new file mode 100644
index 0000000..cfdc085
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp
@@ -0,0 +1,43 @@
1<Project name="OpenGridServices.Manager" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
2 <Configurations active="Debug">
3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
4 <Output directory="./bin/Debug" assembly="OpenGridServices.Manager" />
5 <Build debugmode="True" target="Exe" />
6 <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
8 </Configuration>
9 <Configuration name="Release" ctype="DotNetProjectConfiguration">
10 <Output directory="./bin/Release" assembly="OpenGridServices.Manager" />
11 <Build debugmode="False" target="Exe" />
12 <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
14 </Configuration>
15 </Configurations>
16 <Contents>
17 <File name="./gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" />
18 <File name="./gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
19 <File name="./MainWindow.cs" subtype="Code" buildaction="Compile" />
20 <File name="./Main.cs" subtype="Code" buildaction="Compile" />
21 <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
22 <File name="./ConnectToGridServerDialog.cs" subtype="Code" buildaction="Compile" />
23 <File name="./Util.cs" subtype="Code" buildaction="Compile" />
24 <File name="./gtk-gui/OpenGridServices.Manager.MainWindow.cs" subtype="Code" buildaction="Compile" />
25 <File name="./BlockingQueue.cs" subtype="Code" buildaction="Compile" />
26 <File name="./gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs" subtype="Code" buildaction="Compile" />
27 <File name="./GridServerConnectionManager.cs" subtype="Code" buildaction="Compile" />
28 <File name="./RegionBlock.cs" subtype="Code" buildaction="Compile" />
29 </Contents>
30 <References>
31 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
32 <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
33 <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
34 <ProjectReference type="Gac" localcopy="True" refto="glade-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
35 <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
36 <ProjectReference type="Assembly" localcopy="True" refto="../../bin/libsecondlife.dll" />
37 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
38 <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
39 <ProjectReference type="Assembly" localcopy="True" refto="../../bin/XMLRPC.dll" />
40 <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
41 </References>
42 <GtkDesignInfo partialTypes="True" />
43</Project> \ No newline at end of file
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb b/OpenSim/Grid/Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb
new file mode 100644
index 0000000..44e7a61
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb
Binary files differ
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/RegionBlock.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/RegionBlock.cs
new file mode 100644
index 0000000..00f7c65
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/RegionBlock.cs
@@ -0,0 +1,37 @@
1using System;
2using System.Xml;
3using libsecondlife;
4using OpenSim.Framework.Utilities;
5
6namespace OpenGridServices.Manager
7{
8
9
10 public class RegionBlock
11 {
12 public uint regloc_x;
13 public uint regloc_y;
14
15 public string httpd_url;
16
17 public string region_name;
18
19 public ulong regionhandle {
20 get { return Util.UIntsToLong(regloc_x*256,regloc_y*256); }
21 }
22
23 public Gdk.Pixbuf MiniMap;
24
25 public RegionBlock()
26 {
27 }
28
29 public void LoadFromXmlNode(XmlNode sourcenode)
30 {
31 this.regloc_x=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_x").Value);
32 this.regloc_y=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_y").Value);
33 this.region_name=sourcenode.Attributes.GetNamedItem("region_name").Value;
34 this.httpd_url=sourcenode.Attributes.GetNamedItem("httpd_url").Value;
35 }
36 }
37}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs
new file mode 100644
index 0000000..5bf7ff9
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/Util.cs
@@ -0,0 +1,133 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using libsecondlife.Packets;
6
7namespace OpenSim.Framework.Utilities
8{
9 public class Util
10 {
11 private static Random randomClass = new Random();
12 private static uint nextXferID = 5000;
13 private static object XferLock = new object();
14
15 public static ulong UIntsToLong(uint X, uint Y)
16 {
17 return Helpers.UIntsToLong(X, Y);
18 }
19
20 public static Random RandomClass
21 {
22 get
23 {
24 return randomClass;
25 }
26 }
27
28 public static uint GetNextXferID()
29 {
30 uint id = 0;
31 lock(XferLock)
32 {
33 id = nextXferID;
34 nextXferID++;
35 }
36 return id;
37 }
38
39 //public static int fast_distance2d(int x, int y)
40 //{
41 // x = System.Math.Abs(x);
42 // y = System.Math.Abs(y);
43
44 // int min = System.Math.Min(x, y);
45
46 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4));
47 //}
48
49 public static string FieldToString(byte[] bytes)
50 {
51 return FieldToString(bytes, String.Empty);
52 }
53
54 /// <summary>
55 /// Convert a variable length field (byte array) to a string, with a
56 /// field name prepended to each line of the output
57 /// </summary>
58 /// <remarks>If the byte array has unprintable characters in it, a
59 /// hex dump will be put in the string instead</remarks>
60 /// <param name="bytes">The byte array to convert to a string</param>
61 /// <param name="fieldName">A field name to prepend to each line of output</param>
62 /// <returns>An ASCII string or a string containing a hex dump, minus
63 /// the null terminator</returns>
64 public static string FieldToString(byte[] bytes, string fieldName)
65 {
66 // Check for a common case
67 if (bytes.Length == 0) return String.Empty;
68
69 StringBuilder output = new StringBuilder();
70 bool printable = true;
71
72 for (int i = 0; i < bytes.Length; ++i)
73 {
74 // Check if there are any unprintable characters in the array
75 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09
76 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00)
77 {
78 printable = false;
79 break;
80 }
81 }
82
83 if (printable)
84 {
85 if (fieldName.Length > 0)
86 {
87 output.Append(fieldName);
88 output.Append(": ");
89 }
90
91 if (bytes[bytes.Length - 1] == 0x00)
92 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1));
93 else
94 output.Append(UTF8Encoding.UTF8.GetString(bytes));
95 }
96 else
97 {
98 for (int i = 0; i < bytes.Length; i += 16)
99 {
100 if (i != 0)
101 output.Append(Environment.NewLine);
102 if (fieldName.Length > 0)
103 {
104 output.Append(fieldName);
105 output.Append(": ");
106 }
107
108 for (int j = 0; j < 16; j++)
109 {
110 if ((i + j) < bytes.Length)
111 output.Append(String.Format("{0:X2} ", bytes[i + j]));
112 else
113 output.Append(" ");
114 }
115
116 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++)
117 {
118 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E)
119 output.Append((char)bytes[i + j]);
120 else
121 output.Append(".");
122 }
123 }
124 }
125
126 return output.ToString();
127 }
128 public Util()
129 {
130
131 }
132 }
133}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
new file mode 100644
index 0000000..da6739e
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
@@ -0,0 +1,226 @@
1// ------------------------------------------------------------------------------
2// <autogenerated>
3// This code was generated by a tool.
4// Mono Runtime Version: 2.0.50727.42
5//
6// Changes to this file may cause incorrect behavior and will be lost if
7// the code is regenerated.
8// </autogenerated>
9// ------------------------------------------------------------------------------
10
11namespace OpenGridServices.Manager {
12
13
14 public partial class ConnectToGridServerDialog {
15
16 private Gtk.VBox vbox2;
17
18 private Gtk.VBox vbox3;
19
20 private Gtk.HBox hbox1;
21
22 private Gtk.Label label1;
23
24 private Gtk.Entry entry1;
25
26 private Gtk.HBox hbox2;
27
28 private Gtk.Label label2;
29
30 private Gtk.Entry entry2;
31
32 private Gtk.HBox hbox3;
33
34 private Gtk.Label label3;
35
36 private Gtk.Entry entry3;
37
38 private Gtk.Button button2;
39
40 private Gtk.Button button8;
41
42 protected virtual void Build() {
43 Stetic.Gui.Initialize();
44 // Widget OpenGridServices.Manager.ConnectToGridServerDialog
45 this.Events = ((Gdk.EventMask)(256));
46 this.Name = "OpenGridServices.Manager.ConnectToGridServerDialog";
47 this.Title = Mono.Unix.Catalog.GetString("Connect to Grid server");
48 this.WindowPosition = ((Gtk.WindowPosition)(4));
49 this.HasSeparator = false;
50 // Internal child OpenGridServices.Manager.ConnectToGridServerDialog.VBox
51 Gtk.VBox w1 = this.VBox;
52 w1.Events = ((Gdk.EventMask)(256));
53 w1.Name = "dialog_VBox";
54 w1.BorderWidth = ((uint)(2));
55 // Container child dialog_VBox.Gtk.Box+BoxChild
56 this.vbox2 = new Gtk.VBox();
57 this.vbox2.Name = "vbox2";
58 // Container child vbox2.Gtk.Box+BoxChild
59 this.vbox3 = new Gtk.VBox();
60 this.vbox3.Name = "vbox3";
61 // Container child vbox3.Gtk.Box+BoxChild
62 this.hbox1 = new Gtk.HBox();
63 this.hbox1.Name = "hbox1";
64 // Container child hbox1.Gtk.Box+BoxChild
65 this.label1 = new Gtk.Label();
66 this.label1.Name = "label1";
67 this.label1.Xalign = 1F;
68 this.label1.LabelProp = Mono.Unix.Catalog.GetString("Grid server URL: ");
69 this.label1.Justify = ((Gtk.Justification)(1));
70 this.hbox1.Add(this.label1);
71 Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
72 w2.Position = 0;
73 // Container child hbox1.Gtk.Box+BoxChild
74 this.entry1 = new Gtk.Entry();
75 this.entry1.CanFocus = true;
76 this.entry1.Name = "entry1";
77 this.entry1.Text = Mono.Unix.Catalog.GetString("http://gridserver:8001");
78 this.entry1.IsEditable = true;
79 this.entry1.MaxLength = 255;
80 this.entry1.InvisibleChar = '•';
81 this.hbox1.Add(this.entry1);
82 Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.entry1]));
83 w3.Position = 1;
84 this.vbox3.Add(this.hbox1);
85 Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox1]));
86 w4.Position = 0;
87 w4.Expand = false;
88 w4.Fill = false;
89 // Container child vbox3.Gtk.Box+BoxChild
90 this.hbox2 = new Gtk.HBox();
91 this.hbox2.Name = "hbox2";
92 // Container child hbox2.Gtk.Box+BoxChild
93 this.label2 = new Gtk.Label();
94 this.label2.Name = "label2";
95 this.label2.Xalign = 1F;
96 this.label2.LabelProp = Mono.Unix.Catalog.GetString("Username:");
97 this.label2.Justify = ((Gtk.Justification)(1));
98 this.hbox2.Add(this.label2);
99 Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox2[this.label2]));
100 w5.Position = 0;
101 // Container child hbox2.Gtk.Box+BoxChild
102 this.entry2 = new Gtk.Entry();
103 this.entry2.CanFocus = true;
104 this.entry2.Name = "entry2";
105 this.entry2.IsEditable = true;
106 this.entry2.InvisibleChar = '•';
107 this.hbox2.Add(this.entry2);
108 Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox2[this.entry2]));
109 w6.Position = 1;
110 this.vbox3.Add(this.hbox2);
111 Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox2]));
112 w7.Position = 1;
113 w7.Expand = false;
114 w7.Fill = false;
115 // Container child vbox3.Gtk.Box+BoxChild
116 this.hbox3 = new Gtk.HBox();
117 this.hbox3.Name = "hbox3";
118 // Container child hbox3.Gtk.Box+BoxChild
119 this.label3 = new Gtk.Label();
120 this.label3.Name = "label3";
121 this.label3.Xalign = 1F;
122 this.label3.LabelProp = Mono.Unix.Catalog.GetString("Password:");
123 this.label3.Justify = ((Gtk.Justification)(1));
124 this.hbox3.Add(this.label3);
125 Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox3[this.label3]));
126 w8.Position = 0;
127 // Container child hbox3.Gtk.Box+BoxChild
128 this.entry3 = new Gtk.Entry();
129 this.entry3.CanFocus = true;
130 this.entry3.Name = "entry3";
131 this.entry3.IsEditable = true;
132 this.entry3.InvisibleChar = '•';
133 this.hbox3.Add(this.entry3);
134 Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox3[this.entry3]));
135 w9.Position = 1;
136 this.vbox3.Add(this.hbox3);
137 Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox3]));
138 w10.Position = 2;
139 w10.Expand = false;
140 w10.Fill = false;
141 this.vbox2.Add(this.vbox3);
142 Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox2[this.vbox3]));
143 w11.Position = 2;
144 w11.Expand = false;
145 w11.Fill = false;
146 w1.Add(this.vbox2);
147 Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
148 w12.Position = 0;
149 // Internal child OpenGridServices.Manager.ConnectToGridServerDialog.ActionArea
150 Gtk.HButtonBox w13 = this.ActionArea;
151 w13.Events = ((Gdk.EventMask)(256));
152 w13.Name = "OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea";
153 w13.Spacing = 6;
154 w13.BorderWidth = ((uint)(5));
155 w13.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
156 // Container child OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
157 this.button2 = new Gtk.Button();
158 this.button2.CanDefault = true;
159 this.button2.CanFocus = true;
160 this.button2.Name = "button2";
161 this.button2.UseUnderline = true;
162 // Container child button2.Gtk.Container+ContainerChild
163 Gtk.Alignment w14 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
164 w14.Name = "GtkAlignment";
165 // Container child GtkAlignment.Gtk.Container+ContainerChild
166 Gtk.HBox w15 = new Gtk.HBox();
167 w15.Name = "GtkHBox";
168 w15.Spacing = 2;
169 // Container child GtkHBox.Gtk.Container+ContainerChild
170 Gtk.Image w16 = new Gtk.Image();
171 w16.Name = "image1";
172 w16.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-apply", 16, 0);
173 w15.Add(w16);
174 // Container child GtkHBox.Gtk.Container+ContainerChild
175 Gtk.Label w18 = new Gtk.Label();
176 w18.Name = "GtkLabel";
177 w18.LabelProp = Mono.Unix.Catalog.GetString("Connect");
178 w18.UseUnderline = true;
179 w15.Add(w18);
180 w14.Add(w15);
181 this.button2.Add(w14);
182 this.AddActionWidget(this.button2, -5);
183 Gtk.ButtonBox.ButtonBoxChild w22 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.button2]));
184 w22.Expand = false;
185 w22.Fill = false;
186 // Container child OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
187 this.button8 = new Gtk.Button();
188 this.button8.CanDefault = true;
189 this.button8.CanFocus = true;
190 this.button8.Name = "button8";
191 this.button8.UseUnderline = true;
192 // Container child button8.Gtk.Container+ContainerChild
193 Gtk.Alignment w23 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
194 w23.Name = "GtkAlignment1";
195 // Container child GtkAlignment1.Gtk.Container+ContainerChild
196 Gtk.HBox w24 = new Gtk.HBox();
197 w24.Name = "GtkHBox1";
198 w24.Spacing = 2;
199 // Container child GtkHBox1.Gtk.Container+ContainerChild
200 Gtk.Image w25 = new Gtk.Image();
201 w25.Name = "image2";
202 w25.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-cancel", 16, 0);
203 w24.Add(w25);
204 // Container child GtkHBox1.Gtk.Container+ContainerChild
205 Gtk.Label w27 = new Gtk.Label();
206 w27.Name = "GtkLabel1";
207 w27.LabelProp = Mono.Unix.Catalog.GetString("Cancel");
208 w27.UseUnderline = true;
209 w24.Add(w27);
210 w23.Add(w24);
211 this.button8.Add(w23);
212 this.AddActionWidget(this.button8, -6);
213 Gtk.ButtonBox.ButtonBoxChild w31 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.button8]));
214 w31.Position = 1;
215 w31.Expand = false;
216 w31.Fill = false;
217 if ((this.Child != null)) {
218 this.Child.ShowAll();
219 }
220 this.DefaultWidth = 476;
221 this.DefaultHeight = 137;
222 this.Show();
223 this.Response += new Gtk.ResponseHandler(this.OnResponse);
224 }
225 }
226}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
new file mode 100644
index 0000000..8798dac
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
@@ -0,0 +1,256 @@
1// ------------------------------------------------------------------------------
2// <autogenerated>
3// This code was generated by a tool.
4// Mono Runtime Version: 2.0.50727.42
5//
6// Changes to this file may cause incorrect behavior and will be lost if
7// the code is regenerated.
8// </autogenerated>
9// ------------------------------------------------------------------------------
10
11namespace OpenGridServices.Manager {
12
13
14 public partial class MainWindow {
15
16 private Gtk.Action Grid;
17
18 private Gtk.Action User;
19
20 private Gtk.Action Asset;
21
22 private Gtk.Action Region;
23
24 private Gtk.Action Services;
25
26 private Gtk.Action ConnectToGridserver;
27
28 private Gtk.Action RestartWholeGrid;
29
30 private Gtk.Action ShutdownWholeGrid;
31
32 private Gtk.Action ExitGridManager;
33
34 private Gtk.Action ConnectToUserserver;
35
36 private Gtk.Action AccountManagment;
37
38 private Gtk.Action GlobalNotice;
39
40 private Gtk.Action DisableAllLogins;
41
42 private Gtk.Action DisableNonGodUsersOnly;
43
44 private Gtk.Action ShutdownUserServer;
45
46 private Gtk.Action ShutdownGridserverOnly;
47
48 private Gtk.Action RestartGridserverOnly;
49
50 private Gtk.Action DefaultLocalGridUserserver;
51
52 private Gtk.Action CustomUserserver;
53
54 private Gtk.Action RemoteGridDefaultUserserver;
55
56 private Gtk.Action DisconnectFromGridServer;
57
58 private Gtk.Action UploadAsset;
59
60 private Gtk.Action AssetManagement;
61
62 private Gtk.Action ConnectToAssetServer;
63
64 private Gtk.Action ConnectToDefaultAssetServerForGrid;
65
66 private Gtk.Action DefaultForLocalGrid;
67
68 private Gtk.Action DefaultForRemoteGrid;
69
70 private Gtk.Action CustomAssetServer;
71
72 private Gtk.VBox vbox1;
73
74 private Gtk.MenuBar menubar2;
75
76 private Gtk.HBox hbox1;
77
78 private Gtk.ScrolledWindow scrolledwindow1;
79
80 private Gtk.DrawingArea drawingarea1;
81
82 private Gtk.TreeView treeview1;
83
84 private Gtk.Statusbar statusbar1;
85
86 protected virtual void Build() {
87 Stetic.Gui.Initialize();
88 // Widget OpenGridServices.Manager.MainWindow
89 Gtk.UIManager w1 = new Gtk.UIManager();
90 Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
91 this.Grid = new Gtk.Action("Grid", Mono.Unix.Catalog.GetString("Grid"), null, null);
92 this.Grid.HideIfEmpty = false;
93 this.Grid.ShortLabel = Mono.Unix.Catalog.GetString("Grid");
94 w2.Add(this.Grid, "<Alt><Mod2>g");
95 this.User = new Gtk.Action("User", Mono.Unix.Catalog.GetString("User"), null, null);
96 this.User.HideIfEmpty = false;
97 this.User.ShortLabel = Mono.Unix.Catalog.GetString("User");
98 w2.Add(this.User, null);
99 this.Asset = new Gtk.Action("Asset", Mono.Unix.Catalog.GetString("Asset"), null, null);
100 this.Asset.HideIfEmpty = false;
101 this.Asset.ShortLabel = Mono.Unix.Catalog.GetString("Asset");
102 w2.Add(this.Asset, null);
103 this.Region = new Gtk.Action("Region", Mono.Unix.Catalog.GetString("Region"), null, null);
104 this.Region.ShortLabel = Mono.Unix.Catalog.GetString("Region");
105 w2.Add(this.Region, null);
106 this.Services = new Gtk.Action("Services", Mono.Unix.Catalog.GetString("Services"), null, null);
107 this.Services.ShortLabel = Mono.Unix.Catalog.GetString("Services");
108 w2.Add(this.Services, null);
109 this.ConnectToGridserver = new Gtk.Action("ConnectToGridserver", Mono.Unix.Catalog.GetString("Connect to gridserver..."), null, "gtk-connect");
110 this.ConnectToGridserver.HideIfEmpty = false;
111 this.ConnectToGridserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to gridserver");
112 w2.Add(this.ConnectToGridserver, null);
113 this.RestartWholeGrid = new Gtk.Action("RestartWholeGrid", Mono.Unix.Catalog.GetString("Restart whole grid"), null, "gtk-refresh");
114 this.RestartWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Restart whole grid");
115 w2.Add(this.RestartWholeGrid, null);
116 this.ShutdownWholeGrid = new Gtk.Action("ShutdownWholeGrid", Mono.Unix.Catalog.GetString("Shutdown whole grid"), null, "gtk-stop");
117 this.ShutdownWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown whole grid");
118 w2.Add(this.ShutdownWholeGrid, null);
119 this.ExitGridManager = new Gtk.Action("ExitGridManager", Mono.Unix.Catalog.GetString("Exit grid manager"), null, "gtk-close");
120 this.ExitGridManager.ShortLabel = Mono.Unix.Catalog.GetString("Exit grid manager");
121 w2.Add(this.ExitGridManager, null);
122 this.ConnectToUserserver = new Gtk.Action("ConnectToUserserver", Mono.Unix.Catalog.GetString("Connect to userserver"), null, "gtk-connect");
123 this.ConnectToUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to userserver");
124 w2.Add(this.ConnectToUserserver, null);
125 this.AccountManagment = new Gtk.Action("AccountManagment", Mono.Unix.Catalog.GetString("Account managment"), null, "gtk-properties");
126 this.AccountManagment.ShortLabel = Mono.Unix.Catalog.GetString("Account managment");
127 w2.Add(this.AccountManagment, null);
128 this.GlobalNotice = new Gtk.Action("GlobalNotice", Mono.Unix.Catalog.GetString("Global notice"), null, "gtk-network");
129 this.GlobalNotice.ShortLabel = Mono.Unix.Catalog.GetString("Global notice");
130 w2.Add(this.GlobalNotice, null);
131 this.DisableAllLogins = new Gtk.Action("DisableAllLogins", Mono.Unix.Catalog.GetString("Disable all logins"), null, "gtk-no");
132 this.DisableAllLogins.ShortLabel = Mono.Unix.Catalog.GetString("Disable all logins");
133 w2.Add(this.DisableAllLogins, null);
134 this.DisableNonGodUsersOnly = new Gtk.Action("DisableNonGodUsersOnly", Mono.Unix.Catalog.GetString("Disable non-god users only"), null, "gtk-no");
135 this.DisableNonGodUsersOnly.ShortLabel = Mono.Unix.Catalog.GetString("Disable non-god users only");
136 w2.Add(this.DisableNonGodUsersOnly, null);
137 this.ShutdownUserServer = new Gtk.Action("ShutdownUserServer", Mono.Unix.Catalog.GetString("Shutdown user server"), null, "gtk-stop");
138 this.ShutdownUserServer.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown user server");
139 w2.Add(this.ShutdownUserServer, null);
140 this.ShutdownGridserverOnly = new Gtk.Action("ShutdownGridserverOnly", Mono.Unix.Catalog.GetString("Shutdown gridserver only"), null, "gtk-stop");
141 this.ShutdownGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown gridserver only");
142 w2.Add(this.ShutdownGridserverOnly, null);
143 this.RestartGridserverOnly = new Gtk.Action("RestartGridserverOnly", Mono.Unix.Catalog.GetString("Restart gridserver only"), null, "gtk-refresh");
144 this.RestartGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Restart gridserver only");
145 w2.Add(this.RestartGridserverOnly, null);
146 this.DefaultLocalGridUserserver = new Gtk.Action("DefaultLocalGridUserserver", Mono.Unix.Catalog.GetString("Default local grid userserver"), null, null);
147 this.DefaultLocalGridUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Default local grid userserver");
148 w2.Add(this.DefaultLocalGridUserserver, null);
149 this.CustomUserserver = new Gtk.Action("CustomUserserver", Mono.Unix.Catalog.GetString("Custom userserver..."), null, null);
150 this.CustomUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Custom userserver");
151 w2.Add(this.CustomUserserver, null);
152 this.RemoteGridDefaultUserserver = new Gtk.Action("RemoteGridDefaultUserserver", Mono.Unix.Catalog.GetString("Remote grid default userserver..."), null, null);
153 this.RemoteGridDefaultUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Remote grid default userserver");
154 w2.Add(this.RemoteGridDefaultUserserver, null);
155 this.DisconnectFromGridServer = new Gtk.Action("DisconnectFromGridServer", Mono.Unix.Catalog.GetString("Disconnect from grid server"), null, "gtk-disconnect");
156 this.DisconnectFromGridServer.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect from grid server");
157 this.DisconnectFromGridServer.Visible = false;
158 w2.Add(this.DisconnectFromGridServer, null);
159 this.UploadAsset = new Gtk.Action("UploadAsset", Mono.Unix.Catalog.GetString("Upload asset"), null, null);
160 this.UploadAsset.ShortLabel = Mono.Unix.Catalog.GetString("Upload asset");
161 w2.Add(this.UploadAsset, null);
162 this.AssetManagement = new Gtk.Action("AssetManagement", Mono.Unix.Catalog.GetString("Asset management"), null, null);
163 this.AssetManagement.ShortLabel = Mono.Unix.Catalog.GetString("Asset management");
164 w2.Add(this.AssetManagement, null);
165 this.ConnectToAssetServer = new Gtk.Action("ConnectToAssetServer", Mono.Unix.Catalog.GetString("Connect to asset server"), null, null);
166 this.ConnectToAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Connect to asset server");
167 w2.Add(this.ConnectToAssetServer, null);
168 this.ConnectToDefaultAssetServerForGrid = new Gtk.Action("ConnectToDefaultAssetServerForGrid", Mono.Unix.Catalog.GetString("Connect to default asset server for grid"), null, null);
169 this.ConnectToDefaultAssetServerForGrid.ShortLabel = Mono.Unix.Catalog.GetString("Connect to default asset server for grid");
170 w2.Add(this.ConnectToDefaultAssetServerForGrid, null);
171 this.DefaultForLocalGrid = new Gtk.Action("DefaultForLocalGrid", Mono.Unix.Catalog.GetString("Default for local grid"), null, null);
172 this.DefaultForLocalGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for local grid");
173 w2.Add(this.DefaultForLocalGrid, null);
174 this.DefaultForRemoteGrid = new Gtk.Action("DefaultForRemoteGrid", Mono.Unix.Catalog.GetString("Default for remote grid..."), null, null);
175 this.DefaultForRemoteGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for remote grid...");
176 w2.Add(this.DefaultForRemoteGrid, null);
177 this.CustomAssetServer = new Gtk.Action("CustomAssetServer", Mono.Unix.Catalog.GetString("Custom asset server..."), null, null);
178 this.CustomAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Custom asset server...");
179 w2.Add(this.CustomAssetServer, null);
180 w1.InsertActionGroup(w2, 0);
181 this.AddAccelGroup(w1.AccelGroup);
182 this.WidthRequest = 800;
183 this.HeightRequest = 600;
184 this.Name = "OpenGridServices.Manager.MainWindow";
185 this.Title = Mono.Unix.Catalog.GetString("Open Grid Services Manager");
186 this.Icon = Gtk.IconTheme.Default.LoadIcon("gtk-network", 48, 0);
187 // Container child OpenGridServices.Manager.MainWindow.Gtk.Container+ContainerChild
188 this.vbox1 = new Gtk.VBox();
189 this.vbox1.Name = "vbox1";
190 // Container child vbox1.Gtk.Box+BoxChild
191 w1.AddUiFromString("<ui><menubar name='menubar2'><menu action='Grid'><menuitem action='ConnectToGridserver'/><menuitem action='DisconnectFromGridServer'/><separator/><menuitem action='RestartWholeGrid'/><menuitem action='RestartGridserverOnly'/><separator/><menuitem action='ShutdownWholeGrid'/><menuitem action='ShutdownGridserverOnly'/><separator/><menuitem action='ExitGridManager'/></menu><menu action='User'><menu action='ConnectToUserserver'><menuitem action='DefaultLocalGridUserserver'/><menuitem action='CustomUserserver'/><menuitem action='RemoteGridDefaultUserserver'/></menu><separator/><menuitem action='AccountManagment'/><menuitem action='GlobalNotice'/><separator/><menuitem action='DisableAllLogins'/><menuitem action='DisableNonGodUsersOnly'/><separator/><menuitem action='ShutdownUserServer'/></menu><menu action='Asset'><menuitem action='UploadAsset'/><menuitem action='AssetManagement'/><menu action='ConnectToAssetServer'><menuitem action='DefaultForLocalGrid'/><menuitem action='DefaultForRemoteGrid'/><menuitem action='CustomAssetServer'/></menu></menu><menu action='Region'/><menu action='Services'/></menubar></ui>");
192 this.menubar2 = ((Gtk.MenuBar)(w1.GetWidget("/menubar2")));
193 this.menubar2.HeightRequest = 25;
194 this.menubar2.Name = "menubar2";
195 this.vbox1.Add(this.menubar2);
196 Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar2]));
197 w3.Position = 0;
198 w3.Expand = false;
199 w3.Fill = false;
200 // Container child vbox1.Gtk.Box+BoxChild
201 this.hbox1 = new Gtk.HBox();
202 this.hbox1.Name = "hbox1";
203 // Container child hbox1.Gtk.Box+BoxChild
204 this.scrolledwindow1 = new Gtk.ScrolledWindow();
205 this.scrolledwindow1.CanFocus = true;
206 this.scrolledwindow1.Name = "scrolledwindow1";
207 this.scrolledwindow1.VscrollbarPolicy = ((Gtk.PolicyType)(1));
208 this.scrolledwindow1.HscrollbarPolicy = ((Gtk.PolicyType)(1));
209 // Container child scrolledwindow1.Gtk.Container+ContainerChild
210 Gtk.Viewport w4 = new Gtk.Viewport();
211 w4.Name = "GtkViewport";
212 w4.ShadowType = ((Gtk.ShadowType)(0));
213 // Container child GtkViewport.Gtk.Container+ContainerChild
214 this.drawingarea1 = new Gtk.DrawingArea();
215 this.drawingarea1.Name = "drawingarea1";
216 w4.Add(this.drawingarea1);
217 this.scrolledwindow1.Add(w4);
218 this.hbox1.Add(this.scrolledwindow1);
219 Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow1]));
220 w7.Position = 1;
221 // Container child hbox1.Gtk.Box+BoxChild
222 this.treeview1 = new Gtk.TreeView();
223 this.treeview1.CanFocus = true;
224 this.treeview1.Name = "treeview1";
225 this.hbox1.Add(this.treeview1);
226 Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox1[this.treeview1]));
227 w8.Position = 2;
228 this.vbox1.Add(this.hbox1);
229 Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
230 w9.Position = 1;
231 // Container child vbox1.Gtk.Box+BoxChild
232 this.statusbar1 = new Gtk.Statusbar();
233 this.statusbar1.Name = "statusbar1";
234 this.statusbar1.Spacing = 5;
235 this.vbox1.Add(this.statusbar1);
236 Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1]));
237 w10.PackType = ((Gtk.PackType)(1));
238 w10.Position = 2;
239 w10.Expand = false;
240 w10.Fill = false;
241 this.Add(this.vbox1);
242 if ((this.Child != null)) {
243 this.Child.ShowAll();
244 }
245 this.DefaultWidth = 800;
246 this.DefaultHeight = 800;
247 this.Show();
248 this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
249 this.ConnectToGridserver.Activated += new System.EventHandler(this.ConnectToGridServerMenu);
250 this.ExitGridManager.Activated += new System.EventHandler(this.QuitMenu);
251 this.ShutdownGridserverOnly.Activated += new System.EventHandler(this.ShutdownGridserverMenu);
252 this.RestartGridserverOnly.Activated += new System.EventHandler(this.RestartGridserverMenu);
253 this.DisconnectFromGridServer.Activated += new System.EventHandler(this.DisconnectGridServerMenu);
254 }
255 }
256}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs
new file mode 100644
index 0000000..dd4abdd
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/generated.cs
@@ -0,0 +1,35 @@
1// ------------------------------------------------------------------------------
2// <autogenerated>
3// This code was generated by a tool.
4// Mono Runtime Version: 2.0.50727.42
5//
6// Changes to this file may cause incorrect behavior and will be lost if
7// the code is regenerated.
8// </autogenerated>
9// ------------------------------------------------------------------------------
10
11namespace Stetic {
12
13
14 internal class Gui {
15
16 private static bool initialized;
17
18 internal static void Initialize() {
19 if ((Stetic.Gui.initialized == false)) {
20 Stetic.Gui.initialized = true;
21 }
22 }
23 }
24
25 internal class ActionGroups {
26
27 public static Gtk.ActionGroup GetActionGroup(System.Type type) {
28 return Stetic.ActionGroups.GetActionGroup(type.FullName);
29 }
30
31 public static Gtk.ActionGroup GetActionGroup(string name) {
32 return null;
33 }
34 }
35}
diff --git a/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/gui.stetic b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
new file mode 100644
index 0000000..c883f08
--- /dev/null
+++ b/OpenSim/Grid/Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
@@ -0,0 +1,502 @@
1<?xml version="1.0" encoding="utf-8"?>
2<stetic-interface>
3 <widget class="Gtk.Window" id="OpenGridServices.Manager.MainWindow" design-size="800 800">
4 <action-group name="Default">
5 <action id="Grid">
6 <property name="Type">Action</property>
7 <property name="Accelerator">&lt;Alt&gt;&lt;Mod2&gt;g</property>
8 <property name="HideIfEmpty">False</property>
9 <property name="Label" translatable="yes">Grid</property>
10 <property name="ShortLabel" translatable="yes">Grid</property>
11 </action>
12 <action id="User">
13 <property name="Type">Action</property>
14 <property name="HideIfEmpty">False</property>
15 <property name="Label" translatable="yes">User</property>
16 <property name="ShortLabel" translatable="yes">User</property>
17 </action>
18 <action id="Asset">
19 <property name="Type">Action</property>
20 <property name="HideIfEmpty">False</property>
21 <property name="Label" translatable="yes">Asset</property>
22 <property name="ShortLabel" translatable="yes">Asset</property>
23 </action>
24 <action id="Region">
25 <property name="Type">Action</property>
26 <property name="Label" translatable="yes">Region</property>
27 <property name="ShortLabel" translatable="yes">Region</property>
28 </action>
29 <action id="Services">
30 <property name="Type">Action</property>
31 <property name="Label" translatable="yes">Services</property>
32 <property name="ShortLabel" translatable="yes">Services</property>
33 </action>
34 <action id="ConnectToGridserver">
35 <property name="Type">Action</property>
36 <property name="HideIfEmpty">False</property>
37 <property name="Label" translatable="yes">Connect to gridserver...</property>
38 <property name="ShortLabel" translatable="yes">Connect to gridserver</property>
39 <property name="StockId">gtk-connect</property>
40 <signal name="Activated" handler="ConnectToGridServerMenu" />
41 </action>
42 <action id="RestartWholeGrid">
43 <property name="Type">Action</property>
44 <property name="Label" translatable="yes">Restart whole grid</property>
45 <property name="ShortLabel" translatable="yes">Restart whole grid</property>
46 <property name="StockId">gtk-refresh</property>
47 </action>
48 <action id="ShutdownWholeGrid">
49 <property name="Type">Action</property>
50 <property name="Label" translatable="yes">Shutdown whole grid</property>
51 <property name="ShortLabel" translatable="yes">Shutdown whole grid</property>
52 <property name="StockId">gtk-stop</property>
53 </action>
54 <action id="ExitGridManager">
55 <property name="Type">Action</property>
56 <property name="Label" translatable="yes">Exit grid manager</property>
57 <property name="ShortLabel" translatable="yes">Exit grid manager</property>
58 <property name="StockId">gtk-close</property>
59 <signal name="Activated" handler="QuitMenu" after="yes" />
60 </action>
61 <action id="ConnectToUserserver">
62 <property name="Type">Action</property>
63 <property name="Label" translatable="yes">Connect to userserver</property>
64 <property name="ShortLabel" translatable="yes">Connect to userserver</property>
65 <property name="StockId">gtk-connect</property>
66 </action>
67 <action id="AccountManagment">
68 <property name="Type">Action</property>
69 <property name="Label" translatable="yes">Account managment</property>
70 <property name="ShortLabel" translatable="yes">Account managment</property>
71 <property name="StockId">gtk-properties</property>
72 </action>
73 <action id="GlobalNotice">
74 <property name="Type">Action</property>
75 <property name="Label" translatable="yes">Global notice</property>
76 <property name="ShortLabel" translatable="yes">Global notice</property>
77 <property name="StockId">gtk-network</property>
78 </action>
79 <action id="DisableAllLogins">
80 <property name="Type">Action</property>
81 <property name="Label" translatable="yes">Disable all logins</property>
82 <property name="ShortLabel" translatable="yes">Disable all logins</property>
83 <property name="StockId">gtk-no</property>
84 </action>
85 <action id="DisableNonGodUsersOnly">
86 <property name="Type">Action</property>
87 <property name="Label" translatable="yes">Disable non-god users only</property>
88 <property name="ShortLabel" translatable="yes">Disable non-god users only</property>
89 <property name="StockId">gtk-no</property>
90 </action>
91 <action id="ShutdownUserServer">
92 <property name="Type">Action</property>
93 <property name="Label" translatable="yes">Shutdown user server</property>
94 <property name="ShortLabel" translatable="yes">Shutdown user server</property>
95 <property name="StockId">gtk-stop</property>
96 </action>
97 <action id="ShutdownGridserverOnly">
98 <property name="Type">Action</property>
99 <property name="Label" translatable="yes">Shutdown gridserver only</property>
100 <property name="ShortLabel" translatable="yes">Shutdown gridserver only</property>
101 <property name="StockId">gtk-stop</property>
102 <signal name="Activated" handler="ShutdownGridserverMenu" after="yes" />
103 </action>
104 <action id="RestartGridserverOnly">
105 <property name="Type">Action</property>
106 <property name="Label" translatable="yes">Restart gridserver only</property>
107 <property name="ShortLabel" translatable="yes">Restart gridserver only</property>
108 <property name="StockId">gtk-refresh</property>
109 <signal name="Activated" handler="RestartGridserverMenu" after="yes" />
110 </action>
111 <action id="DefaultLocalGridUserserver">
112 <property name="Type">Action</property>
113 <property name="Label" translatable="yes">Default local grid userserver</property>
114 <property name="ShortLabel" translatable="yes">Default local grid userserver</property>
115 </action>
116 <action id="CustomUserserver">
117 <property name="Type">Action</property>
118 <property name="Label" translatable="yes">Custom userserver...</property>
119 <property name="ShortLabel" translatable="yes">Custom userserver</property>
120 </action>
121 <action id="RemoteGridDefaultUserserver">
122 <property name="Type">Action</property>
123 <property name="Label" translatable="yes">Remote grid default userserver...</property>
124 <property name="ShortLabel" translatable="yes">Remote grid default userserver</property>
125 </action>
126 <action id="DisconnectFromGridServer">
127 <property name="Type">Action</property>
128 <property name="Label" translatable="yes">Disconnect from grid server</property>
129 <property name="ShortLabel" translatable="yes">Disconnect from grid server</property>
130 <property name="StockId">gtk-disconnect</property>
131 <property name="Visible">False</property>
132 <signal name="Activated" handler="DisconnectGridServerMenu" after="yes" />
133 </action>
134 <action id="UploadAsset">
135 <property name="Type">Action</property>
136 <property name="Label" translatable="yes">Upload asset</property>
137 <property name="ShortLabel" translatable="yes">Upload asset</property>
138 </action>
139 <action id="AssetManagement">
140 <property name="Type">Action</property>
141 <property name="Label" translatable="yes">Asset management</property>
142 <property name="ShortLabel" translatable="yes">Asset management</property>
143 </action>
144 <action id="ConnectToAssetServer">
145 <property name="Type">Action</property>
146 <property name="Label" translatable="yes">Connect to asset server</property>
147 <property name="ShortLabel" translatable="yes">Connect to asset server</property>
148 </action>
149 <action id="ConnectToDefaultAssetServerForGrid">
150 <property name="Type">Action</property>
151 <property name="Label" translatable="yes">Connect to default asset server for grid</property>
152 <property name="ShortLabel" translatable="yes">Connect to default asset server for grid</property>
153 </action>
154 <action id="DefaultForLocalGrid">
155 <property name="Type">Action</property>
156 <property name="Label" translatable="yes">Default for local grid</property>
157 <property name="ShortLabel" translatable="yes">Default for local grid</property>
158 </action>
159 <action id="DefaultForRemoteGrid">
160 <property name="Type">Action</property>
161 <property name="Label" translatable="yes">Default for remote grid...</property>
162 <property name="ShortLabel" translatable="yes">Default for remote grid...</property>
163 </action>
164 <action id="CustomAssetServer">
165 <property name="Type">Action</property>
166 <property name="Label" translatable="yes">Custom asset server...</property>
167 <property name="ShortLabel" translatable="yes">Custom asset server...</property>
168 </action>
169 </action-group>
170 <property name="MemberName" />
171 <property name="WidthRequest">800</property>
172 <property name="HeightRequest">600</property>
173 <property name="Title" translatable="yes">Open Grid Services Manager</property>
174 <property name="Icon">stock:gtk-network Dialog</property>
175 <signal name="DeleteEvent" handler="OnDeleteEvent" />
176 <child>
177 <widget class="Gtk.VBox" id="vbox1">
178 <property name="MemberName" />
179 <child>
180 <widget class="Gtk.MenuBar" id="menubar2">
181 <property name="MemberName" />
182 <property name="HeightRequest">25</property>
183 <node name="menubar2" type="Menubar">
184 <node type="Menu" action="Grid">
185 <node type="Menuitem" action="ConnectToGridserver" />
186 <node type="Menuitem" action="DisconnectFromGridServer" />
187 <node type="Separator" />
188 <node type="Menuitem" action="RestartWholeGrid" />
189 <node type="Menuitem" action="RestartGridserverOnly" />
190 <node type="Separator" />
191 <node type="Menuitem" action="ShutdownWholeGrid" />
192 <node type="Menuitem" action="ShutdownGridserverOnly" />
193 <node type="Separator" />
194 <node type="Menuitem" action="ExitGridManager" />
195 </node>
196 <node type="Menu" action="User">
197 <node type="Menu" action="ConnectToUserserver">
198 <node type="Menuitem" action="DefaultLocalGridUserserver" />
199 <node type="Menuitem" action="CustomUserserver" />
200 <node type="Menuitem" action="RemoteGridDefaultUserserver" />
201 </node>
202 <node type="Separator" />
203 <node type="Menuitem" action="AccountManagment" />
204 <node type="Menuitem" action="GlobalNotice" />
205 <node type="Separator" />
206 <node type="Menuitem" action="DisableAllLogins" />
207 <node type="Menuitem" action="DisableNonGodUsersOnly" />
208 <node type="Separator" />
209 <node type="Menuitem" action="ShutdownUserServer" />
210 </node>
211 <node type="Menu" action="Asset">
212 <node type="Menuitem" action="UploadAsset" />
213 <node type="Menuitem" action="AssetManagement" />
214 <node type="Menu" action="ConnectToAssetServer">
215 <node type="Menuitem" action="DefaultForLocalGrid" />
216 <node type="Menuitem" action="DefaultForRemoteGrid" />
217 <node type="Menuitem" action="CustomAssetServer" />
218 </node>
219 </node>
220 <node type="Menu" action="Region" />
221 <node type="Menu" action="Services" />
222 </node>
223 </widget>
224 <packing>
225 <property name="Position">0</property>
226 <property name="AutoSize">False</property>
227 <property name="Expand">False</property>
228 <property name="Fill">False</property>
229 </packing>
230 </child>
231 <child>
232 <widget class="Gtk.HBox" id="hbox1">
233 <property name="MemberName" />
234 <child>
235 <placeholder />
236 </child>
237 <child>
238 <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
239 <property name="MemberName" />
240 <property name="CanFocus">True</property>
241 <property name="VscrollbarPolicy">Automatic</property>
242 <property name="HscrollbarPolicy">Automatic</property>
243 <child>
244 <widget class="Gtk.Viewport" id="GtkViewport">
245 <property name="MemberName" />
246 <property name="ShadowType">None</property>
247 <child>
248 <widget class="Gtk.DrawingArea" id="drawingarea1">
249 <property name="MemberName" />
250 </widget>
251 </child>
252 </widget>
253 </child>
254 </widget>
255 <packing>
256 <property name="Position">1</property>
257 <property name="AutoSize">True</property>
258 </packing>
259 </child>
260 <child>
261 <widget class="Gtk.TreeView" id="treeview1">
262 <property name="MemberName" />
263 <property name="CanFocus">True</property>
264 </widget>
265 <packing>
266 <property name="Position">2</property>
267 <property name="AutoSize">True</property>
268 </packing>
269 </child>
270 </widget>
271 <packing>
272 <property name="Position">1</property>
273 <property name="AutoSize">True</property>
274 </packing>
275 </child>
276 <child>
277 <widget class="Gtk.Statusbar" id="statusbar1">
278 <property name="MemberName">statusBar1</property>
279 <property name="Spacing">5</property>
280 <child>
281 <placeholder />
282 </child>
283 <child>
284 <placeholder />
285 </child>
286 </widget>
287 <packing>
288 <property name="PackType">End</property>
289 <property name="Position">2</property>
290 <property name="AutoSize">False</property>
291 <property name="Expand">False</property>
292 <property name="Fill">False</property>
293 </packing>
294 </child>
295 </widget>
296 </child>
297 </widget>
298 <widget class="Gtk.Dialog" id="OpenGridServices.Manager.ConnectToGridServerDialog" design-size="476 137">
299 <property name="MemberName" />
300 <property name="Events">ButtonPressMask</property>
301 <property name="Title" translatable="yes">Connect to Grid server</property>
302 <property name="WindowPosition">CenterOnParent</property>
303 <property name="Buttons">2</property>
304 <property name="HelpButton">False</property>
305 <property name="HasSeparator">False</property>
306 <signal name="Response" handler="OnResponse" />
307 <child internal-child="VBox">
308 <widget class="Gtk.VBox" id="dialog_VBox">
309 <property name="MemberName" />
310 <property name="Events">ButtonPressMask</property>
311 <property name="BorderWidth">2</property>
312 <child>
313 <widget class="Gtk.VBox" id="vbox2">
314 <property name="MemberName" />
315 <child>
316 <placeholder />
317 </child>
318 <child>
319 <placeholder />
320 </child>
321 <child>
322 <widget class="Gtk.VBox" id="vbox3">
323 <property name="MemberName" />
324 <child>
325 <widget class="Gtk.HBox" id="hbox1">
326 <property name="MemberName" />
327 <child>
328 <widget class="Gtk.Label" id="label1">
329 <property name="MemberName" />
330 <property name="Xalign">1</property>
331 <property name="LabelProp" translatable="yes">Grid server URL: </property>
332 <property name="Justify">Right</property>
333 </widget>
334 <packing>
335 <property name="Position">0</property>
336 <property name="AutoSize">False</property>
337 </packing>
338 </child>
339 <child>
340 <widget class="Gtk.Entry" id="entry1">
341 <property name="MemberName" />
342 <property name="CanFocus">True</property>
343 <property name="Text" translatable="yes">http://gridserver:8001</property>
344 <property name="IsEditable">True</property>
345 <property name="MaxLength">255</property>
346 <property name="InvisibleChar">•</property>
347 </widget>
348 <packing>
349 <property name="Position">1</property>
350 <property name="AutoSize">False</property>
351 </packing>
352 </child>
353 <child>
354 <placeholder />
355 </child>
356 </widget>
357 <packing>
358 <property name="Position">0</property>
359 <property name="AutoSize">True</property>
360 <property name="Expand">False</property>
361 <property name="Fill">False</property>
362 </packing>
363 </child>
364 <child>
365 <widget class="Gtk.HBox" id="hbox2">
366 <property name="MemberName" />
367 <child>
368 <widget class="Gtk.Label" id="label2">
369 <property name="MemberName" />
370 <property name="Xalign">1</property>
371 <property name="LabelProp" translatable="yes">Username:</property>
372 <property name="Justify">Right</property>
373 </widget>
374 <packing>
375 <property name="Position">0</property>
376 <property name="AutoSize">False</property>
377 </packing>
378 </child>
379 <child>
380 <widget class="Gtk.Entry" id="entry2">
381 <property name="MemberName" />
382 <property name="CanFocus">True</property>
383 <property name="IsEditable">True</property>
384 <property name="InvisibleChar">•</property>
385 </widget>
386 <packing>
387 <property name="Position">1</property>
388 <property name="AutoSize">True</property>
389 </packing>
390 </child>
391 <child>
392 <placeholder />
393 </child>
394 </widget>
395 <packing>
396 <property name="Position">1</property>
397 <property name="AutoSize">False</property>
398 <property name="Expand">False</property>
399 <property name="Fill">False</property>
400 </packing>
401 </child>
402 <child>
403 <widget class="Gtk.HBox" id="hbox3">
404 <property name="MemberName" />
405 <child>
406 <widget class="Gtk.Label" id="label3">
407 <property name="MemberName" />
408 <property name="Xalign">1</property>
409 <property name="LabelProp" translatable="yes">Password:</property>
410 <property name="Justify">Right</property>
411 </widget>
412 <packing>
413 <property name="Position">0</property>
414 <property name="AutoSize">False</property>
415 </packing>
416 </child>
417 <child>
418 <widget class="Gtk.Entry" id="entry3">
419 <property name="MemberName" />
420 <property name="CanFocus">True</property>
421 <property name="IsEditable">True</property>
422 <property name="InvisibleChar">•</property>
423 </widget>
424 <packing>
425 <property name="Position">1</property>
426 <property name="AutoSize">True</property>
427 </packing>
428 </child>
429 <child>
430 <placeholder />
431 </child>
432 </widget>
433 <packing>
434 <property name="Position">2</property>
435 <property name="AutoSize">True</property>
436 <property name="Expand">False</property>
437 <property name="Fill">False</property>
438 </packing>
439 </child>
440 </widget>
441 <packing>
442 <property name="Position">2</property>
443 <property name="AutoSize">True</property>
444 <property name="Expand">False</property>
445 <property name="Fill">False</property>
446 </packing>
447 </child>
448 </widget>
449 <packing>
450 <property name="Position">0</property>
451 <property name="AutoSize">True</property>
452 </packing>
453 </child>
454 </widget>
455 </child>
456 <child internal-child="ActionArea">
457 <widget class="Gtk.HButtonBox" id="OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea">
458 <property name="MemberName" />
459 <property name="Events">ButtonPressMask</property>
460 <property name="Spacing">6</property>
461 <property name="BorderWidth">5</property>
462 <property name="Size">2</property>
463 <property name="LayoutStyle">End</property>
464 <child>
465 <widget class="Gtk.Button" id="button2">
466 <property name="MemberName" />
467 <property name="CanDefault">True</property>
468 <property name="CanFocus">True</property>
469 <property name="Type">TextAndIcon</property>
470 <property name="Icon">stock:gtk-apply Menu</property>
471 <property name="Label" translatable="yes">Connect</property>
472 <property name="UseUnderline">True</property>
473 <property name="IsDialogButton">True</property>
474 <property name="ResponseId">-5</property>
475 </widget>
476 <packing>
477 <property name="Expand">False</property>
478 <property name="Fill">False</property>
479 </packing>
480 </child>
481 <child>
482 <widget class="Gtk.Button" id="button8">
483 <property name="MemberName" />
484 <property name="CanDefault">True</property>
485 <property name="CanFocus">True</property>
486 <property name="Type">TextAndIcon</property>
487 <property name="Icon">stock:gtk-cancel Menu</property>
488 <property name="Label" translatable="yes">Cancel</property>
489 <property name="UseUnderline">True</property>
490 <property name="IsDialogButton">True</property>
491 <property name="ResponseId">-6</property>
492 </widget>
493 <packing>
494 <property name="Position">1</property>
495 <property name="Expand">False</property>
496 <property name="Fill">False</property>
497 </packing>
498 </child>
499 </widget>
500 </child>
501 </widget>
502</stetic-interface> \ No newline at end of file
diff --git a/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs b/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs
new file mode 100644
index 0000000..25e0211
--- /dev/null
+++ b/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs
@@ -0,0 +1,58 @@
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("UserConfig")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("UserConfig")]
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/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
new file mode 100644
index 0000000..770a6b9
--- /dev/null
+++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs
@@ -0,0 +1,96 @@
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 OpenSim.Framework.Console;
31using OpenSim.Framework.Interfaces;
32using Db4objects.Db4o;
33
34namespace OpenUser.Config.UserConfigDb4o
35{
36 public class Db4oConfigPlugin: IUserConfig
37 {
38 public UserConfig GetConfigObject()
39 {
40 OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading Db40Config dll");
41 return ( new DbUserConfig());
42 }
43 }
44
45 public class DbUserConfig : UserConfig
46 {
47 private IObjectContainer db;
48
49 public void LoadDefaults() {
50 OpenSim.Framework.Console.MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
51
52 this.DefaultStartupMsg = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
53
54 this.GridServerURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/");
55 this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server","null");
56 this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server","null");
57 }
58
59 public override void InitConfig() {
60 try {
61 db = Db4oFactory.OpenFile("openuser.yap");
62 IObjectSet result = db.Get(typeof(DbUserConfig));
63 if(result.Count==1) {
64 OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading");
65 foreach (DbUserConfig cfg in result) {
66 this.GridServerURL=cfg.GridServerURL;
67 this.GridSendKey=cfg.GridSendKey;
68 this.GridRecvKey=cfg.GridRecvKey;
69 this.DefaultStartupMsg=cfg.DefaultStartupMsg;
70 }
71 } else {
72 OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
73 LoadDefaults();
74 OpenSim.Framework.Console.MainLog.Instance.Verbose("Writing out default settings to local database");
75 db.Set(this);
76 db.Close();
77 }
78 } catch(Exception e) {
79 OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured");
80 OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString());
81 }
82
83 OpenSim.Framework.Console.MainLog.Instance.Verbose("User settings loaded:");
84 OpenSim.Framework.Console.MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg);
85 OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL);
86 OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey);
87 OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey);
88 }
89
90
91 public void Shutdown() {
92 db.Close();
93 }
94 }
95
96}
diff --git a/OpenSim/Grid/UserServer.Config/OpenSim.Grid.UserServer.Config.csproj b/OpenSim/Grid/UserServer.Config/OpenSim.Grid.UserServer.Config.csproj
new file mode 100644
index 0000000..1ae9589
--- /dev/null
+++ b/OpenSim/Grid/UserServer.Config/OpenSim.Grid.UserServer.Config.csproj
@@ -0,0 +1,107 @@
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>{08F87229-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.Grid.UserServer.Config</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.Grid.UserServer.Config</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="OpenSim.Framework" >
70 <HintPath>OpenSim.Framework.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="OpenSim.Framework.Console" >
74 <HintPath>OpenSim.Framework.Console.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="System" >
78 <HintPath>System.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="System.Data.dll" >
82 <HintPath>..\..\..\bin\System.Data.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="System.Xml" >
86 <HintPath>System.Xml.dll</HintPath>
87 <Private>False</Private>
88 </Reference>
89 </ItemGroup>
90 <ItemGroup>
91 </ItemGroup>
92 <ItemGroup>
93 <Compile Include="AssemblyInfo.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="DbUserConfig.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 </ItemGroup>
100 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
101 <PropertyGroup>
102 <PreBuildEvent>
103 </PreBuildEvent>
104 <PostBuildEvent>
105 </PostBuildEvent>
106 </PropertyGroup>
107</Project>
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build b/OpenSim/Grid/UserServer.Config/OpenSim.Grid.UserServer.Config.dll.build
index 739b98c..fc7e00b 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
+++ b/OpenSim/Grid/UserServer.Config/OpenSim.Grid.UserServer.Config.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.Storage.LocalStorageDb4o" default="build"> 2<project name="OpenSim.Grid.UserServer.Config" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,14 +8,11 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.Storage.LocalStorageDb4o" dynamicprefix="true" > 11 <resources prefix="OpenSim.Grid.UserServer.Config" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" /> 14 <include name="AssemblyInfo.cs" />
15 <include name="Db4LocalStorage.cs" /> 15 <include name="DbUserConfig.cs" />
16 <include name="MapStorage.cs" />
17 <include name="UUIDParcelQuery.cs" />
18 <include name="UUIDPrimQuery.cs" />
19 </sources> 16 </sources>
20 <references basedir="${project::get-base-directory()}"> 17 <references basedir="${project::get-base-directory()}">
21 <lib> 18 <lib>
@@ -24,9 +21,10 @@
24 </lib> 21 </lib>
25 <include name="../../../bin/Db4objects.Db4o.dll" /> 22 <include name="../../../bin/Db4objects.Db4o.dll" />
26 <include name="../../../bin/libsecondlife.dll" /> 23 <include name="../../../bin/libsecondlife.dll" />
27 <include name="../../../bin/OpenSim.Framework.dll" /> 24 <include name="OpenSim.Framework.dll" />
28 <include name="../../../bin/OpenSim.Framework.Console.dll" /> 25 <include name="OpenSim.Framework.Console.dll" />
29 <include name="System.dll" /> 26 <include name="System.dll" />
27 <include name="System.Data.dll.dll" />
30 <include name="System.Xml.dll" /> 28 <include name="System.Xml.dll" />
31 </references> 29 </references>
32 </csc> 30 </csc>
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
new file mode 100644
index 0000000..640f91a
--- /dev/null
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -0,0 +1,219 @@
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.Reflection;
33using System.IO;
34using System.Text;
35using libsecondlife;
36using OpenSim.Framework.User;
37using OpenSim.Framework.Sims;
38using OpenSim.Framework.Inventory;
39using OpenSim.Framework.Interfaces;
40using OpenSim.Framework.Console;
41using OpenSim.Framework.Servers;
42using OpenSim.Framework.Utilities;
43using OpenSim.GenericConfig;
44
45namespace OpenSim.Grid.UserServer
46{
47 /// <summary>
48 /// </summary>
49 public class OpenUser_Main : conscmd_callback
50 {
51 private string ConfigDll = "OpenSim.Grid.UserServer.Config.dll";
52 private string StorageDll = "OpenSim.Framework.Data.MySQL.dll";
53 private UserConfig Cfg;
54 protected IGenericConfig localXMLConfig;
55
56 public UserManager m_userManager;
57
58 public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>();
59
60 LogBase m_console;
61
62 [STAThread]
63 public static void Main(string[] args)
64 {
65 Console.WriteLine("Launching UserServer...");
66
67 OpenUser_Main userserver = new OpenUser_Main();
68
69 userserver.Startup();
70 userserver.Work();
71 }
72
73 private OpenUser_Main()
74 {
75 m_console = new LogBase("opengrid-userserver-console.log", "OpenUser", this , false);
76 OpenSim.Framework.Console.MainLog.Instance = m_console;
77 }
78
79 private void Work()
80 {
81 m_console.Notice("Enter help for a list of commands\n");
82
83 while (true)
84 {
85 m_console.MainLogPrompt();
86 }
87 }
88
89 public void Startup()
90 {
91 this.localXMLConfig = new XmlConfig("UserServerConfig.xml");
92 this.localXMLConfig.LoadData();
93 this.ConfigDB(this.localXMLConfig);
94 this.localXMLConfig.Close();
95
96 OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Loading configuration");
97 Cfg = this.LoadConfigDll(this.ConfigDll);
98 Cfg.InitConfig();
99
100 OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection");
101 m_userManager = new UserManager();
102 m_userManager._config = Cfg;
103 m_userManager.AddPlugin(StorageDll);
104
105 OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process");
106 BaseHttpServer httpServer = new BaseHttpServer(8002);
107
108 httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod);
109
110 httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName);
111 httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID);
112
113 httpServer.AddRestHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod);
114
115 httpServer.Start();
116 m_console.Status("Userserver 0.3 - Startup complete");
117 }
118
119
120 public void do_create(string what)
121 {
122 switch (what)
123 {
124 case "user":
125 string tempfirstname;
126 string templastname;
127 string tempMD5Passwd;
128 uint regX = 997;
129 uint regY = 996;
130
131 tempfirstname = m_console.CmdPrompt("First name");
132 templastname = m_console.CmdPrompt("Last name");
133 tempMD5Passwd = m_console.PasswdPrompt("Password");
134 regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X"));
135 regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y"));
136
137 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
138
139 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
140 break;
141 }
142 }
143
144 public void RunCmd(string cmd, string[] cmdparams)
145 {
146 switch (cmd)
147 {
148 case "help":
149 m_console.Notice("create user - create a new user");
150 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
151 break;
152
153 case "create":
154 do_create(cmdparams[0]);
155 break;
156
157 case "shutdown":
158 m_console.Close();
159 Environment.Exit(0);
160 break;
161 }
162 }
163
164 private void ConfigDB(IGenericConfig configData)
165 {
166 try
167 {
168 string attri = "";
169 attri = configData.GetAttribute("DataBaseProvider");
170 if (attri == "")
171 {
172 StorageDll = "OpenSim.Framework.Data.DB4o.dll";
173 configData.SetAttribute("DataBaseProvider", "OpenSim.Framework.Data.DB4o.dll");
174 }
175 else
176 {
177 StorageDll = attri;
178 }
179 configData.Commit();
180 }
181 catch (Exception e)
182 {
183
184 }
185 }
186
187 private UserConfig LoadConfigDll(string dllName)
188 {
189 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
190 UserConfig config = null;
191
192 foreach (Type pluginType in pluginAssembly.GetTypes())
193 {
194 if (pluginType.IsPublic)
195 {
196 if (!pluginType.IsAbstract)
197 {
198 Type typeInterface = pluginType.GetInterface("IUserConfig", true);
199
200 if (typeInterface != null)
201 {
202 IUserConfig plug = (IUserConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
203 config = plug.GetConfigObject();
204 break;
205 }
206
207 typeInterface = null;
208 }
209 }
210 }
211 pluginAssembly = null;
212 return config;
213 }
214
215 public void Show(string ShowWhat)
216 {
217 }
218 }
219}
diff --git a/OpenSim/Grid/UserServer/OpenSim.Grid.UserServer.csproj b/OpenSim/Grid/UserServer/OpenSim.Grid.UserServer.csproj
new file mode 100644
index 0000000..1146b17
--- /dev/null
+++ b/OpenSim/Grid/UserServer/OpenSim.Grid.UserServer.csproj
@@ -0,0 +1,134 @@
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>{2FC96F92-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.Grid.UserServer</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Exe</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Grid.UserServer</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="OpenSim.Framework" >
70 <HintPath>OpenSim.Framework.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="OpenSim.Framework.Console" >
74 <HintPath>OpenSim.Framework.Console.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="OpenSim.Framework.GenericConfig.Xml" >
78 <HintPath>OpenSim.Framework.GenericConfig.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="OpenSim.Framework.Servers" >
82 <HintPath>OpenSim.Framework.Servers.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="System" >
86 <HintPath>System.dll</HintPath>
87 <Private>False</Private>
88 </Reference>
89 <Reference Include="System.Data" >
90 <HintPath>System.Data.dll</HintPath>
91 <Private>False</Private>
92 </Reference>
93 <Reference Include="System.Xml" >
94 <HintPath>System.Xml.dll</HintPath>
95 <Private>False</Private>
96 </Reference>
97 <Reference Include="XMLRPC.dll" >
98 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
99 <Private>False</Private>
100 </Reference>
101 </ItemGroup>
102 <ItemGroup>
103 <ProjectReference Include="..\..\Framework\Data\OpenSim.Framework.Data.csproj">
104 <Name>OpenSim.Framework.Data</Name>
105 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
106 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
107 <Private>False</Private>
108 </ProjectReference>
109 <ProjectReference Include="..\..\Framework\UserManager\OpenSim.Framework.UserManagement.csproj">
110 <Name>OpenSim.Framework.UserManagement</Name>
111 <Project>{586E2916-0000-0000-0000-000000000000}</Project>
112 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
113 <Private>False</Private>
114 </ProjectReference>
115 </ItemGroup>
116 <ItemGroup>
117 <Compile Include="Main.cs">
118 <SubType>Code</SubType>
119 </Compile>
120 <Compile Include="UserManager.cs">
121 <SubType>Code</SubType>
122 </Compile>
123 <Compile Include="Properties\AssemblyInfo.cs">
124 <SubType>Code</SubType>
125 </Compile>
126 </ItemGroup>
127 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
128 <PropertyGroup>
129 <PreBuildEvent>
130 </PreBuildEvent>
131 <PostBuildEvent>
132 </PostBuildEvent>
133 </PropertyGroup>
134</Project>
diff --git a/OpenSim/Grid/UserServer/OpenSim.Grid.UserServer.exe.build b/OpenSim/Grid/UserServer/OpenSim.Grid.UserServer.exe.build
new file mode 100644
index 0000000..8bc1fc1
--- /dev/null
+++ b/OpenSim/Grid/UserServer/OpenSim.Grid.UserServer.exe.build
@@ -0,0 +1,52 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Grid.UserServer" 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="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
11 <resources prefix="OpenSim.Grid.UserServer" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="Main.cs" />
15 <include name="UserManager.cs" />
16 <include name="Properties/AssemblyInfo.cs" />
17 </sources>
18 <references basedir="${project::get-base-directory()}">
19 <lib>
20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib>
23 <include name="../../../bin/Db4objects.Db4o.dll" />
24 <include name="../../../bin/libsecondlife.dll" />
25 <include name="OpenSim.Framework.dll" />
26 <include name="OpenSim.Framework.Console.dll" />
27 <include name="../../../bin/OpenSim.Framework.Data.dll" />
28 <include name="OpenSim.Framework.GenericConfig.Xml.dll" />
29 <include name="OpenSim.Framework.Servers.dll" />
30 <include name="../../../bin/OpenSim.Framework.UserManagement.dll" />
31 <include name="System.dll" />
32 <include name="System.Data.dll" />
33 <include name="System.Xml.dll" />
34 <include name="../../../bin/XMLRPC.dll" />
35 </references>
36 </csc>
37 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
38 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
39 <copy todir="${project::get-base-directory()}/../../../bin/">
40 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
41 <include name="*.dll"/>
42 <include name="*.exe"/>
43 </fileset>
44 </copy>
45 </target>
46 <target name="clean">
47 <delete dir="${bin.dir}" failonerror="false" />
48 <delete dir="${obj.dir}" failonerror="false" />
49 </target>
50 <target name="doc" description="Creates documentation.">
51 </target>
52</project>
diff --git a/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..5d5ce8d
--- /dev/null
+++ b/OpenSim/Grid/UserServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
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("OGS-UserServer")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OGS-UserServer")]
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("e266513a-090b-4d38-80f6-8599eef68c8c")]
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/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
new file mode 100644
index 0000000..c99cf87
--- /dev/null
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -0,0 +1,104 @@
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;
30using System.Collections.Generic;
31using System.Text;
32using OpenSim.Framework.Data;
33using libsecondlife;
34using System.Reflection;
35
36using System.Xml;
37using Nwc.XmlRpc;
38using OpenSim.Framework.Sims;
39using OpenSim.Framework.Inventory;
40using OpenSim.Framework.Utilities;
41
42using OpenSim.Framework.UserManagement;
43
44using System.Security.Cryptography;
45
46namespace OpenSim.Grid.UserServer
47{
48 public class UserManager : UserManagerBase
49 {
50 public UserManager()
51 {
52 }
53
54 /// <summary>
55 /// Customises the login response and fills in missing values.
56 /// </summary>
57 /// <param name="response">The existing response</param>
58 /// <param name="theUser">The user profile</param>
59 public override void CustomiseResponse(ref LoginResponse response, ref UserProfileData theUser)
60 {
61 // Load information from the gridserver
62 SimProfile SimInfo = new SimProfile();
63 SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
64
65 // Customise the response
66 // Home Location
67 response.Home = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " +
68 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
69 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
70
71 // Destination
72 response.SimAddress = SimInfo.sim_ip;
73 response.SimPort = (Int32)SimInfo.sim_port;
74 response.RegionX = SimInfo.RegionLocY ;
75 response.RegionY = SimInfo.RegionLocX ;
76
77 // Notify the target of an incoming user
78 Console.WriteLine("Notifying " + SimInfo.regionname + " (" + SimInfo.caps_url + ")");
79
80 // Prepare notification
81 Hashtable SimParams = new Hashtable();
82 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
83 SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
84 SimParams["firstname"] = theUser.username;
85 SimParams["lastname"] = theUser.surname;
86 SimParams["agent_id"] = theUser.UUID.ToString();
87 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode);
88 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
89 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
90 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
91 SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
92 ArrayList SendParams = new ArrayList();
93 SendParams.Add(SimParams);
94
95 // Update agent with target sim
96 theUser.currentAgent.currentRegion = SimInfo.UUID;
97 theUser.currentAgent.currentHandle = SimInfo.regionhandle;
98
99 // Send
100 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
101 XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000);
102 }
103 }
104}
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs b/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs
deleted file mode 100644
index 7b53388..0000000
--- a/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs
+++ /dev/null
@@ -1,184 +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 System.IO;
32using System.Reflection;
33using OpenSim.Framework;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36using libsecondlife;
37
38namespace OpenSim.Region.Scenes
39{
40 public partial class Scene
41 {
42 private Dictionary<string, IScriptEngine> scriptEngines = new Dictionary<string, IScriptEngine>();
43
44 /// <summary>
45 ///
46 /// </summary>
47 private void LoadScriptEngines()
48 {
49 this.LoadScriptPlugins();
50 }
51
52 /// <summary>
53 ///
54 /// </summary>
55 public void LoadScriptPlugins()
56 {
57 string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "ScriptEngines");
58 string[] pluginFiles = Directory.GetFiles(path, "*.dll");
59
60
61 for (int i = 0; i < pluginFiles.Length; i++)
62 {
63 this.AddPlugin(pluginFiles[i]);
64 }
65 }
66
67 /// <summary>
68 ///
69 /// </summary>
70 /// <param name="FileName"></param>
71 private void AddPlugin(string FileName)
72 {
73 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
74
75 foreach (Type pluginType in pluginAssembly.GetTypes())
76 {
77 if (pluginType.IsPublic)
78 {
79 if (!pluginType.IsAbstract)
80 {
81 Type typeInterface = pluginType.GetInterface("IScriptEngine", true);
82
83 if (typeInterface != null)
84 {
85 IScriptEngine plug = (IScriptEngine)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
86 plug.Init(this);
87 this.scriptEngines.Add(plug.GetName(), plug);
88
89 }
90
91 typeInterface = null;
92 }
93 }
94 }
95
96 pluginAssembly = null;
97 }
98
99 /// <summary>
100 ///
101 /// </summary>
102 /// <param name="scriptType"></param>
103 /// <param name="scriptName"></param>
104 /// <param name="script"></param>
105 /// <param name="ent"></param>
106 public void LoadScript(string scriptType, string scriptName, string script, Entity ent)
107 {
108 if(this.scriptEngines.ContainsKey(scriptType))
109 {
110 this.scriptEngines[scriptType].LoadScript(script, scriptName, ent.LocalId);
111 }
112 }
113
114 #region IScriptAPI Methods
115
116 /// <summary>
117 ///
118 /// </summary>
119 /// <param name="localID"></param>
120 /// <returns></returns>
121 public LLVector3 GetEntityPosition(uint localID)
122 {
123 LLVector3 res = new LLVector3();
124 // Console.WriteLine("script- getting entity " + localID + " position");
125 foreach (Entity entity in this.Entities.Values)
126 {
127 if (entity.LocalId == localID)
128 {
129 res.X = entity.Pos.X;
130 res.Y = entity.Pos.Y;
131 res.Z = entity.Pos.Z;
132 }
133 }
134 return res;
135 }
136
137 /// <summary>
138 ///
139 /// </summary>
140 /// <param name="localID"></param>
141 /// <param name="x"></param>
142 /// <param name="y"></param>
143 /// <param name="z"></param>
144 public void SetEntityPosition(uint localID, float x , float y, float z)
145 {
146 foreach (Entity entity in this.Entities.Values)
147 {
148 if (entity.LocalId == localID && entity is Primitive)
149 {
150 LLVector3 pos = entity.Pos;
151 pos.X = x;
152 pos.Y = y;
153 Primitive prim = entity as Primitive;
154 // Of course, we really should have asked the physEngine if this is possible, and if not, returned false.
155 //prim.UpdatePosition(pos);
156 // Console.WriteLine("script- setting entity " + localID + " positon");
157 }
158 }
159
160 }
161
162 /// <summary>
163 ///
164 /// </summary>
165 /// <returns></returns>
166 public uint GetRandomAvatarID()
167 {
168 //Console.WriteLine("script- getting random avatar id");
169 uint res = 0;
170 foreach (Entity entity in this.Entities.Values)
171 {
172 if (entity is ScenePresence)
173 {
174 res = entity.LocalId;
175 }
176 }
177 return res;
178 }
179
180 #endregion
181
182
183 }
184}
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/JSharpScriptEngine.cs b/OpenSim/OpenSim.Region/Scenes/scripting/Engines/JSharpScriptEngine.cs
deleted file mode 100644
index b33b55d..0000000
--- a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/JSharpScriptEngine.cs
+++ /dev/null
@@ -1,104 +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
32// Compilation stuff
33using System.CodeDom;
34using System.CodeDom.Compiler;
35using Microsoft.VJSharp;
36
37namespace OpenSim.Scripting
38{
39 public class JSharpScriptEngine : IScriptCompiler
40 {
41 public string FileExt()
42 {
43 return ".jsl";
44 }
45
46 private Dictionary<string, IScript> LoadDotNetScript(ICodeCompiler compiler, string filename)
47 {
48 CompilerParameters compilerParams = new CompilerParameters();
49 CompilerResults compilerResults;
50 compilerParams.GenerateExecutable = false;
51 compilerParams.GenerateInMemory = true;
52 compilerParams.IncludeDebugInformation = false;
53 compilerParams.ReferencedAssemblies.Add("OpenSim.Region.dll");
54 compilerParams.ReferencedAssemblies.Add("OpenSim.Framework.dll");
55 compilerParams.ReferencedAssemblies.Add("libsecondlife.dll");
56 compilerParams.ReferencedAssemblies.Add("System.dll");
57
58 compilerResults = compiler.CompileAssemblyFromFile(compilerParams, filename);
59
60 if (compilerResults.Errors.Count > 0)
61 {
62 OpenSim.Framework.Console.MainLog.Instance.Error("Compile errors");
63 foreach (CompilerError error in compilerResults.Errors)
64 {
65 OpenSim.Framework.Console.MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString());
66 }
67 }
68 else
69 {
70 Dictionary<string, IScript> scripts = new Dictionary<string, IScript>();
71
72 foreach (Type pluginType in compilerResults.CompiledAssembly.GetExportedTypes())
73 {
74 Type testInterface = pluginType.GetInterface("IScript", true);
75
76 if (testInterface != null)
77 {
78 IScript script = (IScript)compilerResults.CompiledAssembly.CreateInstance(pluginType.ToString());
79
80 string scriptName = "J#/" + script.getName();
81 Console.WriteLine("Script: " + scriptName + " loaded.");
82
83 if (!scripts.ContainsKey(scriptName))
84 {
85 scripts.Add(scriptName, script);
86 }
87 else
88 {
89 scripts[scriptName] = script;
90 }
91 }
92 }
93 return scripts;
94 }
95 return null;
96 }
97
98 public Dictionary<string, IScript> compile(string filename)
99 {
100 VJSharpCodeProvider jsharpProvider = new VJSharpCodeProvider();
101 return LoadDotNetScript(jsharpProvider.CreateCompiler(), filename);
102 }
103 }
104}
diff --git a/OpenSim/OpenSim/Application.cs b/OpenSim/Region/Application/Application.cs
index 40701b0..1dcd99b 100644
--- a/OpenSim/OpenSim/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Framework.Console; 31using OpenSim.Framework.Console;
32using OpenSim.Region.ClientStack;
32 33
33namespace OpenSim 34namespace OpenSim
34{ 35{
@@ -108,7 +109,7 @@ namespace OpenSim
108 sim.m_sandbox = sandBoxMode; 109 sim.m_sandbox = sandBoxMode;
109 sim.user_accounts = userAccounts; 110 sim.user_accounts = userAccounts;
110 sim.gridLocalAsset = gridLocalAsset; 111 sim.gridLocalAsset = gridLocalAsset;
111 OpenSim.Region.Scenes.ScenePresence.PhysicsEngineFlying = allowFlying; 112 OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = allowFlying;
112 113
113 sim.StartUp(); 114 sim.StartUp();
114 115
diff --git a/OpenSim/OpenSim/OpenSim.csproj b/OpenSim/Region/Application/OpenSim.csproj
index 222e2f7..bec85cc 100644
--- a/OpenSim/OpenSim/OpenSim.csproj
+++ b/OpenSim/Region/Application/OpenSim.csproj
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,15 +59,15 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Axiom.MathLib.dll" > 61 <Reference Include="Axiom.MathLib.dll" >
62 <HintPath>..\..\bin\Axiom.MathLib.dll</HintPath> 62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="Db4objects.Db4o.dll" > 65 <Reference Include="Db4objects.Db4o.dll" >
66 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> 66 <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath>
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="libsecondlife.dll" > 69 <Reference Include="libsecondlife.dll" >
70 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 70 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
71 <Private>False</Private> 71 <Private>False</Private>
72 </Reference> 72 </Reference>
73 <Reference Include="System" > 73 <Reference Include="System" >
@@ -78,89 +78,93 @@
78 <HintPath>System.Xml.dll</HintPath> 78 <HintPath>System.Xml.dll</HintPath>
79 <Private>False</Private> 79 <Private>False</Private>
80 </Reference> 80 </Reference>
81 <Reference Include="XMLRPC.dll" >
82 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
81 </ItemGroup> 85 </ItemGroup>
82 <ItemGroup> 86 <ItemGroup>
83 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj"> 87 <ProjectReference Include="..\..\Framework\General\OpenSim.Framework.csproj">
84 <Name>OpenGrid.Framework.Communications</Name> 88 <Name>OpenSim.Framework</Name>
85 <Project>{683344D5-0000-0000-0000-000000000000}</Project> 89 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 90 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private> 91 <Private>False</Private>
88 </ProjectReference> 92 </ProjectReference>
89 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications.OGS1\OpenGrid.Framework.Communications.OGS1.csproj"> 93 <ProjectReference Include="..\..\Framework\Communications\OpenSim.Framework.Communications.csproj">
90 <Name>OpenGrid.Framework.Communications.OGS1</Name> 94 <Name>OpenSim.Framework.Communications</Name>
91 <Project>{17442AF1-0000-0000-0000-000000000000}</Project> 95 <Project>{CB52B7E7-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 96 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private> 97 <Private>False</Private>
94 </ProjectReference> 98 </ProjectReference>
95 <ProjectReference Include="..\..\Common\OpenGrid.Framework.UserManager\OpenGrid.Framework.UserManagement.csproj"> 99 <ProjectReference Include="..\..\Framework\Console\OpenSim.Framework.Console.csproj">
96 <Name>OpenGrid.Framework.UserManagement</Name> 100 <Name>OpenSim.Framework.Console</Name>
97 <Project>{DA9A7391-0000-0000-0000-000000000000}</Project> 101 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 102 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
99 <Private>False</Private> 103 <Private>False</Private>
100 </ProjectReference> 104 </ProjectReference>
101 <ProjectReference Include="..\OpenSim.Caches\OpenSim.Caches.csproj"> 105 <ProjectReference Include="..\..\Framework\Data\OpenSim.Framework.Data.csproj">
102 <Name>OpenSim.Caches</Name> 106 <Name>OpenSim.Framework.Data</Name>
103 <Project>{1938EB12-0000-0000-0000-000000000000}</Project> 107 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 108 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
105 <Private>False</Private> 109 <Private>False</Private>
106 </ProjectReference> 110 </ProjectReference>
107 <ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 111 <ProjectReference Include="..\..\Framework\GenericConfig\Xml\OpenSim.Framework.GenericConfig.Xml.csproj">
108 <Name>OpenSim.Framework</Name> 112 <Name>OpenSim.Framework.GenericConfig.Xml</Name>
109 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 113 <Project>{C74E4A30-0000-0000-0000-000000000000}</Project>
110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 114 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
111 <Private>False</Private> 115 <Private>False</Private>
112 </ProjectReference> 116 </ProjectReference>
113 <ProjectReference Include="..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 117 <ProjectReference Include="..\..\Framework\Servers\OpenSim.Framework.Servers.csproj">
114 <Name>OpenSim.Framework.Console</Name> 118 <Name>OpenSim.Framework.Servers</Name>
115 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 119 <Project>{2CC71860-0000-0000-0000-000000000000}</Project>
116 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 120 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
117 <Private>False</Private> 121 <Private>False</Private>
118 </ProjectReference> 122 </ProjectReference>
119 <ProjectReference Include="..\..\Common\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj"> 123 <ProjectReference Include="..\..\Framework\UserManager\OpenSim.Framework.UserManagement.csproj">
120 <Name>OpenSim.GenericConfig.Xml</Name> 124 <Name>OpenSim.Framework.UserManagement</Name>
121 <Project>{E88EF749-0000-0000-0000-000000000000}</Project> 125 <Project>{586E2916-0000-0000-0000-000000000000}</Project>
122 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 126 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
123 <Private>False</Private> 127 <Private>False</Private>
124 </ProjectReference> 128 </ProjectReference>
125 <ProjectReference Include="..\OpenSim.LocalCommunications\OpenSim.LocalCommunications.csproj"> 129 <ProjectReference Include="..\Caches\OpenSim.Region.Caches.csproj">
126 <Name>OpenSim.LocalCommunications</Name> 130 <Name>OpenSim.Region.Caches</Name>
127 <Project>{79CED992-0000-0000-0000-000000000000}</Project> 131 <Project>{61FCCDB3-0000-0000-0000-000000000000}</Project>
128 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 132 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
129 <Private>False</Private> 133 <Private>False</Private>
130 </ProjectReference> 134 </ProjectReference>
131 <ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj"> 135 <ProjectReference Include="..\ClientStack\OpenSim.Region.ClientStack.csproj">
132 <Name>OpenSim.Physics.Manager</Name> 136 <Name>OpenSim.Region.ClientStack</Name>
133 <Project>{8BE16150-0000-0000-0000-000000000000}</Project> 137 <Project>{DC3698B2-0000-0000-0000-000000000000}</Project>
134 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 138 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
135 <Private>False</Private> 139 <Private>False</Private>
136 </ProjectReference> 140 </ProjectReference>
137 <ProjectReference Include="..\OpenSim.Region\OpenSim.Region.csproj"> 141 <ProjectReference Include="..\Communications\Local\OpenSim.Region.Communications.Local.csproj">
138 <Name>OpenSim.Region</Name> 142 <Name>OpenSim.Region.Communications.Local</Name>
139 <Project>{196916AF-0000-0000-0000-000000000000}</Project> 143 <Project>{BFB5D807-0000-0000-0000-000000000000}</Project>
140 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 144 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
141 <Private>False</Private> 145 <Private>False</Private>
142 </ProjectReference> 146 </ProjectReference>
143 <ProjectReference Include="..\OpenSim.RegionServer\OpenSim.RegionServer.csproj"> 147 <ProjectReference Include="..\Communications\OGS1\OpenSim.Region.Communications.OGS1.csproj">
144 <Name>OpenSim.RegionServer</Name> 148 <Name>OpenSim.Region.Communications.OGS1</Name>
145 <Project>{632E1BFD-0000-0000-0000-000000000000}</Project> 149 <Project>{4806E378-0000-0000-0000-000000000000}</Project>
146 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 150 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
147 <Private>False</Private> 151 <Private>False</Private>
148 </ProjectReference> 152 </ProjectReference>
149 <ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj"> 153 <ProjectReference Include="..\Environment\OpenSim.Region.Environment.csproj">
150 <Name>OpenSim.Servers</Name> 154 <Name>OpenSim.Region.Environment</Name>
151 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> 155 <Project>{DCBA491C-0000-0000-0000-000000000000}</Project>
152 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 156 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
153 <Private>False</Private> 157 <Private>False</Private>
154 </ProjectReference> 158 </ProjectReference>
155 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj"> 159 <ProjectReference Include="..\Physics\Manager\OpenSim.Region.Physics.Manager.csproj">
156 <Name>OpenSim.Terrain.BasicTerrain</Name> 160 <Name>OpenSim.Region.Physics.Manager</Name>
157 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project> 161 <Project>{F4FF31EB-0000-0000-0000-000000000000}</Project>
158 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 162 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
159 <Private>False</Private> 163 <Private>False</Private>
160 </ProjectReference> 164 </ProjectReference>
161 <ProjectReference Include="..\..\Common\XmlRpcCS\XMLRPC.csproj"> 165 <ProjectReference Include="..\Terrain.BasicTerrain\OpenSim.Region.Terrain.BasicTerrain.csproj">
162 <Name>XMLRPC</Name> 166 <Name>OpenSim.Region.Terrain.BasicTerrain</Name>
163 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> 167 <Project>{C9E0F891-0000-0000-0000-000000000000}</Project>
164 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 168 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
165 <Private>False</Private> 169 <Private>False</Private>
166 </ProjectReference> 170 </ProjectReference>
@@ -172,6 +176,9 @@
172 <Compile Include="OpenSimMain.cs"> 176 <Compile Include="OpenSimMain.cs">
173 <SubType>Code</SubType> 177 <SubType>Code</SubType>
174 </Compile> 178 </Compile>
179 <Compile Include="VersionInfo.cs">
180 <SubType>Code</SubType>
181 </Compile>
175 </ItemGroup> 182 </ItemGroup>
176 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> 183 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
177 <PropertyGroup> 184 <PropertyGroup>
diff --git a/OpenSim/Region/Application/OpenSim.exe.build b/OpenSim/Region/Application/OpenSim.exe.build
new file mode 100644
index 0000000..6c7d7ac
--- /dev/null
+++ b/OpenSim/Region/Application/OpenSim.exe.build
@@ -0,0 +1,60 @@
1<?xml version="1.0" ?>
2<project name="OpenSim" 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="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
11 <resources prefix="OpenSim" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="Application.cs" />
15 <include name="OpenSimMain.cs" />
16 <include name="VersionInfo.cs" />
17 </sources>
18 <references basedir="${project::get-base-directory()}">
19 <lib>
20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib>
23 <include name="../../../bin/Axiom.MathLib.dll" />
24 <include name="../../../bin/Db4objects.Db4o.dll" />
25 <include name="../../../bin/libsecondlife.dll" />
26 <include name="../../../bin/OpenSim.Framework.dll" />
27 <include name="../../../bin/OpenSim.Framework.Communications.dll" />
28 <include name="../../../bin/OpenSim.Framework.Console.dll" />
29 <include name="../../../bin/OpenSim.Framework.Data.dll" />
30 <include name="../../../bin/OpenSim.Framework.GenericConfig.Xml.dll" />
31 <include name="../../../bin/OpenSim.Framework.Servers.dll" />
32 <include name="../../../bin/OpenSim.Framework.UserManagement.dll" />
33 <include name="../../../bin/OpenSim.Region.Caches.dll" />
34 <include name="../../../bin/OpenSim.Region.ClientStack.dll" />
35 <include name="../../../bin/OpenSim.Region.Communications.Local.dll" />
36 <include name="../../../bin/OpenSim.Region.Communications.OGS1.dll" />
37 <include name="../../../bin/OpenSim.Region.Environment.dll" />
38 <include name="../../../bin/OpenSim.Region.Physics.Manager.dll" />
39 <include name="../../../bin/OpenSim.Region.Terrain.BasicTerrain.dll" />
40 <include name="System.dll" />
41 <include name="System.Xml.dll" />
42 <include name="../../../bin/XMLRPC.dll" />
43 </references>
44 </csc>
45 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
46 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
47 <copy todir="${project::get-base-directory()}/../../../bin/">
48 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
49 <include name="*.dll"/>
50 <include name="*.exe"/>
51 </fileset>
52 </copy>
53 </target>
54 <target name="clean">
55 <delete dir="${bin.dir}" failonerror="false" />
56 <delete dir="${obj.dir}" failonerror="false" />
57 </target>
58 <target name="doc" description="Creates documentation.">
59 </target>
60</project>
diff --git a/OpenSim/OpenSim/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index b7ec9e6..fcb2493 100644
--- a/OpenSim/OpenSim/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -38,30 +38,34 @@ using System.Collections;
38using System.Collections.Generic; 38using System.Collections.Generic;
39using libsecondlife; 39using libsecondlife;
40using libsecondlife.Packets; 40using libsecondlife.Packets;
41using OpenSim.Region; 41using OpenSim.Region.Environment;
42using OpenSim.Region.Scenes; 42using OpenSim.Region.Environment.Scenes;
43using OpenSim.Terrain; 43using OpenSim.Region.Terrain;
44using OpenSim.Framework.Interfaces; 44using OpenSim.Framework.Interfaces;
45using OpenSim.Framework.Data;
46
45using OpenSim.Framework.Types; 47using OpenSim.Framework.Types;
46using OpenSim.Framework; 48using OpenSim.Framework;
47using OpenSim.Assets; 49using OpenSim.Assets;
48using OpenSim.Caches; 50using OpenSim.Region.Caches;
49using OpenSim.Framework.Console; 51using OpenSim.Framework.Console;
50using OpenSim.Physics.Manager; 52using OpenSim.Physics.Manager;
51using Nwc.XmlRpc; 53using Nwc.XmlRpc;
52using OpenSim.Servers; 54using OpenSim.Framework.Servers;
53using OpenSim.GenericConfig; 55using OpenSim.GenericConfig;
54using OpenGrid.Framework.Communications; 56using OpenSim.Framework.Communications;
55using OpenSim.LocalCommunications; 57using OpenSim.Region.Communications.OGS1;
56using OpenGrid.Framework.Communications.OGS1; 58using OpenSim.Region.Communications.Local;
59
60using OpenSim.Region.ClientStack;
57 61
58namespace OpenSim 62namespace OpenSim
59{ 63{
60 64
61 public class OpenSimMain : RegionApplicationBase, conscmd_callback 65 public class OpenSimMain : RegionApplicationBase, conscmd_callback
62 { 66 {
63 // private CheckSumServer checkServer;
64 protected CommunicationsManager commsManager; 67 protected CommunicationsManager commsManager;
68 // private CheckSumServer checkServer;
65 69
66 private bool m_silent; 70 private bool m_silent;
67 private string m_logFilename = "region-console-" + Guid.NewGuid().ToString() + ".log"; 71 private string m_logFilename = "region-console-" + Guid.NewGuid().ToString() + ".log";
@@ -102,19 +106,17 @@ namespace OpenSim
102 106
103 ClientView.TerrainManager = new TerrainManager(new SecondLife()); 107 ClientView.TerrainManager = new TerrainManager(new SecondLife());
104 108
105 CommunicationsLocal sandboxCommunications = null;
106 if (m_sandbox) 109 if (m_sandbox)
107 { 110 {
108 this.SetupLocalGridServers(); 111 this.SetupLocalGridServers();
109 // this.checkServer = new CheckSumServer(12036); 112 // this.checkServer = new CheckSumServer(12036);
110 // this.checkServer.ServerListener(); 113 // this.checkServer.ServerListener();
111 sandboxCommunications = new CommunicationsLocal(this.serversData); 114 this.commsManager = new CommunicationsLocal(this.serversData);
112 this.commsManager = sandboxCommunications;
113 } 115 }
114 else 116 else
115 { 117 {
116 this.SetupRemoteGridServers(); 118 this.SetupRemoteGridServers();
117 this.commsManager = new GridCommsManager(this.serversData); 119 this.commsManager = new CommunicationsOGS1(this.serversData);
118 } 120 }
119 121
120 startuptime = DateTime.Now; 122 startuptime = DateTime.Now;
@@ -132,7 +134,7 @@ namespace OpenSim
132 134
133 if (m_sandbox) 135 if (m_sandbox)
134 { 136 {
135 httpServer.AddXmlRPCHandler("login_to_simulator", sandboxCommunications.UserServices.XmlRpcLoginMethod); 137 httpServer.AddXmlRPCHandler("login_to_simulator", ((CommunicationsLocal)this.commsManager).UserServices.XmlRpcLoginMethod);
136 } 138 }
137 139
138 //Start http server 140 //Start http server
@@ -152,7 +154,7 @@ namespace OpenSim
152 { 154 {
153 try 155 try
154 { 156 {
155 AssetCache = new AssetCache("OpenSim.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); 157 AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey);
156 InventoryCache = new InventoryCache(); 158 InventoryCache = new InventoryCache();
157 } 159 }
158 catch (Exception e) 160 catch (Exception e)
@@ -167,7 +169,7 @@ namespace OpenSim
167 { 169 {
168 try 170 try
169 { 171 {
170 AssetCache = new AssetCache("OpenSim.GridInterfaces.Remote.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); 172 AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Remote.dll", this.serversData.AssetURL, this.serversData.AssetSendKey);
171 InventoryCache = new InventoryCache(); 173 InventoryCache = new InventoryCache();
172 } 174 }
173 catch (Exception e) 175 catch (Exception e)
@@ -241,14 +243,21 @@ namespace OpenSim
241 243
242 udpServer.LocalWorld = LocalWorld; 244 udpServer.LocalWorld = LocalWorld;
243 245
244 LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded. 246 LocalWorld.LoadStorageDLL("OpenSim.Region.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
245 LocalWorld.LoadWorldMap(); 247 LocalWorld.LoadWorldMap();
246 248
247 m_log.Verbose( "Main.cs:Startup() - Starting up messaging system"); 249 m_log.Verbose( "Main.cs:Startup() - Starting up messaging system");
248 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); 250 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine);
249 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D()); 251 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D());
250 LocalWorld.LoadPrimsFromStorage(); 252 LocalWorld.LoadPrimsFromStorage();
251 LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager); 253
254 //Master Avatar Setup
255 UserProfileData masterAvatar = commsManager.UserServer.SetupMasterUser(LocalWorld.RegionInfo.MasterAvatarFirstName, LocalWorld.RegionInfo.MasterAvatarLastName, LocalWorld.RegionInfo.MasterAvatarSandboxPassword);
256 if (masterAvatar != null)
257 {
258 LocalWorld.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID;
259 LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager);
260 }
252 261
253 262
254 LocalWorld.StartTimer(); 263 LocalWorld.StartTimer();
@@ -358,23 +367,23 @@ namespace OpenSim
358 case "": 367 case "":
359 this.m_physicsEngine = "basicphysics"; 368 this.m_physicsEngine = "basicphysics";
360 configData.SetAttribute("PhysicsEngine", "basicphysics"); 369 configData.SetAttribute("PhysicsEngine", "basicphysics");
361 OpenSim.Region.Scenes.ScenePresence.PhysicsEngineFlying = false; 370 OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = false;
362 break; 371 break;
363 372
364 case "basicphysics": 373 case "basicphysics":
365 this.m_physicsEngine = "basicphysics"; 374 this.m_physicsEngine = "basicphysics";
366 configData.SetAttribute("PhysicsEngine", "basicphysics"); 375 configData.SetAttribute("PhysicsEngine", "basicphysics");
367 OpenSim.Region.Scenes.ScenePresence.PhysicsEngineFlying = false; 376 OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = false;
368 break; 377 break;
369 378
370 case "RealPhysX": 379 case "RealPhysX":
371 this.m_physicsEngine = "RealPhysX"; 380 this.m_physicsEngine = "RealPhysX";
372 OpenSim.Region.Scenes.ScenePresence.PhysicsEngineFlying = true; 381 OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = true;
373 break; 382 break;
374 383
375 case "OpenDynamicsEngine": 384 case "OpenDynamicsEngine":
376 this.m_physicsEngine = "OpenDynamicsEngine"; 385 this.m_physicsEngine = "OpenDynamicsEngine";
377 OpenSim.Region.Scenes.ScenePresence.PhysicsEngineFlying = true; 386 OpenSim.Region.Environment.Scenes.ScenePresence.PhysicsEngineFlying = true;
378 break; 387 break;
379 } 388 }
380 389
@@ -433,13 +442,6 @@ namespace OpenSim
433 } 442 }
434 break; 443 break;
435 444
436 case "script":
437 for (int i = 0; i < m_localWorld.Count; i++)
438 {
439 ((Scene)m_localWorld[i]).scriptManager.RunScriptCmd(cmdparams);
440 }
441 break;
442
443 case "shutdown": 445 case "shutdown":
444 Shutdown(); 446 Shutdown();
445 break; 447 break;
@@ -463,7 +465,7 @@ namespace OpenSim
463 m_log.Error( "That is " + (DateTime.Now - startuptime).ToString()); 465 m_log.Error( "That is " + (DateTime.Now - startuptime).ToString());
464 break; 466 break;
465 case "users": 467 case "users":
466 OpenSim.Region.Scenes.ScenePresence TempAv; 468 OpenSim.Region.Environment.Scenes.ScenePresence TempAv;
467 m_log.Error( String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP")); 469 m_log.Error( String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP"));
468 /* foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys) 470 /* foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys)
469 { 471 {
diff --git a/OpenSim/OpenSim.RegionServer/VersionInfo.cs b/OpenSim/Region/Application/VersionInfo.cs
index 5d1354e..5d1354e 100644
--- a/OpenSim/OpenSim.RegionServer/VersionInfo.cs
+++ b/OpenSim/Region/Application/VersionInfo.cs
diff --git a/OpenSim/OpenSim.Caches/AssetCache.cs b/OpenSim/Region/Caches/AssetCache.cs
index d0cc370..6cf921b 100644
--- a/OpenSim/OpenSim.Caches/AssetCache.cs
+++ b/OpenSim/Region/Caches/AssetCache.cs
@@ -36,7 +36,7 @@ using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37using OpenSim.Framework.Utilities; 37using OpenSim.Framework.Utilities;
38 38
39namespace OpenSim.Caches 39namespace OpenSim.Region.Caches
40{ 40{
41 public delegate void DownloadComplete(AssetCache.TextureSender sender); 41 public delegate void DownloadComplete(AssetCache.TextureSender sender);
42 42
diff --git a/OpenSim/OpenSim.Caches/OpenSim.Caches.csproj b/OpenSim/Region/Caches/OpenSim.Region.Caches.csproj
index 07e4960..4a73d08 100644
--- a/OpenSim/OpenSim.Caches/OpenSim.Caches.csproj
+++ b/OpenSim/Region/Caches/OpenSim.Region.Caches.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{1938EB12-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{61FCCDB3-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Caches</AssemblyName> 12 <AssemblyName>OpenSim.Region.Caches</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Caches</RootNamespace> 19 <RootNamespace>OpenSim.Region.Caches</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,7 +59,7 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="libsecondlife.dll" > 61 <Reference Include="libsecondlife.dll" >
62 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="System" > 65 <Reference Include="System" >
@@ -72,7 +72,7 @@
72 </Reference> 72 </Reference>
73 </ItemGroup> 73 </ItemGroup>
74 <ItemGroup> 74 <ItemGroup>
75 <ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 75 <ProjectReference Include="..\..\Framework\General\OpenSim.Framework.csproj">
76 <Name>OpenSim.Framework</Name> 76 <Name>OpenSim.Framework</Name>
77 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 77 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
diff --git a/OpenSim/OpenSim.Caches/OpenSim.Caches.dll.build b/OpenSim/Region/Caches/OpenSim.Region.Caches.dll.build
index 7717545..3ca89e8 100644
--- a/OpenSim/OpenSim.Caches/OpenSim.Caches.dll.build
+++ b/OpenSim/Region/Caches/OpenSim.Region.Caches.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.Caches" default="build"> 2<project name="OpenSim.Region.Caches" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,7 +8,7 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.Caches" dynamicprefix="true" > 11 <resources prefix="OpenSim.Region.Caches" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="AssetCache.cs" /> 14 <include name="AssetCache.cs" />
@@ -19,15 +19,15 @@
19 <include name="${project::get-base-directory()}" /> 19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" /> 20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib> 21 </lib>
22 <include name="../../bin/libsecondlife.dll" /> 22 <include name="../../../bin/libsecondlife.dll" />
23 <include name="../../bin/OpenSim.Framework.dll" /> 23 <include name="../../../bin/OpenSim.Framework.dll" />
24 <include name="System.dll" /> 24 <include name="System.dll" />
25 <include name="System.Xml.dll" /> 25 <include name="System.Xml.dll" />
26 </references> 26 </references>
27 </csc> 27 </csc>
28 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> 28 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
29 <mkdir dir="${project::get-base-directory()}/../../bin/"/> 29 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
30 <copy todir="${project::get-base-directory()}/../../bin/"> 30 <copy todir="${project::get-base-directory()}/../../../bin/">
31 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 31 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
32 <include name="*.dll"/> 32 <include name="*.dll"/>
33 <include name="*.exe"/> 33 <include name="*.exe"/>
diff --git a/OpenSim/OpenSim.Caches/Properties/AssemblyInfo.cs b/OpenSim/Region/Caches/Properties/AssemblyInfo.cs
index 00f5dfe..5e6ecbb 100644
--- a/OpenSim/OpenSim.Caches/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Caches/Properties/AssemblyInfo.cs
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Caches")] 8[assembly: AssemblyTitle("OpenSim.Region.Caches")]
9[assembly: AssemblyDescription("")] 9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")] 10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")] 11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Caches")] 12[assembly: AssemblyProduct("OpenSim.Region.Caches")]
13[assembly: AssemblyCopyright("Copyright © 2007")] 13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
diff --git a/OpenSim/OpenSim.Region/Caps.cs b/OpenSim/Region/Capabilities/Caps.cs
index 13a351d..416a6bc 100644
--- a/OpenSim/OpenSim.Region/Caps.cs
+++ b/OpenSim/Region/Capabilities/Caps.cs
@@ -1,17 +1,44 @@
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*/
1using System; 28using System;
2using System.Collections; 29using System.Collections;
3using System.Collections.Generic; 30using System.Collections.Generic;
4using System.Text; 31using System.Text;
5using System.IO; 32using System.IO;
6using System.Xml; 33using System.Xml;
7using OpenSim.Servers; 34using OpenSim.Framework.Servers;
8using OpenSim.Framework; 35using OpenSim.Framework;
9using OpenSim.Framework.Utilities; 36using OpenSim.Framework.Utilities;
10using OpenSim.Framework.Types; 37using OpenSim.Framework.Types;
11using OpenSim.Caches; 38using OpenSim.Region.Caches;
12using libsecondlife; 39using libsecondlife;
13 40
14namespace OpenSim.Region 41namespace OpenSim.Region.Capabilities
15{ 42{
16 public delegate void UpLoadedTexture(LLUUID assetID, LLUUID inventoryItem, byte[] data); 43 public delegate void UpLoadedTexture(LLUUID assetID, LLUUID inventoryItem, byte[] data);
17 44
@@ -126,14 +153,8 @@ namespace OpenSim.Region
126 153
127 public string ProcessEventQueue(string request, string path, string param) 154 public string ProcessEventQueue(string request, string path, string param)
128 { 155 {
129 // Console.WriteLine("event queue request " + request);
130 string res = ""; 156 string res = "";
131 int timer = 0; 157
132
133 /*while ((timer < 200) || (this.CapsEventQueue.Count < 1))
134 {
135 timer++;
136 }*/
137 if (this.CapsEventQueue.Count > 0) 158 if (this.CapsEventQueue.Count > 0)
138 { 159 {
139 lock (this.CapsEventQueue) 160 lock (this.CapsEventQueue)
diff --git a/OpenSim/Region/Capabilities/LLSDArray.cs b/OpenSim/Region/Capabilities/LLSDArray.cs
new file mode 100644
index 0000000..76d5a2c
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDArray.cs
@@ -0,0 +1,45 @@
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;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Region.Capabilities
34{
35 [LLSDType("ARRAY")]
36 public class LLSDArray
37 {
38 public ArrayList Array = new ArrayList();
39
40 public LLSDArray()
41 {
42
43 }
44 }
45}
diff --git a/OpenSim/Region/Capabilities/LLSDCapEvent.cs b/OpenSim/Region/Capabilities/LLSDCapEvent.cs
new file mode 100644
index 0000000..d47d25c
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDCapEvent.cs
@@ -0,0 +1,45 @@
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.Region.Capabilities
33{
34 [LLSDType("MAP")]
35 public class LLSDCapEvent
36 {
37 public int id = 0;
38 public LLSDArray events = new LLSDArray();
39
40 public LLSDCapEvent()
41 {
42
43 }
44 }
45}
diff --git a/OpenSim/Region/Capabilities/LLSDCapsDetails.cs b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
new file mode 100644
index 0000000..d6db606
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDCapsDetails.cs
@@ -0,0 +1,19 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Region.Capabilities
6{
7 [LLSDType("MAP")]
8 public class LLSDCapsDetails
9 {
10 public string MapLayer = "";
11 public string NewFileAgentInventory = "";
12 //public string EventQueueGet = "";
13
14 public LLSDCapsDetails()
15 {
16
17 }
18 }
19}
diff --git a/OpenSim/Region/Capabilities/LLSDEmpty.cs b/OpenSim/Region/Capabilities/LLSDEmpty.cs
new file mode 100644
index 0000000..68f1ce9
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDEmpty.cs
@@ -0,0 +1,42 @@
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.Region.Capabilities
33{
34 [LLSDType("MAP")]
35 public class LLSDEmpty
36 {
37 public LLSDEmpty()
38 {
39
40 }
41 }
42}
diff --git a/OpenSim/Region/Capabilities/LLSDHelpers.cs b/OpenSim/Region/Capabilities/LLSDHelpers.cs
new file mode 100644
index 0000000..76d9345
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDHelpers.cs
@@ -0,0 +1,165 @@
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;
30using System.Collections.Generic;
31using System.Text;
32using System.IO;
33using System.Xml;
34using libsecondlife;
35
36namespace OpenSim.Region.Capabilities
37{
38 public class LLSDHelpers
39 {
40 public static string SerialiseLLSDReply(object obj)
41 {
42 StringWriter sw = new StringWriter();
43 XmlTextWriter writer = new XmlTextWriter(sw);
44 writer.Formatting = Formatting.None;
45 writer.WriteStartElement(String.Empty, "llsd", String.Empty);
46 LLSDHelpers.SerializeLLSDType(writer, obj);
47 writer.WriteEndElement();
48 writer.Close();
49 return sw.ToString();
50 }
51
52 public static void SerializeLLSDType(XmlTextWriter writer, object obj)
53 {
54 Type myType = obj.GetType();
55 LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
56 if (llsdattributes.Length > 0)
57 {
58 switch (llsdattributes[0].ObjectType)
59 {
60 case "MAP":
61 writer.WriteStartElement(String.Empty, "map", String.Empty);
62 System.Reflection.FieldInfo[] fields = myType.GetFields();
63 for (int i = 0; i < fields.Length; i++)
64 {
65 object fieldValue = fields[i].GetValue(obj);
66 LLSDType[] fieldAttributes = (LLSDType[])fieldValue.GetType().GetCustomAttributes(typeof(LLSDType), false);
67 if (fieldAttributes.Length > 0)
68 {
69 writer.WriteStartElement(String.Empty, "key", String.Empty);
70 writer.WriteString(fields[i].Name);
71 writer.WriteEndElement();
72 SerializeLLSDType(writer, fieldValue);
73 }
74 else
75 {
76 writer.WriteStartElement(String.Empty, "key", String.Empty);
77 writer.WriteString(fields[i].Name);
78 writer.WriteEndElement();
79 LLSD.LLSDWriteOne(writer, fieldValue);
80 }
81 }
82 writer.WriteEndElement();
83 break;
84 case "ARRAY":
85 // LLSDArray arrayObject = obj as LLSDArray;
86 // ArrayList a = arrayObject.Array;
87 ArrayList a = (ArrayList)obj.GetType().GetField("Array").GetValue(obj);
88 if (a != null)
89 {
90 writer.WriteStartElement(String.Empty, "array", String.Empty);
91 foreach (object item in a)
92 {
93 SerializeLLSDType(writer, item);
94 }
95 writer.WriteEndElement();
96 }
97 break;
98 }
99 }
100 else
101 {
102 LLSD.LLSDWriteOne(writer, obj);
103 }
104 }
105
106 public static object DeserialiseLLSDMap(Hashtable llsd, object obj)
107 {
108 Type myType = obj.GetType();
109 LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
110 if (llsdattributes.Length > 0)
111 {
112 switch (llsdattributes[0].ObjectType)
113 {
114 case "MAP":
115 IDictionaryEnumerator enumerator = llsd.GetEnumerator();
116 while (enumerator.MoveNext())
117 {
118 System.Reflection.FieldInfo field = myType.GetField((string)enumerator.Key);
119 if (field != null)
120 {
121 if (enumerator.Value is Hashtable)
122 {
123 object fieldValue = field.GetValue(obj);
124 DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue);
125 }
126 else if (enumerator.Value is ArrayList)
127 {
128 object fieldValue = field.GetValue(obj);
129 fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value);
130 //TODO
131 // the LLSD map/array types in the array need to be deserialised
132 // but first we need to know the right class to deserialise them into.
133 }
134 else
135 {
136 field.SetValue(obj, enumerator.Value);
137 }
138 }
139 }
140 break;
141 }
142 }
143 return obj;
144 }
145 }
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165}
diff --git a/OpenSim/Region/Capabilities/LLSDMapLayer.cs b/OpenSim/Region/Capabilities/LLSDMapLayer.cs
new file mode 100644
index 0000000..b097ec3
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDMapLayer.cs
@@ -0,0 +1,50 @@
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
32using libsecondlife;
33
34namespace OpenSim.Region.Capabilities
35{
36 [LLSDType("MAP")]
37 public class LLSDMapLayer
38 {
39 public int Left = 0;
40 public int Right = 0;
41 public int Top = 0;
42 public int Bottom = 0;
43 public LLUUID ImageID = LLUUID.Zero;
44
45 public LLSDMapLayer()
46 {
47
48 }
49 }
50}
diff --git a/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs b/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs
new file mode 100644
index 0000000..ee37a5b
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDMapLayerResponse.cs
@@ -0,0 +1,45 @@
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.Region.Capabilities
33{
34 [LLSDType("MAP")]
35 public class LLSDMapLayerResponse
36 {
37 public LLSDMapRequest AgentData = new LLSDMapRequest();
38 public LLSDArray LayerData = new LLSDArray();
39
40 public LLSDMapLayerResponse()
41 {
42
43 }
44 }
45}
diff --git a/OpenSim/Region/Capabilities/LLSDMapRequest.cs b/OpenSim/Region/Capabilities/LLSDMapRequest.cs
new file mode 100644
index 0000000..b15f1be
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDMapRequest.cs
@@ -0,0 +1,17 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Region.Capabilities
6{
7 [LLSDType("MAP")]
8 public class LLSDMapRequest
9 {
10 public int Flags = 0;
11
12 public LLSDMapRequest()
13 {
14
15 }
16 }
17}
diff --git a/OpenSim/Region/Capabilities/LLSDTest.cs b/OpenSim/Region/Capabilities/LLSDTest.cs
new file mode 100644
index 0000000..3948f2c
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDTest.cs
@@ -0,0 +1,45 @@
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.Region.Capabilities
33{
34 [LLSDType("MAP")]
35 public class LLSDTest
36 {
37 public int Test1 = 20;
38 public int Test2 = 10;
39
40 public LLSDTest()
41 {
42
43 }
44 }
45}
diff --git a/OpenSim/Region/Capabilities/LLSDType.cs b/OpenSim/Region/Capabilities/LLSDType.cs
new file mode 100644
index 0000000..7da5861
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDType.cs
@@ -0,0 +1,53 @@
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.Region.Capabilities
33{
34 [AttributeUsage(AttributeTargets.Class)]
35 public class LLSDType : Attribute
36 {
37 private string myType;
38
39 public LLSDType(string type)
40 {
41 myType = type;
42
43 }
44
45 public string ObjectType
46 {
47 get
48 {
49 return myType;
50 }
51 }
52 }
53}
diff --git a/OpenSim/Region/Capabilities/LLSDUploadReply.cs b/OpenSim/Region/Capabilities/LLSDUploadReply.cs
new file mode 100644
index 0000000..83cf166
--- /dev/null
+++ b/OpenSim/Region/Capabilities/LLSDUploadReply.cs
@@ -0,0 +1,47 @@
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
32using libsecondlife;
33namespace OpenSim.Region.Capabilities
34{
35 [LLSDType("MAP")]
36 public class LLSDUploadReply
37 {
38 public string new_asset = "";
39 public LLUUID new_inventory_item = LLUUID.Zero;
40 public string state = "";
41
42 public LLSDUploadReply()
43 {
44
45 }
46 }
47}
diff --git a/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj
new file mode 100644
index 0000000..4667d52
--- /dev/null
+++ b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.csproj
@@ -0,0 +1,143 @@
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>{39038E85-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.Region.Capabilities</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.Region.Capabilities</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="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System" >
66 <HintPath>System.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Xml" >
70 <HintPath>System.Xml.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="XMLRPC.dll" >
74 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup>
78 <ItemGroup>
79 <ProjectReference Include="..\..\Framework\General\OpenSim.Framework.csproj">
80 <Name>OpenSim.Framework</Name>
81 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private>
84 </ProjectReference>
85 <ProjectReference Include="..\..\Framework\Servers\OpenSim.Framework.Servers.csproj">
86 <Name>OpenSim.Framework.Servers</Name>
87 <Project>{2CC71860-0000-0000-0000-000000000000}</Project>
88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
89 <Private>False</Private>
90 </ProjectReference>
91 <ProjectReference Include="..\Caches\OpenSim.Region.Caches.csproj">
92 <Name>OpenSim.Region.Caches</Name>
93 <Project>{61FCCDB3-0000-0000-0000-000000000000}</Project>
94 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
95 <Private>False</Private>
96 </ProjectReference>
97 </ItemGroup>
98 <ItemGroup>
99 <Compile Include="Caps.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="LLSDArray.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 <Compile Include="LLSDCapEvent.cs">
106 <SubType>Code</SubType>
107 </Compile>
108 <Compile Include="LLSDCapsDetails.cs">
109 <SubType>Code</SubType>
110 </Compile>
111 <Compile Include="LLSDEmpty.cs">
112 <SubType>Code</SubType>
113 </Compile>
114 <Compile Include="LLSDHelpers.cs">
115 <SubType>Code</SubType>
116 </Compile>
117 <Compile Include="LLSDMapLayer.cs">
118 <SubType>Code</SubType>
119 </Compile>
120 <Compile Include="LLSDMapLayerResponse.cs">
121 <SubType>Code</SubType>
122 </Compile>
123 <Compile Include="LLSDMapRequest.cs">
124 <SubType>Code</SubType>
125 </Compile>
126 <Compile Include="LLSDTest.cs">
127 <SubType>Code</SubType>
128 </Compile>
129 <Compile Include="LLSDType.cs">
130 <SubType>Code</SubType>
131 </Compile>
132 <Compile Include="LLSDUploadReply.cs">
133 <SubType>Code</SubType>
134 </Compile>
135 </ItemGroup>
136 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
137 <PropertyGroup>
138 <PreBuildEvent>
139 </PreBuildEvent>
140 <PostBuildEvent>
141 </PostBuildEvent>
142 </PropertyGroup>
143</Project>
diff --git a/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build
new file mode 100644
index 0000000..a091b5c
--- /dev/null
+++ b/OpenSim/Region/Capabilities/OpenSim.Region.Capabilities.dll.build
@@ -0,0 +1,56 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.Capabilities" 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.Region.Capabilities" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="Caps.cs" />
15 <include name="LLSDArray.cs" />
16 <include name="LLSDCapEvent.cs" />
17 <include name="LLSDCapsDetails.cs" />
18 <include name="LLSDEmpty.cs" />
19 <include name="LLSDHelpers.cs" />
20 <include name="LLSDMapLayer.cs" />
21 <include name="LLSDMapLayerResponse.cs" />
22 <include name="LLSDMapRequest.cs" />
23 <include name="LLSDTest.cs" />
24 <include name="LLSDType.cs" />
25 <include name="LLSDUploadReply.cs" />
26 </sources>
27 <references basedir="${project::get-base-directory()}">
28 <lib>
29 <include name="${project::get-base-directory()}" />
30 <include name="${project::get-base-directory()}/${build.dir}" />
31 </lib>
32 <include name="../../../bin/libsecondlife.dll" />
33 <include name="../../../bin/OpenSim.Framework.dll" />
34 <include name="../../../bin/OpenSim.Framework.Servers.dll" />
35 <include name="../../../bin/OpenSim.Region.Caches.dll" />
36 <include name="System.dll" />
37 <include name="System.Xml.dll" />
38 <include name="../../../bin/XMLRPC.dll" />
39 </references>
40 </csc>
41 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
42 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
43 <copy todir="${project::get-base-directory()}/../../../bin/">
44 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
45 <include name="*.dll"/>
46 <include name="*.exe"/>
47 </fileset>
48 </copy>
49 </target>
50 <target name="clean">
51 <delete dir="${bin.dir}" failonerror="false" />
52 <delete dir="${obj.dir}" failonerror="false" />
53 </target>
54 <target name="doc" description="Creates documentation.">
55 </target>
56</project>
diff --git a/OpenSim/OpenSim.RegionServer/Assets/InventoryCache.cs b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs
index 5d5021c..da74f85 100644
--- a/OpenSim/OpenSim.RegionServer/Assets/InventoryCache.cs
+++ b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs
@@ -35,6 +35,7 @@ using libsecondlife.Packets;
35using OpenSim.Framework.Inventory; 35using OpenSim.Framework.Inventory;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37using OpenSim.Framework.Interfaces; 37using OpenSim.Framework.Interfaces;
38using OpenSim.Region.ClientStack;
38 39
39namespace OpenSim.Assets 40namespace OpenSim.Assets
40{ 41{
diff --git a/OpenSim/OpenSim.RegionServer/ClientStackNetworkHandler.cs b/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs
index 7552195..f99cf79 100644
--- a/OpenSim/OpenSim.RegionServer/ClientStackNetworkHandler.cs
+++ b/OpenSim/Region/ClientStack/ClientStackNetworkHandler.cs
@@ -33,7 +33,7 @@ using System.Net.Sockets;
33using libsecondlife; 33using libsecondlife;
34 34
35 35
36namespace OpenSim 36namespace OpenSim.Region.ClientStack
37{ 37{
38 38
39 public interface ClientStackNetworkHandler 39 public interface ClientStackNetworkHandler
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs
index 902f3c7..9650b42 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs
+++ b/OpenSim/Region/ClientStack/ClientView.API.cs
@@ -35,7 +35,7 @@ using OpenSim.Framework.Types;
35using libsecondlife; 35using libsecondlife;
36using libsecondlife.Packets; 36using libsecondlife.Packets;
37 37
38namespace OpenSim 38namespace OpenSim.Region.ClientStack
39{ 39{
40 partial class ClientView 40 partial class ClientView
41 { 41 {
@@ -68,6 +68,8 @@ namespace OpenSim
68 public event GenericCall6 OnRemoveAvatar; 68 public event GenericCall6 OnRemoveAvatar;
69 public event RequestMapBlocks OnRequestMapBlocks; 69 public event RequestMapBlocks OnRequestMapBlocks;
70 public event TeleportLocationRequest OnTeleportLocationRequest; 70 public event TeleportLocationRequest OnTeleportLocationRequest;
71
72 public event UUIDNameRequest OnNameFromUUIDRequest;
71 73
72 public event ParcelPropertiesRequest OnParcelPropertiesRequest; 74 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
73 public event ParcelDivideRequest OnParcelDivideRequest; 75 public event ParcelDivideRequest OnParcelDivideRequest;
@@ -75,7 +77,6 @@ namespace OpenSim
75 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 77 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
76 78
77 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 79 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
78
79 /// <summary> 80 /// <summary>
80 /// 81 ///
81 /// </summary> 82 /// </summary>
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.AgentAssetUpload.cs b/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs
index 914c38a..bc6cc21 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.AgentAssetUpload.cs
+++ b/OpenSim/Region/ClientStack/ClientView.AgentAssetUpload.cs
@@ -32,11 +32,11 @@ using OpenSim.Assets;
32using OpenSim.Framework.Types; 32using OpenSim.Framework.Types;
33using OpenSim.Framework.Interfaces; 33using OpenSim.Framework.Interfaces;
34using OpenSim.Framework.Utilities; 34using OpenSim.Framework.Utilities;
35using OpenSim.Caches; 35using OpenSim.Region.Caches;
36using libsecondlife; 36using libsecondlife;
37using libsecondlife.Packets; 37using libsecondlife.Packets;
38 38
39namespace OpenSim 39namespace OpenSim.Region.ClientStack
40{ 40{
41 partial class ClientView 41 partial class ClientView
42 { 42 {
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
index 32aed02..0456e3c 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.PacketHandlers.cs
+++ b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs
@@ -42,7 +42,7 @@ using OpenSim.Framework.Inventory;
42using OpenSim.Framework.Utilities; 42using OpenSim.Framework.Utilities;
43using OpenSim.Assets; 43using OpenSim.Assets;
44 44
45namespace OpenSim 45namespace OpenSim.Region.ClientStack
46{ 46{
47 public partial class ClientView 47 public partial class ClientView
48 { 48 {
@@ -192,7 +192,5 @@ namespace OpenSim
192 this.OutPacket(mbReply); 192 this.OutPacket(mbReply);
193 */ 193 */
194 } 194 }
195
196
197 } 195 }
198} 196}
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
index 191ef21..794ce79 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
+++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
@@ -42,7 +42,7 @@ using OpenSim.Framework.Inventory;
42using OpenSim.Framework.Utilities; 42using OpenSim.Framework.Utilities;
43using OpenSim.Assets; 43using OpenSim.Assets;
44 44
45namespace OpenSim 45namespace OpenSim.Region.ClientStack
46{ 46{
47 public partial class ClientView 47 public partial class ClientView
48 { 48 {
@@ -492,7 +492,13 @@ namespace OpenSim
492 case PacketType.MoneyBalanceRequest: 492 case PacketType.MoneyBalanceRequest:
493 this.SendMoneyBalance(LLUUID.Zero, true, new byte[0], 1000); 493 this.SendMoneyBalance(LLUUID.Zero, true, new byte[0], 1000);
494 break; 494 break;
495 495 case PacketType.UUIDNameRequest:
496 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
497 foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock)
498 {
499 OnNameFromUUIDRequest(UUIDBlock.ID, this);
500 }
501 break;
496 #region Parcel related packets 502 #region Parcel related packets
497 case PacketType.ParcelPropertiesRequest: 503 case PacketType.ParcelPropertiesRequest:
498 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; 504 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack;
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 312da9d..9c4462d 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -42,9 +42,9 @@ using OpenSim.Framework.Types;
42using OpenSim.Framework.Inventory; 42using OpenSim.Framework.Inventory;
43using OpenSim.Framework.Utilities; 43using OpenSim.Framework.Utilities;
44using OpenSim.Assets; 44using OpenSim.Assets;
45using OpenSim.Caches; 45using OpenSim.Region.Caches;
46 46
47namespace OpenSim 47namespace OpenSim.Region.ClientStack
48{ 48{
49 public delegate bool PacketMethod(ClientView simClient, Packet packet); 49 public delegate bool PacketMethod(ClientView simClient, Packet packet);
50 50
diff --git a/OpenSim/OpenSim.RegionServer/ClientViewBase.cs b/OpenSim/Region/ClientStack/ClientViewBase.cs
index 8b503f0..7d39405 100644
--- a/OpenSim/OpenSim.RegionServer/ClientViewBase.cs
+++ b/OpenSim/Region/ClientStack/ClientViewBase.cs
@@ -39,7 +39,7 @@ using System.Timers;
39using OpenSim.Framework.Utilities; 39using OpenSim.Framework.Utilities;
40using OpenSim.Framework.Interfaces; 40using OpenSim.Framework.Interfaces;
41 41
42namespace OpenSim 42namespace OpenSim.Region.ClientStack
43{ 43{
44 public class ClientViewBase 44 public class ClientViewBase
45 { 45 {
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.csproj
index b1ce3eb..3093eb0 100644
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
+++ b/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{632E1BFD-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{DC3698B2-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.RegionServer</AssemblyName> 12 <AssemblyName>OpenSim.Region.ClientStack</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.RegionServer</RootNamespace> 19 <RootNamespace>OpenSim.Region.ClientStack</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,15 +59,15 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Axiom.MathLib.dll" > 61 <Reference Include="Axiom.MathLib.dll" >
62 <HintPath>..\..\bin\Axiom.MathLib.dll</HintPath> 62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="Db4objects.Db4o.dll" > 65 <Reference Include="Db4objects.Db4o.dll" >
66 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> 66 <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath>
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="libsecondlife.dll" > 69 <Reference Include="libsecondlife.dll" >
70 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 70 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
71 <Private>False</Private> 71 <Private>False</Private>
72 </Reference> 72 </Reference>
73 <Reference Include="System" > 73 <Reference Include="System" >
@@ -78,59 +78,45 @@
78 <HintPath>System.Xml.dll</HintPath> 78 <HintPath>System.Xml.dll</HintPath>
79 <Private>False</Private> 79 <Private>False</Private>
80 </Reference> 80 </Reference>
81 <Reference Include="XMLRPC.dll" >
82 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
81 </ItemGroup> 85 </ItemGroup>
82 <ItemGroup> 86 <ItemGroup>
83 <ProjectReference Include="..\OpenSim.Caches\OpenSim.Caches.csproj"> 87 <ProjectReference Include="..\..\Framework\General\OpenSim.Framework.csproj">
84 <Name>OpenSim.Caches</Name>
85 <Project>{1938EB12-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private>
88 </ProjectReference>
89 <ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj">
90 <Name>OpenSim.Framework</Name> 88 <Name>OpenSim.Framework</Name>
91 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 89 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 90 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private> 91 <Private>False</Private>
94 </ProjectReference> 92 </ProjectReference>
95 <ProjectReference Include="..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 93 <ProjectReference Include="..\..\Framework\Console\OpenSim.Framework.Console.csproj">
96 <Name>OpenSim.Framework.Console</Name> 94 <Name>OpenSim.Framework.Console</Name>
97 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 95 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 96 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
99 <Private>False</Private> 97 <Private>False</Private>
100 </ProjectReference> 98 </ProjectReference>
101 <ProjectReference Include="..\..\Common\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj"> 99 <ProjectReference Include="..\..\Framework\Servers\OpenSim.Framework.Servers.csproj">
102 <Name>OpenSim.GenericConfig.Xml</Name> 100 <Name>OpenSim.Framework.Servers</Name>
103 <Project>{E88EF749-0000-0000-0000-000000000000}</Project> 101 <Project>{2CC71860-0000-0000-0000-000000000000}</Project>
104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 102 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
105 <Private>False</Private> 103 <Private>False</Private>
106 </ProjectReference> 104 </ProjectReference>
107 <ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj"> 105 <ProjectReference Include="..\Caches\OpenSim.Region.Caches.csproj">
108 <Name>OpenSim.Physics.Manager</Name> 106 <Name>OpenSim.Region.Caches</Name>
109 <Project>{8BE16150-0000-0000-0000-000000000000}</Project> 107 <Project>{61FCCDB3-0000-0000-0000-000000000000}</Project>
110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 108 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
111 <Private>False</Private> 109 <Private>False</Private>
112 </ProjectReference> 110 </ProjectReference>
113 <ProjectReference Include="..\OpenSim.Region\OpenSim.Region.csproj"> 111 <ProjectReference Include="..\Physics\Manager\OpenSim.Region.Physics.Manager.csproj">
114 <Name>OpenSim.Region</Name> 112 <Name>OpenSim.Region.Physics.Manager</Name>
115 <Project>{196916AF-0000-0000-0000-000000000000}</Project> 113 <Project>{F4FF31EB-0000-0000-0000-000000000000}</Project>
116 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 114 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
117 <Private>False</Private> 115 <Private>False</Private>
118 </ProjectReference> 116 </ProjectReference>
119 <ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj"> 117 <ProjectReference Include="..\Terrain.BasicTerrain\OpenSim.Region.Terrain.BasicTerrain.csproj">
120 <Name>OpenSim.Servers</Name> 118 <Name>OpenSim.Region.Terrain.BasicTerrain</Name>
121 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> 119 <Project>{C9E0F891-0000-0000-0000-000000000000}</Project>
122 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
123 <Private>False</Private>
124 </ProjectReference>
125 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj">
126 <Name>OpenSim.Terrain.BasicTerrain</Name>
127 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project>
128 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
129 <Private>False</Private>
130 </ProjectReference>
131 <ProjectReference Include="..\..\Common\XmlRpcCS\XMLRPC.csproj">
132 <Name>XMLRPC</Name>
133 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
134 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 120 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
135 <Private>False</Private> 121 <Private>False</Private>
136 </ProjectReference> 122 </ProjectReference>
@@ -166,9 +152,6 @@
166 <Compile Include="UDPServer.cs"> 152 <Compile Include="UDPServer.cs">
167 <SubType>Code</SubType> 153 <SubType>Code</SubType>
168 </Compile> 154 </Compile>
169 <Compile Include="VersionInfo.cs">
170 <SubType>Code</SubType>
171 </Compile>
172 <Compile Include="Assets\InventoryCache.cs"> 155 <Compile Include="Assets\InventoryCache.cs">
173 <SubType>Code</SubType> 156 <SubType>Code</SubType>
174 </Compile> 157 </Compile>
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build b/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.dll.build
index 12dca8a..f76a4c8 100644
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build
+++ b/OpenSim/Region/ClientStack/OpenSim.Region.ClientStack.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.RegionServer" default="build"> 2<project name="OpenSim.Region.ClientStack" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,7 +8,7 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.RegionServer" dynamicprefix="true" > 11 <resources prefix="OpenSim.Region.ClientStack" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="ClientStackNetworkHandler.cs" /> 14 <include name="ClientStackNetworkHandler.cs" />
@@ -21,7 +21,6 @@
21 <include name="PacketServer.cs" /> 21 <include name="PacketServer.cs" />
22 <include name="RegionApplicationBase.cs" /> 22 <include name="RegionApplicationBase.cs" />
23 <include name="UDPServer.cs" /> 23 <include name="UDPServer.cs" />
24 <include name="VersionInfo.cs" />
25 <include name="Assets/InventoryCache.cs" /> 24 <include name="Assets/InventoryCache.cs" />
26 </sources> 25 </sources>
27 <references basedir="${project::get-base-directory()}"> 26 <references basedir="${project::get-base-directory()}">
@@ -29,25 +28,23 @@
29 <include name="${project::get-base-directory()}" /> 28 <include name="${project::get-base-directory()}" />
30 <include name="${project::get-base-directory()}/${build.dir}" /> 29 <include name="${project::get-base-directory()}/${build.dir}" />
31 </lib> 30 </lib>
32 <include name="../../bin/Axiom.MathLib.dll" /> 31 <include name="../../../bin/Axiom.MathLib.dll" />
33 <include name="../../bin/Db4objects.Db4o.dll" /> 32 <include name="../../../bin/Db4objects.Db4o.dll" />
34 <include name="../../bin/libsecondlife.dll" /> 33 <include name="../../../bin/libsecondlife.dll" />
35 <include name="../../bin/OpenSim.Caches.dll" /> 34 <include name="../../../bin/OpenSim.Framework.dll" />
36 <include name="../../bin/OpenSim.Framework.dll" /> 35 <include name="../../../bin/OpenSim.Framework.Console.dll" />
37 <include name="../../bin/OpenSim.Framework.Console.dll" /> 36 <include name="../../../bin/OpenSim.Framework.Servers.dll" />
38 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" /> 37 <include name="../../../bin/OpenSim.Region.Caches.dll" />
39 <include name="../../bin/OpenSim.Physics.Manager.dll" /> 38 <include name="../../../bin/OpenSim.Region.Physics.Manager.dll" />
40 <include name="../../bin/OpenSim.Region.dll" /> 39 <include name="../../../bin/OpenSim.Region.Terrain.BasicTerrain.dll" />
41 <include name="../../bin/OpenSim.Servers.dll" />
42 <include name="../../bin/OpenSim.Terrain.BasicTerrain.dll" />
43 <include name="System.dll" /> 40 <include name="System.dll" />
44 <include name="System.Xml.dll" /> 41 <include name="System.Xml.dll" />
45 <include name="../../bin/XMLRPC.dll" /> 42 <include name="../../../bin/XMLRPC.dll" />
46 </references> 43 </references>
47 </csc> 44 </csc>
48 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> 45 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
49 <mkdir dir="${project::get-base-directory()}/../../bin/"/> 46 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
50 <copy todir="${project::get-base-directory()}/../../bin/"> 47 <copy todir="${project::get-base-directory()}/../../../bin/">
51 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 48 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
52 <include name="*.dll"/> 49 <include name="*.dll"/>
53 <include name="*.exe"/> 50 <include name="*.exe"/>
diff --git a/OpenSim/OpenSim.RegionServer/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs
index 229570c..ffd254e 100644
--- a/OpenSim/OpenSim.RegionServer/PacketServer.cs
+++ b/OpenSim/Region/ClientStack/PacketServer.cs
@@ -34,9 +34,9 @@ using OpenSim.Framework;
34using System.Net; 34using System.Net;
35using System.Net.Sockets; 35using System.Net.Sockets;
36using OpenSim.Assets; 36using OpenSim.Assets;
37using OpenSim.Caches; 37using OpenSim.Region.Caches;
38 38
39namespace OpenSim 39namespace OpenSim.Region.ClientStack
40{ 40{
41 public class PacketServer 41 public class PacketServer
42 { 42 {
diff --git a/OpenSim/OpenSim.RegionServer/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 68a140b..94db8ee 100644
--- a/OpenSim/OpenSim.RegionServer/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -37,19 +37,18 @@ using System.Collections;
37using System.Collections.Generic; 37using System.Collections.Generic;
38using libsecondlife; 38using libsecondlife;
39using libsecondlife.Packets; 39using libsecondlife.Packets;
40using OpenSim.Terrain; 40using OpenSim.Region.Terrain;
41using OpenSim.Framework.Interfaces; 41using OpenSim.Framework.Interfaces;
42using OpenSim.Framework.Types; 42using OpenSim.Framework.Types;
43using OpenSim.Framework; 43using OpenSim.Framework;
44using OpenSim.Assets; 44using OpenSim.Assets;
45using OpenSim.Caches; 45using OpenSim.Region.Caches;
46using OpenSim.Framework.Console; 46using OpenSim.Framework.Console;
47using OpenSim.Physics.Manager; 47using OpenSim.Physics.Manager;
48using Nwc.XmlRpc; 48using Nwc.XmlRpc;
49using OpenSim.Servers; 49using OpenSim.Framework.Servers;
50using OpenSim.GenericConfig;
51 50
52namespace OpenSim 51namespace OpenSim.Region.ClientStack
53{ 52{
54 public class RegionApplicationBase 53 public class RegionApplicationBase
55 { 54 {
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index f2a02d9..259352c 100644
--- a/OpenSim/OpenSim.RegionServer/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -37,18 +37,17 @@ using System.Collections;
37using System.Collections.Generic; 37using System.Collections.Generic;
38using libsecondlife; 38using libsecondlife;
39using libsecondlife.Packets; 39using libsecondlife.Packets;
40using OpenSim.Terrain; 40using OpenSim.Region.Terrain;
41using OpenSim.Framework.Interfaces; 41using OpenSim.Framework.Interfaces;
42using OpenSim.Framework.Types; 42using OpenSim.Framework.Types;
43using OpenSim.Assets; 43using OpenSim.Assets;
44using OpenSim.Caches; 44using OpenSim.Region.Caches;
45using OpenSim.Framework.Console; 45using OpenSim.Framework.Console;
46using OpenSim.Framework; 46using OpenSim.Framework;
47using Nwc.XmlRpc; 47using Nwc.XmlRpc;
48using OpenSim.Servers; 48using OpenSim.Framework.Servers;
49using OpenSim.GenericConfig;
50 49
51namespace OpenSim 50namespace OpenSim.Region.ClientStack
52{ 51{
53 52
54 public class UDPServer : ClientStackNetworkHandler 53 public class UDPServer : ClientStackNetworkHandler
diff --git a/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index 743b9b4..bacaa3e 100644
--- a/OpenSim/OpenSim.LocalCommunications/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -33,10 +33,9 @@ using libsecondlife;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36using OpenGrid.Framework.Communications; 36using OpenSim.Framework.Communications;
37 37
38 38namespace OpenSim.Region.Communications.Local
39namespace OpenSim.LocalCommunications
40{ 39{
41 public class CommunicationsLocal : CommunicationsManager 40 public class CommunicationsLocal : CommunicationsManager
42 { 41 {
@@ -46,8 +45,8 @@ namespace OpenSim.LocalCommunications
46 public CommunicationsLocal(NetworkServersInfo serversInfo) 45 public CommunicationsLocal(NetworkServersInfo serversInfo)
47 : base(serversInfo) 46 : base(serversInfo)
48 { 47 {
49 UserServices = new LocalUserServices(this , serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY); 48 UserServices = new LocalUserServices(this,this.ServersInfo.DefaultHomeLocX,this.ServersInfo.DefaultHomeLocY);
50 UserServices.AddPlugin("OpenGrid.Framework.Data.DB4o.dll"); 49 UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");
51 UserServer = UserServices; 50 UserServer = UserServices;
52 GridServer = SandBoxServices; 51 GridServer = SandBoxServices;
53 InterRegion = SandBoxServices; 52 InterRegion = SandBoxServices;
diff --git a/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
index ce48c6e..26834be 100644
--- a/OpenSim/OpenSim.LocalCommunications/LocalBackEndServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -28,12 +28,12 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenGrid.Framework.Communications;
32using libsecondlife; 31using libsecondlife;
33using OpenSim.Framework.Types; 32using OpenSim.Framework.Types;
34using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications;
35 35
36namespace OpenSim.LocalCommunications 36namespace OpenSim.Region.Communications.Local
37{ 37{
38 38
39 public class LocalBackEndServices : IGridServices, IInterRegionCommunications 39 public class LocalBackEndServices : IGridServices, IInterRegionCommunications
@@ -182,7 +182,6 @@ namespace OpenSim.LocalCommunications
182 /// <returns></returns> 182 /// <returns></returns>
183 public bool AddNewSession(ulong regionHandle, Login loginData) 183 public bool AddNewSession(ulong regionHandle, Login loginData)
184 { 184 {
185 //Console.WriteLine(" comms manager been told to expect new user");
186 AgentCircuitData agent = new AgentCircuitData(); 185 AgentCircuitData agent = new AgentCircuitData();
187 agent.AgentID = loginData.Agent; 186 agent.AgentID = loginData.Agent;
188 agent.firstname = loginData.First; 187 agent.firstname = loginData.First;
diff --git a/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs
index a7f7aa4..6cf254b 100644
--- a/OpenSim/OpenSim.LocalCommunications/LocalUserServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs
@@ -3,16 +3,16 @@ using System.Collections;
3using System.Collections.Generic; 3using System.Collections.Generic;
4using System.Text; 4using System.Text;
5 5
6using OpenGrid.Framework.Communications; 6using OpenSim.Framework.Communications;
7//using OpenSim.Framework.User; 7//using OpenSim.Framework.User;
8using OpenGrid.Framework.UserManagement; 8using OpenSim.Framework.UserManagement;
9using OpenGrid.Framework.Data; 9using OpenSim.Framework.Data;
10using OpenSim.Framework.Types; 10using OpenSim.Framework.Types;
11using OpenSim.Framework.Utilities; 11using OpenSim.Framework.Utilities;
12 12
13using libsecondlife; 13using libsecondlife;
14 14
15namespace OpenSim.LocalCommunications 15namespace OpenSim.Region.Communications.Local
16{ 16{
17 public class LocalUserServices : UserManagerBase, IUserServices 17 public class LocalUserServices : UserManagerBase, IUserServices
18 { 18 {
@@ -36,6 +36,7 @@ namespace OpenSim.LocalCommunications
36 { 36 {
37 return this.getUserProfile(name); 37 return this.getUserProfile(name);
38 } 38 }
39
39 public UserProfileData GetUserProfile(LLUUID avatarID) 40 public UserProfileData GetUserProfile(LLUUID avatarID)
40 { 41 {
41 return this.getUserProfile(avatarID); 42 return this.getUserProfile(avatarID);
@@ -87,7 +88,7 @@ namespace OpenSim.LocalCommunications
87 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + 88 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
88 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; 89 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
89 string capsPath = Util.GetRandomCapsPath(); 90 string capsPath = Util.GetRandomCapsPath();
90 response.SimAddress = reg.CommsIPListenAddr; 91 response.SimAddress = reg.CommsExternalAddress;
91 response.SimPort = (Int32)reg.CommsIPListenPort; 92 response.SimPort = (Int32)reg.CommsIPListenPort;
92 response.RegionX = reg.RegionLocX ; 93 response.RegionX = reg.RegionLocX ;
93 response.RegionY = reg.RegionLocY ; 94 response.RegionY = reg.RegionLocY ;
@@ -114,5 +115,31 @@ namespace OpenSim.LocalCommunications
114 115
115 } 116 }
116 117
118 public UserProfileData SetupMasterUser(string firstName, string lastName)
119 {
120 return SetupMasterUser(firstName, lastName, "");
121 }
122
123 public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
124 {
125 UserProfileData profile = getUserProfile(firstName, lastName);
126 if (profile != null)
127 {
128
129 return profile;
130 }
131
132 Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account");
133 this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY);
134
135 profile = getUserProfile(firstName, lastName);
136
137 if (profile == null)
138 {
139 Console.WriteLine("Unknown Master User after creation attempt. No clue what to do here.");
140 }
141
142 return profile;
143 }
117 } 144 }
118} 145}
diff --git a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj
index 3cb36da..0a15a49 100644
--- a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.csproj
+++ b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{79CED992-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{BFB5D807-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.LocalCommunications</AssemblyName> 12 <AssemblyName>OpenSim.Region.Communications.Local</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.LocalCommunications</RootNamespace> 19 <RootNamespace>OpenSim.Region.Communications.Local</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,7 +59,7 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="libsecondlife.dll" > 61 <Reference Include="libsecondlife.dll" >
62 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 62 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="System" > 65 <Reference Include="System" >
@@ -72,27 +72,27 @@
72 </Reference> 72 </Reference>
73 </ItemGroup> 73 </ItemGroup>
74 <ItemGroup> 74 <ItemGroup>
75 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj"> 75 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
76 <Name>OpenGrid.Framework.Communications</Name> 76 <Name>OpenSim.Framework</Name>
77 <Project>{683344D5-0000-0000-0000-000000000000}</Project> 77 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
79 <Private>False</Private> 79 <Private>False</Private>
80 </ProjectReference> 80 </ProjectReference>
81 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> 81 <ProjectReference Include="..\..\..\Framework\Communications\OpenSim.Framework.Communications.csproj">
82 <Name>OpenGrid.Framework.Data</Name> 82 <Name>OpenSim.Framework.Communications</Name>
83 <Project>{62CDF671-0000-0000-0000-000000000000}</Project> 83 <Project>{CB52B7E7-0000-0000-0000-000000000000}</Project>
84 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 84 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
85 <Private>False</Private> 85 <Private>False</Private>
86 </ProjectReference> 86 </ProjectReference>
87 <ProjectReference Include="..\..\Common\OpenGrid.Framework.UserManager\OpenGrid.Framework.UserManagement.csproj"> 87 <ProjectReference Include="..\..\..\Framework\Data\OpenSim.Framework.Data.csproj">
88 <Name>OpenGrid.Framework.UserManagement</Name> 88 <Name>OpenSim.Framework.Data</Name>
89 <Project>{DA9A7391-0000-0000-0000-000000000000}</Project> 89 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
90 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 90 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
91 <Private>False</Private> 91 <Private>False</Private>
92 </ProjectReference> 92 </ProjectReference>
93 <ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 93 <ProjectReference Include="..\..\..\Framework\UserManager\OpenSim.Framework.UserManagement.csproj">
94 <Name>OpenSim.Framework</Name> 94 <Name>OpenSim.Framework.UserManagement</Name>
95 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 95 <Project>{586E2916-0000-0000-0000-000000000000}</Project>
96 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 96 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
97 <Private>False</Private> 97 <Private>False</Private>
98 </ProjectReference> 98 </ProjectReference>
diff --git a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.dll.build b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build
index 2b72e2d..3cac9d3 100644
--- a/OpenSim/OpenSim.LocalCommunications/OpenSim.LocalCommunications.dll.build
+++ b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.LocalCommunications" default="build"> 2<project name="OpenSim.Region.Communications.Local" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,7 +8,7 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.LocalCommunications" dynamicprefix="true" > 11 <resources prefix="OpenSim.Region.Communications.Local" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="CommunicationsLocal.cs" /> 14 <include name="CommunicationsLocal.cs" />
@@ -21,18 +21,18 @@
21 <include name="${project::get-base-directory()}" /> 21 <include name="${project::get-base-directory()}" />
22 <include name="${project::get-base-directory()}/${build.dir}" /> 22 <include name="${project::get-base-directory()}/${build.dir}" />
23 </lib> 23 </lib>
24 <include name="../../bin/libsecondlife.dll" /> 24 <include name="../../../../bin/libsecondlife.dll" />
25 <include name="../../bin/OpenGrid.Framework.Communications.dll" /> 25 <include name="../../../../bin/OpenSim.Framework.dll" />
26 <include name="../../bin/OpenGrid.Framework.Data.dll" /> 26 <include name="../../../../bin/OpenSim.Framework.Communications.dll" />
27 <include name="../../bin/OpenGrid.Framework.UserManagement.dll" /> 27 <include name="../../../../bin/OpenSim.Framework.Data.dll" />
28 <include name="../../bin/OpenSim.Framework.dll" /> 28 <include name="../../../../bin/OpenSim.Framework.UserManagement.dll" />
29 <include name="System.dll" /> 29 <include name="System.dll" />
30 <include name="System.Xml.dll" /> 30 <include name="System.Xml.dll" />
31 </references> 31 </references>
32 </csc> 32 </csc>
33 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> 33 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
34 <mkdir dir="${project::get-base-directory()}/../../bin/"/> 34 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
35 <copy todir="${project::get-base-directory()}/../../bin/"> 35 <copy todir="${project::get-base-directory()}/../../../../bin/">
36 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 36 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
37 <include name="*.dll"/> 37 <include name="*.dll"/>
38 <include name="*.exe"/> 38 <include name="*.exe"/>
diff --git a/OpenSim/OpenSim.LocalCommunications/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs
index 8e6e711..1eb7107 100644
--- a/OpenSim/OpenSim.LocalCommunications/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.LocalCommunications")] 8[assembly: AssemblyTitle("OpenSim.Region.Communications.Local")]
9[assembly: AssemblyDescription("")] 9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")] 10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")] 11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.LocalCommunications")] 12[assembly: AssemblyProduct("OpenSim.Region.Communications.Local")]
13[assembly: AssemblyCopyright("Copyright © 2007")] 13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
new file mode 100644
index 0000000..870f577
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
@@ -0,0 +1,18 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Types;
5using OpenSim.Framework.Communications;
6namespace OpenSim.Region.Communications.OGS1
7{
8 public class CommunicationsOGS1 : CommunicationsManager
9 {
10 private OGS1GridServices gridInterComms = new OGS1GridServices();
11 public CommunicationsOGS1(NetworkServersInfo serversInfo) :base(serversInfo)
12 {
13 GridServer = gridInterComms;
14 InterRegion = gridInterComms;
15 UserServer = new OGS1UserServices(this);
16 }
17 }
18}
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
new file mode 100644
index 0000000..5f0c80c
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -0,0 +1,248 @@
1using System;
2using System.Collections.Generic;
3using System.Collections;
4using System.Text;
5using System.Runtime.Remoting;
6using System.Runtime.Remoting.Channels;
7using System.Runtime.Remoting.Channels.Tcp;
8
9using OpenSim.Framework.Servers;
10using OpenSim.Framework;
11using OpenSim.Framework.Types;
12using OpenSim.Framework.Communications;
13
14using Nwc.XmlRpc;
15using libsecondlife;
16
17namespace OpenSim.Region.Communications.OGS1
18{
19 public class OGS1GridServices : IGridServices, IInterRegionCommunications
20 {
21 public Dictionary<ulong, RegionCommsListener> listeners = new Dictionary<ulong, RegionCommsListener>();
22 public GridInfo grid;
23 public BaseHttpServer httpListener;
24 private bool initialised = false;
25
26 public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo)
27 {
28 Hashtable GridParams = new Hashtable();
29
30 grid = gridInfo;
31
32 // Login / Authentication
33 GridParams["authkey"] = gridInfo.GridServerSendKey;
34 GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated();
35 GridParams["sim_ip"] = regionInfo.CommsExternalAddress;
36 GridParams["sim_port"] = regionInfo.CommsIPListenPort.ToString();
37
38 // Package into an XMLRPC Request
39 ArrayList SendParams = new ArrayList();
40 SendParams.Add(GridParams);
41
42 // Send Request
43 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
44 XmlRpcResponse GridResp = GridReq.Send(gridInfo.GridServerURI, 3000);
45 Hashtable GridRespData = (Hashtable)GridResp.Value;
46 Hashtable griddatahash = GridRespData;
47
48 // Process Response
49 if (GridRespData.ContainsKey("error"))
50 {
51 string errorstring = (string)GridRespData["error"];
52 OpenSim.Framework.Console.MainLog.Instance.Error("Unable to connect to grid: " + errorstring);
53 return null;
54 }
55
56 if (!this.listeners.ContainsKey(regionInfo.RegionHandle))
57 {
58 // initialised = true;
59 httpListener = new BaseHttpServer(regionInfo.CommsIPListenPort);
60 httpListener.AddXmlRPCHandler("expect_user", this.ExpectUser);
61 httpListener.Start();
62 }
63
64 // Initialise the background listeners
65 listeners[regionInfo.RegionHandle] = new RegionCommsListener();
66
67 return listeners[regionInfo.RegionHandle];
68 }
69
70 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
71 {
72 Hashtable respData = MapBlockQuery((int)regionInfo.RegionLocX - 1, (int)regionInfo.RegionLocY - 1, (int)regionInfo.RegionLocX + 1, (int)regionInfo.RegionLocY + 1);
73
74 List<RegionInfo> neighbours = new List<RegionInfo>();
75
76 foreach (Hashtable n in (Hashtable)respData.Values)
77 {
78 RegionInfo neighbour = new RegionInfo();
79
80 //OGS1
81 neighbour.RegionHandle = (ulong)n["regionhandle"];
82 neighbour.RegionLocX = (uint)n["x"];
83 neighbour.RegionLocY = (uint)n["y"];
84 neighbour.RegionName = (string)n["name"];
85
86 //OGS1+
87 neighbour.CommsIPListenAddr = (string)n["sim_ip"];
88 neighbour.CommsIPListenPort = (int)n["sim_port"];
89 neighbour.CommsExternalAddress = (string)n["sim_uri"];
90 neighbour.SimUUID = (string)n["uuid"];
91
92 neighbours.Add(neighbour);
93 }
94
95 return neighbours;
96 }
97
98 public RegionInfo RequestNeighbourInfo(ulong regionHandle)
99 {
100 OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented - RequestNeighbourInfo()");
101 return null;
102 }
103
104 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
105 {
106 Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY);
107
108 List<MapBlockData> neighbours = new List<MapBlockData>();
109
110 foreach (Hashtable n in (Hashtable)respData.Values)
111 {
112 MapBlockData neighbour = new MapBlockData();
113
114 neighbour.X = (ushort)n["x"];
115 neighbour.Y = (ushort)n["y"];
116
117 neighbour.Name = (string)n["name"];
118 neighbour.Access = (byte)n["access"];
119 neighbour.RegionFlags = (uint)n["region-flags"];
120 neighbour.WaterHeight = (byte)n["water-height"];
121 neighbour.MapImageId = (string)n["map-image-id"];
122
123 neighbours.Add(neighbour);
124 }
125
126 return neighbours;
127 }
128
129 /// <summary>
130 /// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates
131 /// </summary>
132 /// <remarks>REDUNDANT - OGS1 is to be phased out in favour of OGS2</remarks>
133 /// <param name="minX">Minimum X value</param>
134 /// <param name="minY">Minimum Y value</param>
135 /// <param name="maxX">Maximum X value</param>
136 /// <param name="maxY">Maximum Y value</param>
137 /// <returns>Hashtable of hashtables containing map data elements</returns>
138 private Hashtable MapBlockQuery(int minX, int minY, int maxX, int maxY)
139 {
140 Hashtable param = new Hashtable();
141 param["xmin"] = minX;
142 param["ymin"] = minY;
143 param["xmax"] = maxX;
144 param["ymax"] = maxY;
145 IList parameters = new ArrayList();
146 parameters.Add(param);
147 XmlRpcRequest req = new XmlRpcRequest("map_block", parameters);
148 XmlRpcResponse resp = req.Send(grid.GridServerURI, 3000);
149 Hashtable respData = (Hashtable)resp.Value;
150 return respData;
151 }
152
153 // Grid Request Processing
154 public XmlRpcResponse ExpectUser(XmlRpcRequest request)
155 {
156 Hashtable requestData = (Hashtable)request.Params[0];
157 AgentCircuitData agentData = new AgentCircuitData();
158 agentData.SessionID = new LLUUID((string)requestData["session_id"]);
159 agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]);
160 agentData.firstname = (string)requestData["firstname"];
161 agentData.lastname = (string)requestData["lastname"];
162 agentData.AgentID = new LLUUID((string)requestData["agent_id"]);
163 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
164 if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
165 {
166 agentData.child = true;
167 }
168 else
169 {
170 agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"]));
171 agentData.child = false;
172
173 }
174
175 if (listeners.ContainsKey((ulong)requestData["regionhandle"]))
176 {
177 this.listeners[(ulong)requestData["regionhandle"]].TriggerExpectUser((ulong)requestData["regionhandle"], agentData);
178 }
179 else
180 {
181 OpenSim.Framework.Console.MainLog.Instance.Error("ExpectUser() - Unknown region " + ((ulong)requestData["regionhandle"]).ToString());
182 }
183
184 return new XmlRpcResponse();
185 }
186
187 #region InterRegion Comms
188 private void StartRemoting()
189 {
190 TcpChannel ch = new TcpChannel(8895);
191 ChannelServices.RegisterChannel(ch);
192
193 WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry( Type.GetType("OGS1InterRegionRemoting"), "InterRegions", WellKnownObjectMode.Singleton);
194 RemotingConfiguration.RegisterWellKnownServiceType(wellType);
195 InterRegionSingleton.Instance.OnArrival += this.IncomingArrival;
196 InterRegionSingleton.Instance.OnChildAgent += this.IncomingChildAgent;
197 }
198
199 #region Methods called by regions in this instance
200 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
201 {
202 if (this.listeners.ContainsKey(regionHandle))
203 {
204 this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
205 return true;
206 }
207 //TODO need to see if we know about where this region is and use .net remoting
208 // to inform it.
209 return false;
210 }
211
212 public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
213 {
214 if (this.listeners.ContainsKey(regionHandle))
215 {
216 this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
217 return true;
218 }
219 //TODO need to see if we know about where this region is and use .net remoting
220 // to inform it.
221 return false;
222 }
223 #endregion
224
225 #region Methods triggered by calls from external instances
226 public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
227 {
228 if (this.listeners.ContainsKey(regionHandle))
229 {
230 this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData);
231 return true;
232 }
233 return false;
234 }
235
236 public bool IncomingArrival(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
237 {
238 if (this.listeners.ContainsKey(regionHandle))
239 {
240 this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
241 return true;
242 }
243 return false;
244 }
245 #endregion
246 #endregion
247 }
248}
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
new file mode 100644
index 0000000..51b33e9
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
@@ -0,0 +1,70 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Types;
5using OpenSim.Framework.Communications;
6namespace OpenSim.Region.Communications.OGS1
7{
8 public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData);
9 public delegate bool ExpectArrival(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position);
10
11 public sealed class InterRegionSingleton
12 {
13 static readonly InterRegionSingleton instance = new InterRegionSingleton();
14
15 public event InformRegionChild OnChildAgent;
16 public event ExpectArrival OnArrival;
17
18 static InterRegionSingleton()
19 {
20 }
21
22 InterRegionSingleton()
23 {
24 }
25
26 public static InterRegionSingleton Instance
27 {
28 get
29 {
30 return instance;
31 }
32 }
33
34 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
35 {
36 if (OnChildAgent != null)
37 {
38 return OnChildAgent(regionHandle, agentData);
39 }
40 return false;
41 }
42
43 public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
44 {
45 if (OnArrival != null)
46 {
47 return OnArrival(regionHandle, agentID, position);
48 }
49 return false;
50 }
51 }
52
53 public class OGS1InterRegionRemoting : MarshalByRefObject
54 {
55
56 public OGS1InterRegionRemoting()
57 {
58 }
59
60 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
61 {
62 return InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, agentData);
63 }
64
65 public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
66 {
67 return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position);
68 }
69 }
70}
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
new file mode 100644
index 0000000..856c447
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -0,0 +1,109 @@
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.Text;
5using OpenSim.Framework.Types;
6using OpenSim.Framework.Communications;
7using OpenSim.Framework.Data;
8using libsecondlife;
9
10using Nwc.XmlRpc;
11
12namespace OpenSim.Region.Communications.OGS1
13{
14 public class OGS1UserServices :IUserServices
15 {
16 CommunicationsOGS1 m_parent;
17 public OGS1UserServices(CommunicationsOGS1 parent)
18 {
19 m_parent = parent;
20 }
21
22 public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data)
23 {
24 if (data.Contains("error_type"))
25 {
26 Console.WriteLine("Error sent by user server when trying to get user profile: (" + data["error_type"] + "): " + data["error_desc"]);
27 return null;
28 }
29
30 UserProfileData userData = new UserProfileData();
31 userData.username = (string)data["firstname"];
32 userData.surname = (string)data["lastname"];
33 userData.UUID = new LLUUID((string)data["uuid"]);
34 userData.userInventoryURI = (string)data["server_inventory"];
35 userData.userAssetURI = (string)data["server_asset"];
36 userData.profileFirstText = (string)data["profile_firstlife_about"];
37 userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]);
38 userData.profileCanDoMask = (uint)data["profile_can_do"];
39 userData.profileWantDoMask = (uint)data["profile_want_do"];
40 userData.profileImage = new LLUUID((string)data["profile_image"]);
41 userData.lastLogin = (int)data["profile_lastlogin"];
42 userData.homeLocation = new LLVector3();
43 userData.homeLookAt = new LLVector3();
44
45 return userData;
46 }
47 public UserProfileData GetUserProfile(string firstName, string lastName)
48 {
49 return GetUserProfile(firstName + " " + lastName);
50 }
51 public UserProfileData GetUserProfile(string name)
52 {
53
54 try
55 {
56 Hashtable param = new Hashtable();
57 param["avatar_name"] = name;
58 IList parameters = new ArrayList();
59 parameters.Add(param);
60 XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters);
61 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
62 Hashtable respData = (Hashtable)resp.Value;
63
64 return ConvertXMLRPCDataToUserProfile(respData);
65 }
66 catch (Exception e)
67 {
68 Console.WriteLine("Error when trying to fetch profile data by name from remote user server: " + e.Message);
69 }
70 return null;
71 }
72 public UserProfileData GetUserProfile(LLUUID avatarID)
73 {
74 try
75 {
76
77 Hashtable param = new Hashtable();
78 param["avatar_uuid"] = avatarID.ToString();
79 IList parameters = new ArrayList();
80 parameters.Add(param);
81 XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters);
82 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
83 Hashtable respData = (Hashtable)resp.Value;
84
85 return ConvertXMLRPCDataToUserProfile(respData);
86 }
87 catch (Exception e)
88 {
89 Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " + e.Message);
90 }
91 return null;
92 }
93
94 public UserProfileData SetupMasterUser(string firstName, string lastName)
95 {
96 return SetupMasterUser(firstName, lastName, "");
97 }
98
99 public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
100 {
101 UserProfileData profile = GetUserProfile(firstName, lastName);
102 if (profile == null)
103 {
104 Console.WriteLine("Unknown Master User. Grid Mode: No clue what I should do. Probably would choose the grid owner UUID when that is implemented");
105 }
106 return null;
107 }
108 }
109}
diff --git a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
new file mode 100644
index 0000000..d6abd13
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
@@ -0,0 +1,142 @@
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>{4806E378-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.Region.Communications.OGS1</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.Region.Communications.OGS1</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="libsecondlife.dll" >
62 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System" >
66 <HintPath>System.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Data" >
70 <HintPath>System.Data.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="System.Runtime.Remoting" >
74 <HintPath>System.Runtime.Remoting.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="System.Xml" >
78 <HintPath>System.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="XMLRPC.dll" >
82 <HintPath>..\..\..\..\bin\XMLRPC.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 </ItemGroup>
86 <ItemGroup>
87 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
88 <Name>OpenSim.Framework</Name>
89 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
90 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
91 <Private>False</Private>
92 </ProjectReference>
93 <ProjectReference Include="..\..\..\Framework\Communications\OpenSim.Framework.Communications.csproj">
94 <Name>OpenSim.Framework.Communications</Name>
95 <Project>{CB52B7E7-0000-0000-0000-000000000000}</Project>
96 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
97 <Private>False</Private>
98 </ProjectReference>
99 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
100 <Name>OpenSim.Framework.Console</Name>
101 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
102 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
103 <Private>False</Private>
104 </ProjectReference>
105 <ProjectReference Include="..\..\..\Framework\Data\OpenSim.Framework.Data.csproj">
106 <Name>OpenSim.Framework.Data</Name>
107 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
108 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
109 <Private>False</Private>
110 </ProjectReference>
111 <ProjectReference Include="..\..\..\Framework\Servers\OpenSim.Framework.Servers.csproj">
112 <Name>OpenSim.Framework.Servers</Name>
113 <Project>{2CC71860-0000-0000-0000-000000000000}</Project>
114 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
115 <Private>False</Private>
116 </ProjectReference>
117 </ItemGroup>
118 <ItemGroup>
119 <Compile Include="CommunicationsOGS1.cs">
120 <SubType>Code</SubType>
121 </Compile>
122 <Compile Include="OGS1GridServices.cs">
123 <SubType>Code</SubType>
124 </Compile>
125 <Compile Include="OGS1InterSimComms.cs">
126 <SubType>Code</SubType>
127 </Compile>
128 <Compile Include="OGS1UserServices.cs">
129 <SubType>Code</SubType>
130 </Compile>
131 <Compile Include="Properties\AssemblyInfo.cs">
132 <SubType>Code</SubType>
133 </Compile>
134 </ItemGroup>
135 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
136 <PropertyGroup>
137 <PreBuildEvent>
138 </PreBuildEvent>
139 <PostBuildEvent>
140 </PostBuildEvent>
141 </PropertyGroup>
142</Project>
diff --git a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build
new file mode 100644
index 0000000..04d61b9
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build
@@ -0,0 +1,53 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.Communications.OGS1" 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.Region.Communications.OGS1" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="CommunicationsOGS1.cs" />
15 <include name="OGS1GridServices.cs" />
16 <include name="OGS1InterSimComms.cs" />
17 <include name="OGS1UserServices.cs" />
18 <include name="Properties/AssemblyInfo.cs" />
19 </sources>
20 <references basedir="${project::get-base-directory()}">
21 <lib>
22 <include name="${project::get-base-directory()}" />
23 <include name="${project::get-base-directory()}/${build.dir}" />
24 </lib>
25 <include name="../../../../bin/libsecondlife.dll" />
26 <include name="../../../../bin/OpenSim.Framework.dll" />
27 <include name="../../../../bin/OpenSim.Framework.Communications.dll" />
28 <include name="../../../../bin/OpenSim.Framework.Console.dll" />
29 <include name="../../../../bin/OpenSim.Framework.Data.dll" />
30 <include name="../../../../bin/OpenSim.Framework.Servers.dll" />
31 <include name="System.dll" />
32 <include name="System.Data.dll" />
33 <include name="System.Runtime.Remoting.dll" />
34 <include name="System.Xml.dll" />
35 <include name="../../../../bin/XMLRPC.dll" />
36 </references>
37 </csc>
38 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
39 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
40 <copy todir="${project::get-base-directory()}/../../../../bin/">
41 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
42 <include name="*.dll"/>
43 <include name="*.exe"/>
44 </fileset>
45 </copy>
46 </target>
47 <target name="clean">
48 <delete dir="${bin.dir}" failonerror="false" />
49 <delete dir="${obj.dir}" failonerror="false" />
50 </target>
51 <target name="doc" description="Creates documentation.">
52 </target>
53</project>
diff --git a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..0c6f965
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
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("OpenGrid.Framework.Communications.OGS1")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.Framework.Communications.OGS1")]
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("a8b2b39b-c83b-41e2-b0b5-7ccfc1fddae7")]
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// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/OpenSim.Region/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs
index dcb5564..c2c1ecf 100644
--- a/OpenSim/OpenSim.Region/EstateManager.cs
+++ b/OpenSim/Region/Environment/EstateManager.cs
@@ -30,15 +30,15 @@ using System.Collections.Generic;
30using System.Text; 30using System.Text;
31using OpenSim.Framework.Types; 31using OpenSim.Framework.Types;
32using OpenSim.Framework.Interfaces; 32using OpenSim.Framework.Interfaces;
33using OpenSim.Region; 33using OpenSim.Region.Environment;
34using OpenSim.Region.Scenes; 34using OpenSim.Region.Environment.Scenes;
35using OpenSim; 35using OpenSim;
36using libsecondlife; 36using libsecondlife;
37using libsecondlife.Packets; 37using libsecondlife.Packets;
38using Avatar = OpenSim.Region.Scenes.ScenePresence; 38using Avatar = OpenSim.Region.Environment.Scenes.ScenePresence;
39 39
40 40
41namespace OpenSim.Region 41namespace OpenSim.Region.Environment
42{ 42{
43 43
44 /// <summary> 44 /// <summary>
diff --git a/OpenSim/OpenSim.Region/OpenSim.Region.csproj b/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj
index 79f204d..428f381 100644
--- a/OpenSim/OpenSim.Region/OpenSim.Region.csproj
+++ b/OpenSim/Region/Environment/OpenSim.Region.Environment.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{196916AF-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{DCBA491C-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Region</AssemblyName> 12 <AssemblyName>OpenSim.Region.Environment</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Region</RootNamespace> 19 <RootNamespace>OpenSim.Region.Environment</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,15 +59,15 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Axiom.MathLib.dll" > 61 <Reference Include="Axiom.MathLib.dll" >
62 <HintPath>..\..\bin\Axiom.MathLib.dll</HintPath> 62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="Db4objects.Db4o.dll" > 65 <Reference Include="Db4objects.Db4o.dll" >
66 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> 66 <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath>
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="libsecondlife.dll" > 69 <Reference Include="libsecondlife.dll" >
70 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 70 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
71 <Private>False</Private> 71 <Private>False</Private>
72 </Reference> 72 </Reference>
73 <Reference Include="Microsoft.JScript" > 73 <Reference Include="Microsoft.JScript" >
@@ -82,71 +82,68 @@
82 <HintPath>System.Xml.dll</HintPath> 82 <HintPath>System.Xml.dll</HintPath>
83 <Private>False</Private> 83 <Private>False</Private>
84 </Reference> 84 </Reference>
85 <Reference Include="VJSharpCodeProvider" > 85 <Reference Include="XMLRPC.dll" >
86 <HintPath>VJSharpCodeProvider.dll</HintPath> 86 <HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
87 <Private>False</Private> 87 <Private>False</Private>
88 </Reference> 88 </Reference>
89 </ItemGroup> 89 </ItemGroup>
90 <ItemGroup> 90 <ItemGroup>
91 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj"> 91 <ProjectReference Include="..\..\Framework\General\OpenSim.Framework.csproj">
92 <Name>OpenGrid.Framework.Communications</Name> 92 <Name>OpenSim.Framework</Name>
93 <Project>{683344D5-0000-0000-0000-000000000000}</Project> 93 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
94 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 94 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
95 <Private>False</Private> 95 <Private>False</Private>
96 </ProjectReference> 96 </ProjectReference>
97 <ProjectReference Include="..\OpenSim.Caches\OpenSim.Caches.csproj"> 97 <ProjectReference Include="..\..\Framework\Communications\OpenSim.Framework.Communications.csproj">
98 <Name>OpenSim.Caches</Name> 98 <Name>OpenSim.Framework.Communications</Name>
99 <Project>{1938EB12-0000-0000-0000-000000000000}</Project> 99 <Project>{CB52B7E7-0000-0000-0000-000000000000}</Project>
100 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 100 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
101 <Private>False</Private> 101 <Private>False</Private>
102 </ProjectReference> 102 </ProjectReference>
103 <ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 103 <ProjectReference Include="..\..\Framework\Console\OpenSim.Framework.Console.csproj">
104 <Name>OpenSim.Framework</Name> 104 <Name>OpenSim.Framework.Console</Name>
105 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 105 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
106 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 106 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
107 <Private>False</Private> 107 <Private>False</Private>
108 </ProjectReference> 108 </ProjectReference>
109 <ProjectReference Include="..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 109 <ProjectReference Include="..\..\Framework\GenericConfig\Xml\OpenSim.Framework.GenericConfig.Xml.csproj">
110 <Name>OpenSim.Framework.Console</Name> 110 <Name>OpenSim.Framework.GenericConfig.Xml</Name>
111 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 111 <Project>{C74E4A30-0000-0000-0000-000000000000}</Project>
112 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 112 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
113 <Private>False</Private> 113 <Private>False</Private>
114 </ProjectReference> 114 </ProjectReference>
115 <ProjectReference Include="..\..\Common\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj"> 115 <ProjectReference Include="..\..\Framework\Servers\OpenSim.Framework.Servers.csproj">
116 <Name>OpenSim.GenericConfig.Xml</Name> 116 <Name>OpenSim.Framework.Servers</Name>
117 <Project>{E88EF749-0000-0000-0000-000000000000}</Project> 117 <Project>{2CC71860-0000-0000-0000-000000000000}</Project>
118 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 118 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
119 <Private>False</Private> 119 <Private>False</Private>
120 </ProjectReference> 120 </ProjectReference>
121 <ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj"> 121 <ProjectReference Include="..\Caches\OpenSim.Region.Caches.csproj">
122 <Name>OpenSim.Physics.Manager</Name> 122 <Name>OpenSim.Region.Caches</Name>
123 <Project>{8BE16150-0000-0000-0000-000000000000}</Project> 123 <Project>{61FCCDB3-0000-0000-0000-000000000000}</Project>
124 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 124 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
125 <Private>False</Private> 125 <Private>False</Private>
126 </ProjectReference> 126 </ProjectReference>
127 <ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj"> 127 <ProjectReference Include="..\Capabilities\OpenSim.Region.Capabilities.csproj">
128 <Name>OpenSim.Servers</Name> 128 <Name>OpenSim.Region.Capabilities</Name>
129 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> 129 <Project>{39038E85-0000-0000-0000-000000000000}</Project>
130 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 130 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
131 <Private>False</Private> 131 <Private>False</Private>
132 </ProjectReference> 132 </ProjectReference>
133 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj"> 133 <ProjectReference Include="..\Physics\Manager\OpenSim.Region.Physics.Manager.csproj">
134 <Name>OpenSim.Terrain.BasicTerrain</Name> 134 <Name>OpenSim.Region.Physics.Manager</Name>
135 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project> 135 <Project>{F4FF31EB-0000-0000-0000-000000000000}</Project>
136 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 136 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
137 <Private>False</Private> 137 <Private>False</Private>
138 </ProjectReference> 138 </ProjectReference>
139 <ProjectReference Include="..\..\Common\XmlRpcCS\XMLRPC.csproj"> 139 <ProjectReference Include="..\Terrain.BasicTerrain\OpenSim.Region.Terrain.BasicTerrain.csproj">
140 <Name>XMLRPC</Name> 140 <Name>OpenSim.Region.Terrain.BasicTerrain</Name>
141 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> 141 <Project>{C9E0F891-0000-0000-0000-000000000000}</Project>
142 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 142 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
143 <Private>False</Private> 143 <Private>False</Private>
144 </ProjectReference> 144 </ProjectReference>
145 </ItemGroup> 145 </ItemGroup>
146 <ItemGroup> 146 <ItemGroup>
147 <Compile Include="Caps.cs">
148 <SubType>Code</SubType>
149 </Compile>
150 <Compile Include="EstateManager.cs"> 147 <Compile Include="EstateManager.cs">
151 <SubType>Code</SubType> 148 <SubType>Code</SubType>
152 </Compile> 149 </Compile>
@@ -171,9 +168,6 @@
171 <Compile Include="Scenes\Scene.PacketHandlers.cs"> 168 <Compile Include="Scenes\Scene.PacketHandlers.cs">
172 <SubType>Code</SubType> 169 <SubType>Code</SubType>
173 </Compile> 170 </Compile>
174 <Compile Include="Scenes\Scene.Scripting.cs">
175 <SubType>Code</SubType>
176 </Compile>
177 <Compile Include="Scenes\SceneBase.cs"> 171 <Compile Include="Scenes\SceneBase.cs">
178 <SubType>Code</SubType> 172 <SubType>Code</SubType>
179 </Compile> 173 </Compile>
@@ -207,9 +201,6 @@
207 <Compile Include="Scenes\scripting\Engines\JScriptEngine.cs"> 201 <Compile Include="Scenes\scripting\Engines\JScriptEngine.cs">
208 <SubType>Code</SubType> 202 <SubType>Code</SubType>
209 </Compile> 203 </Compile>
210 <Compile Include="Scenes\scripting\Engines\JSharpScriptEngine.cs">
211 <SubType>Code</SubType>
212 </Compile>
213 </ItemGroup> 204 </ItemGroup>
214 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> 205 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
215 <PropertyGroup> 206 <PropertyGroup>
diff --git a/OpenSim/OpenSim.Region/OpenSim.Region.dll.build b/OpenSim/Region/Environment/OpenSim.Region.Environment.dll.build
index 926b9ed..2fa5e76 100644
--- a/OpenSim/OpenSim.Region/OpenSim.Region.dll.build
+++ b/OpenSim/Region/Environment/OpenSim.Region.Environment.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.Region" default="build"> 2<project name="OpenSim.Region.Environment" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,10 +8,9 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.Region" dynamicprefix="true" > 11 <resources prefix="OpenSim.Region.Environment" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="Caps.cs" />
15 <include name="EstateManager.cs" /> 14 <include name="EstateManager.cs" />
16 <include name="ParcelManager.cs" /> 15 <include name="ParcelManager.cs" />
17 <include name="RegionManager.cs" /> 16 <include name="RegionManager.cs" />
@@ -20,7 +19,6 @@
20 <include name="Scenes/Primitive.cs" /> 19 <include name="Scenes/Primitive.cs" />
21 <include name="Scenes/Scene.cs" /> 20 <include name="Scenes/Scene.cs" />
22 <include name="Scenes/Scene.PacketHandlers.cs" /> 21 <include name="Scenes/Scene.PacketHandlers.cs" />
23 <include name="Scenes/Scene.Scripting.cs" />
24 <include name="Scenes/SceneBase.cs" /> 22 <include name="Scenes/SceneBase.cs" />
25 <include name="Scenes/SceneEvents.cs" /> 23 <include name="Scenes/SceneEvents.cs" />
26 <include name="Scenes/SceneObject.cs" /> 24 <include name="Scenes/SceneObject.cs" />
@@ -32,34 +30,33 @@
32 <include name="Scenes/scripting/ScriptManager.cs" /> 30 <include name="Scenes/scripting/ScriptManager.cs" />
33 <include name="Scenes/scripting/Engines/CSharpScriptEngine.cs" /> 31 <include name="Scenes/scripting/Engines/CSharpScriptEngine.cs" />
34 <include name="Scenes/scripting/Engines/JScriptEngine.cs" /> 32 <include name="Scenes/scripting/Engines/JScriptEngine.cs" />
35 <include name="Scenes/scripting/Engines/JSharpScriptEngine.cs" />
36 </sources> 33 </sources>
37 <references basedir="${project::get-base-directory()}"> 34 <references basedir="${project::get-base-directory()}">
38 <lib> 35 <lib>
39 <include name="${project::get-base-directory()}" /> 36 <include name="${project::get-base-directory()}" />
40 <include name="${project::get-base-directory()}/${build.dir}" /> 37 <include name="${project::get-base-directory()}/${build.dir}" />
41 </lib> 38 </lib>
42 <include name="../../bin/Axiom.MathLib.dll" /> 39 <include name="../../../bin/Axiom.MathLib.dll" />
43 <include name="../../bin/Db4objects.Db4o.dll" /> 40 <include name="../../../bin/Db4objects.Db4o.dll" />
44 <include name="../../bin/libsecondlife.dll" /> 41 <include name="../../../bin/libsecondlife.dll" />
45 <include name="Microsoft.JScript.dll" /> 42 <include name="Microsoft.JScript.dll" />
46 <include name="../../bin/OpenGrid.Framework.Communications.dll" /> 43 <include name="../../../bin/OpenSim.Framework.dll" />
47 <include name="../../bin/OpenSim.Caches.dll" /> 44 <include name="../../../bin/OpenSim.Framework.Communications.dll" />
48 <include name="../../bin/OpenSim.Framework.dll" /> 45 <include name="../../../bin/OpenSim.Framework.Console.dll" />
49 <include name="../../bin/OpenSim.Framework.Console.dll" /> 46 <include name="../../../bin/OpenSim.Framework.GenericConfig.Xml.dll" />
50 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" /> 47 <include name="../../../bin/OpenSim.Framework.Servers.dll" />
51 <include name="../../bin/OpenSim.Physics.Manager.dll" /> 48 <include name="../../../bin/OpenSim.Region.Caches.dll" />
52 <include name="../../bin/OpenSim.Servers.dll" /> 49 <include name="../../../bin/OpenSim.Region.Capabilities.dll" />
53 <include name="../../bin/OpenSim.Terrain.BasicTerrain.dll" /> 50 <include name="../../../bin/OpenSim.Region.Physics.Manager.dll" />
51 <include name="../../../bin/OpenSim.Region.Terrain.BasicTerrain.dll" />
54 <include name="System.dll" /> 52 <include name="System.dll" />
55 <include name="System.Xml.dll" /> 53 <include name="System.Xml.dll" />
56 <include name="VJSharpCodeProvider.dll" /> 54 <include name="../../../bin/XMLRPC.dll" />
57 <include name="../../bin/XMLRPC.dll" />
58 </references> 55 </references>
59 </csc> 56 </csc>
60 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> 57 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
61 <mkdir dir="${project::get-base-directory()}/../../bin/"/> 58 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
62 <copy todir="${project::get-base-directory()}/../../bin/"> 59 <copy todir="${project::get-base-directory()}/../../../bin/">
63 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 60 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
64 <include name="*.dll"/> 61 <include name="*.dll"/>
65 <include name="*.exe"/> 62 <include name="*.exe"/>
diff --git a/OpenSim/OpenSim.Region/ParcelManager.cs b/OpenSim/Region/Environment/ParcelManager.cs
index d15d77d..1cab4ab 100644
--- a/OpenSim/OpenSim.Region/ParcelManager.cs
+++ b/OpenSim/Region/Environment/ParcelManager.cs
@@ -32,10 +32,10 @@ using libsecondlife;
32using libsecondlife.Packets; 32using libsecondlife.Packets;
33using OpenSim.Framework.Interfaces; 33using OpenSim.Framework.Interfaces;
34using OpenSim.Framework.Types; 34using OpenSim.Framework.Types;
35using OpenSim.Region.Scenes; 35using OpenSim.Region.Environment.Scenes;
36using Avatar = OpenSim.Region.Scenes.ScenePresence; 36using Avatar = OpenSim.Region.Environment.Scenes.ScenePresence;
37 37
38namespace OpenSim.Region 38namespace OpenSim.Region.Environment
39{ 39{
40 40
41 41
@@ -420,7 +420,7 @@ namespace OpenSim.Region
420 { 420 {
421 for (y = 0; y < inc_y; y++) 421 for (y = 0; y < inc_y; y++)
422 { 422 {
423 OpenSim.Region.Parcel currentParcel = getParcel(start_x + x, start_y + y); 423 OpenSim.Region.Environment.Parcel currentParcel = getParcel(start_x + x, start_y + y);
424 if (!temp.Contains(currentParcel)) 424 if (!temp.Contains(currentParcel))
425 { 425 {
426 currentParcel.forceUpdateParcelInfo(); 426 currentParcel.forceUpdateParcelInfo();
diff --git a/OpenSim/OpenSim.Region/RegionManager.cs b/OpenSim/Region/Environment/RegionManager.cs
index a317f0f..4ff55a8 100644
--- a/OpenSim/OpenSim.Region/RegionManager.cs
+++ b/OpenSim/Region/Environment/RegionManager.cs
@@ -1,12 +1,13 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenGrid.Framework.Communications; 4using OpenSim.Framework.Communications;
5using OpenSim.Framework; 5using OpenSim.Framework;
6using OpenSim.Framework.Types; 6using OpenSim.Framework.Types;
7using OpenSim.Servers; 7using OpenSim.Framework.Servers;
8using OpenSim.Region.Capabilities;
8 9
9namespace OpenSim.Region 10namespace OpenSim.Region.Environment
10{ 11{
11 public class RegionManager //needs renaming , but first we need to rename the namespace 12 public class RegionManager //needs renaming , but first we need to rename the namespace
12 { 13 {
diff --git a/OpenSim/OpenSim.Region/Scenes/Entity.cs b/OpenSim/Region/Environment/Scenes/Entity.cs
index 77f8854..db5070d 100644
--- a/OpenSim/OpenSim.Region/Scenes/Entity.cs
+++ b/OpenSim/Region/Environment/Scenes/Entity.cs
@@ -32,7 +32,7 @@ using Axiom.MathLib;
32using OpenSim.Physics.Manager; 32using OpenSim.Physics.Manager;
33using libsecondlife; 33using libsecondlife;
34 34
35namespace OpenSim.Region.Scenes 35namespace OpenSim.Region.Environment.Scenes
36{ 36{
37 public abstract class Entity 37 public abstract class Entity
38 { 38 {
diff --git a/OpenSim/OpenSim.Region/Scenes/IScenePresenceBody.cs b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
index 65077e6..36023d0 100644
--- a/OpenSim/OpenSim.Region/Scenes/IScenePresenceBody.cs
+++ b/OpenSim/Region/Environment/Scenes/IScenePresenceBody.cs
@@ -7,7 +7,7 @@ using OpenSim.Physics.Manager;
7using OpenSim.Framework.Interfaces; 7using OpenSim.Framework.Interfaces;
8using OpenSim.Framework.Types; 8using OpenSim.Framework.Types;
9 9
10namespace OpenSim.Region.Scenes 10namespace OpenSim.Region.Environment.Scenes
11{ 11{
12 public interface IScenePresenceBody 12 public interface IScenePresenceBody
13 { 13 {
diff --git a/OpenSim/OpenSim.Region/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index e04c711..0f649b2 100644
--- a/OpenSim/OpenSim.Region/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -36,7 +36,7 @@ using OpenSim.Physics.Manager;
36using OpenSim.Framework.Types; 36using OpenSim.Framework.Types;
37using OpenSim.Framework.Inventory; 37using OpenSim.Framework.Inventory;
38 38
39namespace OpenSim.Region.Scenes 39namespace OpenSim.Region.Environment.Scenes
40{ 40{
41 public class Primitive : Entity 41 public class Primitive : Entity
42 { 42 {
@@ -174,9 +174,9 @@ namespace OpenSim.Region.Scenes
174 dataArrays.Add(primData.ToBytes()); 174 dataArrays.Add(primData.ToBytes());
175 foreach (Entity child in children) 175 foreach (Entity child in children)
176 { 176 {
177 if (child is OpenSim.Region.Scenes.Primitive) 177 if (child is OpenSim.Region.Environment.Scenes.Primitive)
178 { 178 {
179 dataArrays.Add(((OpenSim.Region.Scenes.Primitive)child).GetByteArray()); 179 dataArrays.Add(((OpenSim.Region.Environment.Scenes.Primitive)child).GetByteArray());
180 } 180 }
181 } 181 }
182 byte[] primstart = Helpers.StringToField("<Prim>"); 182 byte[] primstart = Helpers.StringToField("<Prim>");
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index d1a2717..1d55c4d 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -36,7 +36,7 @@ using OpenSim.Framework.Types;
36using OpenSim.Framework.Inventory; 36using OpenSim.Framework.Inventory;
37using OpenSim.Framework.Utilities; 37using OpenSim.Framework.Utilities;
38 38
39namespace OpenSim.Region.Scenes 39namespace OpenSim.Region.Environment.Scenes
40{ 40{
41 public partial class Scene 41 public partial class Scene
42 { 42 {
@@ -218,7 +218,7 @@ namespace OpenSim.Region.Scenes
218 { 218 {
219 if (ent.LocalId == primLocalID) 219 if (ent.LocalId == primLocalID)
220 { 220 {
221 ((OpenSim.Region.Scenes.Primitive)ent).GetProperites(remoteClient); 221 ((OpenSim.Region.Environment.Scenes.Primitive)ent).GetProperites(remoteClient);
222 break; 222 break;
223 } 223 }
224 } 224 }
@@ -266,7 +266,7 @@ namespace OpenSim.Region.Scenes
266 { 266 {
267 if (ent.LocalId == localID) 267 if (ent.LocalId == localID)
268 { 268 {
269 ((OpenSim.Region.Scenes.Primitive)ent).UpdatePosition(pos); 269 ((OpenSim.Region.Environment.Scenes.Primitive)ent).UpdatePosition(pos);
270 break; 270 break;
271 } 271 }
272 } 272 }
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index f7d90fa..8c912d0 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -39,18 +39,20 @@ using OpenSim.Framework.Interfaces;
39using OpenSim.Framework.Types; 39using OpenSim.Framework.Types;
40using OpenSim.Framework.Inventory; 40using OpenSim.Framework.Inventory;
41using OpenSim.Framework; 41using OpenSim.Framework;
42using OpenSim.Terrain; 42using OpenSim.Region.Terrain;
43using OpenGrid.Framework.Communications; 43using OpenSim.Framework.Communications;
44using OpenSim.Caches; 44using OpenSim.Region.Caches;
45using OpenSim.Region; 45using OpenSim.Region.Environment;
46using OpenSim.Servers; 46using OpenSim.Framework.Servers;
47using OpenSim.Scripting; 47using OpenSim.Region.Enviorment.Scripting;
48 48using OpenSim.Region.Capabilities;
49namespace OpenSim.Region.Scenes 49using Caps = OpenSim.Region.Capabilities.Caps;
50
51namespace OpenSim.Region.Environment.Scenes
50{ 52{
51 public delegate bool FilterAvatarList(ScenePresence avatar); 53 public delegate bool FilterAvatarList(ScenePresence avatar);
52 54
53 public partial class Scene : SceneBase, ILocalStorageReceiver, IScriptAPI 55 public partial class Scene : SceneBase, ILocalStorageReceiver
54 { 56 {
55 protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer(); 57 protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer();
56 protected Dictionary<libsecondlife.LLUUID, ScenePresence> Avatars; 58 protected Dictionary<libsecondlife.LLUUID, ScenePresence> Avatars;
@@ -66,7 +68,7 @@ namespace OpenSim.Region.Scenes
66 protected RegionCommsListener regionCommsHost; 68 protected RegionCommsListener regionCommsHost;
67 protected CommunicationsManager commsManager; 69 protected CommunicationsManager commsManager;
68 70
69 protected Dictionary<LLUUID, Caps> capsHandlers = new Dictionary<LLUUID, Caps>(); 71 protected Dictionary<LLUUID,Caps> capsHandlers = new Dictionary<LLUUID, Caps>();
70 protected BaseHttpServer httpListener; 72 protected BaseHttpServer httpListener;
71 73
72 public ParcelManager parcelManager; 74 public ParcelManager parcelManager;
@@ -503,6 +505,7 @@ namespace OpenSim.Region.Scenes
503 remoteClient.OnTeleportLocationRequest += this.RequestTeleportLocation; 505 remoteClient.OnTeleportLocationRequest += this.RequestTeleportLocation;
504 //remoteClient.OnObjectSelect += this.SelectPrim; 506 //remoteClient.OnObjectSelect += this.SelectPrim;
505 remoteClient.OnGrapUpdate += this.MoveObject; 507 remoteClient.OnGrapUpdate += this.MoveObject;
508 remoteClient.OnNameFromUUIDRequest += this.commsManager.HandleUUIDNameRequest;
506 509
507 /* remoteClient.OnParcelPropertiesRequest += new ParcelPropertiesRequest(parcelManager.handleParcelPropertiesRequest); 510 /* remoteClient.OnParcelPropertiesRequest += new ParcelPropertiesRequest(parcelManager.handleParcelPropertiesRequest);
508 remoteClient.OnParcelDivideRequest += new ParcelDivideRequest(parcelManager.handleParcelDivideRequest); 511 remoteClient.OnParcelDivideRequest += new ParcelDivideRequest(parcelManager.handleParcelDivideRequest);
@@ -510,7 +513,7 @@ namespace OpenSim.Region.Scenes
510 remoteClient.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest); 513 remoteClient.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest);
511 remoteClient.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage); 514 remoteClient.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage);
512 */ 515 */
513 516
514 ScenePresence newAvatar = null; 517 ScenePresence newAvatar = null;
515 try 518 try
516 { 519 {
diff --git a/OpenSim/OpenSim.Region/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index 5275fcf..50d3b82 100644
--- a/OpenSim/OpenSim.Region/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -37,10 +37,10 @@ using OpenSim.Physics.Manager;
37using OpenSim.Framework.Interfaces; 37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Types; 38using OpenSim.Framework.Types;
39using OpenSim.Framework.Inventory; 39using OpenSim.Framework.Inventory;
40using OpenSim.Terrain; 40using OpenSim.Region.Terrain;
41using OpenSim.Caches; 41using OpenSim.Region.Caches;
42 42
43namespace OpenSim.Region.Scenes 43namespace OpenSim.Region.Environment.Scenes
44{ 44{
45 public abstract class SceneBase : IWorld 45 public abstract class SceneBase : IWorld
46 { 46 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
new file mode 100644
index 0000000..fa1bacb
--- /dev/null
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -0,0 +1,52 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Region.Environment.Scenes
6{
7 /// <summary>
8 /// A class for triggering remote scene events.
9 /// </summary>
10 public class EventManager
11 {
12 public delegate void OnFrameDelegate();
13 public event OnFrameDelegate OnFrame;
14
15 public delegate void OnNewPresenceDelegate(ScenePresence presence);
16 public event OnNewPresenceDelegate OnNewPresence;
17
18 public delegate void OnNewPrimitiveDelegate(Primitive prim);
19 public event OnNewPrimitiveDelegate OnNewPrimitive;
20
21 public delegate void OnRemovePresenceDelegate(libsecondlife.LLUUID uuid);
22 public event OnRemovePresenceDelegate OnRemovePresence;
23
24 public void TriggerOnFrame()
25 {
26 if (OnFrame != null)
27 {
28 OnFrame();
29 }
30 }
31
32 public void TriggerOnNewPrimitive(Primitive prim)
33 {
34 if (OnNewPrimitive != null)
35 OnNewPrimitive(prim);
36 }
37
38 public void TriggerOnNewPresence(ScenePresence presence)
39 {
40 if (OnNewPresence != null)
41 OnNewPresence(presence);
42 }
43
44 public void TriggerOnRemovePresence(libsecondlife.LLUUID uuid)
45 {
46 if (OnRemovePresence != null)
47 {
48 OnRemovePresence(uuid);
49 }
50 }
51 }
52}
diff --git a/OpenSim/OpenSim.Region/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs
index 5df87bf..88fb160 100644
--- a/OpenSim/OpenSim.Region/Scenes/SceneObject.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs
@@ -35,7 +35,7 @@ using OpenSim.Physics.Manager;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36using OpenSim.Framework.Inventory; 36using OpenSim.Framework.Inventory;
37 37
38namespace OpenSim.Region.Scenes 38namespace OpenSim.Region.Environment.Scenes
39{ 39{
40 public class SceneObject : Entity 40 public class SceneObject : Entity
41 { 41 {
diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Animations.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
index f0a8721..2caabc2 100644
--- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Animations.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
@@ -31,7 +31,7 @@ using System.Text;
31using libsecondlife; 31using libsecondlife;
32using System.Xml; 32using System.Xml;
33 33
34namespace OpenSim.Region.Scenes 34namespace OpenSim.Region.Environment.Scenes
35{ 35{
36 partial class ScenePresence 36 partial class ScenePresence
37 { 37 {
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Scenes
66 66
67 // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); 67 // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
68 68
69 foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Scenes.ScenePresence.Animations.AnimsLLUUID) 69 foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Environment.Scenes.ScenePresence.Animations.AnimsLLUUID)
70 { 70 {
71 AnimsNames.Add(kp.Value, kp.Key); 71 AnimsNames.Add(kp.Value, kp.Key);
72 } 72 }
diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Body.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs
index d21b11f..2c81d2a 100644
--- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.Body.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Body.cs
@@ -34,7 +34,7 @@ using OpenSim.Physics.Manager;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36 36
37namespace OpenSim.Region.Scenes 37namespace OpenSim.Region.Environment.Scenes
38{ 38{
39 partial class ScenePresence 39 partial class ScenePresence
40 { 40 {
diff --git a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 45d3fed..b90004e 100644
--- a/OpenSim/OpenSim.Region/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -37,7 +37,7 @@ using OpenSim.Framework.Interfaces;
37using OpenSim.Framework.Types; 37using OpenSim.Framework.Types;
38using Axiom.MathLib; 38using Axiom.MathLib;
39 39
40namespace OpenSim.Region.Scenes 40namespace OpenSim.Region.Environment.Scenes
41{ 41{
42 public partial class ScenePresence : Entity 42 public partial class ScenePresence : Entity
43 { 43 {
@@ -66,6 +66,17 @@ namespace OpenSim.Region.Scenes
66 66
67 protected RegionInfo m_regionInfo; 67 protected RegionInfo m_regionInfo;
68 68
69 private Vector3[] Dir_Vectors = new Vector3[6];
70 private enum Dir_ControlFlags
71 {
72 DIR_CONTROL_FLAG_FOWARD = MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS,
73 DIR_CONTROL_FLAG_BACK = MainAvatar.ControlFlags.AGENT_CONTROL_AT_NEG,
74 DIR_CONTROL_FLAG_LEFT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_POS,
75 DIR_CONTROL_FLAG_RIGHT = MainAvatar.ControlFlags.AGENT_CONTROL_LEFT_NEG,
76 DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS,
77 DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG
78 }
79
69 #region Properties 80 #region Properties
70 /// <summary> 81 /// <summary>
71 /// 82 ///
@@ -125,6 +136,13 @@ namespace OpenSim.Region.Scenes
125 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); 136 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
126 //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); 137 //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
127 138
139 Dir_Vectors[0] = new Vector3(1, 0, 0); //FOWARD
140 Dir_Vectors[1] = new Vector3(-1, 0, 0); //BACK
141 Dir_Vectors[2] = new Vector3(0, 1, 0); //LEFT
142 Dir_Vectors[3] = new Vector3(0, -1, 0); //RIGHT
143 Dir_Vectors[4] = new Vector3(0, 0, 1); //UP
144 Dir_Vectors[5] = new Vector3(0, 0, -1); //DOWN
145
128 } 146 }
129 #endregion 147 #endregion
130 148
@@ -216,40 +234,46 @@ namespace OpenSim.Region.Scenes
216 /// </summary> 234 /// </summary>
217 /// <param name="pack"></param> 235 /// <param name="pack"></param>
218 public void HandleAgentUpdate(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation) 236 public void HandleAgentUpdate(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation)
219 { 237 {
220 if ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS) != 0) 238 int i = 0;
239 bool update_movementflag = false;
240 bool update_rotation = false;
241 bool DCFlagKeyPressed = false;
242 Vector3 agent_control_v3 = new Vector3(0, 0, 0);
243 Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z);
244
245 this.PhysActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0);
246
247 if (q != this.bodyRot)
221 { 248 {
222 Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); 249 this.bodyRot = q;
223 if (((movementflag & 1) == 0) || (q != this.bodyRot)) 250 update_rotation = true;
224 {
225 Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(1, 0, 0);
226 this.AddNewMovement(v3, q);
227 movementflag = 1;
228 this.bodyRot = q;
229 }
230 } 251 }
231 else if ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_AT_NEG) != 0) 252 foreach (Dir_ControlFlags DCF in Enum.GetValues(typeof(Dir_ControlFlags)))
232 { 253 {
233 Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); 254 if ((flags & (uint)DCF) != 0)
234 if (((movementflag & 2) == 0) || (q != this.bodyRot)) 255 {
235 { 256 DCFlagKeyPressed = true;
236 Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(-1, 0, 0); 257 agent_control_v3 += Dir_Vectors[i];
237 this.AddNewMovement(v3, q); 258 if ((movementflag & (uint)DCF) == 0)
238 movementflag = 2; 259 {
239 this.bodyRot = q; 260 movementflag += (byte)(uint)DCF;
261 update_movementflag = true;
262 }
240 } 263 }
241 } 264 else
242 else
243 {
244 if ((movementflag) != 0)
245 { 265 {
246 NewForce newVelocity = new NewForce(); 266 if ((movementflag & (uint)DCF) != 0)
247 newVelocity.X = 0; 267 {
248 newVelocity.Y = 0; 268 movementflag -= (byte)(uint)DCF;
249 newVelocity.Z = 0; 269 update_movementflag = true;
250 this.forcesList.Add(newVelocity); 270 }
251 movementflag = 0;
252 } 271 }
272 i++;
273 }
274 if ((update_movementflag) || (update_rotation && DCFlagKeyPressed))
275 {
276 this.AddNewMovement(agent_control_v3, q);
253 } 277 }
254 278
255 } 279 }
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/CSharpScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs
index 870303f..a232b65 100644
--- a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/CSharpScriptEngine.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/CSharpScriptEngine.cs
@@ -34,7 +34,7 @@ using System.CodeDom;
34using System.CodeDom.Compiler; 34using System.CodeDom.Compiler;
35using Microsoft.CSharp; 35using Microsoft.CSharp;
36 36
37namespace OpenSim.Scripting 37namespace OpenSim.Region.Enviorment.Scripting
38{ 38{
39 public class CSharpScriptEngine : IScriptCompiler 39 public class CSharpScriptEngine : IScriptCompiler
40 { 40 {
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/JScriptEngine.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs
index ffae1d7..2d44223 100644
--- a/OpenSim/OpenSim.Region/Scenes/scripting/Engines/JScriptEngine.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JScriptEngine.cs
@@ -34,7 +34,7 @@ using System.CodeDom;
34using System.CodeDom.Compiler; 34using System.CodeDom.Compiler;
35using Microsoft.JScript; 35using Microsoft.JScript;
36 36
37namespace OpenSim.Scripting 37namespace OpenSim.Region.Enviorment.Scripting
38{ 38{
39 public class JScriptEngine : IScriptCompiler 39 public class JScriptEngine : IScriptCompiler
40 { 40 {
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/Script.cs b/OpenSim/Region/Environment/Scenes/scripting/Script.cs
index 56bd1db..1e64675 100644
--- a/OpenSim/OpenSim.Region/Scenes/scripting/Script.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Script.cs
@@ -31,10 +31,10 @@ using System.Text;
31 31
32using OpenSim.Framework.Console; 32using OpenSim.Framework.Console;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region; 34using OpenSim.Region.Environment;
35using OpenSim.Region.Scenes; 35using OpenSim.Region.Environment.Scenes;
36 36
37namespace OpenSim.Scripting 37namespace OpenSim.Region.Enviorment.Scripting
38{ 38{
39 public interface IScript 39 public interface IScript
40 { 40 {
@@ -54,7 +54,7 @@ namespace OpenSim.Scripting
54 public void Initialise(ScriptInfo scriptInfo) 54 public void Initialise(ScriptInfo scriptInfo)
55 { 55 {
56 script = scriptInfo; 56 script = scriptInfo;
57 script.events.OnFrame += new OpenSim.Region.Scenes.EventManager.OnFrameDelegate(events_OnFrame); 57 script.events.OnFrame += new OpenSim.Region.Environment.Scenes.EventManager.OnFrameDelegate(events_OnFrame);
58 script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence); 58 script.events.OnNewPresence += new EventManager.OnNewPresenceDelegate(events_OnNewPresence);
59 } 59 }
60 60
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs
index cf627dd..522a572 100644
--- a/OpenSim/OpenSim.Region/Scenes/scripting/ScriptInfo.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs
@@ -29,10 +29,10 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32using OpenSim.Region.Scenes; 32using OpenSim.Region.Environment.Scenes;
33using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
34 34
35namespace OpenSim.Scripting 35namespace OpenSim.Region.Enviorment.Scripting
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// Class which provides access to the world 38 /// Class which provides access to the world
diff --git a/OpenSim/OpenSim.Region/Scenes/scripting/ScriptManager.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
index abffffa..eb1c1d9 100644
--- a/OpenSim/OpenSim.Region/Scenes/scripting/ScriptManager.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptManager.cs
@@ -29,12 +29,12 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Scripting 32namespace OpenSim.Region.Enviorment.Scripting
33{ 33{
34 public class ScriptManager 34 public class ScriptManager
35 { 35 {
36 List<IScript> scripts = new List<IScript>(); 36 List<IScript> scripts = new List<IScript>();
37 OpenSim.Region.Scenes.Scene scene; 37 OpenSim.Region.Environment.Scenes.Scene scene;
38 Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); 38 Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>();
39 39
40 private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts) 40 private void LoadFromCompiler(Dictionary<string, IScript> compiledscripts)
@@ -49,7 +49,7 @@ namespace OpenSim.Scripting
49 OpenSim.Framework.Console.MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)"); 49 OpenSim.Framework.Console.MainLog.Instance.Verbose("Finished loading " + compiledscripts.Count.ToString() + " script(s)");
50 } 50 }
51 51
52 public ScriptManager(OpenSim.Region.Scenes.Scene world) 52 public ScriptManager(OpenSim.Region.Environment.Scenes.Scene world)
53 { 53 {
54 scene = world; 54 scene = world;
55 55
@@ -59,9 +59,6 @@ namespace OpenSim.Scripting
59 59
60 JScriptEngine jscriptCompiler = new JScriptEngine(); 60 JScriptEngine jscriptCompiler = new JScriptEngine();
61 compilers.Add(jscriptCompiler.FileExt(), jscriptCompiler); 61 compilers.Add(jscriptCompiler.FileExt(), jscriptCompiler);
62
63 JSharpScriptEngine jsharpCompiler = new JSharpScriptEngine();
64 compilers.Add(jsharpCompiler.FileExt(), jsharpCompiler);
65 } 62 }
66 63
67 public void Compile(string filename) 64 public void Compile(string filename)
diff --git a/OpenSim/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
index 01e0c59..89f39d3 100644
--- a/OpenSim/Examples/SimpleApp/MyWorld.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
@@ -5,20 +5,20 @@ using OpenSim.Framework.Interfaces;
5using OpenSim.Framework.Types; 5using OpenSim.Framework.Types;
6using OpenSim.Framework.Console; 6using OpenSim.Framework.Console;
7using libsecondlife; 7using libsecondlife;
8using OpenSim.Region; 8using OpenSim.Region.Environment;
9using Avatar=OpenSim.Region.Scenes.ScenePresence; 9using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence;
10using OpenSim.Region.Scenes; 10using OpenSim.Region.Environment.Scenes;
11using OpenSim.Framework; 11using OpenSim.Framework;
12using OpenSim.Caches; 12using OpenSim.Region.Caches;
13using OpenGrid.Framework.Communications; 13using OpenSim.Framework.Communications;
14using OpenSim.Servers; 14using OpenSim.Framework.Servers;
15 15
16namespace SimpleApp 16namespace SimpleApp
17{ 17{
18 public class MyWorld : Scene 18 public class MyWorld : Scene
19 { 19 {
20 private RegionInfo m_regionInfo; 20 private RegionInfo m_regionInfo;
21 private List<OpenSim.Region.Scenes.ScenePresence> m_avatars; 21 private List<OpenSim.Region.Environment.Scenes.ScenePresence> m_avatars;
22 22
23 public MyWorld(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer) 23 public MyWorld(Dictionary<uint, IClientAPI> clientThreads, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer)
24 : base(clientThreads, regionInfo, authen, commsMan, assetCach, httpServer) 24 : base(clientThreads, regionInfo, authen, commsMan, assetCach, httpServer)
@@ -76,7 +76,7 @@ namespace SimpleApp
76 76
77 client.SendRegionHandshake(m_regionInfo); 77 client.SendRegionHandshake(m_regionInfo);
78 78
79 OpenSim.Region.Scenes.ScenePresence avatar = new Avatar( client, this, m_regionInfo ); 79 OpenSim.Region.Environment.Scenes.ScenePresence avatar = new Avatar( client, this, m_regionInfo );
80 80
81 } 81 }
82 82
diff --git a/OpenSim/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index e1465d1..4060d68 100644
--- a/OpenSim/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -2,17 +2,18 @@ using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim; 4using OpenSim;
5using OpenSim.GridInterfaces.Local; 5using OpenSim.Region.GridInterfaces.Local;
6using OpenSim.Framework.Interfaces; 6using OpenSim.Framework.Interfaces;
7using OpenSim.Framework.Types; 7using OpenSim.Framework.Types;
8using OpenSim.Framework.Console; 8using OpenSim.Framework.Console;
9using OpenSim.Framework.Servers;
9using OpenSim.Assets; 10using OpenSim.Assets;
10using libsecondlife; 11using libsecondlife;
11using OpenSim.Servers;
12using OpenSim.Framework; 12using OpenSim.Framework;
13using OpenSim.Caches; 13using OpenSim.Region.Caches;
14using OpenGrid.Framework.Communications; 14using OpenSim.Framework.Communications;
15using OpenSim.LocalCommunications; 15using OpenSim.Region.Communications.Local;
16using OpenSim.Region.ClientStack;
16 17
17namespace SimpleApp 18namespace SimpleApp
18{ 19{
diff --git a/OpenSim/Examples/SimpleApp/Properties/AssemblyInfo.cs b/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs
index 0f9bf0f..0f9bf0f 100644
--- a/OpenSim/Examples/SimpleApp/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Properties/AssemblyInfo.cs
diff --git a/OpenSim/Examples/SimpleApp/SimpleApp.csproj b/OpenSim/Region/Examples/SimpleApp/SimpleApp.csproj
index 00af44a..0a82172 100644
--- a/OpenSim/Examples/SimpleApp/SimpleApp.csproj
+++ b/OpenSim/Region/Examples/SimpleApp/SimpleApp.csproj
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,7 +59,7 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="libsecondlife.dll" > 61 <Reference Include="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> 62 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="System" > 65 <Reference Include="System" >
@@ -67,72 +67,70 @@
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="System.Data.dll" > 69 <Reference Include="System.Data.dll" >
70 <HintPath>..\..\..\bin\System.Data.dll</HintPath> 70 <HintPath>..\..\..\..\bin\System.Data.dll</HintPath>
71 <Private>False</Private> 71 <Private>False</Private>
72 </Reference> 72 </Reference>
73 <Reference Include="System.Xml" > 73 <Reference Include="System.Xml" >
74 <HintPath>System.Xml.dll</HintPath> 74 <HintPath>System.Xml.dll</HintPath>
75 <Private>False</Private> 75 <Private>False</Private>
76 </Reference> 76 </Reference>
77 <Reference Include="XMLRPC.dll" >
78 <HintPath>..\..\..\..\bin\XMLRPC.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
77 </ItemGroup> 81 </ItemGroup>
78 <ItemGroup> 82 <ItemGroup>
79 <ProjectReference Include="..\..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj"> 83 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
80 <Name>OpenGrid.Framework.Communications</Name> 84 <Name>OpenSim.Framework</Name>
81 <Project>{683344D5-0000-0000-0000-000000000000}</Project> 85 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private>
84 </ProjectReference>
85 <ProjectReference Include="..\..\OpenSim.Caches\OpenSim.Caches.csproj">
86 <Name>OpenSim.Caches</Name>
87 <Project>{1938EB12-0000-0000-0000-000000000000}</Project>
88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
89 <Private>False</Private> 87 <Private>False</Private>
90 </ProjectReference> 88 </ProjectReference>
91 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 89 <ProjectReference Include="..\..\..\Framework\Communications\OpenSim.Framework.Communications.csproj">
92 <Name>OpenSim.Framework</Name> 90 <Name>OpenSim.Framework.Communications</Name>
93 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 91 <Project>{CB52B7E7-0000-0000-0000-000000000000}</Project>
94 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
95 <Private>False</Private> 93 <Private>False</Private>
96 </ProjectReference> 94 </ProjectReference>
97 <ProjectReference Include="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 95 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
98 <Name>OpenSim.Framework.Console</Name> 96 <Name>OpenSim.Framework.Console</Name>
99 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 97 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
100 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
101 <Private>False</Private> 99 <Private>False</Private>
102 </ProjectReference> 100 </ProjectReference>
103 <ProjectReference Include="..\..\OpenSim.GridInterfaces\Local\OpenSim.GridInterfaces.Local.csproj"> 101 <ProjectReference Include="..\..\..\Framework\Servers\OpenSim.Framework.Servers.csproj">
104 <Name>OpenSim.GridInterfaces.Local</Name> 102 <Name>OpenSim.Framework.Servers</Name>
105 <Project>{546099CD-0000-0000-0000-000000000000}</Project> 103 <Project>{2CC71860-0000-0000-0000-000000000000}</Project>
106 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
107 <Private>False</Private> 105 <Private>False</Private>
108 </ProjectReference> 106 </ProjectReference>
109 <ProjectReference Include="..\..\OpenSim.LocalCommunications\OpenSim.LocalCommunications.csproj"> 107 <ProjectReference Include="..\..\Caches\OpenSim.Region.Caches.csproj">
110 <Name>OpenSim.LocalCommunications</Name> 108 <Name>OpenSim.Region.Caches</Name>
111 <Project>{79CED992-0000-0000-0000-000000000000}</Project> 109 <Project>{61FCCDB3-0000-0000-0000-000000000000}</Project>
112 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
113 <Private>False</Private> 111 <Private>False</Private>
114 </ProjectReference> 112 </ProjectReference>
115 <ProjectReference Include="..\..\OpenSim.Region\OpenSim.Region.csproj"> 113 <ProjectReference Include="..\..\ClientStack\OpenSim.Region.ClientStack.csproj">
116 <Name>OpenSim.Region</Name> 114 <Name>OpenSim.Region.ClientStack</Name>
117 <Project>{196916AF-0000-0000-0000-000000000000}</Project> 115 <Project>{DC3698B2-0000-0000-0000-000000000000}</Project>
118 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 116 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
119 <Private>False</Private> 117 <Private>False</Private>
120 </ProjectReference> 118 </ProjectReference>
121 <ProjectReference Include="..\..\OpenSim.RegionServer\OpenSim.RegionServer.csproj"> 119 <ProjectReference Include="..\..\Communications\Local\OpenSim.Region.Communications.Local.csproj">
122 <Name>OpenSim.RegionServer</Name> 120 <Name>OpenSim.Region.Communications.Local</Name>
123 <Project>{632E1BFD-0000-0000-0000-000000000000}</Project> 121 <Project>{BFB5D807-0000-0000-0000-000000000000}</Project>
124 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 122 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
125 <Private>False</Private> 123 <Private>False</Private>
126 </ProjectReference> 124 </ProjectReference>
127 <ProjectReference Include="..\..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj"> 125 <ProjectReference Include="..\..\Environment\OpenSim.Region.Environment.csproj">
128 <Name>OpenSim.Servers</Name> 126 <Name>OpenSim.Region.Environment</Name>
129 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> 127 <Project>{DCBA491C-0000-0000-0000-000000000000}</Project>
130 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 128 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
131 <Private>False</Private> 129 <Private>False</Private>
132 </ProjectReference> 130 </ProjectReference>
133 <ProjectReference Include="..\..\..\Common\XmlRpcCS\XMLRPC.csproj"> 131 <ProjectReference Include="..\..\GridInterfaces\Local\OpenSim.Region.GridInterfaces.Local.csproj">
134 <Name>XMLRPC</Name> 132 <Name>OpenSim.Region.GridInterfaces.Local</Name>
135 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> 133 <Project>{241A8CDD-0000-0000-0000-000000000000}</Project>
136 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 134 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
137 <Private>False</Private> 135 <Private>False</Private>
138 </ProjectReference> 136 </ProjectReference>
diff --git a/OpenSim/OpenSim/OpenSim.exe.build b/OpenSim/Region/Examples/SimpleApp/SimpleApp.exe.build
index 13ca938..f8896fa 100644
--- a/OpenSim/OpenSim/OpenSim.exe.build
+++ b/OpenSim/Region/Examples/SimpleApp/SimpleApp.exe.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim" default="build"> 2<project name="SimpleApp" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,41 +8,37 @@
8 </fileset> 8 </fileset>
9 </copy> 9 </copy>
10 <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe"> 10 <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
11 <resources prefix="OpenSim" dynamicprefix="true" > 11 <resources prefix="SimpleApp" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="Application.cs" /> 14 <include name="MyWorld.cs" />
15 <include name="OpenSimMain.cs" /> 15 <include name="Program.cs" />
16 <include name="Properties/AssemblyInfo.cs" />
16 </sources> 17 </sources>
17 <references basedir="${project::get-base-directory()}"> 18 <references basedir="${project::get-base-directory()}">
18 <lib> 19 <lib>
19 <include name="${project::get-base-directory()}" /> 20 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" /> 21 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib> 22 </lib>
22 <include name="../../bin/Axiom.MathLib.dll" /> 23 <include name="../../../../bin/libsecondlife.dll" />
23 <include name="../../bin/Db4objects.Db4o.dll" /> 24 <include name="../../../../bin/OpenSim.Framework.dll" />
24 <include name="../../bin/libsecondlife.dll" /> 25 <include name="../../../../bin/OpenSim.Framework.Communications.dll" />
25 <include name="../../bin/OpenGrid.Framework.Communications.dll" /> 26 <include name="../../../../bin/OpenSim.Framework.Console.dll" />
26 <include name="../../bin/OpenGrid.Framework.Communications.OGS1.dll" /> 27 <include name="../../../../bin/OpenSim.Framework.Servers.dll" />
27 <include name="../../bin/OpenGrid.Framework.UserManagement.dll" /> 28 <include name="../../../../bin/OpenSim.Region.Caches.dll" />
28 <include name="../../bin/OpenSim.Caches.dll" /> 29 <include name="../../../../bin/OpenSim.Region.ClientStack.dll" />
29 <include name="../../bin/OpenSim.Framework.dll" /> 30 <include name="../../../../bin/OpenSim.Region.Communications.Local.dll" />
30 <include name="../../bin/OpenSim.Framework.Console.dll" /> 31 <include name="../../../../bin/OpenSim.Region.Environment.dll" />
31 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" /> 32 <include name="../../../../bin/OpenSim.Region.GridInterfaces.Local.dll" />
32 <include name="../../bin/OpenSim.LocalCommunications.dll" />
33 <include name="../../bin/OpenSim.Physics.Manager.dll" />
34 <include name="../../bin/OpenSim.Region.dll" />
35 <include name="../../bin/OpenSim.RegionServer.dll" />
36 <include name="../../bin/OpenSim.Servers.dll" />
37 <include name="../../bin/OpenSim.Terrain.BasicTerrain.dll" />
38 <include name="System.dll" /> 33 <include name="System.dll" />
34 <include name="System.Data.dll.dll" />
39 <include name="System.Xml.dll" /> 35 <include name="System.Xml.dll" />
40 <include name="../../bin/XMLRPC.dll" /> 36 <include name="../../../../bin/XMLRPC.dll" />
41 </references> 37 </references>
42 </csc> 38 </csc>
43 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> 39 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
44 <mkdir dir="${project::get-base-directory()}/../../bin/"/> 40 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
45 <copy todir="${project::get-base-directory()}/../../bin/"> 41 <copy todir="${project::get-base-directory()}/../../../../bin/">
46 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 42 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
47 <include name="*.dll"/> 43 <include name="*.dll"/>
48 <include name="*.exe"/> 44 <include name="*.exe"/>
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/AssemblyInfo.cs b/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs
index 52ecd6b..52ecd6b 100644
--- a/OpenSim/OpenSim.GridInterfaces/Local/AssemblyInfo.cs
+++ b/OpenSim/Region/GridInterfaces/Local/AssemblyInfo.cs
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs
index 87eff49..95d03f1 100644
--- a/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs
+++ b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs
@@ -38,7 +38,7 @@ using libsecondlife;
38using Db4objects.Db4o; 38using Db4objects.Db4o;
39using Db4objects.Db4o.Query; 39using Db4objects.Db4o.Query;
40 40
41namespace OpenSim.GridInterfaces.Local 41namespace OpenSim.Region.GridInterfaces.Local
42{ 42{
43 public class LocalAssetPlugin : IAssetPlugin 43 public class LocalAssetPlugin : IAssetPlugin
44 { 44 {
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj b/OpenSim/Region/GridInterfaces/Local/OpenSim.Region.GridInterfaces.Local.csproj
index 77c76e3..484a205 100644
--- a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj
+++ b/OpenSim/Region/GridInterfaces/Local/OpenSim.Region.GridInterfaces.Local.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{546099CD-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{241A8CDD-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.GridInterfaces.Local</AssemblyName> 12 <AssemblyName>OpenSim.Region.GridInterfaces.Local</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.GridInterfaces.Local</RootNamespace> 19 <RootNamespace>OpenSim.Region.GridInterfaces.Local</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,11 +59,11 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Db4objects.Db4o.dll" > 61 <Reference Include="Db4objects.Db4o.dll" >
62 <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath> 62 <HintPath>..\..\..\..\bin\Db4objects.Db4o.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="libsecondlife.dll" > 65 <Reference Include="libsecondlife.dll" >
66 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> 66 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="System" > 69 <Reference Include="System" >
@@ -76,13 +76,13 @@
76 </Reference> 76 </Reference>
77 </ItemGroup> 77 </ItemGroup>
78 <ItemGroup> 78 <ItemGroup>
79 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 79 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
80 <Name>OpenSim.Framework</Name> 80 <Name>OpenSim.Framework</Name>
81 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 81 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private> 83 <Private>False</Private>
84 </ProjectReference> 84 </ProjectReference>
85 <ProjectReference Include="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 85 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
86 <Name>OpenSim.Framework.Console</Name> 86 <Name>OpenSim.Framework.Console</Name>
87 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 87 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
diff --git a/OpenSim/Region/GridInterfaces/Local/OpenSim.Region.GridInterfaces.Local.dll.build b/OpenSim/Region/GridInterfaces/Local/OpenSim.Region.GridInterfaces.Local.dll.build
new file mode 100644
index 0000000..4770e6d
--- /dev/null
+++ b/OpenSim/Region/GridInterfaces/Local/OpenSim.Region.GridInterfaces.Local.dll.build
@@ -0,0 +1,45 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.GridInterfaces.Local" 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.Region.GridInterfaces.Local" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="LocalAssetServer.cs" />
16 </sources>
17 <references basedir="${project::get-base-directory()}">
18 <lib>
19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib>
22 <include name="../../../../bin/Db4objects.Db4o.dll" />
23 <include name="../../../../bin/libsecondlife.dll" />
24 <include name="../../../../bin/OpenSim.Framework.dll" />
25 <include name="../../../../bin/OpenSim.Framework.Console.dll" />
26 <include name="System.dll" />
27 <include name="System.Xml.dll" />
28 </references>
29 </csc>
30 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
31 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
32 <copy todir="${project::get-base-directory()}/../../../../bin/">
33 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
34 <include name="*.dll"/>
35 <include name="*.exe"/>
36 </fileset>
37 </copy>
38 </target>
39 <target name="clean">
40 <delete dir="${bin.dir}" failonerror="false" />
41 <delete dir="${obj.dir}" failonerror="false" />
42 </target>
43 <target name="doc" description="Creates documentation.">
44 </target>
45</project>
diff --git a/OpenSim/OpenSim.GridInterfaces/Remote/AssemblyInfo.cs b/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs
index 51596d0..51596d0 100644
--- a/OpenSim/OpenSim.GridInterfaces/Remote/AssemblyInfo.cs
+++ b/OpenSim/Region/GridInterfaces/Remote/AssemblyInfo.cs
diff --git a/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj b/OpenSim/Region/GridInterfaces/Remote/OpenSim.Region.GridInterfaces.Remote.csproj
index 0a918bd..793fde2 100644
--- a/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj
+++ b/OpenSim/Region/GridInterfaces/Remote/OpenSim.Region.GridInterfaces.Remote.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{B55C0B5D-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{98C7B681-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.GridInterfaces.Remote</AssemblyName> 12 <AssemblyName>OpenSim.Region.GridInterfaces.Remote</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.GridInterfaces.Remote</RootNamespace> 19 <RootNamespace>OpenSim.Region.GridInterfaces.Remote</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,7 +59,7 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="libsecondlife.dll" > 61 <Reference Include="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> 62 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="System" > 65 <Reference Include="System" >
@@ -70,26 +70,24 @@
70 <HintPath>System.Xml.dll</HintPath> 70 <HintPath>System.Xml.dll</HintPath>
71 <Private>False</Private> 71 <Private>False</Private>
72 </Reference> 72 </Reference>
73 <Reference Include="XMLRPC.dll" >
74 <HintPath>..\..\..\..\bin\XMLRPC.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
73 </ItemGroup> 77 </ItemGroup>
74 <ItemGroup> 78 <ItemGroup>
75 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 79 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
76 <Name>OpenSim.Framework</Name> 80 <Name>OpenSim.Framework</Name>
77 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 81 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
79 <Private>False</Private> 83 <Private>False</Private>
80 </ProjectReference> 84 </ProjectReference>
81 <ProjectReference Include="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 85 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
82 <Name>OpenSim.Framework.Console</Name> 86 <Name>OpenSim.Framework.Console</Name>
83 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 87 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
84 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
85 <Private>False</Private> 89 <Private>False</Private>
86 </ProjectReference> 90 </ProjectReference>
87 <ProjectReference Include="..\..\..\Common\XmlRpcCS\XMLRPC.csproj">
88 <Name>XMLRPC</Name>
89 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
90 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
91 <Private>False</Private>
92 </ProjectReference>
93 </ItemGroup> 91 </ItemGroup>
94 <ItemGroup> 92 <ItemGroup>
95 <Compile Include="AssemblyInfo.cs"> 93 <Compile Include="AssemblyInfo.cs">
diff --git a/OpenSim/Region/GridInterfaces/Remote/OpenSim.Region.GridInterfaces.Remote.dll.build b/OpenSim/Region/GridInterfaces/Remote/OpenSim.Region.GridInterfaces.Remote.dll.build
new file mode 100644
index 0000000..0bf1b86
--- /dev/null
+++ b/OpenSim/Region/GridInterfaces/Remote/OpenSim.Region.GridInterfaces.Remote.dll.build
@@ -0,0 +1,45 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.GridInterfaces.Remote" 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.Region.GridInterfaces.Remote" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="RemoteAssetServer.cs" />
16 </sources>
17 <references basedir="${project::get-base-directory()}">
18 <lib>
19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib>
22 <include name="../../../../bin/libsecondlife.dll" />
23 <include name="../../../../bin/OpenSim.Framework.dll" />
24 <include name="../../../../bin/OpenSim.Framework.Console.dll" />
25 <include name="System.dll" />
26 <include name="System.Xml.dll" />
27 <include name="../../../../bin/XMLRPC.dll" />
28 </references>
29 </csc>
30 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
31 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
32 <copy todir="${project::get-base-directory()}/../../../../bin/">
33 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
34 <include name="*.dll"/>
35 <include name="*.exe"/>
36 </fileset>
37 </copy>
38 </target>
39 <target name="clean">
40 <delete dir="${bin.dir}" failonerror="false" />
41 <delete dir="${obj.dir}" failonerror="false" />
42 </target>
43 <target name="doc" description="Creates documentation.">
44 </target>
45</project>
diff --git a/OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs b/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs
index ca01c68..4652f70 100644
--- a/OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs
+++ b/OpenSim/Region/GridInterfaces/Remote/RemoteAssetServer.cs
@@ -37,7 +37,7 @@ using OpenSim.Framework.Interfaces;
37using OpenSim.Framework.Types; 37using OpenSim.Framework.Types;
38using OpenSim.Framework.Utilities; 38using OpenSim.Framework.Utilities;
39 39
40namespace OpenSim.GridInterfaces.Remote 40namespace OpenSim.Region.GridInterfaces.Remote
41{ 41{
42 public class RemoteAssetServer : IAssetServer 42 public class RemoteAssetServer : IAssetServer
43 { 43 {
diff --git a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
index 177c49d..177c49d 100644
--- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs
diff --git a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index 341ffbb..dcb8f3b 100644
--- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using OpenSim.Physics.Manager; 30using OpenSim.Physics.Manager;
31 31
32namespace OpenSim.Physics.BasicPhysicsPlugin 32namespace OpenSim.Region.Physics.BasicPhysicsPlugin
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// Will be the PhysX plugin but for now will be a very basic physics engine 35 /// Will be the PhysX plugin but for now will be a very basic physics engine
diff --git a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj
index f88eb32..7dad533 100644
--- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{4F874463-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{15B4FEF3-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Physics.BasicPhysicsPlugin</AssemblyName> 12 <AssemblyName>OpenSim.Region.Physics.BasicPhysicsPlugin</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Physics.BasicPhysicsPlugin</RootNamespace> 19 <RootNamespace>OpenSim.Region.Physics.BasicPhysicsPlugin</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\Physics\</OutputPath> 35 <OutputPath>..\..\..\..\bin\Physics\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\Physics\</OutputPath> 53 <OutputPath>..\..\..\..\bin\Physics\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,7 +59,7 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Axiom.MathLib.dll" > 61 <Reference Include="Axiom.MathLib.dll" >
62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath> 62 <HintPath>..\..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="System" > 65 <Reference Include="System" >
@@ -68,9 +68,9 @@
68 </Reference> 68 </Reference>
69 </ItemGroup> 69 </ItemGroup>
70 <ItemGroup> 70 <ItemGroup>
71 <ProjectReference Include="..\Manager\OpenSim.Physics.Manager.csproj"> 71 <ProjectReference Include="..\Manager\OpenSim.Region.Physics.Manager.csproj">
72 <Name>OpenSim.Physics.Manager</Name> 72 <Name>OpenSim.Region.Physics.Manager</Name>
73 <Project>{8BE16150-0000-0000-0000-000000000000}</Project> 73 <Project>{F4FF31EB-0000-0000-0000-000000000000}</Project>
74 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 74 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
75 <Private>False</Private> 75 <Private>False</Private>
76 </ProjectReference> 76 </ProjectReference>
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build
new file mode 100644
index 0000000..6cf26ca
--- /dev/null
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build
@@ -0,0 +1,42 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.Physics.BasicPhysicsPlugin" 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.Region.Physics.BasicPhysicsPlugin" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="BasicPhysicsPlugin.cs" />
16 </sources>
17 <references basedir="${project::get-base-directory()}">
18 <lib>
19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib>
22 <include name="../../../../bin/Axiom.MathLib.dll" />
23 <include name="../../../../bin/OpenSim.Region.Physics.Manager.dll" />
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/Physics/" />
28 <mkdir dir="${project::get-base-directory()}/../../../../bin/Physics/"/>
29 <copy todir="${project::get-base-directory()}/../../../../bin/Physics/">
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/OpenSim/OpenSim.Physics/Manager/AssemblyInfo.cs b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
index 132f64a..132f64a 100644
--- a/OpenSim/OpenSim.Physics/Manager/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs
diff --git a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj b/OpenSim/Region/Physics/Manager/OpenSim.Region.Physics.Manager.csproj
index 347a649..f340400 100644
--- a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj
+++ b/OpenSim/Region/Physics/Manager/OpenSim.Region.Physics.Manager.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{8BE16150-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{F4FF31EB-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Physics.Manager</AssemblyName> 12 <AssemblyName>OpenSim.Region.Physics.Manager</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Physics.Manager</RootNamespace> 19 <RootNamespace>OpenSim.Region.Physics.Manager</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,7 +59,7 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Axiom.MathLib.dll" > 61 <Reference Include="Axiom.MathLib.dll" >
62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath> 62 <HintPath>..\..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="System" > 65 <Reference Include="System" >
@@ -72,13 +72,13 @@
72 </Reference> 72 </Reference>
73 </ItemGroup> 73 </ItemGroup>
74 <ItemGroup> 74 <ItemGroup>
75 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 75 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
76 <Name>OpenSim.Framework</Name> 76 <Name>OpenSim.Framework</Name>
77 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 77 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
79 <Private>False</Private> 79 <Private>False</Private>
80 </ProjectReference> 80 </ProjectReference>
81 <ProjectReference Include="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 81 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
82 <Name>OpenSim.Framework.Console</Name> 82 <Name>OpenSim.Framework.Console</Name>
83 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 83 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
84 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 84 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
diff --git a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build b/OpenSim/Region/Physics/Manager/OpenSim.Region.Physics.Manager.dll.build
index fc3e1e6..4b7ce81 100644
--- a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build
+++ b/OpenSim/Region/Physics/Manager/OpenSim.Region.Physics.Manager.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.Physics.Manager" default="build"> 2<project name="OpenSim.Region.Physics.Manager" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,7 +8,7 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.Physics.Manager" dynamicprefix="true" > 11 <resources prefix="OpenSim.Region.Physics.Manager" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" /> 14 <include name="AssemblyInfo.cs" />
@@ -22,16 +22,16 @@
22 <include name="${project::get-base-directory()}" /> 22 <include name="${project::get-base-directory()}" />
23 <include name="${project::get-base-directory()}/${build.dir}" /> 23 <include name="${project::get-base-directory()}/${build.dir}" />
24 </lib> 24 </lib>
25 <include name="../../../bin/Axiom.MathLib.dll" /> 25 <include name="../../../../bin/Axiom.MathLib.dll" />
26 <include name="../../../bin/OpenSim.Framework.dll" /> 26 <include name="../../../../bin/OpenSim.Framework.dll" />
27 <include name="../../../bin/OpenSim.Framework.Console.dll" /> 27 <include name="../../../../bin/OpenSim.Framework.Console.dll" />
28 <include name="System.dll" /> 28 <include name="System.dll" />
29 <include name="System.Xml.dll" /> 29 <include name="System.Xml.dll" />
30 </references> 30 </references>
31 </csc> 31 </csc>
32 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" /> 32 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
33 <mkdir dir="${project::get-base-directory()}/../../../bin/"/> 33 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
34 <copy todir="${project::get-base-directory()}/../../../bin/"> 34 <copy todir="${project::get-base-directory()}/../../../../bin/">
35 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 35 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
36 <include name="*.dll"/> 36 <include name="*.dll"/>
37 <include name="*.exe"/> 37 <include name="*.exe"/>
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index 6366fb8..6366fb8 100644
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs b/OpenSim/Region/Physics/Manager/PhysicsManager.cs
index efccb36..efccb36 100644
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsManager.cs
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 0901c2f..0901c2f 100644
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
index 888dbb5..888dbb5 100644
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsVector.cs
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
index b49c8da..b49c8da 100644
--- a/OpenSim/OpenSim.Physics/OdePlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 5233042..8aca851 100644
--- a/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using OpenSim.Physics.Manager; 30using OpenSim.Physics.Manager;
31using Ode.NET; 31using Ode.NET;
32 32
33namespace OpenSim.Physics.OdePlugin 33namespace OpenSim.Region.Physics.OdePlugin
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// ODE plugin 36 /// ODE plugin
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj b/OpenSim/Region/Physics/OdePlugin/OpenSim.Region.Physics.OdePlugin.csproj
index 08f54aa..490c681 100644
--- a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj
+++ b/OpenSim/Region/Physics/OdePlugin/OpenSim.Region.Physics.OdePlugin.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{63A05FE9-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{90620634-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Physics.OdePlugin</AssemblyName> 12 <AssemblyName>OpenSim.Region.Physics.OdePlugin</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Physics.OdePlugin</RootNamespace> 19 <RootNamespace>OpenSim.Region.Physics.OdePlugin</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\Physics\</OutputPath> 35 <OutputPath>..\..\..\..\bin\Physics\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\Physics\</OutputPath> 53 <OutputPath>..\..\..\..\bin\Physics\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,11 +59,11 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Axiom.MathLib.dll" > 61 <Reference Include="Axiom.MathLib.dll" >
62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath> 62 <HintPath>..\..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="Ode.NET.dll" > 65 <Reference Include="Ode.NET.dll" >
66 <HintPath>..\..\..\bin\Ode.NET.dll</HintPath> 66 <HintPath>..\..\..\..\bin\Ode.NET.dll</HintPath>
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="System" > 69 <Reference Include="System" >
@@ -72,9 +72,9 @@
72 </Reference> 72 </Reference>
73 </ItemGroup> 73 </ItemGroup>
74 <ItemGroup> 74 <ItemGroup>
75 <ProjectReference Include="..\Manager\OpenSim.Physics.Manager.csproj"> 75 <ProjectReference Include="..\Manager\OpenSim.Region.Physics.Manager.csproj">
76 <Name>OpenSim.Physics.Manager</Name> 76 <Name>OpenSim.Region.Physics.Manager</Name>
77 <Project>{8BE16150-0000-0000-0000-000000000000}</Project> 77 <Project>{F4FF31EB-0000-0000-0000-000000000000}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
79 <Private>False</Private> 79 <Private>False</Private>
80 </ProjectReference> 80 </ProjectReference>
diff --git a/OpenSim/Region/Physics/OdePlugin/OpenSim.Region.Physics.OdePlugin.dll.build b/OpenSim/Region/Physics/OdePlugin/OpenSim.Region.Physics.OdePlugin.dll.build
new file mode 100644
index 0000000..07b9386
--- /dev/null
+++ b/OpenSim/Region/Physics/OdePlugin/OpenSim.Region.Physics.OdePlugin.dll.build
@@ -0,0 +1,43 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.Physics.OdePlugin" 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.Region.Physics.OdePlugin" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="OdePlugin.cs" />
16 </sources>
17 <references basedir="${project::get-base-directory()}">
18 <lib>
19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib>
22 <include name="../../../../bin/Axiom.MathLib.dll" />
23 <include name="../../../../bin/Ode.NET.dll" />
24 <include name="../../../../bin/OpenSim.Region.Physics.Manager.dll" />
25 <include name="System.dll" />
26 </references>
27 </csc>
28 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/Physics/" />
29 <mkdir dir="${project::get-base-directory()}/../../../../bin/Physics/"/>
30 <copy todir="${project::get-base-directory()}/../../../../bin/Physics/">
31 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
32 <include name="*.dll"/>
33 <include name="*.exe"/>
34 </fileset>
35 </copy>
36 </target>
37 <target name="clean">
38 <delete dir="${bin.dir}" failonerror="false" />
39 <delete dir="${obj.dir}" failonerror="false" />
40 </target>
41 <target name="doc" description="Creates documentation.">
42 </target>
43</project>
diff --git a/OpenSim/OpenSim.Physics/PhysXPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs
index b49c8da..b49c8da 100644
--- a/OpenSim/OpenSim.Physics/PhysXPlugin/AssemblyInfo.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs
diff --git a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj b/OpenSim/Region/Physics/PhysXPlugin/OpenSim.Region.Physics.PhysXPlugin.csproj
index aa89cc1..77da908 100644
--- a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj
+++ b/OpenSim/Region/Physics/PhysXPlugin/OpenSim.Region.Physics.PhysXPlugin.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{988F0AC4-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{A6D191D8-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Physics.PhysXPlugin</AssemblyName> 12 <AssemblyName>OpenSim.Region.Physics.PhysXPlugin</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Physics.PhysXPlugin</RootNamespace> 19 <RootNamespace>OpenSim.Region.Physics.PhysXPlugin</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\Physics\</OutputPath> 35 <OutputPath>..\..\..\..\bin\Physics\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\Physics\</OutputPath> 53 <OutputPath>..\..\..\..\bin\Physics\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,11 +59,11 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Axiom.MathLib.dll" > 61 <Reference Include="Axiom.MathLib.dll" >
62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath> 62 <HintPath>..\..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="PhysX_Wrapper_Dotnet.dll" > 65 <Reference Include="PhysX_Wrapper_Dotnet.dll" >
66 <HintPath>..\..\..\bin\PhysX_Wrapper_Dotnet.dll</HintPath> 66 <HintPath>..\..\..\..\bin\PhysX_Wrapper_Dotnet.dll</HintPath>
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="System" > 69 <Reference Include="System" >
@@ -72,9 +72,9 @@
72 </Reference> 72 </Reference>
73 </ItemGroup> 73 </ItemGroup>
74 <ItemGroup> 74 <ItemGroup>
75 <ProjectReference Include="..\Manager\OpenSim.Physics.Manager.csproj"> 75 <ProjectReference Include="..\Manager\OpenSim.Region.Physics.Manager.csproj">
76 <Name>OpenSim.Physics.Manager</Name> 76 <Name>OpenSim.Region.Physics.Manager</Name>
77 <Project>{8BE16150-0000-0000-0000-000000000000}</Project> 77 <Project>{F4FF31EB-0000-0000-0000-000000000000}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
79 <Private>False</Private> 79 <Private>False</Private>
80 </ProjectReference> 80 </ProjectReference>
diff --git a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build b/OpenSim/Region/Physics/PhysXPlugin/OpenSim.Region.Physics.PhysXPlugin.dll.build
index be7a847..c1a9608 100644
--- a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build
+++ b/OpenSim/Region/Physics/PhysXPlugin/OpenSim.Region.Physics.PhysXPlugin.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.Physics.PhysXPlugin" default="build"> 2<project name="OpenSim.Region.Physics.PhysXPlugin" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,7 +8,7 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.Physics.PhysXPlugin" dynamicprefix="true" > 11 <resources prefix="OpenSim.Region.Physics.PhysXPlugin" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" /> 14 <include name="AssemblyInfo.cs" />
@@ -19,15 +19,15 @@
19 <include name="${project::get-base-directory()}" /> 19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" /> 20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib> 21 </lib>
22 <include name="../../../bin/Axiom.MathLib.dll" /> 22 <include name="../../../../bin/Axiom.MathLib.dll" />
23 <include name="../../../bin/OpenSim.Physics.Manager.dll" /> 23 <include name="../../../../bin/OpenSim.Region.Physics.Manager.dll" />
24 <include name="../../../bin/PhysX_Wrapper_Dotnet.dll" /> 24 <include name="../../../../bin/PhysX_Wrapper_Dotnet.dll" />
25 <include name="System.dll" /> 25 <include name="System.dll" />
26 </references> 26 </references>
27 </csc> 27 </csc>
28 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/Physics/" /> 28 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/Physics/" />
29 <mkdir dir="${project::get-base-directory()}/../../../bin/Physics/"/> 29 <mkdir dir="${project::get-base-directory()}/../../../../bin/Physics/"/>
30 <copy todir="${project::get-base-directory()}/../../../bin/Physics/"> 30 <copy todir="${project::get-base-directory()}/../../../../bin/Physics/">
31 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 31 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
32 <include name="*.dll"/> 32 <include name="*.dll"/>
33 <include name="*.exe"/> 33 <include name="*.exe"/>
diff --git a/OpenSim/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
index 200b232..8bf794b 100644
--- a/OpenSim/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using OpenSim.Physics.Manager; 30using OpenSim.Physics.Manager;
31using PhysXWrapper; 31using PhysXWrapper;
32 32
33namespace OpenSim.Physics.PhysXPlugin 33namespace OpenSim.Region.Physics.PhysXPlugin
34{ 34{
35 /// <summary> 35 /// <summary>
36 /// Will be the PhysX plugin but for now will be a very basic physics engine 36 /// Will be the PhysX plugin but for now will be a very basic physics engine
diff --git a/OpenSim/Region/Scripting/Properties/AssemblyInfo.cs b/OpenSim/Region/Scripting/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..f5da4c0
--- /dev/null
+++ b/OpenSim/Region/Scripting/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
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.Scripting")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Scripting")]
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("61eae1ad-82aa-4c77-8bc5-b5a8c9522b18")]
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// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Region/Scripting/Script.cs b/OpenSim/Region/Scripting/Script.cs
new file mode 100644
index 0000000..0f4af00
--- /dev/null
+++ b/OpenSim/Region/Scripting/Script.cs
@@ -0,0 +1,32 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5using OpenSim.Framework.Console;
6using OpenSim.Framework;
7using OpenSim.Region;
8using OpenSim.Region.Scenes;
9
10namespace OpenSim.Scripting
11{
12 public interface IScript
13 {
14 void Initialise(ScriptInfo scriptInfo);
15 }
16
17 public class TestScript : IScript
18 {
19 ScriptInfo script;
20
21 public void Initialise(ScriptInfo scriptInfo)
22 {
23 script = scriptInfo;
24 script.events.OnFrame += new OpenSim.Region.Scenes.EventManager.OnFrameDelegate(events_OnFrame);
25 }
26
27 void events_OnFrame()
28 {
29 script.logger.Verbose("Hello World!");
30 }
31 }
32}
diff --git a/OpenSim/Region/Scripting/ScriptAccess.cs b/OpenSim/Region/Scripting/ScriptAccess.cs
new file mode 100644
index 0000000..a9fede5
--- /dev/null
+++ b/OpenSim/Region/Scripting/ScriptAccess.cs
@@ -0,0 +1,31 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5using OpenSim.Region.Scenes;
6using OpenSim.Framework.Console;
7
8namespace OpenSim.Scripting
9{
10 /// <summary>
11 /// Class which provides access to the world
12 /// </summary>
13 public class ScriptInfo
14 {
15 // Reference to world.eventsManager provided for convenience
16 public EventManager events;
17
18 // The main world
19 public Scene world;
20
21 // The console
22 public LogBase logger;
23
24 public ScriptInfo(Scene scene)
25 {
26 world = scene;
27 events = world.eventManager;
28 logger = OpenSim.Framework.Console.MainLog.Instance;
29 }
30 }
31}
diff --git a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
index ab3c34c..3bc6f25 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
+++ b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
@@ -39,7 +39,7 @@ using BerkeleyDb;
39using Kds.Serialization; 39using Kds.Serialization;
40using Kds.Serialization.Buffer; 40using Kds.Serialization.Buffer;
41 41
42namespace OpenSim.Storage.LocalStorageBDB 42namespace OpenSim.Region.Storage.LocalStorageBDB
43{ 43{
44 public class BDBLocalStorage : ILocalStorage 44 public class BDBLocalStorage : ILocalStorage
45 { 45 {
diff --git a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Region.Storage.LocalStorageBerkeleyDB.csproj
index 417643f..b956c9b 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj
+++ b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Region.Storage.LocalStorageBerkeleyDB.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{EE9E5D96-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{A4691E59-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Storage.LocalStorageBerkeleyDB</AssemblyName> 12 <AssemblyName>OpenSim.Region.Storage.LocalStorageBerkeleyDB</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Storage.LocalStorageBerkeleyDB</RootNamespace> 19 <RootNamespace>OpenSim.Region.Storage.LocalStorageBerkeleyDB</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,15 +59,15 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Kds.Serialization.dll" > 61 <Reference Include="Kds.Serialization.dll" >
62 <HintPath>..\..\..\bin\Kds.Serialization.dll</HintPath> 62 <HintPath>..\..\..\..\bin\Kds.Serialization.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="libdb_dotNET43.dll" > 65 <Reference Include="libdb_dotNET43.dll" >
66 <HintPath>..\..\..\bin\libdb_dotNET43.dll</HintPath> 66 <HintPath>..\..\..\..\bin\libdb_dotNET43.dll</HintPath>
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="libsecondlife.dll" > 69 <Reference Include="libsecondlife.dll" >
70 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> 70 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
71 <Private>False</Private> 71 <Private>False</Private>
72 </Reference> 72 </Reference>
73 <Reference Include="System" > 73 <Reference Include="System" >
@@ -84,13 +84,13 @@
84 </Reference> 84 </Reference>
85 </ItemGroup> 85 </ItemGroup>
86 <ItemGroup> 86 <ItemGroup>
87 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 87 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
88 <Name>OpenSim.Framework</Name> 88 <Name>OpenSim.Framework</Name>
89 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 89 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
90 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 90 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
91 <Private>False</Private> 91 <Private>False</Private>
92 </ProjectReference> 92 </ProjectReference>
93 <ProjectReference Include="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 93 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
94 <Name>OpenSim.Framework.Console</Name> 94 <Name>OpenSim.Framework.Console</Name>
95 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 95 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
96 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 96 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
diff --git a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Region.Storage.LocalStorageBerkeleyDB.dll.build b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Region.Storage.LocalStorageBerkeleyDB.dll.build
new file mode 100644
index 0000000..20f5171
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Region.Storage.LocalStorageBerkeleyDB.dll.build
@@ -0,0 +1,46 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.Storage.LocalStorageBerkeleyDB" 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.Region.Storage.LocalStorageBerkeleyDB" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="BDBLocalStorage.cs" />
15 </sources>
16 <references basedir="${project::get-base-directory()}">
17 <lib>
18 <include name="${project::get-base-directory()}" />
19 <include name="${project::get-base-directory()}/${build.dir}" />
20 </lib>
21 <include name="../../../../bin/Kds.Serialization.dll" />
22 <include name="../../../../bin/libdb_dotNET43.dll" />
23 <include name="../../../../bin/libsecondlife.dll" />
24 <include name="../../../../bin/OpenSim.Framework.dll" />
25 <include name="../../../../bin/OpenSim.Framework.Console.dll" />
26 <include name="System.dll" />
27 <include name="System.Data.dll" />
28 <include name="System.Xml.dll" />
29 </references>
30 </csc>
31 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
32 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
33 <copy todir="${project::get-base-directory()}/../../../../bin/">
34 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
35 <include name="*.dll"/>
36 <include name="*.exe"/>
37 </fileset>
38 </copy>
39 </target>
40 <target name="clean">
41 <delete dir="${bin.dir}" failonerror="false" />
42 <delete dir="${obj.dir}" failonerror="false" />
43 </target>
44 <target name="doc" description="Creates documentation.">
45 </target>
46</project>
diff --git a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build
index bc2d8ec..bc2d8ec 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build
+++ b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs
index ea2b62e..ea2b62e 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/AssemblyInfo.cs
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs
index 8e6b04d..5cb4861 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/Db4LocalStorage.cs
@@ -36,7 +36,7 @@ using OpenSim.Framework.Types;
36using OpenSim.Framework.Console; 36using OpenSim.Framework.Console;
37 37
38 38
39namespace OpenSim.Storage.LocalStorageDb4o 39namespace OpenSim.Region.Storage.LocalStorageDb4o
40{ 40{
41 /// <summary> 41 /// <summary>
42 /// 42 ///
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs
index 56387ac..22f3392 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/MapStorage.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Text; 30using System.Text;
31 31
32namespace OpenSim.Storage.LocalStorageDb4o 32namespace OpenSim.Region.Storage.LocalStorageDb4o
33{ 33{
34 public class MapStorage 34 public class MapStorage
35 { 35 {
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj
index 5b8f1c1..147158c 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{E1B79ECF-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{43DB702D-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Storage.LocalStorageDb4o</AssemblyName> 12 <AssemblyName>OpenSim.Region.Storage.LocalStorageDb4o</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Storage.LocalStorageDb4o</RootNamespace> 19 <RootNamespace>OpenSim.Region.Storage.LocalStorageDb4o</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,11 +59,11 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="Db4objects.Db4o.dll" > 61 <Reference Include="Db4objects.Db4o.dll" >
62 <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath> 62 <HintPath>..\..\..\..\bin\Db4objects.Db4o.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="libsecondlife.dll" > 65 <Reference Include="libsecondlife.dll" >
66 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> 66 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="System" > 69 <Reference Include="System" >
@@ -76,13 +76,13 @@
76 </Reference> 76 </Reference>
77 </ItemGroup> 77 </ItemGroup>
78 <ItemGroup> 78 <ItemGroup>
79 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 79 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
80 <Name>OpenSim.Framework</Name> 80 <Name>OpenSim.Framework</Name>
81 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 81 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private> 83 <Private>False</Private>
84 </ProjectReference> 84 </ProjectReference>
85 <ProjectReference Include="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 85 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
86 <Name>OpenSim.Framework.Console</Name> 86 <Name>OpenSim.Framework.Console</Name>
87 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 87 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 88 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
diff --git a/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.dll.build b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.dll.build
new file mode 100644
index 0000000..fc9f055
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/OpenSim.Region.Storage.LocalStorageDb4o.dll.build
@@ -0,0 +1,48 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.Storage.LocalStorageDb4o" 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.Region.Storage.LocalStorageDb4o" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="Db4LocalStorage.cs" />
16 <include name="MapStorage.cs" />
17 <include name="UUIDParcelQuery.cs" />
18 <include name="UUIDPrimQuery.cs" />
19 </sources>
20 <references basedir="${project::get-base-directory()}">
21 <lib>
22 <include name="${project::get-base-directory()}" />
23 <include name="${project::get-base-directory()}/${build.dir}" />
24 </lib>
25 <include name="../../../../bin/Db4objects.Db4o.dll" />
26 <include name="../../../../bin/libsecondlife.dll" />
27 <include name="../../../../bin/OpenSim.Framework.dll" />
28 <include name="../../../../bin/OpenSim.Framework.Console.dll" />
29 <include name="System.dll" />
30 <include name="System.Xml.dll" />
31 </references>
32 </csc>
33 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
34 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
35 <copy todir="${project::get-base-directory()}/../../../../bin/">
36 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
37 <include name="*.dll"/>
38 <include name="*.exe"/>
39 </fileset>
40 </copy>
41 </target>
42 <target name="clean">
43 <delete dir="${bin.dir}" failonerror="false" />
44 <delete dir="${obj.dir}" failonerror="false" />
45 </target>
46 <target name="doc" description="Creates documentation.">
47 </target>
48</project>
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDParcelQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs
index d24fb5f..dcbe639 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDParcelQuery.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDParcelQuery.cs
@@ -34,7 +34,7 @@ using libsecondlife;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36 36
37namespace OpenSim.Storage.LocalStorageDb4o 37namespace OpenSim.Region.Storage.LocalStorageDb4o
38{ 38{
39 public class UUIDParcelQuery : Predicate 39 public class UUIDParcelQuery : Predicate
40 { 40 {
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDPrimQuery.cs b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs
index b2e8a91..23de6dd 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDPrimQuery.cs
+++ b/OpenSim/Region/Storage/LocalStorageDb4o/UUIDPrimQuery.cs
@@ -34,7 +34,7 @@ using libsecondlife;
34using OpenSim.Framework.Interfaces; 34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types; 35using OpenSim.Framework.Types;
36 36
37namespace OpenSim.Storage.LocalStorageDb4o 37namespace OpenSim.Region.Storage.LocalStorageDb4o
38{ 38{
39 public class UUIDPrimQuery : Predicate 39 public class UUIDPrimQuery : Predicate
40 { 40 {
diff --git a/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj b/OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Region.Storage.LocalStorageSQLite.csproj
index ff93a8f..d1353a5 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj
+++ b/OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Region.Storage.LocalStorageSQLite.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{6B20B603-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{477B9270-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Storage.LocalStorageSQLite</AssemblyName> 12 <AssemblyName>OpenSim.Region.Storage.LocalStorageSQLite</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Storage.LocalStorageSQLite</RootNamespace> 19 <RootNamespace>OpenSim.Region.Storage.LocalStorageSQLite</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,7 +59,7 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="libsecondlife.dll" > 61 <Reference Include="libsecondlife.dll" >
62 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> 62 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="System" > 65 <Reference Include="System" >
@@ -71,7 +71,7 @@
71 <Private>False</Private> 71 <Private>False</Private>
72 </Reference> 72 </Reference>
73 <Reference Include="System.Data.SQLite.dll" > 73 <Reference Include="System.Data.SQLite.dll" >
74 <HintPath>..\..\..\bin\System.Data.SQLite.dll</HintPath> 74 <HintPath>..\..\..\..\bin\System.Data.SQLite.dll</HintPath>
75 <Private>False</Private> 75 <Private>False</Private>
76 </Reference> 76 </Reference>
77 <Reference Include="System.Xml" > 77 <Reference Include="System.Xml" >
@@ -80,13 +80,13 @@
80 </Reference> 80 </Reference>
81 </ItemGroup> 81 </ItemGroup>
82 <ItemGroup> 82 <ItemGroup>
83 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 83 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
84 <Name>OpenSim.Framework</Name> 84 <Name>OpenSim.Framework</Name>
85 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 85 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private> 87 <Private>False</Private>
88 </ProjectReference> 88 </ProjectReference>
89 <ProjectReference Include="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 89 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
90 <Name>OpenSim.Framework.Console</Name> 90 <Name>OpenSim.Framework.Console</Name>
91 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 91 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
diff --git a/OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Region.Storage.LocalStorageSQLite.dll.build b/OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Region.Storage.LocalStorageSQLite.dll.build
new file mode 100644
index 0000000..9d12c33
--- /dev/null
+++ b/OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Region.Storage.LocalStorageSQLite.dll.build
@@ -0,0 +1,46 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.Storage.LocalStorageSQLite" 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.Region.Storage.LocalStorageSQLite" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="SQLiteLocalStorage.cs" />
15 <include name="Properties/AssemblyInfo.cs" />
16 </sources>
17 <references basedir="${project::get-base-directory()}">
18 <lib>
19 <include name="${project::get-base-directory()}" />
20 <include name="${project::get-base-directory()}/${build.dir}" />
21 </lib>
22 <include name="../../../../bin/libsecondlife.dll" />
23 <include name="../../../../bin/OpenSim.Framework.dll" />
24 <include name="../../../../bin/OpenSim.Framework.Console.dll" />
25 <include name="System.dll" />
26 <include name="System.Data.dll" />
27 <include name="../../../../bin/System.Data.SQLite.dll" />
28 <include name="System.Xml.dll" />
29 </references>
30 </csc>
31 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
32 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
33 <copy todir="${project::get-base-directory()}/../../../../bin/">
34 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
35 <include name="*.dll"/>
36 <include name="*.exe"/>
37 </fileset>
38 </copy>
39 </target>
40 <target name="clean">
41 <delete dir="${bin.dir}" failonerror="false" />
42 <delete dir="${obj.dir}" failonerror="false" />
43 </target>
44 <target name="doc" description="Creates documentation.">
45 </target>
46</project>
diff --git a/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build b/OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build
index bd4c731..bd4c731 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build
+++ b/OpenSim/Region/Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build
diff --git a/OpenSim/OpenSim.Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs b/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs
index b45debf..80158d5 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs
@@ -32,11 +32,11 @@ using System.Runtime.InteropServices;
32// General Information about an assembly is controlled through the following 32// General Information about an assembly is controlled through the following
33// set of attributes. Change these attribute values to modify the information 33// set of attributes. Change these attribute values to modify the information
34// associated with an assembly. 34// associated with an assembly.
35[assembly: AssemblyTitle("OpenSim.Storage.LocalStorageSQLite")] 35[assembly: AssemblyTitle("OpenSim.Region.Storage.LocalStorageSQLite")]
36[assembly: AssemblyDescription("")] 36[assembly: AssemblyDescription("")]
37[assembly: AssemblyConfiguration("")] 37[assembly: AssemblyConfiguration("")]
38[assembly: AssemblyCompany("")] 38[assembly: AssemblyCompany("")]
39[assembly: AssemblyProduct("OpenSim.Storage.LocalStorageSQLite")] 39[assembly: AssemblyProduct("OpenSim.Region.Storage.LocalStorageSQLite")]
40[assembly: AssemblyCopyright("Copyright © 2007")] 40[assembly: AssemblyCopyright("Copyright © 2007")]
41[assembly: AssemblyTrademark("")] 41[assembly: AssemblyTrademark("")]
42[assembly: AssemblyCulture("")] 42[assembly: AssemblyCulture("")]
diff --git a/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
index 8a7893e..b407be4 100644
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
+++ b/OpenSim/Region/Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
@@ -37,7 +37,7 @@ using libsecondlife;
37using OpenSim.Framework.Interfaces; 37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Types; 38using OpenSim.Framework.Types;
39 39
40namespace OpenSim.Storage.LocalStorageSQLite 40namespace OpenSim.Region.Storage.LocalStorageSQLite
41{ 41{
42 public class SQLiteLocalStorage : ILocalStorage 42 public class SQLiteLocalStorage : ILocalStorage
43 { 43 {
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj b/OpenSim/Region/Terrain.BasicTerrain/OpenSim.Region.Terrain.BasicTerrain.csproj
index 0469efe..24667e5 100644
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj
+++ b/OpenSim/Region/Terrain.BasicTerrain/OpenSim.Region.Terrain.BasicTerrain.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{2270B8FE-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{C9E0F891-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Terrain.BasicTerrain</AssemblyName> 12 <AssemblyName>OpenSim.Region.Terrain.BasicTerrain</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Terrain.BasicTerrain</RootNamespace> 19 <RootNamespace>OpenSim.Region.Terrain.BasicTerrain</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,7 +59,7 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="libTerrain-BSD.dll" > 61 <Reference Include="libTerrain-BSD.dll" >
62 <HintPath>..\..\bin\libTerrain-BSD.dll</HintPath> 62 <HintPath>..\..\..\bin\libTerrain-BSD.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="Microsoft.JScript" > 65 <Reference Include="Microsoft.JScript" >
@@ -67,7 +67,7 @@
67 <Private>False</Private> 67 <Private>False</Private>
68 </Reference> 68 </Reference>
69 <Reference Include="openjpegnet.dll" > 69 <Reference Include="openjpegnet.dll" >
70 <HintPath>..\..\bin\openjpegnet.dll</HintPath> 70 <HintPath>..\..\..\bin\openjpegnet.dll</HintPath>
71 <Private>False</Private> 71 <Private>False</Private>
72 </Reference> 72 </Reference>
73 <Reference Include="System" > 73 <Reference Include="System" >
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build b/OpenSim/Region/Terrain.BasicTerrain/OpenSim.Region.Terrain.BasicTerrain.dll.build
index 91dd6f5..dc7203a 100644
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build
+++ b/OpenSim/Region/Terrain.BasicTerrain/OpenSim.Region.Terrain.BasicTerrain.dll.build
@@ -1,5 +1,5 @@
1<?xml version="1.0" ?> 1<?xml version="1.0" ?>
2<project name="OpenSim.Terrain.BasicTerrain" default="build"> 2<project name="OpenSim.Region.Terrain.BasicTerrain" default="build">
3 <target name="build"> 3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> 4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" /> 5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
@@ -8,7 +8,7 @@
8 </fileset> 8 </fileset>
9 </copy> 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"> 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.Terrain.BasicTerrain" dynamicprefix="true" > 11 <resources prefix="OpenSim.Region.Terrain.BasicTerrain" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="TerrainEngine.cs" /> 14 <include name="TerrainEngine.cs" />
@@ -20,18 +20,18 @@
20 <include name="${project::get-base-directory()}" /> 20 <include name="${project::get-base-directory()}" />
21 <include name="${project::get-base-directory()}/${build.dir}" /> 21 <include name="${project::get-base-directory()}/${build.dir}" />
22 </lib> 22 </lib>
23 <include name="../../bin/libTerrain-BSD.dll" /> 23 <include name="../../../bin/libTerrain-BSD.dll" />
24 <include name="Microsoft.JScript.dll" /> 24 <include name="Microsoft.JScript.dll" />
25 <include name="../../bin/openjpegnet.dll" /> 25 <include name="../../../bin/openjpegnet.dll" />
26 <include name="System.dll" /> 26 <include name="System.dll" />
27 <include name="System.Data.dll" /> 27 <include name="System.Data.dll" />
28 <include name="System.Drawing.dll" /> 28 <include name="System.Drawing.dll" />
29 <include name="System.Xml.dll" /> 29 <include name="System.Xml.dll" />
30 </references> 30 </references>
31 </csc> 31 </csc>
32 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> 32 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
33 <mkdir dir="${project::get-base-directory()}/../../bin/"/> 33 <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
34 <copy todir="${project::get-base-directory()}/../../bin/"> 34 <copy todir="${project::get-base-directory()}/../../../bin/">
35 <fileset basedir="${project::get-base-directory()}/${build.dir}/" > 35 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
36 <include name="*.dll"/> 36 <include name="*.dll"/>
37 <include name="*.exe"/> 37 <include name="*.exe"/>
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/Properties/AssemblyInfo.cs b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs
index 827c68f..7d10ae3 100644
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs
@@ -32,11 +32,11 @@ using System.Runtime.InteropServices;
32// General Information about an assembly is controlled through the following 32// General Information about an assembly is controlled through the following
33// set of attributes. Change these attribute values to modify the information 33// set of attributes. Change these attribute values to modify the information
34// associated with an assembly. 34// associated with an assembly.
35[assembly: AssemblyTitle("OpenSim.Terrain.BasicTerrain")] 35[assembly: AssemblyTitle("OpenSim.Region.Terrain.BasicTerrain")]
36[assembly: AssemblyDescription("")] 36[assembly: AssemblyDescription("")]
37[assembly: AssemblyConfiguration("")] 37[assembly: AssemblyConfiguration("")]
38[assembly: AssemblyCompany("")] 38[assembly: AssemblyCompany("")]
39[assembly: AssemblyProduct("OpenSim.Terrain.BasicTerrain")] 39[assembly: AssemblyProduct("OpenSim.Region.Terrain.BasicTerrain")]
40[assembly: AssemblyCopyright("Copyright © 2007")] 40[assembly: AssemblyCopyright("Copyright © 2007")]
41[assembly: AssemblyTrademark("")] 41[assembly: AssemblyTrademark("")]
42[assembly: AssemblyCulture("")] 42[assembly: AssemblyCulture("")]
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index 4f989fa..c2d7e86 100644
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -32,7 +32,7 @@ using System.Drawing;
32using libTerrain; 32using libTerrain;
33using OpenJPEGNet; 33using OpenJPEGNet;
34 34
35namespace OpenSim.Terrain 35namespace OpenSim.Region.Terrain
36{ 36{
37 public class TerrainCommand 37 public class TerrainCommand
38 { 38 {
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainFilter.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs
index 5baf87f..e0ae586 100644
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainFilter.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs
@@ -36,7 +36,7 @@ using Microsoft.JScript;
36 36
37using libTerrain; 37using libTerrain;
38 38
39namespace OpenSim.Terrain 39namespace OpenSim.Region.Terrain
40{ 40{
41 public interface ITerrainFilter 41 public interface ITerrainFilter
42 { 42 {