aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CONTRIBUTORS.txt30
-rw-r--r--Common/OpenSim.Framework.Console/AssemblyInfo.cs58
-rw-r--r--Common/OpenSim.Framework.Console/ConsoleBase.cs220
-rw-r--r--Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs39
-rw-r--r--Common/OpenSim.Framework.Console/MainConsole.cs49
-rw-r--r--Common/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj89
-rw-r--r--Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build42
-rw-r--r--Common/OpenSim.Framework/AgentInventory.cs278
-rw-r--r--Common/OpenSim.Framework/BlockingQueue.cs60
-rw-r--r--Common/OpenSim.Framework/HeightMapGenHills.cs150
-rw-r--r--Common/OpenSim.Framework/Interfaces/IAssetServer.cs68
-rw-r--r--Common/OpenSim.Framework/Interfaces/IClientAPI.cs35
-rw-r--r--Common/OpenSim.Framework/Interfaces/IConfig.cs76
-rw-r--r--Common/OpenSim.Framework/Interfaces/IGenericConfig.cs15
-rw-r--r--Common/OpenSim.Framework/Interfaces/IGridConfig.cs64
-rw-r--r--Common/OpenSim.Framework/Interfaces/IGridServer.cs81
-rw-r--r--Common/OpenSim.Framework/Interfaces/ILocalStorage.cs68
-rw-r--r--Common/OpenSim.Framework/Interfaces/IScriptAPI.cs14
-rw-r--r--Common/OpenSim.Framework/Interfaces/IScriptEngine.cs14
-rw-r--r--Common/OpenSim.Framework/Interfaces/IUserConfig.cs58
-rw-r--r--Common/OpenSim.Framework/Interfaces/IUserServer.cs15
-rw-r--r--Common/OpenSim.Framework/Interfaces/LocalGridBase.cs24
-rw-r--r--Common/OpenSim.Framework/Interfaces/RemoteGridBase.cs37
-rw-r--r--Common/OpenSim.Framework/LoginService.cs42
-rw-r--r--Common/OpenSim.Framework/OpenSim.Framework.csproj200
-rw-r--r--Common/OpenSim.Framework/OpenSim.Framework.dll.build77
-rw-r--r--Common/OpenSim.Framework/Properties/AssemblyInfo.cs33
-rw-r--r--Common/OpenSim.Framework/Remoting.cs137
-rw-r--r--Common/OpenSim.Framework/SimProfile.cs110
-rw-r--r--Common/OpenSim.Framework/SimProfileBase.cs54
-rw-r--r--Common/OpenSim.Framework/Types/AgentCircuitData.cs50
-rw-r--r--Common/OpenSim.Framework/Types/AssetBase.cs49
-rw-r--r--Common/OpenSim.Framework/Types/AssetLandmark.cs61
-rw-r--r--Common/OpenSim.Framework/Types/AssetStorage.cs50
-rw-r--r--Common/OpenSim.Framework/Types/EstateSettings.cs96
-rw-r--r--Common/OpenSim.Framework/Types/Login.cs52
-rw-r--r--Common/OpenSim.Framework/Types/NeighbourInfo.cs47
-rw-r--r--Common/OpenSim.Framework/Types/OSVector3.cs46
-rw-r--r--Common/OpenSim.Framework/Types/ParcelData.cs115
-rw-r--r--Common/OpenSim.Framework/Types/PrimData.cs201
-rw-r--r--Common/OpenSim.Framework/UserProfile.cs89
-rw-r--r--Common/OpenSim.Framework/UserProfileManager.cs299
-rw-r--r--Common/OpenSim.Framework/UserProfileManagerBase.cs152
-rw-r--r--Common/OpenSim.Framework/Util.cs178
-rw-r--r--Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.csproj93
-rw-r--r--Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build42
-rw-r--r--Common/OpenSim.GenericConfig/Xml/Properties/AssemblyInfo.cs35
-rw-r--r--Common/OpenSim.GenericConfig/Xml/XmlConfig.cs136
-rw-r--r--Common/OpenSim.Servers/BaseHttpServer.cs283
-rw-r--r--Common/OpenSim.Servers/BaseServer.cs37
-rw-r--r--Common/OpenSim.Servers/CheckSumServer.cs139
-rw-r--r--Common/OpenSim.Servers/IRestHandler.cs35
-rw-r--r--Common/OpenSim.Servers/LocalUserProfileManager.cs124
-rw-r--r--Common/OpenSim.Servers/LoginResponse.cs669
-rw-r--r--Common/OpenSim.Servers/LoginServer.cs296
-rw-r--r--Common/OpenSim.Servers/OpenSim.Servers.csproj133
-rw-r--r--Common/OpenSim.Servers/OpenSim.Servers.dll.build53
-rw-r--r--Common/OpenSim.Servers/SocketRegistry.cs63
-rw-r--r--Common/OpenSim.Servers/UDPServerBase.cs103
-rw-r--r--Common/OpenSim.Servers/XmlRpcMethod.cs34
-rw-r--r--Common/XmlRpcCS/Logger.cs46
-rw-r--r--Common/XmlRpcCS/SimpleHttpRequest.cs234
-rw-r--r--Common/XmlRpcCS/XMLRPC.csproj138
-rw-r--r--Common/XmlRpcCS/XMLRPC.dll.build58
-rw-r--r--Common/XmlRpcCS/XmlRpcBoxcarRequest.cs78
-rw-r--r--Common/XmlRpcCS/XmlRpcClientProxy.cs88
-rw-r--r--Common/XmlRpcCS/XmlRpcDeserializer.cs222
-rw-r--r--Common/XmlRpcCS/XmlRpcErrorCodes.cs78
-rw-r--r--Common/XmlRpcCS/XmlRpcException.cs66
-rw-r--r--Common/XmlRpcCS/XmlRpcExposedAttribute.cs87
-rw-r--r--Common/XmlRpcCS/XmlRpcRequest.cs177
-rw-r--r--Common/XmlRpcCS/XmlRpcRequestDeserializer.cs92
-rw-r--r--Common/XmlRpcCS/XmlRpcRequestSerializer.cs78
-rw-r--r--Common/XmlRpcCS/XmlRpcResponder.cs127
-rw-r--r--Common/XmlRpcCS/XmlRpcResponse.cs112
-rw-r--r--Common/XmlRpcCS/XmlRpcResponseDeserializer.cs92
-rw-r--r--Common/XmlRpcCS/XmlRpcResponseSerializer.cs84
-rw-r--r--Common/XmlRpcCS/XmlRpcSerializer.cs143
-rw-r--r--Common/XmlRpcCS/XmlRpcServer.cs266
-rw-r--r--Common/XmlRpcCS/XmlRpcSystemObject.cs279
-rw-r--r--Common/XmlRpcCS/XmlRpcXmlTokens.cs103
-rw-r--r--OpenGridServices.build103
-rw-r--r--OpenGridServices.sln91
-rw-r--r--OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs58
-rw-r--r--OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs161
-rw-r--r--OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj107
-rw-r--r--OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build46
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs161
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs165
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs205
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj111
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build47
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs190
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs214
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj104
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build45
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs258
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs309
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs107
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs665
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs271
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj117
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build49
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj108
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build46
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs190
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs209
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/GridData.cs110
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/ILogData.cs94
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs100
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs187
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj113
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build49
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs114
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/UserData.cs131
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs182
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs140
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs94
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj99
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build44
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs130
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/Main.cs338
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj122
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build50
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj126
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build49
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs33
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/GridManager.cs589
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/Main.cs271
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj134
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build52
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs33
-rw-r--r--OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs126
-rw-r--r--OpenGridServices/OpenGridServices.InventoryServer/Main.cs87
-rw-r--r--OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj125
-rw-r--r--OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj.user12
-rw-r--r--OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build50
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds16
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs39
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks2
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs32
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs33
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs16
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs29
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs106
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs96
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs76
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp43
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidbbin12308 -> 0 bytes
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs37
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs133
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs226
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs256
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs35
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic502
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/Main.cs216
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj63
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj128
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build51
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs33
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/UserManager.cs660
-rw-r--r--OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs58
-rw-r--r--OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs96
-rw-r--r--OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj107
-rw-r--r--OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build46
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.cs259
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.csproj107
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.exe.build44
-rw-r--r--OpenSim.FxCop7241
-rw-r--r--OpenSim.build118
-rw-r--r--OpenSim.sln121
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Local/AssemblyInfo.cs58
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs298
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs158
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj110
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build46
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Remote/AssemblyInfo.cs58
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj112
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build46
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs135
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs212
-rw-r--r--OpenSim/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs58
-rw-r--r--OpenSim/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs278
-rw-r--r--OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj93
-rw-r--r--OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build42
-rw-r--r--OpenSim/OpenSim.Physics/Manager/AssemblyInfo.cs58
-rw-r--r--OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj112
-rw-r--r--OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build47
-rw-r--r--OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs162
-rw-r--r--OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs117
-rw-r--r--OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs114
-rw-r--r--OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs55
-rw-r--r--OpenSim/OpenSim.Physics/OdePlugin/AssemblyInfo.cs58
-rw-r--r--OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs457
-rw-r--r--OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj97
-rw-r--r--OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build43
-rw-r--r--OpenSim/OpenSim.Physics/PhysXPlugin/AssemblyInfo.cs58
-rw-r--r--OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj97
-rw-r--r--OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build43
-rw-r--r--OpenSim/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs424
-rw-r--r--OpenSim/OpenSim.RegionServer/AgentAssetUpload.cs259
-rw-r--r--OpenSim/OpenSim.RegionServer/Assets/AssetCache.cs572
-rw-r--r--OpenSim/OpenSim.RegionServer/Assets/InventoryCache.cs338
-rw-r--r--OpenSim/OpenSim.RegionServer/AuthenticateSessionsBase.cs131
-rw-r--r--OpenSim/OpenSim.RegionServer/AuthenticateSessionsLocal.cs58
-rw-r--r--OpenSim/OpenSim.RegionServer/AuthenticateSessionsRemote.cs72
-rw-r--r--OpenSim/OpenSim.RegionServer/CAPS/AdminWebFront.cs281
-rw-r--r--OpenSim/OpenSim.RegionServer/Client/ClientView.Grid.cs192
-rw-r--r--OpenSim/OpenSim.RegionServer/Client/ClientView.PacketHandlers.cs196
-rw-r--r--OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs523
-rw-r--r--OpenSim/OpenSim.RegionServer/Client/ClientView.cs461
-rw-r--r--OpenSim/OpenSim.RegionServer/Client/ClientViewBase.cs326
-rw-r--r--OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs293
-rw-r--r--OpenSim/OpenSim.RegionServer/Grid.cs117
-rw-r--r--OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj264
-rw-r--r--OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build92
-rw-r--r--OpenSim/OpenSim.RegionServer/OpenSimMain.cs531
-rw-r--r--OpenSim/OpenSim.RegionServer/OpenSimNetworkHandler.cs45
-rw-r--r--OpenSim/OpenSim.RegionServer/PacketServer.cs116
-rw-r--r--OpenSim/OpenSim.RegionServer/RegionInfo.cs380
-rw-r--r--OpenSim/OpenSim.RegionServer/RegionInfoBase.cs62
-rw-r--r--OpenSim/OpenSim.RegionServer/RegionServerBase.cs130
-rw-r--r--OpenSim/OpenSim.RegionServer/Scripting/IScriptContext.cs40
-rw-r--r--OpenSim/OpenSim.RegionServer/Scripting/IScriptEntity.cs46
-rw-r--r--OpenSim/OpenSim.RegionServer/Scripting/IScriptHandler.cs125
-rw-r--r--OpenSim/OpenSim.RegionServer/Scripting/Script.cs53
-rw-r--r--OpenSim/OpenSim.RegionServer/Scripting/ScriptFactory.cs35
-rw-r--r--OpenSim/OpenSim.RegionServer/Scripting/Scripts/FollowRandomAvatar.cs64
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/Avatar.Client.cs60
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/Avatar.Update.cs371
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs435
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/AvatarAnimations.cs73
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/Entity.cs151
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/ParcelManager.cs837
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/Primitive.cs598
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/Primitive2.cs519
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/SceneObject.cs102
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/World.PacketHandlers.cs449
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/World.Scripting.cs151
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/World.cs737
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/WorldBase.cs205
-rw-r--r--OpenSim/OpenSim.RegionServer/Types/Mesh.cs55
-rw-r--r--OpenSim/OpenSim.RegionServer/Types/Triangle.cs55
-rw-r--r--OpenSim/OpenSim.RegionServer/UDPServer.cs265
-rw-r--r--OpenSim/OpenSim.RegionServer/VersionInfo.cs39
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/ClassInstance.cs45
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/ClassRecord.cs503
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Heap.cs43
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs135
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterLogic.cs427
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterMethods.cs161
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterReturn.cs40
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/MainMemory.cs45
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/MethodMemory.cs46
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Object.cs37
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj153
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build62
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSimJVM.cs161
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Properties/AssemblyInfo.cs33
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Stack.cs42
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/StackFrame.cs49
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Thread.cs115
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/ArrayReference.cs10
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/BaseType.cs10
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/ObjectReference.cs16
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Byte.cs10
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Char.cs10
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Float.cs16
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Int.cs16
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs118
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj112
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build46
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs58
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs271
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs43
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj116
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build48
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDParcelQuery.cs52
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDPrimQuery.cs52
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj111
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build46
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs199
-rw-r--r--OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj99
-rw-r--r--OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build44
-rw-r--r--OpenSim/OpenSim.Terrain.BasicTerrain/Properties/AssemblyInfo.cs35
-rw-r--r--OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs533
-rw-r--r--OpenSim/OpenSim/Application.cs137
-rw-r--r--OpenSim/OpenSim/OpenSim.csproj147
-rw-r--r--OpenSim/OpenSim/OpenSim.exe.build52
-rw-r--r--OpenSim/OpenSim/OpenSimMain.cs552
-rw-r--r--Prebuild/Prebuild.build67
-rw-r--r--Prebuild/Prebuild.sln19
-rw-r--r--Prebuild/README230
-rw-r--r--Prebuild/TODO21
-rw-r--r--Prebuild/doc/prebuild-example1.xml300
-rw-r--r--Prebuild/doc/prebuild-example2.xml72
-rw-r--r--Prebuild/doc/prebuild-example3.xml113
-rw-r--r--Prebuild/doc/prebuild-example4.xml715
-rw-r--r--Prebuild/doc/prebuild-example5.xml187
-rw-r--r--Prebuild/prebuild2
-rw-r--r--Prebuild/scripts/Clean.bat2
-rw-r--r--Prebuild/scripts/Help.bat2
-rw-r--r--Prebuild/scripts/MonoDevelop.sh2
-rw-r--r--Prebuild/scripts/Prebuild.nsi231
-rw-r--r--Prebuild/scripts/SharpDevelop.bat4
-rw-r--r--Prebuild/scripts/SharpDevelop2.bat4
-rw-r--r--Prebuild/scripts/VS2002.bat4
-rw-r--r--Prebuild/scripts/VS2003.bat4
-rw-r--r--Prebuild/scripts/VS2005.bat4
-rw-r--r--Prebuild/scripts/autotools.bat4
-rw-r--r--Prebuild/scripts/autotools.sh2
-rw-r--r--Prebuild/scripts/nant.bat4
-rw-r--r--Prebuild/scripts/nant.sh2
-rw-r--r--Prebuild/src/App.icobin4286 -> 0 bytes
-rw-r--r--Prebuild/src/Core/Attributes/DataNodeAttribute.cs81
-rw-r--r--Prebuild/src/Core/Attributes/OptionNodeAttribute.cs80
-rw-r--r--Prebuild/src/Core/Attributes/TargetAttribute.cs80
-rw-r--r--Prebuild/src/Core/FatalException.cs94
-rw-r--r--Prebuild/src/Core/Interfaces/IDataNode.cs56
-rw-r--r--Prebuild/src/Core/Interfaces/ITarget.cs60
-rw-r--r--Prebuild/src/Core/Kernel.cs758
-rw-r--r--Prebuild/src/Core/Nodes/ConfigurationNode.cs187
-rw-r--r--Prebuild/src/Core/Nodes/DataNode.cs82
-rw-r--r--Prebuild/src/Core/Nodes/ExcludeNode.cs85
-rw-r--r--Prebuild/src/Core/Nodes/FileNode.cs238
-rw-r--r--Prebuild/src/Core/Nodes/FilesNode.cs223
-rw-r--r--Prebuild/src/Core/Nodes/MatchNode.cs299
-rw-r--r--Prebuild/src/Core/Nodes/OptionsNode.cs655
-rw-r--r--Prebuild/src/Core/Nodes/ProcessNode.cs119
-rw-r--r--Prebuild/src/Core/Nodes/ProjectNode.cs510
-rw-r--r--Prebuild/src/Core/Nodes/ReferenceNode.cs153
-rw-r--r--Prebuild/src/Core/Nodes/ReferencePathNode.cs108
-rw-r--r--Prebuild/src/Core/Nodes/SolutionNode.cs288
-rw-r--r--Prebuild/src/Core/Parse/IfContext.cs163
-rw-r--r--Prebuild/src/Core/Parse/Preprocessor.cs519
-rw-r--r--Prebuild/src/Core/Targets/AutotoolsTarget.cs926
-rw-r--r--Prebuild/src/Core/Targets/DebugTarget.cs102
-rw-r--r--Prebuild/src/Core/Targets/MonoDevelopTarget.cs458
-rw-r--r--Prebuild/src/Core/Targets/NAntTarget.cs621
-rw-r--r--Prebuild/src/Core/Targets/SharpDevelop2Target.cs90
-rw-r--r--Prebuild/src/Core/Targets/SharpDevelopTarget.cs437
-rw-r--r--Prebuild/src/Core/Targets/VS2002Target.cs96
-rw-r--r--Prebuild/src/Core/Targets/VS2003Target.cs633
-rw-r--r--Prebuild/src/Core/Targets/VS2005Target.cs883
-rw-r--r--Prebuild/src/Core/UnknownLanguageException.cs63
-rw-r--r--Prebuild/src/Core/Utilities/CommandLineCollection.cs162
-rw-r--r--Prebuild/src/Core/Utilities/CurrentDirectory.cs89
-rw-r--r--Prebuild/src/Core/Utilities/Helper.cs661
-rw-r--r--Prebuild/src/Core/Utilities/Log.cs279
-rw-r--r--Prebuild/src/Core/WarningException.cs93
-rw-r--r--Prebuild/src/Prebuild.cs165
-rw-r--r--Prebuild/src/Prebuild.csproj205
-rw-r--r--Prebuild/src/Prebuild.exe.build80
-rw-r--r--Prebuild/src/Prebuild.snkbin596 -> 0 bytes
-rw-r--r--Prebuild/src/Properties/AssemblyInfo.cs101
-rw-r--r--Prebuild/src/data/dnpb-1.0.xsd183
-rw-r--r--Prebuild/src/data/dnpb-1.1.xsd184
-rw-r--r--Prebuild/src/data/dnpb-1.2.xsd198
-rw-r--r--Prebuild/src/data/dnpb-1.3.xsd206
-rw-r--r--Prebuild/src/data/dnpb-1.4.xsd212
-rw-r--r--Prebuild/src/data/dnpb-1.5.xsd215
-rw-r--r--Prebuild/src/data/prebuild-1.6.xsd231
-rw-r--r--Prebuild/src/data/prebuild-1.7.xsd261
-rw-r--r--bin/Axiom.MathLib.dllbin69632 -> 0 bytes
-rw-r--r--bin/Db4objects.Db4o.dllbin593408 -> 0 bytes
-rw-r--r--bin/Kds.Serialization.dllbin40960 -> 0 bytes
-rw-r--r--bin/MySql.Data.dllbin143360 -> 0 bytes
-rw-r--r--bin/Ode.NET.dllbin57344 -> 0 bytes
-rw-r--r--bin/OpenSimAPI.java36
-rw-r--r--bin/PhysX-wrapper.dllbin57344 -> 0 bytes
-rw-r--r--bin/PhysX_Wrapper_Dotnet.dllbin8704 -> 0 bytes
-rw-r--r--bin/Prebuild.exebin176128 -> 0 bytes
-rw-r--r--bin/System.Data.SQLite.dllbin568832 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/HOWTO.txt19
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld.bmpbin1048630 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_0_0.bmpbin262198 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_0_0.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_0_1.bmpbin262198 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_0_1.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_0_2.bmpbin262198 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_0_2.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_1_0.bmpbin262198 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_1_0.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_1_1.bmpbin262198 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_1_1.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_1_2.bmpbin262198 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_1_2.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_2_0.bmpbin262198 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_2_0.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_2_1.bmpbin262198 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_2_1.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_2_2.bmpbin262198 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_2_2.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Alien/alienworld_gray.bmpbin786486 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Coastal/HOWTO.txt9
-rw-r--r--bin/TerrainDatafiles/Coastal/output.bmpbin786486 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Coastal/output_x0_y0.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Coastal/output_x0_y1.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Coastal/output_x1_y0.r32bin262144 -> 0 bytes
-rw-r--r--bin/TerrainDatafiles/Coastal/output_x1_y1.r32bin262144 -> 0 bytes
-rw-r--r--bin/assets/base_shape.dat105
-rw-r--r--bin/assets/bricks.jp2bin32865 -> 0 bytes
-rw-r--r--bin/assets/granite.jp2bin32897 -> 0 bytes
-rw-r--r--bin/assets/hardwood.jp2bin32876 -> 0 bytes
-rw-r--r--bin/assets/map1.jp2bin570 -> 0 bytes
-rw-r--r--bin/assets/map_base.jp2bin153 -> 0 bytes
-rw-r--r--bin/assets/plywood.jp2bin32794 -> 0 bytes
-rw-r--r--bin/assets/rocks.jp2bin32731 -> 0 bytes
-rw-r--r--bin/assets/testpic2.jp2bin291 -> 0 bytes
-rw-r--r--bin/avatar-texture.datbin268 -> 0 bytes
-rw-r--r--bin/data/LICENSE-README-IMPORTANT.txt5
-rw-r--r--bin/data/avataranimations.xml10
-rw-r--r--bin/defaultstripe.pngbin887 -> 0 bytes
-rw-r--r--bin/libTerrain-BSD.dllbin32768 -> 0 bytes
-rw-r--r--bin/libdb_dotNET43.dllbin221184 -> 0 bytes
-rw-r--r--bin/libode.abin8041800 -> 0 bytes
-rwxr-xr-xbin/libode.sobin4474949 -> 0 bytes
-rw-r--r--bin/libsecondlife.dllbin2150400 -> 0 bytes
-rw-r--r--bin/log4net.dllbin270336 -> 0 bytes
-rw-r--r--bin/login.htm5
-rw-r--r--bin/mysql_connection.ini7
-rw-r--r--bin/newaccountform.htm9
-rw-r--r--bin/ode.dllbin409600 -> 0 bytes
-rwxr-xr-xbin/openjpegnet.dllbin17408 -> 0 bytes
-rw-r--r--bin/script1.txt34
-rw-r--r--bin/testadmin.htm125
-rw-r--r--libraries/libLSL/Properties/AssemblyInfo.cs35
-rw-r--r--libraries/libLSL/libLSL.csproj49
-rw-r--r--libraries/libLSL/lsl.cs329
-rw-r--r--libraries/libLSL/lslByteCode.cs133
-rw-r--r--libraries/libLSL/lslscript.cs10
-rw-r--r--prebuild.xml916
-rw-r--r--releng/CAUTION4
-rw-r--r--releng/README3
-rwxr-xr-xreleng/createreldir.sh9
-rw-r--r--releng/dist/INSTALL33
-rw-r--r--releng/dist/README70
-rw-r--r--releng/dist/SQL/mysql-agents.sql24
-rw-r--r--releng/dist/SQL/mysql-inventoryfolders.sql9
-rw-r--r--releng/dist/SQL/mysql-inventoryitems.sql14
-rw-r--r--releng/dist/SQL/mysql-logs.sql10
-rw-r--r--releng/dist/SQL/mysql-regions.sql29
-rw-r--r--releng/dist/SQL/mysql-users.sql34
-rwxr-xr-xreleng/dist/bin/OpenSim3
-rwxr-xr-xreleng/dobuild.sh22
-rwxr-xr-xreleng/makerel.sh30
-rwxr-xr-xreleng/parsetmpl.sh5
-rw-r--r--releng/templates/VersionInfo.cs.tmpl37
-rw-r--r--runprebuild.bat2
-rw-r--r--share/php/generateUserFunction.php46
-rw-r--r--share/sql/mysql-agents.sql24
-rw-r--r--share/sql/mysql-inventoryfolders.sql9
-rw-r--r--share/sql/mysql-inventoryitems.sql14
-rw-r--r--share/sql/mysql-logs.sql10
-rw-r--r--share/sql/mysql-regions.sql29
-rw-r--r--share/sql/mysql-users.sql34
462 files changed, 0 insertions, 64414 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
deleted file mode 100644
index 86fa8f3..0000000
--- a/CONTRIBUTORS.txt
+++ /dev/null
@@ -1,30 +0,0 @@
1
2The following people have contributed to OpenSim (Thankyou for your effort!)
3Add your name in here if you have committed to OpenSim
4
5OpenSim Developers
6(in order of appearance)
7
8* MW
9* Gareth
10* AdamZaius
11* MingChen
12* lbsa71
13* Andy-
14* MorphW
15* CW
16
17This software uses components from the following developers:
18* Sleepycat Software (Berkeley DB)
19* DB4objects, Inc. (DB4o)
20* SQLite (Public Domain)
21* XmlRpcCS (http://xmlrpccs.sf.net/)
22* MySQL, Inc. (MySQL Connector/NET)
23* AGEIA Inc. (PhysX)
24* Russel L. Smith (ODE)
25* Prebuild ( http://sourceforge.net/projects/dnpb/ )
26
27In addition, we would like to thank:
28* The Mono Project
29* The NANT Developers
30* Microsoft (.NET, MSSQL-Adapters) \ No newline at end of file
diff --git a/Common/OpenSim.Framework.Console/AssemblyInfo.cs b/Common/OpenSim.Framework.Console/AssemblyInfo.cs
deleted file mode 100644
index 8f715d2..0000000
--- a/Common/OpenSim.Framework.Console/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("ServerConsole")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("ServerConsole")]
43[assembly: AssemblyCopyright("")]
44[assembly: AssemblyTrademark("")]
45[assembly: AssemblyCulture("")]
46
47// This sets the default COM visibility of types in the assembly to invisible.
48// If you need to expose a type to COM, use [ComVisible(true)] on that type.
49[assembly: ComVisible(false)]
50
51// The assembly version has following format :
52//
53// Major.Minor.Build.Revision
54//
55// You can specify all values by your own or you can build default build and revision
56// numbers with the '*' character (the default):
57
58[assembly: AssemblyVersion("1.0.*")]
diff --git a/Common/OpenSim.Framework.Console/ConsoleBase.cs b/Common/OpenSim.Framework.Console/ConsoleBase.cs
deleted file mode 100644
index 30854fe..0000000
--- a/Common/OpenSim.Framework.Console/ConsoleBase.cs
+++ /dev/null
@@ -1,220 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.IO;
30
31namespace OpenSim.Framework.Console
32{
33 public enum LogPriority : int
34 {
35 CRITICAL,
36 HIGH,
37 MEDIUM,
38 NORMAL,
39 LOW,
40 VERBOSE,
41 EXTRAVERBOSE
42 }
43
44 public class ConsoleBase
45 {
46 StreamWriter Log;
47 public conscmd_callback cmdparser;
48 public string componentname;
49 private bool m_silent;
50
51 public ConsoleBase(string LogFile, string componentname, conscmd_callback cmdparser, bool silent )
52 {
53 this.componentname = componentname;
54 this.cmdparser = cmdparser;
55 this.m_silent = silent;
56 System.Console.WriteLine("ServerConsole.cs - creating new local console");
57 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
58 Log = File.AppendText(LogFile);
59 Log.WriteLine("========================================================================");
60 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
61 }
62
63 public void Close()
64 {
65 Log.WriteLine("Shutdown at " + DateTime.Now.ToString());
66 Log.Close();
67 }
68
69 public void Write(string format, params object[] args)
70 {
71 Notice(format,args);
72 return;
73 }
74
75 public void Warn(string format, params object[] args)
76 {
77 WriteNewLine(ConsoleColor.Yellow, format, args);
78 return;
79 }
80
81 public void Notice(string format, params object[] args)
82 {
83 WriteNewLine(ConsoleColor.White, format, args);
84 return;
85 }
86
87 public void Error(string format, params object[] args)
88 {
89 WriteNewLine(ConsoleColor.Red, format, args);
90 return;
91 }
92
93 public void Verbose(string format, params object[] args)
94 {
95 WriteNewLine(ConsoleColor.Gray, format, args);
96 return;
97 }
98
99 public void Status(string format, params object[] args)
100 {
101 WriteNewLine(ConsoleColor.Blue, format, args);
102 return;
103 }
104
105 private void WriteNewLine(System.ConsoleColor color, string format, params object[] args)
106 {
107 Log.WriteLine(format, args);
108 Log.Flush();
109 if (!m_silent)
110 {
111 try
112 {
113 System.Console.ForegroundColor = color;
114 System.Console.WriteLine(format, args);
115 System.Console.ResetColor();
116 } // Because mono and old debian sucks.
117 catch (System.ArgumentNullException)
118 {
119 System.Console.WriteLine(format, args);
120 }
121 }
122 return;
123 }
124
125 public string ReadLine()
126 {
127 string TempStr = System.Console.ReadLine();
128 Log.WriteLine(TempStr);
129 return TempStr;
130 }
131
132 public int Read()
133 {
134 int TempInt = System.Console.Read();
135 Log.Write((char)TempInt);
136 return TempInt;
137 }
138
139 // Displays a prompt and waits for the user to enter a string, then returns that string
140 // Done with no echo and suitable for passwords
141 public string PasswdPrompt(string prompt)
142 {
143 // FIXME: Needs to be better abstracted
144 Log.WriteLine(prompt);
145 this.Write(prompt);
146 ConsoleColor oldfg = System.Console.ForegroundColor;
147 System.Console.ForegroundColor = System.Console.BackgroundColor;
148 string temp = System.Console.ReadLine();
149 System.Console.ForegroundColor = oldfg;
150 return temp;
151 }
152
153 // Displays a command prompt and waits for the user to enter a string, then returns that string
154 public string CmdPrompt(string prompt)
155 {
156 this.Write(String.Format("{0}: ", prompt));
157 return this.ReadLine();
158 }
159
160 // Displays a command prompt and returns a default value if the user simply presses enter
161 public string CmdPrompt(string prompt, string defaultresponse)
162 {
163 string temp = CmdPrompt(String.Format( "{0} [{1}]", prompt, defaultresponse ));
164 if (temp == "")
165 {
166 return defaultresponse;
167 }
168 else
169 {
170 return temp;
171 }
172 }
173
174 // Displays a command prompt and returns a default value, user may only enter 1 of 2 options
175 public string CmdPrompt(string prompt, string defaultresponse, string OptionA, string OptionB)
176 {
177 bool itisdone = false;
178 string temp = CmdPrompt(prompt, defaultresponse);
179 while (itisdone == false)
180 {
181 if ((temp == OptionA) || (temp == OptionB))
182 {
183 itisdone = true;
184 }
185 else
186 {
187 Notice("Valid options are " + OptionA + " or " + OptionB);
188 temp = CmdPrompt(prompt, defaultresponse);
189 }
190 }
191 return temp;
192 }
193
194 // Runs a command with a number of parameters
195 public Object RunCmd(string Cmd, string[] cmdparams)
196 {
197 cmdparser.RunCmd(Cmd, cmdparams);
198 return null;
199 }
200
201 // Shows data about something
202 public void ShowCommands(string ShowWhat)
203 {
204 cmdparser.Show(ShowWhat);
205 }
206
207 public void MainConsolePrompt()
208 {
209 string[] tempstrarray;
210 string tempstr = this.CmdPrompt(this.componentname + "# ");
211 tempstrarray = tempstr.Split(' ');
212 string cmd = tempstrarray[0];
213 Array.Reverse(tempstrarray);
214 Array.Resize<string>(ref tempstrarray, tempstrarray.Length - 1);
215 Array.Reverse(tempstrarray);
216 string[] cmdparams = (string[])tempstrarray;
217 RunCmd(cmd, cmdparams);
218 }
219 }
220}
diff --git a/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs b/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs
deleted file mode 100644
index e3847be..0000000
--- a/Common/OpenSim.Framework.Console/ConsoleCallbacksBase.cs
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Framework.Console
33{
34 public interface conscmd_callback
35 {
36 void RunCmd(string cmd, string[] cmdparams);
37 void Show(string ShowWhat);
38 }
39}
diff --git a/Common/OpenSim.Framework.Console/MainConsole.cs b/Common/OpenSim.Framework.Console/MainConsole.cs
deleted file mode 100644
index 01aa3d1..0000000
--- a/Common/OpenSim.Framework.Console/MainConsole.cs
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29
30namespace OpenSim.Framework.Console
31{
32 public class MainConsole {
33
34 private static ConsoleBase instance;
35
36 public static ConsoleBase Instance
37 {
38 get
39 {
40 return instance;
41 }
42 set
43 {
44 instance = value;
45 }
46 }
47 }
48
49}
diff --git a/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj b/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj
deleted file mode 100644
index 7af0eca..0000000
--- a/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.csproj
+++ /dev/null
@@ -1,89 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{A7CD0630-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Framework.Console</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Framework.Console</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="System" >
62 <HintPath>System.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 </ItemGroup>
66 <ItemGroup>
67 </ItemGroup>
68 <ItemGroup>
69 <Compile Include="AssemblyInfo.cs">
70 <SubType>Code</SubType>
71 </Compile>
72 <Compile Include="ConsoleBase.cs">
73 <SubType>Code</SubType>
74 </Compile>
75 <Compile Include="ConsoleCallbacksBase.cs">
76 <SubType>Code</SubType>
77 </Compile>
78 <Compile Include="MainConsole.cs">
79 <SubType>Code</SubType>
80 </Compile>
81 </ItemGroup>
82 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
83 <PropertyGroup>
84 <PreBuildEvent>
85 </PreBuildEvent>
86 <PostBuildEvent>
87 </PostBuildEvent>
88 </PropertyGroup>
89</Project>
diff --git a/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build b/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build
deleted file mode 100644
index 9a03b54..0000000
--- a/Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build
+++ /dev/null
@@ -1,42 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework.Console" default="build">
3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}">
8 </fileset>
9 </copy>
10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
11 <resources prefix="OpenSim.Framework.Console" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="ConsoleBase.cs" />
16 <include name="ConsoleCallbacksBase.cs" />
17 <include name="MainConsole.cs" />
18 </sources>
19 <references basedir="${project::get-base-directory()}">
20 <lib>
21 <include name="${project::get-base-directory()}" />
22 <include name="${project::get-base-directory()}/${build.dir}" />
23 </lib>
24 <include name="System.dll" />
25 </references>
26 </csc>
27 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
28 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
29 <copy todir="${project::get-base-directory()}/../../bin/">
30 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
31 <include name="*.dll"/>
32 <include name="*.exe"/>
33 </fileset>
34 </copy>
35 </target>
36 <target name="clean">
37 <delete dir="${bin.dir}" failonerror="false" />
38 <delete dir="${obj.dir}" failonerror="false" />
39 </target>
40 <target name="doc" description="Creates documentation.">
41 </target>
42</project>
diff --git a/Common/OpenSim.Framework/AgentInventory.cs b/Common/OpenSim.Framework/AgentInventory.cs
deleted file mode 100644
index b36982a..0000000
--- a/Common/OpenSim.Framework/AgentInventory.cs
+++ /dev/null
@@ -1,278 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using libsecondlife.Packets;
33using OpenSim.Framework.Types;
34using OpenSim.Framework.Utilities;
35
36namespace OpenSim.Framework.Inventory
37{
38 public class AgentInventory
39 {
40 //Holds the local copy of Inventory info for a agent
41 public Dictionary<LLUUID, InventoryFolder> InventoryFolders;
42 public Dictionary<LLUUID, InventoryItem> InventoryItems;
43 public InventoryFolder InventoryRoot;
44 public int LastCached; //maybe used by opensim app, time this was last stored/compared to user server
45 public LLUUID AgentID;
46 public AvatarWearable[] Wearables;
47
48 public AgentInventory()
49 {
50 InventoryFolders = new Dictionary<LLUUID, InventoryFolder>();
51 InventoryItems = new Dictionary<LLUUID, InventoryItem>();
52 this.Initialise();
53 }
54
55 public virtual void Initialise()
56 {
57 Wearables = new AvatarWearable[13]; //should be 12 of these
58 for (int i = 0; i < 13; i++)
59 {
60 Wearables[i] = new AvatarWearable();
61 }
62
63 }
64
65 public bool CreateNewFolder(LLUUID folderID, ushort type)
66 {
67 InventoryFolder Folder = new InventoryFolder();
68 Folder.FolderID = folderID;
69 Folder.OwnerID = this.AgentID;
70 Folder.DefaultType = type;
71 this.InventoryFolders.Add(Folder.FolderID, Folder);
72 return (true);
73 }
74
75 public void CreateRootFolder(LLUUID newAgentID, bool createTextures)
76 {
77 this.AgentID = newAgentID;
78 InventoryRoot = new InventoryFolder();
79 InventoryRoot.FolderID = LLUUID.Random();
80 InventoryRoot.ParentID = new LLUUID();
81 InventoryRoot.Version = 1;
82 InventoryRoot.DefaultType = 8;
83 InventoryRoot.OwnerID = this.AgentID;
84 InventoryRoot.FolderName = "My Inventory";
85 InventoryFolders.Add(InventoryRoot.FolderID, InventoryRoot);
86 InventoryRoot.OwnerID = this.AgentID;
87 if (createTextures)
88 {
89 this.CreateNewFolder(LLUUID.Random(), 0, "Textures", InventoryRoot.FolderID);
90 }
91 }
92
93 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName)
94 {
95 InventoryFolder Folder = new InventoryFolder();
96 Folder.FolderID = folderID;
97 Folder.OwnerID = this.AgentID;
98 Folder.DefaultType = type;
99 Folder.FolderName = folderName;
100 this.InventoryFolders.Add(Folder.FolderID, Folder);
101
102 return (true);
103 }
104
105 public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent)
106 {
107 if (!this.InventoryFolders.ContainsKey(folderID))
108 {
109 Console.WriteLine("creating new folder called " + folderName + " in agents inventory");
110 InventoryFolder Folder = new InventoryFolder();
111 Folder.FolderID = folderID;
112 Folder.OwnerID = this.AgentID;
113 Folder.DefaultType = type;
114 Folder.FolderName = folderName;
115 Folder.ParentID = parent;
116 this.InventoryFolders.Add(Folder.FolderID, Folder);
117 }
118
119 return (true);
120 }
121
122 public bool HasFolder(LLUUID folderID)
123 {
124 if (this.InventoryFolders.ContainsKey(folderID))
125 {
126 return true;
127 }
128 return false;
129 }
130
131 public LLUUID GetFolderID(string folderName)
132 {
133 foreach (InventoryFolder inv in this.InventoryFolders.Values)
134 {
135 if (inv.FolderName == folderName)
136 {
137 return inv.FolderID;
138 }
139 }
140
141 return LLUUID.Zero;
142 }
143
144 public bool UpdateItemAsset(LLUUID itemID, AssetBase asset)
145 {
146 if(this.InventoryItems.ContainsKey(itemID))
147 {
148 InventoryItem Item = this.InventoryItems[itemID];
149 Item.AssetID = asset.FullID;
150 Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated() + " so it now is set to asset " + asset.FullID.ToStringHyphenated());
151 //TODO need to update the rest of the info
152 }
153 return true;
154 }
155
156 public bool UpdateItemDetails(LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet)
157 {
158 Console.WriteLine("updating inventory item details");
159 if (this.InventoryItems.ContainsKey(itemID))
160 {
161 Console.WriteLine("changing name to "+ Util.FieldToString(packet.Name));
162 InventoryItem Item = this.InventoryItems[itemID];
163 Item.Name = Util.FieldToString(packet.Name);
164 Console.WriteLine("updated inventory item " + itemID.ToStringHyphenated());
165 //TODO need to update the rest of the info
166 }
167 return true;
168 }
169
170 public LLUUID AddToInventory(LLUUID folderID, AssetBase asset)
171 {
172 if (this.InventoryFolders.ContainsKey(folderID))
173 {
174 LLUUID NewItemID = LLUUID.Random();
175
176 InventoryItem Item = new InventoryItem();
177 Item.FolderID = folderID;
178 Item.OwnerID = AgentID;
179 Item.AssetID = asset.FullID;
180 Item.ItemID = NewItemID;
181 Item.Type = asset.Type;
182 Item.Name = asset.Name;
183 Item.Description = asset.Description;
184 Item.InvType = asset.InvType;
185 this.InventoryItems.Add(Item.ItemID, Item);
186 InventoryFolder Folder = InventoryFolders[Item.FolderID];
187 Folder.Items.Add(Item);
188 return (Item.ItemID);
189 }
190 else
191 {
192 return (null);
193 }
194 }
195
196 public bool DeleteFromInventory(LLUUID itemID)
197 {
198 bool res = false;
199 if (this.InventoryItems.ContainsKey(itemID))
200 {
201 InventoryItem item = this.InventoryItems[itemID];
202 this.InventoryItems.Remove(itemID);
203 foreach (InventoryFolder fold in InventoryFolders.Values)
204 {
205 if (fold.Items.Contains(item))
206 {
207 fold.Items.Remove(item);
208 break;
209 }
210 }
211 res = true;
212
213 }
214 return res;
215 }
216 }
217
218 public class InventoryFolder
219 {
220 public List<InventoryItem> Items;
221 //public List<InventoryFolder> Subfolders;
222 public LLUUID FolderID;
223 public LLUUID OwnerID;
224 public LLUUID ParentID = LLUUID.Zero;
225 public string FolderName;
226 public ushort DefaultType;
227 public ushort Version;
228
229 public InventoryFolder()
230 {
231 Items = new List<InventoryItem>();
232 //Subfolders = new List<InventoryFolder>();
233 }
234
235 }
236
237 public class InventoryItem
238 {
239 public LLUUID FolderID;
240 public LLUUID OwnerID;
241 public LLUUID ItemID;
242 public LLUUID AssetID;
243 public LLUUID CreatorID;
244 public sbyte InvType;
245 public sbyte Type;
246 public string Name ="";
247 public string Description;
248
249 public InventoryItem()
250 {
251 this.CreatorID = LLUUID.Zero;
252 }
253
254 public string ExportString()
255 {
256 string typ = "notecard";
257 string result = "";
258 result += "\tinv_object\t0\n\t{\n";
259 result += "\t\tobj_id\t%s\n";
260 result += "\t\tparent_id\t"+ ItemID.ToString() +"\n";
261 result += "\t\ttype\t"+ typ +"\n";
262 result += "\t\tname\t" + Name+"|\n";
263 result += "\t}\n";
264 return result;
265 }
266 }
267
268 public class AvatarWearable
269 {
270 public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000");
271 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
272
273 public AvatarWearable()
274 {
275
276 }
277 }
278}
diff --git a/Common/OpenSim.Framework/BlockingQueue.cs b/Common/OpenSim.Framework/BlockingQueue.cs
deleted file mode 100644
index 667b8d8..0000000
--- a/Common/OpenSim.Framework/BlockingQueue.cs
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Threading;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Framework.Utilities
34{
35 public class BlockingQueue<T>
36 {
37 private Queue<T> _queue = new Queue<T>();
38 private object _queueSync = new object();
39
40 public void Enqueue(T value)
41 {
42 lock (_queueSync)
43 {
44 _queue.Enqueue(value);
45 Monitor.Pulse(_queueSync);
46 }
47 }
48
49 public T Dequeue()
50 {
51 lock (_queueSync)
52 {
53 if (_queue.Count < 1)
54 Monitor.Wait(_queueSync);
55
56 return _queue.Dequeue();
57 }
58 }
59 }
60}
diff --git a/Common/OpenSim.Framework/HeightMapGenHills.cs b/Common/OpenSim.Framework/HeightMapGenHills.cs
deleted file mode 100644
index 9777b82..0000000
--- a/Common/OpenSim.Framework/HeightMapGenHills.cs
+++ /dev/null
@@ -1,150 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30
31namespace OpenSim.Framework.Terrain
32{
33 public class HeightmapGenHills
34 {
35 private Random Rand = new Random();
36 private int NumHills;
37 private float HillMin;
38 private float HillMax;
39 private bool Island;
40 private float[] heightmap;
41
42 public float[] GenerateHeightmap(int numHills, float hillMin, float hillMax, bool island)
43 {
44 NumHills = numHills;
45 HillMin = hillMin;
46 HillMax = hillMax;
47 Island = island;
48
49 heightmap = new float[256 * 256];
50
51 for (int i = 0; i < numHills; i++)
52 {
53 AddHill();
54 }
55
56 Normalize();
57
58 return heightmap;
59 }
60
61 private void AddHill()
62 {
63 float x, y;
64 float radius = RandomRange(HillMin, HillMax);
65
66 if (Island)
67 {
68 // Which direction from the center of the map the hill is placed
69 float theta = RandomRange(0, 6.28f);
70
71 // How far from the center of the map to place the hill. The radius
72 // is subtracted from the range to prevent any part of the hill from
73 // reaching the edge of the map
74 float distance = RandomRange(radius / 2.0f, 128.0f - radius);
75
76 x = 128.0f + (float)Math.Cos(theta) * distance;
77 y = 128.0f + (float)Math.Sin(theta) * distance;
78 }
79 else
80 {
81 x = RandomRange(-radius, 256.0f + radius);
82 y = RandomRange(-radius, 256.0f + radius);
83 }
84
85 float radiusSq = radius * radius;
86 float distSq;
87 float height;
88
89 int xMin = (int)(x - radius) - 1;
90 int xMax = (int)(x + radius) + 1;
91 if (xMin < 0) xMin = 0;
92 if (xMax > 255) xMax = 255;
93
94 int yMin = (int)(y - radius) - 1;
95 int yMax = (int)(y + radius) + 1;
96 if (yMin < 0) yMin = 0;
97 if (yMax > 255) yMax = 255;
98
99 // Loop through each affected cell and determine the height at that point
100 for (int v = yMin; v <= yMax; ++v)
101 {
102 float fv = (float)v;
103
104 for (int h = xMin; h <= xMax; ++h)
105 {
106 float fh = (float)h;
107
108 // Determine how far from the center of this hill this point is
109 distSq = (x - fh) * (x - fh) + (y - fv) * (y - fv);
110 height = radiusSq - distSq;
111
112 // Don't add negative hill values
113 if (height > 0.0f) heightmap[h + v * 256] += height;
114 }
115 }
116 }
117
118 private void Normalize()
119 {
120 float min = heightmap[0];
121 float max = heightmap[0];
122
123 for (int x = 0; x < 256; x++)
124 {
125 for (int y = 0; y < 256; y++)
126 {
127 if (heightmap[x + y * 256] < min) min = heightmap[x + y * 256];
128 if (heightmap[x + y * 256] > max) max = heightmap[x + y * 256];
129 }
130 }
131
132 // Avoid a rare divide by zero
133 if (min != max)
134 {
135 for (int x = 0; x < 256; x++)
136 {
137 for (int y = 0; y < 256; y++)
138 {
139 heightmap[x + y * 256] = ((heightmap[x + y * 256] - min) / (max - min)) * (HillMax - HillMin);
140 }
141 }
142 }
143 }
144
145 private float RandomRange(float min, float max)
146 {
147 return (float)Rand.NextDouble() * (max - min) + min;
148 }
149 }
150}
diff --git a/Common/OpenSim.Framework/Interfaces/IAssetServer.cs b/Common/OpenSim.Framework/Interfaces/IAssetServer.cs
deleted file mode 100644
index 3f86acc..0000000
--- a/Common/OpenSim.Framework/Interfaces/IAssetServer.cs
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
27using System;
28using System.Net;
29using System.Net.Sockets;
30using System.IO;
31using System.Threading;
32using libsecondlife;
33using OpenSim.Framework.Types;
34
35namespace OpenSim.Framework.Interfaces
36{
37 /// <summary>
38 /// Description of IAssetServer.
39 /// </summary>
40
41 public interface IAssetServer
42 {
43 void SetReceiver(IAssetReceiver receiver);
44 void RequestAsset(LLUUID assetID, bool isTexture);
45 void UpdateAsset(AssetBase asset);
46 void UploadNewAsset(AssetBase asset);
47 void SetServerInfo(string ServerUrl, string ServerKey);
48 void Close();
49 }
50
51 // could change to delegate?
52 public interface IAssetReceiver
53 {
54 void AssetReceived(AssetBase asset, bool IsTexture);
55 void AssetNotFound(AssetBase asset);
56 }
57
58 public interface IAssetPlugin
59 {
60 IAssetServer GetAssetServer();
61 }
62
63 public struct ARequest
64 {
65 public LLUUID AssetID;
66 public bool IsTexture;
67 }
68}
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
deleted file mode 100644
index 9f7b619..0000000
--- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Inventory;
5using libsecondlife;
6using libsecondlife.Packets;
7using OpenSim.Framework.Types;
8
9namespace OpenSim.Framework.Interfaces
10{
11 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
12 public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
13 public delegate void ModifyTerrain(byte action, float north, float west);
14 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
15 public delegate void StartAnim(LLUUID animID, int seq);
16 public delegate void LinkObjects(uint parent, List<uint> children);
17
18 public interface IClientAPI
19 {
20 event ChatFromViewer OnChatFromViewer;
21 event RezObject OnRezObject;
22 event ModifyTerrain OnModifyTerrain;
23 event SetAppearance OnSetAppearance;
24 event StartAnim OnStartAnim;
25 event LinkObjects OnLinkObjects;
26
27 LLVector3 StartPos
28 {
29 get;
30 set;
31 }
32 void SendAppearance(AvatarWearable[] wearables);
33 void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
34 }
35}
diff --git a/Common/OpenSim.Framework/Interfaces/IConfig.cs b/Common/OpenSim.Framework/Interfaces/IConfig.cs
deleted file mode 100644
index 7b4c040..0000000
--- a/Common/OpenSim.Framework/Interfaces/IConfig.cs
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3
4* Copyright (c) <year>, <copyright holder>
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30using System;
31using System.Collections.Generic;
32using System.IO;
33using libsecondlife;
34//using OpenSim.world;
35
36namespace OpenSim.Framework.Interfaces
37{
38 /// <summary>
39 /// This class handles connection to the underlying database used for configuration of the region.
40 /// Region content is also stored by this class. The main entry point is InitConfig() which attempts to locate
41 /// opensim.yap in the current working directory. If opensim.yap can not be found, default settings are loaded from
42 /// what is hardcoded here and then saved into opensim.yap for future startups.
43 /// </summary>
44
45
46 public abstract class SimConfig
47 {
48 public string RegionName;
49
50 public uint RegionLocX;
51 public uint RegionLocY;
52 public ulong RegionHandle;
53
54 public int IPListenPort;
55 public string IPListenAddr;
56
57 public string AssetURL;
58 public string AssetSendKey;
59
60 public string GridURL;
61 public string GridSendKey;
62 public string GridRecvKey;
63 public string UserURL;
64 public string UserSendKey;
65 public string UserRecvKey;
66
67 public abstract void InitConfig(bool sandboxMode);
68 public abstract void LoadFromGrid();
69
70 }
71
72 public interface ISimConfig
73 {
74 SimConfig GetConfigObject();
75 }
76}
diff --git a/Common/OpenSim.Framework/Interfaces/IGenericConfig.cs b/Common/OpenSim.Framework/Interfaces/IGenericConfig.cs
deleted file mode 100644
index a853fe4..0000000
--- a/Common/OpenSim.Framework/Interfaces/IGenericConfig.cs
+++ /dev/null
@@ -1,15 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public interface IGenericConfig
8 {
9 void LoadData();
10 string GetAttribute(string attributeName);
11 bool SetAttribute(string attributeName, string attributeValue);
12 void Commit();
13 void Close();
14 }
15}
diff --git a/Common/OpenSim.Framework/Interfaces/IGridConfig.cs b/Common/OpenSim.Framework/Interfaces/IGridConfig.cs
deleted file mode 100644
index b2f26da..0000000
--- a/Common/OpenSim.Framework/Interfaces/IGridConfig.cs
+++ /dev/null
@@ -1,64 +0,0 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3
4* Copyright (c) <year>, <copyright holder>
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30using System;
31using System.Collections.Generic;
32using System.IO;
33using libsecondlife;
34//using OpenSim.world;
35
36namespace OpenSim.Framework.Interfaces
37{
38 /// <summary>
39 /// </summary>
40
41
42 public abstract class GridConfig
43 {
44 public string GridOwner;
45 public string DefaultStartupMsg;
46 public string DefaultAssetServer;
47 public string AssetSendKey;
48 public string AssetRecvKey;
49 public string DefaultUserServer;
50 public string UserSendKey;
51 public string UserRecvKey;
52 public string SimSendKey;
53 public string SimRecvKey;
54
55
56 public abstract void InitConfig();
57
58 }
59
60 public interface IGridConfig
61 {
62 GridConfig GetConfigObject();
63 }
64}
diff --git a/Common/OpenSim.Framework/Interfaces/IGridServer.cs b/Common/OpenSim.Framework/Interfaces/IGridServer.cs
deleted file mode 100644
index e67ea98..0000000
--- a/Common/OpenSim.Framework/Interfaces/IGridServer.cs
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
27
28
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using System.Net;
33using System.Net.Sockets;
34using System.IO;
35using libsecondlife;
36using OpenSim;
37using OpenSim.Framework.Types;
38
39namespace OpenSim.Framework.Interfaces
40{
41 /// <summary>
42 /// Handles connection to Grid Servers.
43 /// also Sim to Sim connections?
44 /// </summary>
45
46 public interface IGridServer
47 {
48 UUIDBlock RequestUUIDBlock();
49 NeighbourInfo[] RequestNeighbours(); //should return a array of neighbouring regions
50 AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
51 bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
52 string GetName();
53 bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port);
54 void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
55 IList RequestMapBlocks(int minX, int minY, int maxX, int maxY);
56 void Close();
57 }
58
59 public struct UUIDBlock
60 {
61 public LLUUID BlockStart;
62 public LLUUID BlockEnd;
63 }
64
65 public class AuthenticateResponse
66 {
67 public bool Authorised;
68 public Login LoginInfo;
69
70 public AuthenticateResponse()
71 {
72
73 }
74
75 }
76
77 public interface IGridPlugin
78 {
79 IGridServer GetGridServer();
80 }
81}
diff --git a/Common/OpenSim.Framework/Interfaces/ILocalStorage.cs b/Common/OpenSim.Framework/Interfaces/ILocalStorage.cs
deleted file mode 100644
index dd17b72..0000000
--- a/Common/OpenSim.Framework/Interfaces/ILocalStorage.cs
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
27
28using System;
29using libsecondlife;
30using OpenSim.Framework.Types;
31
32namespace OpenSim.Framework.Interfaces
33{
34 /// <summary>
35 /// ILocalStorage. Really hacked together right now needs cleaning up
36 /// </summary>
37 public interface ILocalStorage
38 {
39 void Initialise(string datastore);
40
41 void StorePrim(PrimData prim);
42 void RemovePrim(LLUUID primID);
43 void LoadPrimitives(ILocalStorageReceiver receiver);
44
45 float[] LoadWorld();
46 void SaveMap(float[] heightmap);
47
48 void SaveParcels(ParcelData[] parcels);
49 void SaveParcel(ParcelData parcel);
50 void RemoveParcel(ParcelData parcel);
51 void RemoveAllParcels();
52 void LoadParcels(ILocalStorageParcelReceiver recv);
53
54 void ShutDown();
55 }
56
57 public interface ILocalStorageReceiver
58 {
59 void PrimFromStorage(PrimData prim);
60 }
61
62 public interface ILocalStorageParcelReceiver
63 {
64 void ParcelFromStorage(ParcelData data);
65 void NoParcelDataFromStorage();
66 }
67}
68
diff --git a/Common/OpenSim.Framework/Interfaces/IScriptAPI.cs b/Common/OpenSim.Framework/Interfaces/IScriptAPI.cs
deleted file mode 100644
index 3ad0f06..0000000
--- a/Common/OpenSim.Framework/Interfaces/IScriptAPI.cs
+++ /dev/null
@@ -1,14 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Types;
5
6namespace OpenSim.Framework.Interfaces
7{
8 public interface IScriptAPI
9 {
10 OSVector3 GetEntityPosition(uint localID);
11 void SetEntityPosition(uint localID, float x, float y, float z);
12 uint GetRandomAvatarID();
13 }
14}
diff --git a/Common/OpenSim.Framework/Interfaces/IScriptEngine.cs b/Common/OpenSim.Framework/Interfaces/IScriptEngine.cs
deleted file mode 100644
index ed8974c..0000000
--- a/Common/OpenSim.Framework/Interfaces/IScriptEngine.cs
+++ /dev/null
@@ -1,14 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Framework.Interfaces
6{
7 public interface IScriptEngine
8 {
9 bool Init(IScriptAPI api);
10 string GetName();
11 void LoadScript(string script, string scriptName, uint entityID);
12 void OnFrame();
13 }
14}
diff --git a/Common/OpenSim.Framework/Interfaces/IUserConfig.cs b/Common/OpenSim.Framework/Interfaces/IUserConfig.cs
deleted file mode 100644
index e15867d..0000000
--- a/Common/OpenSim.Framework/Interfaces/IUserConfig.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3
4* Copyright (c) <year>, <copyright holder>
5* All rights reserved.
6*
7* Redistribution and use in source and binary forms, with or without
8* modification, are permitted provided that the following conditions are met:
9* * Redistributions of source code must retain the above copyright
10* notice, this list of conditions and the following disclaimer.
11* * Redistributions in binary form must reproduce the above copyright
12* notice, this list of conditions and the following disclaimer in the
13* documentation and/or other materials provided with the distribution.
14* * Neither the name of the <organization> nor the
15* names of its contributors may be used to endorse or promote products
16* derived from this software without specific prior written permission.
17*
18* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
19* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
22* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*/
29
30using System;
31using System.Collections.Generic;
32using System.IO;
33using libsecondlife;
34//using OpenSim.world;
35
36namespace OpenSim.Framework.Interfaces
37{
38 /// <summary>
39 /// </summary>
40
41
42 public abstract class UserConfig
43 {
44 public string DefaultStartupMsg;
45 public string GridServerURL;
46 public string GridSendKey;
47 public string GridRecvKey;
48
49
50 public abstract void InitConfig();
51
52 }
53
54 public interface IUserConfig
55 {
56 UserConfig GetConfigObject();
57 }
58}
diff --git a/Common/OpenSim.Framework/Interfaces/IUserServer.cs b/Common/OpenSim.Framework/Interfaces/IUserServer.cs
deleted file mode 100644
index 21f2721..0000000
--- a/Common/OpenSim.Framework/Interfaces/IUserServer.cs
+++ /dev/null
@@ -1,15 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Inventory;
5using libsecondlife;
6
7namespace OpenSim.Framework.Interfaces
8{
9 public interface IUserServer
10 {
11 AgentInventory RequestAgentsInventory(LLUUID agentID);
12 void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
13 bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory);
14 }
15}
diff --git a/Common/OpenSim.Framework/Interfaces/LocalGridBase.cs b/Common/OpenSim.Framework/Interfaces/LocalGridBase.cs
deleted file mode 100644
index ff46502..0000000
--- a/Common/OpenSim.Framework/Interfaces/LocalGridBase.cs
+++ /dev/null
@@ -1,24 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Types;
6using System.Collections;
7
8namespace OpenSim.Framework.Interfaces
9{
10 public abstract class LocalGridBase : IGridServer
11 {
12 public abstract UUIDBlock RequestUUIDBlock();
13 public abstract NeighbourInfo[] RequestNeighbours();
14 public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
15 public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
16 public abstract string GetName();
17 public abstract bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port);
18 public abstract void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
19 public abstract void AddNewSession(Login session);
20 public abstract IList RequestMapBlocks(int minX, int minY, int maxX, int maxY);
21 public abstract void Close();
22 }
23
24}
diff --git a/Common/OpenSim.Framework/Interfaces/RemoteGridBase.cs b/Common/OpenSim.Framework/Interfaces/RemoteGridBase.cs
deleted file mode 100644
index ed13ed5..0000000
--- a/Common/OpenSim.Framework/Interfaces/RemoteGridBase.cs
+++ /dev/null
@@ -1,37 +0,0 @@
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.Text;
5using libsecondlife;
6using OpenSim.Framework.Types;
7
8namespace OpenSim.Framework.Interfaces
9{
10 public abstract class RemoteGridBase : IGridServer
11 {
12 public abstract Dictionary<uint, AgentCircuitData> agentcircuits
13 {
14 get;
15 set;
16 }
17
18 public abstract UUIDBlock RequestUUIDBlock();
19 public abstract NeighbourInfo[] RequestNeighbours();
20 public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
21 public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
22 public abstract string GetName();
23 public abstract bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port);
24 public abstract void SetServerInfo(string ServerUrl, string SendKey, string RecvKey);
25 public abstract IList RequestMapBlocks(int minX, int minY, int maxX, int maxY);
26 public abstract void Close();
27 public abstract Hashtable GridData {
28 get;
29 set;
30 }
31
32 public abstract ArrayList neighbours {
33 get;
34 set;
35 }
36 }
37}
diff --git a/Common/OpenSim.Framework/LoginService.cs b/Common/OpenSim.Framework/LoginService.cs
deleted file mode 100644
index a4f3cc8..0000000
--- a/Common/OpenSim.Framework/LoginService.cs
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using System.Text;
33using Nwc.XmlRpc;
34using libsecondlife;
35
36namespace OpenSim.Framework.Grid
37{
38 public abstract class LoginService
39 {
40
41 }
42} \ No newline at end of file
diff --git a/Common/OpenSim.Framework/OpenSim.Framework.csproj b/Common/OpenSim.Framework/OpenSim.Framework.csproj
deleted file mode 100644
index 4cedbd9..0000000
--- a/Common/OpenSim.Framework/OpenSim.Framework.csproj
+++ /dev/null
@@ -1,200 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{8ACA2445-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Framework</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenSim.Framework</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="Db4objects.Db4o.dll" >
62 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="libsecondlife.dll" >
66 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System" >
70 <HintPath>System.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="System.Xml" >
74 <HintPath>System.Xml.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup>
78 <ItemGroup>
79 <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
80 <Name>XMLRPC</Name>
81 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
82 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
83 <Private>False</Private>
84 </ProjectReference>
85 </ItemGroup>
86 <ItemGroup>
87 <Compile Include="AgentInventory.cs">
88 <SubType>Code</SubType>
89 </Compile>
90 <Compile Include="BlockingQueue.cs">
91 <SubType>Code</SubType>
92 </Compile>
93 <Compile Include="HeightMapGenHills.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="LoginService.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="Remoting.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="SimProfile.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 <Compile Include="SimProfileBase.cs">
106 <SubType>Code</SubType>
107 </Compile>
108 <Compile Include="UserProfile.cs">
109 <SubType>Code</SubType>
110 </Compile>
111 <Compile Include="UserProfileManager.cs">
112 <SubType>Code</SubType>
113 </Compile>
114 <Compile Include="UserProfileManagerBase.cs">
115 <SubType>Code</SubType>
116 </Compile>
117 <Compile Include="Util.cs">
118 <SubType>Code</SubType>
119 </Compile>
120 <Compile Include="Interfaces\IAssetServer.cs">
121 <SubType>Code</SubType>
122 </Compile>
123 <Compile Include="Interfaces\IClientAPI.cs">
124 <SubType>Code</SubType>
125 </Compile>
126 <Compile Include="Interfaces\IConfig.cs">
127 <SubType>Code</SubType>
128 </Compile>
129 <Compile Include="Interfaces\IGenericConfig.cs">
130 <SubType>Code</SubType>
131 </Compile>
132 <Compile Include="Interfaces\IGridConfig.cs">
133 <SubType>Code</SubType>
134 </Compile>
135 <Compile Include="Interfaces\IGridServer.cs">
136 <SubType>Code</SubType>
137 </Compile>
138 <Compile Include="Interfaces\ILocalStorage.cs">
139 <SubType>Code</SubType>
140 </Compile>
141 <Compile Include="Interfaces\IScriptAPI.cs">
142 <SubType>Code</SubType>
143 </Compile>
144 <Compile Include="Interfaces\IScriptEngine.cs">
145 <SubType>Code</SubType>
146 </Compile>
147 <Compile Include="Interfaces\IUserConfig.cs">
148 <SubType>Code</SubType>
149 </Compile>
150 <Compile Include="Interfaces\IUserServer.cs">
151 <SubType>Code</SubType>
152 </Compile>
153 <Compile Include="Interfaces\LocalGridBase.cs">
154 <SubType>Code</SubType>
155 </Compile>
156 <Compile Include="Interfaces\RemoteGridBase.cs">
157 <SubType>Code</SubType>
158 </Compile>
159 <Compile Include="Properties\AssemblyInfo.cs">
160 <SubType>Code</SubType>
161 </Compile>
162 <Compile Include="Types\AgentCircuitData.cs">
163 <SubType>Code</SubType>
164 </Compile>
165 <Compile Include="Types\AssetBase.cs">
166 <SubType>Code</SubType>
167 </Compile>
168 <Compile Include="Types\AssetLandmark.cs">
169 <SubType>Code</SubType>
170 </Compile>
171 <Compile Include="Types\AssetStorage.cs">
172 <SubType>Code</SubType>
173 </Compile>
174 <Compile Include="Types\EstateSettings.cs">
175 <SubType>Code</SubType>
176 </Compile>
177 <Compile Include="Types\Login.cs">
178 <SubType>Code</SubType>
179 </Compile>
180 <Compile Include="Types\NeighbourInfo.cs">
181 <SubType>Code</SubType>
182 </Compile>
183 <Compile Include="Types\OSVector3.cs">
184 <SubType>Code</SubType>
185 </Compile>
186 <Compile Include="Types\ParcelData.cs">
187 <SubType>Code</SubType>
188 </Compile>
189 <Compile Include="Types\PrimData.cs">
190 <SubType>Code</SubType>
191 </Compile>
192 </ItemGroup>
193 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
194 <PropertyGroup>
195 <PreBuildEvent>
196 </PreBuildEvent>
197 <PostBuildEvent>
198 </PostBuildEvent>
199 </PropertyGroup>
200</Project>
diff --git a/Common/OpenSim.Framework/OpenSim.Framework.dll.build b/Common/OpenSim.Framework/OpenSim.Framework.dll.build
deleted file mode 100644
index 4d95c7d..0000000
--- a/Common/OpenSim.Framework/OpenSim.Framework.dll.build
+++ /dev/null
@@ -1,77 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Framework" default="build">
3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}">
8 </fileset>
9 </copy>
10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
11 <resources prefix="OpenSim.Framework" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AgentInventory.cs" />
15 <include name="BlockingQueue.cs" />
16 <include name="HeightMapGenHills.cs" />
17 <include name="LoginService.cs" />
18 <include name="Remoting.cs" />
19 <include name="SimProfile.cs" />
20 <include name="SimProfileBase.cs" />
21 <include name="UserProfile.cs" />
22 <include name="UserProfileManager.cs" />
23 <include name="UserProfileManagerBase.cs" />
24 <include name="Util.cs" />
25 <include name="Interfaces/IAssetServer.cs" />
26 <include name="Interfaces/IClientAPI.cs" />
27 <include name="Interfaces/IConfig.cs" />
28 <include name="Interfaces/IGenericConfig.cs" />
29 <include name="Interfaces/IGridConfig.cs" />
30 <include name="Interfaces/IGridServer.cs" />
31 <include name="Interfaces/ILocalStorage.cs" />
32 <include name="Interfaces/IScriptAPI.cs" />
33 <include name="Interfaces/IScriptEngine.cs" />
34 <include name="Interfaces/IUserConfig.cs" />
35 <include name="Interfaces/IUserServer.cs" />
36 <include name="Interfaces/LocalGridBase.cs" />
37 <include name="Interfaces/RemoteGridBase.cs" />
38 <include name="Properties/AssemblyInfo.cs" />
39 <include name="Types/AgentCircuitData.cs" />
40 <include name="Types/AssetBase.cs" />
41 <include name="Types/AssetLandmark.cs" />
42 <include name="Types/AssetStorage.cs" />
43 <include name="Types/EstateSettings.cs" />
44 <include name="Types/Login.cs" />
45 <include name="Types/NeighbourInfo.cs" />
46 <include name="Types/OSVector3.cs" />
47 <include name="Types/ParcelData.cs" />
48 <include name="Types/PrimData.cs" />
49 </sources>
50 <references basedir="${project::get-base-directory()}">
51 <lib>
52 <include name="${project::get-base-directory()}" />
53 <include name="${project::get-base-directory()}/${build.dir}" />
54 </lib>
55 <include name="../../bin/Db4objects.Db4o.dll" />
56 <include name="../../bin/libsecondlife.dll" />
57 <include name="System.dll" />
58 <include name="System.Xml.dll" />
59 <include name="../../bin/XMLRPC.dll" />
60 </references>
61 </csc>
62 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
63 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
64 <copy todir="${project::get-base-directory()}/../../bin/">
65 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
66 <include name="*.dll"/>
67 <include name="*.exe"/>
68 </fileset>
69 </copy>
70 </target>
71 <target name="clean">
72 <delete dir="${bin.dir}" failonerror="false" />
73 <delete dir="${obj.dir}" failonerror="false" />
74 </target>
75 <target name="doc" description="Creates documentation.">
76 </target>
77</project>
diff --git a/Common/OpenSim.Framework/Properties/AssemblyInfo.cs b/Common/OpenSim.Framework/Properties/AssemblyInfo.cs
deleted file mode 100644
index 86f5cdb..0000000
--- a/Common/OpenSim.Framework/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.FrameWork")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.FrameWork")]
13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")]
16
17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)]
21
22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("a08e20c7-f191-4137-b1f0-9291408fa521")]
24
25// Version information for an assembly consists of the following four values:
26//
27// Major Version
28// Minor Version
29// Build Number
30// Revision
31//
32[assembly: AssemblyVersion("1.0.0.0")]
33[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Common/OpenSim.Framework/Remoting.cs b/Common/OpenSim.Framework/Remoting.cs
deleted file mode 100644
index 660cdde..0000000
--- a/Common/OpenSim.Framework/Remoting.cs
+++ /dev/null
@@ -1,137 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using System.Security.Cryptography;
33
34namespace OpenSim.Framework
35{
36 /// <summary>
37 /// NEEDS AUDIT.
38 /// </summary>
39 /// <remarks>
40 /// Suggested implementation
41 /// <para>Store two digests for each foreign host. A local copy of the local hash using the local challenge (when issued), and a local copy of the remote hash using the remote challenge.</para>
42 /// <para>When sending data to the foreign host - run 'Sign' on the data and affix the returned byte[] to the message.</para>
43 /// <para>When recieving data from the foreign host - run 'Authenticate' against the data and the attached byte[].</para>
44 /// <para>Both hosts should be performing these operations for this to be effective.</para>
45 /// </remarks>
46 class RemoteDigest
47 {
48 private byte[] currentHash;
49 private byte[] secret;
50
51 private SHA512Managed SHA512;
52
53 /// <summary>
54 /// Initialises a new RemoteDigest authentication mechanism
55 /// </summary>
56 /// <remarks>Needs an audit by a cryptographic professional - was not "roll your own"'d by choice but rather a serious lack of decent authentication mechanisms in .NET remoting</remarks>
57 /// <param name="sharedSecret">The shared secret between systems (for inter-sim, this is provided in encrypted form during connection, for grid this is input manually in setup)</param>
58 /// <param name="salt">Binary salt - some common value - to be decided what</param>
59 /// <param name="challenge">The challenge key provided by the third party</param>
60 public RemoteDigest(string sharedSecret, byte[] salt, string challenge)
61 {
62 SHA512 = new SHA512Managed();
63 Rfc2898DeriveBytes RFC2898 = new Rfc2898DeriveBytes(sharedSecret,salt);
64 secret = RFC2898.GetBytes(512);
65 ASCIIEncoding ASCII = new ASCIIEncoding();
66
67 currentHash = SHA512.ComputeHash(AppendArrays(secret, ASCII.GetBytes(challenge)));
68 }
69
70 /// <summary>
71 /// Authenticates a piece of incoming data against the local digest. Upon successful authentication, digest string is incremented.
72 /// </summary>
73 /// <param name="data">The incoming data</param>
74 /// <param name="digest">The remote digest</param>
75 /// <returns></returns>
76 public bool Authenticate(byte[] data, byte[] digest)
77 {
78 byte[] newHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
79 if (digest == newHash)
80 {
81 currentHash = newHash;
82 return true;
83 }
84 else
85 {
86 throw new Exception("Hash comparison failed. Key resync required.");
87 }
88 }
89
90 /// <summary>
91 /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message.
92 /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the
93 /// hashes will get out of sync and throw an exception when validation is attempted.
94 /// </summary>
95 /// <param name="data">The outgoing data</param>
96 /// <returns>The local digest</returns>
97 public byte[] Sign(byte[] data)
98 {
99 currentHash = SHA512.ComputeHash(AppendArrays(AppendArrays(currentHash, secret), data));
100 return currentHash;
101 }
102
103 /// <summary>
104 /// Generates a new challenge string to be issued to a foreign host. Challenges are 1024-bit (effective strength of less than 512-bits) messages generated using the Crytographic Random Number Generator.
105 /// </summary>
106 /// <returns>A 128-character hexadecimal string containing the challenge.</returns>
107 public static string GenerateChallenge()
108 {
109 RNGCryptoServiceProvider RNG = new RNGCryptoServiceProvider();
110 byte[] bytes = new byte[64];
111 RNG.GetBytes(bytes);
112
113 StringBuilder sb = new StringBuilder(bytes.Length * 2);
114 foreach (byte b in bytes)
115 {
116 sb.AppendFormat("{0:x2}", b);
117 }
118 return sb.ToString();
119 }
120
121 /// <summary>
122 /// Helper function, merges two byte arrays
123 /// </summary>
124 /// <remarks>Sourced from MSDN Forum</remarks>
125 /// <param name="a">A</param>
126 /// <param name="b">B</param>
127 /// <returns>C</returns>
128 private byte[] AppendArrays(byte[] a, byte[] b)
129 {
130 byte[] c = new byte[a.Length + b.Length];
131 Buffer.BlockCopy(a, 0, c, 0, a.Length);
132 Buffer.BlockCopy(b, 0, c, a.Length, b.Length);
133 return c;
134 }
135
136 }
137}
diff --git a/Common/OpenSim.Framework/SimProfile.cs b/Common/OpenSim.Framework/SimProfile.cs
deleted file mode 100644
index 0d79ee9..0000000
--- a/Common/OpenSim.Framework/SimProfile.cs
+++ /dev/null
@@ -1,110 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Collections;
31using System.Xml;
32using System.Text;
33using libsecondlife;
34using Nwc.XmlRpc;
35
36namespace OpenSim.Framework.Sims
37{
38 public class SimProfile : SimProfileBase
39 {
40 public SimProfile LoadFromGrid(ulong region_handle, string GridURL, string SendKey, string RecvKey)
41 {
42 try
43 {
44 Hashtable GridReqParams = new Hashtable();
45 GridReqParams["region_handle"] = region_handle.ToString();
46 GridReqParams["authkey"] = SendKey;
47 ArrayList SendParams = new ArrayList();
48 SendParams.Add(GridReqParams);
49 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
50
51 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
52
53 Hashtable RespData = (Hashtable)GridResp.Value;
54 this.UUID = new LLUUID((string)RespData["UUID"]);
55 this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
56 this.regionname = (string)RespData["regionname"];
57 this.sim_ip = (string)RespData["sim_ip"];
58 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
59 this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
60 this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
61 this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
62 this.sendkey = SendKey;
63 this.recvkey = RecvKey;
64 }
65 catch (Exception e)
66 {
67 Console.WriteLine(e.ToString());
68 }
69 return this;
70 }
71
72 public SimProfile LoadFromGrid(LLUUID UUID, string GridURL, string SendKey, string RecvKey)
73 {
74 try
75 {
76 Hashtable GridReqParams = new Hashtable();
77 GridReqParams["UUID"] = UUID.ToString();
78 GridReqParams["authkey"] = SendKey;
79 ArrayList SendParams = new ArrayList();
80 SendParams.Add(GridReqParams);
81 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
82
83 XmlRpcResponse GridResp = GridReq.Send(GridURL, 3000);
84
85 Hashtable RespData = (Hashtable)GridResp.Value;
86 this.UUID = new LLUUID((string)RespData["UUID"]);
87 this.regionhandle = Helpers.UIntsToLong(((uint)Convert.ToUInt32(RespData["region_locx"]) * 256), ((uint)Convert.ToUInt32(RespData["region_locy"]) * 256));
88 this.regionname = (string)RespData["regionname"];
89 this.sim_ip = (string)RespData["sim_ip"];
90 this.sim_port = (uint)Convert.ToUInt16(RespData["sim_port"]);
91 this.caps_url = "http://" + ((string)RespData["sim_ip"]) + ":" + (string)RespData["sim_port"] + "/";
92 this.RegionLocX = (uint)Convert.ToUInt32(RespData["region_locx"]);
93 this.RegionLocY = (uint)Convert.ToUInt32(RespData["region_locy"]);
94 this.sendkey = SendKey;
95 this.recvkey = RecvKey;
96 }
97 catch (Exception e)
98 {
99 Console.WriteLine(e.ToString());
100 }
101 return this;
102 }
103
104
105 public SimProfile()
106 {
107 }
108 }
109
110}
diff --git a/Common/OpenSim.Framework/SimProfileBase.cs b/Common/OpenSim.Framework/SimProfileBase.cs
deleted file mode 100644
index bab18be..0000000
--- a/Common/OpenSim.Framework/SimProfileBase.cs
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Sims
34{
35 [System.Obsolete("Depreciated, use SimProfileData instead")]
36 public class SimProfileBase
37 {
38 public LLUUID UUID;
39 public ulong regionhandle;
40 public string regionname;
41 public string sim_ip;
42 public uint sim_port;
43 public string caps_url;
44 public uint RegionLocX;
45 public uint RegionLocY;
46 public string sendkey;
47 public string recvkey;
48 public bool online;
49
50 public SimProfileBase()
51 {
52 }
53 }
54}
diff --git a/Common/OpenSim.Framework/Types/AgentCircuitData.cs b/Common/OpenSim.Framework/Types/AgentCircuitData.cs
deleted file mode 100644
index de79ce2..0000000
--- a/Common/OpenSim.Framework/Types/AgentCircuitData.cs
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using libsecondlife;
33
34namespace OpenSim.Framework.Types
35{
36 public class AgentCircuitData
37 {
38 public AgentCircuitData() { }
39 public LLUUID AgentID;
40 public LLUUID SessionID;
41 public LLUUID SecureSessionID;
42 public LLVector3 startpos;
43 public string firstname;
44 public string lastname;
45 public uint circuitcode;
46 public bool child;
47 public LLUUID InventoryFolder;
48 public LLUUID BaseFolder;
49 }
50}
diff --git a/Common/OpenSim.Framework/Types/AssetBase.cs b/Common/OpenSim.Framework/Types/AssetBase.cs
deleted file mode 100644
index 86586a6..0000000
--- a/Common/OpenSim.Framework/Types/AssetBase.cs
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Types
34{
35 public class AssetBase
36 {
37 public byte[] Data;
38 public LLUUID FullID;
39 public sbyte Type;
40 public sbyte InvType;
41 public string Name;
42 public string Description;
43
44 public AssetBase()
45 {
46
47 }
48 }
49}
diff --git a/Common/OpenSim.Framework/Types/AssetLandmark.cs b/Common/OpenSim.Framework/Types/AssetLandmark.cs
deleted file mode 100644
index 8a10b70..0000000
--- a/Common/OpenSim.Framework/Types/AssetLandmark.cs
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Types
34{
35 public class AssetLandmark : AssetBase
36 {
37 public int Version;
38 public LLVector3 Position;
39 public LLUUID RegionID;
40
41 public AssetLandmark(AssetBase a)
42 {
43 this.Data = a.Data;
44 this.FullID = a.FullID;
45 this.Type = a.Type;
46 this.InvType = a.InvType;
47 this.Name = a.Name;
48 this.Description = a.Description;
49 InternData();
50 }
51
52 private void InternData()
53 {
54 string temp = System.Text.Encoding.UTF8.GetString(Data).Trim();
55 string[] parts = temp.Split('\n');
56 int.TryParse(parts[0].Substring(17, 1), out Version);
57 LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID);
58 LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position);
59 }
60 }
61}
diff --git a/Common/OpenSim.Framework/Types/AssetStorage.cs b/Common/OpenSim.Framework/Types/AssetStorage.cs
deleted file mode 100644
index 8cac23a..0000000
--- a/Common/OpenSim.Framework/Types/AssetStorage.cs
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Types
34{
35 public class AssetStorage
36 {
37
38 public AssetStorage() {
39 }
40
41 public AssetStorage(LLUUID assetUUID) {
42 UUID=assetUUID;
43 }
44
45 public byte[] Data;
46 public sbyte Type;
47 public string Name;
48 public LLUUID UUID;
49 }
50}
diff --git a/Common/OpenSim.Framework/Types/EstateSettings.cs b/Common/OpenSim.Framework/Types/EstateSettings.cs
deleted file mode 100644
index baa3eef..0000000
--- a/Common/OpenSim.Framework/Types/EstateSettings.cs
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33using libsecondlife;
34
35namespace OpenSim.Framework.Types
36{
37 public class EstateSettings
38 {
39 //Settings to this island
40 public float billableFactor = (float)0.0;
41 public uint estateID = 0;
42 public uint parentEstateID = 0;
43
44 public byte maxAgents = 40;
45 public float objectBonusFactor = (float)1.0;
46
47 public int redirectGridX = 0; //??
48 public int redirectGridY = 0; //??
49 public libsecondlife.Simulator.RegionFlags regionFlags = libsecondlife.Simulator.RegionFlags.None; //Booleam values of various region settings
50 public libsecondlife.Simulator.SimAccess simAccess = libsecondlife.Simulator.SimAccess.Mature; //Is sim PG, Mature, etc? Mature by default.
51 public float sunHour = 0;
52
53 public float terrainRaiseLimit = 0;
54 public float terrainLowerLimit = 0;
55
56 public bool useFixedSun = false;
57 public int pricePerMeter = 1;
58
59 public ushort regionWaterHeight = 20;
60 public bool regionAllowTerraform = true;
61
62 // Region Information
63 // Low resolution 'base' textures. No longer used.
64 public LLUUID terrainBase0 = new LLUUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); // Default
65 public LLUUID terrainBase1 = new LLUUID("abb783e6-3e93-26c0-248a-247666855da3"); // Default
66 public LLUUID terrainBase2 = new LLUUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); // Default
67 public LLUUID terrainBase3 = new LLUUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); // Default
68
69 // Higher resolution terrain textures
70 public LLUUID terrainDetail0 = new LLUUID("00000000-0000-0000-0000-000000000000");
71 public LLUUID terrainDetail1 = new LLUUID("00000000-0000-0000-0000-000000000000");
72 public LLUUID terrainDetail2 = new LLUUID("00000000-0000-0000-0000-000000000000");
73 public LLUUID terrainDetail3 = new LLUUID("00000000-0000-0000-0000-000000000000");
74
75 // First quad - each point is bilinearly interpolated at each meter of terrain
76 public float terrainStartHeight0 = 10.0f;
77 public float terrainStartHeight1 = 10.0f;
78 public float terrainStartHeight2 = 10.0f;
79 public float terrainStartHeight3 = 10.0f;
80
81 // Second quad - also bilinearly interpolated.
82 // Terrain texturing is done that:
83 // 0..3 (0 = base0, 3 = base3) = (terrain[x,y] - start[x,y]) / range[x,y]
84 public float terrainHeightRange0 = 60.0f; //00
85 public float terrainHeightRange1 = 60.0f; //01
86 public float terrainHeightRange2 = 60.0f; //10
87 public float terrainHeightRange3 = 60.0f; //11
88
89 // Terrain Default (Must be in F32 Format!)
90 public string terrainFile = "default.r32";
91 public double terrainMultiplier = 60.0;
92 public float waterHeight = (float)20.0;
93
94
95 }
96}
diff --git a/Common/OpenSim.Framework/Types/Login.cs b/Common/OpenSim.Framework/Types/Login.cs
deleted file mode 100644
index 2737cbb..0000000
--- a/Common/OpenSim.Framework/Types/Login.cs
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using libsecondlife;
33
34namespace OpenSim.Framework.Types
35{
36 public class Login
37 {
38 public string First = "Test";
39 public string Last = "User";
40 public LLUUID Agent;
41 public LLUUID Session;
42 public LLUUID SecureSession = LLUUID.Zero;
43 public LLUUID InventoryFolder;
44 public LLUUID BaseFolder;
45 public uint CircuitCode;
46
47 public Login()
48 {
49
50 }
51 }
52}
diff --git a/Common/OpenSim.Framework/Types/NeighbourInfo.cs b/Common/OpenSim.Framework/Types/NeighbourInfo.cs
deleted file mode 100644
index e3e9dbb..0000000
--- a/Common/OpenSim.Framework/Types/NeighbourInfo.cs
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Framework.Types
34{
35 public class NeighbourInfo
36 {
37 public NeighbourInfo()
38 {
39 }
40
41 public ulong regionhandle;
42 public uint RegionLocX;
43 public uint RegionLocY;
44 public string sim_ip;
45 public uint sim_port;
46 }
47}
diff --git a/Common/OpenSim.Framework/Types/OSVector3.cs b/Common/OpenSim.Framework/Types/OSVector3.cs
deleted file mode 100644
index 7e3a849..0000000
--- a/Common/OpenSim.Framework/Types/OSVector3.cs
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Framework.Types
34{
35 public class OSVector3
36 {
37 public float X;
38 public float Y;
39 public float Z;
40
41 public OSVector3()
42 {
43
44 }
45 }
46}
diff --git a/Common/OpenSim.Framework/Types/ParcelData.cs b/Common/OpenSim.Framework/Types/ParcelData.cs
deleted file mode 100644
index 40f128a..0000000
--- a/Common/OpenSim.Framework/Types/ParcelData.cs
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.Framework.Types
34{
35
36 public class ParcelData
37 {
38 public byte[] parcelBitmapByteArray = new byte[512];
39 public string parcelName = "";
40 public string parcelDesc = "";
41 public LLUUID ownerID = new LLUUID();
42 public bool isGroupOwned = false;
43 public LLVector3 AABBMin = new LLVector3();
44 public LLVector3 AABBMax = new LLVector3();
45 public int area = 0;
46 public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
47 public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID
48 public libsecondlife.Parcel.ParcelCategory category = new libsecondlife.Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
49 public int claimDate = 0; //Unemplemented
50 public int claimPrice = 0; //Unemplemented
51 public LLUUID groupID = new LLUUID(); //Unemplemented
52 public int groupPrims = 0; //Unemplemented
53 public int salePrice = 0; //Unemeplemented. Parcels price.
54 public libsecondlife.Parcel.ParcelStatus parcelStatus = libsecondlife.Parcel.ParcelStatus.None;
55 public libsecondlife.Parcel.ParcelFlags parcelFlags = libsecondlife.Parcel.ParcelFlags.None;
56 public byte landingType = 0;
57 public byte mediaAutoScale = 0;
58 public LLUUID mediaID = LLUUID.Zero;
59 public int localID = 0;
60 public LLUUID globalID = new LLUUID();
61
62 public string mediaURL = "";
63 public string musicURL = "";
64 public float passHours = 0;
65 public int passPrice = 0;
66 public LLUUID snapshotID = LLUUID.Zero;
67 public LLVector3 userLocation = new LLVector3();
68 public LLVector3 userLookAt = new LLVector3();
69
70 public ParcelData()
71 {
72 globalID = LLUUID.Random();
73 }
74
75 public ParcelData Copy()
76 {
77 ParcelData parcelData = new ParcelData();
78
79 parcelData.AABBMax = this.AABBMax;
80 parcelData.AABBMin = this.AABBMin;
81 parcelData.area = this.area;
82 parcelData.auctionID = this.auctionID;
83 parcelData.authBuyerID = this.authBuyerID;
84 parcelData.category = this.category;
85 parcelData.claimDate = this.claimDate;
86 parcelData.claimPrice = this.claimPrice;
87 parcelData.globalID = this.globalID;
88 parcelData.groupID = this.groupID;
89 parcelData.groupPrims = this.groupPrims;
90 parcelData.isGroupOwned = this.isGroupOwned;
91 parcelData.localID = this.localID;
92 parcelData.landingType = this.landingType;
93 parcelData.mediaAutoScale = this.mediaAutoScale;
94 parcelData.mediaID = this.mediaID;
95 parcelData.mediaURL = this.mediaURL;
96 parcelData.musicURL = this.musicURL;
97 parcelData.ownerID = this.ownerID;
98 parcelData.parcelBitmapByteArray = (byte[])this.parcelBitmapByteArray.Clone();
99 parcelData.parcelDesc = this.parcelDesc;
100 parcelData.parcelFlags = this.parcelFlags;
101 parcelData.parcelName = this.parcelName;
102 parcelData.parcelStatus = this.parcelStatus;
103 parcelData.passHours = this.passHours;
104 parcelData.passPrice = this.passPrice;
105 parcelData.salePrice = this.salePrice;
106 parcelData.snapshotID = this.snapshotID;
107 parcelData.userLocation = this.userLocation;
108 parcelData.userLookAt = this.userLookAt;
109
110 return parcelData;
111
112 }
113 }
114
115}
diff --git a/Common/OpenSim.Framework/Types/PrimData.cs b/Common/OpenSim.Framework/Types/PrimData.cs
deleted file mode 100644
index a63be76..0000000
--- a/Common/OpenSim.Framework/Types/PrimData.cs
+++ /dev/null
@@ -1,201 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using libsecondlife;
33
34namespace OpenSim.Framework.Types
35{
36 public class PrimData
37 {
38 private const uint FULL_MASK_PERMISSIONS = 2147483647;
39
40 public LLUUID OwnerID;
41 public byte PCode;
42 public ushort PathBegin;
43 public ushort PathEnd;
44 public byte PathScaleX;
45 public byte PathScaleY;
46 public byte PathShearX;
47 public byte PathShearY;
48 public sbyte PathSkew;
49 public ushort ProfileBegin;
50 public ushort ProfileEnd;
51 public LLVector3 Scale;
52 public byte PathCurve;
53 public byte ProfileCurve;
54 public uint ParentID = 0;
55 public ushort ProfileHollow;
56 public sbyte PathRadiusOffset;
57 public byte PathRevolutions;
58 public sbyte PathTaperX;
59 public sbyte PathTaperY;
60 public sbyte PathTwist;
61 public sbyte PathTwistBegin;
62 public byte[] Texture;
63
64
65 public Int32 CreationDate;
66 public uint OwnerMask = FULL_MASK_PERMISSIONS;
67 public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
68 public uint GroupMask = FULL_MASK_PERMISSIONS;
69 public uint EveryoneMask = FULL_MASK_PERMISSIONS;
70 public uint BaseMask = FULL_MASK_PERMISSIONS;
71
72 //following only used during prim storage
73 public LLVector3 Position;
74 public LLQuaternion Rotation = new LLQuaternion(0,1,0,0);
75 public uint LocalID;
76 public LLUUID FullID;
77
78 public PrimData()
79 {
80
81 }
82
83 public PrimData(byte[] data)
84 {
85 int i =0;
86
87 this.OwnerID = new LLUUID(data, i); i += 16;
88 this.PCode = data[i++];
89 this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
90 this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
91 this.PathScaleX = data[i++];
92 this.PathScaleY = data[i++];
93 this.PathShearX = data[i++];
94 this.PathShearY = data[i++];
95 this.PathSkew = (sbyte)data[i++];
96 this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
97 this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
98 this.Scale = new LLVector3(data, i); i += 12;
99 this.PathCurve = data[i++];
100 this.ProfileCurve = data[i++];
101 this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
102 this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8));
103 this.PathRadiusOffset = (sbyte)data[i++];
104 this.PathRevolutions = data[i++];
105 this.PathTaperX = (sbyte)data[i++];
106 this.PathTaperY =(sbyte) data[i++];
107 this.PathTwist = (sbyte) data[i++];
108 this.PathTwistBegin = (sbyte) data[i++];
109 ushort length = (ushort)(data[i++] + (data[i++] << 8));
110 this.Texture = new byte[length];
111 Array.Copy(data, i, Texture, 0, length); i += length;
112 this.CreationDate = (Int32)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
113 this.OwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
114 this.NextOwnerMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
115 this.GroupMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
116 this.EveryoneMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
117 this.BaseMask = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
118 this.Position = new LLVector3(data, i); i += 12;
119 this.Rotation = new LLQuaternion(data,i, true); i += 12;
120 this.LocalID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24));
121 this.FullID = new LLUUID(data, i); i += 16;
122
123 }
124
125 public byte[] ToBytes()
126 {
127 int i = 0;
128 byte[] bytes = new byte[126 + Texture.Length];
129 Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
130 bytes[i++] = this.PCode;
131 bytes[i++] = (byte)(this.PathBegin % 256);
132 bytes[i++] = (byte)((this.PathBegin >> 8) % 256);
133 bytes[i++] = (byte)(this.PathEnd % 256);
134 bytes[i++] = (byte)((this.PathEnd >> 8) % 256);
135 bytes[i++] = this.PathScaleX;
136 bytes[i++] = this.PathScaleY;
137 bytes[i++] = this.PathShearX;
138 bytes[i++] = this.PathShearY;
139 bytes[i++] = (byte)this.PathSkew;
140 bytes[i++] = (byte)(this.ProfileBegin % 256);
141 bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256);
142 bytes[i++] = (byte)(this.ProfileEnd % 256);
143 bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256);
144 Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12;
145 bytes[i++] = this.PathCurve;
146 bytes[i++] = this.ProfileCurve;
147 bytes[i++] = (byte)(ParentID % 256);
148 bytes[i++] = (byte)((ParentID >> 8) % 256);
149 bytes[i++] = (byte)((ParentID >> 16) % 256);
150 bytes[i++] = (byte)((ParentID >> 24) % 256);
151 bytes[i++] = (byte)(this.ProfileHollow %256);
152 bytes[i++] = (byte)((this.ProfileHollow >> 8)% 256);
153 bytes[i++] = ((byte)this.PathRadiusOffset);
154 bytes[i++] = this.PathRevolutions;
155 bytes[i++] = ((byte) this.PathTaperX);
156 bytes[i++] = ((byte) this.PathTaperY);
157 bytes[i++] = ((byte) this.PathTwist);
158 bytes[i++] = ((byte) this.PathTwistBegin);
159 bytes[i++] = (byte)(Texture.Length % 256);
160 bytes[i++] = (byte)((Texture.Length >> 8) % 256);
161 Array.Copy(Texture, 0, bytes, i, Texture.Length); i += Texture.Length;
162 bytes[i++] = (byte)(this.CreationDate % 256);
163 bytes[i++] = (byte)((this.CreationDate >> 8) % 256);
164 bytes[i++] = (byte)((this.CreationDate >> 16) % 256);
165 bytes[i++] = (byte)((this.CreationDate >> 24) % 256);
166 bytes[i++] = (byte)(this.OwnerMask % 256);
167 bytes[i++] = (byte)((this.OwnerMask >> 8) % 256);
168 bytes[i++] = (byte)((this.OwnerMask >> 16) % 256);
169 bytes[i++] = (byte)((this.OwnerMask >> 24) % 256);
170 bytes[i++] = (byte)(this.NextOwnerMask % 256);
171 bytes[i++] = (byte)((this.NextOwnerMask >> 8) % 256);
172 bytes[i++] = (byte)((this.NextOwnerMask >> 16) % 256);
173 bytes[i++] = (byte)((this.NextOwnerMask >> 24) % 256);
174 bytes[i++] = (byte)(this.GroupMask % 256);
175 bytes[i++] = (byte)((this.GroupMask >> 8) % 256);
176 bytes[i++] = (byte)((this.GroupMask >> 16) % 256);
177 bytes[i++] = (byte)((this.GroupMask >> 24) % 256);
178 bytes[i++] = (byte)(this.EveryoneMask % 256);
179 bytes[i++] = (byte)((this.EveryoneMask >> 8) % 256);
180 bytes[i++] = (byte)((this.EveryoneMask >> 16) % 256);
181 bytes[i++] = (byte)((this.EveryoneMask >> 24) % 256);
182 bytes[i++] = (byte)(this.BaseMask % 256);
183 bytes[i++] = (byte)((this.BaseMask >> 8) % 256);
184 bytes[i++] = (byte)((this.BaseMask >> 16) % 256);
185 bytes[i++] = (byte)((this.BaseMask >> 24) % 256);
186 Array.Copy(this.Position.GetBytes(), 0, bytes, i, 12); i += 12;
187 if (this.Rotation == new LLQuaternion(0,0,0,0))
188 {
189 this.Rotation = new LLQuaternion(0, 1, 0, 0);
190 }
191 Array.Copy(this.Rotation.GetBytes(), 0, bytes, i, 12); i += 12;
192 bytes[i++] = (byte)(this.LocalID % 256);
193 bytes[i++] = (byte)((this.LocalID >> 8) % 256);
194 bytes[i++] = (byte)((this.LocalID >> 16) % 256);
195 bytes[i++] = (byte)((this.LocalID >> 24) % 256);
196 Array.Copy(FullID.GetBytes(), 0, bytes, i, 16); i += 16;
197
198 return bytes;
199 }
200 }
201}
diff --git a/Common/OpenSim.Framework/UserProfile.cs b/Common/OpenSim.Framework/UserProfile.cs
deleted file mode 100644
index 04ff20b..0000000
--- a/Common/OpenSim.Framework/UserProfile.cs
+++ /dev/null
@@ -1,89 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using OpenSim.Framework.Inventory;
33using System.Security.Cryptography;
34
35namespace OpenSim.Framework.User
36{
37 public class UserProfile
38 {
39
40 public string firstname;
41 public string lastname;
42 public ulong homeregionhandle;
43 public LLVector3 homepos;
44 public LLVector3 homelookat;
45
46 public bool IsGridGod = false;
47 public bool IsLocal = true; // will be used in future for visitors from foreign grids
48 public string AssetURL;
49 public string MD5passwd;
50
51 public LLUUID CurrentSessionID;
52 public LLUUID CurrentSecureSessionID;
53 public LLUUID UUID;
54 public Dictionary<LLUUID, uint> Circuits = new Dictionary<LLUUID, uint>(); // tracks circuit codes
55
56 public AgentInventory Inventory;
57
58 public UserProfile()
59 {
60 Circuits = new Dictionary<LLUUID, uint>();
61 Inventory = new AgentInventory();
62 homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256));
63 homepos = new LLVector3();
64 homelookat = new LLVector3();
65 }
66
67 public void InitSessionData()
68 {
69 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
70
71 byte[] randDataS = new byte[16];
72 byte[] randDataSS = new byte[16];
73
74 rand.GetBytes(randDataS);
75 rand.GetBytes(randDataSS);
76
77 CurrentSecureSessionID = new LLUUID(randDataSS,0);
78 CurrentSessionID = new LLUUID(randDataS,0);
79
80 }
81
82 public void AddSimCircuit(uint circuitCode, LLUUID regionUUID)
83 {
84 if (this.Circuits.ContainsKey(regionUUID) == false)
85 this.Circuits.Add(regionUUID, circuitCode);
86 }
87
88 }
89}
diff --git a/Common/OpenSim.Framework/UserProfileManager.cs b/Common/OpenSim.Framework/UserProfileManager.cs
deleted file mode 100644
index a4dac05..0000000
--- a/Common/OpenSim.Framework/UserProfileManager.cs
+++ /dev/null
@@ -1,299 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Collections;
31using System.Text;
32using System.Text.RegularExpressions;
33using System.Xml;
34using libsecondlife;
35using Nwc.XmlRpc;
36using OpenSim.Framework.Sims;
37using OpenSim.Framework.Inventory;
38using OpenSim.Framework.Utilities;
39
40namespace OpenSim.Framework.User
41{
42 public class UserProfileManager : UserProfileManagerBase
43 {
44 public string GridURL;
45 public string GridSendKey;
46 public string GridRecvKey;
47 public string DefaultStartupMsg;
48
49 public UserProfileManager()
50 {
51
52 }
53
54 public void SetKeys(string sendKey, string recvKey, string url, string message)
55 {
56 GridRecvKey = recvKey;
57 GridSendKey = sendKey;
58 GridURL = url;
59 DefaultStartupMsg = message;
60 }
61
62 public virtual string ParseXMLRPC(string requestBody)
63 {
64
65 XmlRpcRequest request = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody);
66
67 switch (request.MethodName)
68 {
69 case "login_to_simulator":
70 XmlRpcResponse response = XmlRpcLoginMethod(request);
71
72 return (Regex.Replace(XmlRpcResponseSerializer.Singleton.Serialize(response), "utf-16", "utf-8"));
73 }
74
75 return "";
76 }
77
78 public string RestDeleteUserSessionMethod( string request, string path, string param )
79 {
80 LLUUID sessionid = new LLUUID(param); // get usersessions/sessionid
81 foreach (libsecondlife.LLUUID UUID in UserProfiles.Keys)
82 {
83 if ( UserProfiles[UUID].CurrentSessionID == sessionid)
84 {
85 UserProfiles[UUID].CurrentSessionID = null;
86 UserProfiles[UUID].CurrentSecureSessionID = null;
87 UserProfiles[UUID].Circuits.Clear();
88 }
89 }
90
91 return "OK";
92 }
93
94 public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
95 {
96 XmlRpcResponse response = new XmlRpcResponse();
97 Hashtable requestData = (Hashtable)request.Params[0];
98
99 bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd"));
100 bool GoodLogin = false;
101 string firstname = "";
102 string lastname = "";
103 string passwd = "";
104
105 if (GoodXML)
106 {
107 firstname = (string)requestData["first"];
108 lastname = (string)requestData["last"];
109 passwd = (string)requestData["passwd"];
110 GoodLogin = AuthenticateUser(firstname, lastname, passwd);
111 }
112
113
114 if (!(GoodXML && GoodLogin))
115 {
116 response = CreateErrorConnectingToGridResponse();
117 }
118 else
119 {
120 UserProfile TheUser = GetProfileByName(firstname, lastname);
121 //we need to sort out how sessions are logged out , currently the sim tells the gridserver
122 //but if as this suggests the userserver handles it then please have the sim telling the userserver instead
123 //as it really makes things messy for sandbox mode
124 //if (!((TheUser.CurrentSessionID == null) && (TheUser.CurrentSecureSessionID == null)))
125 // {
126 // response = CreateAlreadyLoggedInResponse();
127 // }
128 //else
129 //{
130 try
131 {
132 Hashtable responseData = new Hashtable();
133
134 LLUUID AgentID = TheUser.UUID;
135 TheUser.InitSessionData();
136
137 //for loading data from a grid server, make any changes in CustomiseResponse() (or create a sub class of this and override that method)
138 //SimProfile SimInfo = new SimProfile();
139 //SimInfo = SimInfo.LoadFromGrid(TheUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
140
141
142 Hashtable GlobalT = new Hashtable();
143 GlobalT["sun_texture_id"] = "cce0f112-878f-4586-a2e2-a8f104bba271";
144 GlobalT["cloud_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
145 GlobalT["moon_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
146 ArrayList GlobalTextures = new ArrayList();
147 GlobalTextures.Add(GlobalT);
148
149 Hashtable LoginFlagsHash = new Hashtable();
150 LoginFlagsHash["daylight_savings"] = "N";
151 LoginFlagsHash["stipend_since_login"] = "N";
152 LoginFlagsHash["gendered"] = "Y";
153 LoginFlagsHash["ever_logged_in"] = "Y";
154 ArrayList LoginFlags = new ArrayList();
155 LoginFlags.Add(LoginFlagsHash);
156
157 Hashtable uiconfig = new Hashtable();
158 uiconfig["allow_first_life"] = "Y";
159 ArrayList ui_config = new ArrayList();
160 ui_config.Add(uiconfig);
161
162 Hashtable ClassifiedCategoriesHash = new Hashtable();
163 ClassifiedCategoriesHash["category_name"] = "bla bla";
164 ClassifiedCategoriesHash["category_id"] = (Int32)1;
165 ArrayList ClassifiedCategories = new ArrayList();
166 ClassifiedCategories.Add(ClassifiedCategoriesHash);
167
168 ArrayList AgentInventory = new ArrayList();
169 Console.WriteLine("adding inventory to response");
170 Hashtable TempHash;
171 foreach (InventoryFolder InvFolder in TheUser.Inventory.InventoryFolders.Values)
172 {
173 TempHash = new Hashtable();
174 Console.WriteLine("adding folder " + InvFolder.FolderName + ", ID: " + InvFolder.FolderID.ToStringHyphenated() + " with parent: " + InvFolder.ParentID.ToStringHyphenated());
175 TempHash["name"] = InvFolder.FolderName;
176 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
177 TempHash["version"] = (Int32)InvFolder.Version;
178 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
179 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
180 AgentInventory.Add(TempHash);
181 }
182
183 Hashtable InventoryRootHash = new Hashtable();
184 InventoryRootHash["folder_id"] = TheUser.Inventory.InventoryRoot.FolderID.ToStringHyphenated();
185 ArrayList InventoryRoot = new ArrayList();
186 InventoryRoot.Add(InventoryRootHash);
187
188 Hashtable InitialOutfitHash = new Hashtable();
189 InitialOutfitHash["folder_name"] = "Nightclub Female";
190 InitialOutfitHash["gender"] = "female";
191 ArrayList InitialOutfit = new ArrayList();
192 InitialOutfit.Add(InitialOutfitHash);
193
194 uint circode = (uint)(Util.RandomClass.Next());
195 //TheUser.AddSimCircuit(circode, SimInfo.UUID);
196
197 responseData["last_name"] = TheUser.lastname;
198 responseData["ui-config"] = ui_config;
199 responseData["sim_ip"] = "127.0.0.1"; //SimInfo.sim_ip.ToString();
200 responseData["login-flags"] = LoginFlags;
201 responseData["global-textures"] = GlobalTextures;
202 responseData["classified_categories"] = ClassifiedCategories;
203 responseData["event_categories"] = new ArrayList();
204 responseData["inventory-skeleton"] = AgentInventory;
205 responseData["inventory-skel-lib"] = new ArrayList();
206 responseData["inventory-root"] = InventoryRoot;
207 responseData["event_notifications"] = new ArrayList();
208 responseData["gestures"] = new ArrayList();
209 responseData["inventory-lib-owner"] = new ArrayList();
210 responseData["initial-outfit"] = InitialOutfit;
211 responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
212 responseData["start_location"] = "last";
213 responseData["home"] = "{'region_handle':[r" + (0 * 256).ToString() + ",r" + (0 * 256).ToString() + "], 'position':[r" + TheUser.homepos.X.ToString() + ",r" + TheUser.homepos.Y.ToString() + ",r" + TheUser.homepos.Z.ToString() + "], 'look_at':[r" + TheUser.homelookat.X.ToString() + ",r" + TheUser.homelookat.Y.ToString() + ",r" + TheUser.homelookat.Z.ToString() + "]}";
214 responseData["message"] = DefaultStartupMsg;
215 responseData["first_name"] = TheUser.firstname;
216 responseData["circuit_code"] = (Int32)circode;
217 responseData["sim_port"] = 0; //(Int32)SimInfo.sim_port;
218 responseData["secure_session_id"] = TheUser.CurrentSecureSessionID.ToStringHyphenated();
219 responseData["look_at"] = "\n[r" + TheUser.homelookat.X.ToString() + ",r" + TheUser.homelookat.Y.ToString() + ",r" + TheUser.homelookat.Z.ToString() + "]\n";
220 responseData["agent_id"] = AgentID.ToStringHyphenated();
221 responseData["region_y"] = (Int32)0 * 256; // (Int32)SimInfo.RegionLocY * 256;
222 responseData["region_x"] = (Int32)0 * 256; //SimInfo.RegionLocX * 256;
223 responseData["seed_capability"] = "";
224 responseData["agent_access"] = "M";
225 responseData["session_id"] = TheUser.CurrentSessionID.ToStringHyphenated();
226 responseData["login"] = "true";
227
228 this.CustomiseResponse(ref responseData, TheUser);
229 response.Value = responseData;
230 // TheUser.SendDataToSim(SimInfo);
231 return response;
232
233 }
234 catch (Exception E)
235 {
236 Console.WriteLine(E.ToString());
237 }
238 //}
239 }
240 return response;
241
242 }
243
244 private static XmlRpcResponse CreateErrorConnectingToGridResponse()
245 {
246 XmlRpcResponse response = new XmlRpcResponse();
247 Hashtable ErrorRespData = new Hashtable();
248 ErrorRespData["reason"] = "key";
249 ErrorRespData["message"] = "Error connecting to grid. Please double check your login details and check with the grid owner if you are sure these are correct";
250 ErrorRespData["login"] = "false";
251 response.Value = ErrorRespData;
252 return response;
253 }
254
255 private static XmlRpcResponse CreateAlreadyLoggedInResponse()
256 {
257 XmlRpcResponse response = new XmlRpcResponse();
258 Hashtable PresenceErrorRespData = new Hashtable();
259 PresenceErrorRespData["reason"] = "presence";
260 PresenceErrorRespData["message"] = "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner";
261 PresenceErrorRespData["login"] = "false";
262 response.Value = PresenceErrorRespData;
263 return response;
264 }
265
266 public virtual void CustomiseResponse(ref Hashtable response, UserProfile theUser)
267 {
268 //default method set up to act as ogs user server
269 SimProfile SimInfo= new SimProfile();
270 //get siminfo from grid server
271 SimInfo = SimInfo.LoadFromGrid(theUser.homeregionhandle, GridURL, GridSendKey, GridRecvKey);
272 Int32 circode = (Int32)Convert.ToUInt32(response["circuit_code"]);
273 theUser.AddSimCircuit((uint)circode, SimInfo.UUID);
274 response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], 'position':[r" + theUser.homepos.X.ToString() + ",r" + theUser.homepos.Y.ToString() + ",r" + theUser.homepos.Z.ToString() + "], 'look_at':[r" + theUser.homelookat.X.ToString() + ",r" + theUser.homelookat.Y.ToString() + ",r" + theUser.homelookat.Z.ToString() + "]}";
275 response["sim_ip"] = SimInfo.sim_ip;
276 response["sim_port"] = (Int32)SimInfo.sim_port;
277 response["region_y"] = (Int32)SimInfo.RegionLocY * 256;
278 response["region_x"] = (Int32)SimInfo.RegionLocX * 256;
279
280 //default is ogs user server, so let the sim know about the user via a XmlRpcRequest
281 Console.WriteLine(SimInfo.caps_url);
282 Hashtable SimParams = new Hashtable();
283 SimParams["session_id"] = theUser.CurrentSessionID.ToString();
284 SimParams["secure_session_id"] = theUser.CurrentSecureSessionID.ToString();
285 SimParams["firstname"] = theUser.firstname;
286 SimParams["lastname"] = theUser.lastname;
287 SimParams["agent_id"] = theUser.UUID.ToString();
288 SimParams["circuit_code"] = (Int32)circode;
289 SimParams["startpos_x"] = theUser.homepos.X.ToString();
290 SimParams["startpos_y"] = theUser.homepos.Y.ToString();
291 SimParams["startpos_z"] = theUser.homepos.Z.ToString();
292 ArrayList SendParams = new ArrayList();
293 SendParams.Add(SimParams);
294
295 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
296 XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000);
297 }
298 }
299}
diff --git a/Common/OpenSim.Framework/UserProfileManagerBase.cs b/Common/OpenSim.Framework/UserProfileManagerBase.cs
deleted file mode 100644
index e0c0174..0000000
--- a/Common/OpenSim.Framework/UserProfileManagerBase.cs
+++ /dev/null
@@ -1,152 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using OpenSim.Framework.Utilities;
33using OpenSim.Framework.Inventory;
34using Db4objects.Db4o;
35
36namespace OpenSim.Framework.User
37{
38 public class UserProfileManagerBase
39 {
40
41 public Dictionary<LLUUID, UserProfile> UserProfiles = new Dictionary<LLUUID, UserProfile>();
42
43 public UserProfileManagerBase()
44 {
45 }
46
47 public virtual void InitUserProfiles()
48 {
49 IObjectContainer db;
50 db = Db4oFactory.OpenFile("userprofiles.yap");
51 IObjectSet result = db.Get(typeof(UserProfile));
52 foreach (UserProfile userprof in result)
53 {
54 UserProfiles.Add(userprof.UUID, userprof);
55 }
56 Console.WriteLine("UserProfiles.Cs:InitUserProfiles() - Successfully loaded " + result.Count.ToString() + " from database");
57 db.Close();
58 }
59
60 public virtual void SaveUserProfiles() // ZOMG! INEFFICIENT!
61 {
62 IObjectContainer db;
63 db = Db4oFactory.OpenFile("userprofiles.yap");
64 IObjectSet result = db.Get(typeof(UserProfile));
65 foreach (UserProfile userprof in result)
66 {
67 db.Delete(userprof);
68 db.Commit();
69 }
70 foreach (UserProfile userprof in UserProfiles.Values)
71 {
72 db.Set(userprof);
73 db.Commit();
74 }
75 db.Close();
76 }
77
78 public UserProfile GetProfileByName(string firstname, string lastname)
79 {
80 foreach (libsecondlife.LLUUID UUID in UserProfiles.Keys)
81 {
82 if (UserProfiles[UUID].firstname.Equals(firstname)) if (UserProfiles[UUID].lastname.Equals(lastname))
83 {
84 return UserProfiles[UUID];
85 }
86 }
87 return null;
88 }
89
90 public UserProfile GetProfileByLLUUID(LLUUID ProfileLLUUID)
91 {
92 return UserProfiles[ProfileLLUUID];
93 }
94
95 public virtual bool AuthenticateUser(string firstname, string lastname, string passwd)
96 {
97 UserProfile TheUser = GetProfileByName(firstname, lastname);
98 passwd = passwd.Remove(0, 3); //remove $1$
99 if (TheUser != null)
100 {
101 if (TheUser.MD5passwd == passwd)
102 {
103 Console.WriteLine("UserProfile - authorised " + firstname + " " + lastname);
104 return true;
105 }
106 else
107 {
108 Console.WriteLine("UserProfile - not authorised, password not match " + TheUser.MD5passwd + " and " + passwd);
109 return false;
110 }
111 }
112 else
113 {
114 Console.WriteLine("UserProfile - not authorised , unkown: " + firstname + " , " + lastname);
115 return false;
116 }
117
118 }
119
120 public void SetGod(LLUUID GodID)
121 {
122 this.UserProfiles[GodID].IsGridGod = true;
123 }
124
125 public virtual UserProfile CreateNewProfile(string firstname, string lastname, string MD5passwd)
126 {
127 Console.WriteLine("creating new profile for : " + firstname + " , " + lastname);
128 UserProfile newprofile = new UserProfile();
129 newprofile.homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256));
130 newprofile.firstname = firstname;
131 newprofile.lastname = lastname;
132 newprofile.MD5passwd = MD5passwd;
133 newprofile.UUID = LLUUID.Random();
134 newprofile.Inventory.CreateRootFolder(newprofile.UUID, true);
135 this.UserProfiles.Add(newprofile.UUID, newprofile);
136 SaveUserProfiles();
137 return newprofile;
138 }
139
140 public virtual AgentInventory GetUsersInventory(LLUUID agentID)
141 {
142 UserProfile user = this.GetProfileByLLUUID(agentID);
143 if (user != null)
144 {
145 return user.Inventory;
146 }
147
148 return null;
149 }
150
151 }
152}
diff --git a/Common/OpenSim.Framework/Util.cs b/Common/OpenSim.Framework/Util.cs
deleted file mode 100644
index 10e3fdf..0000000
--- a/Common/OpenSim.Framework/Util.cs
+++ /dev/null
@@ -1,178 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Security.Cryptography;
30using System.Collections.Generic;
31using System.Text;
32using libsecondlife;
33using libsecondlife.Packets;
34
35namespace OpenSim.Framework.Utilities
36{
37 public class Util
38 {
39 private static Random randomClass = new Random();
40 private static uint nextXferID = 5000;
41 private static object XferLock = new object();
42
43 public static ulong UIntsToLong(uint X, uint Y)
44 {
45 return Helpers.UIntsToLong(X, Y);
46 }
47
48 public static Random RandomClass
49 {
50 get
51 {
52 return randomClass;
53 }
54 }
55
56 public static uint GetNextXferID()
57 {
58 uint id = 0;
59 lock(XferLock)
60 {
61 id = nextXferID;
62 nextXferID++;
63 }
64 return id;
65 }
66
67 public static int UnixTimeSinceEpoch()
68 {
69 TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
70 int timestamp = (int)t.TotalSeconds;
71 return timestamp;
72 }
73
74 public static string Md5Hash(string pass)
75 {
76 MD5 md5 = MD5CryptoServiceProvider.Create();
77 byte[] dataMd5 = md5.ComputeHash(Encoding.Default.GetBytes(pass));
78 StringBuilder sb = new StringBuilder();
79 for (int i = 0; i < dataMd5.Length; i++)
80 sb.AppendFormat("{0:x2}", dataMd5[i]);
81 return sb.ToString();
82 }
83
84 //public static int fast_distance2d(int x, int y)
85 //{
86 // x = System.Math.Abs(x);
87 // y = System.Math.Abs(y);
88
89 // int min = System.Math.Min(x, y);
90
91 // return (x + y - (min >> 1) - (min >> 2) + (min >> 4));
92 //}
93
94 public static string FieldToString(byte[] bytes)
95 {
96 return FieldToString(bytes, String.Empty);
97 }
98
99 /// <summary>
100 /// Convert a variable length field (byte array) to a string, with a
101 /// field name prepended to each line of the output
102 /// </summary>
103 /// <remarks>If the byte array has unprintable characters in it, a
104 /// hex dump will be put in the string instead</remarks>
105 /// <param name="bytes">The byte array to convert to a string</param>
106 /// <param name="fieldName">A field name to prepend to each line of output</param>
107 /// <returns>An ASCII string or a string containing a hex dump, minus
108 /// the null terminator</returns>
109 public static string FieldToString(byte[] bytes, string fieldName)
110 {
111 // Check for a common case
112 if (bytes.Length == 0) return String.Empty;
113
114 StringBuilder output = new StringBuilder();
115 bool printable = true;
116
117 for (int i = 0; i < bytes.Length; ++i)
118 {
119 // Check if there are any unprintable characters in the array
120 if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09
121 && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00)
122 {
123 printable = false;
124 break;
125 }
126 }
127
128 if (printable)
129 {
130 if (fieldName.Length > 0)
131 {
132 output.Append(fieldName);
133 output.Append(": ");
134 }
135
136 if (bytes[bytes.Length - 1] == 0x00)
137 output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1));
138 else
139 output.Append(UTF8Encoding.UTF8.GetString(bytes));
140 }
141 else
142 {
143 for (int i = 0; i < bytes.Length; i += 16)
144 {
145 if (i != 0)
146 output.Append(Environment.NewLine);
147 if (fieldName.Length > 0)
148 {
149 output.Append(fieldName);
150 output.Append(": ");
151 }
152
153 for (int j = 0; j < 16; j++)
154 {
155 if ((i + j) < bytes.Length)
156 output.Append(String.Format("{0:X2} ", bytes[i + j]));
157 else
158 output.Append(" ");
159 }
160
161 for (int j = 0; j < 16 && (i + j) < bytes.Length; j++)
162 {
163 if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E)
164 output.Append((char)bytes[i + j]);
165 else
166 output.Append(".");
167 }
168 }
169 }
170
171 return output.ToString();
172 }
173 public Util()
174 {
175
176 }
177 }
178}
diff --git a/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.csproj b/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.csproj
deleted file mode 100644
index df68722..0000000
--- a/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.csproj
+++ /dev/null
@@ -1,93 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{E88EF749-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.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.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="..\..\OpenSim.Framework\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/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build b/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build
deleted file mode 100644
index 075ea7f..0000000
--- a/Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build
+++ /dev/null
@@ -1,42 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.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.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/Common/OpenSim.GenericConfig/Xml/Properties/AssemblyInfo.cs b/Common/OpenSim.GenericConfig/Xml/Properties/AssemblyInfo.cs
deleted file mode 100644
index de5f48d..0000000
--- a/Common/OpenSim.GenericConfig/Xml/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.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/Common/OpenSim.GenericConfig/Xml/XmlConfig.cs b/Common/OpenSim.GenericConfig/Xml/XmlConfig.cs
deleted file mode 100644
index 40c252f..0000000
--- a/Common/OpenSim.GenericConfig/Xml/XmlConfig.cs
+++ /dev/null
@@ -1,136 +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.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 try
53 {
54 if (System.IO.File.Exists(fileName))
55 {
56 XmlTextReader reader = new XmlTextReader(fileName);
57 reader.WhitespaceHandling = WhitespaceHandling.None;
58 doc.Load(reader);
59 reader.Close();
60 }
61 else
62 {
63 createdFile = true;
64 rootNode = doc.CreateNode(XmlNodeType.Element, "Root", "");
65 doc.AppendChild(rootNode);
66 configNode = doc.CreateNode(XmlNodeType.Element, "Config", "");
67 rootNode.AppendChild(configNode);
68 }
69
70 }
71 catch (Exception e)
72 {
73 Console.WriteLine(e.Message);
74 return;
75 }
76 try
77 {
78 rootNode = doc.FirstChild;
79 if (rootNode.Name != "Root")
80 throw new Exception("Error: Invalid .xml File. Missing <Root>");
81
82 configNode = rootNode.FirstChild;
83 if (configNode.Name != "Config")
84 throw new Exception("Error: Invalid .xml File. <Root> first child should be <Config>");
85
86 }
87 catch (Exception e)
88 {
89 Console.WriteLine(e.Message);
90 }
91 if (createdFile)
92 {
93 this.Commit();
94 }
95 }
96
97 public string GetAttribute(string attributeName)
98 {
99 string result = "";
100 if (configNode.Attributes[attributeName] != null)
101 {
102 result = ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value;
103 }
104 return result;
105 }
106
107 public bool SetAttribute(string attributeName, string attributeValue)
108 {
109 if (configNode.Attributes[attributeName] != null)
110 {
111 ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value = attributeValue;
112 }
113 else
114 {
115 XmlAttribute attri;
116 attri = doc.CreateAttribute(attributeName);
117 attri.Value = attributeValue;
118 configNode.Attributes.Append(attri);
119 }
120 return true;
121 }
122
123 public void Commit()
124 {
125 doc.Save(fileName);
126 }
127
128 public void Close()
129 {
130 configNode = null;
131 rootNode = null;
132 doc = null;
133 }
134
135 }
136}
diff --git a/Common/OpenSim.Servers/BaseHttpServer.cs b/Common/OpenSim.Servers/BaseHttpServer.cs
deleted file mode 100644
index ec5a6d7..0000000
--- a/Common/OpenSim.Servers/BaseHttpServer.cs
+++ /dev/null
@@ -1,283 +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.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;
38
39namespace OpenSim.Servers
40{
41 public class BaseHttpServer
42 {
43 protected class RestMethodEntry
44 {
45 private string m_path;
46 public string Path
47 {
48 get { return m_path; }
49 }
50
51 private RestMethod m_restMethod;
52 public RestMethod RestMethod
53 {
54 get { return m_restMethod; }
55 }
56
57 public RestMethodEntry(string path, RestMethod restMethod)
58 {
59 m_path = path;
60 m_restMethod = restMethod;
61 }
62 }
63
64 protected Thread m_workerThread;
65 protected HttpListener m_httpListener;
66 protected Dictionary<string, RestMethodEntry> m_restHandlers = new Dictionary<string, RestMethodEntry>();
67 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
68 protected int m_port;
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 string methodKey = String.Format("{0}: {1}", method, path);
78
79 if (!this.m_restHandlers.ContainsKey(methodKey))
80 {
81 this.m_restHandlers.Add(methodKey, new RestMethodEntry(path, handler));
82 return true;
83 }
84
85 //must already have a handler for that path so return false
86 return false;
87 }
88
89 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler)
90 {
91 if (!this.m_rpcHandlers.ContainsKey(method))
92 {
93 this.m_rpcHandlers.Add(method, handler);
94 return true;
95 }
96
97 //must already have a handler for that path so return false
98 return false;
99 }
100
101 protected virtual string ProcessXMLRPCMethod(string methodName, XmlRpcRequest request)
102 {
103 XmlRpcResponse response;
104
105 XmlRpcMethod method;
106 if (this.m_rpcHandlers.TryGetValue(methodName, out method))
107 {
108 response = method(request);
109 }
110 else
111 {
112 response = new XmlRpcResponse();
113 Hashtable unknownMethodError = new Hashtable();
114 unknownMethodError["reason"] = "XmlRequest"; ;
115 unknownMethodError["message"] = "Unknown Rpc request";
116 unknownMethodError["login"] = "false";
117 response.Value = unknownMethodError;
118 }
119
120 return XmlRpcResponseSerializer.Singleton.Serialize(response);
121 }
122
123 protected virtual string ParseREST(string request, string path, string method)
124 {
125 string response;
126
127 string requestKey = String.Format("{0}: {1}", method, path);
128
129 string bestMatch = String.Empty;
130 foreach (string currentKey in m_restHandlers.Keys)
131 {
132 if (requestKey.StartsWith(currentKey))
133 {
134 if (currentKey.Length > bestMatch.Length)
135 {
136 bestMatch = currentKey;
137 }
138 }
139 }
140
141 RestMethodEntry restMethodEntry;
142 if (m_restHandlers.TryGetValue(bestMatch, out restMethodEntry))
143 {
144 RestMethod restMethod = restMethodEntry.RestMethod;
145
146 string param = path.Substring(restMethodEntry.Path.Length);
147 response = restMethod(request, path, param);
148
149 }
150 else
151 {
152 response = String.Empty;
153 }
154
155 return response;
156 }
157
158 protected virtual string ParseLLSDXML(string requestBody)
159 {
160 // dummy function for now - IMPLEMENT ME!
161 return "";
162 }
163
164 protected virtual string ParseXMLRPC(string requestBody)
165 {
166 string responseString = String.Empty;
167
168 try
169 {
170 XmlRpcRequest request = (XmlRpcRequest)(new XmlRpcRequestDeserializer()).Deserialize(requestBody);
171
172 string methodName = request.MethodName;
173
174 responseString = ProcessXMLRPCMethod(methodName, request);
175 }
176 catch (Exception e)
177 {
178 Console.WriteLine(e.ToString());
179 }
180 return responseString;
181 }
182
183 public virtual void HandleRequest(Object stateinfo)
184 {
185 try
186 {
187 HttpListenerContext context = (HttpListenerContext)stateinfo;
188
189 HttpListenerRequest request = context.Request;
190 HttpListenerResponse response = context.Response;
191
192 response.KeepAlive = false;
193 response.SendChunked = false;
194
195 System.IO.Stream body = request.InputStream;
196 System.Text.Encoding encoding = System.Text.Encoding.UTF8;
197 System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding);
198
199 string requestBody = reader.ReadToEnd();
200 body.Close();
201 reader.Close();
202
203 //Console.WriteLine(request.HttpMethod + " " + request.RawUrl + " Http/" + request.ProtocolVersion.ToString() + " content type: " + request.ContentType);
204 //Console.WriteLine(requestBody);
205
206 string responseString = "";
207 switch (request.ContentType)
208 {
209 case "text/xml":
210 // must be XML-RPC, so pass to the XML-RPC parser
211
212 responseString = ParseXMLRPC(requestBody);
213 responseString = Regex.Replace(responseString, "utf-16", "utf-8");
214
215 response.AddHeader("Content-type", "text/xml");
216 break;
217
218 case "application/xml":
219 // probably LLSD we hope, otherwise it should be ignored by the parser
220 responseString = ParseLLSDXML(requestBody);
221 response.AddHeader("Content-type", "application/xml");
222 break;
223
224 case "application/x-www-form-urlencoded":
225 // a form data POST so send to the REST parser
226 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
227 response.AddHeader("Content-type", "text/html");
228 break;
229
230 case null:
231 // must be REST or invalid crap, so pass to the REST parser
232 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
233 response.AddHeader("Content-type", "text/html");
234 break;
235
236 }
237
238 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
239 System.IO.Stream output = response.OutputStream;
240 response.SendChunked = false;
241 response.ContentLength64 = buffer.Length;
242 output.Write(buffer, 0, buffer.Length);
243 output.Close();
244 }
245 catch (Exception e)
246 {
247 Console.WriteLine(e.ToString());
248 }
249 }
250
251 public void Start()
252 {
253 MainConsole.Instance.Verbose("BaseHttpServer.cs: Starting up HTTP Server");
254
255 m_workerThread = new Thread(new ThreadStart(StartHTTP));
256 m_workerThread.IsBackground = true;
257 m_workerThread.Start();
258 }
259
260 private void StartHTTP()
261 {
262 try
263 {
264 MainConsole.Instance.Verbose("BaseHttpServer.cs: StartHTTP() - Spawned main thread OK");
265 m_httpListener = new HttpListener();
266
267 m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
268 m_httpListener.Start();
269
270 HttpListenerContext context;
271 while (true)
272 {
273 context = m_httpListener.GetContext();
274 ThreadPool.QueueUserWorkItem(new WaitCallback(HandleRequest), context);
275 }
276 }
277 catch (Exception e)
278 {
279 MainConsole.Instance.Warn(e.Message);
280 }
281 }
282 }
283}
diff --git a/Common/OpenSim.Servers/BaseServer.cs b/Common/OpenSim.Servers/BaseServer.cs
deleted file mode 100644
index f248186..0000000
--- a/Common/OpenSim.Servers/BaseServer.cs
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Servers
33{
34 public class BaseServer
35 {
36 }
37}
diff --git a/Common/OpenSim.Servers/CheckSumServer.cs b/Common/OpenSim.Servers/CheckSumServer.cs
deleted file mode 100644
index b6bfe3a..0000000
--- a/Common/OpenSim.Servers/CheckSumServer.cs
+++ /dev/null
@@ -1,139 +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.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.Servers
44{
45 public class CheckSumServer : UDPServerBase
46 {
47 //protected ConsoleBase m_console;
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 MainConsole.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection ");
131 }
132 }
133
134 private void SendPackTo(byte[] buffer, int size, SocketFlags flags, EndPoint endp)
135 {
136 this.Server.SendTo(buffer, size, flags, endp);
137 }
138 }
139} \ No newline at end of file
diff --git a/Common/OpenSim.Servers/IRestHandler.cs b/Common/OpenSim.Servers/IRestHandler.cs
deleted file mode 100644
index 3aa508c..0000000
--- a/Common/OpenSim.Servers/IRestHandler.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Servers
33{
34 public delegate string RestMethod( string request, string path, string param );
35}
diff --git a/Common/OpenSim.Servers/LocalUserProfileManager.cs b/Common/OpenSim.Servers/LocalUserProfileManager.cs
deleted file mode 100644
index 6f65176..0000000
--- a/Common/OpenSim.Servers/LocalUserProfileManager.cs
+++ /dev/null
@@ -1,124 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Collections;
32using System.Text;
33using OpenSim.Framework.User;
34using OpenSim.Framework.Grid;
35using OpenSim.Framework.Inventory;
36using OpenSim.Framework.Interfaces;
37using OpenSim.Framework.Types;
38using libsecondlife;
39
40namespace OpenSim.UserServer
41{
42 public class LocalUserProfileManager : UserProfileManager
43 {
44 private IGridServer m_gridServer;
45 private int m_port;
46 private string m_ipAddr;
47 private uint regionX;
48 private uint regionY;
49 private AddNewSessionHandler AddSession;
50
51 public LocalUserProfileManager(IGridServer gridServer, int simPort, string ipAddr , uint regX, uint regY)
52 {
53 m_gridServer = gridServer;
54 m_port = simPort;
55 m_ipAddr = ipAddr;
56 regionX = regX;
57 regionY = regY;
58 }
59
60 public void SetSessionHandler(AddNewSessionHandler sessionHandler)
61 {
62 this.AddSession = sessionHandler;
63 }
64
65 public override void InitUserProfiles()
66 {
67 base.InitUserProfiles();
68 }
69
70 public override void CustomiseResponse(ref System.Collections.Hashtable response, UserProfile theUser)
71 {
72 Int32 circode = (Int32)response["circuit_code"];
73 theUser.AddSimCircuit((uint)circode, LLUUID.Random());
74 response["home"] = "{'region_handle':[r" + (997 * 256).ToString() + ",r" + (996 * 256).ToString() + "], 'position':[r" + theUser.homepos.X.ToString() + ",r" + theUser.homepos.Y.ToString() + ",r" + theUser.homepos.Z.ToString() + "], 'look_at':[r" + theUser.homelookat.X.ToString() + ",r" + theUser.homelookat.Y.ToString() + ",r" + theUser.homelookat.Z.ToString() + "]}";
75 response["sim_port"] = m_port;
76 response["sim_ip"] = m_ipAddr;
77 response["region_y"] = (Int32)regionY* 256;
78 response["region_x"] = (Int32)regionX* 256;
79
80 string first;
81 string last;
82 if (response.Contains("first_name"))
83 {
84 first = (string)response["first_name"];
85 }
86 else
87 {
88 first = "test";
89 }
90
91 if (response.Contains("last_name"))
92 {
93 last = (string)response["last_name"];
94 }
95 else
96 {
97 last = "User";
98 }
99
100 ArrayList InventoryList = (ArrayList)response["inventory-skeleton"];
101 Hashtable Inventory1 = (Hashtable)InventoryList[0];
102
103 Login _login = new Login();
104 //copy data to login object
105 _login.First = first;
106 _login.Last = last;
107 _login.Agent = new LLUUID((string)response["agent_id"]) ;
108 _login.Session = new LLUUID((string)response["session_id"]);
109 _login.SecureSession = new LLUUID((string)response["secure_session_id"]);
110 _login.CircuitCode =(uint) circode;
111 _login.BaseFolder = null;
112 _login.InventoryFolder = new LLUUID((string)Inventory1["folder_id"]);
113
114 //working on local computer if so lets add to the gridserver's list of sessions?
115 /*if (m_gridServer.GetName() == "Local")
116 {
117 Console.WriteLine("adding login data to gridserver");
118 ((LocalGridBase)this.m_gridServer).AddNewSession(_login);
119 }*/
120
121 this.AddSession(_login);
122 }
123 }
124}
diff --git a/Common/OpenSim.Servers/LoginResponse.cs b/Common/OpenSim.Servers/LoginResponse.cs
deleted file mode 100644
index 9e37409..0000000
--- a/Common/OpenSim.Servers/LoginResponse.cs
+++ /dev/null
@@ -1,669 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using Nwc.XmlRpc;
30using System;
31using System.IO;
32using System.Net;
33using System.Net.Sockets;
34using System.Text;
35using System.Text.RegularExpressions;
36using System.Threading;
37using System.Collections;
38using System.Security.Cryptography;
39using System.Xml;
40using libsecondlife;
41using OpenSim;
42using OpenSim.Framework.User;
43using OpenSim.Framework.Inventory;
44using OpenSim.Framework.Utilities;
45using OpenSim.Framework.Interfaces;
46
47// ?
48using OpenSim.Framework.Grid;
49
50namespace OpenSim.UserServer
51{
52 /// <summary>
53 /// A temp class to handle login response.
54 /// Should make use of UserProfileManager where possible.
55 /// </summary>
56
57 public class LoginResponse
58 {
59 private Hashtable loginFlagsHash;
60 private Hashtable globalTexturesHash;
61 private Hashtable loginError;
62 private Hashtable eventCategoriesHash;
63 private Hashtable uiConfigHash;
64 private Hashtable classifiedCategoriesHash;
65
66 private ArrayList loginFlags;
67 private ArrayList globalTextures;
68 private ArrayList eventCategories;
69 private ArrayList uiConfig;
70 private ArrayList classifiedCategories;
71 private ArrayList inventoryRoot;
72 private ArrayList initialOutfit;
73 private ArrayList agentInventory;
74
75 private UserProfile userProfile;
76
77 private LLUUID agentID;
78 private LLUUID sessionID;
79 private LLUUID secureSessionID;
80 private LLUUID baseFolderID;
81 private LLUUID inventoryFolderID;
82
83 // Login Flags
84 private string dst;
85 private string stipendSinceLogin;
86 private string gendered;
87 private string everLoggedIn;
88 private string login;
89 private string simPort;
90 private string simAddress;
91 private string agentAccess;
92 private Int32 circuitCode;
93 private uint regionX;
94 private uint regionY;
95
96 // Login
97 private string firstname;
98 private string lastname;
99
100 // Global Textures
101 private string sunTexture;
102 private string cloudTexture;
103 private string moonTexture;
104
105 // Error Flags
106 private string errorReason;
107 private string errorMessage;
108
109 // Response
110 private XmlRpcResponse xmlRpcResponse;
111 private XmlRpcResponse defaultXmlRpcResponse;
112
113 private string welcomeMessage;
114 private string startLocation;
115 private string allowFirstLife;
116 private string home;
117 private string seedCapability;
118 private string lookAt;
119
120 public LoginResponse()
121 {
122 this.loginFlags = new ArrayList();
123 this.globalTextures = new ArrayList();
124 this.eventCategories = new ArrayList();
125 this.uiConfig = new ArrayList();
126 this.classifiedCategories = new ArrayList();
127
128 this.loginError = new Hashtable();
129 this.eventCategoriesHash = new Hashtable();
130 this.classifiedCategoriesHash = new Hashtable();
131 this.uiConfigHash = new Hashtable();
132
133 this.defaultXmlRpcResponse = new XmlRpcResponse();
134 this.userProfile = new UserProfile();
135 this.inventoryRoot = new ArrayList();
136 this.initialOutfit = new ArrayList();
137 this.agentInventory = new ArrayList();
138
139 this.xmlRpcResponse = new XmlRpcResponse();
140 this.defaultXmlRpcResponse = new XmlRpcResponse();
141
142 this.SetDefaultValues();
143 } // LoginServer
144
145 public void SetDefaultValues()
146 {
147 try
148 {
149 this.DST = "N";
150 this.StipendSinceLogin = "N";
151 this.Gendered = "Y";
152 this.EverLoggedIn = "Y";
153 this.login = "false";
154 this.firstname = "Test";
155 this.lastname = "User";
156 this.agentAccess = "M";
157 this.startLocation = "last";
158 this.allowFirstLife = "Y";
159
160 this.SunTexture = "cce0f112-878f-4586-a2e2-a8f104bba271";
161 this.CloudTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
162 this.MoonTexture = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
163
164 this.ErrorMessage = "You have entered an invalid name/password combination. Check Caps/lock.";
165 this.ErrorReason = "key";
166 this.welcomeMessage = "Welcome to OpenSim!";
167 this.seedCapability = "";
168 this.home = "{'region_handle':[r" + (997 * 256).ToString() + ",r" + (996 * 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() + "]}";
169 this.lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]";
170 this.RegionX = (uint)255232;
171 this.RegionY = (uint)254976;
172
173 // Classifieds;
174 this.AddClassifiedCategory((Int32)1, "Shopping");
175 this.AddClassifiedCategory((Int32)2, "Land Rental");
176 this.AddClassifiedCategory((Int32)3, "Property Rental");
177 this.AddClassifiedCategory((Int32)4, "Special Attraction");
178 this.AddClassifiedCategory((Int32)5, "New Products");
179 this.AddClassifiedCategory((Int32)6, "Employment");
180 this.AddClassifiedCategory((Int32)7, "Wanted");
181 this.AddClassifiedCategory((Int32)8, "Service");
182 this.AddClassifiedCategory((Int32)9, "Personal");
183
184 int SessionRand = Util.RandomClass.Next(1, 999);
185 this.SessionID = new LLUUID("aaaabbbb-0200-" + SessionRand.ToString("0000") + "-8664-58f53e442797");
186 this.SecureSessionID = LLUUID.Random();
187
188 this.userProfile.Inventory.CreateRootFolder(this.userProfile.UUID, true);
189 this.baseFolderID = this.userProfile.Inventory.GetFolderID("Textures");
190 this.inventoryFolderID = this.userProfile.Inventory.GetFolderID("My Inventory-");
191 Hashtable InventoryRootHash = new Hashtable();
192 InventoryRootHash["folder_id"] = this.userProfile.Inventory.InventoryRoot.FolderID.ToStringHyphenated();
193 this.inventoryRoot.Add(InventoryRootHash);
194
195 Hashtable TempHash;
196 foreach (InventoryFolder InvFolder in this.userProfile.Inventory.InventoryFolders.Values)
197 {
198 TempHash = new Hashtable();
199 TempHash["name"] = InvFolder.FolderName;
200 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
201 TempHash["version"] = (Int32)InvFolder.Version;
202 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
203 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
204 this.agentInventory.Add(TempHash);
205 }
206
207 Hashtable InitialOutfitHash = new Hashtable();
208 InitialOutfitHash["folder_name"] = "Nightclub Female";
209 InitialOutfitHash["gender"] = "female";
210 this.initialOutfit.Add(InitialOutfitHash);
211 }
212 catch (Exception e)
213 {
214 OpenSim.Framework.Console.MainConsole.Instance.Warn(
215 "LoginResponse: Unable to set default values: " + e.Message
216 );
217 }
218
219 } // SetDefaultValues
220
221 protected virtual LLUUID GetAgentId()
222 {
223 // todo
224 LLUUID Agent;
225 int AgentRand = Util.RandomClass.Next(1, 9999);
226 Agent = new LLUUID("99998888-0100-" + AgentRand.ToString("0000") + "-8ec1-0b1d5cd6aead");
227 return Agent;
228 } // GetAgentId
229
230 private XmlRpcResponse GenerateFailureResponse(string reason, string message, string login)
231 {
232 // Overwrite any default values;
233 this.xmlRpcResponse = new XmlRpcResponse();
234
235 // Ensure Login Failed message/reason;
236 this.ErrorMessage = message;
237 this.ErrorReason = reason;
238
239 this.loginError["reason"] = this.ErrorReason;
240 this.loginError["message"] = this.ErrorMessage;
241 this.loginError["login"] = login;
242 this.xmlRpcResponse.Value = this.loginError;
243 return (this.xmlRpcResponse);
244 } // GenerateResponse
245
246 public XmlRpcResponse LoginFailedResponse()
247 {
248 return (this.GenerateFailureResponse("key", "You have entered an invalid name/password combination. Check Caps/lock.", "false"));
249 } // LoginFailedResponse
250
251 public XmlRpcResponse ConnectionFailedResponse()
252 {
253 return (this.LoginFailedResponse());
254 } // CreateErrorConnectingToGridResponse()
255
256 public XmlRpcResponse CreateAlreadyLoggedInResponse()
257 {
258 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"));
259 } // CreateAlreadyLoggedInResponse()
260
261 public XmlRpcResponse ToXmlRpcResponse()
262 {
263 try
264 {
265
266 Hashtable responseData = new Hashtable();
267
268 this.loginFlagsHash = new Hashtable();
269 this.loginFlagsHash["daylight_savings"] = this.DST;
270 this.loginFlagsHash["stipend_since_login"] = this.StipendSinceLogin;
271 this.loginFlagsHash["gendered"] = this.Gendered;
272 this.loginFlagsHash["ever_logged_in"] = this.EverLoggedIn;
273 this.loginFlags.Add(this.loginFlagsHash);
274
275 responseData["first_name"] = this.Firstname;
276 responseData["last_name"] = this.Lastname;
277 responseData["agent_access"] = this.agentAccess;
278
279 this.globalTexturesHash = new Hashtable();
280 this.globalTexturesHash["sun_texture_id"] = this.SunTexture;
281 this.globalTexturesHash["cloud_texture_id"] = this.CloudTexture;
282 this.globalTexturesHash["moon_texture_id"] = this.MoonTexture;
283 this.globalTextures.Add(this.globalTexturesHash);
284 this.eventCategories.Add(this.eventCategoriesHash);
285
286 this.AddToUIConfig("allow_first_life", this.allowFirstLife);
287 this.uiConfig.Add(this.uiConfigHash);
288
289 // Create a agent and session LLUUID
290 this.agentID = this.GetAgentId();
291
292 responseData["sim_port"] = this.SimPort;
293 responseData["sim_ip"] = this.SimAddress;
294 responseData["agent_id"] = this.AgentID.ToStringHyphenated();
295 responseData["session_id"] = this.SessionID.ToStringHyphenated();
296 responseData["secure_session_id"] = this.SecureSessionID.ToStringHyphenated();
297 responseData["circuit_code"] = this.CircuitCode;
298 responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
299 responseData["login-flags"] = this.loginFlags;
300 responseData["global-textures"] = this.globalTextures;
301 responseData["seed_capability"] = this.seedCapability;
302
303 responseData["event_categories"] = this.eventCategories;
304 responseData["event_notifications"] = new ArrayList(); // todo
305 responseData["classified_categories"] = this.classifiedCategories;
306 responseData["ui-config"] = this.uiConfig;
307
308 responseData["inventory-skeleton"] = this.agentInventory;
309 responseData["inventory-skel-lib"] = new ArrayList(); // todo
310 responseData["inventory-root"] = this.inventoryRoot;
311 responseData["gestures"] = new ArrayList(); // todo
312 responseData["inventory-lib-owner"] = new ArrayList(); // todo
313 responseData["initial-outfit"] = this.initialOutfit;
314 responseData["start_location"] = this.startLocation;
315 responseData["seed_capability"] = this.seedCapability;
316 responseData["home"] = this.home;
317 responseData["look_at"] = this.lookAt;
318 responseData["message"] = this.welcomeMessage;
319 responseData["region_x"] = (Int32)this.RegionX * 256;
320 responseData["region_y"] = (Int32)this.RegionY * 256;
321
322 responseData["login"] = "true";
323 this.xmlRpcResponse.Value = responseData;
324
325 return (this.xmlRpcResponse);
326 }
327 catch (Exception e)
328 {
329 OpenSim.Framework.Console.MainConsole.Instance.Error(
330 "LoginResponse: Error creating XML-RPC Response: " + e.Message
331 );
332 return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false"));
333
334 }
335
336 } // ToXmlRpcResponse
337
338 public void SetEventCategories(string category, string value)
339 {
340 this.eventCategoriesHash[category] = value;
341 } // SetEventCategories
342
343 public void AddToUIConfig(string itemName, string item)
344 {
345 this.uiConfigHash[itemName] = item;
346 } // SetUIConfig
347
348 public void AddClassifiedCategory(Int32 ID, string categoryName)
349 {
350 this.classifiedCategoriesHash["category_name"] = categoryName;
351 this.classifiedCategoriesHash["category_id"] = ID;
352 this.classifiedCategories.Add(this.classifiedCategoriesHash);
353 // this.classifiedCategoriesHash.Clear();
354 } // SetClassifiedCategory
355
356 public string Login
357 {
358 get
359 {
360 return this.login;
361 }
362 set
363 {
364 this.login = value;
365 }
366 } // Login
367
368 public string DST
369 {
370 get
371 {
372 return this.dst;
373 }
374 set
375 {
376 this.dst = value;
377 }
378 } // DST
379
380 public string StipendSinceLogin
381 {
382 get
383 {
384 return this.stipendSinceLogin;
385 }
386 set
387 {
388 this.stipendSinceLogin = value;
389 }
390 } // StipendSinceLogin
391
392 public string Gendered
393 {
394 get
395 {
396 return this.gendered;
397 }
398 set
399 {
400 this.gendered = value;
401 }
402 } // Gendered
403
404 public string EverLoggedIn
405 {
406 get
407 {
408 return this.everLoggedIn;
409 }
410 set
411 {
412 this.everLoggedIn = value;
413 }
414 } // EverLoggedIn
415
416 public string SimPort
417 {
418 get
419 {
420 return this.simPort;
421 }
422 set
423 {
424 this.simPort = value;
425 }
426 } // SimPort
427
428 public string SimAddress
429 {
430 get
431 {
432 return this.simAddress;
433 }
434 set
435 {
436 this.simAddress = value;
437 }
438 } // SimAddress
439
440 public LLUUID AgentID
441 {
442 get
443 {
444 return this.agentID;
445 }
446 set
447 {
448 this.agentID = value;
449 }
450 } // AgentID
451
452 public LLUUID SessionID
453 {
454 get
455 {
456 return this.sessionID;
457 }
458 set
459 {
460 this.sessionID = value;
461 }
462 } // SessionID
463
464 public LLUUID SecureSessionID
465 {
466 get
467 {
468 return this.secureSessionID;
469 }
470 set
471 {
472 this.secureSessionID = value;
473 }
474 } // SecureSessionID
475
476 public LLUUID BaseFolderID
477 {
478 get
479 {
480 return this.baseFolderID;
481 }
482 set
483 {
484 this.baseFolderID = value;
485 }
486 } // BaseFolderID
487
488 public LLUUID InventoryFolderID
489 {
490 get
491 {
492 return this.inventoryFolderID;
493 }
494 set
495 {
496 this.inventoryFolderID = value;
497 }
498 } // InventoryFolderID
499
500 public Int32 CircuitCode
501 {
502 get
503 {
504 return this.circuitCode;
505 }
506 set
507 {
508 this.circuitCode = value;
509 }
510 } // CircuitCode
511
512 public uint RegionX
513 {
514 get
515 {
516 return this.regionX;
517 }
518 set
519 {
520 this.regionX = value;
521 }
522 } // RegionX
523
524 public uint RegionY
525 {
526 get
527 {
528 return this.regionY;
529 }
530 set
531 {
532 this.regionY = value;
533 }
534 } // RegionY
535
536 public string SunTexture
537 {
538 get
539 {
540 return this.sunTexture;
541 }
542 set
543 {
544 this.sunTexture = value;
545 }
546 } // SunTexture
547
548 public string CloudTexture
549 {
550 get
551 {
552 return this.cloudTexture;
553 }
554 set
555 {
556 this.cloudTexture = value;
557 }
558 } // CloudTexture
559
560 public string MoonTexture
561 {
562 get
563 {
564 return this.moonTexture;
565 }
566 set
567 {
568 this.moonTexture = value;
569 }
570 } // MoonTexture
571
572 public string Firstname
573 {
574 get
575 {
576 return this.firstname;
577 }
578 set
579 {
580 this.firstname = value;
581 }
582 } // Firstname
583
584 public string Lastname
585 {
586 get
587 {
588 return this.lastname;
589 }
590 set
591 {
592 this.lastname = value;
593 }
594 } // Lastname
595
596 public string AgentAccess
597 {
598 get
599 {
600 return this.agentAccess;
601 }
602 set
603 {
604 this.agentAccess = value;
605 }
606 }
607
608 public string StartLocation
609 {
610 get
611 {
612 return this.startLocation;
613 }
614 set
615 {
616 this.startLocation = value;
617 }
618 } // StartLocation
619
620 public string LookAt
621 {
622 get
623 {
624 return this.lookAt;
625 }
626 set
627 {
628 this.lookAt = value;
629 }
630 }
631
632 public string SeedCapability
633 {
634 get
635 {
636 return this.seedCapability;
637 }
638 set
639 {
640 this.seedCapability = value;
641 }
642 } // SeedCapability
643
644 public string ErrorReason
645 {
646 get
647 {
648 return this.errorReason;
649 }
650 set
651 {
652 this.errorReason = value;
653 }
654 } // ErrorReason
655
656 public string ErrorMessage
657 {
658 get
659 {
660 return this.errorMessage;
661 }
662 set
663 {
664 this.errorMessage = value;
665 }
666 } // ErrorMessage
667
668 } // LoginResponse
669} // namespace OpenSim.UserServer \ No newline at end of file
diff --git a/Common/OpenSim.Servers/LoginServer.cs b/Common/OpenSim.Servers/LoginServer.cs
deleted file mode 100644
index 4f4d76f..0000000
--- a/Common/OpenSim.Servers/LoginServer.cs
+++ /dev/null
@@ -1,296 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using Nwc.XmlRpc;
30using System;
31using System.IO;
32using System.Net;
33using System.Net.Sockets;
34using System.Text;
35using System.Text.RegularExpressions;
36using System.Threading;
37using System.Collections;
38using System.Security.Cryptography;
39using System.Xml;
40using libsecondlife;
41using OpenSim;
42using OpenSim.Framework.Interfaces;
43using OpenSim.Framework.Grid;
44using OpenSim.Framework.Inventory;
45using OpenSim.Framework.User;
46using OpenSim.Framework.Utilities;
47using OpenSim.Framework.Types;
48
49namespace OpenSim.UserServer
50{
51 public delegate void AddNewSessionHandler(Login loginData);
52 /// <summary>
53 /// When running in local (default) mode , handles client logins.
54 /// </summary>
55 public class LoginServer : LoginService, IUserServer
56 {
57 private IGridServer m_gridServer;
58 public IPAddress clientAddress = IPAddress.Loopback;
59 public IPAddress remoteAddress = IPAddress.Any;
60 private int NumClients;
61 private bool userAccounts = false;
62 private string _mpasswd;
63 private bool _needPasswd = false;
64 private LocalUserProfileManager userManager;
65 private int m_simPort;
66 private string m_simAddr;
67 private uint regionX;
68 private uint regionY;
69 private AddNewSessionHandler AddSession;
70
71 public LocalUserProfileManager LocalUserManager
72 {
73 get
74 {
75 return userManager;
76 }
77 }
78
79 public LoginServer( string simAddr, int simPort, uint regX, uint regY, bool useAccounts)
80 {
81 m_simPort = simPort;
82 m_simAddr = simAddr;
83 regionX = regX;
84 regionY = regY;
85 this.userAccounts = useAccounts;
86 }
87
88 public void SetSessionHandler(AddNewSessionHandler sessionHandler)
89 {
90 this.AddSession = sessionHandler;
91 this.userManager.SetSessionHandler(sessionHandler);
92 }
93
94 public void Startup()
95 {
96 this._needPasswd = false;
97
98 this._mpasswd = EncodePassword("testpass");
99
100 userManager = new LocalUserProfileManager(this.m_gridServer, m_simPort, m_simAddr, regionX, regionY);
101 userManager.InitUserProfiles();
102 userManager.SetKeys("", "", "", "Welcome to OpenSim");
103 }
104
105 public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
106 {
107 Console.WriteLine("login attempt");
108 Hashtable requestData = (Hashtable)request.Params[0];
109 string first;
110 string last;
111 string passwd;
112
113 LoginResponse loginResponse = new LoginResponse();
114 loginResponse.RegionX = regionX;
115 loginResponse.RegionY = regionY;
116
117 //get login name
118 if (requestData.Contains("first"))
119 {
120 first = (string)requestData["first"];
121 }
122 else
123 {
124 first = "test";
125 }
126
127 if (requestData.Contains("last"))
128 {
129 last = (string)requestData["last"];
130 }
131 else
132 {
133 last = "User" + NumClients.ToString();
134 }
135
136 if (requestData.Contains("passwd"))
137 {
138 passwd = (string)requestData["passwd"];
139 }
140 else
141 {
142 passwd = "notfound";
143 }
144
145 if (!Authenticate(first, last, passwd))
146 {
147 return loginResponse.LoginFailedResponse();
148 }
149
150 NumClients++;
151
152 // Create a agent and session LLUUID
153 // Agent = GetAgentId(first, last);
154 // int SessionRand = Util.RandomClass.Next(1, 999);
155 // Session = new LLUUID("aaaabbbb-0200-" + SessionRand.ToString("0000") + "-8664-58f53e442797");
156 // LLUUID secureSess = LLUUID.Random();
157
158 loginResponse.SimPort = m_simPort.ToString();
159 // 7 June 2007, AJD:
160 // [10:03:05] (@AdamZaius) Sandbox should work listening on 0.0.0.0 if you can fix the login XML reply
161 // OLD: loginResponse.SimAddress = m_simAddr.ToString();
162 loginResponse.SimAddress = "0.0.0.0";
163
164 // loginResponse.AgentID = Agent.ToStringHyphenated();
165 // loginResponse.SessionID = Session.ToStringHyphenated();
166 // loginResponse.SecureSessionID = secureSess.ToStringHyphenated();
167 loginResponse.CircuitCode = (Int32)(Util.RandomClass.Next());
168 XmlRpcResponse response = loginResponse.ToXmlRpcResponse();
169 Hashtable responseData = (Hashtable)response.Value;
170
171 //inventory
172 /* ArrayList InventoryList = (ArrayList)responseData["inventory-skeleton"];
173 Hashtable Inventory1 = (Hashtable)InventoryList[0];
174 Hashtable Inventory2 = (Hashtable)InventoryList[1];
175 LLUUID BaseFolderID = LLUUID.Random();
176 LLUUID InventoryFolderID = LLUUID.Random();
177 Inventory2["name"] = "Textures";
178 Inventory2["folder_id"] = BaseFolderID.ToStringHyphenated();
179 Inventory2["type_default"] = 0;
180 Inventory1["folder_id"] = InventoryFolderID.ToStringHyphenated();
181
182 ArrayList InventoryRoot = (ArrayList)responseData["inventory-root"];
183 Hashtable Inventoryroot = (Hashtable)InventoryRoot[0];
184 Inventoryroot["folder_id"] = InventoryFolderID.ToStringHyphenated();
185 */
186 CustomiseLoginResponse(responseData, first, last);
187
188 Login _login = new Login();
189 //copy data to login object
190 _login.First = first;
191 _login.Last = last;
192 _login.Agent = loginResponse.AgentID;
193 _login.Session = loginResponse.SessionID;
194 _login.SecureSession = loginResponse.SecureSessionID;
195 _login.CircuitCode = (uint) loginResponse.CircuitCode;
196 _login.BaseFolder = loginResponse.BaseFolderID;
197 _login.InventoryFolder = loginResponse.InventoryFolderID;
198
199 //working on local computer if so lets add to the gridserver's list of sessions?
200 /* if (m_gridServer.GetName() == "Local")
201 {
202 ((LocalGridBase)m_gridServer).AddNewSession(_login);
203 }*/
204 AddSession(_login);
205
206 return response;
207 }
208
209 protected virtual void CustomiseLoginResponse(Hashtable responseData, string first, string last)
210 {
211 }
212
213 protected virtual LLUUID GetAgentId(string firstName, string lastName)
214 {
215 LLUUID Agent;
216 int AgentRand = Util.RandomClass.Next(1, 9999);
217 Agent = new LLUUID("99998888-0100-" + AgentRand.ToString("0000") + "-8ec1-0b1d5cd6aead");
218 return Agent;
219 }
220
221 protected virtual bool Authenticate(string first, string last, string passwd)
222 {
223 if (this._needPasswd)
224 {
225 //every user needs the password to login
226 string encodedPass = passwd.Remove(0, 3); //remove $1$
227 if (encodedPass == this._mpasswd)
228 {
229 return true;
230 }
231 else
232 {
233 return false;
234 }
235 }
236 else
237 {
238 //do not need password to login
239 return true;
240 }
241 }
242
243 private static string EncodePassword(string passwd)
244 {
245 Byte[] originalBytes;
246 Byte[] encodedBytes;
247 MD5 md5;
248
249 md5 = new MD5CryptoServiceProvider();
250 originalBytes = ASCIIEncoding.Default.GetBytes(passwd);
251 encodedBytes = md5.ComputeHash(originalBytes);
252
253 return Regex.Replace(BitConverter.ToString(encodedBytes), "-", "").ToLower();
254 }
255
256 public bool CreateUserAccount(string firstName, string lastName, string password)
257 {
258 Console.WriteLine("creating new user account");
259 string mdPassword = EncodePassword(password);
260 Console.WriteLine("with password: " + mdPassword);
261 this.userManager.CreateNewProfile(firstName, lastName, mdPassword);
262
263 return true;
264 }
265
266 public UserProfile GetProfileByName(string firstName, string lastName)
267 {
268 return this.userManager.GetProfileByName(firstName, lastName);
269 }
270
271
272 //IUserServer implementation
273 public AgentInventory RequestAgentsInventory(LLUUID agentID)
274 {
275 AgentInventory aInventory = null;
276 if (this.userAccounts)
277 {
278 aInventory = this.userManager.GetUsersInventory(agentID);
279 }
280
281 return aInventory;
282 }
283
284 public bool UpdateAgentsInventory(LLUUID agentID, AgentInventory inventory)
285 {
286 return true;
287 }
288
289 public void SetServerInfo(string ServerUrl, string SendKey, string RecvKey)
290 {
291
292 }
293 }
294
295
296}
diff --git a/Common/OpenSim.Servers/OpenSim.Servers.csproj b/Common/OpenSim.Servers/OpenSim.Servers.csproj
deleted file mode 100644
index 7a99206..0000000
--- a/Common/OpenSim.Servers/OpenSim.Servers.csproj
+++ /dev/null
@@ -1,133 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{8BB20F0A-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.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.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 </ItemGroup>
74 <ItemGroup>
75 <ProjectReference Include="..\OpenSim.Framework\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="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
82 <Name>OpenSim.Framework.Console</Name>
83 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
84 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
85 <Private>False</Private>
86 </ProjectReference>
87 <ProjectReference Include="..\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>
94 <ItemGroup>
95 <Compile Include="BaseHttpServer.cs">
96 <SubType>Code</SubType>
97 </Compile>
98 <Compile Include="BaseServer.cs">
99 <SubType>Code</SubType>
100 </Compile>
101 <Compile Include="CheckSumServer.cs">
102 <SubType>Code</SubType>
103 </Compile>
104 <Compile Include="IRestHandler.cs">
105 <SubType>Code</SubType>
106 </Compile>
107 <Compile Include="LocalUserProfileManager.cs">
108 <SubType>Code</SubType>
109 </Compile>
110 <Compile Include="LoginResponse.cs">
111 <SubType>Code</SubType>
112 </Compile>
113 <Compile Include="LoginServer.cs">
114 <SubType>Code</SubType>
115 </Compile>
116 <Compile Include="SocketRegistry.cs">
117 <SubType>Code</SubType>
118 </Compile>
119 <Compile Include="UDPServerBase.cs">
120 <SubType>Code</SubType>
121 </Compile>
122 <Compile Include="XmlRpcMethod.cs">
123 <SubType>Code</SubType>
124 </Compile>
125 </ItemGroup>
126 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
127 <PropertyGroup>
128 <PreBuildEvent>
129 </PreBuildEvent>
130 <PostBuildEvent>
131 </PostBuildEvent>
132 </PropertyGroup>
133</Project>
diff --git a/Common/OpenSim.Servers/OpenSim.Servers.dll.build b/Common/OpenSim.Servers/OpenSim.Servers.dll.build
deleted file mode 100644
index 6147ea7..0000000
--- a/Common/OpenSim.Servers/OpenSim.Servers.dll.build
+++ /dev/null
@@ -1,53 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Servers" 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.Servers" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="BaseHttpServer.cs" />
15 <include name="BaseServer.cs" />
16 <include name="CheckSumServer.cs" />
17 <include name="IRestHandler.cs" />
18 <include name="LocalUserProfileManager.cs" />
19 <include name="LoginResponse.cs" />
20 <include name="LoginServer.cs" />
21 <include name="SocketRegistry.cs" />
22 <include name="UDPServerBase.cs" />
23 <include name="XmlRpcMethod.cs" />
24 </sources>
25 <references basedir="${project::get-base-directory()}">
26 <lib>
27 <include name="${project::get-base-directory()}" />
28 <include name="${project::get-base-directory()}/${build.dir}" />
29 </lib>
30 <include name="../../bin/libsecondlife.dll" />
31 <include name="../../bin/OpenSim.Framework.dll" />
32 <include name="../../bin/OpenSim.Framework.Console.dll" />
33 <include name="System.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/Common/OpenSim.Servers/SocketRegistry.cs b/Common/OpenSim.Servers/SocketRegistry.cs
deleted file mode 100644
index 2ebf80c..0000000
--- a/Common/OpenSim.Servers/SocketRegistry.cs
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * Created by SharpDevelop.
3 * User: Adam Stevenson
4 * Date: 6/13/2007
5 * Time: 12:55 AM
6 *
7 * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 */
9
10using System;
11using System.Collections.Generic;
12using System.Net;
13using System.Net.Sockets;
14
15namespace OpenSim.Servers
16{
17 /// <summary>
18 ///
19 /// </summary>
20 public class SocketRegistry
21 {
22 static List<Socket> _Sockets;
23
24 static SocketRegistry()
25 {
26 _Sockets = new List<Socket>();
27 }
28
29 private SocketRegistry()
30 {
31
32 }
33
34 public static void Register(Socket pSocket)
35 {
36 _Sockets.Add(pSocket);
37 }
38
39 public static void Unregister(Socket pSocket)
40 {
41 _Sockets.Remove(pSocket);
42 }
43
44 public static void UnregisterAllAndClose()
45 {
46 int iSockets = _Sockets.Count;
47
48 for (int i = 0; i < iSockets; i++)
49 {
50 try
51 {
52 _Sockets[i].Close();
53 }
54 catch
55 {
56
57 }
58 }
59
60 _Sockets.Clear();
61 }
62 }
63}
diff --git a/Common/OpenSim.Servers/UDPServerBase.cs b/Common/OpenSim.Servers/UDPServerBase.cs
deleted file mode 100644
index b763315..0000000
--- a/Common/OpenSim.Servers/UDPServerBase.cs
+++ /dev/null
@@ -1,103 +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.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.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
82 /// Add this new socket to the list of sockets that was opened by the application. When the application
83 /// closes, either gracefully or not, all sockets can be cleaned up. Right now I am not aware of any method
84 /// to get all of the sockets for a process within .NET, but if so, this process can be refactored, as
85 /// socket registration would not be neccessary.
86 SocketRegistry.Register(Server);
87
88 Server.Bind(ServerIncoming);
89
90 ipeSender = new IPEndPoint(IPAddress.Any, 0);
91 epSender = (EndPoint)ipeSender;
92 ReceivedData = new AsyncCallback(this.OnReceivedData);
93 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
94 }
95
96 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)
97 {
98
99 }
100 }
101}
102
103
diff --git a/Common/OpenSim.Servers/XmlRpcMethod.cs b/Common/OpenSim.Servers/XmlRpcMethod.cs
deleted file mode 100644
index 05cbf2e..0000000
--- a/Common/OpenSim.Servers/XmlRpcMethod.cs
+++ /dev/null
@@ -1,34 +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 Nwc.XmlRpc;
30
31namespace OpenSim.Servers
32{
33 public delegate XmlRpcResponse XmlRpcMethod( XmlRpcRequest request );
34}
diff --git a/Common/XmlRpcCS/Logger.cs b/Common/XmlRpcCS/Logger.cs
deleted file mode 100644
index ebf804b..0000000
--- a/Common/XmlRpcCS/Logger.cs
+++ /dev/null
@@ -1,46 +0,0 @@
1namespace Nwc.XmlRpc
2{
3 using System;
4
5 /// <summary>Define levels of logging.</summary><remarks> This duplicates
6 /// similar enumerations in System.Diagnostics.EventLogEntryType. The
7 /// duplication was merited because .NET Compact Framework lacked the EventLogEntryType enum.</remarks>
8 public enum LogLevel
9 {
10 /// <summary>Information level, log entry for informational reasons only.</summary>
11 Information,
12 /// <summary>Warning level, indicates a possible problem.</summary>
13 Warning,
14 /// <summary>Error level, implies a significant problem.</summary>
15 Error
16 }
17
18 ///<summary>
19 ///Logging singleton with swappable output delegate.
20 ///</summary>
21 ///<remarks>
22 ///This singleton provides a centralized log. The actual WriteEntry calls are passed
23 ///off to a delegate however. Having a delegate do the actual logginh allows you to
24 ///implement different logging mechanism and have them take effect throughout the system.
25 ///</remarks>
26 public class Logger
27 {
28 ///<summary>Delegate definition for logging.</summary>
29 ///<param name="message">The message <c>String</c> to log.</param>
30 ///<param name="level">The <c>LogLevel</c> of your message.</param>
31 public delegate void LoggerDelegate(String message, LogLevel level);
32 ///<summary>The LoggerDelegate that will recieve WriteEntry requests.</summary>
33 static public LoggerDelegate Delegate = null;
34
35 ///<summary>
36 ///Method logging events are sent to.
37 ///</summary>
38 ///<param name="message">The message <c>String</c> to log.</param>
39 ///<param name="level">The <c>LogLevel</c> of your message.</param>
40 static public void WriteEntry(String message, LogLevel level)
41 {
42 if (Delegate != null)
43 Delegate(message, level);
44 }
45 }
46}
diff --git a/Common/XmlRpcCS/SimpleHttpRequest.cs b/Common/XmlRpcCS/SimpleHttpRequest.cs
deleted file mode 100644
index b331ce0..0000000
--- a/Common/XmlRpcCS/SimpleHttpRequest.cs
+++ /dev/null
@@ -1,234 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.IO;
32 using System.Net.Sockets;
33 using System.Collections;
34 using System.Text;
35
36 ///<summary>Very basic HTTP request handler.</summary>
37 ///<remarks>This class is designed to accept a TcpClient and treat it as an HTTP request.
38 /// It will do some basic header parsing and manage the input and output streams associated
39 /// with the request.</remarks>
40 public class SimpleHttpRequest
41 {
42 private String _httpMethod = null;
43 private String _protocol;
44 private String _filePathFile = null;
45 private String _filePathDir = null;
46 private String __filePath;
47 private TcpClient _client;
48 private StreamReader _input;
49 private StreamWriter _output;
50 private Hashtable _headers;
51
52 /// <summary>A constructor which accepts the TcpClient.</summary>
53 /// <remarks>It creates the associated input and output streams, determines the request type,
54 /// and parses the remaining HTTP header.</remarks>
55 /// <param name="client">The <c>TcpClient</c> associated with the HTTP connection.</param>
56 public SimpleHttpRequest(TcpClient client)
57 {
58 _client = client;
59
60 _output = new StreamWriter(client.GetStream() );
61 _input = new StreamReader(client.GetStream() );
62
63 GetRequestMethod();
64 GetRequestHeaders();
65 }
66
67 /// <summary>The output <c>StreamWriter</c> associated with the request.</summary>
68 public StreamWriter Output
69 {
70 get { return _output; }
71 }
72
73 /// <summary>The input <c>StreamReader</c> associated with the request.</summary>
74 public StreamReader Input
75 {
76 get { return _input; }
77 }
78
79 /// <summary>The <c>TcpClient</c> with the request.</summary>
80 public TcpClient Client
81 {
82 get { return _client; }
83 }
84
85 private String _filePath
86 {
87 get { return __filePath; }
88 set
89 {
90 __filePath = value;
91 _filePathDir = null;
92 _filePathFile = null;
93 }
94 }
95
96 /// <summary>The type of HTTP request (i.e. PUT, GET, etc.).</summary>
97 public String HttpMethod
98 {
99 get { return _httpMethod; }
100 }
101
102 /// <summary>The level of the HTTP protocol.</summary>
103 public String Protocol
104 {
105 get { return _protocol; }
106 }
107
108 /// <summary>The "path" which is part of any HTTP request.</summary>
109 public String FilePath
110 {
111 get { return _filePath; }
112 }
113
114 /// <summary>The file portion of the "path" which is part of any HTTP request.</summary>
115 public String FilePathFile
116 {
117 get
118 {
119 if (_filePathFile != null)
120 return _filePathFile;
121
122 int i = FilePath.LastIndexOf("/");
123
124 if (i == -1)
125 return "";
126
127 i++;
128 _filePathFile = FilePath.Substring(i, FilePath.Length - i);
129 return _filePathFile;
130 }
131 }
132
133 /// <summary>The directory portion of the "path" which is part of any HTTP request.</summary>
134 public String FilePathDir
135 {
136 get
137 {
138 if (_filePathDir != null)
139 return _filePathDir;
140
141 int i = FilePath.LastIndexOf("/");
142
143 if (i == -1)
144 return "";
145
146 i++;
147 _filePathDir = FilePath.Substring(0, i);
148 return _filePathDir;
149 }
150 }
151
152 private void GetRequestMethod()
153 {
154 string req = _input.ReadLine();
155 if (req == null)
156 throw new ApplicationException("Void request.");
157
158 if (0 == String.Compare("GET ", req.Substring(0, 4), true))
159 _httpMethod = "GET";
160 else if (0 == String.Compare("POST ", req.Substring(0, 5), true))
161 _httpMethod = "POST";
162 else
163 throw new InvalidOperationException("Unrecognized method in query: " + req);
164
165 req = req.TrimEnd();
166 int idx = req.IndexOf(' ') + 1;
167 if (idx >= req.Length)
168 throw new ApplicationException("What do you want?");
169
170 string page_protocol = req.Substring(idx);
171 int idx2 = page_protocol.IndexOf(' ');
172 if (idx2 == -1)
173 idx2 = page_protocol.Length;
174
175 _filePath = page_protocol.Substring(0, idx2).Trim();
176 _protocol = page_protocol.Substring(idx2).Trim();
177 }
178
179 private void GetRequestHeaders()
180 {
181 String line;
182 int idx;
183
184 _headers = new Hashtable();
185
186 while ((line = _input.ReadLine()) != "")
187 {
188 if (line == null)
189 {
190 break;
191 }
192
193 idx = line.IndexOf(':');
194 if (idx == -1 || idx == line.Length - 1)
195 {
196 Logger.WriteEntry("Malformed header line: " + line, LogLevel.Information);
197 continue;
198 }
199
200 String key = line.Substring(0, idx);
201 String value = line.Substring(idx + 1);
202
203 try
204 {
205 _headers.Add(key, value);
206 }
207 catch (Exception)
208 {
209 Logger.WriteEntry("Duplicate header key in line: " + line, LogLevel.Information);
210 }
211 }
212 }
213
214 /// <summary>
215 /// Format the object contents into a useful string representation.
216 /// </summary>
217 ///<returns><c>String</c> representation of the <c>SimpleHttpRequest</c> as the <i>HttpMethod FilePath Protocol</i>.</returns>
218 override public String ToString()
219 {
220 return HttpMethod + " " + FilePath + " " + Protocol;
221 }
222
223 /// <summary>
224 /// Close the <c>SimpleHttpRequest</c>. This flushes and closes all associated io streams.
225 /// </summary>
226 public void Close()
227 {
228 _output.Flush();
229 _output.Close();
230 _input.Close();
231 _client.Close();
232 }
233 }
234}
diff --git a/Common/XmlRpcCS/XMLRPC.csproj b/Common/XmlRpcCS/XMLRPC.csproj
deleted file mode 100644
index 61f8be0..0000000
--- a/Common/XmlRpcCS/XMLRPC.csproj
+++ /dev/null
@@ -1,138 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{8E81D43C-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>XMLRPC</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>XMLRPC</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 </ItemGroup>
72 <ItemGroup>
73 <Compile Include="Logger.cs">
74 <SubType>Code</SubType>
75 </Compile>
76 <Compile Include="SimpleHttpRequest.cs">
77 <SubType>Code</SubType>
78 </Compile>
79 <Compile Include="XmlRpcBoxcarRequest.cs">
80 <SubType>Code</SubType>
81 </Compile>
82 <Compile Include="XmlRpcClientProxy.cs">
83 <SubType>Code</SubType>
84 </Compile>
85 <Compile Include="XmlRpcDeserializer.cs">
86 <SubType>Code</SubType>
87 </Compile>
88 <Compile Include="XmlRpcErrorCodes.cs">
89 <SubType>Code</SubType>
90 </Compile>
91 <Compile Include="XmlRpcException.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="XmlRpcExposedAttribute.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="XmlRpcRequest.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 <Compile Include="XmlRpcRequestDeserializer.cs">
101 <SubType>Code</SubType>
102 </Compile>
103 <Compile Include="XmlRpcRequestSerializer.cs">
104 <SubType>Code</SubType>
105 </Compile>
106 <Compile Include="XmlRpcResponder.cs">
107 <SubType>Code</SubType>
108 </Compile>
109 <Compile Include="XmlRpcResponse.cs">
110 <SubType>Code</SubType>
111 </Compile>
112 <Compile Include="XmlRpcResponseDeserializer.cs">
113 <SubType>Code</SubType>
114 </Compile>
115 <Compile Include="XmlRpcResponseSerializer.cs">
116 <SubType>Code</SubType>
117 </Compile>
118 <Compile Include="XmlRpcSerializer.cs">
119 <SubType>Code</SubType>
120 </Compile>
121 <Compile Include="XmlRpcServer.cs">
122 <SubType>Code</SubType>
123 </Compile>
124 <Compile Include="XmlRpcSystemObject.cs">
125 <SubType>Code</SubType>
126 </Compile>
127 <Compile Include="XmlRpcXmlTokens.cs">
128 <SubType>Code</SubType>
129 </Compile>
130 </ItemGroup>
131 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
132 <PropertyGroup>
133 <PreBuildEvent>
134 </PreBuildEvent>
135 <PostBuildEvent>
136 </PostBuildEvent>
137 </PropertyGroup>
138</Project>
diff --git a/Common/XmlRpcCS/XMLRPC.dll.build b/Common/XmlRpcCS/XMLRPC.dll.build
deleted file mode 100644
index 2eabfcd..0000000
--- a/Common/XmlRpcCS/XMLRPC.dll.build
+++ /dev/null
@@ -1,58 +0,0 @@
1<?xml version="1.0" ?>
2<project name="XMLRPC" 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="XMLRPC" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="Logger.cs" />
15 <include name="SimpleHttpRequest.cs" />
16 <include name="XmlRpcBoxcarRequest.cs" />
17 <include name="XmlRpcClientProxy.cs" />
18 <include name="XmlRpcDeserializer.cs" />
19 <include name="XmlRpcErrorCodes.cs" />
20 <include name="XmlRpcException.cs" />
21 <include name="XmlRpcExposedAttribute.cs" />
22 <include name="XmlRpcRequest.cs" />
23 <include name="XmlRpcRequestDeserializer.cs" />
24 <include name="XmlRpcRequestSerializer.cs" />
25 <include name="XmlRpcResponder.cs" />
26 <include name="XmlRpcResponse.cs" />
27 <include name="XmlRpcResponseDeserializer.cs" />
28 <include name="XmlRpcResponseSerializer.cs" />
29 <include name="XmlRpcSerializer.cs" />
30 <include name="XmlRpcServer.cs" />
31 <include name="XmlRpcSystemObject.cs" />
32 <include name="XmlRpcXmlTokens.cs" />
33 </sources>
34 <references basedir="${project::get-base-directory()}">
35 <lib>
36 <include name="${project::get-base-directory()}" />
37 <include name="${project::get-base-directory()}/${build.dir}" />
38 </lib>
39 <include name="System.dll" />
40 <include name="System.Xml.dll" />
41 </references>
42 </csc>
43 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
44 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
45 <copy todir="${project::get-base-directory()}/../../bin/">
46 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
47 <include name="*.dll"/>
48 <include name="*.exe"/>
49 </fileset>
50 </copy>
51 </target>
52 <target name="clean">
53 <delete dir="${bin.dir}" failonerror="false" />
54 <delete dir="${obj.dir}" failonerror="false" />
55 </target>
56 <target name="doc" description="Creates documentation.">
57 </target>
58</project>
diff --git a/Common/XmlRpcCS/XmlRpcBoxcarRequest.cs b/Common/XmlRpcCS/XmlRpcBoxcarRequest.cs
deleted file mode 100644
index 064c165..0000000
--- a/Common/XmlRpcCS/XmlRpcBoxcarRequest.cs
+++ /dev/null
@@ -1,78 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.IO;
33 using System.Xml;
34 using System.Net;
35 using System.Text;
36 using System.Reflection;
37
38 /// <summary>Class that collects individual <c>XmlRpcRequest</c> objects and submits them as a <i>boxcarred</i> request.</summary>
39 /// <remarks>A boxcared request is when a number of request are collected before being sent via XML-RPC, and then are sent via
40 /// a single HTTP connection. This results in a speed up from reduced connection time. The results are then retuned collectively
41 /// as well.
42 ///</remarks>
43 /// <seealso cref="XmlRpcRequest"/>
44 public class XmlRpcBoxcarRequest : XmlRpcRequest
45 {
46 /// <summary>ArrayList to collect the requests to boxcar.</summary>
47 public IList Requests = new ArrayList();
48
49 /// <summary>Basic constructor.</summary>
50 public XmlRpcBoxcarRequest()
51 {
52 }
53
54 /// <summary>Returns the <c>String</c> "system.multiCall" which is the server method that handles boxcars.</summary>
55 public override String MethodName
56 {
57 get { return "system.multiCall"; }
58 }
59
60 /// <summary>The <c>ArrayList</c> of boxcarred <paramref>Requests</paramref> as properly formed parameters.</summary>
61 public override IList Params
62 {
63 get {
64 _params.Clear();
65 ArrayList reqArray = new ArrayList();
66 foreach (XmlRpcRequest request in Requests)
67 {
68 Hashtable requestEntry = new Hashtable();
69 requestEntry.Add(XmlRpcXmlTokens.METHOD_NAME, request.MethodName);
70 requestEntry.Add(XmlRpcXmlTokens.PARAMS, request.Params);
71 reqArray.Add(requestEntry);
72 }
73 _params.Add(reqArray);
74 return _params;
75 }
76 }
77 }
78}
diff --git a/Common/XmlRpcCS/XmlRpcClientProxy.cs b/Common/XmlRpcCS/XmlRpcClientProxy.cs
deleted file mode 100644
index e9af1ac..0000000
--- a/Common/XmlRpcCS/XmlRpcClientProxy.cs
+++ /dev/null
@@ -1,88 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Runtime.Remoting.Proxies;
32 using System.Runtime.Remoting.Messaging;
33
34 /// <summary>This class provides support for creating local proxies of XML-RPC remote objects</summary>
35 /// <remarks>
36 /// To create a local proxy you need to create a local C# interface and then, via <i>createProxy</i>
37 /// associate that interface with a remote object at a given URL.
38 /// </remarks>
39public class XmlRpcClientProxy : RealProxy
40{
41 private String _remoteObjectName;
42 private String _url;
43 private XmlRpcRequest _client = new XmlRpcRequest();
44
45 /// <summary>Factory method to create proxies.</summary>
46 /// <remarks>
47 /// To create a local proxy you need to create a local C# interface with methods that mirror those of the server object.
48 /// Next, pass that interface into <c>createProxy</c> along with the object name and URL of the remote object and
49 /// cast the resulting object to the specifice interface.
50 /// </remarks>
51 /// <param name="remoteObjectName"><c>String</c> The name of the remote object.</param>
52 /// <param name="url"><c>String</c> The URL of the remote object.</param>
53 /// <param name="anInterface"><c>Type</c> The typeof() of a C# interface.</param>
54 /// <returns><c>Object</c> A proxy for your specified interface. Cast to appropriate type.</returns>
55 public static Object createProxy(String remoteObjectName, String url, Type anInterface)
56 {
57 return new XmlRpcClientProxy(remoteObjectName, url, anInterface).GetTransparentProxy();
58 }
59
60 private XmlRpcClientProxy(String remoteObjectName, String url, Type t) : base(t)
61 {
62 _remoteObjectName = remoteObjectName;
63 _url = url;
64 }
65
66 /// <summary>The local method dispatcher - do not invoke.</summary>
67 override public IMessage Invoke(IMessage msg)
68 {
69 IMethodCallMessage methodMessage = (IMethodCallMessage)msg;
70
71 _client.MethodName = _remoteObjectName + "." + methodMessage.MethodName;
72 _client.Params.Clear();
73 foreach (Object o in methodMessage.Args)
74 _client.Params.Add(o);
75
76 try
77 {
78 Object ret = _client.Invoke(_url);
79 return new ReturnMessage(ret,null,0,
80 methodMessage.LogicalCallContext, methodMessage);
81 }
82 catch (Exception e)
83 {
84 return new ReturnMessage(e, methodMessage);
85 }
86 }
87}
88}
diff --git a/Common/XmlRpcCS/XmlRpcDeserializer.cs b/Common/XmlRpcCS/XmlRpcDeserializer.cs
deleted file mode 100644
index bffda57..0000000
--- a/Common/XmlRpcCS/XmlRpcDeserializer.cs
+++ /dev/null
@@ -1,222 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.IO;
33 using System.Xml;
34 using System.Globalization;
35
36 /// <summary>Parser context, we maintain contexts in a stack to avoiding recursion. </summary>
37 struct Context
38 {
39 public String Name;
40 public Object Container;
41 }
42
43 /// <summary>Basic XML-RPC data deserializer.</summary>
44 /// <remarks>Uses <c>XmlTextReader</c> to parse the XML data. This level of the class
45 /// only handles the tokens common to both Requests and Responses. This class is not useful in and of itself
46 /// but is designed to be subclassed.</remarks>
47 public class XmlRpcDeserializer : XmlRpcXmlTokens
48 {
49 private static DateTimeFormatInfo _dateFormat = new DateTimeFormatInfo();
50
51 private Object _container;
52 private Stack _containerStack;
53
54 /// <summary>Protected reference to last text.</summary>
55 protected String _text;
56 /// <summary>Protected reference to last deserialized value.</summary>
57 protected Object _value;
58 /// <summary>Protected reference to last name field.</summary>
59 protected String _name;
60
61
62 /// <summary>Basic constructor.</summary>
63 public XmlRpcDeserializer()
64 {
65 Reset();
66 _dateFormat.FullDateTimePattern = ISO_DATETIME;
67 }
68
69 /// <summary>Static method that parses XML data into a response using the Singleton.</summary>
70 /// <param name="xmlData"><c>StreamReader</c> containing an XML-RPC response.</param>
71 /// <returns><c>Object</c> object resulting from the deserialization.</returns>
72 virtual public Object Deserialize(TextReader xmlData)
73 {
74 return null;
75 }
76
77 /// <summary>Protected method to parse a node in an XML-RPC XML stream.</summary>
78 /// <remarks>Method deals with elements common to all XML-RPC data, subclasses of
79 /// this object deal with request/response spefic elements.</remarks>
80 /// <param name="reader"><c>XmlTextReader</c> of the in progress parsing data stream.</param>
81 protected void DeserializeNode(XmlTextReader reader)
82 {
83 switch (reader.NodeType)
84 {
85 case XmlNodeType.Element:
86 if (Logger.Delegate != null)
87 Logger.WriteEntry("START " + reader.Name, LogLevel.Information);
88 switch (reader.Name)
89 {
90 case VALUE:
91 _value = null;
92 _text = null;
93 break;
94 case STRUCT:
95 PushContext();
96 _container = new Hashtable();
97 break;
98 case ARRAY:
99 PushContext();
100 _container = new ArrayList();
101 break;
102 }
103 break;
104 case XmlNodeType.EndElement:
105 if (Logger.Delegate != null)
106 Logger.WriteEntry("END " + reader.Name, LogLevel.Information);
107 switch (reader.Name)
108 {
109 case BASE64:
110 _value = Convert.FromBase64String(_text);
111 break;
112 case BOOLEAN:
113 int val = Int16.Parse(_text);
114 if (val == 0)
115 _value = false;
116 else if (val == 1)
117 _value = true;
118 break;
119 case STRING:
120 _value = _text;
121 break;
122 case DOUBLE:
123 _value = Double.Parse(_text);
124 break;
125 case INT:
126 case ALT_INT:
127 _value = Int32.Parse(_text);
128 break;
129 case DATETIME:
130#if __MONO__
131 _value = DateParse(_text);
132#else
133 _value = DateTime.ParseExact(_text, "F", _dateFormat);
134#endif
135 break;
136 case NAME:
137 _name = _text;
138 break;
139 case VALUE:
140 if (_value == null)
141 _value = _text; // some kits don't use <string> tag, they just do <value>
142
143 if ((_container != null) && (_container is IList)) // in an array? If so add value to it.
144 ((IList)_container).Add(_value);
145 break;
146 case MEMBER:
147 if ((_container != null) && (_container is IDictionary)) // in an struct? If so add value to it.
148 ((IDictionary)_container).Add(_name, _value);
149 break;
150 case ARRAY:
151 case STRUCT:
152 _value = _container;
153 PopContext();
154 break;
155 }
156 break;
157 case XmlNodeType.Text:
158 if (Logger.Delegate != null)
159 Logger.WriteEntry("Text " + reader.Value, LogLevel.Information);
160 _text = reader.Value;
161 break;
162 default:
163 break;
164 }
165 }
166
167 /// <summary>Static method that parses XML in a <c>String</c> into a
168 /// request using the Singleton.</summary>
169 /// <param name="xmlData"><c>String</c> containing an XML-RPC request.</param>
170 /// <returns><c>XmlRpcRequest</c> object resulting from the parse.</returns>
171 public Object Deserialize(String xmlData)
172 {
173 StringReader sr = new StringReader(xmlData);
174 return Deserialize(sr);
175 }
176
177 /// <summary>Pop a Context of the stack, an Array or Struct has closed.</summary>
178 private void PopContext()
179 {
180 Context c = (Context)_containerStack.Pop();
181 _container = c.Container;
182 _name = c.Name;
183 }
184
185 /// <summary>Push a Context on the stack, an Array or Struct has opened.</summary>
186 private void PushContext()
187 {
188 Context context;
189
190 context.Container = _container;
191 context.Name = _name;
192
193 _containerStack.Push(context);
194 }
195
196 /// <summary>Reset the internal state of the deserializer.</summary>
197 protected void Reset()
198 {
199 _text = null;
200 _value = null;
201 _name = null;
202 _container = null;
203 _containerStack = new Stack();
204 }
205
206#if __MONO__
207 private DateTime DateParse(String str)
208 {
209 int year = Int32.Parse(str.Substring(0,4));
210 int month = Int32.Parse(str.Substring(4,2));
211 int day = Int32.Parse(str.Substring(6,2));
212 int hour = Int32.Parse(str.Substring(9,2));
213 int min = Int32.Parse(str.Substring(12,2));
214 int sec = Int32.Parse(str.Substring(15,2));
215 return new DateTime(year,month,day,hour,min,sec);
216 }
217#endif
218
219 }
220}
221
222
diff --git a/Common/XmlRpcCS/XmlRpcErrorCodes.cs b/Common/XmlRpcCS/XmlRpcErrorCodes.cs
deleted file mode 100644
index 258ebe6..0000000
--- a/Common/XmlRpcCS/XmlRpcErrorCodes.cs
+++ /dev/null
@@ -1,78 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31
32 /// <summary>Standard XML-RPC error codes.</summary>
33 public class XmlRpcErrorCodes
34 {
35 /// <summary></summary>
36 public const int PARSE_ERROR_MALFORMED = -32700;
37 /// <summary></summary>
38 public const String PARSE_ERROR_MALFORMED_MSG = "Parse Error, not well formed";
39
40 /// <summary></summary>
41 public const int PARSE_ERROR_ENCODING = -32701;
42 /// <summary></summary>
43 public const String PARSE_ERROR_ENCODING_MSG = "Parse Error, unsupported encoding";
44
45 //
46 // -32702 ---> parse error. invalid character for encoding
47 // -32600 ---> server error. invalid xml-rpc. not conforming to spec.
48 //
49
50 /// <summary></summary>
51 public const int SERVER_ERROR_METHOD = -32601;
52 /// <summary></summary>
53 public const String SERVER_ERROR_METHOD_MSG = "Server Error, requested method not found";
54
55 /// <summary></summary>
56 public const int SERVER_ERROR_PARAMS = -32602;
57 /// <summary></summary>
58 public const String SERVER_ERROR_PARAMS_MSG = "Server Error, invalid method parameters";
59
60 //
61 // -32603 ---> server error. internal xml-rpc error
62 //
63
64 /// <summary></summary>
65 public const int APPLICATION_ERROR = -32500;
66 /// <summary></summary>
67 public const String APPLICATION_ERROR_MSG = "Application Error";
68
69 //
70 // -32400 ---> system error
71 //
72
73 /// <summary></summary>
74 public const int TRANSPORT_ERROR = -32300;
75 /// <summary></summary>
76 public const String TRANSPORT_ERROR_MSG = "Transport Layer Error";
77 }
78}
diff --git a/Common/XmlRpcCS/XmlRpcException.cs b/Common/XmlRpcCS/XmlRpcException.cs
deleted file mode 100644
index f728f90..0000000
--- a/Common/XmlRpcCS/XmlRpcException.cs
+++ /dev/null
@@ -1,66 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31
32 /// <summary>An XML-RPC Exception.</summary>
33 /// <remarks>Maps a C# exception to an XML-RPC fault. Normal exceptions
34 /// include a message so this adds the code needed by XML-RPC.</remarks>
35 public class XmlRpcException : Exception
36 {
37 private int _code;
38
39 /// <summary>Instantiate an <c>XmlRpcException</c> with a code and message.</summary>
40 /// <param name="code"><c>Int</c> faultCode associated with this exception.</param>
41 /// <param name="message"><c>String</c> faultMessage associated with this exception.</param>
42 public XmlRpcException(int code, String message)
43 : base(message)
44 {
45 _code = code;
46 }
47
48 /// <summary>The value of the faults message, i.e. the faultString.</summary>
49 public String FaultString
50 {
51 get { return Message; }
52 }
53
54 /// <summary>The value of the faults code, i.e. the faultCode.</summary>
55 public int FaultCode
56 {
57 get { return _code; }
58 }
59
60 /// <summary>Format the message to include the code.</summary>
61 override public String ToString()
62 {
63 return "Code: " + FaultCode + " Message: " + base.ToString();
64 }
65 }
66}
diff --git a/Common/XmlRpcCS/XmlRpcExposedAttribute.cs b/Common/XmlRpcCS/XmlRpcExposedAttribute.cs
deleted file mode 100644
index 261ade3..0000000
--- a/Common/XmlRpcCS/XmlRpcExposedAttribute.cs
+++ /dev/null
@@ -1,87 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Reflection;
32
33 /// <summary>
34 /// Simple tagging attribute to indicate participation is XML-RPC exposure.
35 /// </summary>
36 /// <remarks>
37 /// If present at the class level it indicates that this class does explicitly
38 /// expose methods. If present at the method level it denotes that the method
39 /// is exposed.
40 /// </remarks>
41 [AttributeUsage(
42 AttributeTargets.Class | AttributeTargets.Method,
43 AllowMultiple = false,
44 Inherited = true
45 )]
46 public class XmlRpcExposedAttribute : Attribute
47 {
48 /// <summary>Check if <paramref>obj</paramref> is an object utilizing the XML-RPC exposed Attribute.</summary>
49 /// <param name="obj"><c>Object</c> of a class or method to check for attribute.</param>
50 /// <returns><c>Boolean</c> true if attribute present.</returns>
51 public static Boolean ExposedObject(Object obj)
52 {
53 return IsExposed(obj.GetType());
54 }
55
56 /// <summary>Check if <paramref>obj</paramref>.<paramref>methodName</paramref> is an XML-RPC exposed method.</summary>
57 /// <remarks>A method is considered to be exposed if it exists and, either, the object does not use the XmlRpcExposed attribute,
58 /// or the object does use the XmlRpcExposed attribute and the method has the XmlRpcExposed attribute as well.</remarks>
59 /// <returns><c>Boolean</c> true if the method is exposed.</returns>
60 public static Boolean ExposedMethod(Object obj, String methodName)
61 {
62 Type type = obj.GetType();
63 MethodInfo method = type.GetMethod(methodName);
64
65 if (method == null)
66 throw new MissingMethodException("Method " + methodName + " not found.");
67
68 if (!IsExposed(type))
69 return true;
70
71 return IsExposed(method);
72 }
73
74 /// <summary>Check if <paramref>mi</paramref> is XML-RPC exposed.</summary>
75 /// <param name="mi"><c>MemberInfo</c> of a class or method to check for attribute.</param>
76 /// <returns><c>Boolean</c> true if attribute present.</returns>
77 public static Boolean IsExposed(MemberInfo mi)
78 {
79 foreach (Attribute attr in mi.GetCustomAttributes(true))
80 {
81 if (attr is XmlRpcExposedAttribute)
82 return true;
83 }
84 return false;
85 }
86 }
87}
diff --git a/Common/XmlRpcCS/XmlRpcRequest.cs b/Common/XmlRpcCS/XmlRpcRequest.cs
deleted file mode 100644
index 71a0dc9..0000000
--- a/Common/XmlRpcCS/XmlRpcRequest.cs
+++ /dev/null
@@ -1,177 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.IO;
33 using System.Xml;
34 using System.Net;
35 using System.Text;
36 using System.Reflection;
37 using System.Net.Security;
38 using System.Security.Cryptography.X509Certificates;
39
40 internal class AcceptAllCertificatePolicy : ICertificatePolicy
41 {
42 public AcceptAllCertificatePolicy()
43 {
44 }
45
46 public bool CheckValidationResult(ServicePoint sPoint,
47 System.Security.Cryptography.X509Certificates.X509Certificate cert,
48 WebRequest wRequest, int certProb)
49 {
50 // Always accept
51 return true;
52 }
53 }
54
55 /// <summary>Class supporting the request side of an XML-RPC transaction.</summary>
56 public class XmlRpcRequest
57 {
58 private String _methodName = null;
59 private Encoding _encoding = new UTF8Encoding();
60 private XmlRpcRequestSerializer _serializer = new XmlRpcRequestSerializer();
61 private XmlRpcResponseDeserializer _deserializer = new XmlRpcResponseDeserializer();
62
63 /// <summary><c>ArrayList</c> containing the parameters.</summary>
64 protected IList _params = null;
65
66 /// <summary>Instantiate an <c>XmlRpcRequest</c></summary>
67 public XmlRpcRequest()
68 {
69 _params = new ArrayList();
70 }
71
72 /// <summary>Instantiate an <c>XmlRpcRequest</c> for a specified method and parameters.</summary>
73 /// <param name="methodName"><c>String</c> designating the <i>object.method</i> on the server the request
74 /// should be directed to.</param>
75 /// <param name="parameters"><c>ArrayList</c> of XML-RPC type parameters to invoke the request with.</param>
76 public XmlRpcRequest(String methodName, IList parameters)
77 {
78 MethodName = methodName;
79 _params = parameters;
80 }
81
82 /// <summary><c>ArrayList</c> conntaining the parameters for the request.</summary>
83 public virtual IList Params
84 {
85 get { return _params; }
86 }
87
88 /// <summary><c>String</c> conntaining the method name, both object and method, that the request will be sent to.</summary>
89 public virtual String MethodName
90 {
91 get { return _methodName; }
92 set { _methodName = value; }
93 }
94
95 /// <summary><c>String</c> object name portion of the method name.</summary>
96 public String MethodNameObject
97 {
98 get
99 {
100 int index = MethodName.IndexOf(".");
101
102 if (index == -1)
103 return MethodName;
104
105 return MethodName.Substring(0, index);
106 }
107 }
108
109 /// <summary><c>String</c> method name portion of the object.method name.</summary>
110 public String MethodNameMethod
111 {
112 get
113 {
114 int index = MethodName.IndexOf(".");
115
116 if (index == -1)
117 return MethodName;
118
119 return MethodName.Substring(index + 1, MethodName.Length - index - 1);
120 }
121 }
122
123 /// <summary>Invoke this request on the server.</summary>
124 /// <param name="url"><c>String</c> The url of the XML-RPC server.</param>
125 /// <returns><c>Object</c> The value returned from the method invocation on the server.</returns>
126 /// <exception cref="XmlRpcException">If an exception generated on the server side.</exception>
127 public Object Invoke(String url)
128 {
129 XmlRpcResponse res = Send(url, 10000);
130
131 if (res.IsFault)
132 throw new XmlRpcException(res.FaultCode, res.FaultString);
133
134 return res.Value;
135 }
136
137 /// <summary>Send the request to the server.</summary>
138 /// <param name="url"><c>String</c> The url of the XML-RPC server.</param>
139 /// <param name="timeout">Milliseconds before the connection times out.</param>
140 /// <returns><c>XmlRpcResponse</c> The response generated.</returns>
141 public XmlRpcResponse Send(String url, int timeout)
142 {
143 // Override SSL authentication mechanisms
144 ServicePointManager.CertificatePolicy = new AcceptAllCertificatePolicy();
145
146 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
147 if (request == null)
148 throw new XmlRpcException(XmlRpcErrorCodes.TRANSPORT_ERROR,
149 XmlRpcErrorCodes.TRANSPORT_ERROR_MSG + ": Could not create request with " + url);
150 request.Method = "POST";
151 request.ContentType = "text/xml";
152 request.AllowWriteStreamBuffering = true;
153 request.Timeout = timeout;
154
155 Stream stream = request.GetRequestStream();
156 XmlTextWriter xml = new XmlTextWriter(stream, _encoding);
157 _serializer.Serialize(xml, this);
158 xml.Flush();
159 xml.Close();
160
161 HttpWebResponse response = (HttpWebResponse)request.GetResponse();
162 StreamReader input = new StreamReader(response.GetResponseStream());
163
164 XmlRpcResponse resp = (XmlRpcResponse)_deserializer.Deserialize(input);
165 input.Close();
166 response.Close();
167 return resp;
168 }
169
170 /// <summary>Produce <c>String</c> representation of the object.</summary>
171 /// <returns><c>String</c> representation of the object.</returns>
172 override public String ToString()
173 {
174 return _serializer.Serialize(this);
175 }
176 }
177}
diff --git a/Common/XmlRpcCS/XmlRpcRequestDeserializer.cs b/Common/XmlRpcCS/XmlRpcRequestDeserializer.cs
deleted file mode 100644
index 126a172..0000000
--- a/Common/XmlRpcCS/XmlRpcRequestDeserializer.cs
+++ /dev/null
@@ -1,92 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.Diagnostics;
33 using System.IO;
34 using System.Xml;
35
36 /// <summary>Class to deserialize XML data representing a request.</summary>
37 public class XmlRpcRequestDeserializer : XmlRpcDeserializer
38 {
39 static private XmlRpcRequestDeserializer _singleton;
40 /// <summary>A static singleton instance of this deserializer.</summary>
41 [Obsolete("This object is now thread safe, just use an instance.", false)]
42 static public XmlRpcRequestDeserializer Singleton
43 {
44 get
45 {
46 if (_singleton == null)
47 _singleton = new XmlRpcRequestDeserializer();
48
49 return _singleton;
50 }
51 }
52
53 /// <summary>Static method that parses XML data into a request using the Singleton.</summary>
54 /// <param name="xmlData"><c>StreamReader</c> containing an XML-RPC request.</param>
55 /// <returns><c>XmlRpcRequest</c> object resulting from the parse.</returns>
56 override public Object Deserialize(TextReader xmlData)
57 {
58 XmlTextReader reader = new XmlTextReader(xmlData);
59
60 XmlRpcRequest request = new XmlRpcRequest();
61 bool done = false;
62
63 lock (this)
64 {
65 Reset();
66 while (!done && reader.Read())
67 {
68 DeserializeNode(reader); // Parent parse...
69 switch (reader.NodeType)
70 {
71 case XmlNodeType.EndElement:
72 switch (reader.Name)
73 {
74 case METHOD_NAME:
75 request.MethodName = _text;
76 break;
77 case METHOD_CALL:
78 done = true;
79 break;
80 case PARAM:
81 request.Params.Add(_value);
82 _text = null;
83 break;
84 }
85 break;
86 }
87 }
88 }
89 return request;
90 }
91 }
92}
diff --git a/Common/XmlRpcCS/XmlRpcRequestSerializer.cs b/Common/XmlRpcCS/XmlRpcRequestSerializer.cs
deleted file mode 100644
index 9bf95c7..0000000
--- a/Common/XmlRpcCS/XmlRpcRequestSerializer.cs
+++ /dev/null
@@ -1,78 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.Xml;
33 using System.IO;
34
35 /// <summary>Class responsible for serializing an XML-RPC request.</summary>
36 /// <remarks>This class handles the request envelope, depending on <c>XmlRpcSerializer</c>
37 /// to serialize the payload.</remarks>
38 /// <seealso cref="XmlRpcSerializer"/>
39 public class XmlRpcRequestSerializer : XmlRpcSerializer
40 {
41 static private XmlRpcRequestSerializer _singleton;
42 /// <summary>A static singleton instance of this deserializer.</summary>
43 static public XmlRpcRequestSerializer Singleton
44 {
45 get
46 {
47 if (_singleton == null)
48 _singleton = new XmlRpcRequestSerializer();
49
50 return _singleton;
51 }
52 }
53
54 /// <summary>Serialize the <c>XmlRpcRequest</c> to the output stream.</summary>
55 /// <param name="output">An <c>XmlTextWriter</c> stream to write data to.</param>
56 /// <param name="obj">An <c>XmlRpcRequest</c> to serialize.</param>
57 /// <seealso cref="XmlRpcRequest"/>
58 override public void Serialize(XmlTextWriter output, Object obj)
59 {
60 XmlRpcRequest request = (XmlRpcRequest)obj;
61 output.WriteStartDocument();
62 output.WriteStartElement(METHOD_CALL);
63 output.WriteElementString(METHOD_NAME, request.MethodName);
64 output.WriteStartElement(PARAMS);
65 foreach (Object param in request.Params)
66 {
67 output.WriteStartElement(PARAM);
68 output.WriteStartElement(VALUE);
69 SerializeObject(output, param);
70 output.WriteEndElement();
71 output.WriteEndElement();
72 }
73
74 output.WriteEndElement();
75 output.WriteEndElement();
76 }
77 }
78}
diff --git a/Common/XmlRpcCS/XmlRpcResponder.cs b/Common/XmlRpcCS/XmlRpcResponder.cs
deleted file mode 100644
index 05377a2..0000000
--- a/Common/XmlRpcCS/XmlRpcResponder.cs
+++ /dev/null
@@ -1,127 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Xml;
32 using System.Net.Sockets;
33 using System.Text;
34
35 /// <summary>The class is a container of the context of an XML-RPC dialog on the server side.</summary>
36 /// <remarks>Instances of this class maintain the context for an individual XML-RPC server
37 /// side dialog. Namely they manage an inbound deserializer and an outbound serializer. </remarks>
38 public class XmlRpcResponder
39 {
40 private XmlRpcRequestDeserializer _deserializer = new XmlRpcRequestDeserializer();
41 private XmlRpcResponseSerializer _serializer = new XmlRpcResponseSerializer();
42 private XmlRpcServer _server;
43 private TcpClient _client;
44 private SimpleHttpRequest _httpReq;
45
46 /// <summary>The SimpleHttpRequest based on the TcpClient.</summary>
47 public SimpleHttpRequest HttpReq
48 {
49 get { return _httpReq; }
50 }
51
52 /// <summary>Basic constructor.</summary>
53 /// <param name="server">XmlRpcServer that this XmlRpcResponder services.</param>
54 /// <param name="client">TcpClient with the connection.</param>
55 public XmlRpcResponder(XmlRpcServer server, TcpClient client)
56 {
57 _server = server;
58 _client = client;
59 _httpReq = new SimpleHttpRequest(_client);
60 }
61
62 /// <summary>Call close to insure proper shutdown.</summary>
63 ~XmlRpcResponder()
64 {
65 Close();
66 }
67
68 ///<summary>Respond using this responders HttpReq.</summary>
69 public void Respond()
70 {
71 Respond(HttpReq);
72 }
73
74 /// <summary>Handle an HTTP request containing an XML-RPC request.</summary>
75 /// <remarks>This method deserializes the XML-RPC request, invokes the
76 /// described method, serializes the response (or fault) and sends the XML-RPC response
77 /// back as a valid HTTP page.
78 /// </remarks>
79 /// <param name="httpReq"><c>SimpleHttpRequest</c> containing the request.</param>
80 public void Respond(SimpleHttpRequest httpReq)
81 {
82 XmlRpcRequest xmlRpcReq = (XmlRpcRequest)_deserializer.Deserialize(httpReq.Input);
83 XmlRpcResponse xmlRpcResp = new XmlRpcResponse();
84
85 try
86 {
87 xmlRpcResp.Value = _server.Invoke(xmlRpcReq);
88 }
89 catch (XmlRpcException e)
90 {
91 xmlRpcResp.SetFault(e.FaultCode, e.FaultString);
92 }
93 catch (Exception e2)
94 {
95 xmlRpcResp.SetFault(XmlRpcErrorCodes.APPLICATION_ERROR,
96 XmlRpcErrorCodes.APPLICATION_ERROR_MSG + ": " + e2.Message);
97 }
98
99 if (Logger.Delegate != null)
100 Logger.WriteEntry(xmlRpcResp.ToString(), LogLevel.Information);
101
102 XmlRpcServer.HttpHeader(httpReq.Protocol, "text/xml", 0, " 200 OK", httpReq.Output);
103 httpReq.Output.Flush();
104
105 XmlTextWriter xml = new XmlTextWriter(httpReq.Output);
106 _serializer.Serialize(xml, xmlRpcResp);
107 xml.Flush();
108 httpReq.Output.Flush();
109 }
110
111 ///<summary>Close all contained resources, both the HttpReq and client.</summary>
112 public void Close()
113 {
114 if (_httpReq != null)
115 {
116 _httpReq.Close();
117 _httpReq = null;
118 }
119
120 if (_client != null)
121 {
122 _client.Close();
123 _client = null;
124 }
125 }
126 }
127}
diff --git a/Common/XmlRpcCS/XmlRpcResponse.cs b/Common/XmlRpcCS/XmlRpcResponse.cs
deleted file mode 100644
index 414998e..0000000
--- a/Common/XmlRpcCS/XmlRpcResponse.cs
+++ /dev/null
@@ -1,112 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.IO;
33 using System.Xml;
34
35 /// <summary>Class designed to represent an XML-RPC response.</summary>
36 public class XmlRpcResponse
37 {
38 private Object _value;
39 /// <summary><c>bool</c> indicating if this response represents a fault.</summary>
40 public bool IsFault;
41
42 /// <summary>Basic constructor</summary>
43 public XmlRpcResponse()
44 {
45 Value = null;
46 IsFault = false;
47 }
48
49 /// <summary>Constructor for a fault.</summary>
50 /// <param name="code"><c>int</c> the numeric faultCode value.</param>
51 /// <param name="message"><c>String</c> the faultString value.</param>
52 public XmlRpcResponse(int code, String message)
53 : this()
54 {
55 SetFault(code, message);
56 }
57
58 /// <summary>The data value of the response, may be fault data.</summary>
59 public Object Value
60 {
61 get { return _value; }
62 set
63 {
64 IsFault = false;
65 _value = value;
66 }
67 }
68
69 /// <summary>The faultCode if this is a fault.</summary>
70 public int FaultCode
71 {
72 get
73 {
74 if (!IsFault)
75 return 0;
76 else
77 return (int)((Hashtable)_value)[XmlRpcXmlTokens.FAULT_CODE];
78 }
79 }
80
81 /// <summary>The faultString if this is a fault.</summary>
82 public String FaultString
83 {
84 get
85 {
86 if (!IsFault)
87 return "";
88 else
89 return (String)((Hashtable)_value)[XmlRpcXmlTokens.FAULT_STRING];
90 }
91 }
92
93 /// <summary>Set this response to be a fault.</summary>
94 /// <param name="code"><c>int</c> the numeric faultCode value.</param>
95 /// <param name="message"><c>String</c> the faultString value.</param>
96 public void SetFault(int code, String message)
97 {
98 Hashtable fault = new Hashtable();
99 fault.Add("faultCode", code);
100 fault.Add("faultString", message);
101 Value = fault;
102 IsFault = true;
103 }
104
105 /// <summary>Form a useful string representation of the object, in this case the XML response.</summary>
106 /// <returns><c>String</c> The XML serialized XML-RPC response.</returns>
107 override public String ToString()
108 {
109 return XmlRpcResponseSerializer.Singleton.Serialize(this);
110 }
111 }
112}
diff --git a/Common/XmlRpcCS/XmlRpcResponseDeserializer.cs b/Common/XmlRpcCS/XmlRpcResponseDeserializer.cs
deleted file mode 100644
index 46c5742..0000000
--- a/Common/XmlRpcCS/XmlRpcResponseDeserializer.cs
+++ /dev/null
@@ -1,92 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.IO;
33 using System.Xml;
34
35 /// <summary>Class to deserialize XML data representing a response.</summary>
36 public class XmlRpcResponseDeserializer : XmlRpcDeserializer
37 {
38 static private XmlRpcResponseDeserializer _singleton;
39 /// <summary>A static singleton instance of this deserializer.</summary>
40 [Obsolete("This object is now thread safe, just use an instance.", false)]
41 static public XmlRpcResponseDeserializer Singleton
42 {
43 get
44 {
45 if (_singleton == null)
46 _singleton = new XmlRpcResponseDeserializer();
47
48 return _singleton;
49 }
50 }
51
52 /// <summary>Static method that parses XML data into a response using the Singleton.</summary>
53 /// <param name="xmlData"><c>StreamReader</c> containing an XML-RPC response.</param>
54 /// <returns><c>XmlRpcResponse</c> object resulting from the parse.</returns>
55 override public Object Deserialize(TextReader xmlData)
56 {
57 XmlTextReader reader = new XmlTextReader(xmlData);
58 XmlRpcResponse response = new XmlRpcResponse();
59 bool done = false;
60
61 lock (this)
62 {
63 Reset();
64
65 while (!done && reader.Read())
66 {
67 DeserializeNode(reader); // Parent parse...
68 switch (reader.NodeType)
69 {
70 case XmlNodeType.EndElement:
71 switch (reader.Name)
72 {
73 case FAULT:
74 response.Value = _value;
75 response.IsFault = true;
76 break;
77 case PARAM:
78 response.Value = _value;
79 _value = null;
80 _text = null;
81 break;
82 }
83 break;
84 default:
85 break;
86 }
87 }
88 }
89 return response;
90 }
91 }
92}
diff --git a/Common/XmlRpcCS/XmlRpcResponseSerializer.cs b/Common/XmlRpcCS/XmlRpcResponseSerializer.cs
deleted file mode 100644
index 5ee4954..0000000
--- a/Common/XmlRpcCS/XmlRpcResponseSerializer.cs
+++ /dev/null
@@ -1,84 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.Xml;
33
34 /// <summary>Class responsible for serializing an XML-RPC response.</summary>
35 /// <remarks>This class handles the response envelope, depending on XmlRpcSerializer
36 /// to serialize the payload.</remarks>
37 /// <seealso cref="XmlRpcSerializer"/>
38 public class XmlRpcResponseSerializer : XmlRpcSerializer
39 {
40 static private XmlRpcResponseSerializer _singleton;
41 /// <summary>A static singleton instance of this deserializer.</summary>
42 static public XmlRpcResponseSerializer Singleton
43 {
44 get
45 {
46 if (_singleton == null)
47 _singleton = new XmlRpcResponseSerializer();
48
49 return _singleton;
50 }
51 }
52
53 /// <summary>Serialize the <c>XmlRpcResponse</c> to the output stream.</summary>
54 /// <param name="output">An <c>XmlTextWriter</c> stream to write data to.</param>
55 /// <param name="obj">An <c>Object</c> to serialize.</param>
56 /// <seealso cref="XmlRpcResponse"/>
57 override public void Serialize(XmlTextWriter output, Object obj)
58 {
59 XmlRpcResponse response = (XmlRpcResponse)obj;
60
61 output.WriteStartDocument();
62 output.WriteStartElement(METHOD_RESPONSE);
63
64 if (response.IsFault)
65 output.WriteStartElement(FAULT);
66 else
67 {
68 output.WriteStartElement(PARAMS);
69 output.WriteStartElement(PARAM);
70 }
71
72 output.WriteStartElement(VALUE);
73
74 SerializeObject(output, response.Value);
75
76 output.WriteEndElement();
77
78 output.WriteEndElement();
79 if (!response.IsFault)
80 output.WriteEndElement();
81 output.WriteEndElement();
82 }
83 }
84}
diff --git a/Common/XmlRpcCS/XmlRpcSerializer.cs b/Common/XmlRpcCS/XmlRpcSerializer.cs
deleted file mode 100644
index b3b9af3..0000000
--- a/Common/XmlRpcCS/XmlRpcSerializer.cs
+++ /dev/null
@@ -1,143 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.IO;
33 using System.Xml;
34 using System.Text;
35
36 /// <summary>Base class of classes serializing data to XML-RPC's XML format.</summary>
37 /// <remarks>This class handles the basic type conversions like Integer to &lt;i4&gt;. </remarks>
38 /// <seealso cref="XmlRpcXmlTokens"/>
39 public class XmlRpcSerializer : XmlRpcXmlTokens
40 {
41
42 /// <summary>Serialize the <c>XmlRpcRequest</c> to the output stream.</summary>
43 /// <param name="output">An <c>XmlTextWriter</c> stream to write data to.</param>
44 /// <param name="obj">An <c>Object</c> to serialize.</param>
45 /// <seealso cref="XmlRpcRequest"/>
46 virtual public void Serialize(XmlTextWriter output, Object obj)
47 {
48 }
49
50 /// <summary>Serialize the <c>XmlRpcRequest</c> to a String.</summary>
51 /// <remarks>Note this may represent a real memory hog for a large request.</remarks>
52 /// <param name="obj">An <c>Object</c> to serialize.</param>
53 /// <returns><c>String</c> containing XML-RPC representation of the request.</returns>
54 /// <seealso cref="XmlRpcRequest"/>
55 public String Serialize(Object obj)
56 {
57 using (MemoryStream memStream = new MemoryStream(4096))
58 {
59 XmlTextWriter xml = new XmlTextWriter( memStream, null );
60 xml.Formatting = Formatting.Indented;
61 xml.Indentation = 4;
62 Serialize(xml, obj);
63 xml.Flush();
64
65 byte[] resultBytes = memStream.ToArray();
66
67 UTF8Encoding encoder = new UTF8Encoding();
68 String returns = encoder.GetString( resultBytes, 0, resultBytes.Length );
69 xml.Close();
70 return returns;
71 }
72 }
73
74 /// <remarks>Serialize the object to the output stream.</remarks>
75 /// <param name="output">An <c>XmlTextWriter</c> stream to write data to.</param>
76 /// <param name="obj">An <c>Object</c> to serialize.</param>
77 public void SerializeObject(XmlTextWriter output, Object obj)
78 {
79 if (obj == null)
80 return;
81
82 if (obj is byte[])
83 {
84 byte[] ba = (byte[])obj;
85 output.WriteStartElement(BASE64);
86 output.WriteBase64(ba, 0, ba.Length);
87 output.WriteEndElement();
88 }
89 else if (obj is String)
90 {
91 output.WriteElementString(STRING, obj.ToString());
92 }
93 else if (obj is Int32)
94 {
95 output.WriteElementString(INT, obj.ToString());
96 }
97 else if (obj is DateTime)
98 {
99 output.WriteElementString(DATETIME, ((DateTime)obj).ToString(ISO_DATETIME));
100 }
101 else if (obj is Double)
102 {
103 output.WriteElementString(DOUBLE, obj.ToString());
104 }
105 else if (obj is Boolean)
106 {
107 output.WriteElementString(BOOLEAN, ((((Boolean)obj) == true) ? "1" : "0"));
108 }
109 else if (obj is IList)
110 {
111 output.WriteStartElement(ARRAY);
112 output.WriteStartElement(DATA);
113 if (((ArrayList)obj).Count > 0)
114 {
115 foreach (Object member in ((IList)obj))
116 {
117 output.WriteStartElement(VALUE);
118 SerializeObject(output, member);
119 output.WriteEndElement();
120 }
121 }
122 output.WriteEndElement();
123 output.WriteEndElement();
124 }
125 else if (obj is IDictionary)
126 {
127 IDictionary h = (IDictionary)obj;
128 output.WriteStartElement(STRUCT);
129 foreach (String key in h.Keys)
130 {
131 output.WriteStartElement(MEMBER);
132 output.WriteElementString(NAME, key);
133 output.WriteStartElement(VALUE);
134 SerializeObject(output, h[key]);
135 output.WriteEndElement();
136 output.WriteEndElement();
137 }
138 output.WriteEndElement();
139 }
140
141 }
142 }
143}
diff --git a/Common/XmlRpcCS/XmlRpcServer.cs b/Common/XmlRpcCS/XmlRpcServer.cs
deleted file mode 100644
index 6d1f33a..0000000
--- a/Common/XmlRpcCS/XmlRpcServer.cs
+++ /dev/null
@@ -1,266 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.IO;
33 using System.Net;
34 using System.Net.Sockets;
35 using System.Text;
36 using System.Threading;
37 using System.Xml;
38
39 /// <summary>A restricted HTTP server for use with XML-RPC.</summary>
40 /// <remarks>It only handles POST requests, and only POSTs representing XML-RPC calls.
41 /// In addition to dispatching requests it also provides a registry for request handlers.
42 /// </remarks>
43 public class XmlRpcServer : IEnumerable
44 {
45#pragma warning disable 0414 // disable "private field assigned but not used"
46 const int RESPONDER_COUNT = 10;
47 private TcpListener _myListener;
48 private int _port;
49 private IPAddress _address;
50 private IDictionary _handlers;
51 private XmlRpcSystemObject _system;
52 private WaitCallback _wc;
53#pragma warning restore 0414
54
55 ///<summary>Constructor with port and address.</summary>
56 ///<remarks>This constructor sets up a TcpListener listening on the
57 ///given port and address. It also calls a Thread on the method StartListen().</remarks>
58 ///<param name="address"><c>IPAddress</c> value of the address to listen on.</param>
59 ///<param name="port"><c>Int</c> value of the port to listen on.</param>
60 public XmlRpcServer(IPAddress address, int port)
61 {
62 _port = port;
63 _address = address;
64 _handlers = new Hashtable();
65 _system = new XmlRpcSystemObject(this);
66 _wc = new WaitCallback(WaitCallback);
67 }
68
69 ///<summary>Basic constructor.</summary>
70 ///<remarks>This constructor sets up a TcpListener listening on the
71 ///given port. It also calls a Thread on the method StartListen(). IPAddress.Any
72 ///is assumed as the address here.</remarks>
73 ///<param name="port"><c>Int</c> value of the port to listen on.</param>
74 public XmlRpcServer(int port) : this(IPAddress.Any, port) { }
75
76 /// <summary>Start the server.</summary>
77 public void Start()
78 {
79 try
80 {
81 Stop();
82 //start listing on the given port
83 // IPAddress addr = IPAddress.Parse("127.0.0.1");
84 lock (this)
85 {
86 _myListener = new TcpListener(IPAddress.Any, _port);
87 _myListener.Start();
88 //start the thread which calls the method 'StartListen'
89 Thread th = new Thread(new ThreadStart(StartListen));
90 th.Start();
91 }
92 }
93 catch (Exception e)
94 {
95 Logger.WriteEntry("An Exception Occurred while Listening :" + e.ToString(), LogLevel.Error);
96 }
97 }
98
99 /// <summary>Stop the server.</summary>
100 public void Stop()
101 {
102 try
103 {
104 if (_myListener != null)
105 {
106 lock (this)
107 {
108 _myListener.Stop();
109 _myListener = null;
110 }
111 }
112 }
113 catch (Exception e)
114 {
115 Logger.WriteEntry("An Exception Occurred while stopping :" +
116 e.ToString(), LogLevel.Error);
117 }
118 }
119
120 /// <summary>Get an enumeration of my XML-RPC handlers.</summary>
121 /// <returns><c>IEnumerable</c> the handler enumeration.</returns>
122 public IEnumerator GetEnumerator()
123 {
124 return _handlers.GetEnumerator();
125 }
126
127 /// <summary>Retrieve a handler by name.</summary>
128 /// <param name="name"><c>String</c> naming a handler</param>
129 /// <returns><c>Object</c> that is the handler.</returns>
130 public Object this[String name]
131 {
132 get { return _handlers[name]; }
133 }
134
135 ///<summary>
136 ///This method Accepts new connections and dispatches them when appropriate.
137 ///</summary>
138 public void StartListen()
139 {
140 while (true && _myListener != null)
141 {
142 //Accept a new connection
143 XmlRpcResponder responder = new XmlRpcResponder(this, _myListener.AcceptTcpClient());
144 ThreadPool.QueueUserWorkItem(_wc, responder);
145 }
146 }
147
148
149 ///<summary>
150 ///Add an XML-RPC handler object by name.
151 ///</summary>
152 ///<param name="name"><c>String</c> XML-RPC dispatch name of this object.</param>
153 ///<param name="obj"><c>Object</c> The object that is the XML-RPC handler.</param>
154 public void Add(String name, Object obj)
155 {
156 _handlers.Add(name, obj);
157 }
158
159 ///<summary>Return a C# object.method name for and XML-RPC object.method name pair.</summary>
160 ///<param name="methodName">The XML-RPC object.method.</param>
161 ///<returns><c>String</c> of form object.method for the underlying C# method.</returns>
162 public String MethodName(String methodName)
163 {
164 int dotAt = methodName.LastIndexOf('.');
165
166 if (dotAt == -1)
167 {
168 throw new XmlRpcException(XmlRpcErrorCodes.SERVER_ERROR_METHOD,
169 XmlRpcErrorCodes.SERVER_ERROR_METHOD_MSG + ": Bad method name " + methodName);
170 }
171
172 String objectName = methodName.Substring(0, dotAt);
173 Object target = _handlers[objectName];
174
175 if (target == null)
176 {
177 throw new XmlRpcException(XmlRpcErrorCodes.SERVER_ERROR_METHOD,
178 XmlRpcErrorCodes.SERVER_ERROR_METHOD_MSG + ": Object " + objectName + " not found");
179 }
180
181 return target.GetType().FullName + "." + methodName.Substring(dotAt + 1);
182 }
183
184 ///<summary>Invoke a method described in a request.</summary>
185 ///<param name="req"><c>XmlRpcRequest</c> containing a method descriptions.</param>
186 /// <seealso cref="XmlRpcSystemObject.Invoke"/>
187 /// <seealso cref="XmlRpcServer.Invoke(String,String,IList)"/>
188 public Object Invoke(XmlRpcRequest req)
189 {
190 return Invoke(req.MethodNameObject, req.MethodNameMethod, req.Params);
191 }
192
193 ///<summary>Invoke a method on a named handler.</summary>
194 ///<param name="objectName"><c>String</c> The name of the handler.</param>
195 ///<param name="methodName"><c>String</c> The name of the method to invoke on the handler.</param>
196 ///<param name="parameters"><c>IList</c> The parameters to invoke the method with.</param>
197 /// <seealso cref="XmlRpcSystemObject.Invoke"/>
198 public Object Invoke(String objectName, String methodName, IList parameters)
199 {
200 Object target = _handlers[objectName];
201
202 if (target == null)
203 {
204 throw new XmlRpcException(XmlRpcErrorCodes.SERVER_ERROR_METHOD,
205 XmlRpcErrorCodes.SERVER_ERROR_METHOD_MSG + ": Object " + objectName + " not found");
206 }
207
208 return XmlRpcSystemObject.Invoke(target, methodName, parameters);
209 }
210
211 /// <summary>The method the thread pool invokes when a thread is available to handle an HTTP request.</summary>
212 /// <param name="responder">TcpClient from the socket accept.</param>
213 public void WaitCallback(object responder)
214 {
215 XmlRpcResponder resp = (XmlRpcResponder)responder;
216
217 if (resp.HttpReq.HttpMethod == "POST")
218 {
219 try
220 {
221 resp.Respond();
222 }
223 catch (Exception e)
224 {
225 Logger.WriteEntry("Failed on post: " + e, LogLevel.Error);
226 }
227 }
228 else
229 {
230 Logger.WriteEntry("Only POST methods are supported: " + resp.HttpReq.HttpMethod +
231 " ignored", LogLevel.Error);
232 }
233
234 resp.Close();
235 }
236
237 /// <summary>
238 /// This function send the Header Information to the client (Browser)
239 /// </summary>
240 /// <param name="sHttpVersion">HTTP Version</param>
241 /// <param name="sMIMEHeader">Mime Type</param>
242 /// <param name="iTotBytes">Total Bytes to be sent in the body</param>
243 /// <param name="sStatusCode"></param>
244 /// <param name="output">Socket reference</param>
245 static public void HttpHeader(string sHttpVersion, string sMIMEHeader, long iTotBytes, string sStatusCode, TextWriter output)
246 {
247 String sBuffer = "";
248
249 // if Mime type is not provided set default to text/html
250 if (sMIMEHeader.Length == 0)
251 {
252 sMIMEHeader = "text/html"; // Default Mime Type is text/html
253 }
254
255 sBuffer += sHttpVersion + sStatusCode + "\r\n";
256 sBuffer += "Connection: close\r\n";
257 if (iTotBytes > 0)
258 sBuffer += "Content-Length: " + iTotBytes + "\r\n";
259 sBuffer += "Server: XmlRpcServer \r\n";
260 sBuffer += "Content-Type: " + sMIMEHeader + "\r\n";
261 sBuffer += "\r\n";
262
263 output.Write(sBuffer);
264 }
265 }
266}
diff --git a/Common/XmlRpcCS/XmlRpcSystemObject.cs b/Common/XmlRpcCS/XmlRpcSystemObject.cs
deleted file mode 100644
index 4055d29..0000000
--- a/Common/XmlRpcCS/XmlRpcSystemObject.cs
+++ /dev/null
@@ -1,279 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31 using System.Collections;
32 using System.Reflection;
33
34 /// <summary> XML-RPC System object implementation of extended specifications.</summary>
35 [XmlRpcExposed]
36 public class XmlRpcSystemObject
37 {
38 private XmlRpcServer _server;
39 static private IDictionary _methodHelp = new Hashtable();
40
41 /// <summary>Static <c>IDictionary</c> to hold mappings of method name to associated documentation String</summary>
42 static public IDictionary MethodHelp
43 {
44 get { return _methodHelp; }
45 }
46
47 /// <summary>Constructor.</summary>
48 /// <param name="server"><c>XmlRpcServer</c> server to be the system object for.</param>
49 public XmlRpcSystemObject(XmlRpcServer server)
50 {
51 _server = server;
52 server.Add("system", this);
53 _methodHelp.Add(this.GetType().FullName + ".methodHelp", "Return a string description.");
54 }
55
56 /// <summary>Invoke a method on a given object.</summary>
57 /// <remarks>Using reflection, and respecting the <c>XmlRpcExposed</c> attribute,
58 /// invoke the <paramref>methodName</paramref> method on the <paramref>target</paramref>
59 /// instance with the <paramref>parameters</paramref> provided. All this packages other <c>Invoke</c> methods
60 /// end up calling this.</remarks>
61 /// <returns><c>Object</c> the value the invoked method returns.</returns>
62 /// <exception cref="XmlRpcException">If method does not exist, is not exposed, parameters invalid, or invocation
63 /// results in an exception. Note, the <c>XmlRpcException.Code</c> will indicate cause.</exception>
64 static public Object Invoke(Object target, String methodName, IList parameters)
65 {
66 if (target == null)
67 throw new XmlRpcException(XmlRpcErrorCodes.SERVER_ERROR_METHOD,
68 XmlRpcErrorCodes.SERVER_ERROR_METHOD_MSG + ": Invalid target object.");
69
70 Type type = target.GetType();
71 MethodInfo method = type.GetMethod(methodName);
72
73 try
74 {
75 if (!XmlRpcExposedAttribute.ExposedMethod(target, methodName))
76 throw new XmlRpcException(XmlRpcErrorCodes.SERVER_ERROR_METHOD,
77 XmlRpcErrorCodes.SERVER_ERROR_METHOD_MSG + ": Method " + methodName + " is not exposed.");
78 }
79 catch (MissingMethodException me)
80 {
81 throw new XmlRpcException(XmlRpcErrorCodes.SERVER_ERROR_METHOD,
82 XmlRpcErrorCodes.SERVER_ERROR_METHOD_MSG + ": " + me.Message);
83 }
84
85 Object[] args = new Object[parameters.Count];
86
87 int index = 0;
88 foreach (Object arg in parameters)
89 {
90 args[index] = arg;
91 index++;
92 }
93
94 try
95 {
96 Object retValue = method.Invoke(target, args);
97 if (retValue == null)
98 throw new XmlRpcException(XmlRpcErrorCodes.APPLICATION_ERROR,
99 XmlRpcErrorCodes.APPLICATION_ERROR_MSG + ": Method returned NULL.");
100 return retValue;
101 }
102 catch (XmlRpcException e)
103 {
104 throw e;
105 }
106 catch (ArgumentException ae)
107 {
108 Logger.WriteEntry(XmlRpcErrorCodes.SERVER_ERROR_PARAMS_MSG + ": " + ae.Message,
109 LogLevel.Information);
110 String call = methodName + "( ";
111 foreach (Object o in args)
112 {
113 call += o.GetType().Name;
114 call += " ";
115 }
116 call += ")";
117 throw new XmlRpcException(XmlRpcErrorCodes.SERVER_ERROR_PARAMS,
118 XmlRpcErrorCodes.SERVER_ERROR_PARAMS_MSG + ": Arguement type mismatch invoking " + call);
119 }
120 catch (TargetParameterCountException tpce)
121 {
122 Logger.WriteEntry(XmlRpcErrorCodes.SERVER_ERROR_PARAMS_MSG + ": " + tpce.Message,
123 LogLevel.Information);
124 throw new XmlRpcException(XmlRpcErrorCodes.SERVER_ERROR_PARAMS,
125 XmlRpcErrorCodes.SERVER_ERROR_PARAMS_MSG + ": Arguement count mismatch invoking " + methodName);
126 }
127 catch (TargetInvocationException tie)
128 {
129 throw new XmlRpcException(XmlRpcErrorCodes.APPLICATION_ERROR,
130 XmlRpcErrorCodes.APPLICATION_ERROR_MSG + " Invoked method " + methodName + ": " + tie.Message);
131 }
132 }
133
134 /// <summary>List methods available on all handlers of this server.</summary>
135 /// <returns><c>IList</c> An array of <c>Strings</c>, each <c>String</c> will have form "object.method".</returns>
136 [XmlRpcExposed]
137 public IList listMethods()
138 {
139 IList methods = new ArrayList();
140 Boolean considerExposure;
141
142 foreach (DictionaryEntry handlerEntry in _server)
143 {
144 considerExposure = XmlRpcExposedAttribute.IsExposed(handlerEntry.Value.GetType());
145
146 foreach (MemberInfo mi in handlerEntry.Value.GetType().GetMembers())
147 {
148 if (mi.MemberType != MemberTypes.Method)
149 continue;
150
151 if (!((MethodInfo)mi).IsPublic)
152 continue;
153
154 if (considerExposure && !XmlRpcExposedAttribute.IsExposed(mi))
155 continue;
156
157 methods.Add(handlerEntry.Key + "." + mi.Name);
158 }
159 }
160
161 return methods;
162 }
163
164 /// <summary>Given a method name return the possible signatures for it.</summary>
165 /// <param name="name"><c>String</c> The object.method name to look up.</param>
166 /// <returns><c>IList</c> Of arrays of signatures.</returns>
167 [XmlRpcExposed]
168 public IList methodSignature(String name)
169 {
170 IList signatures = new ArrayList();
171 int index = name.IndexOf('.');
172
173 if (index < 0)
174 return signatures;
175
176 String oName = name.Substring(0, index);
177 Object obj = _server[oName];
178
179 if (obj == null)
180 return signatures;
181
182 MemberInfo[] mi = obj.GetType().GetMember(name.Substring(index + 1));
183
184 if (mi == null || mi.Length != 1) // for now we want a single signature
185 return signatures;
186
187 MethodInfo method;
188
189 try
190 {
191 method = (MethodInfo)mi[0];
192 }
193 catch (Exception e)
194 {
195 Logger.WriteEntry("Attempted methodSignature call on " + mi[0] + " caused: " + e,
196 LogLevel.Information);
197 return signatures;
198 }
199
200 if (!method.IsPublic)
201 return signatures;
202
203 IList signature = new ArrayList();
204 signature.Add(method.ReturnType.Name);
205
206 foreach (ParameterInfo param in method.GetParameters())
207 {
208 signature.Add(param.ParameterType.Name);
209 }
210
211
212 signatures.Add(signature);
213
214 return signatures;
215 }
216
217 /// <summary>Help for given method signature. Not implemented yet.</summary>
218 /// <param name="name"><c>String</c> The object.method name to look up.</param>
219 /// <returns><c>String</c> help text. Rich HTML text.</returns>
220 [XmlRpcExposed]
221 public String methodHelp(String name)
222 {
223 String help = null;
224
225 try
226 {
227 help = (String)_methodHelp[_server.MethodName(name)];
228 }
229 catch (XmlRpcException e)
230 {
231 throw e;
232 }
233 catch (Exception) { /* ignored */ };
234
235 if (help == null)
236 help = "No help available for: " + name;
237
238 return help;
239 }
240
241 /// <summary>Boxcarring support method.</summary>
242 /// <param name="calls"><c>IList</c> of calls</param>
243 /// <returns><c>ArrayList</c> of results/faults.</returns>
244 [XmlRpcExposed]
245 public IList multiCall(IList calls)
246 {
247 IList responses = new ArrayList();
248 XmlRpcResponse fault = new XmlRpcResponse();
249
250 foreach (IDictionary call in calls)
251 {
252 try
253 {
254 XmlRpcRequest req = new XmlRpcRequest((String)call[XmlRpcXmlTokens.METHOD_NAME],
255 (ArrayList)call[XmlRpcXmlTokens.PARAMS]);
256 Object results = _server.Invoke(req);
257 IList response = new ArrayList();
258 response.Add(results);
259 responses.Add(response);
260 }
261 catch (XmlRpcException e)
262 {
263 fault.SetFault(e.FaultCode, e.FaultString);
264 responses.Add(fault.Value);
265 }
266 catch (Exception e2)
267 {
268 fault.SetFault(XmlRpcErrorCodes.APPLICATION_ERROR,
269 XmlRpcErrorCodes.APPLICATION_ERROR_MSG + ": " + e2.Message);
270 responses.Add(fault.Value);
271 }
272 }
273
274 return responses;
275 }
276
277 }
278}
279
diff --git a/Common/XmlRpcCS/XmlRpcXmlTokens.cs b/Common/XmlRpcCS/XmlRpcXmlTokens.cs
deleted file mode 100644
index 27447bb..0000000
--- a/Common/XmlRpcCS/XmlRpcXmlTokens.cs
+++ /dev/null
@@ -1,103 +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*/
28namespace Nwc.XmlRpc
29{
30 using System;
31
32 /// <summary>Class collecting <c>String</c> tokens that are part of XML-RPC files.</summary>
33 public class XmlRpcXmlTokens
34 {
35 /// <summary>C# formatting string to describe an ISO 8601 date.</summary>
36 public const String ISO_DATETIME = "yyyyMMdd\\THH\\:mm\\:ss";
37 /// <summary>Base64 field indicator.</summary>
38 /// <remarks>Corresponds to the &lt;base64&gt; tag.</remarks>
39 public const String BASE64 = "base64";
40 /// <summary>String field indicator.</summary>
41 /// <remarks>Corresponds to the &lt;string&gt; tag.</remarks>
42 public const String STRING = "string";
43 /// <summary>Integer field integer.</summary>
44 /// <remarks>Corresponds to the &lt;i4&gt; tag.</remarks>
45 public const String INT = "i4";
46 /// <summary>Alternate integer field indicator.</summary>
47 /// <remarks>Corresponds to the &lt;int&gt; tag.</remarks>
48 public const String ALT_INT = "int";
49 /// <summary>Date field indicator.</summary>
50 /// <remarks>Corresponds to the &lt;dateTime.iso8601&gt; tag.</remarks>
51 public const String DATETIME = "dateTime.iso8601";
52 /// <summary>Boolean field indicator.</summary>
53 /// <remarks>Corresponds to the &lt;boolean&gt; tag.</remarks>
54 public const String BOOLEAN = "boolean";
55 /// <summary>Value token.</summary>
56 /// <remarks>Corresponds to the &lt;value&gt; tag.</remarks>
57 public const String VALUE = "value";
58 /// <summary>Name token.</summary>
59 /// <remarks>Corresponds to the &lt;name&gt; tag.</remarks>
60 public const String NAME = "name";
61 /// <summary>Array field indicator..</summary>
62 /// <remarks>Corresponds to the &lt;array&gt; tag.</remarks>
63 public const String ARRAY = "array";
64 /// <summary>Data token.</summary>
65 /// <remarks>Corresponds to the &lt;data&gt; tag.</remarks>
66 public const String DATA = "data";
67 /// <summary>Member token.</summary>
68 /// <remarks>Corresponds to the &lt;member&gt; tag.</remarks>
69 public const String MEMBER = "member";
70 /// <summary>Stuct field indicator.</summary>
71 /// <remarks>Corresponds to the &lt;struct&gt; tag.</remarks>
72 public const String STRUCT = "struct";
73 /// <summary>Double field indicator.</summary>
74 /// <remarks>Corresponds to the &lt;double&gt; tag.</remarks>
75 public const String DOUBLE = "double";
76 /// <summary>Param token.</summary>
77 /// <remarks>Corresponds to the &lt;param&gt; tag.</remarks>
78 public const String PARAM = "param";
79 /// <summary>Params token.</summary>
80 /// <remarks>Corresponds to the &lt;params&gt; tag.</remarks>
81 public const String PARAMS = "params";
82 /// <summary>MethodCall token.</summary>
83 /// <remarks>Corresponds to the &lt;methodCall&gt; tag.</remarks>
84 public const String METHOD_CALL = "methodCall";
85 /// <summary>MethodName token.</summary>
86 /// <remarks>Corresponds to the &lt;methodName&gt; tag.</remarks>
87 public const String METHOD_NAME = "methodName";
88 /// <summary>MethodResponse token</summary>
89 /// <remarks>Corresponds to the &lt;methodResponse&gt; tag.</remarks>
90 public const String METHOD_RESPONSE = "methodResponse";
91 /// <summary>Fault response token.</summary>
92 /// <remarks>Corresponds to the &lt;fault&gt; tag.</remarks>
93 public const String FAULT = "fault";
94 /// <summary>FaultCode token.</summary>
95 /// <remarks>Corresponds to the &lt;faultCode&gt; tag.</remarks>
96 public const String FAULT_CODE = "faultCode";
97 /// <summary>FaultString token.</summary>
98 /// <remarks>Corresponds to the &lt;faultString&gt; tag.</remarks>
99 public const String FAULT_STRING = "faultString";
100 }
101}
102
103
diff --git a/OpenGridServices.build b/OpenGridServices.build
deleted file mode 100644
index 76874bd..0000000
--- a/OpenGridServices.build
+++ /dev/null
@@ -1,103 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGridServices" default="build">
3 <echo message="Using '${nant.settings.currentframework}' Framework"/>
4
5 <property name="bin.dir" value="bin" />
6 <property name="obj.dir" value="obj" />
7 <property name="doc.dir" value="doc" />
8 <property name="project.main.dir" value="${project::get-base-directory()}" />
9
10 <target name="Debug" description="">
11 <property name="project.config" value="Debug" />
12 <property name="build.debug" value="true" />
13 </target>
14
15 <property name="project.config" value="Release" />
16
17 <target name="Release" description="">
18 <property name="project.config" value="Release" />
19 <property name="build.debug" value="false" />
20 </target>
21
22 <target name="net-1.1" description="Sets framework to .NET 1.1">
23 <property name="nant.settings.currentframework" value="net-1.1" />
24 </target>
25
26 <target name="net-2.0" description="Sets framework to .NET 2.0">
27 <property name="nant.settings.currentframework" value="net-2.0" />
28 </target>
29
30 <target name="mono-2.0" description="Sets framework to mono 2.0">
31 <property name="nant.settings.currentframework" value="mono-2.0" />
32 </target>
33
34 <target name="mono-1.0" description="Sets framework to mono 1.0">
35 <property name="nant.settings.currentframework" value="mono-1.0" />
36 </target>
37
38 <target name="init" description="">
39 <call target="${project.config}" />
40 <sysinfo />
41 <echo message="Platform ${sys.os.platform}" />
42 <property name="build.dir" value="${bin.dir}/${project.config}" />
43 </target>
44
45 <target name="clean" description="">
46 <echo message="Deleting all builds from all configurations" />
47 <delete dir="${bin.dir}" failonerror="false" />
48 <delete dir="${obj.dir}" failonerror="false" />
49 <nant buildfile="OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="clean" />
50 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build" target="clean" />
51 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build" target="clean" />
52 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build" target="clean" />
53 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build" target="clean" />
54 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build" target="clean" />
55 <nant buildfile="OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build" target="clean" />
56 <nant buildfile="OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="clean" />
57 <nant buildfile="OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="clean" />
58 <nant buildfile="OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build" target="clean" />
59 <nant buildfile="OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="clean" />
60 <nant buildfile="OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="clean" />
61 <nant buildfile="OpenGridServices/ServiceManager/ServiceManager.exe.build" target="clean" />
62 </target>
63
64 <target name="build" depends="init" description="">
65 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build" target="build" />
66 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build" target="build" />
67 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build" target="build" />
68 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build" target="build" />
69 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build" target="build" />
70 <nant buildfile="OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build" target="build" />
71 <nant buildfile="OpenGridServices/ServiceManager/ServiceManager.exe.build" target="build" />
72 <nant buildfile="OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="build" />
73 <nant buildfile="OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="build" />
74 <nant buildfile="OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build" target="build" />
75 <nant buildfile="OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="build" />
76 <nant buildfile="OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="build" />
77 <nant buildfile="OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="build" />
78 </target>
79
80 <target name="build-release" depends="Release, init, build" description="Builds in Release mode" />
81
82 <target name="build-debug" depends="Debug, init, build" description="Builds in Debug mode" />
83
84 <target name="package" depends="clean, doc" description="Builds all" />
85
86 <target name="doc" depends="build-release">
87 <echo message="Generating all documentation from all builds" />
88 <nant buildfile="OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build" target="doc" />
89 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build" target="doc" />
90 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build" target="doc" />
91 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build" target="doc" />
92 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build" target="doc" />
93 <nant buildfile="OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build" target="doc" />
94 <nant buildfile="OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build" target="doc" />
95 <nant buildfile="OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build" target="doc" />
96 <nant buildfile="OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="doc" />
97 <nant buildfile="OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build" target="doc" />
98 <nant buildfile="OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="doc" />
99 <nant buildfile="OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build" target="doc" />
100 <nant buildfile="OpenGridServices/ServiceManager/ServiceManager.exe.build" target="doc" />
101 </target>
102
103</project>
diff --git a/OpenGridServices.sln b/OpenGridServices.sln
deleted file mode 100644
index 73e53c0..0000000
--- a/OpenGridServices.sln
+++ /dev/null
@@ -1,91 +0,0 @@
1Microsoft Visual Studio Solution File, Format Version 9.00
2# Visual Studio 2005
3Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Config.GridConfigDb4o", "OpenGridServices\OpenGrid.Config\GridConfigDb4o\OpenGrid.Config.GridConfigDb4o.csproj", "{B0027747-0000-0000-0000-000000000000}"
4EndProject
5Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data", "OpenGridServices\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj", "{62CDF671-0000-0000-0000-000000000000}"
6EndProject
7Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.DB4o", "OpenGridServices\OpenGrid.Framework.Data.DB4o\OpenGrid.Framework.Data.DB4o.csproj", "{39BD9497-0000-0000-0000-000000000000}"
8EndProject
9Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.MSSQL", "OpenGridServices\OpenGrid.Framework.Data.MSSQL\OpenGrid.Framework.Data.MSSQL.csproj", "{0A563AC1-0000-0000-0000-000000000000}"
10EndProject
11Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.MySQL", "OpenGridServices\OpenGrid.Framework.Data.MySQL\OpenGrid.Framework.Data.MySQL.csproj", "{0F3C3AC1-0000-0000-0000-000000000000}"
12EndProject
13Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Data.SQLite", "OpenGridServices\OpenGrid.Framework.Data.SQLite\OpenGrid.Framework.Data.SQLite.csproj", "{1E3F341A-0000-0000-0000-000000000000}"
14EndProject
15Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGrid.Framework.Manager", "OpenGridServices\OpenGrid.Framework.Manager\OpenGrid.Framework.Manager.csproj", "{7924FD35-0000-0000-0000-000000000000}"
16EndProject
17Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.AssetServer", "OpenGridServices\OpenGridServices.AssetServer\OpenGridServices.AssetServer.csproj", "{0021261B-0000-0000-0000-000000000000}"
18EndProject
19Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.GridServer", "OpenGridServices\OpenGridServices.GridServer\OpenGridServices.GridServer.csproj", "{21BFC8E2-0000-0000-0000-000000000000}"
20EndProject
21Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.InventoryServer", "OpenGridServices\OpenGridServices.InventoryServer\OpenGridServices.InventoryServer.csproj", "{338FA00B-0000-0000-0000-000000000000}"
22EndProject
23Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGridServices.UserServer", "OpenGridServices\OpenGridServices.UserServer\OpenGridServices.UserServer.csproj", "{66591469-0000-0000-0000-000000000000}"
24EndProject
25Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenUser.Config.UserConfigDb4o", "OpenGridServices\OpenUser.Config\UserConfigDb4o\OpenUser.Config.UserConfigDb4o.csproj", "{7E494328-0000-0000-0000-000000000000}"
26EndProject
27Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceManager", "OpenGridServices\ServiceManager\ServiceManager.csproj", "{E141F4EE-0000-0000-0000-000000000000}"
28EndProject
29Global
30 GlobalSection(SolutionConfigurationPlatforms) = preSolution
31 Debug|Any CPU = Debug|Any CPU
32 Release|Any CPU = Release|Any CPU
33 EndGlobalSection
34 GlobalSection(ProjectConfigurationPlatforms) = postSolution
35 {B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36 {B0027747-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
37 {B0027747-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
38 {B0027747-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
39 {62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40 {62CDF671-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
41 {62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
42 {62CDF671-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
43 {39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44 {39BD9497-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
45 {39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
46 {39BD9497-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
47 {0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48 {0A563AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
49 {0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
50 {0A563AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
51 {0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
52 {0F3C3AC1-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
53 {0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
54 {0F3C3AC1-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
55 {1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
56 {1E3F341A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
57 {1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
58 {1E3F341A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
59 {7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
60 {7924FD35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
61 {7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
62 {7924FD35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
63 {0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
64 {0021261B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
65 {0021261B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
66 {0021261B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
67 {21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
68 {21BFC8E2-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
69 {21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
70 {21BFC8E2-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
71 {338FA00B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
72 {338FA00B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
73 {338FA00B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
74 {338FA00B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
75 {66591469-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
76 {66591469-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
77 {66591469-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
78 {66591469-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
79 {7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
80 {7E494328-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
81 {7E494328-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
82 {7E494328-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
83 {E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
84 {E141F4EE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
85 {E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
86 {E141F4EE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
87 EndGlobalSection
88 GlobalSection(SolutionProperties) = preSolution
89 HideSolutionNode = FALSE
90 EndGlobalSection
91EndGlobal
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs
deleted file mode 100644
index c9701d6..0000000
--- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("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/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs
deleted file mode 100644
index e69515a..0000000
--- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs
+++ /dev/null
@@ -1,161 +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 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.MainConsole.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.MainConsole.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.MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team");
70
71 // Asset Options
72 this.DefaultAssetServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/");
73 this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to asset server","null");
74 this.AssetRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from asset server","null");
75
76 // User Server Options
77 this.DefaultUserServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/");
78 this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server","null");
79 this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server","null");
80
81 // Region Server Options
82 this.SimSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to sims","null");
83 this.SimRecvKey = OpenSim.Framework.Console.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.Instance.Warn("Config.cs:InitConfig() - Exception occured");
131 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
132 }
133
134 // Grid Settings
135 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Grid settings loaded:");
136 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Grid owner: " + this.GridOwner);
137
138 // Asset Settings
139 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Default asset server: " + this.DefaultAssetServer);
140 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey);
141 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey);
142
143 // User Settings
144 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Default user server: " + this.DefaultUserServer);
145 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to user server: " + this.UserSendKey);
146 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey);
147
148 // Region Settings
149 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to sims: " + this.SimSendKey);
150 OpenSim.Framework.Console.MainConsole.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/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj
deleted file mode 100644
index ddb48af..0000000
--- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj
+++ /dev/null
@@ -1,107 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{B0027747-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>OpenGrid.Config.GridConfigDb4o</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>OpenGrid.Config.GridConfigDb4o</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/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
deleted file mode 100644
index 075593b..0000000
--- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.Config.GridConfigDb4o" 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="OpenGrid.Config.GridConfigDb4o" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="DbGridConfig.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.Data.dll.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/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs
deleted file mode 100644
index 2b23131..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs
+++ /dev/null
@@ -1,161 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using OpenGrid.Framework.Data;
33using libsecondlife;
34
35
36namespace OpenGrid.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}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs
deleted file mode 100644
index 356a49c..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs
+++ /dev/null
@@ -1,165 +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 Db4objects.Db4o;
32using OpenGrid.Framework.Data;
33using libsecondlife;
34
35namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
deleted file mode 100644
index 315f48d..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
+++ /dev/null
@@ -1,205 +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 OpenGrid.Framework.Data;
32using libsecondlife;
33
34namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj
deleted file mode 100644
index d2d6140..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj
+++ /dev/null
@@ -1,111 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{39BD9497-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>OpenGrid.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>OpenGrid.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="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
84 <Name>OpenGrid.Framework.Data</Name>
85 <Project>{62CDF671-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/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build
deleted file mode 100644
index d82d751..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build
+++ /dev/null
@@ -1,47 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.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="OpenGrid.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/OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs
deleted file mode 100644
index dc4a9a1..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenGrid.Framework.Data.DB4o")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs
deleted file mode 100644
index 92169c4..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs
+++ /dev/null
@@ -1,190 +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 OpenGrid.Framework.Data;
32
33namespace OpenGrid.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
185 return false;
186 }
187 }
188
189
190}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs
deleted file mode 100644
index 475a3e7..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs
+++ /dev/null
@@ -1,214 +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.Data;
32
33using System.Data.SqlClient;
34
35using OpenGrid.Framework.Data;
36
37namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj
deleted file mode 100644
index fa18c28..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj
+++ /dev/null
@@ -1,104 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{0A563AC1-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>OpenGrid.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>OpenGrid.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="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
80 <Name>OpenGrid.Framework.Data</Name>
81 <Project>{62CDF671-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/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build
deleted file mode 100644
index 577da4b..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build
+++ /dev/null
@@ -1,45 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.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="OpenGrid.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/OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs
deleted file mode 100644
index bbe3cdf..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenGrid.Framework.Data.MSSQL")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
deleted file mode 100644
index d9a517d..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
+++ /dev/null
@@ -1,258 +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 OpenGrid.Framework.Data;
32
33namespace OpenGrid.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
257
258}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs
deleted file mode 100644
index fb429e4..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs
+++ /dev/null
@@ -1,309 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
deleted file mode 100644
index c88b39f..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
+++ /dev/null
@@ -1,107 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
deleted file mode 100644
index b42ec09..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
+++ /dev/null
@@ -1,665 +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.Data;
32
33// MySQL Native
34using MySql;
35using MySql.Data;
36using MySql.Data.Types;
37using MySql.Data.MySqlClient;
38
39using OpenGrid.Framework.Data;
40
41namespace OpenGrid.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 an agent row from a database reader
245 /// </summary>
246 /// <param name="reader">An active database reader</param>
247 /// <returns>A user session agent</returns>
248 public UserAgentData readAgentRow(IDataReader reader)
249 {
250 UserAgentData retval = new UserAgentData();
251
252 if (reader.Read())
253 {
254 // Agent IDs
255 retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
256 retval.sessionID = new libsecondlife.LLUUID((string)reader["sessionID"]);
257 retval.secureSessionID = new libsecondlife.LLUUID((string)reader["secureSessionID"]);
258
259 // Agent Who?
260 retval.agentIP = (string)reader["agentIP"];
261 retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString());
262 retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString());
263
264 // Login/Logout times (UNIX Epoch)
265 retval.loginTime = Convert.ToInt32(reader["loginTime"].ToString());
266 retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString());
267
268 // Current position
269 retval.currentRegion = (string)reader["currentRegion"];
270 retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString());
271 libsecondlife.LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos);
272 }
273 else
274 {
275 return null;
276 }
277 return retval;
278 }
279
280 /// <summary>
281 /// Reads a user profile from an active data reader
282 /// </summary>
283 /// <param name="reader">An active database reader</param>
284 /// <returns>A user profile</returns>
285 public UserProfileData readUserRow(IDataReader reader)
286 {
287 UserProfileData retval = new UserProfileData();
288
289 if (reader.Read())
290 {
291 retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
292 retval.username = (string)reader["username"];
293 retval.surname = (string)reader["lastname"];
294
295 retval.passwordHash = (string)reader["passwordHash"];
296 retval.passwordSalt = (string)reader["passwordSalt"];
297
298 retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
299 retval.homeLocation = new libsecondlife.LLVector3(
300 Convert.ToSingle(reader["homeLocationX"].ToString()),
301 Convert.ToSingle(reader["homeLocationY"].ToString()),
302 Convert.ToSingle(reader["homeLocationZ"].ToString()));
303 retval.homeLookAt = new libsecondlife.LLVector3(
304 Convert.ToSingle(reader["homeLookAtX"].ToString()),
305 Convert.ToSingle(reader["homeLookAtY"].ToString()),
306 Convert.ToSingle(reader["homeLookAtZ"].ToString()));
307
308 retval.created = Convert.ToInt32(reader["created"].ToString());
309 retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
310
311 retval.userInventoryURI = (string)reader["userInventoryURI"];
312 retval.userAssetURI = (string)reader["userAssetURI"];
313
314 retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
315 retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
316
317 retval.profileAboutText = (string)reader["profileAboutText"];
318 retval.profileFirstText = (string)reader["profileFirstText"];
319
320 retval.profileImage = new libsecondlife.LLUUID((string)reader["profileImage"]);
321 retval.profileFirstImage = new libsecondlife.LLUUID((string)reader["profileFirstImage"]);
322
323 }
324 else
325 {
326 return null;
327 }
328 return retval;
329 }
330
331 /// <summary>
332 /// Reads a list of inventory folders returned by a query.
333 /// </summary>
334 /// <param name="reader">A MySQL Data Reader</param>
335 /// <returns>A List containing inventory folders</returns>
336 public List<InventoryFolderBase> readInventoryFolders(IDataReader reader)
337 {
338 List<InventoryFolderBase> rows = new List<InventoryFolderBase>();
339
340 while(reader.Read())
341 {
342 try
343 {
344 InventoryFolderBase folder = new InventoryFolderBase();
345
346 folder.agentID = new libsecondlife.LLUUID((string)reader["agentID"]);
347 folder.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
348 folder.folderID = new libsecondlife.LLUUID((string)reader["folderID"]);
349 folder.name = (string)reader["folderName"];
350
351 rows.Add(folder);
352 }
353 catch (Exception e)
354 {
355 Console.WriteLine(e.ToString());
356 }
357 }
358
359 return rows;
360 }
361
362 /// <summary>
363 /// Reads a collection of items from an SQL result
364 /// </summary>
365 /// <param name="reader">The SQL Result</param>
366 /// <returns>A List containing Inventory Items</returns>
367 public List<InventoryItemBase> readInventoryItems(IDataReader reader)
368 {
369 List<InventoryItemBase> rows = new List<InventoryItemBase>();
370
371 while (reader.Read())
372 {
373 try
374 {
375 InventoryItemBase item = new InventoryItemBase();
376
377 item.assetID = new libsecondlife.LLUUID((string)reader["assetID"]);
378 item.avatarID = new libsecondlife.LLUUID((string)reader["avatarID"]);
379 item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString());
380 item.inventoryDescription = (string)reader["inventoryDescription"];
381 item.inventoryID = new libsecondlife.LLUUID((string)reader["inventoryID"]);
382 item.inventoryName = (string)reader["inventoryName"];
383 item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString());
384 item.parentFolderID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
385 item.type = Convert.ToInt32(reader["type"].ToString());
386
387 rows.Add(item);
388 }
389 catch (Exception e)
390 {
391 Console.WriteLine(e.ToString());
392 }
393 }
394
395 return rows;
396 }
397
398 /// <summary>
399 /// Inserts a new row into the log database
400 /// </summary>
401 /// <param name="serverDaemon">The daemon which triggered this event</param>
402 /// <param name="target">Who were we operating on when this occured (region UUID, user UUID, etc)</param>
403 /// <param name="methodCall">The method call where the problem occured</param>
404 /// <param name="arguments">The arguments passed to the method</param>
405 /// <param name="priority">How critical is this?</param>
406 /// <param name="logMessage">Extra message info</param>
407 /// <returns>Saved successfully?</returns>
408 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
409 {
410 string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES ";
411 sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)";
412
413 Dictionary<string, string> parameters = new Dictionary<string, string>();
414 parameters["?server"] = serverDaemon;
415 parameters["?target"] = target;
416 parameters["?method"] = methodCall;
417 parameters["?arguments"] = arguments;
418 parameters["?priority"] = priority.ToString();
419 parameters["?message"] = logMessage;
420
421 bool returnval = false;
422
423 try
424 {
425 IDbCommand result = Query(sql, parameters);
426
427 if (result.ExecuteNonQuery() == 1)
428 returnval = true;
429
430 result.Dispose();
431 }
432 catch (Exception e)
433 {
434 Console.WriteLine(e.ToString());
435 return false;
436 }
437
438 return returnval;
439 }
440
441 /// <summary>
442 /// Inserts a new item into the database
443 /// </summary>
444 /// <param name="item">The item</param>
445 /// <returns>Success?</returns>
446 public bool insertItem(InventoryItemBase item)
447 {
448 string sql = "REPLACE INTO inventoryitems (inventoryID, assetID, type, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions) VALUES ";
449 sql += "(?inventoryID, ?assetID, ?type, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription, ?inventoryNextPermissions, ?inventoryCurrentPermissions)";
450
451 Dictionary<string, string> parameters = new Dictionary<string, string>();
452 parameters["?inventoryID"] = item.inventoryID.ToStringHyphenated();
453 parameters["?assetID"] = item.assetID.ToStringHyphenated();
454 parameters["?type"] = item.type.ToString();
455 parameters["?parentFolderID"] = item.parentFolderID.ToStringHyphenated();
456 parameters["?avatarID"] = item.avatarID.ToStringHyphenated();
457 parameters["?inventoryName"] = item.inventoryName;
458 parameters["?inventoryDescription"] = item.inventoryDescription;
459 parameters["?inventoryNextPermissions"] = item.inventoryNextPermissions.ToString();
460 parameters["?inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString();
461
462 bool returnval = false;
463
464 try
465 {
466 IDbCommand result = Query(sql, parameters);
467
468 if (result.ExecuteNonQuery() == 1)
469 returnval = true;
470
471 result.Dispose();
472 }
473 catch (Exception e)
474 {
475 Console.WriteLine(e.ToString());
476 return false;
477 }
478
479 return returnval;
480 }
481
482 /// <summary>
483 /// Inserts a new folder into the database
484 /// </summary>
485 /// <param name="folder">The folder</param>
486 /// <returns>Success?</returns>
487 public bool insertFolder(InventoryFolderBase folder)
488 {
489 string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName) VALUES ";
490 sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName)";
491
492 Dictionary<string, string> parameters = new Dictionary<string, string>();
493 parameters["?folderID"] = folder.folderID.ToStringHyphenated();
494 parameters["?agentID"] = folder.agentID.ToStringHyphenated();
495 parameters["?parentFolderID"] = folder.parentID.ToStringHyphenated();
496 parameters["?folderName"] = folder.name;
497
498 bool returnval = false;
499 try
500 {
501 IDbCommand result = Query(sql, parameters);
502
503 if (result.ExecuteNonQuery() == 1)
504 returnval = true;
505
506 result.Dispose();
507 }
508 catch (Exception e)
509 {
510 Console.WriteLine(e.ToString());
511 return false;
512 }
513 return returnval;
514 }
515
516 /// <summary>
517 /// Creates a new user and inserts it into the database
518 /// </summary>
519 /// <param name="uuid">User ID</param>
520 /// <param name="username">First part of the login</param>
521 /// <param name="lastname">Second part of the login</param>
522 /// <param name="passwordHash">A salted hash of the users password</param>
523 /// <param name="passwordSalt">The salt used for the password hash</param>
524 /// <param name="homeRegion">A regionHandle of the users home region</param>
525 /// <param name="homeLocX">Home region position vector</param>
526 /// <param name="homeLocY">Home region position vector</param>
527 /// <param name="homeLocZ">Home region position vector</param>
528 /// <param name="homeLookAtX">Home region 'look at' vector</param>
529 /// <param name="homeLookAtY">Home region 'look at' vector</param>
530 /// <param name="homeLookAtZ">Home region 'look at' vector</param>
531 /// <param name="created">Account created (unix timestamp)</param>
532 /// <param name="lastlogin">Last login (unix timestamp)</param>
533 /// <param name="inventoryURI">Users inventory URI</param>
534 /// <param name="assetURI">Users asset URI</param>
535 /// <param name="canDoMask">I can do mask</param>
536 /// <param name="wantDoMask">I want to do mask</param>
537 /// <param name="aboutText">Profile text</param>
538 /// <param name="firstText">Firstlife text</param>
539 /// <param name="profileImage">UUID for profile image</param>
540 /// <param name="firstImage">UUID for firstlife image</param>
541 /// <returns>Success?</returns>
542 public bool insertUserRow(libsecondlife.LLUUID uuid, string username, string lastname, string passwordHash, string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
543 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string aboutText, string firstText,
544 libsecondlife.LLUUID profileImage, libsecondlife.LLUUID firstImage)
545 {
546 string sql = "INSERT INTO users (`UUID`, `username`, `lastname`, `passwordHash`, `passworldSalt`, `homeRegion`, ";
547 sql += "`homeLocationX`, `homeLocationY`, `homeLocationZ`, `homeLookAtX`, `homeLookAtY`, `homeLookAtZ`, `created`, ";
548 sql += "`lastLogin`, `userInventoryURI`, `userAssetURI`, `profileCanDoMask`, `profileWantDoMask`, `profileAboutText`, ";
549 sql += "`profileFirstText`, `profileImage`, profileFirstImage`) VALUES ";
550
551 sql += "(?UUID, ?username, ?lastname, ?passwordHash, ?passworldSalt, ?homeRegion, ";
552 sql += "?homeLocationX, ?homeLocationY, ?homeLocationZ, ?homeLookAtX`, ?homeLookAtY, ?homeLookAtZ, ?created, ";
553 sql += "?lastLogin`, ?userInventoryURI, ?userAssetURI, ?profileCanDoMask, ?profileWantDoMask, ?profileAboutText, ";
554 sql += "?profileFirstText, ?profileImage, ?profileFirstImage)";
555
556 Dictionary<string, string> parameters = new Dictionary<string, string>();
557 parameters["?UUID"] = uuid.ToStringHyphenated();
558 parameters["?username"] = username.ToString();
559 parameters["?lastname"] = lastname.ToString();
560 parameters["?passwordHash"] = passwordHash.ToString();
561 parameters["?passworldSalt"] = passwordSalt.ToString();
562 parameters["?homeRegion"] = homeRegion.ToString();
563 parameters["?homeLocationX"] = homeLocX.ToString();
564 parameters["?homeLocationY"] = homeLocY.ToString();
565 parameters["?homeLocationZ"] = homeLocZ.ToString();
566 parameters["?homeLookAtX"] = homeLookAtX.ToString();
567 parameters["?homeLookAtY"] = homeLookAtY.ToString();
568 parameters["?homeLookAtZ"] = homeLookAtZ.ToString();
569 parameters["?created"] = created.ToString();
570 parameters["?lastLogin"] = lastlogin.ToString();
571 parameters["?userInventoryURI"] = inventoryURI.ToString();
572 parameters["?userAssetURI"] = assetURI.ToString();
573 parameters["?profileCanDoMask"] = canDoMask.ToString();
574 parameters["?profileWantDoMask"] = wantDoMask.ToString();
575 parameters["?profileAboutText"] = aboutText.ToString();
576 parameters["?profileFirstText"] = firstText.ToString();
577 parameters["?profileImage"] = profileImage.ToStringHyphenated();
578 parameters["?profileFirstImage"] = firstImage.ToStringHyphenated();
579
580 bool returnval = false;
581
582 try
583 {
584 IDbCommand result = Query(sql, parameters);
585
586 if (result.ExecuteNonQuery() == 1)
587 returnval = true;
588
589 result.Dispose();
590 }
591 catch (Exception e)
592 {
593 Console.WriteLine(e.ToString());
594 return false;
595 }
596
597 return returnval;
598 }
599
600 /// <summary>
601 /// Inserts a new region into the database
602 /// </summary>
603 /// <param name="profile">The region to insert</param>
604 /// <returns>Success?</returns>
605 public bool insertRegion(SimProfileData regiondata)
606 {
607 string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
608 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
609 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture) VALUES ";
610
611 sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, ";
612 sql += "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, ";
613 sql += "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture);";
614
615 Dictionary<string, string> parameters = new Dictionary<string, string>();
616
617 parameters["?regionHandle"] = regiondata.regionHandle.ToString();
618 parameters["?regionName"] = regiondata.regionName.ToString();
619 parameters["?uuid"] = regiondata.UUID.ToStringHyphenated();
620 parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString();
621 parameters["?regionSecret"] = regiondata.regionSecret.ToString();
622 parameters["?regionSendKey"] = regiondata.regionSendKey.ToString();
623 parameters["?regionDataURI"] = regiondata.regionDataURI.ToString();
624 parameters["?serverIP"] = regiondata.serverIP.ToString();
625 parameters["?serverPort"] = regiondata.serverPort.ToString();
626 parameters["?serverURI"] = regiondata.serverURI.ToString();
627 parameters["?locX"] = regiondata.regionLocX.ToString();
628 parameters["?locY"] = regiondata.regionLocY.ToString();
629 parameters["?locZ"] = regiondata.regionLocZ.ToString();
630 parameters["?eastOverrideHandle"] = regiondata.regionEastOverrideHandle.ToString();
631 parameters["?westOverrideHandle"] = regiondata.regionWestOverrideHandle.ToString();
632 parameters["?northOverrideHandle"] = regiondata.regionNorthOverrideHandle.ToString();
633 parameters["?southOverrideHandle"] = regiondata.regionSouthOverrideHandle.ToString();
634 parameters["?regionAssetURI"] = regiondata.regionAssetURI.ToString();
635 parameters["?regionAssetRecvKey"] = regiondata.regionAssetRecvKey.ToString();
636 parameters["?regionAssetSendKey"] = regiondata.regionAssetSendKey.ToString();
637 parameters["?regionUserURI"] = regiondata.regionUserURI.ToString();
638 parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString();
639 parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString();
640 parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated();
641
642 bool returnval = false;
643
644 try
645 {
646
647 IDbCommand result = Query(sql, parameters);
648
649 //Console.WriteLine(result.CommandText);
650
651 if (result.ExecuteNonQuery() == 1)
652 returnval = true;
653
654 result.Dispose();
655 }
656 catch (Exception e)
657 {
658 Console.WriteLine(e.ToString());
659 return false;
660 }
661
662 return returnval;
663 }
664 }
665}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs
deleted file mode 100644
index e988c94..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs
+++ /dev/null
@@ -1,271 +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 OpenGrid.Framework.Data;
32using libsecondlife;
33
34namespace OpenGrid.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 try
204 {
205 lock (database)
206 {
207 database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z,
208 user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI, user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask,
209 user.profileAboutText, user.profileFirstText, user.profileImage, user.profileFirstImage);
210 }
211 }
212 catch (Exception e)
213 {
214 database.Reconnect();
215 Console.WriteLine(e.ToString());
216 }
217 }
218
219 /// <summary>
220 /// Creates a new agent
221 /// </summary>
222 /// <param name="agent">The agent to create</param>
223 public void addNewUserAgent(UserAgentData agent)
224 {
225 // Do nothing.
226 }
227
228 /// <summary>
229 /// Performs a money transfer request between two accounts
230 /// </summary>
231 /// <param name="from">The senders account ID</param>
232 /// <param name="to">The recievers account ID</param>
233 /// <param name="amount">The amount to transfer</param>
234 /// <returns>Success?</returns>
235 public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
236 {
237 return false;
238 }
239
240 /// <summary>
241 /// Performs an inventory transfer request between two accounts
242 /// </summary>
243 /// <remarks>TODO: Move to inventory server</remarks>
244 /// <param name="from">The senders account ID</param>
245 /// <param name="to">The recievers account ID</param>
246 /// <param name="item">The item to transfer</param>
247 /// <returns>Success?</returns>
248 public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
249 {
250 return false;
251 }
252
253 /// <summary>
254 /// Database provider name
255 /// </summary>
256 /// <returns>Provider name</returns>
257 public string getName()
258 {
259 return "MySQL Userdata Interface";
260 }
261
262 /// <summary>
263 /// Database provider version
264 /// </summary>
265 /// <returns>provider version</returns>
266 public string getVersion()
267 {
268 return "0.1";
269 }
270 }
271}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj
deleted file mode 100644
index cc3aacb..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj
+++ /dev/null
@@ -1,117 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{0F3C3AC1-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>OpenGrid.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>OpenGrid.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="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
84 <Name>OpenGrid.Framework.Data</Name>
85 <Project>{62CDF671-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/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build
deleted file mode 100644
index a5f4028..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build
+++ /dev/null
@@ -1,49 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.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="OpenGrid.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/OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs
deleted file mode 100644
index 0bfd1d6..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenGrid.Framework.Data.MySQL")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj
deleted file mode 100644
index 63d0bd9..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj
+++ /dev/null
@@ -1,108 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{1E3F341A-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>OpenGrid.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>OpenGrid.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="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
84 <Name>OpenGrid.Framework.Data</Name>
85 <Project>{62CDF671-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/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build
deleted file mode 100644
index 79b0edf..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.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="OpenGrid.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/OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs
deleted file mode 100644
index 57c4bae..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenGrid.Framework.Data.SQLite")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs
deleted file mode 100644
index 94ed46f..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs
+++ /dev/null
@@ -1,190 +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 OpenGrid.Framework.Data;
32
33namespace OpenGrid.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
189
190}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs
deleted file mode 100644
index 9689356..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs
+++ /dev/null
@@ -1,209 +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.Data;
32
33using System.Data.SQLite;
34
35using OpenGrid.Framework.Data;
36
37namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data/GridData.cs b/OpenGridServices/OpenGrid.Framework.Data/GridData.cs
deleted file mode 100644
index e9fb215..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/GridData.cs
+++ /dev/null
@@ -1,110 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenGrid.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}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs b/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs
deleted file mode 100644
index 2ac0bfe..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs b/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs
deleted file mode 100644
index d17afac..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs
+++ /dev/null
@@ -1,100 +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.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 OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs b/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs
deleted file mode 100644
index 12f559b..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs
+++ /dev/null
@@ -1,187 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
deleted file mode 100644
index 0b53b02..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
+++ /dev/null
@@ -1,113 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{62CDF671-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>OpenGrid.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>OpenGrid.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="SimProfileData.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="UserData.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="UserProfileData.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="Properties\AssemblyInfo.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 </ItemGroup>
106 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
107 <PropertyGroup>
108 <PreBuildEvent>
109 </PreBuildEvent>
110 <PostBuildEvent>
111 </PostBuildEvent>
112 </PropertyGroup>
113</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build
deleted file mode 100644
index 7abebeb..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build
+++ /dev/null
@@ -1,49 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.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="OpenGrid.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="SimProfileData.cs" />
19 <include name="UserData.cs" />
20 <include name="UserProfileData.cs" />
21 <include name="Properties/AssemblyInfo.cs" />
22 </sources>
23 <references basedir="${project::get-base-directory()}">
24 <lib>
25 <include name="${project::get-base-directory()}" />
26 <include name="${project::get-base-directory()}/${build.dir}" />
27 </lib>
28 <include name="../../bin/libsecondlife.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/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs
deleted file mode 100644
index 1446673..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenGrid.Framework.Data")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs b/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs
deleted file mode 100644
index a3e7cb7..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs
+++ /dev/null
@@ -1,114 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data/UserData.cs b/OpenGridServices/OpenGrid.Framework.Data/UserData.cs
deleted file mode 100644
index c2d5a72..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/UserData.cs
+++ /dev/null
@@ -1,131 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs b/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs
deleted file mode 100644
index 82633e1..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs
+++ /dev/null
@@ -1,182 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs b/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
deleted file mode 100644
index dfc572a..0000000
--- a/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
+++ /dev/null
@@ -1,140 +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 Nwc.XmlRpc;
29using OpenSim.Framework;
30using OpenSim.Servers;
31using System.Collections;
32using System.Collections.Generic;
33using libsecondlife;
34
35namespace OpenGrid.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 OpenGrid.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/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs b/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
deleted file mode 100644
index d665ab4..0000000
--- a/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using Nwc.XmlRpc;
33using System.Threading;
34using libsecondlife;
35
36namespace OpenGrid.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/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj
deleted file mode 100644
index 83ba00f..0000000
--- a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj
+++ /dev/null
@@ -1,99 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{7924FD35-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>OpenGrid.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>OpenGrid.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.dll" >
66 <HintPath>..\..\bin\OpenSim.Framework.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="OpenSim.Servers.dll" >
70 <HintPath>..\..\bin\OpenSim.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" >
78 <HintPath>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/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build
deleted file mode 100644
index 9430ab9..0000000
--- a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build
+++ /dev/null
@@ -1,44 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.Framework.Manager" 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="OpenGrid.Framework.Manager" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="GridManagementAgent.cs" />
15 <include name="GridServerManager.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.Servers.dll" />
25 <include name="System.dll" />
26 <include name="../../bin/XMLRPC.dll" />
27 </references>
28 </csc>
29 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
30 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
31 <copy todir="${project::get-base-directory()}/../../bin/">
32 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
33 <include name="*.dll"/>
34 <include name="*.exe"/>
35 </fileset>
36 </copy>
37 </target>
38 <target name="clean">
39 <delete dir="${bin.dir}" failonerror="false" />
40 <delete dir="${obj.dir}" failonerror="false" />
41 </target>
42 <target name="doc" description="Creates documentation.">
43 </target>
44</project>
diff --git a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs
deleted file mode 100644
index 6fc6bf8..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs
+++ /dev/null
@@ -1,130 +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.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.Servers;
39
40namespace OpenGridServices.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/OpenGridServices/OpenGridServices.AssetServer/Main.cs b/OpenGridServices/OpenGridServices.AssetServer/Main.cs
deleted file mode 100644
index e9b94ea..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/Main.cs
+++ /dev/null
@@ -1,338 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.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.GridInterfaces.Local; // REFACTORING IS NEEDED!!!!!!!!!!!
44using OpenSim.Servers;
45using Db4objects.Db4o;
46using Db4objects.Db4o.Query;
47
48namespace OpenGridServices.AssetServer
49{
50 /// <summary>
51 /// An asset server
52 /// </summary>
53 public class OpenAsset_Main : BaseServer, conscmd_callback
54 {
55 private IObjectContainer db;
56
57 public static OpenAsset_Main assetserver;
58
59 private ConsoleBase m_console;
60
61 [STAThread]
62 public static void Main(string[] args)
63 {
64 Console.WriteLine("Starting...\n");
65
66 assetserver = new OpenAsset_Main();
67 assetserver.Startup();
68
69 assetserver.Work();
70 }
71
72 private void Work()
73 {
74 m_console.Notice("Enter help for a list of commands");
75
76 while (true)
77 {
78 m_console.MainConsolePrompt();
79 }
80 }
81
82 private OpenAsset_Main()
83 {
84 m_console = new ConsoleBase("opengrid-AssetServer-console.log", "OpenAsset", this, false);
85 MainConsole.Instance = m_console;
86 }
87
88 public void Startup()
89 {
90 m_console.Verbose( "Main.cs:Startup() - Setting up asset DB");
91 setupDB();
92
93 m_console.Verbose( "Main.cs:Startup() - Starting HTTP process");
94 AssetHttpServer httpServer = new AssetHttpServer(8003);
95
96
97 httpServer.AddRestHandler("GET", "/assets/", this.assetGetMethod);
98 httpServer.AddRestHandler("POST", "/assets/", this.assetPostMethod);
99
100 httpServer.Start();
101
102 }
103
104 public string assetPostMethod(string requestBody, string path, string param)
105 {
106 AssetBase asset = new AssetBase();
107 asset.Name = "";
108 asset.FullID = new LLUUID(param);
109 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
110 byte[] buffer = Windows1252Encoding.GetBytes(requestBody);
111 asset.Data = buffer;
112 AssetStorage store = new AssetStorage();
113 store.Data = asset.Data;
114 store.Name = asset.Name;
115 store.UUID = asset.FullID;
116 db.Set(store);
117 db.Commit();
118 return "";
119 }
120
121 public string assetGetMethod(string request, string path, string param)
122 {
123 Console.WriteLine("got a request " + param);
124 byte[] assetdata = getAssetData(new LLUUID(param), false);
125 if (assetdata != null)
126 {
127 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
128 string ret = Windows1252Encoding.GetString(assetdata);
129 //string ret = System.Text.Encoding.Unicode.GetString(assetdata);
130
131 return ret;
132
133 }
134 else
135 {
136 return "";
137 }
138
139 }
140
141 public byte[] getAssetData(LLUUID assetID, bool isTexture)
142 {
143 bool found = false;
144 AssetStorage foundAsset = null;
145
146 IObjectSet result = db.Get(new AssetStorage(assetID));
147 if (result.Count > 0)
148 {
149 foundAsset = (AssetStorage)result.Next();
150 found = true;
151 }
152
153 if (found)
154 {
155 return foundAsset.Data;
156 }
157 else
158 {
159 return null;
160 }
161 }
162
163 public void setupDB()
164 {
165 bool yapfile = System.IO.File.Exists("assets.yap");
166 try
167 {
168 db = Db4oFactory.OpenFile("assets.yap");
169 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Main.cs:setupDB() - creation");
170 }
171 catch (Exception e)
172 {
173 db.Close();
174 OpenSim.Framework.Console.MainConsole.Instance.Warn("Main.cs:setupDB() - Exception occured");
175 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
176 }
177 if (!yapfile)
178 {
179 this.LoadDB();
180 }
181 }
182
183 public void LoadDB()
184 {
185 try
186 {
187
188 Console.WriteLine("setting up Asset database");
189
190 AssetBase Image = new AssetBase();
191 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
192 Image.Name = "Bricks";
193 this.LoadAsset(Image, true, "bricks.jp2");
194 AssetStorage store = new AssetStorage();
195 store.Data = Image.Data;
196 store.Name = Image.Name;
197 store.UUID = Image.FullID;
198 db.Set(store);
199 db.Commit();
200
201 Image = new AssetBase();
202 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002");
203 Image.Name = "Plywood";
204 this.LoadAsset(Image, true, "plywood.jp2");
205 store = new AssetStorage();
206 store.Data = Image.Data;
207 store.Name = Image.Name;
208 store.UUID = Image.FullID;
209 db.Set(store);
210 db.Commit();
211
212 Image = new AssetBase();
213 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003");
214 Image.Name = "Rocks";
215 this.LoadAsset(Image, true, "rocks.jp2");
216 store = new AssetStorage();
217 store.Data = Image.Data;
218 store.Name = Image.Name;
219 store.UUID = Image.FullID;
220 db.Set(store);
221 db.Commit();
222
223 Image = new AssetBase();
224 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004");
225 Image.Name = "Granite";
226 this.LoadAsset(Image, true, "granite.jp2");
227 store = new AssetStorage();
228 store.Data = Image.Data;
229 store.Name = Image.Name;
230 store.UUID = Image.FullID;
231 db.Set(store);
232 db.Commit();
233
234 Image = new AssetBase();
235 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005");
236 Image.Name = "Hardwood";
237 this.LoadAsset(Image, true, "hardwood.jp2");
238 store = new AssetStorage();
239 store.Data = Image.Data;
240 store.Name = Image.Name;
241 store.UUID = Image.FullID;
242 db.Set(store);
243 db.Commit();
244
245 Image = new AssetBase();
246 Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005");
247 Image.Name = "Prim Base Texture";
248 this.LoadAsset(Image, true, "plywood.jp2");
249 store = new AssetStorage();
250 store.Data = Image.Data;
251 store.Name = Image.Name;
252 store.UUID = Image.FullID;
253 db.Set(store);
254 db.Commit();
255
256 Image = new AssetBase();
257 Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
258 Image.Name = "Shape";
259 this.LoadAsset(Image, false, "base_shape.dat");
260 store = new AssetStorage();
261 store.Data = Image.Data;
262 store.Name = Image.Name;
263 store.UUID = Image.FullID;
264 db.Set(store);
265 db.Commit();
266 }
267 catch (Exception e)
268 {
269 Console.WriteLine(e.Message);
270 }
271 }
272
273 private void LoadAsset(AssetBase info, bool image, string filename)
274 {
275
276
277 string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
278 string fileName = Path.Combine(dataPath, filename);
279 FileInfo fInfo = new FileInfo(fileName);
280 long numBytes = fInfo.Length;
281 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
282 byte[] idata = new byte[numBytes];
283 BinaryReader br = new BinaryReader(fStream);
284 idata = br.ReadBytes((int)numBytes);
285 br.Close();
286 fStream.Close();
287 info.Data = idata;
288 //info.loaded=true;
289 }
290
291 /*private GridConfig LoadConfigDll(string dllName)
292 {
293 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
294 GridConfig config = null;
295
296 foreach (Type pluginType in pluginAssembly.GetTypes())
297 {
298 if (pluginType.IsPublic)
299 {
300 if (!pluginType.IsAbstract)
301 {
302 Type typeInterface = pluginType.GetInterface("IGridConfig", true);
303
304 if (typeInterface != null)
305 {
306 IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
307 config = plug.GetConfigObject();
308 break;
309 }
310
311 typeInterface = null;
312 }
313 }
314 }
315 pluginAssembly = null;
316 return config;
317 }*/
318
319 public void RunCmd(string cmd, string[] cmdparams)
320 {
321 switch (cmd)
322 {
323 case "help":
324 m_console.Notice("shutdown - shutdown this asset server (USE CAUTION!)");
325 break;
326
327 case "shutdown":
328 m_console.Close();
329 Environment.Exit(0);
330 break;
331 }
332 }
333
334 public void Show(string ShowWhat)
335 {
336 }
337 }
338}
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
deleted file mode 100644
index 50ffb36..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
+++ /dev/null
@@ -1,122 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{0021261B-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>OpenGridServices.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>OpenGridServices.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.GridInterfaces.Local" >
78 <HintPath>OpenSim.GridInterfaces.Local.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="OpenSim.Servers" >
82 <HintPath>OpenSim.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" >
98 <HintPath>XMLRPC.dll</HintPath>
99 <Private>False</Private>
100 </Reference>
101 </ItemGroup>
102 <ItemGroup>
103 </ItemGroup>
104 <ItemGroup>
105 <Compile Include="AssetHttpServer.cs">
106 <SubType>Code</SubType>
107 </Compile>
108 <Compile Include="Main.cs">
109 <SubType>Code</SubType>
110 </Compile>
111 <Compile Include="Properties\AssemblyInfo.cs">
112 <SubType>Code</SubType>
113 </Compile>
114 </ItemGroup>
115 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
116 <PropertyGroup>
117 <PreBuildEvent>
118 </PreBuildEvent>
119 <PostBuildEvent>
120 </PostBuildEvent>
121 </PropertyGroup>
122</Project>
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build
deleted file mode 100644
index 808f015..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build
+++ /dev/null
@@ -1,50 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGridServices.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="OpenGridServices.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="../../bin/OpenSim.Framework.dll" />
26 <include name="../../bin/OpenSim.Framework.Console.dll" />
27 <include name="../../bin/OpenSim.GridInterfaces.Local.dll" />
28 <include name="../../bin/OpenSim.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/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj
deleted file mode 100644
index 9b8cc87..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj
+++ /dev/null
@@ -1,126 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{21BFC8E2-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>OpenGridServices.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>OpenGridServices.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="System" >
62 <HintPath>System.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System.Data" >
66 <HintPath>System.Data.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="libsecondlife.dll" >
74 <HintPath>..\bin\libsecondlife.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="Db4objects.Db4o.dll" >
78 <HintPath>..\bin\Db4objects.Db4o.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
84 <Name>OpenSim.Framework</Name>
85 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private>
88 </ProjectReference>
89 <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
90 <Name>OpenSim.Framework.Console</Name>
91 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private>
94 </ProjectReference>
95 <ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj">
96 <Name>OpenSim.Servers</Name>
97 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
99 <Private>False</Private>
100 </ProjectReference>
101 <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
102 <Name>XMLRPC</Name>
103 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
105 <Private>False</Private>
106 </ProjectReference>
107 </ItemGroup>
108 <ItemGroup>
109 <Compile Include="Main.cs">
110 <SubType>Code</SubType>
111 </Compile>
112 <Compile Include="SimProfiles.cs">
113 <SubType>Code</SubType>
114 </Compile>
115 <Compile Include="Properties\AssemblyInfo.cs">
116 <SubType>Code</SubType>
117 </Compile>
118 </ItemGroup>
119 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
120 <PropertyGroup>
121 <PreBuildEvent>
122 </PreBuildEvent>
123 <PostBuildEvent>
124 </PostBuildEvent>
125 </PropertyGroup>
126</Project>
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build
deleted file mode 100644
index 6bef534..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build
+++ /dev/null
@@ -1,49 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGridServices.GridServer" 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" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
11 <resources prefix="OpenGridServices.GridServer" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="Main.cs" />
15 <include name="SimProfiles.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="System.dll" />
24 <include name="System.Data.dll" />
25 <include name="System.Xml.dll" />
26 <include name="../bin/OpenSim.Framework.dll" />
27 <include name="../bin/OpenSim.Framework.Console.dll" />
28 <include name="../bin/OpenSim.Servers.dll" />
29 <include name="../bin/libsecondlife.dll" />
30 <include name="../bin/Db4objects.Db4o.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/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs
deleted file mode 100644
index 7014284..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OGS-AssetServer")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OGS-AssetServer")]
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("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
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/OpenGridServices/OpenGridServices.GridServer/GridManager.cs b/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
deleted file mode 100644
index 45d3676..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
+++ /dev/null
@@ -1,589 +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;
30using System.Collections.Generic;
31using System.Text;
32using System.Reflection;
33using OpenGrid.Framework.Data;
34using OpenSim.Framework.Utilities;
35using OpenSim.Framework.Console;
36using OpenSim.Framework.Sims;
37using libsecondlife;
38using Nwc.XmlRpc;
39using System.Xml;
40
41namespace OpenGridServices.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.MainConsole.Instance.Verbose("Storage: Attempting to load " + FileName);
57 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
58
59 OpenSim.Framework.Console.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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 try
565 {
566 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
567 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
568 {
569 try
570 {
571 kvp.Value.AddProfile(TheSim);
572 OpenSim.Framework.Console.MainConsole.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")");
573 logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid.");
574 }
575 catch (Exception e)
576 {
577 OpenSim.Framework.Console.MainConsole.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString());
578 }
579 }
580 return "OK";
581 }
582 catch (Exception e)
583 {
584 return "ERROR! Could not save to database! (" + e.ToString() + ")";
585 }
586 }
587
588 }
589}
diff --git a/OpenGridServices/OpenGridServices.GridServer/Main.cs b/OpenGridServices/OpenGridServices.GridServer/Main.cs
deleted file mode 100644
index 9a7eb00..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/Main.cs
+++ /dev/null
@@ -1,271 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.IO;
31using System.Text;
32using System.Timers;
33using System.Net;
34using System.Threading;
35using System.Reflection;
36using libsecondlife;
37using OpenGrid.Framework.Manager;
38using OpenSim.Framework;
39using OpenSim.Framework.Sims;
40using OpenSim.Framework.Console;
41using OpenSim.Framework.Interfaces;
42using OpenSim.Servers;
43using OpenSim.GenericConfig;
44
45namespace OpenGridServices.GridServer
46{
47 /// <summary>
48 /// </summary>
49 public class OpenGrid_Main : BaseServer, conscmd_callback
50 {
51 private string ConfigDll = "OpenGrid.Config.GridConfigDb4o.dll";
52 private string GridDll = "OpenGrid.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 ConsoleBase 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 ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
95 MainConsole.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 = "OpenGrid.Framework.Data.DB4o.dll";
257 configData.SetAttribute("DataBaseProvider", "OpenGrid.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/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj
deleted file mode 100644
index 55a0e02..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj
+++ /dev/null
@@ -1,134 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{21BFC8E2-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>OpenGridServices.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>OpenGridServices.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.GenericConfig.Xml" >
78 <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="OpenSim.Servers" >
82 <HintPath>OpenSim.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" >
98 <HintPath>XMLRPC.dll</HintPath>
99 <Private>False</Private>
100 </Reference>
101 </ItemGroup>
102 <ItemGroup>
103 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
104 <Name>OpenGrid.Framework.Data</Name>
105 <Project>{62CDF671-0000-0000-0000-000000000000}</Project>
106 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
107 <Private>False</Private>
108 </ProjectReference>
109 <ProjectReference Include="..\OpenGrid.Framework.Manager\OpenGrid.Framework.Manager.csproj">
110 <Name>OpenGrid.Framework.Manager</Name>
111 <Project>{7924FD35-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/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
deleted file mode 100644
index 60c0f85..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
+++ /dev/null
@@ -1,52 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGridServices.GridServer" 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="OpenGridServices.GridServer" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="GridManager.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="../../bin/OpenGrid.Framework.Data.dll" />
26 <include name="../../bin/OpenGrid.Framework.Manager.dll" />
27 <include name="../../bin/OpenSim.Framework.dll" />
28 <include name="../../bin/OpenSim.Framework.Console.dll" />
29 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
30 <include name="../../bin/OpenSim.Servers.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/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs
deleted file mode 100644
index 8471e6b..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OGS-GridServer")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OGS-GridServer")]
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("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
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/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs b/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs
deleted file mode 100644
index 928e7c6..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs
+++ /dev/null
@@ -1,126 +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;
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
111// responseData["rootfolders"] =
112 }
113 }
114 else
115 {
116 responseData["error"] = "No access-type specified.";
117 }
118
119
120 // Stuff stops happening here
121
122 response.Value = responseData;
123 return response;
124 }
125 }
126}
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/Main.cs b/OpenGridServices/OpenGridServices.InventoryServer/Main.cs
deleted file mode 100644
index f479a79..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/Main.cs
+++ /dev/null
@@ -1,87 +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;
30using System.Collections.Generic;
31using System.Reflection;
32using System.IO;
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;
42
43namespace OpenGridServices.InventoryServer
44{
45 public class OpenInventory_Main : BaseServer, conscmd_callback
46 {
47 ConsoleBase m_console;
48 InventoryManager m_inventoryManager;
49
50 public static void Main(string[] args)
51 {
52 }
53
54 public OpenInventory_Main()
55 {
56 m_console = new ConsoleBase("opengrid-inventory-console.log", "OpenInventory", this, false);
57 MainConsole.Instance = m_console;
58 }
59
60 public void Startup()
61 {
62 MainConsole.Instance.Notice("Initialising inventory manager...");
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
70 }
71
72 public void RunCmd(string cmd, string[] cmdparams)
73 {
74 switch (cmd)
75 {
76 case "shutdown":
77 m_console.Close();
78 Environment.Exit(0);
79 break;
80 }
81 }
82
83 public void Show(string ShowWhat)
84 {
85 }
86 }
87}
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj
deleted file mode 100644
index b5a25bf..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj
+++ /dev/null
@@ -1,125 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{338FA00B-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>OpenGridServices.InventoryServer</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>OpenGridServices.InventoryServer</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.GridInterfaces.Local" >
78 <HintPath>OpenSim.GridInterfaces.Local.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="OpenSim.Servers" >
82 <HintPath>OpenSim.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" >
98 <HintPath>XMLRPC.dll</HintPath>
99 <Private>False</Private>
100 </Reference>
101 </ItemGroup>
102 <ItemGroup>
103 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
104 <Name>OpenGrid.Framework.Data</Name>
105 <Project>{62CDF671-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="InventoryManager.cs">
112 <SubType>Code</SubType>
113 </Compile>
114 <Compile Include="Main.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/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj.user b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj.user
deleted file mode 100644
index 179959e..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>E:\work\oslauth\sim\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build
deleted file mode 100644
index 5e67af1..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build
+++ /dev/null
@@ -1,50 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGridServices.InventoryServer" 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="OpenGridServices.InventoryServer" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="InventoryManager.cs" />
15 <include name="Main.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/OpenGrid.Framework.Data.dll" />
25 <include name="../../bin/OpenSim.Framework.dll" />
26 <include name="../../bin/OpenSim.Framework.Console.dll" />
27 <include name="../../bin/OpenSim.GridInterfaces.Local.dll" />
28 <include name="../../bin/OpenSim.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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds
deleted file mode 100644
index ed7bc24..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds
+++ /dev/null
@@ -1,16 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs
deleted file mode 100644
index f221509..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs
+++ /dev/null
@@ -1,39 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks
deleted file mode 100644
index d887d0e..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks
+++ /dev/null
@@ -1,2 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs
deleted file mode 100644
index af4e275..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs
+++ /dev/null
@@ -1,32 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs
deleted file mode 100644
index 83685fc..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs
+++ /dev/null
@@ -1,33 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs
deleted file mode 100644
index 0d509ef..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs
+++ /dev/null
@@ -1,16 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
deleted file mode 100644
index 8a80b1d..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
+++ /dev/null
@@ -1,29 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
deleted file mode 100644
index 6b632d6..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
+++ /dev/null
@@ -1,106 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs
deleted file mode 100644
index 42e09e0..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs
+++ /dev/null
@@ -1,96 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs
deleted file mode 100644
index 1db38f0..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs
+++ /dev/null
@@ -1,76 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp
deleted file mode 100644
index cfdc085..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp
+++ /dev/null
@@ -1,43 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb
deleted file mode 100644
index 44e7a61..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb
+++ /dev/null
Binary files differ
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs
deleted file mode 100644
index 00f7c65..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs
+++ /dev/null
@@ -1,37 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs
deleted file mode 100644
index 5bf7ff9..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs
+++ /dev/null
@@ -1,133 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
deleted file mode 100644
index da6739e..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
+++ /dev/null
@@ -1,226 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
deleted file mode 100644
index 8798dac..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
+++ /dev/null
@@ -1,256 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs
deleted file mode 100644
index dd4abdd..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs
+++ /dev/null
@@ -1,35 +0,0 @@
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/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
deleted file mode 100644
index c883f08..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
+++ /dev/null
@@ -1,502 +0,0 @@
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/OpenGridServices/OpenGridServices.UserServer/Main.cs b/OpenGridServices/OpenGridServices.UserServer/Main.cs
deleted file mode 100644
index bb20576..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/Main.cs
+++ /dev/null
@@ -1,216 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using System.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.Servers;
42using OpenSim.Framework.Utilities;
43using OpenSim.GenericConfig;
44
45namespace OpenGridServices.UserServer
46{
47 /// <summary>
48 /// </summary>
49 public class OpenUser_Main : BaseServer, conscmd_callback
50 {
51 private string ConfigDll = "OpenUser.Config.UserConfigDb4o.dll";
52 private string StorageDll = "OpenGrid.Framework.Data.MySQL.dll";
53 private UserConfig Cfg;
54 protected IGenericConfig localXMLConfig;
55
56 public UserManager m_userManager; // Replaces below.
57
58 //private UserProfileManager m_userProfileManager; // Depreciated
59
60 public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>();
61
62 ConsoleBase m_console;
63
64 [STAThread]
65 public static void Main(string[] args)
66 {
67 Console.WriteLine("Starting...\n");
68
69 OpenUser_Main userserver = new OpenUser_Main();
70
71 userserver.Startup();
72 userserver.Work();
73 }
74
75 private OpenUser_Main()
76 {
77 m_console = new ConsoleBase("opengrid-userserver-console.log", "OpenUser", this , false);
78 MainConsole.Instance = m_console;
79 }
80
81 private void Work()
82 {
83 m_console.Notice("Enter help for a list of commands\n");
84
85 while (true)
86 {
87 m_console.MainConsolePrompt();
88 }
89 }
90
91 public void Startup()
92 {
93 this.localXMLConfig = new XmlConfig("UserServerConfig.xml");
94 this.localXMLConfig.LoadData();
95 this.ConfigDB(this.localXMLConfig);
96 this.localXMLConfig.Close();
97
98 MainConsole.Instance.Verbose("Main.cs:Startup() - Loading configuration");
99 Cfg = this.LoadConfigDll(this.ConfigDll);
100 Cfg.InitConfig();
101
102 MainConsole.Instance.Verbose( "Main.cs:Startup() - Establishing data connection");
103 m_userManager = new UserManager();
104 m_userManager._config = Cfg;
105 m_userManager.AddPlugin(StorageDll);
106
107 MainConsole.Instance.Verbose("Main.cs:Startup() - Starting HTTP process");
108 BaseHttpServer httpServer = new BaseHttpServer(8002);
109
110 httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod);
111 httpServer.AddRestHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod);
112
113 httpServer.Start();
114 }
115
116
117 public void do_create(string what)
118 {
119 switch (what)
120 {
121 case "user":
122 string tempfirstname;
123 string templastname;
124 string tempMD5Passwd;
125 uint regX = 997;
126 uint regY = 996;
127
128 tempfirstname = m_console.CmdPrompt("First name");
129 templastname = m_console.CmdPrompt("Last name");
130 tempMD5Passwd = m_console.PasswdPrompt("Password");
131 regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X"));
132 regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y"));
133
134 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
135
136 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
137 break;
138 }
139 }
140
141 public void RunCmd(string cmd, string[] cmdparams)
142 {
143 switch (cmd)
144 {
145 case "help":
146 m_console.Notice("create user - create a new user");
147 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
148 break;
149
150 case "create":
151 do_create(cmdparams[0]);
152 break;
153
154 case "shutdown":
155 m_console.Close();
156 Environment.Exit(0);
157 break;
158 }
159 }
160
161 private void ConfigDB(IGenericConfig configData)
162 {
163 try
164 {
165 string attri = "";
166 attri = configData.GetAttribute("DataBaseProvider");
167 if (attri == "")
168 {
169 StorageDll = "OpenGrid.Framework.Data.DB4o.dll";
170 configData.SetAttribute("DataBaseProvider", "OpenGrid.Framework.Data.DB4o.dll");
171 }
172 else
173 {
174 StorageDll = attri;
175 }
176 configData.Commit();
177 }
178 catch (Exception e)
179 {
180
181 }
182 }
183
184 private UserConfig LoadConfigDll(string dllName)
185 {
186 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
187 UserConfig config = null;
188
189 foreach (Type pluginType in pluginAssembly.GetTypes())
190 {
191 if (pluginType.IsPublic)
192 {
193 if (!pluginType.IsAbstract)
194 {
195 Type typeInterface = pluginType.GetInterface("IUserConfig", true);
196
197 if (typeInterface != null)
198 {
199 IUserConfig plug = (IUserConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
200 config = plug.GetConfigObject();
201 break;
202 }
203
204 typeInterface = null;
205 }
206 }
207 }
208 pluginAssembly = null;
209 return config;
210 }
211
212 public void Show(string ShowWhat)
213 {
214 }
215 }
216}
diff --git a/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj b/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj
deleted file mode 100644
index f4fa8b6..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj
+++ /dev/null
@@ -1,63 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{D45B6E48-5668-478D-B9CB-6D46E665FACF}</ProjectGuid>
8 <OutputType>Exe</OutputType>
9 <AppDesignerFolder>Properties</AppDesignerFolder>
10 <RootNamespace>OGS_UserServer</RootNamespace>
11 <AssemblyName>OGS-UserServer</AssemblyName>
12 <StartupObject>OpenGridServices.OpenUser_Main</StartupObject>
13 </PropertyGroup>
14 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
15 <DebugSymbols>true</DebugSymbols>
16 <DebugType>full</DebugType>
17 <Optimize>false</Optimize>
18 <OutputPath>bin\Debug\</OutputPath>
19 <DefineConstants>DEBUG;TRACE</DefineConstants>
20 <ErrorReport>prompt</ErrorReport>
21 <WarningLevel>4</WarningLevel>
22 </PropertyGroup>
23 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
24 <DebugType>pdbonly</DebugType>
25 <Optimize>true</Optimize>
26 <OutputPath>bin\Release\</OutputPath>
27 <DefineConstants>TRACE</DefineConstants>
28 <ErrorReport>prompt</ErrorReport>
29 <WarningLevel>4</WarningLevel>
30 </PropertyGroup>
31 <ItemGroup>
32 <Reference Include="libsecondlife, Version=0.9.0.0, Culture=neutral, processorArchitecture=MSIL">
33 <SpecificVersion>False</SpecificVersion>
34 <HintPath>..\..\common\bin\libsecondlife.dll</HintPath>
35 </Reference>
36 <Reference Include="System" />
37 <Reference Include="System.Data" />
38 <Reference Include="System.Xml" />
39 </ItemGroup>
40 <ItemGroup>
41 <Compile Include="..\..\common\src\OGS-Console.cs">
42 <Link>OGS-Console.cs</Link>
43 </Compile>
44 <Compile Include="..\..\common\VersionInfo\VersionInfo.cs">
45 <Link>VersionInfo.cs</Link>
46 </Compile>
47 <Compile Include="ConsoleCmds.cs" />
48 <Compile Include="Main.cs" />
49 <Compile Include="Properties\AssemblyInfo.cs" />
50 <Compile Include="UserHttp.cs" />
51 </ItemGroup>
52 <ItemGroup>
53 <ProjectReference Include="..\..\..\OpenSim.FrameWork\OpenSim.Framework.csproj">
54 <Project>{2E46A825-3168-492F-93BC-637126B5B72B}</Project>
55 <Name>OpenSim.Framework</Name>
56 </ProjectReference>
57 <ProjectReference Include="..\..\ServerConsole\ServerConsole.csproj">
58 <Project>{7667E6E2-F227-41A2-B1B2-315613E1BAFC}</Project>
59 <Name>ServerConsole</Name>
60 </ProjectReference>
61 </ItemGroup>
62 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
63</Project> \ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
deleted file mode 100644
index b3d318c..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
+++ /dev/null
@@ -1,128 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{66591469-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>OpenGridServices.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>OpenGridServices.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.GenericConfig.Xml" >
78 <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="OpenSim.Servers" >
82 <HintPath>OpenSim.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" >
98 <HintPath>XMLRPC.dll</HintPath>
99 <Private>False</Private>
100 </Reference>
101 </ItemGroup>
102 <ItemGroup>
103 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
104 <Name>OpenGrid.Framework.Data</Name>
105 <Project>{62CDF671-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="Main.cs">
112 <SubType>Code</SubType>
113 </Compile>
114 <Compile Include="UserManager.cs">
115 <SubType>Code</SubType>
116 </Compile>
117 <Compile Include="Properties\AssemblyInfo.cs">
118 <SubType>Code</SubType>
119 </Compile>
120 </ItemGroup>
121 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
122 <PropertyGroup>
123 <PreBuildEvent>
124 </PreBuildEvent>
125 <PostBuildEvent>
126 </PostBuildEvent>
127 </PropertyGroup>
128</Project>
diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
deleted file mode 100644
index 68cbef7..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
+++ /dev/null
@@ -1,51 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenGridServices.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="OpenGridServices.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="../../bin/OpenGrid.Framework.Data.dll" />
26 <include name="../../bin/OpenSim.Framework.dll" />
27 <include name="../../bin/OpenSim.Framework.Console.dll" />
28 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
29 <include name="../../bin/OpenSim.Servers.dll" />
30 <include name="System.dll" />
31 <include name="System.Data.dll" />
32 <include name="System.Xml.dll" />
33 <include name="../../bin/XMLRPC.dll" />
34 </references>
35 </csc>
36 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
37 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
38 <copy todir="${project::get-base-directory()}/../../bin/">
39 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
40 <include name="*.dll"/>
41 <include name="*.exe"/>
42 </fileset>
43 </copy>
44 </target>
45 <target name="clean">
46 <delete dir="${bin.dir}" failonerror="false" />
47 <delete dir="${obj.dir}" failonerror="false" />
48 </target>
49 <target name="doc" description="Creates documentation.">
50 </target>
51</project>
diff --git a/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs
deleted file mode 100644
index 5d5ce8d..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("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/OpenGridServices/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
deleted file mode 100644
index 4fb7984..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
+++ /dev/null
@@ -1,660 +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;
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.UserServer
45{
46 public class UserManager
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.MainConsole.Instance.Verbose( "Userstorage: Attempting to load " + FileName);
58 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
59
60 OpenSim.Framework.Console.MainConsole.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.MainConsole.Instance.Verbose( "Userstorage: Added IUserData Interface");
73 }
74
75 typeInterface = null;
76 }
77 }
78
79 pluginAssembly = null;
80 }
81
82 /// <summary>
83 ///
84 /// </summary>
85 /// <param name="user"></param>
86 public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
87 {
88 UserProfileData user = new UserProfileData();
89 user.homeLocation = new LLVector3(128, 128, 100);
90 user.UUID = LLUUID.Random();
91 user.username = firstName;
92 user.surname = lastName;
93 user.passwordHash = pass;
94 user.passwordSalt = "";
95 user.created = Util.UnixTimeSinceEpoch();
96 user.homeLookAt = new LLVector3(100, 100, 100);
97 user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256));
98
99 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
100 {
101 try
102 {
103 plugin.Value.addNewUserProfile(user);
104
105 }
106 catch (Exception e)
107 {
108 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
109 }
110 }
111 }
112
113 /// <summary>
114 /// Loads a user profile from a database by UUID
115 /// </summary>
116 /// <param name="uuid">The target UUID</param>
117 /// <returns>A user profile</returns>
118 public UserProfileData getUserProfile(LLUUID uuid)
119 {
120 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
121 {
122 try
123 {
124 UserProfileData profile = plugin.Value.getUserByUUID(uuid);
125 profile.currentAgent = getUserAgent(profile.UUID);
126 return profile;
127 }
128 catch (Exception e)
129 {
130 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
131 }
132 }
133
134 return null;
135 }
136
137
138 /// <summary>
139 /// Loads a user profile by name
140 /// </summary>
141 /// <param name="name">The target name</param>
142 /// <returns>A user profile</returns>
143 public UserProfileData getUserProfile(string name)
144 {
145 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
146 {
147 try
148 {
149 UserProfileData profile = plugin.Value.getUserByName(name);
150 profile.currentAgent = getUserAgent(profile.UUID);
151 return profile;
152 }
153 catch (Exception e)
154 {
155 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
156 }
157 }
158
159 return null;
160 }
161
162 /// <summary>
163 /// Loads a user profile by name
164 /// </summary>
165 /// <param name="fname">First name</param>
166 /// <param name="lname">Last name</param>
167 /// <returns>A user profile</returns>
168 public UserProfileData getUserProfile(string fname, string lname)
169 {
170 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
171 {
172 try
173 {
174 UserProfileData profile = plugin.Value.getUserByName(fname,lname);
175 try
176 {
177 profile.currentAgent = getUserAgent(profile.UUID);
178 }
179 catch (Exception e)
180 {
181 // Ignore
182 }
183 return profile;
184 }
185 catch (Exception e)
186 {
187 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
188 }
189 }
190
191 return null;
192 }
193
194 /// <summary>
195 /// Loads a user agent by uuid (not called directly)
196 /// </summary>
197 /// <param name="uuid">The agents UUID</param>
198 /// <returns>Agent profiles</returns>
199 public UserAgentData getUserAgent(LLUUID uuid)
200 {
201 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
202 {
203 try
204 {
205 return plugin.Value.getAgentByUUID(uuid);
206 }
207 catch (Exception e)
208 {
209 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
210 }
211 }
212
213 return null;
214 }
215
216 /// <summary>
217 /// Loads a user agent by name (not called directly)
218 /// </summary>
219 /// <param name="name">The agents name</param>
220 /// <returns>A user agent</returns>
221 public UserAgentData getUserAgent(string name)
222 {
223 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
224 {
225 try
226 {
227 return plugin.Value.getAgentByName(name);
228 }
229 catch (Exception e)
230 {
231 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
232 }
233 }
234
235 return null;
236 }
237
238 /// <summary>
239 /// Loads a user agent by name (not called directly)
240 /// </summary>
241 /// <param name="fname">The agents firstname</param>
242 /// <param name="lname">The agents lastname</param>
243 /// <returns>A user agent</returns>
244 public UserAgentData getUserAgent(string fname, string lname)
245 {
246 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
247 {
248 try
249 {
250 return plugin.Value.getAgentByName(fname,lname);
251 }
252 catch (Exception e)
253 {
254 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
255 }
256 }
257
258 return null;
259 }
260
261 /// <summary>
262 /// Creates a error response caused by invalid XML
263 /// </summary>
264 /// <returns>An XMLRPC response</returns>
265 private static XmlRpcResponse CreateErrorConnectingToGridResponse()
266 {
267 XmlRpcResponse response = new XmlRpcResponse();
268 Hashtable ErrorRespData = new Hashtable();
269 ErrorRespData["reason"] = "key";
270 ErrorRespData["message"] = "Error connecting to grid. Could not percieve credentials from login XML.";
271 ErrorRespData["login"] = "false";
272 response.Value = ErrorRespData;
273 return response;
274 }
275
276 /// <summary>
277 /// Creates an error response caused by bad login credentials
278 /// </summary>
279 /// <returns>An XMLRPC response</returns>
280 private static XmlRpcResponse CreateLoginErrorResponse()
281 {
282 XmlRpcResponse response = new XmlRpcResponse();
283 Hashtable ErrorRespData = new Hashtable();
284 ErrorRespData["reason"] = "key";
285 ErrorRespData["message"] = "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.";
286 ErrorRespData["login"] = "false";
287 response.Value = ErrorRespData;
288 return response;
289 }
290
291 /// <summary>
292 /// Creates an error response caused by being logged in already
293 /// </summary>
294 /// <returns>An XMLRPC Response</returns>
295 private static XmlRpcResponse CreateAlreadyLoggedInResponse()
296 {
297 XmlRpcResponse response = new XmlRpcResponse();
298 Hashtable PresenceErrorRespData = new Hashtable();
299 PresenceErrorRespData["reason"] = "presence";
300 PresenceErrorRespData["message"] = "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner";
301 PresenceErrorRespData["login"] = "false";
302 response.Value = PresenceErrorRespData;
303 return response;
304 }
305
306 /// <summary>
307 /// Creates an error response caused by target region being down
308 /// </summary>
309 /// <returns>An XMLRPC Response</returns>
310 private static XmlRpcResponse CreateDeadRegionResponse()
311 {
312 XmlRpcResponse response = new XmlRpcResponse();
313 Hashtable PresenceErrorRespData = new Hashtable();
314 PresenceErrorRespData["reason"] = "key";
315 PresenceErrorRespData["message"] = "The region you are attempting to log into is not responding. Please select another region and try again.";
316 PresenceErrorRespData["login"] = "false";
317 response.Value = PresenceErrorRespData;
318 return response;
319 }
320
321 /// <summary>
322 /// Customises the login response and fills in missing values.
323 /// </summary>
324 /// <param name="response">The existing response</param>
325 /// <param name="theUser">The user profile</param>
326 public virtual void CustomiseResponse(ref Hashtable response, ref UserProfileData theUser)
327 {
328 // Load information from the gridserver
329 SimProfile SimInfo = new SimProfile();
330 SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
331
332 // Customise the response
333 // Home Location
334 response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " +
335 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
336 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
337
338 // Destination
339 response["sim_ip"] = SimInfo.sim_ip;
340 response["sim_port"] = (Int32)SimInfo.sim_port;
341 response["region_y"] = (Int32)SimInfo.RegionLocY * 256;
342 response["region_x"] = (Int32)SimInfo.RegionLocX * 256;
343
344 // Notify the target of an incoming user
345 Console.WriteLine("Notifying " + SimInfo.regionname + " (" + SimInfo.caps_url + ")");
346
347 // Prepare notification
348 Hashtable SimParams = new Hashtable();
349 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
350 SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
351 SimParams["firstname"] = theUser.username;
352 SimParams["lastname"] = theUser.surname;
353 SimParams["agent_id"] = theUser.UUID.ToString();
354 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response["circuit_code"]);
355 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
356 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
357 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
358 SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
359 ArrayList SendParams = new ArrayList();
360 SendParams.Add(SimParams);
361
362 // Update agent with target sim
363 theUser.currentAgent.currentRegion = SimInfo.UUID;
364 theUser.currentAgent.currentHandle = SimInfo.regionhandle;
365
366 // Send
367 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
368 XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000);
369 }
370
371 /// <summary>
372 /// Checks a user against it's password hash
373 /// </summary>
374 /// <param name="profile">The users profile</param>
375 /// <param name="password">The supplied password</param>
376 /// <returns>Authenticated?</returns>
377 public bool AuthenticateUser(ref UserProfileData profile, string password)
378 {
379 OpenSim.Framework.Console.MainConsole.Instance.Verbose(
380 "Authenticating " + profile.username + " " + profile.surname);
381
382 password = password.Remove(0, 3); //remove $1$
383
384 string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
385
386 return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
387 }
388
389 /// <summary>
390 /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB
391 /// </summary>
392 /// <param name="profile">The users profile</param>
393 /// <param name="request">The users loginrequest</param>
394 public void CreateAgent(ref UserProfileData profile, XmlRpcRequest request)
395 {
396 Hashtable requestData = (Hashtable)request.Params[0];
397
398 UserAgentData agent = new UserAgentData();
399
400 // User connection
401 agent.agentIP = "";
402 agent.agentOnline = true;
403 agent.agentPort = 0;
404
405 // Generate sessions
406 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
407 byte[] randDataS = new byte[16];
408 byte[] randDataSS = new byte[16];
409 rand.GetBytes(randDataS);
410 rand.GetBytes(randDataSS);
411
412 agent.secureSessionID = new LLUUID(randDataSS, 0);
413 agent.sessionID = new LLUUID(randDataS, 0);
414
415 // Profile UUID
416 agent.UUID = profile.UUID;
417
418 // Current position (from Home)
419 agent.currentHandle = profile.homeRegion;
420 agent.currentPos = profile.homeLocation;
421
422 // If user specified additional start, use that
423 if (requestData.ContainsKey("start"))
424 {
425 string startLoc = ((string)requestData["start"]).Trim();
426 if (!(startLoc == "last" || startLoc == "home"))
427 {
428 // Format: uri:Ahern&162&213&34
429 try
430 {
431 string[] parts = startLoc.Remove(0, 4).Split('&');
432 string region = parts[0];
433
434 ////////////////////////////////////////////////////
435 //SimProfile SimInfo = new SimProfile();
436 //SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
437 }
438 catch (Exception e)
439 {
440
441 }
442 }
443 }
444
445 // What time did the user login?
446 agent.loginTime = Util.UnixTimeSinceEpoch();
447 agent.logoutTime = 0;
448
449 // Current location
450 agent.regionID = new LLUUID(); // Fill in later
451 agent.currentRegion = new LLUUID(); // Fill in later
452
453 profile.currentAgent = agent;
454 }
455
456 /// <summary>
457 /// Saves a target agent to the database
458 /// </summary>
459 /// <param name="profile">The users profile</param>
460 /// <returns>Successful?</returns>
461 public bool CommitAgent(ref UserProfileData profile)
462 {
463 // Saves the agent to database
464 return true;
465 }
466
467 /// <summary>
468 /// Main user login function
469 /// </summary>
470 /// <param name="request">The XMLRPC request</param>
471 /// <returns>The response to send</returns>
472 public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
473 {
474 XmlRpcResponse response = new XmlRpcResponse();
475 Hashtable requestData = (Hashtable)request.Params[0];
476
477 bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd"));
478 bool GoodLogin = false;
479 string firstname = "";
480 string lastname = "";
481 string passwd = "";
482
483 UserProfileData TheUser;
484
485 if (GoodXML)
486 {
487 firstname = (string)requestData["first"];
488 lastname = (string)requestData["last"];
489 passwd = (string)requestData["passwd"];
490
491 TheUser = getUserProfile(firstname, lastname);
492 if (TheUser == null)
493 return CreateLoginErrorResponse();
494
495 GoodLogin = AuthenticateUser(ref TheUser, passwd);
496 }
497 else
498 {
499 return CreateErrorConnectingToGridResponse();
500 }
501
502 if (!GoodLogin)
503 {
504 return CreateLoginErrorResponse();
505 }
506 else
507 {
508 // If we already have a session...
509 if (TheUser.currentAgent != null && TheUser.currentAgent.agentOnline)
510 {
511 // Reject the login
512 return CreateAlreadyLoggedInResponse();
513 }
514 // Otherwise...
515 // Create a new agent session
516 CreateAgent(ref TheUser, request);
517
518 try
519 {
520 Hashtable responseData = new Hashtable();
521
522 LLUUID AgentID = TheUser.UUID;
523
524 // Global Texture Section
525 Hashtable GlobalT = new Hashtable();
526 GlobalT["sun_texture_id"] = "cce0f112-878f-4586-a2e2-a8f104bba271";
527 GlobalT["cloud_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
528 GlobalT["moon_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
529 ArrayList GlobalTextures = new ArrayList();
530 GlobalTextures.Add(GlobalT);
531
532 // Login Flags Section
533 Hashtable LoginFlagsHash = new Hashtable();
534 LoginFlagsHash["daylight_savings"] = "N";
535 LoginFlagsHash["stipend_since_login"] = "N";
536 LoginFlagsHash["gendered"] = "Y"; // Needs to be combined with below...
537 LoginFlagsHash["ever_logged_in"] = "Y"; // Should allow male/female av selection
538 ArrayList LoginFlags = new ArrayList();
539 LoginFlags.Add(LoginFlagsHash);
540
541 // UI Customisation Section
542 Hashtable uiconfig = new Hashtable();
543 uiconfig["allow_first_life"] = "Y";
544 ArrayList ui_config = new ArrayList();
545 ui_config.Add(uiconfig);
546
547 // Classified Categories Section
548 Hashtable ClassifiedCategoriesHash = new Hashtable();
549 ClassifiedCategoriesHash["category_name"] = "Generic";
550 ClassifiedCategoriesHash["category_id"] = (Int32)1;
551 ArrayList ClassifiedCategories = new ArrayList();
552 ClassifiedCategories.Add(ClassifiedCategoriesHash);
553
554 // Inventory Library Section
555 ArrayList AgentInventoryArray = new ArrayList();
556 Hashtable TempHash;
557
558 AgentInventory Library = new AgentInventory();
559 Library.CreateRootFolder(AgentID, true);
560
561 foreach (InventoryFolder InvFolder in Library.InventoryFolders.Values)
562 {
563 TempHash = new Hashtable();
564 TempHash["name"] = InvFolder.FolderName;
565 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
566 TempHash["version"] = (Int32)InvFolder.Version;
567 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
568 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
569 AgentInventoryArray.Add(TempHash);
570 }
571
572 Hashtable InventoryRootHash = new Hashtable();
573 InventoryRootHash["folder_id"] = Library.InventoryRoot.FolderID.ToStringHyphenated();
574 ArrayList InventoryRoot = new ArrayList();
575 InventoryRoot.Add(InventoryRootHash);
576
577 Hashtable InitialOutfitHash = new Hashtable();
578 InitialOutfitHash["folder_name"] = "Nightclub Female";
579 InitialOutfitHash["gender"] = "female";
580 ArrayList InitialOutfit = new ArrayList();
581 InitialOutfit.Add(InitialOutfitHash);
582
583 // Circuit Code
584 uint circode = (uint)(Util.RandomClass.Next());
585
586 // Generics
587 responseData["last_name"] = TheUser.surname;
588 responseData["ui-config"] = ui_config;
589 responseData["sim_ip"] = "127.0.0.1"; //SimInfo.sim_ip.ToString();
590 responseData["login-flags"] = LoginFlags;
591 responseData["global-textures"] = GlobalTextures;
592 responseData["classified_categories"] = ClassifiedCategories;
593 responseData["event_categories"] = new ArrayList();
594 responseData["inventory-skeleton"] = AgentInventoryArray;
595 responseData["inventory-skel-lib"] = new ArrayList();
596 responseData["inventory-root"] = InventoryRoot;
597 responseData["event_notifications"] = new ArrayList();
598 responseData["gestures"] = new ArrayList();
599 responseData["inventory-lib-owner"] = new ArrayList();
600 responseData["initial-outfit"] = InitialOutfit;
601 responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
602 responseData["start_location"] = "last";
603 responseData["home"] = "!!null temporary value {home}!!"; // Overwritten
604 responseData["message"] = _config.DefaultStartupMsg;
605 responseData["first_name"] = TheUser.username;
606 responseData["circuit_code"] = (Int32)circode;
607 responseData["sim_port"] = 0; //(Int32)SimInfo.sim_port;
608 responseData["secure_session_id"] = TheUser.currentAgent.secureSessionID.ToStringHyphenated();
609 responseData["look_at"] = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n";
610 responseData["agent_id"] = AgentID.ToStringHyphenated();
611 responseData["region_y"] = (Int32)0; // Overwritten
612 responseData["region_x"] = (Int32)0; // Overwritten
613 responseData["seed_capability"] = "";
614 responseData["agent_access"] = "M";
615 responseData["session_id"] = TheUser.currentAgent.sessionID.ToStringHyphenated();
616 responseData["login"] = "true";
617
618 try
619 {
620 this.CustomiseResponse(ref responseData, ref TheUser);
621 }
622 catch (Exception e)
623 {
624 Console.WriteLine(e.ToString());
625 return CreateDeadRegionResponse();
626 }
627
628 CommitAgent(ref TheUser);
629
630 response.Value = responseData;
631 // TheUser.SendDataToSim(SimInfo);
632 return response;
633
634 }
635 catch (Exception E)
636 {
637 Console.WriteLine(E.ToString());
638 }
639 //}
640 }
641 return response;
642
643 }
644
645 /// <summary>
646 /// Deletes an active agent session
647 /// </summary>
648 /// <param name="request">The request</param>
649 /// <param name="path">The path (eg /bork/narf/test)</param>
650 /// <param name="param">Parameters sent</param>
651 /// <returns>Success "OK" else error</returns>
652 public string RestDeleteUserSessionMethod(string request, string path, string param)
653 {
654 // TODO! Important!
655
656 return "OK";
657 }
658
659 }
660}
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs b/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs
deleted file mode 100644
index 25e0211..0000000
--- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("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/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs b/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs
deleted file mode 100644
index fe0e7aa..0000000
--- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
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.MainConsole.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.MainConsole.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
51
52 this.DefaultStartupMsg = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
53
54 this.GridServerURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/");
55 this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server","null");
56 this.GridRecvKey = OpenSim.Framework.Console.MainConsole.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.MainConsole.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.MainConsole.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
73 LoadDefaults();
74 OpenSim.Framework.Console.MainConsole.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.MainConsole.Instance.Warn("Config.cs:InitConfig() - Exception occured");
80 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
81 }
82
83 OpenSim.Framework.Console.MainConsole.Instance.Verbose("User settings loaded:");
84 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg);
85 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Grid server URL: " + this.GridServerURL);
86 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to grid: " + this.GridSendKey);
87 OpenSim.Framework.Console.MainConsole.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/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj
deleted file mode 100644
index a89a38d..0000000
--- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj
+++ /dev/null
@@ -1,107 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{7E494328-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>OpenUser.Config.UserConfigDb4o</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>OpenUser.Config.UserConfigDb4o</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/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
deleted file mode 100644
index bd5d49f..0000000
--- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenUser.Config.UserConfigDb4o" 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="OpenUser.Config.UserConfigDb4o" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="DbUserConfig.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.Data.dll.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/OpenGridServices/ServiceManager/ServiceManager.cs b/OpenGridServices/ServiceManager/ServiceManager.cs
deleted file mode 100644
index 8cb9c80..0000000
--- a/OpenGridServices/ServiceManager/ServiceManager.cs
+++ /dev/null
@@ -1,259 +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.Diagnostics;
30using System.Threading;
31using System.ServiceProcess;
32using System.Xml;
33using System.IO;
34using libsecondlife;
35using OpenSim.GenericConfig;
36
37public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
38
39 private Thread ServiceWorkerThread;
40 private static string GridURL; // URL of grid server
41 private static string GridSimKey; // key sent from Grid>Sim
42 private static string SimGridKey; // key sent Sim>Grid
43 private static string AssetURL; // URL of asset server
44 private static string UserSendKey; // key sent from user>sim
45 private static string UserRecvKey; // key sent from sim>user
46
47 public OpenGridMasterService()
48 {
49 CanPauseAndContinue = false;
50 ServiceName = "OpenGridServices-master";
51 }
52
53 private void InitializeComponent()
54 {
55 this.CanPauseAndContinue = false;
56 this.CanShutdown = true;
57 this.ServiceName = "OpenGridServices-master";
58 }
59
60 protected override void OnStart(string[] args)
61 {
62 ServiceWorkerThread = new Thread(new ThreadStart(MainServiceThread));
63 ServiceWorkerThread.Start();
64 }
65
66 protected override void OnStop()
67 {
68 ServiceWorkerThread.Abort();
69 }
70
71 private void MainServiceThread()
72 {
73 try {
74 StreamReader reader=new StreamReader("opengrid-master-cfg.xml");
75
76 string configxml = reader.ReadToEnd();
77 XmlDocument doc = new XmlDocument();
78 doc.LoadXml(configxml);
79 XmlNode rootnode = doc.FirstChild;
80 if (rootnode.Name != "regions")
81 {
82 EventLog.WriteEntry("ERROR! bad XML in opengrid-master-cfg.xml - expected regions tag");
83 Console.WriteLine("Sorry, could not startup the service - please check your opengrid-master-cfg.xml file: missing regions tag");
84 (new ServiceController("OpenGridServices-master")).Stop();
85 }
86
87 for(int i=0; i<=rootnode.ChildNodes.Count; i++)
88 {
89 if(rootnode.ChildNodes.Item(i).Name != "region") {
90 EventLog.WriteEntry("nonfatal error - unexpected tag inside regions block of opengrid-master-cfg.xml");
91 (new ServiceController("OpenGridServices-master")).Stop();
92 }
93 }
94 } catch(Exception e) {
95 Console.WriteLine(e.ToString());
96 (new ServiceController("OpenGridServices-master")).Stop();
97 }
98
99 }
100
101 private static string SetupGrid()
102 {
103 Console.WriteLine("Running external program (OpenGridServices.GridServer.exe) to configure the grid server");
104 try {
105 Process p = new Process();
106
107 p.StartInfo.Arguments = "-setuponly";
108 p.StartInfo.FileName = "OpenGridServices.GridServer.exe";
109 p.Start();
110
111 p.StartInfo.Arguments = "-dumpxmlconf";
112 p.Start();
113
114 XmlConfig GridConf = new XmlConfig("opengrid-cfg.xml");
115 GridConf.LoadData();
116 GridURL="http://" + GridConf.GetAttribute("ListenAddr") + ":" + GridConf.GetAttribute("ListenPort") + "/";
117
118 StreamReader reader=new StreamReader("opengrid-cfg.xml");
119 string configxml = reader.ReadToEnd();
120
121 return configxml;
122 } catch(Exception e) {
123 Console.WriteLine("An error occurred while running the grid server, please rectify it and try again");
124 Console.WriteLine(e.ToString());
125 Environment.Exit(1);
126 }
127 return "";
128 }
129
130 private static string SetupUser()
131 {
132 return "<user></user>";
133 }
134
135 private static string SetupAsset()
136 {
137 return "<asset></asset>";
138 }
139
140 private static string SetupRegion()
141 {
142 string regionname;
143 ulong regionlocx;
144 ulong regionlocy;
145 string default_terrain;
146 uint terrain_multiplier;
147 uint baseport;
148
149 string listenaddr;
150 string simconfigxml;
151 LLUUID SimUUID;
152
153 Console.WriteLine("Setting up region servers");
154 Console.Write("Please specify a path to store your region data (e.g /etc/opensim/regions: ");
155 string regionpath=Console.ReadLine();
156
157 Console.Write("How many regions would you like to configure now? ");
158 int numofregions=Convert.ToInt16(Console.ReadLine());
159
160 Console.Write("What port should the region servers start listening at (first region is normally 9000, then 9001 the second etc, both TCP+UDP): ");
161 baseport=Convert.ToUInt16(Console.ReadLine());
162
163
164 listenaddr=Console.ReadLine();
165
166 Console.WriteLine("Now ready to configure regions, please answer the questions about each region in turn");
167 for(int i=0; i<=numofregions; i++) {
168 Console.WriteLine("Configuring region number " + i.ToString());
169
170 Console.Write("Region name: ");
171 regionname=Console.ReadLine();
172
173 Console.Write("Region location X: ");
174 regionlocx=(ulong)Convert.ToUInt32(Console.ReadLine());
175
176 Console.Write("Region location Y: ");
177 regionlocy=(ulong)Convert.ToUInt32(Console.ReadLine());
178
179 Console.Write("Default terrain file: ");
180 default_terrain=Console.ReadLine();
181 terrain_multiplier=Convert.ToUInt16(Console.ReadLine());
182
183 SimUUID=LLUUID.Random();
184
185 simconfigxml="<Root><Config SimUUID=\"" + SimUUID.ToString() + "\" SimName=\"" + regionname + "\" SimLocationX=\"" + regionlocx.ToString() + "\" SimLocationY=\"" + regionlocy.ToString() + "\" Datastore=\"" + Path.Combine(regionpath,(SimUUID.ToString()+"localworld.yap")) + "\" SimListenPort=\"" + (baseport+i).ToString() + "\" SimListenAddress=\"" + listenaddr + "\" TerrainFile=\"" + default_terrain + "\" TerrainMultiplier=\"" + terrain_multiplier.ToString() + "\" GridServerURL=\"\" GridSendKey=\"\" GridRecvKey=\"\" AssetServerURL=\"\" /></Root>";
186
187 }
188
189 return "<regions></regions>";
190 }
191
192 public static void InitSetup()
193 {
194 string choice="";
195
196 string GridInfo;
197 string UserInfo;
198 string AssetInfo;
199 string RegionInfo;
200
201 bool grid=false;
202 bool user=false;
203 bool asset=false;
204 bool region=false;
205 while(choice!="OK")
206 {
207 Console.Clear();
208 Console.WriteLine("Please select the components you would like to run on this server:\n");
209
210 Console.WriteLine("1 - [" + (grid ? "X" : " ") + "] Grid server - this service handles co-ordinates of regions/sims on the grid");
211 Console.WriteLine("2 - [" + (user ? "X" : " ") + "] User server - this service handles user login, profiles, inventory and IM");
212 Console.WriteLine("3 - [" + (asset ? "X" : " ") + "] Asset server - this service handles storage of assets such as textures, objects, sounds, scripts");
213 Console.WriteLine("4 - [" + (region ? "X" : " ") + "] Region server - this is the main opensim server and can run without the above services, it handles physics simulation, terrain, building and other such features");
214
215
216 Console.Write("Type a number to toggle a choice or type OK to accept your current choices: ");
217 choice = Console.ReadLine();
218 switch(choice)
219 {
220 case "1":
221 grid = (!grid);
222 break;
223
224 case "2":
225 user = (!user);
226 break;
227
228 case "3":
229 asset = (!asset);
230 break;
231
232 case "4":
233 region = (!region);
234 break;
235 }
236 }
237
238 if(grid) GridInfo = SetupGrid();
239 if(user) UserInfo = SetupUser();
240 if(asset) AssetInfo = SetupAsset();
241 if(region) RegionInfo = SetupRegion();
242 }
243
244 public static void Main()
245 {
246 if(!File.Exists("opengrid-master-cfg.xml"))
247 {
248 Console.WriteLine("Could not find a config file, running initial setup");
249 InitSetup();
250 }
251 Console.WriteLine("Starting up OGS master service");
252 try {
253 ServiceBase.Run(new OpenGridMasterService());
254 } catch(Exception e) {
255 Console.WriteLine("An error occured while initialising OGS master service.");
256 Console.WriteLine(e.ToString());
257 }
258 }
259}
diff --git a/OpenGridServices/ServiceManager/ServiceManager.csproj b/OpenGridServices/ServiceManager/ServiceManager.csproj
deleted file mode 100644
index e07e5be..0000000
--- a/OpenGridServices/ServiceManager/ServiceManager.csproj
+++ /dev/null
@@ -1,107 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon>
10 </ApplicationIcon>
11 <AssemblyKeyContainerName>
12 </AssemblyKeyContainerName>
13 <AssemblyName>ServiceManager</AssemblyName>
14 <DefaultClientScript>JScript</DefaultClientScript>
15 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
17 <DelaySign>false</DelaySign>
18 <OutputType>Exe</OutputType>
19 <AppDesignerFolder>
20 </AppDesignerFolder>
21 <RootNamespace>ServiceManager</RootNamespace>
22 <StartupObject>
23 </StartupObject>
24 <FileUpgradeFlags>
25 </FileUpgradeFlags>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
28 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
29 <BaseAddress>285212672</BaseAddress>
30 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
31 <ConfigurationOverrideFile>
32 </ConfigurationOverrideFile>
33 <DefineConstants>TRACE;DEBUG</DefineConstants>
34 <DocumentationFile>
35 </DocumentationFile>
36 <DebugSymbols>True</DebugSymbols>
37 <FileAlignment>4096</FileAlignment>
38 <Optimize>False</Optimize>
39 <OutputPath>..\..\bin\</OutputPath>
40 <RegisterForComInterop>False</RegisterForComInterop>
41 <RemoveIntegerChecks>False</RemoveIntegerChecks>
42 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
43 <WarningLevel>4</WarningLevel>
44 <NoWarn>
45 </NoWarn>
46 </PropertyGroup>
47 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
48 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
49 <BaseAddress>285212672</BaseAddress>
50 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
51 <ConfigurationOverrideFile>
52 </ConfigurationOverrideFile>
53 <DefineConstants>TRACE</DefineConstants>
54 <DocumentationFile>
55 </DocumentationFile>
56 <DebugSymbols>False</DebugSymbols>
57 <FileAlignment>4096</FileAlignment>
58 <Optimize>True</Optimize>
59 <OutputPath>..\..\bin\</OutputPath>
60 <RegisterForComInterop>False</RegisterForComInterop>
61 <RemoveIntegerChecks>False</RemoveIntegerChecks>
62 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
63 <WarningLevel>4</WarningLevel>
64 <NoWarn>
65 </NoWarn>
66 </PropertyGroup>
67 <ItemGroup>
68 <Reference Include="libsecondlife.dll">
69 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
70 <Private>False</Private>
71 </Reference>
72 <Reference Include="OpenSim.Framework.dll">
73 <HintPath>..\..\bin\OpenSim.Framework.dll</HintPath>
74 <Private>False</Private>
75 </Reference>
76 <Reference Include="OpenSim.GenericConfig.Xml">
77 <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
78 <Private>False</Private>
79 </Reference>
80 <Reference Include="System">
81 <HintPath>System.dll</HintPath>
82 <Private>False</Private>
83 </Reference>
84 <Reference Include="System.ServiceProcess">
85 <HintPath>System.ServiceProcess.dll</HintPath>
86 <Private>False</Private>
87 </Reference>
88 <Reference Include="System.Xml">
89 <HintPath>System.Xml.dll</HintPath>
90 <Private>False</Private>
91 </Reference>
92 </ItemGroup>
93 <ItemGroup>
94 </ItemGroup>
95 <ItemGroup>
96 <Compile Include="ServiceManager.cs">
97 <SubType>Component</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> \ No newline at end of file
diff --git a/OpenGridServices/ServiceManager/ServiceManager.exe.build b/OpenGridServices/ServiceManager/ServiceManager.exe.build
deleted file mode 100644
index e0502c6..0000000
--- a/OpenGridServices/ServiceManager/ServiceManager.exe.build
+++ /dev/null
@@ -1,44 +0,0 @@
1<?xml version="1.0" ?>
2<project name="ServiceManager" 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="ServiceManager" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="ServiceManager.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/libsecondlife.dll" />
22 <include name="../../bin/OpenSim.Framework.dll" />
23 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
24 <include name="System.dll" />
25 <include name="System.ServiceProcess.dll" />
26 <include name="System.Xml.dll" />
27 </references>
28 </csc>
29 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
30 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
31 <copy todir="${project::get-base-directory()}/../../bin/">
32 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
33 <include name="*.dll"/>
34 <include name="*.exe"/>
35 </fileset>
36 </copy>
37 </target>
38 <target name="clean">
39 <delete dir="${bin.dir}" failonerror="false" />
40 <delete dir="${obj.dir}" failonerror="false" />
41 </target>
42 <target name="doc" description="Creates documentation.">
43 </target>
44</project>
diff --git a/OpenSim.FxCop b/OpenSim.FxCop
deleted file mode 100644
index 1e2ea2d..0000000
--- a/OpenSim.FxCop
+++ /dev/null
@@ -1,7241 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<FxCopProject Version="1.35" Name="OpenSim">
3 <ProjectOptions>
4 <SharedProject>True</SharedProject>
5 <Stylesheet Apply="False">http://www.gotdotnet.com/team/fxcop//xsl/1.35/FxCopReport.xsl</Stylesheet>
6 <SaveMessages>
7 <Project Status="Active, Excluded" NewOnly="False" />
8 <Report Status="Active" NewOnly="False" />
9 </SaveMessages>
10 <ProjectFile Compress="True" DefaultTargetCheck="True" DefaultRuleCheck="True" SaveByRuleGroup="" Deterministic="True" />
11 <EnableMultithreadedLoad>True</EnableMultithreadedLoad>
12 <EnableMultithreadedAnalysis>True</EnableMultithreadedAnalysis>
13 <SourceLookup>True</SourceLookup>
14 <AnalysisExceptionsThreshold>10</AnalysisExceptionsThreshold>
15 <RuleExceptionsThreshold>1</RuleExceptionsThreshold>
16 <Spelling Locale="en-us" />
17 <VersionAware>False</VersionAware>
18 <OverrideRuleVisibilities>False</OverrideRuleVisibilities>
19 <CustomDictionaries SearchFxCopDir="True" SearchUserProfile="True" SearchProjectDir="True" />
20 <SearchGlobalAssemblyCache>False</SearchGlobalAssemblyCache>
21 <DeadlockDetectionTimeout>120</DeadlockDetectionTimeout>
22 </ProjectOptions>
23 <Targets>
24 <AssemblyReferenceDirectories>
25 <Directory>$(ProjectDir)/lib/</Directory>
26 </AssemblyReferenceDirectories>
27 <Target Name="$(ProjectDir)/bin/OpenGridServices.ServerConsole.dll" Analyze="True" AnalyzeAllChildren="True" />
28 <Target Name="$(ProjectDir)/bin/OpenSim.Config.SimConfigDb4o.dll" Analyze="True" AnalyzeAllChildren="True" />
29 <Target Name="$(ProjectDir)/bin/OpenSim.exe" Analyze="True" AnalyzeAllChildren="True" />
30 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.Console.dll" Analyze="True" AnalyzeAllChildren="True" />
31 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.dll" Analyze="True" AnalyzeAllChildren="True" />
32 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Local.dll" Analyze="True" AnalyzeAllChildren="True" />
33 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Remote.dll" Analyze="True" AnalyzeAllChildren="True" />
34 <Target Name="$(ProjectDir)/bin/OpenSim.Physics.Manager.dll" Analyze="True" AnalyzeAllChildren="True" />
35 <Target Name="$(ProjectDir)/bin/OpenSim.RegionServer.dll" Analyze="True" AnalyzeAllChildren="True" />
36 <Target Name="$(ProjectDir)/bin/OpenSim.Storage.LocalStorageDb4o.dll" Analyze="True" AnalyzeAllChildren="True" />
37 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.BasicPhysicsPlugin.dll" Analyze="True" AnalyzeAllChildren="True" />
38 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.OdePlugin.dll" Analyze="True" AnalyzeAllChildren="True" />
39 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.PhysXPlugin.dll" Analyze="True" AnalyzeAllChildren="True" />
40 </Targets>
41 <Rules>
42 <RuleFiles>
43 <RuleFile Name="$(FxCopDir)\Rules\DesignRules.dll" Enabled="True" AllRulesEnabled="True" />
44 <RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="True" />
45 <RuleFile Name="$(FxCopDir)\Rules\InteroperabilityRules.dll" Enabled="True" AllRulesEnabled="True" />
46 <RuleFile Name="$(FxCopDir)\Rules\MobilityRules.dll" Enabled="True" AllRulesEnabled="True" />
47 <RuleFile Name="$(FxCopDir)\Rules\NamingRules.dll" Enabled="True" AllRulesEnabled="True" />
48 <RuleFile Name="$(FxCopDir)\Rules\PerformanceRules.dll" Enabled="True" AllRulesEnabled="True" />
49 <RuleFile Name="$(FxCopDir)\Rules\PortabilityRules.dll" Enabled="True" AllRulesEnabled="True" />
50 <RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" AllRulesEnabled="True" />
51 <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="True" />
52 </RuleFiles>
53 <Groups />
54 <Settings />
55 </Rules>
56 <FxCopReport Version="1.35">
57 <Namespaces>
58 <Namespace Name="OpenSim">
59 <Messages>
60 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
61 <Issue Name="Namespace">
62 <Item>Sim</Item>
63 <Item>OpenSim</Item>
64 </Issue>
65 </Message>
66 </Messages>
67 </Namespace>
68 <Namespace Name="OpenSim.Assets">
69 <Messages>
70 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
71 <Issue Name="Namespace">
72 <Item>Sim</Item>
73 <Item>OpenSim.Assets</Item>
74 </Issue>
75 </Message>
76 </Messages>
77 </Namespace>
78 <Namespace Name="OpenSim.CAPS">
79 <Messages>
80 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
81 <Issue>
82 <Item>OpenSim.CAPS</Item>
83 </Issue>
84 </Message>
85 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
86 <Issue Name="Namespace">
87 <Item>Sim</Item>
88 <Item>OpenSim.CAPS</Item>
89 </Issue>
90 </Message>
91 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
92 <Issue Name="Namespace">
93 <Item>OpenSim.CAPS</Item>
94 </Issue>
95 </Message>
96 </Messages>
97 </Namespace>
98 <Namespace Name="OpenSim.Config.SimConfigDb4o">
99 <Messages>
100 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
101 <Issue Name="Namespace">
102 <Item>Sim</Item>
103 <Item>OpenSim.Config.SimConfigDb4o</Item>
104 </Issue>
105 <Issue Name="Namespace">
106 <Item>Sim</Item>
107 <Item>OpenSim.Config.SimConfigDb4o</Item>
108 </Issue>
109 </Message>
110 </Messages>
111 </Namespace>
112 <Namespace Name="OpenSim.Framework.Assets">
113 <Messages>
114 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
115 <Issue>
116 <Item>OpenSim.Framework.Assets</Item>
117 </Issue>
118 </Message>
119 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
120 <Issue Name="Namespace">
121 <Item>Sim</Item>
122 <Item>OpenSim.Framework.Assets</Item>
123 </Issue>
124 </Message>
125 </Messages>
126 </Namespace>
127 <Namespace Name="OpenSim.Framework.Console">
128 <Messages>
129 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
130 <Issue Name="Namespace">
131 <Item>Sim</Item>
132 <Item>OpenSim.Framework.Console</Item>
133 </Issue>
134 </Message>
135 </Messages>
136 </Namespace>
137 <Namespace Name="OpenSim.Framework.Grid">
138 <Messages>
139 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
140 <Issue>
141 <Item>OpenSim.Framework.Grid</Item>
142 </Issue>
143 </Message>
144 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
145 <Issue Name="Namespace">
146 <Item>Sim</Item>
147 <Item>OpenSim.Framework.Grid</Item>
148 </Issue>
149 </Message>
150 </Messages>
151 </Namespace>
152 <Namespace Name="OpenSim.Framework.Interfaces">
153 <Messages>
154 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
155 <Issue Name="Namespace">
156 <Item>Sim</Item>
157 <Item>OpenSim.Framework.Interfaces</Item>
158 </Issue>
159 </Message>
160 </Messages>
161 </Namespace>
162 <Namespace Name="OpenSim.Framework.Inventory">
163 <Messages>
164 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
165 <Issue>
166 <Item>OpenSim.Framework.Inventory</Item>
167 </Issue>
168 </Message>
169 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
170 <Issue Name="Namespace">
171 <Item>Sim</Item>
172 <Item>OpenSim.Framework.Inventory</Item>
173 </Issue>
174 </Message>
175 </Messages>
176 </Namespace>
177 <Namespace Name="OpenSim.Framework.Sims">
178 <Messages>
179 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
180 <Issue>
181 <Item>OpenSim.Framework.Sims</Item>
182 </Issue>
183 </Message>
184 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
185 <Issue Name="Namespace">
186 <Item>Sim</Item>
187 <Item>OpenSim.Framework.Sims</Item>
188 </Issue>
189 </Message>
190 </Messages>
191 </Namespace>
192 <Namespace Name="OpenSim.Framework.Terrain">
193 <Messages>
194 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
195 <Issue>
196 <Item>OpenSim.Framework.Terrain</Item>
197 </Issue>
198 </Message>
199 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
200 <Issue Name="Namespace">
201 <Item>Sim</Item>
202 <Item>OpenSim.Framework.Terrain</Item>
203 </Issue>
204 </Message>
205 </Messages>
206 </Namespace>
207 <Namespace Name="OpenSim.Framework.User">
208 <Messages>
209 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
210 <Issue>
211 <Item>OpenSim.Framework.User</Item>
212 </Issue>
213 </Message>
214 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
215 <Issue Name="Namespace">
216 <Item>Sim</Item>
217 <Item>OpenSim.Framework.User</Item>
218 </Issue>
219 </Message>
220 </Messages>
221 </Namespace>
222 <Namespace Name="OpenSim.Framework.Utilities">
223 <Messages>
224 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
225 <Issue>
226 <Item>OpenSim.Framework.Utilities</Item>
227 </Issue>
228 </Message>
229 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
230 <Issue Name="Namespace">
231 <Item>Sim</Item>
232 <Item>OpenSim.Framework.Utilities</Item>
233 </Issue>
234 </Message>
235 </Messages>
236 </Namespace>
237 <Namespace Name="OpenSim.GridInterfaces.Local">
238 <Messages>
239 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
240 <Issue Name="Namespace">
241 <Item>Sim</Item>
242 <Item>OpenSim.GridInterfaces.Local</Item>
243 </Issue>
244 </Message>
245 </Messages>
246 </Namespace>
247 <Namespace Name="OpenSim.GridInterfaces.Remote">
248 <Messages>
249 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
250 <Issue>
251 <Item>OpenSim.GridInterfaces.Remote</Item>
252 </Issue>
253 </Message>
254 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
255 <Issue Name="Namespace">
256 <Item>Sim</Item>
257 <Item>OpenSim.GridInterfaces.Remote</Item>
258 </Issue>
259 </Message>
260 </Messages>
261 </Namespace>
262 <Namespace Name="OpenSim.Physics.BasicPhysicsPlugin">
263 <Messages>
264 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
265 <Issue Name="Namespace">
266 <Item>Plugin</Item>
267 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
268 </Issue>
269 </Message>
270 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
271 <Issue Name="Namespace">
272 <Item>Sim</Item>
273 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
274 </Issue>
275 </Message>
276 </Messages>
277 </Namespace>
278 <Namespace Name="OpenSim.Physics.Manager">
279 <Messages>
280 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
281 <Issue Name="Namespace">
282 <Item>Sim</Item>
283 <Item>OpenSim.Physics.Manager</Item>
284 </Issue>
285 </Message>
286 </Messages>
287 </Namespace>
288 <Namespace Name="OpenSim.Physics.OdePlugin">
289 <Messages>
290 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
291 <Issue>
292 <Item>OpenSim.Physics.OdePlugin</Item>
293 </Issue>
294 </Message>
295 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
296 <Issue Name="Namespace">
297 <Item>Plugin</Item>
298 <Item>OpenSim.Physics.OdePlugin</Item>
299 </Issue>
300 </Message>
301 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
302 <Issue Name="Namespace">
303 <Item>Sim</Item>
304 <Item>OpenSim.Physics.OdePlugin</Item>
305 </Issue>
306 </Message>
307 </Messages>
308 </Namespace>
309 <Namespace Name="OpenSim.Physics.PhysXPlugin">
310 <Messages>
311 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
312 <Issue>
313 <Item>OpenSim.Physics.PhysXPlugin</Item>
314 </Issue>
315 </Message>
316 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
317 <Issue Name="Namespace">
318 <Item>Plugin</Item>
319 <Item>OpenSim.Physics.PhysXPlugin</Item>
320 </Issue>
321 </Message>
322 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
323 <Issue Name="Namespace">
324 <Item>Sim</Item>
325 <Item>OpenSim.Physics.PhysXPlugin</Item>
326 </Issue>
327 </Message>
328 </Messages>
329 </Namespace>
330 <Namespace Name="OpenSim.Storage.LocalStorageDb4o">
331 <Messages>
332 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
333 <Issue Name="Namespace">
334 <Item>Sim</Item>
335 <Item>OpenSim.Storage.LocalStorageDb4o</Item>
336 </Issue>
337 </Message>
338 </Messages>
339 </Namespace>
340 <Namespace Name="OpenSim.types">
341 <Messages>
342 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
343 <Issue>
344 <Item>OpenSim.types</Item>
345 </Issue>
346 </Message>
347 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
348 <Issue Name="Namespace">
349 <Item>OpenSim.types</Item>
350 </Issue>
351 </Message>
352 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
353 <Issue Name="Namespace">
354 <Item>Sim</Item>
355 <Item>OpenSim.types</Item>
356 </Issue>
357 </Message>
358 </Messages>
359 </Namespace>
360 <Namespace Name="OpenSim.UserServer">
361 <Messages>
362 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
363 <Issue>
364 <Item>OpenSim.UserServer</Item>
365 </Issue>
366 </Message>
367 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
368 <Issue Name="Namespace">
369 <Item>Sim</Item>
370 <Item>OpenSim.UserServer</Item>
371 </Issue>
372 </Message>
373 </Messages>
374 </Namespace>
375 <Namespace Name="OpenSim.world">
376 <Messages>
377 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
378 <Issue Name="Namespace">
379 <Item>OpenSim.world</Item>
380 </Issue>
381 </Message>
382 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
383 <Issue Name="Namespace">
384 <Item>Sim</Item>
385 <Item>OpenSim.world</Item>
386 </Issue>
387 </Message>
388 </Messages>
389 </Namespace>
390 <Namespace Name="OpenSim.world.scripting">
391 <Messages>
392 <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2007-03-27 04:29:04Z">
393 <Issue>
394 <Item>OpenSim.world.scripting</Item>
395 </Issue>
396 </Message>
397 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
398 <Issue Name="Namespace">
399 <Item>OpenSim.world.scripting</Item>
400 </Issue>
401 <Issue Name="Namespace">
402 <Item>OpenSim.world.scripting</Item>
403 </Issue>
404 </Message>
405 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
406 <Issue Name="Namespace">
407 <Item>Sim</Item>
408 <Item>OpenSim.world.scripting</Item>
409 </Issue>
410 </Message>
411 </Messages>
412 </Namespace>
413 </Namespaces>
414 <Targets>
415 <Target Name="$(ProjectDir)/bin/OpenGridServices.ServerConsole.dll">
416 <Modules>
417 <Module Name="opengridservices.serverconsole.dll">
418 <Messages>
419 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
420 <Issue>
421 <Item>OpenGridServices.ServerConsole</Item>
422 </Issue>
423 </Message>
424 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
425 <Issue Name="NoStrongName">
426 <Item>OpenGridServices.ServerConsole</Item>
427 </Issue>
428 </Message>
429 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
430 <Issue Name="NoAttr">
431 <Item>OpenGridServices.ServerConsole</Item>
432 </Issue>
433 </Message>
434 </Messages>
435 <Namespaces>
436 <Namespace Name="ServerConsole">
437 <Types>
438 <Type Name="conscmd_callback">
439 <Messages>
440 <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
441 <Issue Name="Type">
442 <Item>conscmd_callback</Item>
443 </Issue>
444 </Message>
445 <Message Id="conscmd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
446 <Issue Name="Type">
447 <Item>conscmd</Item>
448 <Item>ServerConsole.conscmd_callback</Item>
449 </Issue>
450 </Message>
451 <Message TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
452 <Issue Name="Type">
453 <Item>conscmd_callback</Item>
454 </Issue>
455 </Message>
456 </Messages>
457 <Members>
458 <Member Name="RunCmd(System.String,System.String[]):System.Void">
459 <Messages>
460 <Message Id="1#cmdparams" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
461 <Issue Name="Parameter">
462 <Item>conscmd_callback.RunCmd(String, String[]):Void</Item>
463 <Item>cmdparams</Item>
464 <Item>cmdparams</Item>
465 </Issue>
466 </Message>
467 </Messages>
468 </Member>
469 <Member Name="Show(System.String):System.Void">
470 <Messages>
471 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
472 <Issue Name="Parameter">
473 <Item>ShowWhat</Item>
474 </Issue>
475 </Message>
476 </Messages>
477 </Member>
478 </Members>
479 </Type>
480 <Type Name="ConsoleBase">
481 <Members>
482 <Member Name="CmdPrompt(System.String,System.String):System.String">
483 <Messages>
484 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
485 <Issue Name="Parameter">
486 <Item>ConsoleBase.CmdPrompt(String, String):String</Item>
487 <Item>defaultresponse</Item>
488 <Item>defaultresponse</Item>
489 </Issue>
490 </Message>
491 </Messages>
492 </Member>
493 <Member Name="CmdPrompt(System.String,System.String,System.String,System.String):System.String">
494 <Messages>
495 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
496 <Issue Name="Parameter">
497 <Item>OptionA</Item>
498 </Issue>
499 </Message>
500 <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
501 <Issue Name="Parameter">
502 <Item>OptionB</Item>
503 </Issue>
504 </Message>
505 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
506 <Issue Name="Parameter">
507 <Item>ConsoleBase.CmdPrompt(String, String, String, String):String</Item>
508 <Item>defaultresponse</Item>
509 <Item>defaultresponse</Item>
510 </Issue>
511 </Message>
512 </Messages>
513 </Member>
514 <Member Name="PasswdPrompt(System.String):System.String">
515 <Messages>
516 <Message Id="Passwd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
517 <Issue Name="Member">
518 <Item>Passwd</Item>
519 <Item>ConsoleBase.PasswdPrompt(String):String</Item>
520 </Issue>
521 </Message>
522 </Messages>
523 </Member>
524 <Member Name="RunCmd(System.String,System.String[]):System.Object">
525 <Messages>
526 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
527 <Issue Name="Parameter">
528 <Item>Cmd</Item>
529 </Issue>
530 </Message>
531 <Message Id="1#cmdparams" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
532 <Issue Name="Parameter">
533 <Item>ConsoleBase.RunCmd(String, String[]):Object</Item>
534 <Item>cmdparams</Item>
535 <Item>cmdparams</Item>
536 </Issue>
537 </Message>
538 </Messages>
539 </Member>
540 <Member Name="ShowCommands(System.String):System.Void">
541 <Messages>
542 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
543 <Issue Name="Parameter">
544 <Item>ShowWhat</Item>
545 </Issue>
546 </Message>
547 </Messages>
548 </Member>
549 <Member Name="Write(System.String):System.Void">
550 <Messages>
551 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
552 <Issue Name="Parameter">
553 <Item>Line</Item>
554 </Issue>
555 </Message>
556 </Messages>
557 </Member>
558 <Member Name="WriteLine(System.String):System.Void">
559 <Messages>
560 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
561 <Issue Name="Parameter">
562 <Item>Line</Item>
563 </Issue>
564 </Message>
565 </Messages>
566 </Member>
567 </Members>
568 </Type>
569 <Type Name="ConsoleBase+ConsoleType">
570 <Members>
571 <Member Name="SimChat">
572 <Messages>
573 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
574 <Issue Name="Member">
575 <Item>Sim</Item>
576 <Item>ConsoleType.SimChat</Item>
577 </Issue>
578 </Message>
579 </Messages>
580 </Member>
581 <Member Name="TCP">
582 <Messages>
583 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
584 <Issue Name="Member">
585 <Item>ConsoleType.TCP</Item>
586 </Issue>
587 </Message>
588 </Messages>
589 </Member>
590 </Members>
591 </Type>
592 <Type Name="MainConsole">
593 <Messages>
594 <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2007-03-27 04:29:04Z">
595 <Issue>
596 <Item>MainConsole</Item>
597 </Issue>
598 </Message>
599 </Messages>
600 </Type>
601 </Types>
602 </Namespace>
603 </Namespaces>
604 </Module>
605 </Modules>
606 </Target>
607 <Target Name="$(ProjectDir)/bin/OpenSim.Config.SimConfigDb4o.dll">
608 <Modules>
609 <Module Name="opensim.config.simconfigdb4o.dll">
610 <Messages>
611 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
612 <Issue>
613 <Item>OpenSim.Config.SimConfigDb4o</Item>
614 </Issue>
615 </Message>
616 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
617 <Issue Name="NoStrongName">
618 <Item>OpenSim.Config.SimConfigDb4o</Item>
619 </Issue>
620 </Message>
621 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
622 <Issue Name="NoAttr">
623 <Item>OpenSim.Config.SimConfigDb4o</Item>
624 </Issue>
625 </Message>
626 </Messages>
627 <Namespaces>
628 <Namespace Name="OpenSim.Config.SimConfigDb4o">
629 <Types>
630 <Type Name="Db40ConfigPlugin">
631 <Messages>
632 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
633 <Issue Name="Type">
634 <Item>Plugin</Item>
635 <Item>OpenSim.Config.SimConfigDb4o.Db40ConfigPlugin</Item>
636 </Issue>
637 </Message>
638 </Messages>
639 </Type>
640 <Type Name="DbSimConfig">
641 <Messages>
642 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
643 <Issue Name="Type">
644 <Item>Sim</Item>
645 <Item>OpenSim.Config.SimConfigDb4o.DbSimConfig</Item>
646 </Issue>
647 </Message>
648 <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
649 <Issue Name="Type">
650 <Item>Db</Item>
651 <Item>OpenSim.Config.SimConfigDb4o.DbSimConfig</Item>
652 </Issue>
653 </Message>
654 </Messages>
655 <Members>
656 <Member Name="InitConfig(System.Boolean):System.Void">
657 <Messages>
658 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
659 <Issue>
660 <Item>DbSimConfig.InitConfig(Boolean):Void</Item>
661 <Item>System.Exception</Item>
662 </Issue>
663 </Message>
664 <Message Id="System.UInt32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
665 <Issue>
666 <Item>DbSimConfig.InitConfig(Boolean):Void</Item>
667 <Item>System.UInt32.ToString</Item>
668 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
669 </Issue>
670 </Message>
671 <Message Id="System.UInt64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
672 <Issue>
673 <Item>DbSimConfig.InitConfig(Boolean):Void</Item>
674 <Item>System.UInt64.ToString</Item>
675 <Item>System.UInt64.ToString(System.IFormatProvider)</Item>
676 </Issue>
677 </Message>
678 </Messages>
679 </Member>
680 <Member Name="LoadDefaults():System.Void">
681 <Messages>
682 <Message Id="System.Convert.ToInt32(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
683 <Issue>
684 <Item>DbSimConfig.LoadDefaults():Void</Item>
685 <Item>System.Convert.ToInt32(System.String)</Item>
686 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item>
687 </Issue>
688 <Issue>
689 <Item>DbSimConfig.LoadDefaults():Void</Item>
690 <Item>System.Convert.ToInt32(System.String)</Item>
691 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item>
692 </Issue>
693 <Issue>
694 <Item>DbSimConfig.LoadDefaults():Void</Item>
695 <Item>System.Convert.ToInt32(System.String)</Item>
696 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item>
697 </Issue>
698 </Message>
699 </Messages>
700 </Member>
701 </Members>
702 </Type>
703 <Type Name="MapStorage">
704 <Members>
705 <Member Name="Map">
706 <Messages>
707 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
708 <Issue>
709 <Item>Map</Item>
710 </Issue>
711 </Message>
712 </Messages>
713 </Member>
714 </Members>
715 </Type>
716 </Types>
717 </Namespace>
718 </Namespaces>
719 </Module>
720 </Modules>
721 </Target>
722 <Target Name="$(ProjectDir)/bin/OpenSim.exe">
723 <Modules>
724 <Module Name="opensim.exe">
725 <Messages>
726 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
727 <Issue>
728 <Item>OpenSim</Item>
729 </Issue>
730 </Message>
731 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
732 <Issue Name="NoStrongName">
733 <Item>OpenSim</Item>
734 </Issue>
735 </Message>
736 <Message TypeName="MarkAssembliesWithAssemblyVersion" Category="Microsoft.Design" CheckId="CA1016" Created="2007-03-27 04:29:04Z">
737 <Issue>
738 <Item>OpenSim</Item>
739 </Issue>
740 </Message>
741 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
742 <Issue Name="NoAttr">
743 <Item>OpenSim</Item>
744 </Issue>
745 </Message>
746 <Message TypeName="MarkAssembliesWithComVisible" Category="Microsoft.Design" CheckId="CA1017" Created="2007-03-27 04:29:04Z">
747 <Issue Name="NoAttribute" Level="CriticalError">
748 <Item>OpenSim</Item>
749 </Issue>
750 </Message>
751 </Messages>
752 <Namespaces>
753 <Namespace Name="OpenSim">
754 <Types>
755 <Type Name="RegionServer">
756 <Members>
757 <Member Name="Main(System.String[]):System.Void">
758 <Messages>
759 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
760 <Issue>
761 <Item>'args'</Item>
762 <Item>RegionServer.Main(String[]):Void</Item>
763 </Issue>
764 <Issue>
765 <Item>'args'</Item>
766 <Item>RegionServer.Main(String[]):Void</Item>
767 </Issue>
768 </Message>
769 </Messages>
770 </Member>
771 </Members>
772 </Type>
773 </Types>
774 </Namespace>
775 </Namespaces>
776 </Module>
777 </Modules>
778 </Target>
779 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.Console.dll">
780 <Modules>
781 <Module Name="opensim.framework.console.dll">
782 <Messages>
783 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
784 <Issue>
785 <Item>OpenSim.Framework.Console</Item>
786 </Issue>
787 </Message>
788 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
789 <Issue Name="NoStrongName">
790 <Item>OpenSim.Framework.Console</Item>
791 </Issue>
792 </Message>
793 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
794 <Issue Name="NoAttr">
795 <Item>OpenSim.Framework.Console</Item>
796 </Issue>
797 </Message>
798 </Messages>
799 <Namespaces>
800 <Namespace Name="OpenSim.Framework.Console">
801 <Types>
802 <Type Name="ConsoleBase">
803 <Members>
804 <Member Name="CmdPrompt(System.String,System.String):System.String">
805 <Messages>
806 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
807 <Issue Name="Parameter">
808 <Item>ConsoleBase.CmdPrompt(String, String):String</Item>
809 <Item>defaultresponse</Item>
810 <Item>defaultresponse</Item>
811 </Issue>
812 </Message>
813 </Messages>
814 </Member>
815 <Member Name="CmdPrompt(System.String,System.String,System.String,System.String):System.String">
816 <Messages>
817 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
818 <Issue Name="Parameter">
819 <Item>OptionA</Item>
820 </Issue>
821 </Message>
822 <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
823 <Issue Name="Parameter">
824 <Item>OptionB</Item>
825 </Issue>
826 </Message>
827 <Message Id="1#defaultresponse" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
828 <Issue Name="Parameter">
829 <Item>ConsoleBase.CmdPrompt(String, String, String, String):String</Item>
830 <Item>defaultresponse</Item>
831 <Item>defaultresponse</Item>
832 </Issue>
833 </Message>
834 </Messages>
835 </Member>
836 <Member Name="RunCmd(System.String,System.String[]):System.Object">
837 <Messages>
838 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
839 <Issue Name="Parameter">
840 <Item>Cmd</Item>
841 </Issue>
842 </Message>
843 <Message Id="1#cmdparams" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
844 <Issue Name="Parameter">
845 <Item>ConsoleBase.RunCmd(String, String[]):Object</Item>
846 <Item>cmdparams</Item>
847 <Item>cmdparams</Item>
848 </Issue>
849 </Message>
850 </Messages>
851 </Member>
852 <Member Name="ShowCommands(System.String):System.Void">
853 <Messages>
854 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
855 <Issue Name="Parameter">
856 <Item>ShowWhat</Item>
857 </Issue>
858 </Message>
859 </Messages>
860 </Member>
861 </Members>
862 </Type>
863 <Type Name="ConsoleBase+ConsoleType">
864 <Members>
865 <Member Name="SimChat">
866 <Messages>
867 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
868 <Issue Name="Member">
869 <Item>Sim</Item>
870 <Item>ConsoleType.SimChat</Item>
871 </Issue>
872 </Message>
873 </Messages>
874 </Member>
875 <Member Name="TCP">
876 <Messages>
877 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
878 <Issue Name="Member">
879 <Item>ConsoleType.TCP</Item>
880 </Issue>
881 </Message>
882 </Messages>
883 </Member>
884 </Members>
885 </Type>
886 <Type Name="MainConsole">
887 <Messages>
888 <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2007-03-27 04:29:04Z">
889 <Issue>
890 <Item>MainConsole</Item>
891 </Issue>
892 </Message>
893 </Messages>
894 </Type>
895 </Types>
896 </Namespace>
897 </Namespaces>
898 </Module>
899 </Modules>
900 </Target>
901 <Target Name="$(ProjectDir)/bin/OpenSim.Framework.dll">
902 <Modules>
903 <Module Name="opensim.framework.dll">
904 <Messages>
905 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
906 <Issue>
907 <Item>OpenSim.Framework</Item>
908 </Issue>
909 </Message>
910 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
911 <Issue Name="NoStrongName">
912 <Item>OpenSim.Framework</Item>
913 </Issue>
914 </Message>
915 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
916 <Issue Name="NoAttr">
917 <Item>OpenSim.Framework</Item>
918 </Issue>
919 </Message>
920 </Messages>
921 <Namespaces>
922 <Namespace Name="OpenSim.Framework.Assets">
923 <Types>
924 <Type Name="AssetBase">
925 <Members>
926 <Member Name="Data">
927 <Messages>
928 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
929 <Issue>
930 <Item>Data</Item>
931 </Issue>
932 </Message>
933 </Messages>
934 </Member>
935 <Member Name="Description">
936 <Messages>
937 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
938 <Issue>
939 <Item>Description</Item>
940 </Issue>
941 </Message>
942 </Messages>
943 </Member>
944 <Member Name="FullID">
945 <Messages>
946 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
947 <Issue>
948 <Item>FullID</Item>
949 </Issue>
950 </Message>
951 </Messages>
952 </Member>
953 <Member Name="InvType">
954 <Messages>
955 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
956 <Issue>
957 <Item>InvType</Item>
958 </Issue>
959 </Message>
960 </Messages>
961 </Member>
962 <Member Name="Name">
963 <Messages>
964 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
965 <Issue>
966 <Item>Name</Item>
967 </Issue>
968 </Message>
969 </Messages>
970 </Member>
971 <Member Name="Type">
972 <Messages>
973 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
974 <Issue>
975 <Item>Type</Item>
976 </Issue>
977 </Message>
978 </Messages>
979 </Member>
980 </Members>
981 </Type>
982 <Type Name="PrimData">
983 <Members>
984 <Member Name=".ctor()">
985 <Messages>
986 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
987 <Issue>
988 <Item>PrimData.PrimData()</Item>
989 <Item>ParentID</Item>
990 <Item>System.UInt32</Item>
991 <Item>0</Item>
992 </Issue>
993 </Message>
994 </Messages>
995 </Member>
996 <Member Name="FullID">
997 <Messages>
998 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
999 <Issue>
1000 <Item>FullID</Item>
1001 </Issue>
1002 </Message>
1003 </Messages>
1004 </Member>
1005 <Member Name="LocalID">
1006 <Messages>
1007 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1008 <Issue>
1009 <Item>LocalID</Item>
1010 </Issue>
1011 </Message>
1012 </Messages>
1013 </Member>
1014 <Member Name="OwnerID">
1015 <Messages>
1016 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1017 <Issue>
1018 <Item>OwnerID</Item>
1019 </Issue>
1020 </Message>
1021 </Messages>
1022 </Member>
1023 <Member Name="ParentID">
1024 <Messages>
1025 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1026 <Issue>
1027 <Item>ParentID</Item>
1028 </Issue>
1029 </Message>
1030 </Messages>
1031 </Member>
1032 <Member Name="PathBegin">
1033 <Messages>
1034 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1035 <Issue>
1036 <Item>PathBegin</Item>
1037 </Issue>
1038 </Message>
1039 </Messages>
1040 </Member>
1041 <Member Name="PathCurve">
1042 <Messages>
1043 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1044 <Issue>
1045 <Item>PathCurve</Item>
1046 </Issue>
1047 </Message>
1048 </Messages>
1049 </Member>
1050 <Member Name="PathEnd">
1051 <Messages>
1052 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1053 <Issue>
1054 <Item>PathEnd</Item>
1055 </Issue>
1056 </Message>
1057 </Messages>
1058 </Member>
1059 <Member Name="PathRadiusOffset">
1060 <Messages>
1061 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1062 <Issue>
1063 <Item>PathRadiusOffset</Item>
1064 </Issue>
1065 </Message>
1066 </Messages>
1067 </Member>
1068 <Member Name="PathRevolutions">
1069 <Messages>
1070 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1071 <Issue>
1072 <Item>PathRevolutions</Item>
1073 </Issue>
1074 </Message>
1075 </Messages>
1076 </Member>
1077 <Member Name="PathScaleX">
1078 <Messages>
1079 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1080 <Issue>
1081 <Item>PathScaleX</Item>
1082 </Issue>
1083 </Message>
1084 </Messages>
1085 </Member>
1086 <Member Name="PathScaleY">
1087 <Messages>
1088 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1089 <Issue>
1090 <Item>PathScaleY</Item>
1091 </Issue>
1092 </Message>
1093 </Messages>
1094 </Member>
1095 <Member Name="PathShearX">
1096 <Messages>
1097 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1098 <Issue>
1099 <Item>PathShearX</Item>
1100 </Issue>
1101 </Message>
1102 </Messages>
1103 </Member>
1104 <Member Name="PathShearY">
1105 <Messages>
1106 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1107 <Issue>
1108 <Item>PathShearY</Item>
1109 </Issue>
1110 </Message>
1111 </Messages>
1112 </Member>
1113 <Member Name="PathSkew">
1114 <Messages>
1115 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1116 <Issue>
1117 <Item>PathSkew</Item>
1118 </Issue>
1119 </Message>
1120 </Messages>
1121 </Member>
1122 <Member Name="PathTaperX">
1123 <Messages>
1124 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1125 <Issue>
1126 <Item>PathTaperX</Item>
1127 </Issue>
1128 </Message>
1129 </Messages>
1130 </Member>
1131 <Member Name="PathTaperY">
1132 <Messages>
1133 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1134 <Issue>
1135 <Item>PathTaperY</Item>
1136 </Issue>
1137 </Message>
1138 </Messages>
1139 </Member>
1140 <Member Name="PathTwist">
1141 <Messages>
1142 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1143 <Issue>
1144 <Item>PathTwist</Item>
1145 </Issue>
1146 </Message>
1147 </Messages>
1148 </Member>
1149 <Member Name="PathTwistBegin">
1150 <Messages>
1151 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1152 <Issue>
1153 <Item>PathTwistBegin</Item>
1154 </Issue>
1155 </Message>
1156 </Messages>
1157 </Member>
1158 <Member Name="PCode">
1159 <Messages>
1160 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1161 <Issue>
1162 <Item>PCode</Item>
1163 </Issue>
1164 </Message>
1165 </Messages>
1166 </Member>
1167 <Member Name="Position">
1168 <Messages>
1169 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1170 <Issue>
1171 <Item>Position</Item>
1172 </Issue>
1173 </Message>
1174 </Messages>
1175 </Member>
1176 <Member Name="ProfileBegin">
1177 <Messages>
1178 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1179 <Issue>
1180 <Item>ProfileBegin</Item>
1181 </Issue>
1182 </Message>
1183 </Messages>
1184 </Member>
1185 <Member Name="ProfileCurve">
1186 <Messages>
1187 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1188 <Issue>
1189 <Item>ProfileCurve</Item>
1190 </Issue>
1191 </Message>
1192 </Messages>
1193 </Member>
1194 <Member Name="ProfileEnd">
1195 <Messages>
1196 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1197 <Issue>
1198 <Item>ProfileEnd</Item>
1199 </Issue>
1200 </Message>
1201 </Messages>
1202 </Member>
1203 <Member Name="ProfileHollow">
1204 <Messages>
1205 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1206 <Issue>
1207 <Item>ProfileHollow</Item>
1208 </Issue>
1209 </Message>
1210 </Messages>
1211 </Member>
1212 <Member Name="Rotation">
1213 <Messages>
1214 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1215 <Issue>
1216 <Item>Rotation</Item>
1217 </Issue>
1218 </Message>
1219 </Messages>
1220 </Member>
1221 <Member Name="Scale">
1222 <Messages>
1223 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1224 <Issue>
1225 <Item>Scale</Item>
1226 </Issue>
1227 </Message>
1228 </Messages>
1229 </Member>
1230 <Member Name="Texture">
1231 <Messages>
1232 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1233 <Issue>
1234 <Item>Texture</Item>
1235 </Issue>
1236 </Message>
1237 </Messages>
1238 </Member>
1239 </Members>
1240 </Type>
1241 </Types>
1242 </Namespace>
1243 <Namespace Name="OpenSim.Framework.Grid">
1244 <Types>
1245 <Type Name="LoginService">
1246 <Messages>
1247 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1248 <Issue Name="Type">
1249 <Item>Login</Item>
1250 <Item>LoginService</Item>
1251 <Item>LogOn</Item>
1252 </Issue>
1253 </Message>
1254 </Messages>
1255 </Type>
1256 </Types>
1257 </Namespace>
1258 <Namespace Name="OpenSim.Framework.Interfaces">
1259 <Types>
1260 <Type Name="AgentCircuitData">
1261 <Members>
1262 <Member Name="AgentID">
1263 <Messages>
1264 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1265 <Issue>
1266 <Item>AgentID</Item>
1267 </Issue>
1268 </Message>
1269 </Messages>
1270 </Member>
1271 <Member Name="circuitcode">
1272 <Messages>
1273 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1274 <Issue>
1275 <Item>circuitcode</Item>
1276 </Issue>
1277 </Message>
1278 <Message Id="circuitcode" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1279 <Issue Name="Member">
1280 <Item>circuitcode</Item>
1281 <Item>AgentCircuitData.circuitcode</Item>
1282 </Issue>
1283 </Message>
1284 </Messages>
1285 </Member>
1286 <Member Name="firstname">
1287 <Messages>
1288 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1289 <Issue>
1290 <Item>firstname</Item>
1291 </Issue>
1292 </Message>
1293 <Message Id="firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1294 <Issue Name="Member">
1295 <Item>firstname</Item>
1296 <Item>AgentCircuitData.firstname</Item>
1297 </Issue>
1298 </Message>
1299 </Messages>
1300 </Member>
1301 <Member Name="lastname">
1302 <Messages>
1303 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1304 <Issue>
1305 <Item>lastname</Item>
1306 </Issue>
1307 </Message>
1308 <Message Id="lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1309 <Issue Name="Member">
1310 <Item>lastname</Item>
1311 <Item>AgentCircuitData.lastname</Item>
1312 </Issue>
1313 </Message>
1314 </Messages>
1315 </Member>
1316 <Member Name="SecureSessionID">
1317 <Messages>
1318 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1319 <Issue>
1320 <Item>SecureSessionID</Item>
1321 </Issue>
1322 </Message>
1323 </Messages>
1324 </Member>
1325 <Member Name="SessionID">
1326 <Messages>
1327 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1328 <Issue>
1329 <Item>SessionID</Item>
1330 </Issue>
1331 </Message>
1332 </Messages>
1333 </Member>
1334 </Members>
1335 </Type>
1336 <Type Name="ARequest">
1337 <Messages>
1338 <Message TypeName="OverrideEqualsAndOperatorEqualsOnValueTypes" Category="Microsoft.Performance" CheckId="CA1815" Created="2007-03-27 04:29:04Z">
1339 <Issue Name="Equals">
1340 <Item>OpenSim.Framework.Interfaces.ARequest</Item>
1341 </Issue>
1342 <Issue Name="op_Equality">
1343 <Item>OpenSim.Framework.Interfaces.ARequest</Item>
1344 </Issue>
1345 </Message>
1346 </Messages>
1347 <Members>
1348 <Member Name="AssetID">
1349 <Messages>
1350 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1351 <Issue>
1352 <Item>AssetID</Item>
1353 </Issue>
1354 </Message>
1355 </Messages>
1356 </Member>
1357 <Member Name="IsTexture">
1358 <Messages>
1359 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1360 <Issue>
1361 <Item>IsTexture</Item>
1362 </Issue>
1363 </Message>
1364 </Messages>
1365 </Member>
1366 </Members>
1367 </Type>
1368 <Type Name="AuthenticateResponse">
1369 <Members>
1370 <Member Name="Authorised">
1371 <Messages>
1372 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1373 <Issue>
1374 <Item>Authorised</Item>
1375 </Issue>
1376 </Message>
1377 <Message Id="Authorised" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1378 <Issue Name="Member">
1379 <Item>Authorised</Item>
1380 <Item>AuthenticateResponse.Authorised</Item>
1381 </Issue>
1382 </Message>
1383 </Messages>
1384 </Member>
1385 <Member Name="LoginInfo">
1386 <Messages>
1387 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1388 <Issue>
1389 <Item>LoginInfo</Item>
1390 </Issue>
1391 </Message>
1392 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1393 <Issue Name="Member">
1394 <Item>Login</Item>
1395 <Item>LoginInfo</Item>
1396 <Item>LogOn</Item>
1397 </Issue>
1398 </Message>
1399 </Messages>
1400 </Member>
1401 </Members>
1402 </Type>
1403 <Type Name="IAssetPlugin">
1404 <Messages>
1405 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1406 <Issue Name="Type">
1407 <Item>Plugin</Item>
1408 <Item>OpenSim.Framework.Interfaces.IAssetPlugin</Item>
1409 </Issue>
1410 </Message>
1411 </Messages>
1412 <Members>
1413 <Member Name="GetAssetServer():OpenSim.Framework.Interfaces.IAssetServer">
1414 <Messages>
1415 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
1416 <Issue Certainty="50">
1417 <Item>GetAssetServer</Item>
1418 </Issue>
1419 </Message>
1420 </Messages>
1421 </Member>
1422 </Members>
1423 </Type>
1424 <Type Name="IAssetReceiver">
1425 <Members>
1426 <Member Name="AssetReceived(OpenSim.Framework.Assets.AssetBase,System.Boolean):System.Void">
1427 <Messages>
1428 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1429 <Issue Name="Parameter">
1430 <Item>IsTexture</Item>
1431 </Issue>
1432 </Message>
1433 </Messages>
1434 </Member>
1435 </Members>
1436 </Type>
1437 <Type Name="IAssetServer">
1438 <Members>
1439 <Member Name="RequestAsset(libsecondlife.LLUUID,System.Boolean):System.Void">
1440 <Messages>
1441 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1442 <Issue Name="ParameterId">
1443 <Item>ID</Item>
1444 <Item>assetID</Item>
1445 <Item>Id</Item>
1446 </Issue>
1447 </Message>
1448 </Messages>
1449 </Member>
1450 <Member Name="SetServerInfo(System.String,System.String):System.Void">
1451 <Messages>
1452 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1453 <Issue Name="Parameter">
1454 <Item>ServerUrl</Item>
1455 </Issue>
1456 </Message>
1457 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1458 <Issue Name="Parameter">
1459 <Item>ServerKey</Item>
1460 </Issue>
1461 </Message>
1462 <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z">
1463 <Issue>
1464 <Item>ServerUrl</Item>
1465 <Item>IAssetServer.SetServerInfo(String, String):Void</Item>
1466 </Issue>
1467 </Message>
1468 </Messages>
1469 </Member>
1470 </Members>
1471 </Type>
1472 <Type Name="IGridPlugin">
1473 <Messages>
1474 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1475 <Issue Name="Type">
1476 <Item>Plugin</Item>
1477 <Item>OpenSim.Framework.Interfaces.IGridPlugin</Item>
1478 </Issue>
1479 </Message>
1480 </Messages>
1481 <Members>
1482 <Member Name="GetGridServer():OpenSim.Framework.Interfaces.IGridServer">
1483 <Messages>
1484 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
1485 <Issue Certainty="50">
1486 <Item>GetGridServer</Item>
1487 </Issue>
1488 </Message>
1489 </Messages>
1490 </Member>
1491 </Members>
1492 </Type>
1493 <Type Name="IGridServer">
1494 <Members>
1495 <Member Name="AuthenticateSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):OpenSim.Framework.Interfaces.AuthenticateResponse">
1496 <Messages>
1497 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1498 <Issue Name="ParameterId">
1499 <Item>ID</Item>
1500 <Item>sessionID</Item>
1501 <Item>Id</Item>
1502 </Issue>
1503 </Message>
1504 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1505 <Issue Name="ParameterId">
1506 <Item>ID</Item>
1507 <Item>agentID</Item>
1508 <Item>Id</Item>
1509 </Issue>
1510 </Message>
1511 </Messages>
1512 </Member>
1513 <Member Name="GetName():System.String">
1514 <Messages>
1515 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
1516 <Issue Certainty="50">
1517 <Item>GetName</Item>
1518 </Issue>
1519 </Message>
1520 </Messages>
1521 </Member>
1522 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
1523 <Messages>
1524 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1525 <Issue Name="ParameterId">
1526 <Item>ID</Item>
1527 <Item>sessionID</Item>
1528 <Item>Id</Item>
1529 </Issue>
1530 </Message>
1531 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1532 <Issue Name="ParameterId">
1533 <Item>ID</Item>
1534 <Item>agentID</Item>
1535 <Item>Id</Item>
1536 </Issue>
1537 </Message>
1538 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1539 <Issue Name="Member">
1540 <Item>Logout</Item>
1541 <Item>LogoutSession</Item>
1542 <Item>LogOff</Item>
1543 </Issue>
1544 </Message>
1545 </Messages>
1546 </Member>
1547 <Member Name="RequestNeighbours():OpenSim.Framework.Interfaces.NeighbourInfo[]">
1548 <Messages>
1549 <Message Id="Neighbours" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1550 <Issue Name="Member">
1551 <Item>Neighbours</Item>
1552 <Item>IGridServer.RequestNeighbours():NeighbourInfo[]</Item>
1553 </Issue>
1554 </Message>
1555 </Messages>
1556 </Member>
1557 <Member Name="RequestUUIDBlock():OpenSim.Framework.Interfaces.UUIDBlock">
1558 <Messages>
1559 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
1560 <Issue Name="Member">
1561 <Item>IGridServer.RequestUUIDBlock():UUIDBlock</Item>
1562 </Issue>
1563 </Message>
1564 </Messages>
1565 </Member>
1566 <Member Name="SetServerInfo(System.String,System.String,System.String):System.Void">
1567 <Messages>
1568 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1569 <Issue Name="Parameter">
1570 <Item>ServerUrl</Item>
1571 </Issue>
1572 </Message>
1573 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1574 <Issue Name="Parameter">
1575 <Item>SendKey</Item>
1576 </Issue>
1577 </Message>
1578 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1579 <Issue Name="Parameter">
1580 <Item>RecvKey</Item>
1581 </Issue>
1582 </Message>
1583 <Message Id="2#Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1584 <Issue Name="Parameter">
1585 <Item>IGridServer.SetServerInfo(String, String, String):Void</Item>
1586 <Item>Recv</Item>
1587 <Item>RecvKey</Item>
1588 </Issue>
1589 </Message>
1590 <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z">
1591 <Issue>
1592 <Item>ServerUrl</Item>
1593 <Item>IGridServer.SetServerInfo(String, String, String):Void</Item>
1594 </Issue>
1595 </Message>
1596 </Messages>
1597 </Member>
1598 </Members>
1599 </Type>
1600 <Type Name="ILocalStorage">
1601 <Members>
1602 <Member Name="RemovePrim(libsecondlife.LLUUID):System.Void">
1603 <Messages>
1604 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1605 <Issue Name="ParameterId">
1606 <Item>ID</Item>
1607 <Item>primID</Item>
1608 <Item>Id</Item>
1609 </Issue>
1610 </Message>
1611 </Messages>
1612 </Member>
1613 <Member Name="ShutDown():System.Void">
1614 <Messages>
1615 <Message Id="ShutDown" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z">
1616 <Issue Name="ShouldBeDiscreteTerm">
1617 <Item>ShutDown</Item>
1618 <Item>method</Item>
1619 <Item>ShutDown</Item>
1620 <Item>Shutdown</Item>
1621 </Issue>
1622 </Message>
1623 </Messages>
1624 </Member>
1625 </Members>
1626 </Type>
1627 <Type Name="ISimConfig">
1628 <Messages>
1629 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1630 <Issue Name="Type">
1631 <Item>Sim</Item>
1632 <Item>OpenSim.Framework.Interfaces.ISimConfig</Item>
1633 </Issue>
1634 </Message>
1635 </Messages>
1636 <Members>
1637 <Member Name="GetConfigObject():OpenSim.Framework.Interfaces.SimConfig">
1638 <Messages>
1639 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
1640 <Issue Certainty="50">
1641 <Item>GetConfigObject</Item>
1642 </Issue>
1643 </Message>
1644 </Messages>
1645 </Member>
1646 </Members>
1647 </Type>
1648 <Type Name="IUserServer">
1649 <Members>
1650 <Member Name="RequestAgentsInventory(libsecondlife.LLUUID):OpenSim.Framework.Inventory.AgentInventory">
1651 <Messages>
1652 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
1653 <Issue Name="ParameterId">
1654 <Item>ID</Item>
1655 <Item>agentID</Item>
1656 <Item>Id</Item>
1657 </Issue>
1658 </Message>
1659 </Messages>
1660 </Member>
1661 <Member Name="SetServerInfo(System.String,System.String,System.String):System.Void">
1662 <Messages>
1663 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1664 <Issue Name="Parameter">
1665 <Item>ServerUrl</Item>
1666 </Issue>
1667 </Message>
1668 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1669 <Issue Name="Parameter">
1670 <Item>SendKey</Item>
1671 </Issue>
1672 </Message>
1673 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1674 <Issue Name="Parameter">
1675 <Item>RecvKey</Item>
1676 </Issue>
1677 </Message>
1678 <Message Id="2#Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1679 <Issue Name="Parameter">
1680 <Item>IUserServer.SetServerInfo(String, String, String):Void</Item>
1681 <Item>Recv</Item>
1682 <Item>RecvKey</Item>
1683 </Issue>
1684 </Message>
1685 <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z">
1686 <Issue>
1687 <Item>ServerUrl</Item>
1688 <Item>IUserServer.SetServerInfo(String, String, String):Void</Item>
1689 </Issue>
1690 </Message>
1691 </Messages>
1692 </Member>
1693 </Members>
1694 </Type>
1695 <Type Name="LocalGridBase">
1696 <Members>
1697 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
1698 <Messages>
1699 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1700 <Issue Name="Member">
1701 <Item>Logout</Item>
1702 <Item>LogoutSession</Item>
1703 <Item>LogOff</Item>
1704 </Issue>
1705 </Message>
1706 </Messages>
1707 </Member>
1708 </Members>
1709 </Type>
1710 <Type Name="Login">
1711 <Messages>
1712 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1713 <Issue Name="Type">
1714 <Item>Login</Item>
1715 <Item>Login</Item>
1716 <Item>LogOn</Item>
1717 </Issue>
1718 </Message>
1719 </Messages>
1720 <Members>
1721 <Member Name="Agent">
1722 <Messages>
1723 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1724 <Issue>
1725 <Item>Agent</Item>
1726 </Issue>
1727 </Message>
1728 </Messages>
1729 </Member>
1730 <Member Name="BaseFolder">
1731 <Messages>
1732 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1733 <Issue>
1734 <Item>BaseFolder</Item>
1735 </Issue>
1736 </Message>
1737 </Messages>
1738 </Member>
1739 <Member Name="First">
1740 <Messages>
1741 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1742 <Issue>
1743 <Item>First</Item>
1744 </Issue>
1745 </Message>
1746 </Messages>
1747 </Member>
1748 <Member Name="InventoryFolder">
1749 <Messages>
1750 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1751 <Issue>
1752 <Item>InventoryFolder</Item>
1753 </Issue>
1754 </Message>
1755 </Messages>
1756 </Member>
1757 <Member Name="Last">
1758 <Messages>
1759 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1760 <Issue>
1761 <Item>Last</Item>
1762 </Issue>
1763 </Message>
1764 </Messages>
1765 </Member>
1766 <Member Name="SecureSession">
1767 <Messages>
1768 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1769 <Issue>
1770 <Item>SecureSession</Item>
1771 </Issue>
1772 </Message>
1773 </Messages>
1774 </Member>
1775 <Member Name="Session">
1776 <Messages>
1777 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1778 <Issue>
1779 <Item>Session</Item>
1780 </Issue>
1781 </Message>
1782 </Messages>
1783 </Member>
1784 </Members>
1785 </Type>
1786 <Type Name="NeighbourInfo">
1787 <Messages>
1788 <Message Id="Neighbour" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1789 <Issue Name="Type">
1790 <Item>Neighbour</Item>
1791 <Item>OpenSim.Framework.Interfaces.NeighbourInfo</Item>
1792 </Issue>
1793 </Message>
1794 </Messages>
1795 <Members>
1796 <Member Name="regionhandle">
1797 <Messages>
1798 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1799 <Issue>
1800 <Item>regionhandle</Item>
1801 </Issue>
1802 </Message>
1803 <Message Id="regionhandle" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1804 <Issue Name="Member">
1805 <Item>regionhandle</Item>
1806 <Item>NeighbourInfo.regionhandle</Item>
1807 </Issue>
1808 </Message>
1809 </Messages>
1810 </Member>
1811 <Member Name="RegionLocX">
1812 <Messages>
1813 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1814 <Issue>
1815 <Item>RegionLocX</Item>
1816 </Issue>
1817 </Message>
1818 </Messages>
1819 </Member>
1820 <Member Name="RegionLocY">
1821 <Messages>
1822 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1823 <Issue>
1824 <Item>RegionLocY</Item>
1825 </Issue>
1826 </Message>
1827 </Messages>
1828 </Member>
1829 <Member Name="sim_ip">
1830 <Messages>
1831 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1832 <Issue>
1833 <Item>sim_ip</Item>
1834 </Issue>
1835 </Message>
1836 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1837 <Issue Name="Member">
1838 <Item>sim</Item>
1839 <Item>NeighbourInfo.sim_ip</Item>
1840 </Issue>
1841 </Message>
1842 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
1843 <Issue Name="Member">
1844 <Item>sim_ip</Item>
1845 </Issue>
1846 </Message>
1847 </Messages>
1848 </Member>
1849 <Member Name="sim_port">
1850 <Messages>
1851 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1852 <Issue>
1853 <Item>sim_port</Item>
1854 </Issue>
1855 </Message>
1856 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1857 <Issue Name="Member">
1858 <Item>sim</Item>
1859 <Item>NeighbourInfo.sim_port</Item>
1860 </Issue>
1861 </Message>
1862 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
1863 <Issue Name="Member">
1864 <Item>sim_port</Item>
1865 </Issue>
1866 </Message>
1867 </Messages>
1868 </Member>
1869 </Members>
1870 </Type>
1871 <Type Name="RemoteGridBase">
1872 <Members>
1873 <Member Name="agentcircuits">
1874 <Messages>
1875 <Message TypeName="CollectionPropertiesShouldBeReadOnly" Category="Microsoft.Usage" CheckId="CA2227" Created="2007-03-27 04:29:04Z">
1876 <Issue>
1877 <Item>agentcircuits</Item>
1878 </Issue>
1879 </Message>
1880 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
1881 <Issue Name="Member">
1882 <Item>agentcircuits</Item>
1883 </Issue>
1884 </Message>
1885 <Message Id="agentcircuits" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1886 <Issue Name="Member">
1887 <Item>agentcircuits</Item>
1888 <Item>RemoteGridBase.agentcircuits:Dictionary`2&lt;System.UInt32,OpenSim.Framework.Interfaces.AgentCircuitData&gt;</Item>
1889 </Issue>
1890 </Message>
1891 </Messages>
1892 </Member>
1893 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
1894 <Messages>
1895 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
1896 <Issue Name="Member">
1897 <Item>Logout</Item>
1898 <Item>LogoutSession</Item>
1899 <Item>LogOff</Item>
1900 </Issue>
1901 </Message>
1902 </Messages>
1903 </Member>
1904 </Members>
1905 </Type>
1906 <Type Name="SimConfig">
1907 <Messages>
1908 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1909 <Issue Name="Type">
1910 <Item>Sim</Item>
1911 <Item>OpenSim.Framework.Interfaces.SimConfig</Item>
1912 </Issue>
1913 </Message>
1914 </Messages>
1915 <Members>
1916 <Member Name="AssetSendKey">
1917 <Messages>
1918 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1919 <Issue>
1920 <Item>AssetSendKey</Item>
1921 </Issue>
1922 </Message>
1923 </Messages>
1924 </Member>
1925 <Member Name="AssetURL">
1926 <Messages>
1927 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1928 <Issue>
1929 <Item>AssetURL</Item>
1930 </Issue>
1931 </Message>
1932 </Messages>
1933 </Member>
1934 <Member Name="GridRecvKey">
1935 <Messages>
1936 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1937 <Issue>
1938 <Item>GridRecvKey</Item>
1939 </Issue>
1940 </Message>
1941 <Message Id="Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1942 <Issue Name="Member">
1943 <Item>Recv</Item>
1944 <Item>SimConfig.GridRecvKey</Item>
1945 </Issue>
1946 </Message>
1947 </Messages>
1948 </Member>
1949 <Member Name="GridSendKey">
1950 <Messages>
1951 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1952 <Issue>
1953 <Item>GridSendKey</Item>
1954 </Issue>
1955 </Message>
1956 </Messages>
1957 </Member>
1958 <Member Name="GridURL">
1959 <Messages>
1960 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1961 <Issue>
1962 <Item>GridURL</Item>
1963 </Issue>
1964 </Message>
1965 </Messages>
1966 </Member>
1967 <Member Name="IPListenAddr">
1968 <Messages>
1969 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1970 <Issue>
1971 <Item>IPListenAddr</Item>
1972 </Issue>
1973 </Message>
1974 <Message Id="Addr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
1975 <Issue Name="Member">
1976 <Item>Addr</Item>
1977 <Item>SimConfig.IPListenAddr</Item>
1978 </Issue>
1979 </Message>
1980 </Messages>
1981 </Member>
1982 <Member Name="IPListenPort">
1983 <Messages>
1984 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1985 <Issue>
1986 <Item>IPListenPort</Item>
1987 </Issue>
1988 </Message>
1989 </Messages>
1990 </Member>
1991 <Member Name="RegionHandle">
1992 <Messages>
1993 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
1994 <Issue>
1995 <Item>RegionHandle</Item>
1996 </Issue>
1997 </Message>
1998 </Messages>
1999 </Member>
2000 <Member Name="RegionLocX">
2001 <Messages>
2002 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2003 <Issue>
2004 <Item>RegionLocX</Item>
2005 </Issue>
2006 </Message>
2007 </Messages>
2008 </Member>
2009 <Member Name="RegionLocY">
2010 <Messages>
2011 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2012 <Issue>
2013 <Item>RegionLocY</Item>
2014 </Issue>
2015 </Message>
2016 </Messages>
2017 </Member>
2018 <Member Name="RegionName">
2019 <Messages>
2020 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2021 <Issue>
2022 <Item>RegionName</Item>
2023 </Issue>
2024 </Message>
2025 </Messages>
2026 </Member>
2027 <Member Name="SaveMap(System.Single[]):System.Void">
2028 <Messages>
2029 <Message Id="0#heightmap" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2030 <Issue Name="Parameter">
2031 <Item>SimConfig.SaveMap(Single[]):Void</Item>
2032 <Item>heightmap</Item>
2033 <Item>heightmap</Item>
2034 </Issue>
2035 </Message>
2036 </Messages>
2037 </Member>
2038 <Member Name="UserRecvKey">
2039 <Messages>
2040 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2041 <Issue>
2042 <Item>UserRecvKey</Item>
2043 </Issue>
2044 </Message>
2045 <Message Id="Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2046 <Issue Name="Member">
2047 <Item>Recv</Item>
2048 <Item>SimConfig.UserRecvKey</Item>
2049 </Issue>
2050 </Message>
2051 </Messages>
2052 </Member>
2053 <Member Name="UserSendKey">
2054 <Messages>
2055 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2056 <Issue>
2057 <Item>UserSendKey</Item>
2058 </Issue>
2059 </Message>
2060 </Messages>
2061 </Member>
2062 <Member Name="UserURL">
2063 <Messages>
2064 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2065 <Issue>
2066 <Item>UserURL</Item>
2067 </Issue>
2068 </Message>
2069 </Messages>
2070 </Member>
2071 </Members>
2072 </Type>
2073 <Type Name="UUIDBlock">
2074 <Messages>
2075 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
2076 <Issue Name="Type">
2077 <Item>UUIDBlock</Item>
2078 </Issue>
2079 </Message>
2080 <Message TypeName="OverrideEqualsAndOperatorEqualsOnValueTypes" Category="Microsoft.Performance" CheckId="CA1815" Created="2007-03-27 04:29:04Z">
2081 <Issue Name="Equals">
2082 <Item>OpenSim.Framework.Interfaces.UUIDBlock</Item>
2083 </Issue>
2084 <Issue Name="op_Equality">
2085 <Item>OpenSim.Framework.Interfaces.UUIDBlock</Item>
2086 </Issue>
2087 </Message>
2088 </Messages>
2089 <Members>
2090 <Member Name="BlockEnd">
2091 <Messages>
2092 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2093 <Issue>
2094 <Item>BlockEnd</Item>
2095 </Issue>
2096 </Message>
2097 </Messages>
2098 </Member>
2099 <Member Name="BlockStart">
2100 <Messages>
2101 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2102 <Issue>
2103 <Item>BlockStart</Item>
2104 </Issue>
2105 </Message>
2106 </Messages>
2107 </Member>
2108 </Members>
2109 </Type>
2110 </Types>
2111 </Namespace>
2112 <Namespace Name="OpenSim.Framework.Inventory">
2113 <Types>
2114 <Type Name="AgentInventory">
2115 <Members>
2116 <Member Name=".ctor()">
2117 <Messages>
2118 <Message TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214" Created="2007-03-27 04:29:04Z">
2119 <Issue>
2120 <Item>AgentInventory.AgentInventory()</Item>
2121 <Item>&#xD;&#xA;&#xD;&#xA;AgentInventory.AgentInventory()&#xD;&#xA;AgentInventory.Initialise():Void</Item>
2122 </Issue>
2123 </Message>
2124 </Messages>
2125 </Member>
2126 <Member Name="AddToInventory(libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):libsecondlife.LLUUID">
2127 <Messages>
2128 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
2129 <Issue Name="ParameterId">
2130 <Item>ID</Item>
2131 <Item>folderID</Item>
2132 <Item>Id</Item>
2133 </Issue>
2134 </Message>
2135 </Messages>
2136 </Member>
2137 <Member Name="AgentID">
2138 <Messages>
2139 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2140 <Issue>
2141 <Item>AgentID</Item>
2142 </Issue>
2143 </Message>
2144 </Messages>
2145 </Member>
2146 <Member Name="CreateNewFolder(libsecondlife.LLUUID,System.UInt16):System.Boolean">
2147 <Messages>
2148 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
2149 <Issue Name="ParameterId">
2150 <Item>ID</Item>
2151 <Item>folderID</Item>
2152 <Item>Id</Item>
2153 </Issue>
2154 </Message>
2155 </Messages>
2156 </Member>
2157 <Member Name="Initialise():System.Void">
2158 <Messages>
2159 <Message Id="Initialise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2160 <Issue Name="Member">
2161 <Item>Initialise</Item>
2162 <Item>AgentInventory.Initialise():Void</Item>
2163 </Issue>
2164 </Message>
2165 </Messages>
2166 </Member>
2167 <Member Name="InventoryFolders">
2168 <Messages>
2169 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2170 <Issue>
2171 <Item>InventoryFolders</Item>
2172 </Issue>
2173 </Message>
2174 </Messages>
2175 </Member>
2176 <Member Name="InventoryItems">
2177 <Messages>
2178 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2179 <Issue>
2180 <Item>InventoryItems</Item>
2181 </Issue>
2182 </Message>
2183 </Messages>
2184 </Member>
2185 <Member Name="InventoryRoot">
2186 <Messages>
2187 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2188 <Issue>
2189 <Item>InventoryRoot</Item>
2190 </Issue>
2191 </Message>
2192 </Messages>
2193 </Member>
2194 <Member Name="LastCached">
2195 <Messages>
2196 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2197 <Issue>
2198 <Item>LastCached</Item>
2199 </Issue>
2200 </Message>
2201 </Messages>
2202 </Member>
2203 <Member Name="UpdateItem(libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):System.Boolean">
2204 <Messages>
2205 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
2206 <Issue Name="ParameterId">
2207 <Item>ID</Item>
2208 <Item>itemID</Item>
2209 <Item>Id</Item>
2210 </Issue>
2211 </Message>
2212 </Messages>
2213 </Member>
2214 <Member Name="Wearables">
2215 <Messages>
2216 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2217 <Issue>
2218 <Item>Wearables</Item>
2219 </Issue>
2220 </Message>
2221 <Message Id="Wearables" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2222 <Issue Name="Member">
2223 <Item>Wearables</Item>
2224 <Item>AgentInventory.Wearables</Item>
2225 </Issue>
2226 </Message>
2227 </Messages>
2228 </Member>
2229 </Members>
2230 </Type>
2231 <Type Name="AvatarWearable">
2232 <Members>
2233 <Member Name="AssetID">
2234 <Messages>
2235 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2236 <Issue>
2237 <Item>AssetID</Item>
2238 </Issue>
2239 </Message>
2240 </Messages>
2241 </Member>
2242 <Member Name="ItemID">
2243 <Messages>
2244 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2245 <Issue>
2246 <Item>ItemID</Item>
2247 </Issue>
2248 </Message>
2249 </Messages>
2250 </Member>
2251 </Members>
2252 </Type>
2253 <Type Name="InventoryFolder">
2254 <Members>
2255 <Member Name="DefaultType">
2256 <Messages>
2257 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2258 <Issue>
2259 <Item>DefaultType</Item>
2260 </Issue>
2261 </Message>
2262 </Messages>
2263 </Member>
2264 <Member Name="FolderID">
2265 <Messages>
2266 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2267 <Issue>
2268 <Item>FolderID</Item>
2269 </Issue>
2270 </Message>
2271 </Messages>
2272 </Member>
2273 <Member Name="FolderName">
2274 <Messages>
2275 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2276 <Issue>
2277 <Item>FolderName</Item>
2278 </Issue>
2279 </Message>
2280 </Messages>
2281 </Member>
2282 <Member Name="Items">
2283 <Messages>
2284 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2285 <Issue>
2286 <Item>Items</Item>
2287 </Issue>
2288 </Message>
2289 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
2290 <Issue>
2291 <Item>System.Collections.Generic.List`1&lt;OpenSim.Framework.Inventory.InventoryItem&gt;</Item>
2292 <Item>InventoryFolder.Items</Item>
2293 </Issue>
2294 </Message>
2295 </Messages>
2296 </Member>
2297 <Member Name="OwnerID">
2298 <Messages>
2299 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2300 <Issue>
2301 <Item>OwnerID</Item>
2302 </Issue>
2303 </Message>
2304 </Messages>
2305 </Member>
2306 <Member Name="ParentID">
2307 <Messages>
2308 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2309 <Issue>
2310 <Item>ParentID</Item>
2311 </Issue>
2312 </Message>
2313 </Messages>
2314 </Member>
2315 <Member Name="Version">
2316 <Messages>
2317 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2318 <Issue>
2319 <Item>Version</Item>
2320 </Issue>
2321 </Message>
2322 </Messages>
2323 </Member>
2324 </Members>
2325 </Type>
2326 <Type Name="InventoryItem">
2327 <Members>
2328 <Member Name="AssetID">
2329 <Messages>
2330 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2331 <Issue>
2332 <Item>AssetID</Item>
2333 </Issue>
2334 </Message>
2335 </Messages>
2336 </Member>
2337 <Member Name="CreatorID">
2338 <Messages>
2339 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2340 <Issue>
2341 <Item>CreatorID</Item>
2342 </Issue>
2343 </Message>
2344 </Messages>
2345 </Member>
2346 <Member Name="Description">
2347 <Messages>
2348 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2349 <Issue>
2350 <Item>Description</Item>
2351 </Issue>
2352 </Message>
2353 </Messages>
2354 </Member>
2355 <Member Name="FolderID">
2356 <Messages>
2357 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2358 <Issue>
2359 <Item>FolderID</Item>
2360 </Issue>
2361 </Message>
2362 </Messages>
2363 </Member>
2364 <Member Name="InvType">
2365 <Messages>
2366 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2367 <Issue>
2368 <Item>InvType</Item>
2369 </Issue>
2370 </Message>
2371 </Messages>
2372 </Member>
2373 <Member Name="ItemID">
2374 <Messages>
2375 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2376 <Issue>
2377 <Item>ItemID</Item>
2378 </Issue>
2379 </Message>
2380 </Messages>
2381 </Member>
2382 <Member Name="Name">
2383 <Messages>
2384 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2385 <Issue>
2386 <Item>Name</Item>
2387 </Issue>
2388 </Message>
2389 </Messages>
2390 </Member>
2391 <Member Name="OwnerID">
2392 <Messages>
2393 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2394 <Issue>
2395 <Item>OwnerID</Item>
2396 </Issue>
2397 </Message>
2398 </Messages>
2399 </Member>
2400 <Member Name="Type">
2401 <Messages>
2402 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2403 <Issue>
2404 <Item>Type</Item>
2405 </Issue>
2406 </Message>
2407 </Messages>
2408 </Member>
2409 </Members>
2410 </Type>
2411 </Types>
2412 </Namespace>
2413 <Namespace Name="OpenSim.Framework.Sims">
2414 <Types>
2415 <Type Name="SimProfile">
2416 <Messages>
2417 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2418 <Issue Name="Type">
2419 <Item>Sim</Item>
2420 <Item>OpenSim.Framework.Sims.SimProfile</Item>
2421 </Issue>
2422 </Message>
2423 </Messages>
2424 <Members>
2425 <Member Name="LoadFromGrid(System.UInt64,System.String,System.String,System.String):OpenSim.Framework.Sims.SimProfile">
2426 <Messages>
2427 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
2428 <Issue>
2429 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2430 <Item>System.Exception</Item>
2431 </Issue>
2432 </Message>
2433 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
2434 <Issue Name="Parameter">
2435 <Item>GridURL</Item>
2436 </Issue>
2437 </Message>
2438 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
2439 <Issue Name="Parameter">
2440 <Item>SendKey</Item>
2441 </Issue>
2442 </Message>
2443 <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
2444 <Issue Name="Parameter">
2445 <Item>RecvKey</Item>
2446 </Issue>
2447 </Message>
2448 <Message Id="3#Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2449 <Issue Name="Parameter">
2450 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2451 <Item>Recv</Item>
2452 <Item>RecvKey</Item>
2453 </Issue>
2454 </Message>
2455 <Message Id="0#" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
2456 <Issue Name="Parameter">
2457 <Item>region_handle</Item>
2458 </Issue>
2459 </Message>
2460 <Message Id="1#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
2461 <Issue Name="Parameter">
2462 <Item>GridURL</Item>
2463 </Issue>
2464 </Message>
2465 <Message Id="RecvKey" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
2466 <Issue>
2467 <Item>RecvKey</Item>
2468 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2469 </Issue>
2470 </Message>
2471 <Message Id="System.Convert.ToUInt16(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2472 <Issue>
2473 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2474 <Item>System.Convert.ToUInt16(System.Object)</Item>
2475 <Item>System.Convert.ToUInt16(System.Object,System.IFormatProvider)</Item>
2476 </Issue>
2477 </Message>
2478 <Message Id="System.Convert.ToUInt32(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2479 <Issue>
2480 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2481 <Item>System.Convert.ToUInt32(System.Object)</Item>
2482 <Item>System.Convert.ToUInt32(System.Object,System.IFormatProvider)</Item>
2483 </Issue>
2484 <Issue>
2485 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2486 <Item>System.Convert.ToUInt32(System.Object)</Item>
2487 <Item>System.Convert.ToUInt32(System.Object,System.IFormatProvider)</Item>
2488 </Issue>
2489 </Message>
2490 <Message Id="System.Convert.ToUInt64(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2491 <Issue>
2492 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2493 <Item>System.Convert.ToUInt64(System.Object)</Item>
2494 <Item>System.Convert.ToUInt64(System.Object,System.IFormatProvider)</Item>
2495 </Issue>
2496 </Message>
2497 <Message Id="System.UInt64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2498 <Issue>
2499 <Item>SimProfile.LoadFromGrid(UInt64, String, String, String):SimProfile</Item>
2500 <Item>System.UInt64.ToString</Item>
2501 <Item>System.UInt64.ToString(System.IFormatProvider)</Item>
2502 </Issue>
2503 </Message>
2504 </Messages>
2505 </Member>
2506 </Members>
2507 </Type>
2508 <Type Name="SimProfileBase">
2509 <Messages>
2510 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2511 <Issue Name="Type">
2512 <Item>Sim</Item>
2513 <Item>OpenSim.Framework.Sims.SimProfileBase</Item>
2514 </Issue>
2515 </Message>
2516 </Messages>
2517 <Members>
2518 <Member Name="caps_url">
2519 <Messages>
2520 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2521 <Issue>
2522 <Item>caps_url</Item>
2523 </Issue>
2524 </Message>
2525 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
2526 <Issue Name="Member">
2527 <Item>caps_url</Item>
2528 </Issue>
2529 </Message>
2530 </Messages>
2531 </Member>
2532 <Member Name="recvkey">
2533 <Messages>
2534 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2535 <Issue>
2536 <Item>recvkey</Item>
2537 </Issue>
2538 </Message>
2539 <Message Id="recvkey" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2540 <Issue Name="Member">
2541 <Item>recvkey</Item>
2542 <Item>SimProfileBase.recvkey</Item>
2543 </Issue>
2544 </Message>
2545 </Messages>
2546 </Member>
2547 <Member Name="regionhandle">
2548 <Messages>
2549 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2550 <Issue>
2551 <Item>regionhandle</Item>
2552 </Issue>
2553 </Message>
2554 <Message Id="regionhandle" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2555 <Issue Name="Member">
2556 <Item>regionhandle</Item>
2557 <Item>SimProfileBase.regionhandle</Item>
2558 </Issue>
2559 </Message>
2560 </Messages>
2561 </Member>
2562 <Member Name="RegionLocX">
2563 <Messages>
2564 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2565 <Issue>
2566 <Item>RegionLocX</Item>
2567 </Issue>
2568 </Message>
2569 </Messages>
2570 </Member>
2571 <Member Name="RegionLocY">
2572 <Messages>
2573 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2574 <Issue>
2575 <Item>RegionLocY</Item>
2576 </Issue>
2577 </Message>
2578 </Messages>
2579 </Member>
2580 <Member Name="regionname">
2581 <Messages>
2582 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2583 <Issue>
2584 <Item>regionname</Item>
2585 </Issue>
2586 </Message>
2587 <Message Id="regionname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2588 <Issue Name="Member">
2589 <Item>regionname</Item>
2590 <Item>SimProfileBase.regionname</Item>
2591 </Issue>
2592 </Message>
2593 </Messages>
2594 </Member>
2595 <Member Name="sendkey">
2596 <Messages>
2597 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2598 <Issue>
2599 <Item>sendkey</Item>
2600 </Issue>
2601 </Message>
2602 <Message Id="sendkey" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2603 <Issue Name="Member">
2604 <Item>sendkey</Item>
2605 <Item>SimProfileBase.sendkey</Item>
2606 </Issue>
2607 </Message>
2608 </Messages>
2609 </Member>
2610 <Member Name="sim_ip">
2611 <Messages>
2612 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2613 <Issue>
2614 <Item>sim_ip</Item>
2615 </Issue>
2616 </Message>
2617 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2618 <Issue Name="Member">
2619 <Item>sim</Item>
2620 <Item>SimProfileBase.sim_ip</Item>
2621 </Issue>
2622 </Message>
2623 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
2624 <Issue Name="Member">
2625 <Item>sim_ip</Item>
2626 </Issue>
2627 </Message>
2628 </Messages>
2629 </Member>
2630 <Member Name="sim_port">
2631 <Messages>
2632 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2633 <Issue>
2634 <Item>sim_port</Item>
2635 </Issue>
2636 </Message>
2637 <Message Id="sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2638 <Issue Name="Member">
2639 <Item>sim</Item>
2640 <Item>SimProfileBase.sim_port</Item>
2641 </Issue>
2642 </Message>
2643 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
2644 <Issue Name="Member">
2645 <Item>sim_port</Item>
2646 </Issue>
2647 </Message>
2648 </Messages>
2649 </Member>
2650 <Member Name="UUID">
2651 <Messages>
2652 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2653 <Issue>
2654 <Item>UUID</Item>
2655 </Issue>
2656 </Message>
2657 </Messages>
2658 </Member>
2659 </Members>
2660 </Type>
2661 </Types>
2662 </Namespace>
2663 <Namespace Name="OpenSim.Framework.Terrain">
2664 <Types>
2665 <Type Name="HeightmapGenHills">
2666 <Messages>
2667 <Message Id="Heightmap" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2668 <Issue Name="Type">
2669 <Item>Heightmap</Item>
2670 <Item>OpenSim.Framework.Terrain.HeightmapGenHills</Item>
2671 </Issue>
2672 </Message>
2673 </Messages>
2674 <Members>
2675 <Member Name="GenerateHeightmap(System.Int32,System.Single,System.Single,System.Boolean):System.Single[]">
2676 <Messages>
2677 <Message Id="0#num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2678 <Issue Name="Parameter">
2679 <Item>HeightmapGenHills.GenerateHeightmap(Int32, Single, Single, Boolean):Single[]</Item>
2680 <Item>num</Item>
2681 <Item>numHills</Item>
2682 </Issue>
2683 </Message>
2684 <Message Id="Heightmap" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2685 <Issue Name="Member">
2686 <Item>Heightmap</Item>
2687 <Item>HeightmapGenHills.GenerateHeightmap(Int32, Single, Single, Boolean):Single[]</Item>
2688 </Issue>
2689 </Message>
2690 </Messages>
2691 </Member>
2692 <Member Name="NumHills">
2693 <Messages>
2694 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
2695 <Issue>
2696 <Item>HeightmapGenHills.NumHills</Item>
2697 </Issue>
2698 </Message>
2699 </Messages>
2700 </Member>
2701 </Members>
2702 </Type>
2703 </Types>
2704 </Namespace>
2705 <Namespace Name="OpenSim.Framework.User">
2706 <Types>
2707 <Type Name="UserProfile">
2708 <Members>
2709 <Member Name=".ctor()">
2710 <Messages>
2711 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
2712 <Issue>
2713 <Item>UserProfile.UserProfile()</Item>
2714 <Item>IsGridGod</Item>
2715 <Item>System.Boolean</Item>
2716 <Item>false</Item>
2717 </Issue>
2718 </Message>
2719 </Messages>
2720 </Member>
2721 <Member Name="AddSimCircuit(System.UInt32,libsecondlife.LLUUID):System.Void">
2722 <Messages>
2723 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2724 <Issue Name="Member">
2725 <Item>Sim</Item>
2726 <Item>UserProfile.AddSimCircuit(UInt32, LLUUID):Void</Item>
2727 </Issue>
2728 </Message>
2729 <Message Id="1#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
2730 <Issue Name="Parameter">
2731 <Item>regionUUID</Item>
2732 </Issue>
2733 </Message>
2734 </Messages>
2735 </Member>
2736 <Member Name="AssetURL">
2737 <Messages>
2738 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2739 <Issue>
2740 <Item>AssetURL</Item>
2741 </Issue>
2742 </Message>
2743 </Messages>
2744 </Member>
2745 <Member Name="Circuits">
2746 <Messages>
2747 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2748 <Issue>
2749 <Item>Circuits</Item>
2750 </Issue>
2751 </Message>
2752 </Messages>
2753 </Member>
2754 <Member Name="CurrentSecureSessionID">
2755 <Messages>
2756 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2757 <Issue>
2758 <Item>CurrentSecureSessionID</Item>
2759 </Issue>
2760 </Message>
2761 </Messages>
2762 </Member>
2763 <Member Name="CurrentSessionID">
2764 <Messages>
2765 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2766 <Issue>
2767 <Item>CurrentSessionID</Item>
2768 </Issue>
2769 </Message>
2770 </Messages>
2771 </Member>
2772 <Member Name="firstname">
2773 <Messages>
2774 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2775 <Issue>
2776 <Item>firstname</Item>
2777 </Issue>
2778 </Message>
2779 <Message Id="firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2780 <Issue Name="Member">
2781 <Item>firstname</Item>
2782 <Item>UserProfile.firstname</Item>
2783 </Issue>
2784 </Message>
2785 </Messages>
2786 </Member>
2787 <Member Name="homelookat">
2788 <Messages>
2789 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2790 <Issue>
2791 <Item>homelookat</Item>
2792 </Issue>
2793 </Message>
2794 <Message Id="homelookat" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2795 <Issue Name="Member">
2796 <Item>homelookat</Item>
2797 <Item>UserProfile.homelookat</Item>
2798 </Issue>
2799 </Message>
2800 </Messages>
2801 </Member>
2802 <Member Name="homepos">
2803 <Messages>
2804 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2805 <Issue>
2806 <Item>homepos</Item>
2807 </Issue>
2808 </Message>
2809 <Message Id="homepos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2810 <Issue Name="Member">
2811 <Item>homepos</Item>
2812 <Item>UserProfile.homepos</Item>
2813 </Issue>
2814 </Message>
2815 </Messages>
2816 </Member>
2817 <Member Name="homeregionhandle">
2818 <Messages>
2819 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2820 <Issue>
2821 <Item>homeregionhandle</Item>
2822 </Issue>
2823 </Message>
2824 <Message Id="homeregionhandle" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2825 <Issue Name="Member">
2826 <Item>homeregionhandle</Item>
2827 <Item>UserProfile.homeregionhandle</Item>
2828 </Issue>
2829 </Message>
2830 </Messages>
2831 </Member>
2832 <Member Name="Inventory">
2833 <Messages>
2834 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2835 <Issue>
2836 <Item>Inventory</Item>
2837 </Issue>
2838 </Message>
2839 </Messages>
2840 </Member>
2841 <Member Name="IsGridGod">
2842 <Messages>
2843 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2844 <Issue>
2845 <Item>IsGridGod</Item>
2846 </Issue>
2847 </Message>
2848 </Messages>
2849 </Member>
2850 <Member Name="IsLocal">
2851 <Messages>
2852 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2853 <Issue>
2854 <Item>IsLocal</Item>
2855 </Issue>
2856 </Message>
2857 </Messages>
2858 </Member>
2859 <Member Name="lastname">
2860 <Messages>
2861 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2862 <Issue>
2863 <Item>lastname</Item>
2864 </Issue>
2865 </Message>
2866 <Message Id="lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2867 <Issue Name="Member">
2868 <Item>lastname</Item>
2869 <Item>UserProfile.lastname</Item>
2870 </Issue>
2871 </Message>
2872 </Messages>
2873 </Member>
2874 <Member Name="MD5passwd">
2875 <Messages>
2876 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2877 <Issue>
2878 <Item>MD5passwd</Item>
2879 </Issue>
2880 </Message>
2881 </Messages>
2882 </Member>
2883 <Member Name="UUID">
2884 <Messages>
2885 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2886 <Issue>
2887 <Item>UUID</Item>
2888 </Issue>
2889 </Message>
2890 </Messages>
2891 </Member>
2892 </Members>
2893 </Type>
2894 <Type Name="UserProfileManager">
2895 <Members>
2896 <Member Name="CustomiseResponse(System.Collections.Hashtable&amp;,OpenSim.Framework.User.UserProfile):System.Void">
2897 <Messages>
2898 <Message Id="0#" TypeName="DoNotPassTypesByReference" Category="Microsoft.Design" CheckId="CA1045" Created="2007-03-27 04:29:04Z">
2899 <Issue Level="CriticalWarning">
2900 <Item>response</Item>
2901 </Issue>
2902 </Message>
2903 <Message Id="Customise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2904 <Issue Name="Member">
2905 <Item>Customise</Item>
2906 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2907 </Issue>
2908 </Message>
2909 <Message Id="GridResp" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z">
2910 <Issue>
2911 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2912 <Item>GridResp</Item>
2913 <Item>Nwc.XmlRpc.XmlRpcResponse</Item>
2914 </Issue>
2915 </Message>
2916 <Message Id="System.Single.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2917 <Issue>
2918 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2919 <Item>System.Single.ToString</Item>
2920 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2921 </Issue>
2922 <Issue>
2923 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2924 <Item>System.Single.ToString</Item>
2925 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2926 </Issue>
2927 <Issue>
2928 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2929 <Item>System.Single.ToString</Item>
2930 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2931 </Issue>
2932 <Issue>
2933 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2934 <Item>System.Single.ToString</Item>
2935 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2936 </Issue>
2937 <Issue>
2938 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2939 <Item>System.Single.ToString</Item>
2940 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2941 </Issue>
2942 <Issue>
2943 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2944 <Item>System.Single.ToString</Item>
2945 <Item>System.Single.ToString(System.IFormatProvider)</Item>
2946 </Issue>
2947 </Message>
2948 <Message Id="System.UInt32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
2949 <Issue>
2950 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2951 <Item>System.UInt32.ToString</Item>
2952 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
2953 </Issue>
2954 <Issue>
2955 <Item>UserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
2956 <Item>System.UInt32.ToString</Item>
2957 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
2958 </Issue>
2959 </Message>
2960 </Messages>
2961 </Member>
2962 <Member Name="DefaultStartupMsg">
2963 <Messages>
2964 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2965 <Issue>
2966 <Item>DefaultStartupMsg</Item>
2967 </Issue>
2968 </Message>
2969 </Messages>
2970 </Member>
2971 <Member Name="GridRecvKey">
2972 <Messages>
2973 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2974 <Issue>
2975 <Item>GridRecvKey</Item>
2976 </Issue>
2977 </Message>
2978 <Message Id="Recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
2979 <Issue Name="Member">
2980 <Item>Recv</Item>
2981 <Item>UserProfileManager.GridRecvKey</Item>
2982 </Issue>
2983 </Message>
2984 </Messages>
2985 </Member>
2986 <Member Name="GridSendKey">
2987 <Messages>
2988 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2989 <Issue>
2990 <Item>GridSendKey</Item>
2991 </Issue>
2992 </Message>
2993 </Messages>
2994 </Member>
2995 <Member Name="GridURL">
2996 <Messages>
2997 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
2998 <Issue>
2999 <Item>GridURL</Item>
3000 </Issue>
3001 </Message>
3002 </Messages>
3003 </Member>
3004 <Member Name="ParseXMLRPC(System.String):System.String">
3005 <Messages>
3006 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
3007 <Issue>
3008 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3009 <Item>System.Exception</Item>
3010 </Issue>
3011 </Message>
3012 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
3013 <Issue Name="Member">
3014 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3015 </Issue>
3016 </Message>
3017 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3018 <Issue>
3019 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3020 <Item>System.Int32.ToString</Item>
3021 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
3022 </Issue>
3023 <Issue>
3024 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3025 <Item>System.Int32.ToString</Item>
3026 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
3027 </Issue>
3028 </Message>
3029 <Message Id="System.Single.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3030 <Issue>
3031 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3032 <Item>System.Single.ToString</Item>
3033 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3034 </Issue>
3035 <Issue>
3036 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3037 <Item>System.Single.ToString</Item>
3038 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3039 </Issue>
3040 <Issue>
3041 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3042 <Item>System.Single.ToString</Item>
3043 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3044 </Issue>
3045 <Issue>
3046 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3047 <Item>System.Single.ToString</Item>
3048 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3049 </Issue>
3050 <Issue>
3051 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3052 <Item>System.Single.ToString</Item>
3053 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3054 </Issue>
3055 <Issue>
3056 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3057 <Item>System.Single.ToString</Item>
3058 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3059 </Issue>
3060 <Issue>
3061 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3062 <Item>System.Single.ToString</Item>
3063 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3064 </Issue>
3065 <Issue>
3066 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3067 <Item>System.Single.ToString</Item>
3068 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3069 </Issue>
3070 <Issue>
3071 <Item>UserProfileManager.ParseXMLRPC(String):String</Item>
3072 <Item>System.Single.ToString</Item>
3073 <Item>System.Single.ToString(System.IFormatProvider)</Item>
3074 </Issue>
3075 </Message>
3076 </Messages>
3077 </Member>
3078 <Member Name="SetKeys(System.String,System.String,System.String,System.String):System.Void">
3079 <Messages>
3080 <Message Id="1#recv" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3081 <Issue Name="Parameter">
3082 <Item>UserProfileManager.SetKeys(String, String, String, String):Void</Item>
3083 <Item>recv</Item>
3084 <Item>recvKey</Item>
3085 </Issue>
3086 </Message>
3087 <Message Id="2#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2007-03-27 04:29:04Z">
3088 <Issue>
3089 <Item>url</Item>
3090 <Item>UserProfileManager.SetKeys(String, String, String, String):Void</Item>
3091 </Issue>
3092 </Message>
3093 </Messages>
3094 </Member>
3095 </Members>
3096 </Type>
3097 <Type Name="UserProfileManagerBase">
3098 <Members>
3099 <Member Name="AuthenticateUser(System.String,System.String,System.String):System.Boolean">
3100 <Messages>
3101 <Message Id="0#firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3102 <Issue Name="Parameter">
3103 <Item>UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean</Item>
3104 <Item>firstname</Item>
3105 <Item>firstname</Item>
3106 </Issue>
3107 </Message>
3108 <Message Id="1#lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3109 <Issue Name="Parameter">
3110 <Item>UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean</Item>
3111 <Item>lastname</Item>
3112 <Item>lastname</Item>
3113 </Issue>
3114 </Message>
3115 <Message Id="2#passwd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3116 <Issue Name="Parameter">
3117 <Item>UserProfileManagerBase.AuthenticateUser(String, String, String):Boolean</Item>
3118 <Item>passwd</Item>
3119 <Item>passwd</Item>
3120 </Issue>
3121 </Message>
3122 </Messages>
3123 </Member>
3124 <Member Name="CreateNewProfile(System.String,System.String,System.String):OpenSim.Framework.User.UserProfile">
3125 <Messages>
3126 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3127 <Issue Name="Parameter">
3128 <Item>MD5passwd</Item>
3129 </Issue>
3130 </Message>
3131 <Message Id="0#firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3132 <Issue Name="Parameter">
3133 <Item>UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile</Item>
3134 <Item>firstname</Item>
3135 <Item>firstname</Item>
3136 </Issue>
3137 </Message>
3138 <Message Id="1#lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3139 <Issue Name="Parameter">
3140 <Item>UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile</Item>
3141 <Item>lastname</Item>
3142 <Item>lastname</Item>
3143 </Issue>
3144 </Message>
3145 <Message Id="2#M" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3146 <Issue Name="Parameter">
3147 <Item>UserProfileManagerBase.CreateNewProfile(String, String, String):UserProfile</Item>
3148 <Item>M</Item>
3149 <Item>MD5passwd</Item>
3150 </Issue>
3151 </Message>
3152 </Messages>
3153 </Member>
3154 <Member Name="GetProfileByLLUUID(libsecondlife.LLUUID):OpenSim.Framework.User.UserProfile">
3155 <Messages>
3156 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3157 <Issue Name="Parameter">
3158 <Item>ProfileLLUUID</Item>
3159 </Issue>
3160 </Message>
3161 <Message Id="0#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
3162 <Issue Name="Parameter">
3163 <Item>ProfileLLUUID</Item>
3164 </Issue>
3165 </Message>
3166 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
3167 <Issue Name="Member">
3168 <Item>UserProfileManagerBase.GetProfileByLLUUID(LLUUID):UserProfile</Item>
3169 </Issue>
3170 </Message>
3171 </Messages>
3172 </Member>
3173 <Member Name="GetProfileByName(System.String,System.String):OpenSim.Framework.User.UserProfile">
3174 <Messages>
3175 <Message Id="0#firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3176 <Issue Name="Parameter">
3177 <Item>UserProfileManagerBase.GetProfileByName(String, String):UserProfile</Item>
3178 <Item>firstname</Item>
3179 <Item>firstname</Item>
3180 </Issue>
3181 </Message>
3182 <Message Id="1#lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3183 <Issue Name="Parameter">
3184 <Item>UserProfileManagerBase.GetProfileByName(String, String):UserProfile</Item>
3185 <Item>lastname</Item>
3186 <Item>lastname</Item>
3187 </Issue>
3188 </Message>
3189 </Messages>
3190 </Member>
3191 <Member Name="GetUsersInventory(libsecondlife.LLUUID):OpenSim.Framework.Inventory.AgentInventory">
3192 <Messages>
3193 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3194 <Issue Name="ParameterId">
3195 <Item>ID</Item>
3196 <Item>agentID</Item>
3197 <Item>Id</Item>
3198 </Issue>
3199 </Message>
3200 </Messages>
3201 </Member>
3202 <Member Name="SetGod(libsecondlife.LLUUID):System.Void">
3203 <Messages>
3204 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3205 <Issue Name="Parameter">
3206 <Item>GodID</Item>
3207 </Issue>
3208 </Message>
3209 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3210 <Issue Name="ParameterId">
3211 <Item>ID</Item>
3212 <Item>GodID</Item>
3213 <Item>Id</Item>
3214 </Issue>
3215 </Message>
3216 </Messages>
3217 </Member>
3218 <Member Name="UserProfiles">
3219 <Messages>
3220 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3221 <Issue>
3222 <Item>UserProfiles</Item>
3223 </Issue>
3224 </Message>
3225 </Messages>
3226 </Member>
3227 </Members>
3228 </Type>
3229 </Types>
3230 </Namespace>
3231 <Namespace Name="OpenSim.Framework.Utilities">
3232 <Types>
3233 <Type Name="BlockingQueue`1">
3234 <Messages>
3235 <Message TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711" Created="2007-03-27 04:29:04Z">
3236 <Issue>
3237 <Item>OpenSim.Framework.Utilities.BlockingQueue`1</Item>
3238 <Item>Queue</Item>
3239 </Issue>
3240 </Message>
3241 </Messages>
3242 </Type>
3243 <Type Name="Util">
3244 <Messages>
3245 <Message Id="Util" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3246 <Issue Name="Type">
3247 <Item>Util</Item>
3248 <Item>OpenSim.Framework.Utilities.Util</Item>
3249 </Issue>
3250 </Message>
3251 <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2007-03-27 04:29:04Z">
3252 <Issue>
3253 <Item>Util</Item>
3254 </Issue>
3255 </Message>
3256 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
3257 <Issue>
3258 <Item>Util</Item>
3259 <Item>System.Web.Util</Item>
3260 </Issue>
3261 </Message>
3262 </Messages>
3263 <Members>
3264 <Member Name="GetNextXferID():System.UInt32">
3265 <Messages>
3266 <Message Id="Xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3267 <Issue Name="Member">
3268 <Item>Xfer</Item>
3269 <Item>Util.GetNextXferID():UInt32</Item>
3270 </Issue>
3271 </Message>
3272 <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3273 <Issue Name="MemberId">
3274 <Item>Util.GetNextXferID():UInt32</Item>
3275 </Issue>
3276 </Message>
3277 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
3278 <Issue>
3279 <Item>GetNextXferID</Item>
3280 </Issue>
3281 </Message>
3282 </Messages>
3283 </Member>
3284 <Member Name="UIntsToLong(System.UInt32,System.UInt32):System.UInt64">
3285 <Messages>
3286 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3287 <Issue Name="Parameter">
3288 <Item>X</Item>
3289 </Issue>
3290 </Message>
3291 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
3292 <Issue Name="Parameter">
3293 <Item>Y</Item>
3294 </Issue>
3295 </Message>
3296 <Message Id="0#X" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3297 <Issue Name="ParameterOneLetter">
3298 <Item>Util.UIntsToLong(UInt32, UInt32):UInt64</Item>
3299 <Item>X</Item>
3300 </Issue>
3301 </Message>
3302 <Message Id="1#Y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3303 <Issue Name="ParameterOneLetter">
3304 <Item>Util.UIntsToLong(UInt32, UInt32):UInt64</Item>
3305 <Item>Y</Item>
3306 </Issue>
3307 </Message>
3308 <Message Id="Ints" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3309 <Issue Name="Member">
3310 <Item>Ints</Item>
3311 <Item>Util.UIntsToLong(UInt32, UInt32):UInt64</Item>
3312 </Issue>
3313 </Message>
3314 </Messages>
3315 </Member>
3316 </Members>
3317 </Type>
3318 </Types>
3319 </Namespace>
3320 </Namespaces>
3321 </Module>
3322 </Modules>
3323 </Target>
3324 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Local.dll">
3325 <Modules>
3326 <Module Name="opensim.gridinterfaces.local.dll">
3327 <Messages>
3328 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
3329 <Issue>
3330 <Item>OpenSim.GridInterfaces.Local</Item>
3331 </Issue>
3332 </Message>
3333 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
3334 <Issue Name="NoStrongName">
3335 <Item>OpenSim.GridInterfaces.Local</Item>
3336 </Issue>
3337 </Message>
3338 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
3339 <Issue Name="NoAttr">
3340 <Item>OpenSim.GridInterfaces.Local</Item>
3341 </Issue>
3342 </Message>
3343 </Messages>
3344 <Namespaces>
3345 <Namespace Name="OpenSim.GridInterfaces.Local">
3346 <Types>
3347 <Type Name="AssetStorage">
3348 <Members>
3349 <Member Name="Data">
3350 <Messages>
3351 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3352 <Issue>
3353 <Item>Data</Item>
3354 </Issue>
3355 </Message>
3356 </Messages>
3357 </Member>
3358 <Member Name="Name">
3359 <Messages>
3360 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3361 <Issue>
3362 <Item>Name</Item>
3363 </Issue>
3364 </Message>
3365 </Messages>
3366 </Member>
3367 <Member Name="Type">
3368 <Messages>
3369 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3370 <Issue>
3371 <Item>Type</Item>
3372 </Issue>
3373 </Message>
3374 </Messages>
3375 </Member>
3376 <Member Name="UUID">
3377 <Messages>
3378 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3379 <Issue>
3380 <Item>UUID</Item>
3381 </Issue>
3382 </Message>
3383 </Messages>
3384 </Member>
3385 </Members>
3386 </Type>
3387 <Type Name="AssetUUIDQuery">
3388 <Messages>
3389 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
3390 <Issue Name="Type">
3391 <Item>AssetUUIDQuery</Item>
3392 </Issue>
3393 </Message>
3394 </Messages>
3395 <Members>
3396 <Member Name="Match(OpenSim.GridInterfaces.Local.AssetStorage):System.Boolean">
3397 <Messages>
3398 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3399 <Issue>
3400 <Item>'asset'</Item>
3401 <Item>AssetUUIDQuery.Match(AssetStorage):Boolean</Item>
3402 </Issue>
3403 </Message>
3404 </Messages>
3405 </Member>
3406 </Members>
3407 </Type>
3408 <Type Name="LocalAssetPlugin">
3409 <Messages>
3410 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3411 <Issue Name="Type">
3412 <Item>Plugin</Item>
3413 <Item>OpenSim.GridInterfaces.Local.LocalAssetPlugin</Item>
3414 </Issue>
3415 </Message>
3416 </Messages>
3417 </Type>
3418 <Type Name="LocalAssetServer">
3419 <Members>
3420 <Member Name=".ctor()">
3421 <Messages>
3422 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
3423 <Issue>
3424 <Item>LocalAssetServer.LocalAssetServer()</Item>
3425 <Item>System.Exception</Item>
3426 </Issue>
3427 </Message>
3428 </Messages>
3429 </Member>
3430 <Member Name="LoadAsset(OpenSim.Framework.Assets.AssetBase,System.Boolean,System.String):System.Void">
3431 <Messages>
3432 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
3433 <Issue>
3434 <Item>LocalAssetServer.LoadAsset(AssetBase, Boolean, String):Void</Item>
3435 </Issue>
3436 </Message>
3437 <Message Id="image" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
3438 <Issue>
3439 <Item>image</Item>
3440 <Item>LocalAssetServer.LoadAsset(AssetBase, Boolean, String):Void</Item>
3441 </Issue>
3442 </Message>
3443 </Messages>
3444 </Member>
3445 <Member Name="UploadNewAsset(OpenSim.Framework.Assets.AssetBase):System.Void">
3446 <Messages>
3447 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3448 <Issue>
3449 <Item>'asset'</Item>
3450 <Item>LocalAssetServer.UploadNewAsset(AssetBase):Void</Item>
3451 </Issue>
3452 </Message>
3453 </Messages>
3454 </Member>
3455 </Members>
3456 </Type>
3457 <Type Name="LocalGridPlugin">
3458 <Messages>
3459 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3460 <Issue Name="Type">
3461 <Item>Plugin</Item>
3462 <Item>OpenSim.GridInterfaces.Local.LocalGridPlugin</Item>
3463 </Issue>
3464 </Message>
3465 </Messages>
3466 </Type>
3467 <Type Name="LocalGridServer">
3468 <Members>
3469 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
3470 <Messages>
3471 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
3472 <Issue Name="Member">
3473 <Item>Logout</Item>
3474 <Item>LogoutSession</Item>
3475 <Item>LogOff</Item>
3476 </Issue>
3477 </Message>
3478 </Messages>
3479 </Member>
3480 <Member Name="Sessions">
3481 <Messages>
3482 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3483 <Issue>
3484 <Item>Sessions</Item>
3485 </Issue>
3486 </Message>
3487 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
3488 <Issue>
3489 <Item>System.Collections.Generic.List`1&lt;OpenSim.Framework.Interfaces.Login&gt;</Item>
3490 <Item>LocalGridServer.Sessions</Item>
3491 </Issue>
3492 </Message>
3493 </Messages>
3494 </Member>
3495 </Members>
3496 </Type>
3497 </Types>
3498 </Namespace>
3499 </Namespaces>
3500 </Module>
3501 </Modules>
3502 </Target>
3503 <Target Name="$(ProjectDir)/bin/OpenSim.GridInterfaces.Remote.dll">
3504 <Modules>
3505 <Module Name="opensim.gridinterfaces.remote.dll">
3506 <Messages>
3507 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
3508 <Issue>
3509 <Item>OpenSim.GridInterfaces.Remote</Item>
3510 </Issue>
3511 </Message>
3512 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
3513 <Issue Name="NoStrongName">
3514 <Item>OpenSim.GridInterfaces.Remote</Item>
3515 </Issue>
3516 </Message>
3517 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
3518 <Issue Name="NoAttr">
3519 <Item>OpenSim.GridInterfaces.Remote</Item>
3520 </Issue>
3521 </Message>
3522 </Messages>
3523 <Namespaces>
3524 <Namespace Name="OpenSim.GridInterfaces.Remote">
3525 <Types>
3526 <Type Name="RemoteAssetPlugin">
3527 <Messages>
3528 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3529 <Issue Name="Type">
3530 <Item>Plugin</Item>
3531 <Item>OpenSim.GridInterfaces.Remote.RemoteAssetPlugin</Item>
3532 </Issue>
3533 </Message>
3534 </Messages>
3535 </Type>
3536 <Type Name="RemoteGridPlugin">
3537 <Messages>
3538 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3539 <Issue Name="Type">
3540 <Item>Plugin</Item>
3541 <Item>OpenSim.GridInterfaces.Remote.RemoteGridPlugin</Item>
3542 </Issue>
3543 </Message>
3544 </Messages>
3545 </Type>
3546 <Type Name="RemoteGridServer">
3547 <Members>
3548 <Member Name="agentcircuits">
3549 <Messages>
3550 <Message TypeName="CollectionPropertiesShouldBeReadOnly" Category="Microsoft.Usage" CheckId="CA2227" Created="2007-03-27 04:29:04Z">
3551 <Issue>
3552 <Item>agentcircuits</Item>
3553 </Issue>
3554 </Message>
3555 </Messages>
3556 </Member>
3557 <Member Name="AuthenticateSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):OpenSim.Framework.Interfaces.AuthenticateResponse">
3558 <Messages>
3559 <Message Id="2#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2007-03-27 04:29:04Z">
3560 <Issue>
3561 <Item>circuitcode</Item>
3562 <Item>RemoteGridServer.AuthenticateSession(LLUUID, LLUUID, UInt32):AuthenticateResponse</Item>
3563 <Item>circuitCode</Item>
3564 <Item>IGridServer.AuthenticateSession(LLUUID, LLUUID, UInt32):AuthenticateResponse</Item>
3565 </Issue>
3566 </Message>
3567 </Messages>
3568 </Member>
3569 <Member Name="GridRecvKey">
3570 <Messages>
3571 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
3572 <Issue>
3573 <Item>RemoteGridServer.GridRecvKey</Item>
3574 </Issue>
3575 </Message>
3576 </Messages>
3577 </Member>
3578 <Member Name="GridSendKey">
3579 <Messages>
3580 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
3581 <Issue>
3582 <Item>RemoteGridServer.GridSendKey</Item>
3583 </Issue>
3584 </Message>
3585 </Messages>
3586 </Member>
3587 <Member Name="LogoutSession(libsecondlife.LLUUID,libsecondlife.LLUUID,System.UInt32):System.Boolean">
3588 <Messages>
3589 <Message TypeName="PassSystemUriObjectsInsteadOfStrings" Category="Microsoft.Usage" CheckId="CA2234" Created="2007-03-27 04:29:04Z">
3590 <Issue>
3591 <Item>RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean</Item>
3592 <Item>WebRequest.Create(Uri):WebRequest</Item>
3593 <Item>WebRequest.Create(String):WebRequest</Item>
3594 </Issue>
3595 </Message>
3596 <Message Id="GridResponse" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z">
3597 <Issue>
3598 <Item>RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean</Item>
3599 <Item>GridResponse</Item>
3600 <Item>System.String</Item>
3601 </Issue>
3602 </Message>
3603 <Message Id="Logout" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
3604 <Issue Name="Member">
3605 <Item>Logout</Item>
3606 <Item>LogoutSession</Item>
3607 <Item>LogOff</Item>
3608 </Issue>
3609 </Message>
3610 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3611 <Issue>
3612 <Item>'sessionID'</Item>
3613 <Item>RemoteGridServer.LogoutSession(LLUUID, LLUUID, UInt32):Boolean</Item>
3614 </Issue>
3615 </Message>
3616 </Messages>
3617 </Member>
3618 </Members>
3619 </Type>
3620 </Types>
3621 </Namespace>
3622 </Namespaces>
3623 </Module>
3624 </Modules>
3625 </Target>
3626 <Target Name="$(ProjectDir)/bin/OpenSim.Physics.Manager.dll">
3627 <Modules>
3628 <Module Name="opensim.physics.manager.dll">
3629 <Messages>
3630 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
3631 <Issue>
3632 <Item>OpenSim.Physics.Manager</Item>
3633 </Issue>
3634 </Message>
3635 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
3636 <Issue Name="NoStrongName">
3637 <Item>OpenSim.Physics.Manager</Item>
3638 </Issue>
3639 </Message>
3640 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
3641 <Issue Name="NoAttr">
3642 <Item>OpenSim.Physics.Manager</Item>
3643 </Issue>
3644 </Message>
3645 </Messages>
3646 <Namespaces>
3647 <Namespace Name="OpenSim.Physics.Manager">
3648 <Types>
3649 <Type Name="IPhysicsPlugin">
3650 <Messages>
3651 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3652 <Issue Name="Type">
3653 <Item>Plugin</Item>
3654 <Item>OpenSim.Physics.Manager.IPhysicsPlugin</Item>
3655 </Issue>
3656 </Message>
3657 </Messages>
3658 <Members>
3659 <Member Name="GetName():System.String">
3660 <Messages>
3661 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
3662 <Issue Certainty="50">
3663 <Item>GetName</Item>
3664 </Issue>
3665 </Message>
3666 </Messages>
3667 </Member>
3668 <Member Name="GetScene():OpenSim.Physics.Manager.PhysicsScene">
3669 <Messages>
3670 <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2007-03-27 04:29:04Z">
3671 <Issue Certainty="50">
3672 <Item>GetScene</Item>
3673 </Issue>
3674 </Message>
3675 </Messages>
3676 </Member>
3677 </Members>
3678 </Type>
3679 <Type Name="NullPhysicsScene">
3680 <Members>
3681 <Member Name="SetTerrain(System.Single[]):System.Void">
3682 <Messages>
3683 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3684 <Issue>
3685 <Item>'heightMap'</Item>
3686 <Item>NullPhysicsScene.SetTerrain(Single[]):Void</Item>
3687 </Issue>
3688 </Message>
3689 </Messages>
3690 </Member>
3691 <Member Name="Simulate(System.Single):System.Void">
3692 <Messages>
3693 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3694 <Issue>
3695 <Item>NullPhysicsScene.Simulate(Single):Void</Item>
3696 <Item>System.Int32.ToString</Item>
3697 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
3698 </Issue>
3699 </Message>
3700 </Messages>
3701 </Member>
3702 </Members>
3703 </Type>
3704 <Type Name="PhysicsActor">
3705 <Members>
3706 <Member Name="Kinematic">
3707 <Messages>
3708 <Message Id="Kinematic" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3709 <Issue Name="Member">
3710 <Item>Kinematic</Item>
3711 <Item>PhysicsActor.Kinematic:Boolean</Item>
3712 </Issue>
3713 </Message>
3714 </Messages>
3715 </Member>
3716 </Members>
3717 </Type>
3718 <Type Name="PhysicsManager">
3719 <Members>
3720 <Member Name="GetPhysicsScene(System.String):OpenSim.Physics.Manager.PhysicsScene">
3721 <Messages>
3722 <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3723 <Issue>
3724 <Item>PhysicsManager.GetPhysicsScene(String):PhysicsScene</Item>
3725 <Item>System.String.Format(System.String,System.Object)</Item>
3726 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
3727 </Issue>
3728 </Message>
3729 </Messages>
3730 </Member>
3731 <Member Name="LoadPlugins():System.Void">
3732 <Messages>
3733 <Message Id="Plugins" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3734 <Issue Name="Member">
3735 <Item>Plugins</Item>
3736 <Item>PhysicsManager.LoadPlugins():Void</Item>
3737 </Issue>
3738 </Message>
3739 </Messages>
3740 </Member>
3741 </Members>
3742 </Type>
3743 <Type Name="PhysicsVector">
3744 <Members>
3745 <Member Name=".ctor(System.Single,System.Single,System.Single)">
3746 <Messages>
3747 <Message Id="0#x" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3748 <Issue Name="ParameterOneLetter">
3749 <Item>PhysicsVector.PhysicsVector(Single, Single, Single)</Item>
3750 <Item>x</Item>
3751 </Issue>
3752 </Message>
3753 <Message Id="1#y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3754 <Issue Name="ParameterOneLetter">
3755 <Item>PhysicsVector.PhysicsVector(Single, Single, Single)</Item>
3756 <Item>y</Item>
3757 </Issue>
3758 </Message>
3759 <Message Id="2#z" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3760 <Issue Name="ParameterOneLetter">
3761 <Item>PhysicsVector.PhysicsVector(Single, Single, Single)</Item>
3762 <Item>z</Item>
3763 </Issue>
3764 </Message>
3765 </Messages>
3766 </Member>
3767 <Member Name="X">
3768 <Messages>
3769 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3770 <Issue>
3771 <Item>X</Item>
3772 </Issue>
3773 </Message>
3774 <Message Id="X" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3775 <Issue Name="MemberOneLetter">
3776 <Item>X</Item>
3777 <Item>PhysicsVector.X</Item>
3778 </Issue>
3779 </Message>
3780 </Messages>
3781 </Member>
3782 <Member Name="Y">
3783 <Messages>
3784 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3785 <Issue>
3786 <Item>Y</Item>
3787 </Issue>
3788 </Message>
3789 <Message Id="Y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3790 <Issue Name="MemberOneLetter">
3791 <Item>Y</Item>
3792 <Item>PhysicsVector.Y</Item>
3793 </Issue>
3794 </Message>
3795 </Messages>
3796 </Member>
3797 <Member Name="Z">
3798 <Messages>
3799 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3800 <Issue>
3801 <Item>Z</Item>
3802 </Issue>
3803 </Message>
3804 <Message Id="Z" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3805 <Issue Name="MemberOneLetter">
3806 <Item>Z</Item>
3807 <Item>PhysicsVector.Z</Item>
3808 </Issue>
3809 </Message>
3810 </Messages>
3811 </Member>
3812 <Member Name="Zero">
3813 <Messages>
3814 <Message TypeName="DoNotDeclareReadOnlyMutableReferenceTypes" Category="Microsoft.Security" CheckId="CA2104" Created="2007-03-27 04:29:04Z">
3815 <Issue>
3816 <Item>PhysicsVector.Zero</Item>
3817 <Item>OpenSim.Physics.Manager.PhysicsVector</Item>
3818 </Issue>
3819 </Message>
3820 </Messages>
3821 </Member>
3822 </Members>
3823 </Type>
3824 </Types>
3825 </Namespace>
3826 </Namespaces>
3827 </Module>
3828 </Modules>
3829 </Target>
3830 <Target Name="$(ProjectDir)/bin/OpenSim.RegionServer.dll">
3831 <Modules>
3832 <Module Name="opensim.regionserver.dll">
3833 <Messages>
3834 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
3835 <Issue>
3836 <Item>OpenSim.RegionServer</Item>
3837 </Issue>
3838 </Message>
3839 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
3840 <Issue Name="NoStrongName">
3841 <Item>OpenSim.RegionServer</Item>
3842 </Issue>
3843 </Message>
3844 <Message TypeName="MarkAssembliesWithAssemblyVersion" Category="Microsoft.Design" CheckId="CA1016" Created="2007-03-27 04:29:04Z">
3845 <Issue>
3846 <Item>OpenSim.RegionServer</Item>
3847 </Issue>
3848 </Message>
3849 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
3850 <Issue Name="NoAttr">
3851 <Item>OpenSim.RegionServer</Item>
3852 </Issue>
3853 </Message>
3854 <Message TypeName="MarkAssembliesWithComVisible" Category="Microsoft.Design" CheckId="CA1017" Created="2007-03-27 04:29:04Z">
3855 <Issue Name="NoAttribute" Level="CriticalError">
3856 <Item>OpenSim.RegionServer</Item>
3857 </Issue>
3858 </Message>
3859 </Messages>
3860 <Namespaces>
3861 <Namespace Name="OpenSim">
3862 <Types>
3863 <Type Name="AgentAssetUpload">
3864 <Members>
3865 <Member Name="AddUpload(libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):System.Void">
3866 <Messages>
3867 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3868 <Issue Name="ParameterId">
3869 <Item>ID</Item>
3870 <Item>transactionID</Item>
3871 <Item>Id</Item>
3872 </Issue>
3873 </Message>
3874 </Messages>
3875 </Member>
3876 <Member Name="AddUploadToAssetCache(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase">
3877 <Messages>
3878 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3879 <Issue Name="ParameterId">
3880 <Item>ID</Item>
3881 <Item>transactionID</Item>
3882 <Item>Id</Item>
3883 </Issue>
3884 </Message>
3885 </Messages>
3886 </Member>
3887 <Member Name="GetUpload(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase">
3888 <Messages>
3889 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3890 <Issue Name="ParameterId">
3891 <Item>ID</Item>
3892 <Item>transactionID</Item>
3893 <Item>Id</Item>
3894 </Issue>
3895 </Message>
3896 </Messages>
3897 </Member>
3898 <Member Name="HandleUploadPacket(libsecondlife.Packets.AssetUploadRequestPacket,libsecondlife.LLUUID):System.Void">
3899 <Messages>
3900 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
3901 <Issue Name="ParameterId">
3902 <Item>ID</Item>
3903 <Item>assetID</Item>
3904 <Item>Id</Item>
3905 </Issue>
3906 </Message>
3907 <Message Id="System.Int32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
3908 <Issue>
3909 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item>
3910 <Item>System.Int32.ToString(System.String)</Item>
3911 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item>
3912 </Issue>
3913 <Issue>
3914 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item>
3915 <Item>System.Int32.ToString(System.String)</Item>
3916 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item>
3917 </Issue>
3918 </Message>
3919 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
3920 <Issue>
3921 <Item>'assetID'</Item>
3922 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item>
3923 </Issue>
3924 <Issue>
3925 <Item>'pack'</Item>
3926 <Item>AgentAssetUpload.HandleUploadPacket(AssetUploadRequestPacket, LLUUID):Void</Item>
3927 </Issue>
3928 </Message>
3929 </Messages>
3930 </Member>
3931 <Member Name="HandleXferPacket(libsecondlife.Packets.SendXferPacketPacket):System.Void">
3932 <Messages>
3933 <Message Id="0#xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3934 <Issue Name="Parameter">
3935 <Item>AgentAssetUpload.HandleXferPacket(SendXferPacketPacket):Void</Item>
3936 <Item>xfer</Item>
3937 <Item>xferPacket</Item>
3938 </Issue>
3939 </Message>
3940 <Message Id="Xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
3941 <Issue Name="Member">
3942 <Item>Xfer</Item>
3943 <Item>AgentAssetUpload.HandleXferPacket(SendXferPacketPacket):Void</Item>
3944 </Issue>
3945 </Message>
3946 </Messages>
3947 </Member>
3948 </Members>
3949 </Type>
3950 <Type Name="AssetTransaction">
3951 <Members>
3952 <Member Name=".ctor()">
3953 <Messages>
3954 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
3955 <Issue>
3956 <Item>AssetTransaction.AssetTransaction()</Item>
3957 <Item>UploadComplete</Item>
3958 <Item>System.Boolean</Item>
3959 <Item>false</Item>
3960 </Issue>
3961 </Message>
3962 </Messages>
3963 </Member>
3964 <Member Name="AddToInventory">
3965 <Messages>
3966 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3967 <Issue>
3968 <Item>AddToInventory</Item>
3969 </Issue>
3970 </Message>
3971 </Messages>
3972 </Member>
3973 <Member Name="Asset">
3974 <Messages>
3975 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3976 <Issue>
3977 <Item>Asset</Item>
3978 </Issue>
3979 </Message>
3980 </Messages>
3981 </Member>
3982 <Member Name="InventFolder">
3983 <Messages>
3984 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3985 <Issue>
3986 <Item>InventFolder</Item>
3987 </Issue>
3988 </Message>
3989 </Messages>
3990 </Member>
3991 <Member Name="TransactionID">
3992 <Messages>
3993 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
3994 <Issue>
3995 <Item>TransactionID</Item>
3996 </Issue>
3997 </Message>
3998 </Messages>
3999 </Member>
4000 <Member Name="UploadComplete">
4001 <Messages>
4002 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4003 <Issue>
4004 <Item>UploadComplete</Item>
4005 </Issue>
4006 </Message>
4007 </Messages>
4008 </Member>
4009 <Member Name="XferID">
4010 <Messages>
4011 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4012 <Issue>
4013 <Item>XferID</Item>
4014 </Issue>
4015 </Message>
4016 <Message Id="Xfer" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4017 <Issue Name="Member">
4018 <Item>Xfer</Item>
4019 <Item>AssetTransaction.XferID</Item>
4020 </Issue>
4021 </Message>
4022 </Messages>
4023 </Member>
4024 </Members>
4025 </Type>
4026 <Type Name="Grid">
4027 <Messages>
4028 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
4029 <Issue>
4030 <Item>Grid</Item>
4031 <Item>OpenSim.Framework.Grid</Item>
4032 </Issue>
4033 </Message>
4034 </Messages>
4035 <Members>
4036 <Member Name="AssetDll">
4037 <Messages>
4038 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4039 <Issue>
4040 <Item>AssetDll</Item>
4041 </Issue>
4042 </Message>
4043 </Messages>
4044 </Member>
4045 <Member Name="AssetServer">
4046 <Messages>
4047 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4048 <Issue>
4049 <Item>AssetServer</Item>
4050 </Issue>
4051 </Message>
4052 </Messages>
4053 </Member>
4054 <Member Name="GridDll">
4055 <Messages>
4056 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4057 <Issue>
4058 <Item>GridDll</Item>
4059 </Issue>
4060 </Message>
4061 </Messages>
4062 </Member>
4063 <Member Name="GridServer">
4064 <Messages>
4065 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4066 <Issue>
4067 <Item>GridServer</Item>
4068 </Issue>
4069 </Message>
4070 </Messages>
4071 </Member>
4072 <Member Name="Initialise():System.Void">
4073 <Messages>
4074 <Message Id="Initialise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4075 <Issue Name="Member">
4076 <Item>Initialise</Item>
4077 <Item>Grid.Initialise():Void</Item>
4078 </Issue>
4079 </Message>
4080 </Messages>
4081 </Member>
4082 <Member Name="LoadAssetDll(System.String):OpenSim.Framework.Interfaces.IAssetServer">
4083 <Messages>
4084 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
4085 <Issue>
4086 <Item>Grid.LoadAssetDll(String):IAssetServer</Item>
4087 </Issue>
4088 </Message>
4089 </Messages>
4090 </Member>
4091 <Member Name="LoadGridDll(System.String):OpenSim.Framework.Interfaces.IGridServer">
4092 <Messages>
4093 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
4094 <Issue>
4095 <Item>Grid.LoadGridDll(String):IGridServer</Item>
4096 </Issue>
4097 </Message>
4098 </Messages>
4099 </Member>
4100 </Members>
4101 </Type>
4102 <Type Name="OpenSimApplication">
4103 <Messages>
4104 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4105 <Issue Name="Type">
4106 <Item>Sim</Item>
4107 <Item>OpenSim.OpenSimApplication</Item>
4108 </Issue>
4109 </Message>
4110 </Messages>
4111 <Members>
4112 <Member Name="RemoveClientCircuit(System.UInt32):System.Void">
4113 <Messages>
4114 <Message Id="0#circuitcode" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4115 <Issue Name="Parameter">
4116 <Item>OpenSimApplication.RemoveClientCircuit(UInt32):Void</Item>
4117 <Item>circuitcode</Item>
4118 <Item>circuitcode</Item>
4119 </Issue>
4120 </Message>
4121 </Messages>
4122 </Member>
4123 <Member Name="SendPacketTo(System.Byte[],System.Int32,System.Net.Sockets.SocketFlags,System.UInt32):System.Void">
4124 <Messages>
4125 <Message Id="3#circuitcode" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4126 <Issue Name="Parameter">
4127 <Item>OpenSimApplication.SendPacketTo(Byte[], Int32, SocketFlags, UInt32):Void</Item>
4128 <Item>circuitcode</Item>
4129 <Item>circuitcode</Item>
4130 </Issue>
4131 </Message>
4132 </Messages>
4133 </Member>
4134 <Member Name="StartUp():System.Void">
4135 <Messages>
4136 <Message Id="StartUp" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z">
4137 <Issue Name="ShouldBeDiscreteTerm">
4138 <Item>StartUp</Item>
4139 <Item>method</Item>
4140 <Item>StartUp</Item>
4141 <Item>Startup</Item>
4142 </Issue>
4143 </Message>
4144 </Messages>
4145 </Member>
4146 </Members>
4147 </Type>
4148 <Type Name="OpenSimMain">
4149 <Messages>
4150 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4151 <Issue Name="Type">
4152 <Item>Sim</Item>
4153 <Item>OpenSim.OpenSimMain</Item>
4154 </Issue>
4155 </Message>
4156 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4157 <Issue>
4158 <Item>OpenSim.OpenSimMain</Item>
4159 <Item>System.Timers.Timer, System.Net.Sockets.Socket</Item>
4160 </Issue>
4161 </Message>
4162 </Messages>
4163 <Members>
4164 <Member Name=".ctor()">
4165 <Messages>
4166 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
4167 <Issue>
4168 <Item>OpenSimMain.OpenSimMain()</Item>
4169 <Item>loginserver</Item>
4170 <Item>System.Boolean</Item>
4171 <Item>false</Item>
4172 </Issue>
4173 <Issue>
4174 <Item>OpenSimMain.OpenSimMain()</Item>
4175 <Item>sandbox</Item>
4176 <Item>System.Boolean</Item>
4177 <Item>false</Item>
4178 </Issue>
4179 </Message>
4180 </Messages>
4181 </Member>
4182 <Member Name="_physicsEngine">
4183 <Messages>
4184 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4185 <Issue>
4186 <Item>_physicsEngine</Item>
4187 </Issue>
4188 </Message>
4189 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
4190 <Issue Name="Member">
4191 <Item>_physicsEngine</Item>
4192 </Issue>
4193 </Message>
4194 </Messages>
4195 </Member>
4196 <Member Name="LoadConfigDll(System.String):OpenSim.Framework.Interfaces.SimConfig">
4197 <Messages>
4198 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
4199 <Issue>
4200 <Item>OpenSimMain.LoadConfigDll(String):SimConfig</Item>
4201 </Issue>
4202 </Message>
4203 </Messages>
4204 </Member>
4205 <Member Name="loginserver">
4206 <Messages>
4207 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4208 <Issue>
4209 <Item>loginserver</Item>
4210 </Issue>
4211 </Message>
4212 <Message Id="loginserver" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4213 <Issue Name="Member">
4214 <Item>loginserver</Item>
4215 <Item>OpenSimMain.loginserver</Item>
4216 </Issue>
4217 </Message>
4218 </Messages>
4219 </Member>
4220 <Member Name="sandbox">
4221 <Messages>
4222 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4223 <Issue>
4224 <Item>sandbox</Item>
4225 </Issue>
4226 </Message>
4227 </Messages>
4228 </Member>
4229 <Member Name="Server">
4230 <Messages>
4231 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4232 <Issue>
4233 <Item>Server</Item>
4234 </Issue>
4235 </Message>
4236 </Messages>
4237 </Member>
4238 <Member Name="StartUp():System.Void">
4239 <Messages>
4240 <Message TypeName="DoNotUseTimersThatPreventPowerStateChanges" Category="Microsoft.Mobility" CheckId="CA1601" Created="2007-03-27 04:29:04Z">
4241 <Issue>
4242 <Item>Timer.set_Interval(Double):Void</Item>
4243 <Item>OpenSimMain.StartUp():Void</Item>
4244 </Issue>
4245 </Message>
4246 <Message Id="System.UInt32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
4247 <Issue>
4248 <Item>OpenSimMain.StartUp():Void</Item>
4249 <Item>System.UInt32.ToString</Item>
4250 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
4251 </Issue>
4252 <Issue>
4253 <Item>OpenSimMain.StartUp():Void</Item>
4254 <Item>System.UInt32.ToString</Item>
4255 <Item>System.UInt32.ToString(System.IFormatProvider)</Item>
4256 </Issue>
4257 </Message>
4258 </Messages>
4259 </Member>
4260 </Members>
4261 </Type>
4262 <Type Name="OpenSimRoot">
4263 <Messages>
4264 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4265 <Issue Name="Type">
4266 <Item>Sim</Item>
4267 <Item>OpenSim.OpenSimRoot</Item>
4268 </Issue>
4269 </Message>
4270 </Messages>
4271 <Members>
4272 <Member Name=".ctor()">
4273 <Messages>
4274 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
4275 <Issue>
4276 <Item>OpenSimRoot.OpenSimRoot()</Item>
4277 <Item>Sandbox</Item>
4278 <Item>System.Boolean</Item>
4279 <Item>false</Item>
4280 </Issue>
4281 </Message>
4282 </Messages>
4283 </Member>
4284 <Member Name="Application">
4285 <Messages>
4286 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4287 <Issue>
4288 <Item>Application</Item>
4289 </Issue>
4290 </Message>
4291 </Messages>
4292 </Member>
4293 <Member Name="AssetCache">
4294 <Messages>
4295 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4296 <Issue>
4297 <Item>AssetCache</Item>
4298 </Issue>
4299 </Message>
4300 </Messages>
4301 </Member>
4302 <Member Name="Cfg">
4303 <Messages>
4304 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4305 <Issue>
4306 <Item>Cfg</Item>
4307 </Issue>
4308 </Message>
4309 <Message Id="Cfg" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4310 <Issue Name="Member">
4311 <Item>Cfg</Item>
4312 <Item>OpenSimRoot.Cfg</Item>
4313 </Issue>
4314 </Message>
4315 </Messages>
4316 </Member>
4317 <Member Name="ClientThreads">
4318 <Messages>
4319 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4320 <Issue>
4321 <Item>ClientThreads</Item>
4322 </Issue>
4323 </Message>
4324 </Messages>
4325 </Member>
4326 <Member Name="GridServers">
4327 <Messages>
4328 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4329 <Issue>
4330 <Item>GridServers</Item>
4331 </Issue>
4332 </Message>
4333 </Messages>
4334 </Member>
4335 <Member Name="HttpServer">
4336 <Messages>
4337 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4338 <Issue>
4339 <Item>HttpServer</Item>
4340 </Issue>
4341 </Message>
4342 </Messages>
4343 </Member>
4344 <Member Name="InventoryCache">
4345 <Messages>
4346 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4347 <Issue>
4348 <Item>InventoryCache</Item>
4349 </Issue>
4350 </Message>
4351 </Messages>
4352 </Member>
4353 <Member Name="LocalWorld">
4354 <Messages>
4355 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4356 <Issue>
4357 <Item>LocalWorld</Item>
4358 </Issue>
4359 </Message>
4360 </Messages>
4361 </Member>
4362 <Member Name="Sandbox">
4363 <Messages>
4364 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4365 <Issue>
4366 <Item>Sandbox</Item>
4367 </Issue>
4368 </Message>
4369 </Messages>
4370 </Member>
4371 <Member Name="StartUp():System.Void">
4372 <Messages>
4373 <Message Id="StartUp" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z">
4374 <Issue Name="ShouldBeDiscreteTerm">
4375 <Item>StartUp</Item>
4376 <Item>method</Item>
4377 <Item>StartUp</Item>
4378 <Item>Startup</Item>
4379 </Issue>
4380 </Message>
4381 </Messages>
4382 </Member>
4383 <Member Name="startuptime">
4384 <Messages>
4385 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4386 <Issue>
4387 <Item>startuptime</Item>
4388 </Issue>
4389 </Message>
4390 <Message Id="startuptime" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4391 <Issue Name="Member">
4392 <Item>startuptime</Item>
4393 <Item>OpenSimRoot.startuptime</Item>
4394 </Issue>
4395 </Message>
4396 </Messages>
4397 </Member>
4398 </Members>
4399 </Type>
4400 <Type Name="QueItem">
4401 <Messages>
4402 <Message Id="Que" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4403 <Issue Name="Type">
4404 <Item>Que</Item>
4405 <Item>OpenSim.QueItem</Item>
4406 </Issue>
4407 </Message>
4408 </Messages>
4409 <Members>
4410 <Member Name="Incoming">
4411 <Messages>
4412 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4413 <Issue>
4414 <Item>Incoming</Item>
4415 </Issue>
4416 </Message>
4417 </Messages>
4418 </Member>
4419 <Member Name="Packet">
4420 <Messages>
4421 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4422 <Issue>
4423 <Item>Packet</Item>
4424 </Issue>
4425 </Message>
4426 </Messages>
4427 </Member>
4428 </Members>
4429 </Type>
4430 <Type Name="SimClient">
4431 <Messages>
4432 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4433 <Issue Name="Type">
4434 <Item>Sim</Item>
4435 <Item>OpenSim.SimClient</Item>
4436 </Issue>
4437 </Message>
4438 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4439 <Issue>
4440 <Item>OpenSim.SimClient</Item>
4441 <Item>System.Timers.Timer</Item>
4442 </Issue>
4443 </Message>
4444 </Messages>
4445 <Members>
4446 <Member Name=".ctor(System.Net.EndPoint,libsecondlife.Packets.UseCircuitCodePacket)">
4447 <Messages>
4448 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
4449 <Issue>
4450 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item>
4451 <Item>Sequence</Item>
4452 <Item>System.UInt32</Item>
4453 <Item>0</Item>
4454 </Issue>
4455 <Issue>
4456 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item>
4457 <Item>debug</Item>
4458 <Item>System.Boolean</Item>
4459 <Item>false</Item>
4460 </Issue>
4461 </Message>
4462 <Message TypeName="DoNotUseTimersThatPreventPowerStateChanges" Category="Microsoft.Mobility" CheckId="CA1601" Created="2007-03-27 04:29:04Z">
4463 <Issue>
4464 <Item>Timer.Timer(Double)</Item>
4465 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item>
4466 </Issue>
4467 </Message>
4468 <Message Id="1#initialcirpack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4469 <Issue Name="Parameter">
4470 <Item>SimClient.SimClient(EndPoint, UseCircuitCodePacket)</Item>
4471 <Item>initialcirpack</Item>
4472 <Item>initialcirpack</Item>
4473 </Issue>
4474 </Message>
4475 </Messages>
4476 </Member>
4477 <Member Name="AgentID">
4478 <Messages>
4479 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4480 <Issue>
4481 <Item>AgentID</Item>
4482 </Issue>
4483 </Message>
4484 </Messages>
4485 </Member>
4486 <Member Name="CircuitCode">
4487 <Messages>
4488 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4489 <Issue>
4490 <Item>CircuitCode</Item>
4491 </Issue>
4492 </Message>
4493 </Messages>
4494 </Member>
4495 <Member Name="ClientAvatar">
4496 <Messages>
4497 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4498 <Issue>
4499 <Item>ClientAvatar</Item>
4500 </Issue>
4501 </Message>
4502 </Messages>
4503 </Member>
4504 <Member Name="InPacket(libsecondlife.Packets.Packet):System.Void">
4505 <Messages>
4506 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
4507 <Issue Name="Parameter">
4508 <Item>NewPack</Item>
4509 </Issue>
4510 </Message>
4511 </Messages>
4512 </Member>
4513 <Member Name="newAssetFolder">
4514 <Messages>
4515 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
4516 <Issue>
4517 <Item>SimClient.newAssetFolder</Item>
4518 </Issue>
4519 </Message>
4520 </Messages>
4521 </Member>
4522 <Member Name="OutPacket(libsecondlife.Packets.Packet):System.Void">
4523 <Messages>
4524 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
4525 <Issue Name="Parameter">
4526 <Item>NewPack</Item>
4527 </Issue>
4528 </Message>
4529 </Messages>
4530 </Member>
4531 <Member Name="ProcessInPacket(libsecondlife.Packets.Packet):System.Void">
4532 <Messages>
4533 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
4534 <Issue Name="Parameter">
4535 <Item>Pack</Item>
4536 </Issue>
4537 </Message>
4538 <Message Id="wear" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z">
4539 <Issue>
4540 <Item>SimClient.ProcessInPacket(Packet):Void</Item>
4541 <Item>wear</Item>
4542 <Item>libsecondlife.Packets.AgentIsNowWearingPacket</Item>
4543 </Issue>
4544 </Message>
4545 <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2007-03-27 04:29:04Z">
4546 <Issue Name="IsNullOrEmpty">
4547 <Item>op_Equality</Item>
4548 <Item>""</Item>
4549 <Item>SimClient.ProcessInPacket(Packet):Void</Item>
4550 </Issue>
4551 </Message>
4552 </Messages>
4553 </Member>
4554 <Member Name="ProcessOutPacket(libsecondlife.Packets.Packet):System.Void">
4555 <Messages>
4556 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
4557 <Issue>
4558 <Item>SimClient.ProcessOutPacket(Packet):Void</Item>
4559 <Item>System.Exception</Item>
4560 </Issue>
4561 </Message>
4562 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
4563 <Issue Name="Parameter">
4564 <Item>Pack</Item>
4565 </Issue>
4566 </Message>
4567 </Messages>
4568 </Member>
4569 <Member Name="SecureSessionID">
4570 <Messages>
4571 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4572 <Issue>
4573 <Item>SecureSessionID</Item>
4574 </Issue>
4575 </Message>
4576 </Messages>
4577 </Member>
4578 <Member Name="SessionID">
4579 <Messages>
4580 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4581 <Issue>
4582 <Item>SessionID</Item>
4583 </Issue>
4584 </Message>
4585 </Messages>
4586 </Member>
4587 <Member Name="userEP">
4588 <Messages>
4589 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4590 <Issue>
4591 <Item>userEP</Item>
4592 </Issue>
4593 </Message>
4594 </Messages>
4595 </Member>
4596 </Members>
4597 </Type>
4598 <Type Name="SimConsole">
4599 <Messages>
4600 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z">
4601 <Issue>
4602 <Item>OpenSim.SimConsole</Item>
4603 <Item> OpenSim.Framework.Console.ConsoleBase</Item>
4604 </Issue>
4605 </Message>
4606 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4607 <Issue Name="Type">
4608 <Item>Sim</Item>
4609 <Item>OpenSim.SimConsole</Item>
4610 </Issue>
4611 </Message>
4612 </Messages>
4613 <Members>
4614 <Member Name=".ctor(OpenSim.Framework.Console.ConsoleBase+ConsoleType,System.String,System.Int32)">
4615 <Messages>
4616 <Message Id="0#constype" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4617 <Issue Name="Parameter">
4618 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4619 <Item>constype</Item>
4620 <Item>constype</Item>
4621 </Issue>
4622 </Message>
4623 <Message Id="1#sparam" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4624 <Issue Name="Parameter">
4625 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4626 <Item>sparam</Item>
4627 <Item>sparam</Item>
4628 </Issue>
4629 </Message>
4630 <Message Id="2#iparam" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4631 <Issue Name="Parameter">
4632 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4633 <Item>iparam</Item>
4634 <Item>iparam</Item>
4635 </Issue>
4636 </Message>
4637 <Message Id="iparam" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4638 <Issue>
4639 <Item>iparam</Item>
4640 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4641 </Issue>
4642 </Message>
4643 <Message Id="sparam" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4644 <Issue>
4645 <Item>sparam</Item>
4646 <Item>SimConsole.SimConsole(ConsoleType, String, Int32)</Item>
4647 </Issue>
4648 </Message>
4649 </Messages>
4650 </Member>
4651 <Member Name="CmdPrompt(System.String,System.String):System.String">
4652 <Messages>
4653 <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2007-03-27 04:29:04Z">
4654 <Issue Name="IsNullOrEmpty">
4655 <Item>op_Equality</Item>
4656 <Item>""</Item>
4657 <Item>SimConsole.CmdPrompt(String, String):String</Item>
4658 </Issue>
4659 </Message>
4660 </Messages>
4661 </Member>
4662 <Member Name="ConsType">
4663 <Messages>
4664 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
4665 <Issue>
4666 <Item>SimConsole.ConsType</Item>
4667 </Issue>
4668 </Message>
4669 </Messages>
4670 </Member>
4671 <Member Name="MainConsolePrompt():System.Void">
4672 <Messages>
4673 <Message Id="System.UInt64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
4674 <Issue>
4675 <Item>SimConsole.MainConsolePrompt():Void</Item>
4676 <Item>System.UInt64.ToString</Item>
4677 <Item>System.UInt64.ToString(System.IFormatProvider)</Item>
4678 </Issue>
4679 </Message>
4680 </Messages>
4681 </Member>
4682 <Member Name="RunCmd(System.String,System.String[]):System.Object">
4683 <Messages>
4684 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
4685 <Issue>
4686 <Item>'cmdparams'</Item>
4687 <Item>SimConsole.RunCmd(String, String[]):Object</Item>
4688 </Issue>
4689 </Message>
4690 </Messages>
4691 </Member>
4692 <Member Name="ShowCommands(System.String):System.Void">
4693 <Messages>
4694 <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
4695 <Issue>
4696 <Item>SimConsole.ShowCommands(String):Void</Item>
4697 <Item>System.String.Format(System.String,System.Object[])</Item>
4698 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
4699 </Issue>
4700 <Issue>
4701 <Item>SimConsole.ShowCommands(String):Void</Item>
4702 <Item>System.String.Format(System.String,System.Object[])</Item>
4703 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
4704 </Issue>
4705 </Message>
4706 </Messages>
4707 </Member>
4708 </Members>
4709 </Type>
4710 <Type Name="VersionInfo">
4711 <Members>
4712 <Member Name="Version">
4713 <Messages>
4714 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
4715 <Issue>
4716 <Item>Version</Item>
4717 </Issue>
4718 </Message>
4719 </Messages>
4720 </Member>
4721 </Members>
4722 </Type>
4723 </Types>
4724 </Namespace>
4725 <Namespace Name="OpenSim.Assets">
4726 <Types>
4727 <Type Name="AssetCache">
4728 <Members>
4729 <Member Name="AddTextureRequest(OpenSim.SimClient,libsecondlife.LLUUID):System.Void">
4730 <Messages>
4731 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
4732 <Issue Name="ParameterId">
4733 <Item>ID</Item>
4734 <Item>imageID</Item>
4735 <Item>Id</Item>
4736 </Issue>
4737 </Message>
4738 </Messages>
4739 </Member>
4740 <Member Name="AssetRequests">
4741 <Messages>
4742 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4743 <Issue>
4744 <Item>AssetRequests</Item>
4745 </Issue>
4746 </Message>
4747 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
4748 <Issue>
4749 <Item>System.Collections.Generic.List`1&lt;OpenSim.Assets.AssetRequest&gt;</Item>
4750 <Item>AssetCache.AssetRequests</Item>
4751 </Issue>
4752 </Message>
4753 </Messages>
4754 </Member>
4755 <Member Name="Assets">
4756 <Messages>
4757 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4758 <Issue>
4759 <Item>Assets</Item>
4760 </Issue>
4761 </Message>
4762 </Messages>
4763 </Member>
4764 <Member Name="CloneAsset(libsecondlife.LLUUID,OpenSim.Assets.AssetInfo):OpenSim.Assets.AssetInfo">
4765 <Messages>
4766 <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2007-03-27 04:29:04Z">
4767 <Issue>
4768 <Item>sourceAsset</Item>
4769 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item>
4770 <Item>OpenSim.Assets.AssetInfo</Item>
4771 <Item>OpenSim.Framework.Assets.AssetBase</Item>
4772 </Issue>
4773 </Message>
4774 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4775 <Issue>
4776 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item>
4777 </Issue>
4778 </Message>
4779 <Message Id="newOwner" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4780 <Issue>
4781 <Item>newOwner</Item>
4782 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item>
4783 </Issue>
4784 </Message>
4785 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
4786 <Issue>
4787 <Item>'sourceAsset'</Item>
4788 <Item>AssetCache.CloneAsset(LLUUID, AssetInfo):AssetInfo</Item>
4789 </Issue>
4790 </Message>
4791 </Messages>
4792 </Member>
4793 <Member Name="CloneImage(libsecondlife.LLUUID,OpenSim.Assets.TextureImage):OpenSim.Assets.TextureImage">
4794 <Messages>
4795 <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2007-03-27 04:29:04Z">
4796 <Issue>
4797 <Item>source</Item>
4798 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item>
4799 <Item>OpenSim.Assets.TextureImage</Item>
4800 <Item>OpenSim.Framework.Assets.AssetBase</Item>
4801 </Issue>
4802 </Message>
4803 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4804 <Issue>
4805 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item>
4806 </Issue>
4807 </Message>
4808 <Message Id="newOwner" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
4809 <Issue>
4810 <Item>newOwner</Item>
4811 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item>
4812 </Issue>
4813 </Message>
4814 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
4815 <Issue>
4816 <Item>'source'</Item>
4817 <Item>AssetCache.CloneImage(LLUUID, TextureImage):TextureImage</Item>
4818 </Issue>
4819 </Message>
4820 </Messages>
4821 </Member>
4822 <Member Name="CreateNewInventorySet(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase[]">
4823 <Messages>
4824 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
4825 <Issue Name="ParameterId">
4826 <Item>ID</Item>
4827 <Item>agentID</Item>
4828 <Item>Id</Item>
4829 </Issue>
4830 </Message>
4831 </Messages>
4832 </Member>
4833 <Member Name="GetAsset(libsecondlife.LLUUID):OpenSim.Framework.Assets.AssetBase">
4834 <Messages>
4835 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
4836 <Issue Name="ParameterId">
4837 <Item>ID</Item>
4838 <Item>assetID</Item>
4839 <Item>Id</Item>
4840 </Issue>
4841 </Message>
4842 </Messages>
4843 </Member>
4844 <Member Name="RequestedAssets">
4845 <Messages>
4846 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4847 <Issue>
4848 <Item>RequestedAssets</Item>
4849 </Issue>
4850 </Message>
4851 </Messages>
4852 </Member>
4853 <Member Name="RequestedTextures">
4854 <Messages>
4855 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4856 <Issue>
4857 <Item>RequestedTextures</Item>
4858 </Issue>
4859 </Message>
4860 </Messages>
4861 </Member>
4862 <Member Name="RunAssetManager():System.Void">
4863 <Messages>
4864 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
4865 <Issue>
4866 <Item>AssetCache.RunAssetManager():Void</Item>
4867 <Item>System.Exception</Item>
4868 </Issue>
4869 </Message>
4870 </Messages>
4871 </Member>
4872 <Member Name="TextureRequests">
4873 <Messages>
4874 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4875 <Issue>
4876 <Item>TextureRequests</Item>
4877 </Issue>
4878 </Message>
4879 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
4880 <Issue>
4881 <Item>System.Collections.Generic.List`1&lt;OpenSim.Assets.AssetRequest&gt;</Item>
4882 <Item>AssetCache.TextureRequests</Item>
4883 </Issue>
4884 </Message>
4885 </Messages>
4886 </Member>
4887 <Member Name="Textures">
4888 <Messages>
4889 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4890 <Issue>
4891 <Item>Textures</Item>
4892 </Issue>
4893 </Message>
4894 </Messages>
4895 </Member>
4896 </Members>
4897 </Type>
4898 <Type Name="AssetInfo">
4899 <Messages>
4900 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z">
4901 <Issue>
4902 <Item>OpenSim.Assets.AssetInfo</Item>
4903 <Item> OpenSim.Framework.Assets.AssetBase</Item>
4904 </Issue>
4905 </Message>
4906 </Messages>
4907 <Members>
4908 <Member Name=".ctor(OpenSim.Framework.Assets.AssetBase)">
4909 <Messages>
4910 <Message Id="0#a" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4911 <Issue Name="Parameter">
4912 <Item>AssetInfo.AssetInfo(AssetBase)</Item>
4913 <Item>a</Item>
4914 <Item>aBase</Item>
4915 </Issue>
4916 </Message>
4917 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
4918 <Issue>
4919 <Item>'aBase'</Item>
4920 <Item>AssetInfo.AssetInfo(AssetBase)</Item>
4921 </Issue>
4922 </Message>
4923 </Messages>
4924 </Member>
4925 </Members>
4926 </Type>
4927 <Type Name="AssetRequest">
4928 <Members>
4929 <Member Name=".ctor()">
4930 <Messages>
4931 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
4932 <Issue>
4933 <Item>AssetRequest.AssetRequest()</Item>
4934 <Item>DataPointer</Item>
4935 <Item>System.Int64</Item>
4936 <Item>0</Item>
4937 </Issue>
4938 <Issue>
4939 <Item>AssetRequest.AssetRequest()</Item>
4940 <Item>NumPackets</Item>
4941 <Item>System.Int32</Item>
4942 <Item>0</Item>
4943 </Issue>
4944 <Issue>
4945 <Item>AssetRequest.AssetRequest()</Item>
4946 <Item>PacketCounter</Item>
4947 <Item>System.Int32</Item>
4948 <Item>0</Item>
4949 </Issue>
4950 </Message>
4951 </Messages>
4952 </Member>
4953 <Member Name="AssetInf">
4954 <Messages>
4955 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4956 <Issue>
4957 <Item>AssetInf</Item>
4958 </Issue>
4959 </Message>
4960 </Messages>
4961 </Member>
4962 <Member Name="DataPointer">
4963 <Messages>
4964 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4965 <Issue>
4966 <Item>DataPointer</Item>
4967 </Issue>
4968 </Message>
4969 </Messages>
4970 </Member>
4971 <Member Name="ImageInfo">
4972 <Messages>
4973 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4974 <Issue>
4975 <Item>ImageInfo</Item>
4976 </Issue>
4977 </Message>
4978 </Messages>
4979 </Member>
4980 <Member Name="IsTextureRequest">
4981 <Messages>
4982 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4983 <Issue>
4984 <Item>IsTextureRequest</Item>
4985 </Issue>
4986 </Message>
4987 </Messages>
4988 </Member>
4989 <Member Name="NumPackets">
4990 <Messages>
4991 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
4992 <Issue>
4993 <Item>NumPackets</Item>
4994 </Issue>
4995 </Message>
4996 <Message Id="Num" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
4997 <Issue Name="Member">
4998 <Item>Num</Item>
4999 <Item>AssetRequest.NumPackets</Item>
5000 </Issue>
5001 </Message>
5002 </Messages>
5003 </Member>
5004 <Member Name="PacketCounter">
5005 <Messages>
5006 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5007 <Issue>
5008 <Item>PacketCounter</Item>
5009 </Issue>
5010 </Message>
5011 </Messages>
5012 </Member>
5013 <Member Name="RequestAssetID">
5014 <Messages>
5015 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5016 <Issue>
5017 <Item>RequestAssetID</Item>
5018 </Issue>
5019 </Message>
5020 </Messages>
5021 </Member>
5022 <Member Name="RequestUser">
5023 <Messages>
5024 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5025 <Issue>
5026 <Item>RequestUser</Item>
5027 </Issue>
5028 </Message>
5029 </Messages>
5030 </Member>
5031 <Member Name="TransferRequestID">
5032 <Messages>
5033 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5034 <Issue>
5035 <Item>TransferRequestID</Item>
5036 </Issue>
5037 </Message>
5038 </Messages>
5039 </Member>
5040 </Members>
5041 </Type>
5042 <Type Name="InventoryCache">
5043 <Members>
5044 <Member Name="AddNewInventoryItem(OpenSim.SimClient,libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):libsecondlife.LLUUID">
5045 <Messages>
5046 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5047 <Issue Name="ParameterId">
5048 <Item>ID</Item>
5049 <Item>folderID</Item>
5050 <Item>Id</Item>
5051 </Issue>
5052 </Message>
5053 </Messages>
5054 </Member>
5055 <Member Name="ClientLeaving(libsecondlife.LLUUID):System.Void">
5056 <Messages>
5057 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5058 <Issue Name="ParameterId">
5059 <Item>ID</Item>
5060 <Item>clientID</Item>
5061 <Item>Id</Item>
5062 </Issue>
5063 </Message>
5064 </Messages>
5065 </Member>
5066 <Member Name="CreateNewInventoryFolder(OpenSim.SimClient,libsecondlife.LLUUID):System.Boolean">
5067 <Messages>
5068 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5069 <Issue Name="ParameterId">
5070 <Item>ID</Item>
5071 <Item>folderID</Item>
5072 <Item>Id</Item>
5073 </Issue>
5074 </Message>
5075 </Messages>
5076 </Member>
5077 <Member Name="CreateNewInventoryFolder(OpenSim.SimClient,libsecondlife.LLUUID,System.UInt16):System.Boolean">
5078 <Messages>
5079 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5080 <Issue Name="ParameterId">
5081 <Item>ID</Item>
5082 <Item>folderID</Item>
5083 <Item>Id</Item>
5084 </Issue>
5085 </Message>
5086 </Messages>
5087 </Member>
5088 <Member Name="FetchInventory(OpenSim.SimClient,libsecondlife.Packets.FetchInventoryPacket):System.Void">
5089 <Messages>
5090 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5091 <Issue Name="Parameter">
5092 <Item>FetchItems</Item>
5093 </Issue>
5094 </Message>
5095 </Messages>
5096 </Member>
5097 <Member Name="FetchInventoryDescendents(OpenSim.SimClient,libsecondlife.Packets.FetchInventoryDescendentsPacket):System.Void">
5098 <Messages>
5099 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5100 <Issue Name="Parameter">
5101 <Item>FetchDescend</Item>
5102 </Issue>
5103 </Message>
5104 </Messages>
5105 </Member>
5106 <Member Name="GetAgentsInventory(libsecondlife.LLUUID):OpenSim.Framework.Inventory.AgentInventory">
5107 <Messages>
5108 <Message Id="0#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5109 <Issue Name="ParameterId">
5110 <Item>ID</Item>
5111 <Item>agentID</Item>
5112 <Item>Id</Item>
5113 </Issue>
5114 </Message>
5115 </Messages>
5116 </Member>
5117 <Member Name="UpdateInventoryItem(OpenSim.SimClient,libsecondlife.LLUUID,OpenSim.Framework.Assets.AssetBase):System.Boolean">
5118 <Messages>
5119 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
5120 <Issue Name="ParameterId">
5121 <Item>ID</Item>
5122 <Item>itemID</Item>
5123 <Item>Id</Item>
5124 </Issue>
5125 </Message>
5126 </Messages>
5127 </Member>
5128 </Members>
5129 </Type>
5130 <Type Name="TextureImage">
5131 <Messages>
5132 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z">
5133 <Issue>
5134 <Item>OpenSim.Assets.TextureImage</Item>
5135 <Item> OpenSim.Framework.Assets.AssetBase</Item>
5136 </Issue>
5137 </Message>
5138 </Messages>
5139 <Members>
5140 <Member Name=".ctor(OpenSim.Framework.Assets.AssetBase)">
5141 <Messages>
5142 <Message Id="0#a" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5143 <Issue Name="Parameter">
5144 <Item>TextureImage.TextureImage(AssetBase)</Item>
5145 <Item>a</Item>
5146 <Item>aBase</Item>
5147 </Issue>
5148 </Message>
5149 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
5150 <Issue>
5151 <Item>'aBase'</Item>
5152 <Item>TextureImage.TextureImage(AssetBase)</Item>
5153 </Issue>
5154 </Message>
5155 </Messages>
5156 </Member>
5157 </Members>
5158 </Type>
5159 </Types>
5160 </Namespace>
5161 <Namespace Name="OpenSim.CAPS">
5162 <Types>
5163 <Type Name="SimCAPSHTTPServer">
5164 <Messages>
5165 <Message Id="Sim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5166 <Issue Name="Type">
5167 <Item>Sim</Item>
5168 <Item>OpenSim.CAPS.SimCAPSHTTPServer</Item>
5169 </Issue>
5170 </Message>
5171 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
5172 <Issue Name="Type">
5173 <Item>SimCAPSHTTPServer</Item>
5174 </Issue>
5175 </Message>
5176 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
5177 <Issue>
5178 <Item>OpenSim.CAPS.SimCAPSHTTPServer</Item>
5179 <Item>System.Net.HttpListener</Item>
5180 </Issue>
5181 </Message>
5182 </Messages>
5183 <Members>
5184 <Member Name="HandleRequest(System.Object):System.Void">
5185 <Messages>
5186 <Message Id="0#stateinfo" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5187 <Issue Name="Parameter">
5188 <Item>SimCAPSHTTPServer.HandleRequest(Object):Void</Item>
5189 <Item>stateinfo</Item>
5190 <Item>stateinfo</Item>
5191 </Issue>
5192 </Message>
5193 </Messages>
5194 </Member>
5195 <Member Name="HTTPD">
5196 <Messages>
5197 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5198 <Issue>
5199 <Item>HTTPD</Item>
5200 </Issue>
5201 </Message>
5202 </Messages>
5203 </Member>
5204 <Member Name="Listener">
5205 <Messages>
5206 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5207 <Issue>
5208 <Item>Listener</Item>
5209 </Issue>
5210 </Message>
5211 </Messages>
5212 </Member>
5213 <Member Name="LoadAdminPage():System.Void">
5214 <Messages>
5215 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5216 <Issue>
5217 <Item>SimCAPSHTTPServer.LoadAdminPage():Void</Item>
5218 <Item>System.Exception</Item>
5219 </Issue>
5220 </Message>
5221 </Messages>
5222 </Member>
5223 <Member Name="ParseLLSDXML(System.String):System.String">
5224 <Messages>
5225 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
5226 <Issue>
5227 <Item>SimCAPSHTTPServer.ParseLLSDXML(String):String</Item>
5228 </Issue>
5229 </Message>
5230 <Message Id="requestBody" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
5231 <Issue>
5232 <Item>requestBody</Item>
5233 <Item>SimCAPSHTTPServer.ParseLLSDXML(String):String</Item>
5234 </Issue>
5235 </Message>
5236 </Messages>
5237 </Member>
5238 <Member Name="ParseREST(System.String,System.String,System.String):System.String">
5239 <Messages>
5240 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5241 <Issue>
5242 <Item>SimCAPSHTTPServer.ParseREST(String, String, String):String</Item>
5243 <Item>System.Exception</Item>
5244 </Issue>
5245 </Message>
5246 <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5247 <Issue>
5248 <Item>SimCAPSHTTPServer.ParseREST(String, String, String):String</Item>
5249 <Item>System.String.Format(System.String,System.Object[])</Item>
5250 <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
5251 </Issue>
5252 </Message>
5253 </Messages>
5254 </Member>
5255 <Member Name="ParseXMLRPC(System.String):System.String">
5256 <Messages>
5257 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5258 <Issue>
5259 <Item>SimCAPSHTTPServer.ParseXMLRPC(String):String</Item>
5260 <Item>System.Exception</Item>
5261 </Issue>
5262 </Message>
5263 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="NonBreaking">
5264 <Issue>
5265 <Item>SimCAPSHTTPServer.ParseXMLRPC(String):String</Item>
5266 </Issue>
5267 </Message>
5268 <Message Id="System.Convert.ToUInt32(System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5269 <Issue>
5270 <Item>SimCAPSHTTPServer.ParseXMLRPC(String):String</Item>
5271 <Item>System.Convert.ToUInt32(System.Object)</Item>
5272 <Item>System.Convert.ToUInt32(System.Object,System.IFormatProvider)</Item>
5273 </Issue>
5274 </Message>
5275 </Messages>
5276 </Member>
5277 <Member Name="StartHTTP():System.Void">
5278 <Messages>
5279 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5280 <Issue>
5281 <Item>SimCAPSHTTPServer.StartHTTP():Void</Item>
5282 <Item>System.Exception</Item>
5283 </Issue>
5284 </Message>
5285 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
5286 <Issue Name="Member">
5287 <Item>SimCAPSHTTPServer.StartHTTP():Void</Item>
5288 </Issue>
5289 </Message>
5290 </Messages>
5291 </Member>
5292 </Members>
5293 </Type>
5294 </Types>
5295 </Namespace>
5296 <Namespace Name="OpenSim.types">
5297 <Types>
5298 <Type Name="Mesh">
5299 <Members>
5300 <Member Name="mesh">
5301 <Messages>
5302 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5303 <Issue>
5304 <Item>mesh</Item>
5305 </Issue>
5306 </Message>
5307 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
5308 <Issue>
5309 <Item>System.Collections.Generic.List`1&lt;OpenSim.types.Triangle&gt;</Item>
5310 <Item>Mesh.mesh</Item>
5311 </Issue>
5312 </Message>
5313 </Messages>
5314 </Member>
5315 <Member Name="op_Addition(OpenSim.types.Mesh,OpenSim.types.Mesh):OpenSim.types.Mesh">
5316 <Messages>
5317 <Message Id="0#a" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5318 <Issue Name="ParameterOneLetter">
5319 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item>
5320 <Item>a</Item>
5321 </Issue>
5322 </Message>
5323 <Message Id="1#b" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5324 <Issue Name="ParameterOneLetter">
5325 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item>
5326 <Item>b</Item>
5327 </Issue>
5328 </Message>
5329 <Message TypeName="OperatorOverloadsHaveNamedAlternates" Category="Microsoft.Usage" CheckId="CA2225" Created="2007-03-27 04:29:04Z">
5330 <Issue>
5331 <Item>Add</Item>
5332 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item>
5333 </Issue>
5334 </Message>
5335 <Message TypeName="OverloadOperatorEqualsOnOverloadingAddAndSubtract" Category="Microsoft.Design" CheckId="CA1013" Created="2007-03-27 04:29:04Z">
5336 <Issue>
5337 <Item>Mesh</Item>
5338 <Item>Mesh.op_Addition(Mesh, Mesh):Mesh</Item>
5339 </Issue>
5340 </Message>
5341 </Messages>
5342 </Member>
5343 </Members>
5344 </Type>
5345 <Type Name="Triangle">
5346 <Members>
5347 <Member Name=".ctor(Axiom.MathLib.Vector3,Axiom.MathLib.Vector3,Axiom.MathLib.Vector3)">
5348 <Messages>
5349 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5350 <Issue Name="Parameter">
5351 <Item>A</Item>
5352 </Issue>
5353 </Message>
5354 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5355 <Issue Name="Parameter">
5356 <Item>B</Item>
5357 </Issue>
5358 </Message>
5359 <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5360 <Issue Name="Parameter">
5361 <Item>C</Item>
5362 </Issue>
5363 </Message>
5364 <Message Id="0#A" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5365 <Issue Name="ParameterOneLetter">
5366 <Item>Triangle.Triangle(Vector3, Vector3, Vector3)</Item>
5367 <Item>A</Item>
5368 </Issue>
5369 </Message>
5370 <Message Id="1#B" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5371 <Issue Name="ParameterOneLetter">
5372 <Item>Triangle.Triangle(Vector3, Vector3, Vector3)</Item>
5373 <Item>B</Item>
5374 </Issue>
5375 </Message>
5376 <Message Id="2#C" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5377 <Issue Name="ParameterOneLetter">
5378 <Item>Triangle.Triangle(Vector3, Vector3, Vector3)</Item>
5379 <Item>C</Item>
5380 </Issue>
5381 </Message>
5382 </Messages>
5383 </Member>
5384 </Members>
5385 </Type>
5386 </Types>
5387 </Namespace>
5388 <Namespace Name="OpenSim.UserServer">
5389 <Types>
5390 <Type Name="LocalUserProfileManager">
5391 <Members>
5392 <Member Name="CustomiseResponse(System.Collections.Hashtable&amp;,OpenSim.Framework.User.UserProfile):System.Void">
5393 <Messages>
5394 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5395 <Issue>
5396 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5397 <Item>System.Int32.ToString</Item>
5398 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
5399 </Issue>
5400 <Issue>
5401 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5402 <Item>System.Int32.ToString</Item>
5403 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
5404 </Issue>
5405 </Message>
5406 <Message Id="System.Single.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5407 <Issue>
5408 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5409 <Item>System.Single.ToString</Item>
5410 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5411 </Issue>
5412 <Issue>
5413 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5414 <Item>System.Single.ToString</Item>
5415 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5416 </Issue>
5417 <Issue>
5418 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5419 <Item>System.Single.ToString</Item>
5420 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5421 </Issue>
5422 <Issue>
5423 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5424 <Item>System.Single.ToString</Item>
5425 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5426 </Issue>
5427 <Issue>
5428 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5429 <Item>System.Single.ToString</Item>
5430 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5431 </Issue>
5432 <Issue>
5433 <Item>LocalUserProfileManager.CustomiseResponse(Hashtable&amp;, UserProfile):Void</Item>
5434 <Item>System.Single.ToString</Item>
5435 <Item>System.Single.ToString(System.IFormatProvider)</Item>
5436 </Issue>
5437 </Message>
5438 </Messages>
5439 </Member>
5440 </Members>
5441 </Type>
5442 <Type Name="LoginServer">
5443 <Messages>
5444 <Message TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" Created="2007-03-27 04:29:04Z">
5445 <Issue>
5446 <Item>OpenSim.UserServer.LoginServer</Item>
5447 <Item> OpenSim.Framework.Grid.LoginService</Item>
5448 </Issue>
5449 </Message>
5450 <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
5451 <Issue>
5452 <Item>OpenSim.UserServer.LoginServer</Item>
5453 <Item>System.Net.Sockets.Socket</Item>
5454 </Issue>
5455 </Message>
5456 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
5457 <Issue Name="Type">
5458 <Item>Login</Item>
5459 <Item>LoginServer</Item>
5460 <Item>LogOn</Item>
5461 </Issue>
5462 </Message>
5463 </Messages>
5464 <Members>
5465 <Member Name=".ctor(OpenSim.Framework.Interfaces.IGridServer)">
5466 <Messages>
5467 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
5468 <Issue>
5469 <Item>LoginServer.LoginServer(IGridServer)</Item>
5470 <Item>_needPasswd</Item>
5471 <Item>System.Boolean</Item>
5472 <Item>false</Item>
5473 </Issue>
5474 <Issue>
5475 <Item>LoginServer.LoginServer(IGridServer)</Item>
5476 <Item>userAccounts</Item>
5477 <Item>System.Boolean</Item>
5478 <Item>false</Item>
5479 </Issue>
5480 </Message>
5481 </Messages>
5482 </Member>
5483 <Member Name="Authenticate(System.String,System.String,System.String):System.Boolean">
5484 <Messages>
5485 <Message Id="2#passwd" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5486 <Issue Name="Parameter">
5487 <Item>LoginServer.Authenticate(String, String, String):Boolean</Item>
5488 <Item>passwd</Item>
5489 <Item>passwd</Item>
5490 </Issue>
5491 </Message>
5492 </Messages>
5493 </Member>
5494 <Member Name="clientAddress">
5495 <Messages>
5496 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5497 <Issue>
5498 <Item>clientAddress</Item>
5499 </Issue>
5500 </Message>
5501 </Messages>
5502 </Member>
5503 <Member Name="CustomiseLoginResponse(System.Collections.Hashtable,System.String,System.String):System.Void">
5504 <Messages>
5505 <Message Id="Customise" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5506 <Issue Name="Member">
5507 <Item>Customise</Item>
5508 <Item>LoginServer.CustomiseLoginResponse(Hashtable, String, String):Void</Item>
5509 </Issue>
5510 </Message>
5511 <Message Id="Login" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2007-03-27 04:29:04Z">
5512 <Issue Name="Member">
5513 <Item>Login</Item>
5514 <Item>CustomiseLoginResponse</Item>
5515 <Item>LogOn</Item>
5516 </Issue>
5517 </Message>
5518 </Messages>
5519 </Member>
5520 <Member Name="EncodePassword(System.String):System.String">
5521 <Messages>
5522 <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2007-03-27 04:29:04Z">
5523 <Issue>
5524 <Item>LoginServer.EncodePassword(String):String</Item>
5525 <Item>System.String.ToLower</Item>
5526 <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item>
5527 </Issue>
5528 </Message>
5529 </Messages>
5530 </Member>
5531 <Member Name="GetAgentId(System.String,System.String):libsecondlife.LLUUID">
5532 <Messages>
5533 <Message Id="System.Int32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5534 <Issue>
5535 <Item>LoginServer.GetAgentId(String, String):LLUUID</Item>
5536 <Item>System.Int32.ToString(System.String)</Item>
5537 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item>
5538 </Issue>
5539 </Message>
5540 </Messages>
5541 </Member>
5542 <Member Name="InitializeLogin():System.Void">
5543 <Messages>
5544 <Message Id="OpenSim.Framework.User.UserProfileManager.SetKeys(System.String,System.String,System.String,System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2007-03-27 04:29:04Z">
5545 <Issue>
5546 <Item>LoginServer.InitializeLogin():Void</Item>
5547 <Item>4</Item>
5548 <Item>UserProfileManager.SetKeys(String, String, String, String):Void</Item>
5549 <Item>Welcome to OpenSim</Item>
5550 </Issue>
5551 </Message>
5552 <Message Id="Sim" TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204" Created="2007-03-27 04:29:04Z">
5553 <Issue>
5554 <Item>Sim</Item>
5555 <Item>OpenSim</Item>
5556 </Issue>
5557 </Message>
5558 </Messages>
5559 </Member>
5560 <Member Name="LoginRequest(System.IO.StreamReader,System.IO.StreamWriter):System.Void">
5561 <Messages>
5562 <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2007-03-27 04:29:04Z">
5563 <Issue Name="TooGeneric">
5564 <Item>LoginServer.LoginRequest(StreamReader, StreamWriter):Void</Item>
5565 <Item>System.Exception</Item>
5566 </Issue>
5567 </Message>
5568 <Message Id="System.Convert.ToInt32(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5569 <Issue>
5570 <Item>LoginServer.LoginRequest(StreamReader, StreamWriter):Void</Item>
5571 <Item>System.Convert.ToInt32(System.String)</Item>
5572 <Item>System.Convert.ToInt32(System.String,System.IFormatProvider)</Item>
5573 </Issue>
5574 </Message>
5575 <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2007-03-27 04:29:04Z">
5576 <Issue Name="IsNullOrEmpty">
5577 <Item>op_Inequality</Item>
5578 <Item>""</Item>
5579 <Item>LoginServer.LoginRequest(StreamReader, StreamWriter):Void</Item>
5580 </Issue>
5581 </Message>
5582 </Messages>
5583 </Member>
5584 <Member Name="ProcessXmlRequest(Nwc.XmlRpc.XmlRpcRequest,System.IO.StreamWriter):System.Boolean">
5585 <Messages>
5586 <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2007-03-27 04:29:04Z">
5587 <Issue>
5588 <Item>writer</Item>
5589 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5590 <Item>System.IO.StreamWriter</Item>
5591 <Item>System.IO.TextWriter</Item>
5592 </Issue>
5593 </Message>
5594 <Message Id="System.Int32.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5595 <Issue>
5596 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5597 <Item>System.Int32.ToString</Item>
5598 <Item>System.Int32.ToString(System.IFormatProvider)</Item>
5599 </Issue>
5600 </Message>
5601 <Message Id="System.Int32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
5602 <Issue>
5603 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5604 <Item>System.Int32.ToString(System.String)</Item>
5605 <Item>System.Int32.ToString(System.String,System.IFormatProvider)</Item>
5606 </Issue>
5607 </Message>
5608 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
5609 <Issue>
5610 <Item>'request'</Item>
5611 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5612 </Issue>
5613 <Issue>
5614 <Item>'writer'</Item>
5615 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5616 </Issue>
5617 <Issue>
5618 <Item>'writer'</Item>
5619 <Item>LoginServer.ProcessXmlRequest(XmlRpcRequest, StreamWriter):Boolean</Item>
5620 </Issue>
5621 </Message>
5622 </Messages>
5623 </Member>
5624 <Member Name="remoteAddress">
5625 <Messages>
5626 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5627 <Issue>
5628 <Item>remoteAddress</Item>
5629 </Issue>
5630 </Message>
5631 </Messages>
5632 </Member>
5633 <Member Name="RunLogin():System.Void">
5634 <Messages>
5635 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
5636 <Issue>
5637 <Item>LoginServer.RunLogin():Void</Item>
5638 <Item>System.Exception</Item>
5639 </Issue>
5640 <Issue>
5641 <Item>LoginServer.RunLogin():Void</Item>
5642 <Item>System.Exception</Item>
5643 </Issue>
5644 </Message>
5645 <Message Id="clientEndPoint" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2007-03-27 04:29:04Z">
5646 <Issue>
5647 <Item>LoginServer.RunLogin():Void</Item>
5648 <Item>clientEndPoint</Item>
5649 <Item>System.Net.IPEndPoint</Item>
5650 </Issue>
5651 </Message>
5652 </Messages>
5653 </Member>
5654 </Members>
5655 </Type>
5656 </Types>
5657 </Namespace>
5658 <Namespace Name="OpenSim.world">
5659 <Types>
5660 <Type Name="Avatar">
5661 <Members>
5662 <Member Name=".cctor()">
5663 <Messages>
5664 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
5665 <Issue>
5666 <Item>Avatar.Avatar()</Item>
5667 <Item>PhysicsEngineFlying</Item>
5668 <Item>System.Boolean</Item>
5669 <Item>false</Item>
5670 </Issue>
5671 </Message>
5672 </Messages>
5673 </Member>
5674 <Member Name=".ctor(OpenSim.SimClient)">
5675 <Messages>
5676 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
5677 <Issue>
5678 <Item>Avatar.Avatar(SimClient)</Item>
5679 <Item>_updateCount</Item>
5680 <Item>System.Int16</Item>
5681 <Item>0</Item>
5682 </Issue>
5683 <Issue>
5684 <Item>Avatar.Avatar(SimClient)</Item>
5685 <Item>avatarAppearanceTexture</Item>
5686 <Item>libsecondlife.LLObject+TextureEntry</Item>
5687 <Item>null</Item>
5688 </Issue>
5689 <Issue>
5690 <Item>Avatar.Avatar(SimClient)</Item>
5691 <Item>movementflag</Item>
5692 <Item>System.Byte</Item>
5693 <Item>0</Item>
5694 </Issue>
5695 <Issue>
5696 <Item>Avatar.Avatar(SimClient)</Item>
5697 <Item>updateflag</Item>
5698 <Item>System.Boolean</Item>
5699 <Item>false</Item>
5700 </Issue>
5701 </Message>
5702 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5703 <Issue Name="Parameter">
5704 <Item>TheClient</Item>
5705 </Issue>
5706 </Message>
5707 </Messages>
5708 </Member>
5709 <Member Name="anim_seq">
5710 <Messages>
5711 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5712 <Issue>
5713 <Item>anim_seq</Item>
5714 </Issue>
5715 </Message>
5716 <Message Id="anim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5717 <Issue Name="Member">
5718 <Item>anim</Item>
5719 <Item>Avatar.anim_seq</Item>
5720 </Issue>
5721 </Message>
5722 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
5723 <Issue Name="Member">
5724 <Item>anim_seq</Item>
5725 </Issue>
5726 </Message>
5727 </Messages>
5728 </Member>
5729 <Member Name="Animations">
5730 <Messages>
5731 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
5732 <Issue>
5733 <Item>Animations</Item>
5734 </Issue>
5735 </Message>
5736 </Messages>
5737 </Member>
5738 <Member Name="CompleteMovement(OpenSim.world.World):System.Void">
5739 <Messages>
5740 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5741 <Issue Name="Parameter">
5742 <Item>RegionInfo</Item>
5743 </Issue>
5744 </Message>
5745 <Message Id="RegionInfo" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
5746 <Issue>
5747 <Item>RegionInfo</Item>
5748 <Item>Avatar.CompleteMovement(World):Void</Item>
5749 </Issue>
5750 </Message>
5751 </Messages>
5752 </Member>
5753 <Member Name="ControllingClient">
5754 <Messages>
5755 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5756 <Issue>
5757 <Item>ControllingClient</Item>
5758 </Issue>
5759 </Message>
5760 </Messages>
5761 </Member>
5762 <Member Name="current_anim">
5763 <Messages>
5764 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5765 <Issue>
5766 <Item>current_anim</Item>
5767 </Issue>
5768 </Message>
5769 <Message Id="anim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5770 <Issue Name="Member">
5771 <Item>anim</Item>
5772 <Item>Avatar.current_anim</Item>
5773 </Issue>
5774 </Message>
5775 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
5776 <Issue Name="Member">
5777 <Item>current_anim</Item>
5778 </Issue>
5779 </Message>
5780 </Messages>
5781 </Member>
5782 <Member Name="firstname">
5783 <Messages>
5784 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5785 <Issue>
5786 <Item>firstname</Item>
5787 </Issue>
5788 </Message>
5789 <Message Id="firstname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5790 <Issue Name="Member">
5791 <Item>firstname</Item>
5792 <Item>Avatar.firstname</Item>
5793 </Issue>
5794 </Message>
5795 </Messages>
5796 </Member>
5797 <Member Name="lastname">
5798 <Messages>
5799 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5800 <Issue>
5801 <Item>lastname</Item>
5802 </Issue>
5803 </Message>
5804 <Message Id="lastname" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5805 <Issue Name="Member">
5806 <Item>lastname</Item>
5807 <Item>Avatar.lastname</Item>
5808 </Issue>
5809 </Message>
5810 </Messages>
5811 </Member>
5812 <Member Name="LoadAnims():System.Void">
5813 <Messages>
5814 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5815 <Issue Name="Member">
5816 <Item>Anims</Item>
5817 <Item>Avatar.LoadAnims():Void</Item>
5818 </Issue>
5819 </Message>
5820 </Messages>
5821 </Member>
5822 <Member Name="PhysActor">
5823 <Messages>
5824 <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2007-03-27 04:29:04Z">
5825 <Issue>
5826 <Item>PhysActor</Item>
5827 </Issue>
5828 </Message>
5829 </Messages>
5830 </Member>
5831 <Member Name="PhysicsEngineFlying">
5832 <Messages>
5833 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
5834 <Issue>
5835 <Item>PhysicsEngineFlying</Item>
5836 </Issue>
5837 </Message>
5838 </Messages>
5839 </Member>
5840 <Member Name="SendAnimPack():System.Void">
5841 <Messages>
5842 <Message Id="Anim" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5843 <Issue Name="Member">
5844 <Item>Anim</Item>
5845 <Item>Avatar.SendAnimPack():Void</Item>
5846 </Issue>
5847 </Message>
5848 </Messages>
5849 </Member>
5850 <Member Name="SendAppearanceToOtherAgent(OpenSim.SimClient):System.Void">
5851 <Messages>
5852 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
5853 <Issue>
5854 <Item>'userInfo'</Item>
5855 <Item>Avatar.SendAppearanceToOtherAgent(SimClient):Void</Item>
5856 </Issue>
5857 </Message>
5858 </Messages>
5859 </Member>
5860 <Member Name="SendRegionHandshake(OpenSim.world.World):System.Void">
5861 <Messages>
5862 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5863 <Issue Name="Parameter">
5864 <Item>RegionInfo</Item>
5865 </Issue>
5866 </Message>
5867 <Message Id="RegionInfo" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
5868 <Issue>
5869 <Item>RegionInfo</Item>
5870 <Item>Avatar.SendRegionHandshake(World):Void</Item>
5871 </Issue>
5872 </Message>
5873 </Messages>
5874 </Member>
5875 </Members>
5876 </Type>
5877 <Type Name="AvatarAnimations">
5878 <Members>
5879 <Member Name="AnimsLLUUID">
5880 <Messages>
5881 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5882 <Issue>
5883 <Item>AnimsLLUUID</Item>
5884 </Issue>
5885 </Message>
5886 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5887 <Issue Name="Member">
5888 <Item>Anims</Item>
5889 <Item>AvatarAnimations.AnimsLLUUID</Item>
5890 </Issue>
5891 </Message>
5892 </Messages>
5893 </Member>
5894 <Member Name="AnimsNames">
5895 <Messages>
5896 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5897 <Issue>
5898 <Item>AnimsNames</Item>
5899 </Issue>
5900 </Message>
5901 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5902 <Issue Name="Member">
5903 <Item>Anims</Item>
5904 <Item>AvatarAnimations.AnimsNames</Item>
5905 </Issue>
5906 </Message>
5907 </Messages>
5908 </Member>
5909 <Member Name="LoadAnims():System.Void">
5910 <Messages>
5911 <Message Id="Anims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5912 <Issue Name="Member">
5913 <Item>Anims</Item>
5914 <Item>AvatarAnimations.LoadAnims():Void</Item>
5915 </Issue>
5916 </Message>
5917 </Messages>
5918 </Member>
5919 </Members>
5920 </Type>
5921 <Type Name="Entity">
5922 <Members>
5923 <Member Name=".ctor()">
5924 <Messages>
5925 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
5926 <Issue>
5927 <Item>Entity.Entity()</Item>
5928 <Item>localid</Item>
5929 <Item>System.UInt32</Item>
5930 <Item>0</Item>
5931 </Issue>
5932 </Message>
5933 </Messages>
5934 </Member>
5935 <Member Name="addForces():System.Void">
5936 <Messages>
5937 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5938 <Issue Name="Member">
5939 <Item>addForces</Item>
5940 </Issue>
5941 </Message>
5942 </Messages>
5943 </Member>
5944 <Member Name="BackUp():System.Void">
5945 <Messages>
5946 <Message Id="BackUp" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2007-03-27 04:29:04Z">
5947 <Issue Name="ShouldBeDiscreteTerm">
5948 <Item>BackUp</Item>
5949 <Item>method</Item>
5950 <Item>BackUp</Item>
5951 <Item>Backup</Item>
5952 </Issue>
5953 </Message>
5954 </Messages>
5955 </Member>
5956 <Member Name="children">
5957 <Messages>
5958 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5959 <Issue>
5960 <Item>children</Item>
5961 </Issue>
5962 </Message>
5963 <Message TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002" Created="2007-03-27 04:29:04Z">
5964 <Issue>
5965 <Item>System.Collections.Generic.List`1&lt;OpenSim.world.Entity&gt;</Item>
5966 <Item>Entity.children</Item>
5967 </Issue>
5968 </Message>
5969 </Messages>
5970 </Member>
5971 <Member Name="getMesh():OpenSim.types.Mesh">
5972 <Messages>
5973 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5974 <Issue Name="Member">
5975 <Item>getMesh</Item>
5976 </Issue>
5977 </Message>
5978 </Messages>
5979 </Member>
5980 <Member Name="getName():System.String">
5981 <Messages>
5982 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
5983 <Issue Name="Member">
5984 <Item>getName</Item>
5985 </Issue>
5986 </Message>
5987 </Messages>
5988 </Member>
5989 <Member Name="localid">
5990 <Messages>
5991 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
5992 <Issue>
5993 <Item>localid</Item>
5994 </Issue>
5995 </Message>
5996 <Message Id="localid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
5997 <Issue Name="Member">
5998 <Item>localid</Item>
5999 <Item>Entity.localid</Item>
6000 </Issue>
6001 </Message>
6002 </Messages>
6003 </Member>
6004 <Member Name="name">
6005 <Messages>
6006 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6007 <Issue>
6008 <Item>name</Item>
6009 </Issue>
6010 </Message>
6011 </Messages>
6012 </Member>
6013 <Member Name="position">
6014 <Messages>
6015 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6016 <Issue>
6017 <Item>position</Item>
6018 </Issue>
6019 </Message>
6020 </Messages>
6021 </Member>
6022 <Member Name="rotation">
6023 <Messages>
6024 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6025 <Issue>
6026 <Item>rotation</Item>
6027 </Issue>
6028 </Message>
6029 </Messages>
6030 </Member>
6031 <Member Name="update():System.Void">
6032 <Messages>
6033 <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6034 <Issue Name="Member">
6035 <Item>update</Item>
6036 </Issue>
6037 </Message>
6038 </Messages>
6039 </Member>
6040 <Member Name="uuid">
6041 <Messages>
6042 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6043 <Issue>
6044 <Item>uuid</Item>
6045 </Issue>
6046 </Message>
6047 <Message Id="uuid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6048 <Issue Name="Member">
6049 <Item>uuid</Item>
6050 <Item>Entity.uuid</Item>
6051 </Issue>
6052 </Message>
6053 </Messages>
6054 </Member>
6055 <Member Name="velocity">
6056 <Messages>
6057 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6058 <Issue>
6059 <Item>velocity</Item>
6060 </Issue>
6061 </Message>
6062 </Messages>
6063 </Member>
6064 </Members>
6065 </Type>
6066 <Type Name="NewForce">
6067 <Members>
6068 <Member Name="X">
6069 <Messages>
6070 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6071 <Issue>
6072 <Item>X</Item>
6073 </Issue>
6074 </Message>
6075 <Message Id="X" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6076 <Issue Name="MemberOneLetter">
6077 <Item>X</Item>
6078 <Item>NewForce.X</Item>
6079 </Issue>
6080 </Message>
6081 </Messages>
6082 </Member>
6083 <Member Name="Y">
6084 <Messages>
6085 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6086 <Issue>
6087 <Item>Y</Item>
6088 </Issue>
6089 </Message>
6090 <Message Id="Y" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6091 <Issue Name="MemberOneLetter">
6092 <Item>Y</Item>
6093 <Item>NewForce.Y</Item>
6094 </Issue>
6095 </Message>
6096 </Messages>
6097 </Member>
6098 <Member Name="Z">
6099 <Messages>
6100 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6101 <Issue>
6102 <Item>Z</Item>
6103 </Issue>
6104 </Message>
6105 <Message Id="Z" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6106 <Issue Name="MemberOneLetter">
6107 <Item>Z</Item>
6108 <Item>NewForce.Z</Item>
6109 </Issue>
6110 </Message>
6111 </Messages>
6112 </Member>
6113 </Members>
6114 </Type>
6115 <Type Name="Primitive">
6116 <Messages>
6117 <Message TypeName="IdentifiersShouldDifferByMoreThanCase" Category="Microsoft.Naming" CheckId="CA1708" Created="2007-03-27 04:29:04Z">
6118 <Issue Name="Member">
6119 <Item>'UpdateFlag'</Item>
6120 <Item>updateFlag</Item>
6121 </Issue>
6122 </Message>
6123 </Messages>
6124 <Members>
6125 <Member Name=".ctor()">
6126 <Messages>
6127 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
6128 <Issue>
6129 <Item>Primitive.Primitive()</Item>
6130 <Item>dirtyFlag</Item>
6131 <Item>System.Boolean</Item>
6132 <Item>false</Item>
6133 </Issue>
6134 <Issue>
6135 <Item>Primitive.Primitive()</Item>
6136 <Item>mesh_cutbegin</Item>
6137 <Item>System.Single</Item>
6138 <Item>0.0</Item>
6139 </Issue>
6140 <Issue>
6141 <Item>Primitive.Primitive()</Item>
6142 <Item>newPrimFlag</Item>
6143 <Item>System.Boolean</Item>
6144 <Item>false</Item>
6145 </Issue>
6146 <Issue>
6147 <Item>Primitive.Primitive()</Item>
6148 <Item>physicsEnabled</Item>
6149 <Item>System.Boolean</Item>
6150 <Item>false</Item>
6151 </Issue>
6152 <Issue>
6153 <Item>Primitive.Primitive()</Item>
6154 <Item>physicstest</Item>
6155 <Item>System.Boolean</Item>
6156 <Item>false</Item>
6157 </Issue>
6158 <Issue>
6159 <Item>Primitive.Primitive()</Item>
6160 <Item>updateFlag</Item>
6161 <Item>System.Boolean</Item>
6162 <Item>false</Item>
6163 </Issue>
6164 </Message>
6165 </Messages>
6166 </Member>
6167 <Member Name="CreateFromPacket(libsecondlife.Packets.ObjectAddPacket,libsecondlife.LLUUID,System.UInt32):System.Void">
6168 <Messages>
6169 <Message Id="localID-702000" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2007-03-27 04:29:04Z">
6170 <Issue>
6171 <Item>localID-702000</Item>
6172 <Item>Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void</Item>
6173 </Issue>
6174 </Message>
6175 <Message Id="1#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
6176 <Issue Name="ParameterId">
6177 <Item>ID</Item>
6178 <Item>agentID</Item>
6179 <Item>Id</Item>
6180 </Issue>
6181 </Message>
6182 <Message Id="2#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
6183 <Issue Name="ParameterId">
6184 <Item>ID</Item>
6185 <Item>localID</Item>
6186 <Item>Id</Item>
6187 </Issue>
6188 </Message>
6189 <Message Id="System.UInt32.ToString(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2007-03-27 04:29:04Z">
6190 <Issue>
6191 <Item>Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void</Item>
6192 <Item>System.UInt32.ToString(System.String)</Item>
6193 <Item>System.UInt32.ToString(System.String,System.IFormatProvider)</Item>
6194 </Issue>
6195 </Message>
6196 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6197 <Issue>
6198 <Item>'addPacket'</Item>
6199 <Item>Primitive.CreateFromPacket(ObjectAddPacket, LLUUID, UInt32):Void</Item>
6200 </Issue>
6201 </Message>
6202 </Messages>
6203 </Member>
6204 <Member Name="CreateFromStorage(OpenSim.Framework.Assets.PrimData):System.Void">
6205 <Messages>
6206 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6207 <Issue>
6208 <Item>'store'</Item>
6209 <Item>Primitive.CreateFromStorage(PrimData):Void</Item>
6210 </Issue>
6211 </Message>
6212 </Messages>
6213 </Member>
6214 <Member Name="dirtyFlag">
6215 <Messages>
6216 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6217 <Issue>
6218 <Item>dirtyFlag</Item>
6219 </Issue>
6220 </Message>
6221 </Messages>
6222 </Member>
6223 <Member Name="mesh_cutbegin">
6224 <Messages>
6225 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6226 <Issue>
6227 <Item>mesh_cutbegin</Item>
6228 </Issue>
6229 </Message>
6230 <Message Id="cutbegin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6231 <Issue Name="Member">
6232 <Item>cutbegin</Item>
6233 <Item>Primitive.mesh_cutbegin</Item>
6234 </Issue>
6235 </Message>
6236 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
6237 <Issue Name="Member">
6238 <Item>mesh_cutbegin</Item>
6239 </Issue>
6240 </Message>
6241 </Messages>
6242 </Member>
6243 <Member Name="mesh_cutend">
6244 <Messages>
6245 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6246 <Issue>
6247 <Item>mesh_cutend</Item>
6248 </Issue>
6249 </Message>
6250 <Message Id="cutend" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6251 <Issue Name="Member">
6252 <Item>cutend</Item>
6253 <Item>Primitive.mesh_cutend</Item>
6254 </Issue>
6255 </Message>
6256 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
6257 <Issue Name="Member">
6258 <Item>mesh_cutend</Item>
6259 </Issue>
6260 </Message>
6261 </Messages>
6262 </Member>
6263 <Member Name="newPrimFlag">
6264 <Messages>
6265 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6266 <Issue>
6267 <Item>newPrimFlag</Item>
6268 </Issue>
6269 </Message>
6270 </Messages>
6271 </Member>
6272 <Member Name="PhysActor">
6273 <Messages>
6274 <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2007-03-27 04:29:04Z">
6275 <Issue>
6276 <Item>PhysActor</Item>
6277 </Issue>
6278 </Message>
6279 </Messages>
6280 </Member>
6281 <Member Name="primData">
6282 <Messages>
6283 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6284 <Issue>
6285 <Item>primData</Item>
6286 </Issue>
6287 </Message>
6288 </Messages>
6289 </Member>
6290 <Member Name="UpdateClient(OpenSim.SimClient):System.Void">
6291 <Messages>
6292 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6293 <Issue Name="Parameter">
6294 <Item>RemoteClient</Item>
6295 </Issue>
6296 </Message>
6297 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6298 <Issue>
6299 <Item>'RemoteClient'</Item>
6300 <Item>Primitive.UpdateClient(SimClient):Void</Item>
6301 </Issue>
6302 </Message>
6303 </Messages>
6304 </Member>
6305 <Member Name="updateFlag">
6306 <Messages>
6307 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6308 <Issue>
6309 <Item>updateFlag</Item>
6310 </Issue>
6311 </Message>
6312 </Messages>
6313 </Member>
6314 <Member Name="UpdateObjectFlags(libsecondlife.Packets.ObjectFlagUpdatePacket):System.Void">
6315 <Messages>
6316 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6317 <Issue>
6318 <Item>'pack'</Item>
6319 <Item>Primitive.UpdateObjectFlags(ObjectFlagUpdatePacket):Void</Item>
6320 </Issue>
6321 </Message>
6322 </Messages>
6323 </Member>
6324 <Member Name="UpdateShape(libsecondlife.Packets.ObjectShapePacket+ObjectDataBlock):System.Void">
6325 <Messages>
6326 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6327 <Issue>
6328 <Item>'addPacket'</Item>
6329 <Item>Primitive.UpdateShape(ObjectDataBlock):Void</Item>
6330 </Issue>
6331 </Message>
6332 </Messages>
6333 </Member>
6334 </Members>
6335 </Type>
6336 <Type Name="ScriptEngine">
6337 <Members>
6338 <Member Name=".ctor(OpenSim.world.World)">
6339 <Messages>
6340 <Message Id="0#env" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6341 <Issue Name="Parameter">
6342 <Item>ScriptEngine.ScriptEngine(World)</Item>
6343 <Item>env</Item>
6344 <Item>env</Item>
6345 </Issue>
6346 </Message>
6347 <Message Id="env" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
6348 <Issue>
6349 <Item>env</Item>
6350 <Item>ScriptEngine.ScriptEngine(World)</Item>
6351 </Issue>
6352 </Message>
6353 </Messages>
6354 </Member>
6355 <Member Name="LoadScript():System.Void">
6356 <Messages>
6357 <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
6358 <Issue>
6359 <Item>ScriptEngine.LoadScript():Void</Item>
6360 </Issue>
6361 </Message>
6362 </Messages>
6363 </Member>
6364 </Members>
6365 </Type>
6366 <Type Name="SurfacePatch">
6367 <Members>
6368 <Member Name="HeightMap">
6369 <Messages>
6370 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6371 <Issue>
6372 <Item>HeightMap</Item>
6373 </Issue>
6374 </Message>
6375 </Messages>
6376 </Member>
6377 </Members>
6378 </Type>
6379 <Type Name="World">
6380 <Messages>
6381 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
6382 <Issue>
6383 <Item>World</Item>
6384 <Item>OpenSim.world</Item>
6385 </Issue>
6386 </Message>
6387 </Messages>
6388 <Members>
6389 <Member Name=".ctor()">
6390 <Messages>
6391 <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2007-03-27 04:29:04Z">
6392 <Issue>
6393 <Item>World.World()</Item>
6394 <Item>_localNumber</Item>
6395 <Item>System.UInt32</Item>
6396 <Item>0</Item>
6397 </Issue>
6398 </Message>
6399 </Messages>
6400 </Member>
6401 <Member Name="_localNumber">
6402 <Messages>
6403 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6404 <Issue>
6405 <Item>_localNumber</Item>
6406 </Issue>
6407 </Message>
6408 <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2007-03-27 04:29:04Z">
6409 <Issue Name="Member">
6410 <Item>_localNumber</Item>
6411 </Issue>
6412 </Message>
6413 </Messages>
6414 </Member>
6415 <Member Name="AddNewPrim(libsecondlife.Packets.ObjectAddPacket,OpenSim.SimClient):System.Void">
6416 <Messages>
6417 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6418 <Issue Name="Parameter">
6419 <Item>AgentClient</Item>
6420 </Issue>
6421 </Message>
6422 </Messages>
6423 </Member>
6424 <Member Name="AddViewerAgent(OpenSim.SimClient):System.Void">
6425 <Messages>
6426 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6427 <Issue Name="Parameter">
6428 <Item>AgentClient</Item>
6429 </Issue>
6430 </Message>
6431 </Messages>
6432 </Member>
6433 <Member Name="DeRezObject(libsecondlife.Packets.DeRezObjectPacket,OpenSim.SimClient):System.Void">
6434 <Messages>
6435 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6436 <Issue Name="Parameter">
6437 <Item>DeRezPacket</Item>
6438 </Issue>
6439 </Message>
6440 <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6441 <Issue Name="Parameter">
6442 <Item>AgentClient</Item>
6443 </Issue>
6444 </Message>
6445 <Message Id="0#Rez" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6446 <Issue Name="Parameter">
6447 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item>
6448 <Item>Rez</Item>
6449 <Item>DeRezPacket</Item>
6450 </Issue>
6451 </Message>
6452 <Message Id="Rez" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6453 <Issue Name="Member">
6454 <Item>Rez</Item>
6455 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item>
6456 </Issue>
6457 </Message>
6458 <Message Id="AgentClient" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
6459 <Issue>
6460 <Item>AgentClient</Item>
6461 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item>
6462 </Issue>
6463 </Message>
6464 <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2007-03-27 04:29:04Z">
6465 <Issue Name="Member">
6466 <Item>De</Item>
6467 <Item>World.DeRezObject(DeRezObjectPacket, SimClient):Void</Item>
6468 </Issue>
6469 </Message>
6470 </Messages>
6471 </Member>
6472 <Member Name="Entities">
6473 <Messages>
6474 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6475 <Issue>
6476 <Item>Entities</Item>
6477 </Issue>
6478 </Message>
6479 </Messages>
6480 </Member>
6481 <Member Name="GetInitialPrims(OpenSim.SimClient):System.Void">
6482 <Messages>
6483 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6484 <Issue Name="Parameter">
6485 <Item>RemoteClient</Item>
6486 </Issue>
6487 </Message>
6488 <Message Id="Prims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6489 <Issue Name="Member">
6490 <Item>Prims</Item>
6491 <Item>World.GetInitialPrims(SimClient):Void</Item>
6492 </Issue>
6493 </Message>
6494 </Messages>
6495 </Member>
6496 <Member Name="LandMap">
6497 <Messages>
6498 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6499 <Issue>
6500 <Item>LandMap</Item>
6501 </Issue>
6502 </Message>
6503 </Messages>
6504 </Member>
6505 <Member Name="LoadPrimsFromStorage():System.Void">
6506 <Messages>
6507 <Message Id="Prims" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6508 <Issue Name="Member">
6509 <Item>Prims</Item>
6510 <Item>World.LoadPrimsFromStorage():Void</Item>
6511 </Issue>
6512 </Message>
6513 </Messages>
6514 </Member>
6515 <Member Name="LoadStorageDLL(System.String):System.Boolean">
6516 <Messages>
6517 <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
6518 <Issue Name="Member">
6519 <Item>World.LoadStorageDLL(String):Boolean</Item>
6520 </Issue>
6521 </Message>
6522 </Messages>
6523 </Member>
6524 <Member Name="localStorage">
6525 <Messages>
6526 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6527 <Issue>
6528 <Item>localStorage</Item>
6529 </Issue>
6530 </Message>
6531 </Messages>
6532 </Member>
6533 <Member Name="Rand">
6534 <Messages>
6535 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6536 <Issue>
6537 <Item>World.Rand</Item>
6538 </Issue>
6539 </Message>
6540 </Messages>
6541 </Member>
6542 <Member Name="Scripts">
6543 <Messages>
6544 <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2007-03-27 04:29:04Z">
6545 <Issue>
6546 <Item>Scripts</Item>
6547 </Issue>
6548 </Message>
6549 </Messages>
6550 </Member>
6551 <Member Name="SendLayerData(OpenSim.SimClient):System.Void">
6552 <Messages>
6553 <Message Id="0#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2007-03-27 04:29:04Z">
6554 <Issue Name="Parameter">
6555 <Item>RemoteClient</Item>
6556 </Issue>
6557 </Message>
6558 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6559 <Issue>
6560 <Item>'RemoteClient'</Item>
6561 <Item>World.SendLayerData(SimClient):Void</Item>
6562 </Issue>
6563 <Issue>
6564 <Item>'RemoteClient'</Item>
6565 <Item>World.SendLayerData(SimClient):Void</Item>
6566 </Issue>
6567 <Issue>
6568 <Item>'RemoteClient'</Item>
6569 <Item>World.SendLayerData(SimClient):Void</Item>
6570 </Issue>
6571 </Message>
6572 </Messages>
6573 </Member>
6574 </Members>
6575 </Type>
6576 </Types>
6577 </Namespace>
6578 <Namespace Name="OpenSim.world.scripting">
6579 <Types>
6580 <Type Name="IScriptHost">
6581 <Members>
6582 <Member Name="Register(OpenSim.world.scripting.IScript):System.Boolean">
6583 <Messages>
6584 <Message Id="0#iscript" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6585 <Issue Name="Parameter">
6586 <Item>IScriptHost.Register(IScript):Boolean</Item>
6587 <Item>iscript</Item>
6588 <Item>iscript</Item>
6589 </Issue>
6590 </Message>
6591 </Messages>
6592 </Member>
6593 </Members>
6594 </Type>
6595 </Types>
6596 </Namespace>
6597 </Namespaces>
6598 </Module>
6599 </Modules>
6600 </Target>
6601 <Target Name="$(ProjectDir)/bin/OpenSim.Storage.LocalStorageDb4o.dll">
6602 <Modules>
6603 <Module Name="opensim.storage.localstoragedb4o.dll">
6604 <Messages>
6605 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
6606 <Issue>
6607 <Item>OpenSim.Storage.LocalStorageDb4o</Item>
6608 </Issue>
6609 </Message>
6610 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
6611 <Issue Name="NoStrongName">
6612 <Item>OpenSim.Storage.LocalStorageDb4o</Item>
6613 </Issue>
6614 </Message>
6615 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
6616 <Issue Name="NoAttr">
6617 <Item>OpenSim.Storage.LocalStorageDb4o</Item>
6618 </Issue>
6619 </Message>
6620 </Messages>
6621 <Namespaces>
6622 <Namespace Name="OpenSim.Storage.LocalStorageDb4o">
6623 <Types>
6624 <Type Name="Db4LocalStorage">
6625 <Members>
6626 <Member Name=".ctor()">
6627 <Messages>
6628 <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2007-03-27 04:29:04Z">
6629 <Issue>
6630 <Item>Db4LocalStorage.Db4LocalStorage()</Item>
6631 <Item>System.Exception</Item>
6632 </Issue>
6633 </Message>
6634 </Messages>
6635 </Member>
6636 <Member Name="LoadPrimitives(OpenSim.Framework.Interfaces.ILocalStorageReceiver):System.Void">
6637 <Messages>
6638 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6639 <Issue>
6640 <Item>'receiver'</Item>
6641 <Item>Db4LocalStorage.LoadPrimitives(ILocalStorageReceiver):Void</Item>
6642 </Issue>
6643 </Message>
6644 </Messages>
6645 </Member>
6646 <Member Name="StorePrim(OpenSim.Framework.Assets.PrimData):System.Void">
6647 <Messages>
6648 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6649 <Issue>
6650 <Item>'prim'</Item>
6651 <Item>Db4LocalStorage.StorePrim(PrimData):Void</Item>
6652 </Issue>
6653 </Message>
6654 </Messages>
6655 </Member>
6656 </Members>
6657 </Type>
6658 <Type Name="UUIDQuery">
6659 <Messages>
6660 <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2007-03-27 04:29:04Z">
6661 <Issue Name="Type">
6662 <Item>UUIDQuery</Item>
6663 </Issue>
6664 </Message>
6665 </Messages>
6666 <Members>
6667 <Member Name="Match(OpenSim.Framework.Assets.PrimData):System.Boolean">
6668 <Messages>
6669 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6670 <Issue>
6671 <Item>'prim'</Item>
6672 <Item>UUIDQuery.Match(PrimData):Boolean</Item>
6673 </Issue>
6674 </Message>
6675 </Messages>
6676 </Member>
6677 </Members>
6678 </Type>
6679 </Types>
6680 </Namespace>
6681 </Namespaces>
6682 </Module>
6683 </Modules>
6684 </Target>
6685 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.BasicPhysicsPlugin.dll">
6686 <Modules>
6687 <Module Name="opensim.physics.basicphysicsplugin.dll">
6688 <Messages>
6689 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Status="Excluded" Created="2007-03-27 04:29:04Z">
6690 <Issue>
6691 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
6692 </Issue>
6693 <Notes>
6694 <User Name="Stefan">
6695 <Note Id="2" />
6696 </User>
6697 </Notes>
6698 </Message>
6699 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Status="Excluded" Created="2007-03-27 04:29:04Z">
6700 <Issue Name="NoStrongName">
6701 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
6702 </Issue>
6703 <Notes>
6704 <User Name="Stefan">
6705 <Note Id="0" />
6706 </User>
6707 </Notes>
6708 </Message>
6709 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Status="Excluded" Created="2007-03-27 04:29:04Z">
6710 <Issue Name="NoAttr">
6711 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
6712 </Issue>
6713 <Notes>
6714 <User Name="Stefan">
6715 <Note Id="1" />
6716 </User>
6717 </Notes>
6718 </Message>
6719 </Messages>
6720 <Namespaces>
6721 <Namespace Name="OpenSim.Physics.BasicPhysicsPlugin">
6722 <Types>
6723 <Type Name="BasicActor">
6724 <Members>
6725 <Member Name="flying">
6726 <Messages>
6727 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6728 <Issue>
6729 <Item>BasicActor.flying</Item>
6730 </Issue>
6731 </Message>
6732 </Messages>
6733 </Member>
6734 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
6735 <Messages>
6736 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6737 <Issue Name="Parameter">
6738 <Item>BasicActor.SetAcceleration(PhysicsVector):Void</Item>
6739 <Item>accel</Item>
6740 <Item>accel</Item>
6741 </Issue>
6742 </Message>
6743 </Messages>
6744 </Member>
6745 </Members>
6746 </Type>
6747 <Type Name="BasicPhysicsPlugin">
6748 <Messages>
6749 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6750 <Issue Name="Type">
6751 <Item>Plugin</Item>
6752 <Item>OpenSim.Physics.BasicPhysicsPlugin.BasicPhysicsPlugin</Item>
6753 </Issue>
6754 </Message>
6755 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
6756 <Issue>
6757 <Item>BasicPhysicsPlugin</Item>
6758 <Item>OpenSim.Physics.BasicPhysicsPlugin</Item>
6759 </Issue>
6760 </Message>
6761 </Messages>
6762 </Type>
6763 </Types>
6764 </Namespace>
6765 </Namespaces>
6766 </Module>
6767 </Modules>
6768 </Target>
6769 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.OdePlugin.dll">
6770 <Modules>
6771 <Module Name="opensim.physics.odeplugin.dll">
6772 <Messages>
6773 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
6774 <Issue>
6775 <Item>OpenSim.Physics.OdePlugin</Item>
6776 </Issue>
6777 </Message>
6778 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
6779 <Issue Name="NoStrongName">
6780 <Item>OpenSim.Physics.OdePlugin</Item>
6781 </Issue>
6782 </Message>
6783 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
6784 <Issue Name="NoAttr">
6785 <Item>OpenSim.Physics.OdePlugin</Item>
6786 </Issue>
6787 </Message>
6788 </Messages>
6789 <Namespaces>
6790 <Namespace Name="OpenSim.Physics.OdePlugin">
6791 <Types>
6792 <Type Name="OdeCharacter">
6793 <Messages>
6794 <Message TypeName="TypesThatOwnNativeResourcesShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1049" Created="2007-03-27 04:29:04Z">
6795 <Issue>
6796 <Item>OdeCharacter</Item>
6797 </Issue>
6798 </Message>
6799 </Messages>
6800 <Members>
6801 <Member Name=".ctor(OpenSim.Physics.OdePlugin.OdeScene,OpenSim.Physics.Manager.PhysicsVector)">
6802 <Messages>
6803 <Message Id="parent_scene" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2007-03-27 04:29:04Z" FixCategory="Breaking">
6804 <Issue>
6805 <Item>parent_scene</Item>
6806 <Item>OdeCharacter.OdeCharacter(OdeScene, PhysicsVector)</Item>
6807 </Issue>
6808 </Message>
6809 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6810 <Issue>
6811 <Item>'pos'</Item>
6812 <Item>OdeCharacter.OdeCharacter(OdeScene, PhysicsVector)</Item>
6813 </Issue>
6814 </Message>
6815 </Messages>
6816 </Member>
6817 <Member Name="capsule_geom">
6818 <Messages>
6819 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6820 <Issue>
6821 <Item>OdeCharacter.capsule_geom</Item>
6822 </Issue>
6823 </Message>
6824 </Messages>
6825 </Member>
6826 <Member Name="gravityAccel">
6827 <Messages>
6828 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6829 <Issue>
6830 <Item>OdeCharacter.gravityAccel</Item>
6831 </Issue>
6832 </Message>
6833 </Messages>
6834 </Member>
6835 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
6836 <Messages>
6837 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6838 <Issue Name="Parameter">
6839 <Item>OdeCharacter.SetAcceleration(PhysicsVector):Void</Item>
6840 <Item>accel</Item>
6841 <Item>accel</Item>
6842 </Issue>
6843 </Message>
6844 </Messages>
6845 </Member>
6846 </Members>
6847 </Type>
6848 <Type Name="OdePlugin">
6849 <Messages>
6850 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6851 <Issue Name="Type">
6852 <Item>Plugin</Item>
6853 <Item>OpenSim.Physics.OdePlugin.OdePlugin</Item>
6854 </Issue>
6855 </Message>
6856 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
6857 <Issue>
6858 <Item>OdePlugin</Item>
6859 <Item>OpenSim.Physics.OdePlugin</Item>
6860 </Issue>
6861 </Message>
6862 </Messages>
6863 </Type>
6864 <Type Name="OdePrim">
6865 <Members>
6866 <Member Name="_position">
6867 <Messages>
6868 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6869 <Issue>
6870 <Item>OdePrim._position</Item>
6871 </Issue>
6872 </Message>
6873 </Messages>
6874 </Member>
6875 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
6876 <Messages>
6877 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
6878 <Issue Name="Parameter">
6879 <Item>OdePrim.SetAcceleration(PhysicsVector):Void</Item>
6880 <Item>accel</Item>
6881 <Item>accel</Item>
6882 </Issue>
6883 </Message>
6884 </Messages>
6885 </Member>
6886 </Members>
6887 </Type>
6888 <Type Name="OdeScene">
6889 <Members>
6890 <Member Name="AddPrim(OpenSim.Physics.Manager.PhysicsVector,OpenSim.Physics.Manager.PhysicsVector):OpenSim.Physics.Manager.PhysicsActor">
6891 <Messages>
6892 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6893 <Issue>
6894 <Item>'position'</Item>
6895 <Item>OdeScene.AddPrim(PhysicsVector, PhysicsVector):PhysicsActor</Item>
6896 </Issue>
6897 <Issue>
6898 <Item>'size'</Item>
6899 <Item>OdeScene.AddPrim(PhysicsVector, PhysicsVector):PhysicsActor</Item>
6900 </Issue>
6901 </Message>
6902 </Messages>
6903 </Member>
6904 <Member Name="Land">
6905 <Messages>
6906 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6907 <Issue>
6908 <Item>OdeScene.Land</Item>
6909 </Issue>
6910 </Message>
6911 </Messages>
6912 </Member>
6913 <Member Name="LandGeom">
6914 <Messages>
6915 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
6916 <Issue>
6917 <Item>OdeScene.LandGeom</Item>
6918 </Issue>
6919 </Message>
6920 </Messages>
6921 </Member>
6922 <Member Name="SetTerrain(System.Single[]):System.Void">
6923 <Messages>
6924 <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2007-03-27 04:29:04Z">
6925 <Issue>
6926 <Item>'heightMap'</Item>
6927 <Item>OdeScene.SetTerrain(Single[]):Void</Item>
6928 </Issue>
6929 <Issue>
6930 <Item>'heightMap'</Item>
6931 <Item>OdeScene.SetTerrain(Single[]):Void</Item>
6932 </Issue>
6933 </Message>
6934 </Messages>
6935 </Member>
6936 <Member Name="space">
6937 <Messages>
6938 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
6939 <Issue>
6940 <Item>space</Item>
6941 </Issue>
6942 </Message>
6943 <Message TypeName="PointersShouldNotBeVisible" Category="Microsoft.Security" CheckId="CA2111" Created="2007-03-27 04:29:04Z">
6944 <Issue>
6945 <Item>space</Item>
6946 </Issue>
6947 </Message>
6948 </Messages>
6949 </Member>
6950 <Member Name="world">
6951 <Messages>
6952 <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2007-03-27 04:29:04Z">
6953 <Issue>
6954 <Item>world</Item>
6955 </Issue>
6956 </Message>
6957 <Message TypeName="PointersShouldNotBeVisible" Category="Microsoft.Security" CheckId="CA2111" Created="2007-03-27 04:29:04Z">
6958 <Issue>
6959 <Item>world</Item>
6960 </Issue>
6961 </Message>
6962 </Messages>
6963 </Member>
6964 </Members>
6965 </Type>
6966 </Types>
6967 </Namespace>
6968 </Namespaces>
6969 </Module>
6970 </Modules>
6971 </Target>
6972 <Target Name="$(ProjectDir)/bin/Physics/OpenSim.Physics.PhysXPlugin.dll">
6973 <Modules>
6974 <Module Name="opensim.physics.physxplugin.dll">
6975 <Messages>
6976 <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2007-03-27 04:29:04Z">
6977 <Issue>
6978 <Item>OpenSim.Physics.PhysXPlugin</Item>
6979 </Issue>
6980 </Message>
6981 <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2007-03-27 04:29:04Z">
6982 <Issue Name="NoStrongName">
6983 <Item>OpenSim.Physics.PhysXPlugin</Item>
6984 </Issue>
6985 </Message>
6986 <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2007-03-27 04:29:04Z">
6987 <Issue Name="NoAttr">
6988 <Item>OpenSim.Physics.PhysXPlugin</Item>
6989 </Issue>
6990 </Message>
6991 </Messages>
6992 <Namespaces>
6993 <Namespace Name="OpenSim.Physics.PhysXPlugin">
6994 <Types>
6995 <Type Name="PhysXCharacter">
6996 <Members>
6997 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
6998 <Messages>
6999 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
7000 <Issue Name="Parameter">
7001 <Item>PhysXCharacter.SetAcceleration(PhysicsVector):Void</Item>
7002 <Item>accel</Item>
7003 <Item>accel</Item>
7004 </Issue>
7005 </Message>
7006 </Messages>
7007 </Member>
7008 </Members>
7009 </Type>
7010 <Type Name="PhysXPlugin">
7011 <Messages>
7012 <Message Id="Plugin" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
7013 <Issue Name="Type">
7014 <Item>Plugin</Item>
7015 <Item>OpenSim.Physics.PhysXPlugin.PhysXPlugin</Item>
7016 </Issue>
7017 </Message>
7018 <Message TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724" Created="2007-03-27 04:29:04Z">
7019 <Issue>
7020 <Item>PhysXPlugin</Item>
7021 <Item>OpenSim.Physics.PhysXPlugin</Item>
7022 </Issue>
7023 </Message>
7024 </Messages>
7025 </Type>
7026 <Type Name="PhysXPrim">
7027 <Members>
7028 <Member Name="_position">
7029 <Messages>
7030 <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2007-03-27 04:29:04Z">
7031 <Issue>
7032 <Item>PhysXPrim._position</Item>
7033 </Issue>
7034 </Message>
7035 </Messages>
7036 </Member>
7037 <Member Name="SetAcceleration(OpenSim.Physics.Manager.PhysicsVector):System.Void">
7038 <Messages>
7039 <Message Id="0#accel" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2007-03-27 04:29:04Z">
7040 <Issue Name="Parameter">
7041 <Item>PhysXPrim.SetAcceleration(PhysicsVector):Void</Item>
7042 <Item>accel</Item>
7043 <Item>accel</Item>
7044 </Issue>
7045 </Message>
7046 </Messages>
7047 </Member>
7048 </Members>
7049 </Type>
7050 </Types>
7051 </Namespace>
7052 </Namespaces>
7053 </Module>
7054 </Modules>
7055 </Target>
7056 </Targets>
7057 <Notes>
7058 <User Name="Stefan">
7059 <Note Id="0" Modified="2007-03-27 04:30:24Z">Save it for a rainy day.</Note>
7060 <Note Id="1" Modified="2007-03-27 04:30:31Z">Save it for a rainy day.</Note>
7061 <Note Id="2" Modified="2007-03-27 04:30:38Z">Save it for a rainy day.</Note>
7062 </User>
7063 </Notes>
7064 <Rules>
7065 <Rule TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209">
7066 <Resolution Name="Default">No valid permission requests were found for assembly '{0}'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum.</Resolution>
7067 </Rule>
7068 <Rule TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210">
7069 <Resolution Name="NoStrongName">Sign '{0}' with a strong name key.</Resolution>
7070 </Rule>
7071 <Rule TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020">
7072 <Resolution Name="Default">Consider merging the types defined in '{0}' with another namespace.</Resolution>
7073 </Rule>
7074 <Rule TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823">
7075 <Resolution Name="Default">It appears that field '{0}' is never used or is only ever assigned to. Use this field or remove it.</Resolution>
7076 </Rule>
7077 <Rule TypeName="CollectionPropertiesShouldBeReadOnly" Category="Microsoft.Usage" CheckId="CA2227">
7078 <Resolution Name="Default">Change '{0}' to be read-only by removing the property setter.</Resolution>
7079 </Rule>
7080 <Rule TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702">
7081 <Resolution Name="ShouldBeDiscreteTerm">The compound word '{0}' in {1} '{2}' exists as a discrete term. If your usage is intended to be single word, case it as '{3}'.</Resolution>
7082 </Rule>
7083 <Rule TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405">
7084 <Resolution Name="Default">'{0}' is marked ComVisible(true) but has the following ComVisible(false) types in its object hierarchy: {1}</Resolution>
7085 </Rule>
7086 <Rule TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011">
7087 <Resolution Name="Default">Consider changing the type of parameter '{0}' in {1} from {2} to its base type {3}. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature.</Resolution>
7088 </Rule>
7089 <Rule TypeName="DoNotCallOverridableMethodsInConstructors" Category="Microsoft.Usage" CheckId="CA2214">
7090 <Resolution Name="Default">'{0}' contains a call chain that results in a call to a virtual method defined by the class. Review the following call stack for unintended consequences: {1}</Resolution>
7091 </Rule>
7092 <Rule TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031">
7093 <Resolution Name="Default">Modify '{0}' to catch a more specific exception than '{1}' or rethrow the exception.</Resolution>
7094 </Rule>
7095 <Rule TypeName="DoNotDeclareReadOnlyMutableReferenceTypes" Category="Microsoft.Security" CheckId="CA2104">
7096 <Resolution Name="Default">Remove the readonly declaration from '{0}' or change the field to one that is an immutable reference type. If the reference type '{1}' is, in fact, immutable, exclude this message.</Resolution>
7097 </Rule>
7098 <Rule TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051">
7099 <Resolution Name="Default">Make '{0}' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it.</Resolution>
7100 </Rule>
7101 <Rule TypeName="DoNotExposeGenericLists" Category="Microsoft.Design" CheckId="CA1002">
7102 <Resolution Name="Default">Change '{0}' in {1} to use Collection&lt;T&gt;, ReadOnlyCollection&lt;T&gt; or KeyedCollection&lt;K,V&gt;</Resolution>
7103 </Rule>
7104 <Rule TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805">
7105 <Resolution Name="Default">{0} initializes field {1} of type {2} to {3}. Remove this initialization as it will be done automatically by the runtime.</Resolution>
7106 </Rule>
7107 <Rule TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303">
7108 <Resolution Name="Default">{0} passes a literal as parameter {1} of a call to {2}. Retrieve the following string argument from a resource table instead: '{3}'</Resolution>
7109 </Rule>
7110 <Rule TypeName="DoNotPassTypesByReference" Category="Microsoft.Design" CheckId="CA1045">
7111 <Resolution Name="Default">Consider a design that does not require that '{0}' be a reference parameter.</Resolution>
7112 </Rule>
7113 <Rule TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201">
7114 <Resolution Name="TooGeneric">{0} creates an exception of type '{1}', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type.</Resolution>
7115 </Rule>
7116 <Rule TypeName="DoNotUseTimersThatPreventPowerStateChanges" Category="Microsoft.Mobility" CheckId="CA1601">
7117 <Resolution Name="Default">Modify the call to {0} in method {1} to set the timer interval to a value that's greater than or equal to one second.</Resolution>
7118 </Rule>
7119 <Rule TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709">
7120 <Resolution Name="Member">Correct the casing of member name '{0}'.</Resolution>
7121 <Resolution Name="Namespace">Correct the casing of namespace name '{0}'.</Resolution>
7122 <Resolution Name="Parameter">Correct the casing of parameter name '{0}'.</Resolution>
7123 <Resolution Name="Type">Correct the casing of type name '{0}'.</Resolution>
7124 </Rule>
7125 <Rule TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704">
7126 <Resolution Name="Member">Correct the spelling of the unrecognized token '{0}' in member name '{1}'.</Resolution>
7127 <Resolution Name="MemberOneLetter">Consider providing a more meaningful name than the one-letter token '{0}' in member name '{1}'.</Resolution>
7128 <Resolution Name="Namespace">Correct the spelling of the unrecognized token '{0}' in namespace '{1}'.</Resolution>
7129 <Resolution Name="Parameter">In method {0}, correct the spelling of the unrecognized token '{1}' in parameter name '{2}' or strip it entirely if it represents any sort of hungarian notation.</Resolution>
7130 <Resolution Name="ParameterOneLetter">In method {0}, consider providing a more meaningful name than the one-letter parameter name '{1}'.</Resolution>
7131 <Resolution Name="Type">Correct the spelling of the unrecognized token '{0}' in type name '{1}'.</Resolution>
7132 </Rule>
7133 <Rule TypeName="IdentifiersShouldDifferByMoreThanCase" Category="Microsoft.Naming" CheckId="CA1708">
7134 <Resolution Name="Member">Change member names {0} and '{1}' so that they differ by more than case.</Resolution>
7135 </Rule>
7136 <Rule TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707">
7137 <Resolution Name="Member">Remove all underscores from member '{0}'.</Resolution>
7138 <Resolution Name="Parameter">Remove all underscores from parameter '{0}'.</Resolution>
7139 <Resolution Name="Type">Remove all underscores from type '{0}'.</Resolution>
7140 </Rule>
7141 <Rule TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711">
7142 <Resolution Name="Default">Rename '{0}' so that it does not end in '{1}'.</Resolution>
7143 </Rule>
7144 <Rule TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204">
7145 <Resolution Name="Default">Correct the spelling of the unrecognized token '{0}' in the literal '{1}'.</Resolution>
7146 </Rule>
7147 <Rule TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705">
7148 <Resolution Name="Member">Correct the capitalization of member name '{0}'.</Resolution>
7149 <Resolution Name="Namespace">Correct the capitalization of namespace name '{0}'.</Resolution>
7150 <Resolution Name="Parameter">Correct the capitalization of parameter name '{0}'.</Resolution>
7151 <Resolution Name="Type">Correct the capitalization of type name '{0}'.</Resolution>
7152 </Rule>
7153 <Rule TypeName="MarkAssembliesWithAssemblyVersion" Category="Microsoft.Design" CheckId="CA1016">
7154 <Resolution Name="Default">Add an AssemblyVersion attribute to '{0}'.</Resolution>
7155 </Rule>
7156 <Rule TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014">
7157 <Resolution Name="NoAttr">'{0}' should be marked with CLSCompliantAttribute and its value should be true.</Resolution>
7158 </Rule>
7159 <Rule TypeName="MarkAssembliesWithComVisible" Category="Microsoft.Design" CheckId="CA1017">
7160 <Resolution Name="NoAttribute">Mark '{0}' as ComVisible(false) at the assembly level, then mark all types within the assembly that should be exposed to Com clients as ComVisible(true).</Resolution>
7161 </Rule>
7162 <Rule TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822">
7163 <Resolution Name="Default">The 'this' parameter (or 'Me' in VB) of {0} is never used. Mark the member as static (or Shared in VB) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate.</Resolution>
7164 </Rule>
7165 <Rule TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211">
7166 <Resolution Name="Default">Consider making '{0}' non-public or a constant.</Resolution>
7167 </Rule>
7168 <Rule TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233">
7169 <Resolution Name="Default">Correct the potential overflow in the operation '{0}' in '{1}'.</Resolution>
7170 </Rule>
7171 <Rule TypeName="OperatorOverloadsHaveNamedAlternates" Category="Microsoft.Usage" CheckId="CA2225">
7172 <Resolution Name="Default">Provide a method named '{0}' as a friendly alternate for operator {1}.</Resolution>
7173 </Rule>
7174 <Rule TypeName="OverloadOperatorEqualsOnOverloadingAddAndSubtract" Category="Microsoft.Design" CheckId="CA1013">
7175 <Resolution Name="Default">Consider adding an overload of the equality operator for '{0}' that takes the same parameters as {1}.</Resolution>
7176 </Rule>
7177 <Rule TypeName="OverrideEqualsAndOperatorEqualsOnValueTypes" Category="Microsoft.Performance" CheckId="CA1815">
7178 <Resolution Name="Equals">'{0}' should override Equals.</Resolution>
7179 <Resolution Name="op_Equality">'{0}' should override the equality (==) and inequality (!=) operators.</Resolution>
7180 </Rule>
7181 <Rule TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725">
7182 <Resolution Name="Default">Change parameter name '{0}' of method {1} to '{2}' in order to match the identifier as it has been declared in {3}.</Resolution>
7183 </Rule>
7184 <Rule TypeName="PassSystemUriObjectsInsteadOfStrings" Category="Microsoft.Usage" CheckId="CA2234">
7185 <Resolution Name="Default">Modify {0} to call {1} instead of {2}.</Resolution>
7186 </Rule>
7187 <Rule TypeName="PointersShouldNotBeVisible" Category="Microsoft.Security" CheckId="CA2111">
7188 <Resolution Name="Default">Make '{0}' private.</Resolution>
7189 </Rule>
7190 <Rule TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044">
7191 <Resolution Name="Default">Add a property getter to '{0}'.</Resolution>
7192 </Rule>
7193 <Rule TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804">
7194 <Resolution Name="Default">{0} declares a local, '{1}', of type {2}, which is never used or is only assigned to. Use this local or remove it.</Resolution>
7195 </Rule>
7196 <Rule TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801">
7197 <Resolution Name="Default">Parameter '{0}' of {1} is never used. Remove the parameter or use it in the method body.</Resolution>
7198 </Rule>
7199 <Rule TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706">
7200 <Resolution Name="Member">Correct the capitalization of '{0}' in member name '{1}'.</Resolution>
7201 <Resolution Name="MemberId">'Id' is an abbreviation and therefore is not subject to acronym casing guidelines. Correct the capitalization of 'ID' in member name '{0}' by changing it to 'Id'.</Resolution>
7202 <Resolution Name="ParameterId">'Id' is an abbreviation and therefore is not subject to acronym casing guidelines. Correct the capitalization of '{0}' in parameter name '{1}' by changing it to '{2}'.</Resolution>
7203 <Resolution Name="Type">Correct the capitalization of '{0}' in type name '{1}'.</Resolution>
7204 </Rule>
7205 <Rule TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304">
7206 <Resolution Name="Default">{0} makes a call to {1} that does not explicitly provide a CultureInfo. This should be replaced with a call to {2}.</Resolution>
7207 </Rule>
7208 <Rule TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305">
7209 <Resolution Name="Default">{0} makes a call to {1} that does not explicitly provide an IFormatProvider. This should be replaced with a call to {2}.</Resolution>
7210 </Rule>
7211 <Rule TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053">
7212 <Resolution Name="Default">Remove the public constructors from '{0}'.</Resolution>
7213 </Rule>
7214 <Rule TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820">
7215 <Resolution Name="IsNullOrEmpty">Replace the call to String.{0}({1}) in '{2}' with a call to String.IsNullOrEmpty.</Resolution>
7216 </Rule>
7217 <Rule TypeName="TypeNamesShouldNotMatchNamespaces" Category="Microsoft.Naming" CheckId="CA1724">
7218 <Resolution Name="Default">The type name '{0}' conflicts in whole or in part with the namespace name '{1}'. Change either name to eliminate the conflict.</Resolution>
7219 </Rule>
7220 <Rule TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001">
7221 <Resolution Name="Default">Implement IDisposable on '{0}' as it instantiates members of the following IDisposable types: {1}</Resolution>
7222 </Rule>
7223 <Rule TypeName="TypesThatOwnNativeResourcesShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1049">
7224 <Resolution Name="Default">Implement IDisposable on '{0}'.</Resolution>
7225 </Rule>
7226 <Rule TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054">
7227 <Resolution Name="Default">Change the type of parameter '{0}' of method {1} from string to System.Uri, or provide an overload of {1}, that allows '{0}' to be passed as a System.Uri object.</Resolution>
7228 </Rule>
7229 <Rule TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726">
7230 <Resolution Name="Member">Replace the term '{0}' in member name '{1}' with the preferred alternate '{2}'.</Resolution>
7231 <Resolution Name="Type">Replace the term '{0}' in type name '{1}' with the preferred alternate '{2}'.</Resolution>
7232 </Rule>
7233 <Rule TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024">
7234 <Resolution Name="Default">Change '{0}' to a property if appropriate.</Resolution>
7235 </Rule>
7236 <Rule TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062">
7237 <Resolution Name="Default">Validate parameter {0} passed to externally visible method {1}.</Resolution>
7238 </Rule>
7239 </Rules>
7240 </FxCopReport>
7241</FxCopProject>
diff --git a/OpenSim.build b/OpenSim.build
deleted file mode 100644
index 87dc0de..0000000
--- a/OpenSim.build
+++ /dev/null
@@ -1,118 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim" default="build">
3 <echo message="Using '${nant.settings.currentframework}' Framework"/>
4
5 <property name="bin.dir" value="bin" />
6 <property name="obj.dir" value="obj" />
7 <property name="doc.dir" value="doc" />
8 <property name="project.main.dir" value="${project::get-base-directory()}" />
9
10 <target name="Debug" description="">
11 <property name="project.config" value="Debug" />
12 <property name="build.debug" value="true" />
13 </target>
14
15 <property name="project.config" value="Release" />
16
17 <target name="Release" description="">
18 <property name="project.config" value="Release" />
19 <property name="build.debug" value="false" />
20 </target>
21
22 <target name="net-1.1" description="Sets framework to .NET 1.1">
23 <property name="nant.settings.currentframework" value="net-1.1" />
24 </target>
25
26 <target name="net-2.0" description="Sets framework to .NET 2.0">
27 <property name="nant.settings.currentframework" value="net-2.0" />
28 </target>
29
30 <target name="mono-2.0" description="Sets framework to mono 2.0">
31 <property name="nant.settings.currentframework" value="mono-2.0" />
32 </target>
33
34 <target name="mono-1.0" description="Sets framework to mono 1.0">
35 <property name="nant.settings.currentframework" value="mono-1.0" />
36 </target>
37
38 <target name="init" description="">
39 <call target="${project.config}" />
40 <sysinfo />
41 <echo message="Platform ${sys.os.platform}" />
42 <property name="build.dir" value="${bin.dir}/${project.config}" />
43 </target>
44
45 <target name="clean" description="">
46 <echo message="Deleting all builds from all configurations" />
47 <delete dir="${bin.dir}" failonerror="false" />
48 <delete dir="${obj.dir}" failonerror="false" />
49 <nant buildfile="OpenSim/OpenSim/OpenSim.exe.build" target="clean" />
50 <nant buildfile="Common/OpenSim.Framework/OpenSim.Framework.dll.build" target="clean" />
51 <nant buildfile="Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="clean" />
52 <nant buildfile="Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="clean" />
53 <nant buildfile="OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="clean" />
54 <nant buildfile="OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="clean" />
55 <nant buildfile="OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build" target="clean" />
56 <nant buildfile="OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="clean" />
57 <nant buildfile="OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="clean" />
58 <nant buildfile="OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="clean" />
59 <nant buildfile="OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build" target="clean" />
60 <nant buildfile="OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="clean" />
61 <nant buildfile="Common/OpenSim.Servers/OpenSim.Servers.dll.build" target="clean" />
62 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build" target="clean" />
63 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="clean" />
64 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="clean" />
65 <nant buildfile="OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="clean" />
66 <nant buildfile="Common/XmlRpcCS/XMLRPC.dll.build" target="clean" />
67 </target>
68
69 <target name="build" depends="init" description="">
70 <nant buildfile="Common/XmlRpcCS/XMLRPC.dll.build" target="build" />
71 <nant buildfile="Common/OpenSim.Framework/OpenSim.Framework.dll.build" target="build" />
72 <nant buildfile="Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="build" />
73 <nant buildfile="Common/OpenSim.Servers/OpenSim.Servers.dll.build" target="build" />
74 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="build" />
75 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="build" />
76 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build" target="build" />
77 <nant buildfile="OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="build" />
78 <nant buildfile="OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="build" />
79 <nant buildfile="OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="build" />
80 <nant buildfile="OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build" target="build" />
81 <nant buildfile="OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="build" />
82 <nant buildfile="OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="build" />
83 <nant buildfile="Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="build" />
84 <nant buildfile="OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="build" />
85 <nant buildfile="OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="build" />
86 <nant buildfile="OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build" target="build" />
87 <nant buildfile="OpenSim/OpenSim/OpenSim.exe.build" target="build" />
88 </target>
89
90 <target name="build-release" depends="Release, init, build" description="Builds in Release mode" />
91
92 <target name="build-debug" depends="Debug, init, build" description="Builds in Debug mode" />
93
94 <target name="package" depends="clean, doc" description="Builds all" />
95
96 <target name="doc" depends="build-release">
97 <echo message="Generating all documentation from all builds" />
98 <nant buildfile="OpenSim/OpenSim/OpenSim.exe.build" target="doc" />
99 <nant buildfile="Common/OpenSim.Framework/OpenSim.Framework.dll.build" target="doc" />
100 <nant buildfile="Common/OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="doc" />
101 <nant buildfile="Common/OpenSim.GenericConfig/Xml/OpenSim.GenericConfig.Xml.dll.build" target="doc" />
102 <nant buildfile="OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build" target="doc" />
103 <nant buildfile="OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build" target="doc" />
104 <nant buildfile="OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build" target="doc" />
105 <nant buildfile="OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build" target="doc" />
106 <nant buildfile="OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build" target="doc" />
107 <nant buildfile="OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build" target="doc" />
108 <nant buildfile="OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build" target="doc" />
109 <nant buildfile="OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build" target="doc" />
110 <nant buildfile="Common/OpenSim.Servers/OpenSim.Servers.dll.build" target="doc" />
111 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build" target="doc" />
112 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build" target="doc" />
113 <nant buildfile="OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build" target="doc" />
114 <nant buildfile="OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build" target="doc" />
115 <nant buildfile="Common/XmlRpcCS/XMLRPC.dll.build" target="doc" />
116 </target>
117
118</project>
diff --git a/OpenSim.sln b/OpenSim.sln
deleted file mode 100644
index ed2eac9..0000000
--- a/OpenSim.sln
+++ /dev/null
@@ -1,121 +0,0 @@
1Microsoft Visual Studio Solution File, Format Version 9.00
2# Visual Studio 2005
3Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim", "OpenSim\OpenSim\OpenSim.csproj", "{438A9556-0000-0000-0000-000000000000}"
4EndProject
5Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework", "Common\OpenSim.Framework\OpenSim.Framework.csproj", "{8ACA2445-0000-0000-0000-000000000000}"
6EndProject
7Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Console", "Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj", "{A7CD0630-0000-0000-0000-000000000000}"
8EndProject
9Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.GenericConfig.Xml", "Common\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj", "{E88EF749-0000-0000-0000-000000000000}"
10EndProject
11Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.GridInterfaces.Local", "OpenSim\OpenSim.GridInterfaces\Local\OpenSim.GridInterfaces.Local.csproj", "{546099CD-0000-0000-0000-000000000000}"
12EndProject
13Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.GridInterfaces.Remote", "OpenSim\OpenSim.GridInterfaces\Remote\OpenSim.GridInterfaces.Remote.csproj", "{B55C0B5D-0000-0000-0000-000000000000}"
14EndProject
15Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.BasicPhysicsPlugin", "OpenSim\OpenSim.Physics\BasicPhysicsPlugin\OpenSim.Physics.BasicPhysicsPlugin.csproj", "{4F874463-0000-0000-0000-000000000000}"
16EndProject
17Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.Manager", "OpenSim\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj", "{8BE16150-0000-0000-0000-000000000000}"
18EndProject
19Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.OdePlugin", "OpenSim\OpenSim.Physics\OdePlugin\OpenSim.Physics.OdePlugin.csproj", "{63A05FE9-0000-0000-0000-000000000000}"
20EndProject
21Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.PhysXPlugin", "OpenSim\OpenSim.Physics\PhysXPlugin\OpenSim.Physics.PhysXPlugin.csproj", "{988F0AC4-0000-0000-0000-000000000000}"
22EndProject
23Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.RegionServer", "OpenSim\OpenSim.RegionServer\OpenSim.RegionServer.csproj", "{632E1BFD-0000-0000-0000-000000000000}"
24EndProject
25Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Scripting.EmbeddedJVM", "OpenSim\OpenSim.Scripting\EmbeddedJVM\OpenSim.Scripting.EmbeddedJVM.csproj", "{97A82740-0000-0000-0000-000000000000}"
26EndProject
27Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Servers", "Common\OpenSim.Servers\OpenSim.Servers.csproj", "{8BB20F0A-0000-0000-0000-000000000000}"
28EndProject
29Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageBerkeleyDB", "OpenSim\OpenSim.Storage\LocalStorageBerkeleyDB\OpenSim.Storage.LocalStorageBerkeleyDB.csproj", "{EE9E5D96-0000-0000-0000-000000000000}"
30EndProject
31Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageDb4o", "OpenSim\OpenSim.Storage\LocalStorageDb4o\OpenSim.Storage.LocalStorageDb4o.csproj", "{E1B79ECF-0000-0000-0000-000000000000}"
32EndProject
33Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Storage.LocalStorageSQLite", "OpenSim\OpenSim.Storage\LocalStorageSQLite\OpenSim.Storage.LocalStorageSQLite.csproj", "{6B20B603-0000-0000-0000-000000000000}"
34EndProject
35Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}"
36EndProject
37Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLRPC", "Common\XmlRpcCS\XMLRPC.csproj", "{8E81D43C-0000-0000-0000-000000000000}"
38EndProject
39Global
40 GlobalSection(SolutionConfigurationPlatforms) = preSolution
41 Debug|Any CPU = Debug|Any CPU
42 Release|Any CPU = Release|Any CPU
43 EndGlobalSection
44 GlobalSection(ProjectConfigurationPlatforms) = postSolution
45 {438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46 {438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
47 {438A9556-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
48 {438A9556-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
49 {8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50 {8ACA2445-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
51 {8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
52 {8ACA2445-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
53 {A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54 {A7CD0630-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
55 {A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
56 {A7CD0630-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
57 {E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
58 {E88EF749-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
59 {E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
60 {E88EF749-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
61 {546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
62 {546099CD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
63 {546099CD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
64 {546099CD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
65 {B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
66 {B55C0B5D-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
67 {B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
68 {B55C0B5D-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
69 {4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
70 {4F874463-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
71 {4F874463-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
72 {4F874463-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
73 {8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
74 {8BE16150-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
75 {8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
76 {8BE16150-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
77 {63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
78 {63A05FE9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
79 {63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
80 {63A05FE9-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
81 {988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
82 {988F0AC4-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
83 {988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
84 {988F0AC4-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
85 {632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
86 {632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
87 {632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
88 {632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
89 {97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
90 {97A82740-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
91 {97A82740-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
92 {97A82740-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
93 {8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
94 {8BB20F0A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
95 {8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
96 {8BB20F0A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
97 {EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
98 {EE9E5D96-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
99 {EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
100 {EE9E5D96-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
101 {E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
102 {E1B79ECF-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
103 {E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
104 {E1B79ECF-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
105 {6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
106 {6B20B603-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
107 {6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
108 {6B20B603-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
109 {2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
110 {2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
111 {2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
112 {2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
113 {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
114 {8E81D43C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
115 {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
116 {8E81D43C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
117 EndGlobalSection
118 GlobalSection(SolutionProperties) = preSolution
119 HideSolutionNode = FALSE
120 EndGlobalSection
121EndGlobal
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/AssemblyInfo.cs b/OpenSim/OpenSim.GridInterfaces/Local/AssemblyInfo.cs
deleted file mode 100644
index 52ecd6b..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Local/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("LocalGridServers")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("LocalGridServers")]
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/OpenSim.GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs
deleted file mode 100644
index ea4cbc7..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs
+++ /dev/null
@@ -1,298 +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.Threading;
32using System.IO;
33using OpenSim.Framework.Interfaces;
34using OpenSim.Framework.Types;
35using OpenSim.Framework.Utilities;
36using OpenSim.Framework.Console;
37using libsecondlife;
38using Db4objects.Db4o;
39using Db4objects.Db4o.Query;
40
41namespace OpenSim.GridInterfaces.Local
42{
43 public class LocalAssetPlugin : IAssetPlugin
44 {
45 public LocalAssetPlugin()
46 {
47
48 }
49
50 public IAssetServer GetAssetServer()
51 {
52 return (new LocalAssetServer());
53 }
54 }
55
56 public class LocalAssetServer : IAssetServer
57 {
58 private IAssetReceiver _receiver;
59 private BlockingQueue<ARequest> _assetRequests;
60 private IObjectContainer db;
61 private Thread _localAssetServerThread;
62
63 public LocalAssetServer()
64 {
65 bool yapfile;
66 this._assetRequests = new BlockingQueue<ARequest>();
67 yapfile = System.IO.File.Exists("assets.yap");
68
69 MainConsole.Instance.Verbose("Local Asset Server class created");
70 try
71 {
72 db = Db4oFactory.OpenFile("assets.yap");
73 MainConsole.Instance.Verbose("Db4 Asset database creation");
74 }
75 catch (Exception e)
76 {
77 db.Close();
78 MainConsole.Instance.Warn("Db4 Asset server :Constructor - Exception occured");
79 MainConsole.Instance.Warn(e.ToString());
80 }
81 if (!yapfile)
82 {
83 this.SetUpAssetDatabase();
84 }
85 this._localAssetServerThread = new Thread(new ThreadStart(RunRequests));
86 this._localAssetServerThread.IsBackground = true;
87 this._localAssetServerThread.Start();
88
89 }
90
91 public void SetReceiver(IAssetReceiver receiver)
92 {
93 this._receiver = receiver;
94 }
95
96 public void RequestAsset(LLUUID assetID, bool isTexture)
97 {
98 ARequest req = new ARequest();
99 req.AssetID = assetID;
100 req.IsTexture = isTexture;
101 this._assetRequests.Enqueue(req);
102 }
103
104 public void UpdateAsset(AssetBase asset)
105 {
106
107 }
108
109 public void UploadNewAsset(AssetBase asset)
110 {
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 }
118
119 public void SetServerInfo(string ServerUrl, string ServerKey)
120 {
121
122 }
123 public void Close()
124 {
125 if (db != null)
126 {
127 MainConsole.Instance.Verbose( "Closing local asset server database");
128 db.Close();
129 }
130 }
131
132 private void RunRequests()
133 {
134 while (true)
135 {
136 byte[] idata = null;
137 bool found = false;
138 AssetStorage foundAsset = null;
139 ARequest req = this._assetRequests.Dequeue();
140 IObjectSet result = db.Query(new AssetUUIDQuery(req.AssetID));
141 if (result.Count > 0)
142 {
143 foundAsset = (AssetStorage)result.Next();
144 found = true;
145 }
146
147 AssetBase asset = new AssetBase();
148 if (found)
149 {
150 asset.FullID = foundAsset.UUID;
151 asset.Type = foundAsset.Type;
152 asset.InvType = foundAsset.Type;
153 asset.Name = foundAsset.Name;
154 idata = foundAsset.Data;
155 }
156 else
157 {
158 asset.FullID = LLUUID.Zero;
159 }
160 asset.Data = idata;
161 _receiver.AssetReceived(asset, req.IsTexture);
162 }
163
164 }
165
166 private void SetUpAssetDatabase()
167 {
168 try
169 {
170
171 MainConsole.Instance.Verbose( "Setting up asset database");
172
173 AssetBase Image = new AssetBase();
174 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
175 Image.Name = "Bricks";
176 this.LoadAsset(Image, true, "bricks.jp2");
177 AssetStorage store = new AssetStorage();
178 store.Data = Image.Data;
179 store.Name = Image.Name;
180 store.UUID = Image.FullID;
181 db.Set(store);
182 db.Commit();
183
184 Image = new AssetBase();
185 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002");
186 Image.Name = "Plywood";
187 this.LoadAsset(Image, true, "plywood.jp2");
188 store = new AssetStorage();
189 store.Data = Image.Data;
190 store.Name = Image.Name;
191 store.UUID = Image.FullID;
192 db.Set(store);
193 db.Commit();
194
195 Image = new AssetBase();
196 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003");
197 Image.Name = "Rocks";
198 this.LoadAsset(Image, true, "rocks.jp2");
199 store = new AssetStorage();
200 store.Data = Image.Data;
201 store.Name = Image.Name;
202 store.UUID = Image.FullID;
203 db.Set(store);
204 db.Commit();
205
206 Image = new AssetBase();
207 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004");
208 Image.Name = "Granite";
209 this.LoadAsset(Image, true, "granite.jp2");
210 store = new AssetStorage();
211 store.Data = Image.Data;
212 store.Name = Image.Name;
213 store.UUID = Image.FullID;
214 db.Set(store);
215 db.Commit();
216
217 Image = new AssetBase();
218 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005");
219 Image.Name = "Hardwood";
220 this.LoadAsset(Image, true, "hardwood.jp2");
221 store = new AssetStorage();
222 store.Data = Image.Data;
223 store.Name = Image.Name;
224 store.UUID = Image.FullID;
225 db.Set(store);
226 db.Commit();
227
228 Image = new AssetBase();
229 Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005");
230 Image.Name = "Prim Base Texture";
231 this.LoadAsset(Image, true, "plywood.jp2");
232 store = new AssetStorage();
233 store.Data = Image.Data;
234 store.Name = Image.Name;
235 store.UUID = Image.FullID;
236 db.Set(store);
237 db.Commit();
238
239 Image = new AssetBase();
240 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000006");
241 Image.Name = "Map Base Texture";
242 this.LoadAsset(Image, true, "map_base.jp2");
243 store = new AssetStorage();
244 store.Data = Image.Data;
245 store.Name = Image.Name;
246 store.UUID = Image.FullID;
247 db.Set(store);
248 db.Commit();
249
250 Image = new AssetBase();
251 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000007");
252 Image.Name = "Map Texture";
253 this.LoadAsset(Image, true, "map1.jp2");
254 store = new AssetStorage();
255 store.Data = Image.Data;
256 store.Name = Image.Name;
257 store.UUID = Image.FullID;
258 db.Set(store);
259 db.Commit();
260
261 Image = new AssetBase();
262 Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
263 Image.Name = "Shape";
264 this.LoadAsset(Image, false, "base_shape.dat");
265 store = new AssetStorage();
266 store.Data = Image.Data;
267 store.Name = Image.Name;
268 store.UUID = Image.FullID;
269 db.Set(store);
270 db.Commit();
271 }
272 catch (Exception e)
273 {
274 MainConsole.Instance.Error(e.Message);
275 }
276
277 }
278
279 private void LoadAsset(AssetBase info, bool image, string filename)
280 {
281 //should request Asset from storage manager
282 //but for now read from file
283
284 string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
285 string fileName = Path.Combine(dataPath, filename);
286 FileInfo fInfo = new FileInfo(fileName);
287 long numBytes = fInfo.Length;
288 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
289 byte[] idata = new byte[numBytes];
290 BinaryReader br = new BinaryReader(fStream);
291 idata = br.ReadBytes((int)numBytes);
292 br.Close();
293 fStream.Close();
294 info.Data = idata;
295 //info.loaded=true;
296 }
297 }
298}
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs b/OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs
deleted file mode 100644
index 9b6a9ff..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs
+++ /dev/null
@@ -1,158 +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.Threading;
31using System.IO;
32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Types;
34using OpenSim.Framework.Console;
35using libsecondlife;
36using Db4objects.Db4o;
37using Db4objects.Db4o.Query;
38using System.Collections;
39
40namespace OpenSim.GridInterfaces.Local
41{
42 /// <summary>
43 ///
44 /// </summary>
45 ///
46 public class LocalGridPlugin : IGridPlugin
47 {
48 public LocalGridPlugin()
49 {
50
51 }
52
53 public IGridServer GetGridServer()
54 {
55 return(new LocalGridServer());
56 }
57 }
58
59 public class LocalGridServer : LocalGridBase
60 {
61 public List<Login> Sessions = new List<Login>();
62
63 public LocalGridServer()
64 {
65 Sessions = new List<Login>();
66 MainConsole.Instance.Verbose("Local Grid Server class created");
67 }
68
69 public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port)
70 {
71 return true;
72 }
73
74 public override string GetName()
75 {
76 return "Local";
77 }
78
79 public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode)
80 {
81 //we are running local
82 AuthenticateResponse user = new AuthenticateResponse();
83
84 lock(this.Sessions)
85 {
86
87 for(int i = 0; i < Sessions.Count; i++)
88 {
89 if((Sessions[i].Agent == agentID) && (Sessions[i].Session == sessionID))
90 {
91 user.Authorised = true;
92 user.LoginInfo = Sessions[i];
93 }
94 }
95 }
96 return(user);
97 }
98
99 public override bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode)
100 {
101 return(true);
102 }
103
104 public override UUIDBlock RequestUUIDBlock()
105 {
106 UUIDBlock uuidBlock = new UUIDBlock();
107 return(uuidBlock);
108 }
109
110 public override NeighbourInfo[] RequestNeighbours()
111 {
112 return null;
113 }
114
115 public override void SetServerInfo(string ServerUrl, string SendKey, string RecvKey)
116 {
117
118 }
119
120 public override IList RequestMapBlocks(int minX, int minY, int maxX, int maxY)
121 {
122 return new ArrayList();
123 }
124
125
126 public override void Close()
127 {
128
129 }
130
131 /// <summary>
132 /// used by the local login server to inform us of new sessions
133 /// </summary>
134 /// <param name="session"></param>
135 public override void AddNewSession(Login session)
136 {
137 lock(this.Sessions)
138 {
139 this.Sessions.Add(session);
140 }
141 }
142 }
143
144 public class AssetUUIDQuery : Predicate
145 {
146 private LLUUID _findID;
147
148 public AssetUUIDQuery(LLUUID find)
149 {
150 _findID = find;
151 }
152 public bool Match(AssetStorage asset)
153 {
154 return (asset.UUID == _findID);
155 }
156 }
157
158}
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj b/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj
deleted file mode 100644
index 1acd1b5..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj
+++ /dev/null
@@ -1,110 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{546099CD-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.GridInterfaces.Local</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.GridInterfaces.Local</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="Db4objects.Db4o.dll" >
62 <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="libsecondlife.dll" >
66 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System" >
70 <HintPath>System.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="System.Xml" >
74 <HintPath>System.Xml.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup>
78 <ItemGroup>
79 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\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="..\..\..\Common\OpenSim.Framework.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="AssemblyInfo.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="LocalAssetServer.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="LocalGridServer.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 </ItemGroup>
103 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
104 <PropertyGroup>
105 <PreBuildEvent>
106 </PreBuildEvent>
107 <PostBuildEvent>
108 </PostBuildEvent>
109 </PropertyGroup>
110</Project>
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build b/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build
deleted file mode 100644
index c3c4ae4..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.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.GridInterfaces.Local" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="LocalAssetServer.cs" />
16 <include name="LocalGridServer.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="../../../bin/OpenSim.Framework.dll" />
26 <include name="../../../bin/OpenSim.Framework.Console.dll" />
27 <include name="System.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.GridInterfaces/Remote/AssemblyInfo.cs b/OpenSim/OpenSim.GridInterfaces/Remote/AssemblyInfo.cs
deleted file mode 100644
index 51596d0..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Remote/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("RemoteGridServers")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("RemoteGridServers")]
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/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj b/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj
deleted file mode 100644
index 11aacac..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.csproj
+++ /dev/null
@@ -1,112 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{B55C0B5D-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.GridInterfaces.Remote</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.GridInterfaces.Remote</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="..\..\..\Common\OpenSim.Framework\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="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
82 <Name>OpenSim.Framework.Console</Name>
83 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
84 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
85 <Private>False</Private>
86 </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>
94 <ItemGroup>
95 <Compile Include="AssemblyInfo.cs">
96 <SubType>Code</SubType>
97 </Compile>
98 <Compile Include="RemoteAssetServer.cs">
99 <SubType>Code</SubType>
100 </Compile>
101 <Compile Include="RemoteGridServer.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/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build b/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build
deleted file mode 100644
index 860251f..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Remote/OpenSim.GridInterfaces.Remote.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.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.GridInterfaces.Remote" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="RemoteAssetServer.cs" />
16 <include name="RemoteGridServer.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.dll" />
25 <include name="../../../bin/OpenSim.Framework.Console.dll" />
26 <include name="System.dll" />
27 <include name="System.Xml.dll" />
28 <include name="../../../bin/XMLRPC.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.GridInterfaces/Remote/RemoteAssetServer.cs b/OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs
deleted file mode 100644
index 550fec6..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Remote/RemoteAssetServer.cs
+++ /dev/null
@@ -1,135 +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.Threading;
32using System.Net;
33using System.Net.Sockets;
34using System.IO;
35using libsecondlife;
36using OpenSim.Framework.Interfaces;
37using OpenSim.Framework.Types;
38using OpenSim.Framework.Utilities;
39
40namespace OpenSim.GridInterfaces.Remote
41{
42 public class RemoteAssetServer : IAssetServer
43 {
44 private IAssetReceiver _receiver;
45 private BlockingQueue<ARequest> _assetRequests;
46 private Thread _remoteAssetServerThread;
47 private string AssetServerUrl;
48 private string AssetSendKey;
49
50 public RemoteAssetServer()
51 {
52 this._assetRequests = new BlockingQueue<ARequest>();
53 this._remoteAssetServerThread = new Thread(new ThreadStart(RunRequests));
54 this._remoteAssetServerThread.IsBackground = true;
55 this._remoteAssetServerThread.Start();
56 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Remote Asset Server class created");
57 }
58
59 public void SetReceiver(IAssetReceiver receiver)
60 {
61 this._receiver = receiver;
62 }
63
64 public void RequestAsset(LLUUID assetID, bool isTexture)
65 {
66 ARequest req = new ARequest();
67 req.AssetID = assetID;
68 req.IsTexture = isTexture;
69 this._assetRequests.Enqueue(req);
70 }
71
72 public void UpdateAsset(AssetBase asset)
73 {
74
75 }
76
77 public void UploadNewAsset(AssetBase asset)
78 {
79 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
80 string ret = Windows1252Encoding.GetString(asset.Data);
81 byte[] buffer = Windows1252Encoding.GetBytes(ret);
82 WebClient client = new WebClient();
83 client.UploadData(this.AssetServerUrl + "assets/" + asset.FullID, buffer);
84
85 }
86
87 public void SetServerInfo(string ServerUrl, string ServerKey)
88 {
89 this.AssetServerUrl = ServerUrl;
90 this.AssetSendKey = ServerKey;
91 }
92
93 private void RunRequests()
94 {
95 while (true)
96 {
97 //we need to add support for the asset server not knowing about a requested asset
98 // 404... THE MAGIC FILE NOT FOUND ERROR, very useful for telling you things such as a file (or asset ;) ) not being found!!!!!!!!!!! it's 2:22AM
99 ARequest req = this._assetRequests.Dequeue();
100 LLUUID assetID = req.AssetID;
101 // OpenSim.Framework.Console.MainConsole.Instance.Verbose(" RemoteAssetServer- Got a AssetServer request, processing it - " + this.AssetServerUrl + "assets/" + assetID);
102 WebRequest AssetLoad = WebRequest.Create(this.AssetServerUrl + "assets/" + assetID);
103 WebResponse AssetResponse = AssetLoad.GetResponse();
104 byte[] idata = new byte[(int)AssetResponse.ContentLength];
105 BinaryReader br = new BinaryReader(AssetResponse.GetResponseStream());
106 idata = br.ReadBytes((int)AssetResponse.ContentLength);
107 br.Close();
108
109 AssetBase asset = new AssetBase();
110 asset.FullID = assetID;
111 asset.Data = idata;
112 _receiver.AssetReceived(asset, req.IsTexture);
113 }
114 }
115
116 public void Close()
117 {
118
119 }
120 }
121
122 public class RemoteAssetPlugin : IAssetPlugin
123 {
124 public RemoteAssetPlugin()
125 {
126
127 }
128
129 public IAssetServer GetAssetServer()
130 {
131 return (new RemoteAssetServer());
132 }
133 }
134
135}
diff --git a/OpenSim/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs b/OpenSim/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs
deleted file mode 100644
index 7c93d43..0000000
--- a/OpenSim/OpenSim.GridInterfaces/Remote/RemoteGridServer.cs
+++ /dev/null
@@ -1,212 +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;
30using System.Collections.Generic;
31using System.Threading;
32using System.Net;
33using System.Net.Sockets;
34using System.IO;
35using libsecondlife;
36using Nwc.XmlRpc;
37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Types;
39using OpenSim.Framework.Console;
40
41namespace OpenSim.GridInterfaces.Remote
42{
43 public class RemoteGridServer : RemoteGridBase
44 {
45 private string GridServerUrl;
46 private string GridSendKey;
47 private string GridRecvKey;
48 private Dictionary<uint, AgentCircuitData> AgentCircuits = new Dictionary<uint, AgentCircuitData>();
49 private ArrayList simneighbours = new ArrayList();
50 private Hashtable griddatahash;
51
52 public override Dictionary<uint, AgentCircuitData> agentcircuits
53 {
54 get { return AgentCircuits; }
55 set { AgentCircuits = value; }
56 }
57
58 public override ArrayList neighbours
59 {
60 get { return simneighbours; }
61 set { simneighbours = value; }
62 }
63
64 public override Hashtable GridData
65 {
66 get { return griddatahash; }
67 set { griddatahash = value; }
68 }
69
70
71 public RemoteGridServer()
72 {
73 MainConsole.Instance.Notice("Remote Grid Server class created");
74 }
75
76 public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port)
77 {
78 Hashtable GridParams = new Hashtable();
79 GridParams["authkey"] = GridSendKey;
80 GridParams["UUID"] = SimUUID.ToString();
81 GridParams["sim_ip"] = sim_ip;
82 GridParams["sim_port"] = sim_port.ToString();
83 ArrayList SendParams = new ArrayList();
84 SendParams.Add(GridParams);
85
86 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
87 XmlRpcResponse GridResp = GridReq.Send(this.GridServerUrl, 3000);
88 Hashtable GridRespData = (Hashtable)GridResp.Value;
89 this.griddatahash = GridRespData;
90
91 if (GridRespData.ContainsKey("error"))
92 {
93 string errorstring = (string)GridRespData["error"];
94 MainConsole.Instance.Warn("Error connecting to grid:");
95 MainConsole.Instance.Warn(errorstring);
96 return false;
97 }
98 this.neighbours = (ArrayList)GridRespData["neighbours"];
99 Console.WriteLine(simneighbours.Count);
100 return true;
101 }
102
103 public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitcode)
104 {
105 AgentCircuitData validcircuit = null;
106 if (this.AgentCircuits.ContainsKey(circuitcode))
107 {
108 validcircuit = this.AgentCircuits[circuitcode];
109 }
110 AuthenticateResponse user = new AuthenticateResponse();
111 if (validcircuit == null)
112 {
113 //don't have this circuit code in our list
114 user.Authorised = false;
115 return (user);
116 }
117
118 if ((sessionID == validcircuit.SessionID) && (agentID == validcircuit.AgentID))
119 {
120 // YAY! Valid login
121 user.Authorised = true;
122 user.LoginInfo = new Login();
123 user.LoginInfo.Agent = agentID;
124 user.LoginInfo.Session = sessionID;
125 user.LoginInfo.SecureSession = validcircuit.SecureSessionID;
126 user.LoginInfo.First = validcircuit.firstname;
127 user.LoginInfo.Last = validcircuit.lastname;
128 }
129 else
130 {
131 // Invalid
132 user.Authorised = false;
133 }
134
135 return (user);
136 }
137
138 public override bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode)
139 {
140 WebRequest DeleteSession = WebRequest.Create(GridServerUrl + "/usersessions/" + sessionID.ToString());
141 DeleteSession.Method = "DELETE";
142 DeleteSession.ContentType = "text/plaintext";
143 DeleteSession.ContentLength = 0;
144
145 StreamWriter stOut = new StreamWriter(DeleteSession.GetRequestStream(), System.Text.Encoding.ASCII);
146 stOut.Write("");
147 stOut.Close();
148
149 StreamReader stIn = new StreamReader(DeleteSession.GetResponse().GetResponseStream());
150 string GridResponse = stIn.ReadToEnd();
151 stIn.Close();
152 return (true);
153 }
154
155 public override UUIDBlock RequestUUIDBlock()
156 {
157 UUIDBlock uuidBlock = new UUIDBlock();
158 return (uuidBlock);
159 }
160
161 public override NeighbourInfo[] RequestNeighbours()
162 {
163 return null;
164 }
165
166 public override IList RequestMapBlocks(int minX, int minY, int maxX, int maxY)
167 {
168 Hashtable param = new Hashtable();
169 param["xmin"] = minX;
170 param["ymin"] = minY;
171 param["xmax"] = maxX;
172 param["ymax"] = maxY;
173 IList parameters = new ArrayList();
174 parameters.Add(param);
175 XmlRpcRequest req = new XmlRpcRequest("map_block", parameters);
176 XmlRpcResponse resp = req.Send(GridServerUrl, 3000);
177 Hashtable respData = (Hashtable)resp.Value;
178 return (IList)respData["sim-profiles"];
179 }
180
181 public override void SetServerInfo(string ServerUrl, string SendKey, string RecvKey)
182 {
183 this.GridServerUrl = ServerUrl;
184 this.GridSendKey = SendKey;
185 this.GridRecvKey = RecvKey;
186 }
187
188 public override string GetName()
189 {
190 return "Remote";
191 }
192
193 public override void Close()
194 {
195
196 }
197 }
198
199 public class RemoteGridPlugin : IGridPlugin
200 {
201 public RemoteGridPlugin()
202 {
203
204 }
205
206 public IGridServer GetGridServer()
207 {
208 return (new RemoteGridServer());
209 }
210 }
211
212}
diff --git a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs
deleted file mode 100644
index 177c49d..0000000
--- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("PhysXplugin")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("PhysXplugin")]
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/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
deleted file mode 100644
index 3d8c9aa..0000000
--- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ /dev/null
@@ -1,278 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using OpenSim.Physics.Manager;
31
32namespace OpenSim.Physics.BasicPhysicsPlugin
33{
34 /// <summary>
35 /// Will be the PhysX plugin but for now will be a very basic physics engine
36 /// </summary>
37 public class BasicPhysicsPlugin : IPhysicsPlugin
38 {
39 private BasicScene _mScene;
40
41 public BasicPhysicsPlugin()
42 {
43
44 }
45
46 public bool Init()
47 {
48 return true;
49 }
50
51 public PhysicsScene GetScene()
52 {
53 if(_mScene == null)
54 {
55 _mScene = new BasicScene();
56 }
57 return(_mScene);
58 }
59
60 public string GetName()
61 {
62 return("basicphysics");
63 }
64
65 public void Dispose()
66 {
67
68 }
69 }
70
71 public class BasicScene :PhysicsScene
72 {
73 private List<BasicActor> _actors = new List<BasicActor>();
74 private float[] _heightMap;
75
76 public BasicScene()
77 {
78
79 }
80
81 public override PhysicsActor AddAvatar(PhysicsVector position)
82 {
83 BasicActor act = new BasicActor();
84 act.Position = position;
85 _actors.Add(act);
86 return act;
87 }
88
89 public override void RemoveAvatar(PhysicsActor actor)
90 {
91 BasicActor act = (BasicActor)actor;
92 if(_actors.Contains(act))
93 {
94 _actors.Remove(act);
95 }
96
97 }
98
99 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
100 {
101 return null;
102 }
103
104 public override void Simulate(float timeStep)
105 {
106 foreach (BasicActor actor in _actors)
107 {
108 actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep);
109 actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep);
110 actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep);
111 /*if(actor.Flying)
112 {
113 actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep);
114 }
115 else
116 {
117 actor.Position.Z = actor.Position.Z + ((-9.8f + actor.Velocity.Z) * timeStep);
118 }
119 if(actor.Position.Z < (_heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X]+1))
120 {*/
121 if ((actor.Position.Y > 0 && actor.Position.Y < 256) && (actor.Position.X > 0 && actor.Position.X < 256))
122 {
123 actor.Position.Z = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1;
124 }
125 //}
126
127
128
129 // This code needs sorting out - border crossings etc
130/* if(actor.Position.X<0)
131 {
132 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
133 actor.Position.X = 0;
134 actor.Velocity.X = 0;
135 }
136 if(actor.Position.Y < 0)
137 {
138 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
139 actor.Position.Y = 0;
140 actor.Velocity.Y = 0;
141 }
142 if(actor.Position.X > 255)
143 {
144 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
145 actor.Position.X = 255;
146 actor.Velocity.X = 0;
147 }
148 if(actor.Position.Y > 255)
149 {
150 ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z));
151 actor.Position.Y = 255;
152 actor.Velocity.X = 0;
153 }*/
154 }
155 }
156
157 public override void GetResults()
158 {
159
160 }
161
162 public override bool IsThreaded
163 {
164 get
165 {
166 return(false); // for now we won't be multithreaded
167 }
168 }
169
170 public override void SetTerrain(float[] heightMap)
171 {
172 this._heightMap = heightMap;
173 }
174
175 public override void DeleteTerrain()
176 {
177
178 }
179 }
180
181 public class BasicActor : PhysicsActor
182 {
183 private PhysicsVector _position;
184 private PhysicsVector _velocity;
185 private PhysicsVector _acceleration;
186 private bool flying;
187 public BasicActor()
188 {
189 _velocity = new PhysicsVector();
190 _position = new PhysicsVector();
191 _acceleration = new PhysicsVector();
192 }
193
194 public override bool Flying
195 {
196 get
197 {
198 return false;
199 }
200 set
201 {
202 flying= value;
203 }
204 }
205
206 public override PhysicsVector Position
207 {
208 get
209 {
210 return _position;
211 }
212 set
213 {
214 _position = value;
215 }
216 }
217
218 public override PhysicsVector Velocity
219 {
220 get
221 {
222 return _velocity;
223 }
224 set
225 {
226 _velocity = value;
227 }
228 }
229
230 public override Axiom.MathLib.Quaternion Orientation
231 {
232 get
233 {
234 return Axiom.MathLib.Quaternion.Identity;
235 }
236 set
237 {
238
239 }
240 }
241
242 public override PhysicsVector Acceleration
243 {
244 get
245 {
246 return _acceleration;
247 }
248
249 }
250
251 public override bool Kinematic
252 {
253 get
254 {
255 return true;
256 }
257 set
258 {
259
260 }
261 }
262 public void SetAcceleration (PhysicsVector accel)
263 {
264 this._acceleration = accel;
265 }
266
267 public override void AddForce(PhysicsVector force)
268 {
269
270 }
271
272 public override void SetMomentum(PhysicsVector momentum)
273 {
274
275 }
276 }
277
278}
diff --git a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj b/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj
deleted file mode 100644
index f88eb32..0000000
--- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj
+++ /dev/null
@@ -1,93 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{4F874463-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.Physics.BasicPhysicsPlugin</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.Physics.BasicPhysicsPlugin</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\Physics\</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\Physics\</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="Axiom.MathLib.dll" >
62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System" >
66 <HintPath>System.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 </ItemGroup>
70 <ItemGroup>
71 <ProjectReference Include="..\Manager\OpenSim.Physics.Manager.csproj">
72 <Name>OpenSim.Physics.Manager</Name>
73 <Project>{8BE16150-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="AssemblyInfo.cs">
80 <SubType>Code</SubType>
81 </Compile>
82 <Compile Include="BasicPhysicsPlugin.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/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build b/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build
deleted file mode 100644
index 00ca3f9..0000000
--- a/OpenSim/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build
+++ /dev/null
@@ -1,42 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.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.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.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/OpenSim.Physics/Manager/AssemblyInfo.cs
deleted file mode 100644
index 132f64a..0000000
--- a/OpenSim/OpenSim.Physics/Manager/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("PhysicsManager")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("PhysicsManager")]
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/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj b/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj
deleted file mode 100644
index 347a649..0000000
--- a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj
+++ /dev/null
@@ -1,112 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{8BE16150-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.Physics.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.Physics.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="Axiom.MathLib.dll" >
62 <HintPath>..\..\..\bin\Axiom.MathLib.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="..\..\..\Common\OpenSim.Framework\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="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
82 <Name>OpenSim.Framework.Console</Name>
83 <Project>{A7CD0630-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="AssemblyInfo.cs">
90 <SubType>Code</SubType>
91 </Compile>
92 <Compile Include="PhysicsActor.cs">
93 <SubType>Code</SubType>
94 </Compile>
95 <Compile Include="PhysicsManager.cs">
96 <SubType>Code</SubType>
97 </Compile>
98 <Compile Include="PhysicsScene.cs">
99 <SubType>Code</SubType>
100 </Compile>
101 <Compile Include="PhysicsVector.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/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build b/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build
deleted file mode 100644
index fc3e1e6..0000000
--- a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build
+++ /dev/null
@@ -1,47 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Physics.Manager" 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.Physics.Manager" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="PhysicsActor.cs" />
16 <include name="PhysicsManager.cs" />
17 <include name="PhysicsScene.cs" />
18 <include name="PhysicsVector.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/Axiom.MathLib.dll" />
26 <include name="../../../bin/OpenSim.Framework.dll" />
27 <include name="../../../bin/OpenSim.Framework.Console.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/OpenSim.Physics/Manager/PhysicsActor.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs
deleted file mode 100644
index 9ff94c4..0000000
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs
+++ /dev/null
@@ -1,162 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Physics.Manager
34{
35 public abstract class PhysicsActor
36 {
37 public static PhysicsActor Null
38 {
39 get
40 {
41 return new NullPhysicsActor();
42 }
43 }
44
45 public abstract PhysicsVector Position
46 {
47 get;
48 set;
49 }
50
51 public abstract PhysicsVector Velocity
52 {
53 get;
54 set;
55 }
56
57 public abstract PhysicsVector Acceleration
58 {
59 get;
60 }
61
62 public abstract Axiom.MathLib.Quaternion Orientation
63 {
64 get;
65 set;
66 }
67
68 public abstract bool Flying
69 {
70 get;
71 set;
72 }
73
74 public abstract bool Kinematic
75 {
76 get;
77 set;
78 }
79
80 public abstract void AddForce(PhysicsVector force);
81
82 public abstract void SetMomentum(PhysicsVector momentum);
83 }
84
85 public class NullPhysicsActor : PhysicsActor
86 {
87 public override PhysicsVector Position
88 {
89 get
90 {
91 return PhysicsVector.Zero;
92 }
93 set
94 {
95 return;
96 }
97 }
98
99 public override PhysicsVector Velocity
100 {
101 get
102 {
103 return PhysicsVector.Zero;
104 }
105 set
106 {
107 return;
108 }
109 }
110
111 public override Axiom.MathLib.Quaternion Orientation
112 {
113 get
114 {
115 return Axiom.MathLib.Quaternion.Identity;
116 }
117 set
118 {
119
120 }
121 }
122
123 public override PhysicsVector Acceleration
124 {
125 get { return PhysicsVector.Zero; }
126 }
127
128 public override bool Flying
129 {
130 get
131 {
132 return false;
133 }
134 set
135 {
136 return;
137 }
138 }
139
140 public override bool Kinematic
141 {
142 get
143 {
144 return true;
145 }
146 set
147 {
148 return;
149 }
150 }
151
152 public override void AddForce(PhysicsVector force)
153 {
154 return;
155 }
156
157 public override void SetMomentum(PhysicsVector momentum)
158 {
159 return;
160 }
161 }
162}
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs
deleted file mode 100644
index f85c098..0000000
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Collections;
31using System.IO;
32using System.Reflection;
33using Axiom.MathLib;
34using OpenSim.Framework.Console;
35
36namespace OpenSim.Physics.Manager
37{
38 /// <summary>
39 /// Description of MyClass.
40 /// </summary>
41 public class PhysicsManager
42 {
43 private Dictionary<string, IPhysicsPlugin> _plugins=new Dictionary<string, IPhysicsPlugin>();
44
45 public PhysicsManager()
46 {
47
48 }
49
50 public PhysicsScene GetPhysicsScene(string engineName)
51 {
52 if (String.IsNullOrEmpty(engineName))
53 {
54 return new NullPhysicsScene();
55 }
56
57 if(_plugins.ContainsKey(engineName))
58 {
59 MainConsole.Instance.Notice("creating "+engineName);
60 return _plugins[engineName].GetScene();
61 }
62 else
63 {
64 MainConsole.Instance.Warn("couldn't find physicsEngine: {0}",engineName);
65 throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName));
66 }
67 }
68
69 public void LoadPlugins()
70 {
71 string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory ,"Physics");
72 string[] pluginFiles = Directory.GetFiles(path, "*.dll");
73
74
75 for(int i= 0; i<pluginFiles.Length; i++)
76 {
77 this.AddPlugin(pluginFiles[i]);
78 }
79 }
80
81 private void AddPlugin(string FileName)
82 {
83 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
84
85 foreach (Type pluginType in pluginAssembly.GetTypes())
86 {
87 if (pluginType.IsPublic)
88 {
89 if (!pluginType.IsAbstract)
90 {
91 Type typeInterface = pluginType.GetInterface("IPhysicsPlugin", true);
92
93 if (typeInterface != null)
94 {
95 IPhysicsPlugin plug = (IPhysicsPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
96 plug.Init();
97 this._plugins.Add(plug.GetName(),plug);
98
99 }
100
101 typeInterface = null;
102 }
103 }
104 }
105
106 pluginAssembly = null;
107 }
108 }
109
110 public interface IPhysicsPlugin
111 {
112 bool Init();
113 PhysicsScene GetScene();
114 string GetName();
115 void Dispose();
116 }
117}
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs
deleted file mode 100644
index 8128457..0000000
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs
+++ /dev/null
@@ -1,114 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using OpenSim.Framework.Console;
33
34namespace OpenSim.Physics.Manager
35{
36 public abstract class PhysicsScene
37 {
38 public static PhysicsScene Null
39 {
40 get
41 {
42 return new NullPhysicsScene();
43 }
44 }
45
46 public abstract PhysicsActor AddAvatar(PhysicsVector position);
47
48 public abstract void RemoveAvatar(PhysicsActor actor);
49
50 public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size);
51
52 public abstract void Simulate(float timeStep);
53
54 public abstract void GetResults();
55
56 public abstract void SetTerrain(float[] heightMap);
57
58 public abstract void DeleteTerrain();
59
60 public abstract bool IsThreaded
61 {
62 get;
63 }
64 }
65
66 public class NullPhysicsScene : PhysicsScene
67 {
68 private static int m_workIndicator;
69
70 public override PhysicsActor AddAvatar(PhysicsVector position)
71 {
72 MainConsole.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position);
73 return PhysicsActor.Null;
74 }
75
76 public override void RemoveAvatar(PhysicsActor actor)
77 {
78
79 }
80
81 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
82 {
83 MainConsole.Instance.Verbose( "NullPhysicsScene : AddPrim({0},{1})", position, size);
84 return PhysicsActor.Null;
85 }
86
87 public override void Simulate(float timeStep)
88 {
89 m_workIndicator = (m_workIndicator + 1) % 10;
90
91 //OpenSim.Framework.Console.MainConsole.Instance.SetStatus(m_workIndicator.ToString());
92 }
93
94 public override void GetResults()
95 {
96 MainConsole.Instance.Verbose( "NullPhysicsScene : GetResults()");
97 }
98
99 public override void SetTerrain(float[] heightMap)
100 {
101 MainConsole.Instance.Verbose( "NullPhysicsScene : SetTerrain({0} items)", heightMap.Length);
102 }
103
104 public override void DeleteTerrain()
105 {
106
107 }
108
109 public override bool IsThreaded
110 {
111 get { return false; }
112 }
113 }
114}
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs
deleted file mode 100644
index 8f3514f..0000000
--- a/OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Physics.Manager
34{
35 public class PhysicsVector
36 {
37 public float X;
38 public float Y;
39 public float Z;
40
41 public PhysicsVector()
42 {
43
44 }
45
46 public PhysicsVector(float x, float y, float z)
47 {
48 X = x;
49 Y = y;
50 Z = z;
51 }
52
53 public static readonly PhysicsVector Zero = new PhysicsVector(0f, 0f, 0f);
54 }
55}
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/AssemblyInfo.cs b/OpenSim/OpenSim.Physics/OdePlugin/AssemblyInfo.cs
deleted file mode 100644
index b49c8da..0000000
--- a/OpenSim/OpenSim.Physics/OdePlugin/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("RealPhysXplugin")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("RealPhysXplugin")]
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/OpenSim.Physics/OdePlugin/OdePlugin.cs b/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
deleted file mode 100644
index 6758f76..0000000
--- a/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
+++ /dev/null
@@ -1,457 +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 OpenSim.Physics.Manager;
31using Ode.NET;
32
33namespace OpenSim.Physics.OdePlugin
34{
35 /// <summary>
36 /// ODE plugin
37 /// </summary>
38 public class OdePlugin : IPhysicsPlugin
39 {
40 private OdeScene _mScene;
41
42 public OdePlugin()
43 {
44
45 }
46
47 public bool Init()
48 {
49 return true;
50 }
51
52 public PhysicsScene GetScene()
53 {
54 if (_mScene == null)
55 {
56 _mScene = new OdeScene();
57 }
58 return (_mScene);
59 }
60
61 public string GetName()
62 {
63 return ("OpenDynamicsEngine");
64 }
65
66 public void Dispose()
67 {
68
69 }
70 }
71
72 public class OdeScene : PhysicsScene
73 {
74 static public IntPtr world;
75 static public IntPtr space;
76 static private IntPtr contactgroup;
77 static private IntPtr LandGeom;
78 //static private IntPtr Land;
79 private double[] _heightmap;
80 static private d.NearCallback nearCallback = near;
81 private List<OdeCharacter> _characters = new List<OdeCharacter>();
82 private static d.ContactGeom[] contacts = new d.ContactGeom[30];
83 private static d.Contact contact;
84
85 public OdeScene()
86 {
87 contact.surface.mode |= d.ContactFlags.Approx1 | d.ContactFlags.SoftCFM | d.ContactFlags.SoftERP;
88 contact.surface.mu = 10.0f;
89 contact.surface.bounce = 0.9f;
90 contact.surface.soft_erp = 0.005f;
91 contact.surface.soft_cfm = 0.00003f;
92
93 world = d.WorldCreate();
94 space = d.HashSpaceCreate(IntPtr.Zero);
95 contactgroup = d.JointGroupCreate(0);
96 d.WorldSetGravity(world, 0.0f, 0.0f, -10.0f);
97 d.WorldSetAutoDisableFlag(world, false);
98 d.WorldSetContactSurfaceLayer(world, 0.001f);
99 this._heightmap = new double[65536];
100 }
101
102 // This function blatantly ripped off from BoxStack.cs
103 static private void near(IntPtr space, IntPtr g1, IntPtr g2)
104 {
105 IntPtr b1 = d.GeomGetBody(g1);
106 IntPtr b2 = d.GeomGetBody(g2);
107 if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact))
108 return;
109
110 int count = d.Collide(g1, g2, 500, contacts, d.ContactGeom.SizeOf);
111 for (int i = 0; i < count; ++i)
112 {
113 contact.geom = contacts[i];
114 IntPtr joint = d.JointCreateContact(world, contactgroup, ref contact);
115 d.JointAttach(joint, b1, b2);
116 }
117
118 }
119
120 public override PhysicsActor AddAvatar(PhysicsVector position)
121 {
122 PhysicsVector pos = new PhysicsVector();
123 pos.X = position.X;
124 pos.Y = position.Y;
125 pos.Z = position.Z + 20;
126 OdeCharacter newAv = new OdeCharacter(this, pos);
127 this._characters.Add(newAv);
128 return newAv;
129 }
130
131 public override void RemoveAvatar(PhysicsActor actor)
132 {
133
134 }
135
136 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
137 {
138 PhysicsVector pos = new PhysicsVector();
139 pos.X = position.X;
140 pos.Y = position.Y;
141 pos.Z = position.Z;
142 PhysicsVector siz = new PhysicsVector();
143 siz.X = size.X;
144 siz.Y = size.Y;
145 siz.Z = size.Z;
146 return new OdePrim();
147 }
148
149 public override void Simulate(float timeStep)
150 {
151 foreach (OdeCharacter actor in _characters)
152 {
153 actor.Move(timeStep);
154 }
155 d.SpaceCollide(space, IntPtr.Zero, nearCallback);
156 for (int i = 0; i < 50; i++)
157 {
158 d.WorldQuickStep(world, timeStep * 0.02f);
159 }
160
161 d.JointGroupEmpty(contactgroup);
162 foreach (OdeCharacter actor in _characters)
163 {
164 actor.UpdatePosition();
165 }
166 }
167
168 public override void GetResults()
169 {
170
171 }
172
173 public override bool IsThreaded
174 {
175 get
176 {
177 return (false); // for now we won't be multithreaded
178 }
179 }
180
181 public override void SetTerrain(float[] heightMap)
182 {
183 for (int i = 0; i < 65536; i++)
184 {
185 // this._heightmap[i] = (double)heightMap[i];
186 // dbm (danx0r) -- heightmap x,y must be swapped for Ode (should fix ODE, but for now...)
187 int x = i & 0xff;
188 int y = i >> 8;
189 this._heightmap[i] = (double)heightMap[x * 256 + y];
190 }
191 IntPtr HeightmapData = d.GeomHeightfieldDataCreate();
192 d.GeomHeightfieldDataBuildDouble(HeightmapData, _heightmap, 0, 256, 256, 256, 256, 1.0f, 0.0f, 2.0f, 0);
193 d.GeomHeightfieldDataSetBounds(HeightmapData, 256, 256);
194 LandGeom = d.CreateHeightfield(space, HeightmapData, 1);
195 d.Matrix3 R = new d.Matrix3();
196
197 Axiom.MathLib.Quaternion q1 =Axiom.MathLib.Quaternion.FromAngleAxis(1.5707f, new Axiom.MathLib.Vector3(1,0,0));
198 Axiom.MathLib.Quaternion q2 =Axiom.MathLib.Quaternion.FromAngleAxis(1.5707f, new Axiom.MathLib.Vector3(0,1,0));
199 //Axiom.MathLib.Quaternion q3 = Axiom.MathLib.Quaternion.FromAngleAxis(3.14f, new Axiom.MathLib.Vector3(0, 0, 1));
200
201 q1 = q1 * q2;
202 //q1 = q1 * q3;
203 Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3();
204 float angle = 0;
205 q1.ToAngleAxis(ref angle, ref v3);
206
207 d.RFromAxisAndAngle(out R, v3.x, v3.y, v3.z, angle);
208 d.GeomSetRotation(LandGeom, ref R);
209 d.GeomSetPosition(LandGeom, 128, 128, 0);
210 }
211
212 public override void DeleteTerrain()
213 {
214
215 }
216 }
217
218 public class OdeCharacter : PhysicsActor
219 {
220 private PhysicsVector _position;
221 private PhysicsVector _velocity;
222 private PhysicsVector _acceleration;
223 private bool flying = false;
224 //private float gravityAccel;
225 private IntPtr BoundingCapsule;
226 IntPtr capsule_geom;
227 d.Mass capsule_mass;
228
229 public OdeCharacter(OdeScene parent_scene, PhysicsVector pos)
230 {
231 _velocity = new PhysicsVector();
232 _position = pos;
233 _acceleration = new PhysicsVector();
234 d.MassSetCapsule(out capsule_mass, 50.0f, 3, 0.5f, 2f);
235 capsule_geom = d.CreateSphere(OdeScene.space, 1.0f); /// not a typo! Spheres roll, capsules tumble
236 this.BoundingCapsule = d.BodyCreate(OdeScene.world);
237 d.BodySetMass(BoundingCapsule, ref capsule_mass);
238 d.BodySetPosition(BoundingCapsule, pos.X, pos.Y, pos.Z);
239 d.GeomSetBody(capsule_geom, BoundingCapsule);
240 }
241
242 public override bool Flying
243 {
244 get
245 {
246 return flying;
247 }
248 set
249 {
250 flying = value;
251 }
252 }
253
254 public override PhysicsVector Position
255 {
256 get
257 {
258 return _position;
259 }
260 set
261 {
262 _position = value;
263 }
264 }
265
266 public override PhysicsVector Velocity
267 {
268 get
269 {
270 return _velocity;
271 }
272 set
273 {
274 _velocity = value;
275 }
276 }
277
278 public override bool Kinematic
279 {
280 get
281 {
282 return false;
283 }
284 set
285 {
286
287 }
288 }
289
290 public override Axiom.MathLib.Quaternion Orientation
291 {
292 get
293 {
294 return Axiom.MathLib.Quaternion.Identity;
295 }
296 set
297 {
298
299 }
300 }
301
302 public override PhysicsVector Acceleration
303 {
304 get
305 {
306 return _acceleration;
307 }
308
309 }
310 public void SetAcceleration(PhysicsVector accel)
311 {
312 this._acceleration = accel;
313 }
314
315 public override void AddForce(PhysicsVector force)
316 {
317
318 }
319
320 public override void SetMomentum(PhysicsVector momentum)
321 {
322
323 }
324
325 public void Move(float timeStep)
326 {
327 PhysicsVector vec = new PhysicsVector();
328 d.Vector3 vel = d.BodyGetLinearVel(BoundingCapsule);
329 vec.X = (vel.X - this._velocity.X) * -75000.0f;
330 vec.Y = (vel.Y - this._velocity.Y) * -75000.0f;
331 if (flying)
332 {
333 vec.Z = (vel.Z - this._velocity.Z) * -75000.0f;
334 }
335 d.BodyAddForce(this.BoundingCapsule, vec.X, vec.Y, vec.Z);
336 }
337
338 public void UpdatePosition()
339 {
340 d.Vector3 vec = d.BodyGetPosition(BoundingCapsule);
341 this._position.X = vec.X;
342 this._position.Y = vec.Y;
343 this._position.Z = vec.Z;
344 }
345 }
346
347 public class OdePrim : PhysicsActor
348 {
349 private PhysicsVector _position;
350 private PhysicsVector _velocity;
351 private PhysicsVector _acceleration;
352
353 public OdePrim()
354 {
355 _velocity = new PhysicsVector();
356 _position = new PhysicsVector();
357 _acceleration = new PhysicsVector();
358 }
359 public override bool Flying
360 {
361 get
362 {
363 return false; //no flying prims for you
364 }
365 set
366 {
367
368 }
369 }
370 public override PhysicsVector Position
371 {
372 get
373 {
374 PhysicsVector pos = new PhysicsVector();
375 // PhysicsVector vec = this._prim.Position;
376 //pos.X = vec.X;
377 //pos.Y = vec.Y;
378 //pos.Z = vec.Z;
379 return pos;
380
381 }
382 set
383 {
384 /*PhysicsVector vec = value;
385 PhysicsVector pos = new PhysicsVector();
386 pos.X = vec.X;
387 pos.Y = vec.Y;
388 pos.Z = vec.Z;
389 this._prim.Position = pos;*/
390 }
391 }
392
393 public override PhysicsVector Velocity
394 {
395 get
396 {
397 return _velocity;
398 }
399 set
400 {
401 _velocity = value;
402 }
403 }
404
405 public override bool Kinematic
406 {
407 get
408 {
409 return false;
410 //return this._prim.Kinematic;
411 }
412 set
413 {
414 //this._prim.Kinematic = value;
415 }
416 }
417
418 public override Axiom.MathLib.Quaternion Orientation
419 {
420 get
421 {
422 Axiom.MathLib.Quaternion res = new Axiom.MathLib.Quaternion();
423 return res;
424 }
425 set
426 {
427
428 }
429 }
430
431 public override PhysicsVector Acceleration
432 {
433 get
434 {
435 return _acceleration;
436 }
437
438 }
439 public void SetAcceleration(PhysicsVector accel)
440 {
441 this._acceleration = accel;
442 }
443
444 public override void AddForce(PhysicsVector force)
445 {
446
447 }
448
449 public override void SetMomentum(PhysicsVector momentum)
450 {
451
452 }
453
454
455 }
456
457}
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj b/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj
deleted file mode 100644
index 08f54aa..0000000
--- a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.csproj
+++ /dev/null
@@ -1,97 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{63A05FE9-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.Physics.OdePlugin</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.Physics.OdePlugin</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\Physics\</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\Physics\</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="Axiom.MathLib.dll" >
62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="Ode.NET.dll" >
66 <HintPath>..\..\..\bin\Ode.NET.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System" >
70 <HintPath>System.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 </ItemGroup>
74 <ItemGroup>
75 <ProjectReference Include="..\Manager\OpenSim.Physics.Manager.csproj">
76 <Name>OpenSim.Physics.Manager</Name>
77 <Project>{8BE16150-0000-0000-0000-000000000000}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
79 <Private>False</Private>
80 </ProjectReference>
81 </ItemGroup>
82 <ItemGroup>
83 <Compile Include="AssemblyInfo.cs">
84 <SubType>Code</SubType>
85 </Compile>
86 <Compile Include="OdePlugin.cs">
87 <SubType>Code</SubType>
88 </Compile>
89 </ItemGroup>
90 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
91 <PropertyGroup>
92 <PreBuildEvent>
93 </PreBuildEvent>
94 <PostBuildEvent>
95 </PostBuildEvent>
96 </PropertyGroup>
97</Project>
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build b/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build
deleted file mode 100644
index c93c0c2..0000000
--- a/OpenSim/OpenSim.Physics/OdePlugin/OpenSim.Physics.OdePlugin.dll.build
+++ /dev/null
@@ -1,43 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.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.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.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/OpenSim.Physics/PhysXPlugin/AssemblyInfo.cs
deleted file mode 100644
index b49c8da..0000000
--- a/OpenSim/OpenSim.Physics/PhysXPlugin/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("RealPhysXplugin")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("RealPhysXplugin")]
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/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj b/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj
deleted file mode 100644
index aa89cc1..0000000
--- a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.csproj
+++ /dev/null
@@ -1,97 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{988F0AC4-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.Physics.PhysXPlugin</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.Physics.PhysXPlugin</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\Physics\</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\Physics\</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="Axiom.MathLib.dll" >
62 <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="PhysX_Wrapper_Dotnet.dll" >
66 <HintPath>..\..\..\bin\PhysX_Wrapper_Dotnet.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System" >
70 <HintPath>System.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 </ItemGroup>
74 <ItemGroup>
75 <ProjectReference Include="..\Manager\OpenSim.Physics.Manager.csproj">
76 <Name>OpenSim.Physics.Manager</Name>
77 <Project>{8BE16150-0000-0000-0000-000000000000}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
79 <Private>False</Private>
80 </ProjectReference>
81 </ItemGroup>
82 <ItemGroup>
83 <Compile Include="AssemblyInfo.cs">
84 <SubType>Code</SubType>
85 </Compile>
86 <Compile Include="PhysXPlugin.cs">
87 <SubType>Code</SubType>
88 </Compile>
89 </ItemGroup>
90 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
91 <PropertyGroup>
92 <PreBuildEvent>
93 </PreBuildEvent>
94 <PostBuildEvent>
95 </PostBuildEvent>
96 </PropertyGroup>
97</Project>
diff --git a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build b/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build
deleted file mode 100644
index be7a847..0000000
--- a/OpenSim/OpenSim.Physics/PhysXPlugin/OpenSim.Physics.PhysXPlugin.dll.build
+++ /dev/null
@@ -1,43 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Physics.PhysXPlugin" 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.Physics.PhysXPlugin" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="PhysXPlugin.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.Physics.Manager.dll" />
24 <include name="../../../bin/PhysX_Wrapper_Dotnet.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/PhysXPlugin.cs b/OpenSim/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs
deleted file mode 100644
index 802f983..0000000
--- a/OpenSim/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs
+++ /dev/null
@@ -1,424 +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 OpenSim.Physics.Manager;
31using PhysXWrapper;
32
33namespace OpenSim.Physics.PhysXPlugin
34{
35 /// <summary>
36 /// Will be the PhysX plugin but for now will be a very basic physics engine
37 /// </summary>
38 public class PhysXPlugin : IPhysicsPlugin
39 {
40 private PhysXScene _mScene;
41
42 public PhysXPlugin()
43 {
44
45 }
46
47 public bool Init()
48 {
49 return true;
50 }
51
52 public PhysicsScene GetScene()
53 {
54 if(_mScene == null)
55 {
56 _mScene = new PhysXScene();
57 }
58 return(_mScene);
59 }
60
61 public string GetName()
62 {
63 return("RealPhysX");
64 }
65
66 public void Dispose()
67 {
68
69 }
70 }
71
72 public class PhysXScene :PhysicsScene
73 {
74 private List<PhysXCharacter> _characters = new List<PhysXCharacter>();
75 private List<PhysXPrim> _prims = new List<PhysXPrim>();
76 private float[] _heightMap = null;
77 private NxPhysicsSDK mySdk;
78 private NxScene scene;
79
80 public PhysXScene()
81 {
82 mySdk = NxPhysicsSDK.CreateSDK();
83 Console.WriteLine("Sdk created - now creating scene");
84 scene = mySdk.CreateScene();
85
86 }
87
88 public override PhysicsActor AddAvatar(PhysicsVector position)
89 {
90 Vec3 pos = new Vec3();
91 pos.X = position.X;
92 pos.Y = position.Y;
93 pos.Z = position.Z;
94 PhysXCharacter act = new PhysXCharacter( scene.AddCharacter(pos));
95 act.Position = position;
96 _characters.Add(act);
97 return act;
98 }
99
100 public override void RemoveAvatar(PhysicsActor actor)
101 {
102
103 }
104
105 public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
106 {
107 Vec3 pos = new Vec3();
108 pos.X = position.X;
109 pos.Y = position.Y;
110 pos.Z = position.Z;
111 Vec3 siz = new Vec3();
112 siz.X = size.X;
113 siz.Y = size.Y;
114 siz.Z = size.Z;
115 PhysXPrim act = new PhysXPrim( scene.AddNewBox(pos, siz));
116 _prims.Add(act);
117 return act;
118 }
119 public override void Simulate(float timeStep)
120 {
121 try
122 {
123 foreach (PhysXCharacter actor in _characters)
124 {
125 actor.Move(timeStep);
126 }
127 scene.Simulate(timeStep);
128 scene.FetchResults();
129 scene.UpdateControllers();
130
131 foreach (PhysXCharacter actor in _characters)
132 {
133 actor.UpdatePosition();
134 }
135 }
136 catch (Exception e)
137 {
138 Console.WriteLine(e.Message);
139 }
140
141 }
142
143 public override void GetResults()
144 {
145
146 }
147
148 public override bool IsThreaded
149 {
150 get
151 {
152 return(false); // for now we won't be multithreaded
153 }
154 }
155
156 public override void SetTerrain(float[] heightMap)
157 {
158 if (this._heightMap != null)
159 {
160 Console.WriteLine("PhysX - deleting old terrain");
161 this.scene.DeleteTerrain();
162 }
163 this._heightMap = heightMap;
164 this.scene.AddTerrain(heightMap);
165 }
166
167 public override void DeleteTerrain()
168 {
169 this.scene.DeleteTerrain();
170 }
171 }
172
173 public class PhysXCharacter : PhysicsActor
174 {
175 private PhysicsVector _position;
176 private PhysicsVector _velocity;
177 private PhysicsVector _acceleration;
178 private NxCharacter _character;
179 private bool flying;
180 private float gravityAccel;
181
182 public PhysXCharacter(NxCharacter character)
183 {
184 _velocity = new PhysicsVector();
185 _position = new PhysicsVector();
186 _acceleration = new PhysicsVector();
187 _character = character;
188 }
189
190 public override bool Flying
191 {
192 get
193 {
194 return flying;
195 }
196 set
197 {
198 flying = value;
199 }
200 }
201
202 public override PhysicsVector Position
203 {
204 get
205 {
206 return _position;
207 }
208 set
209 {
210 _position = value;
211 Vec3 ps = new Vec3();
212 ps.X = value.X;
213 ps.Y = value.Y;
214 ps.Z = value.Z;
215 this._character.Position = ps;
216 }
217 }
218
219 public override PhysicsVector Velocity
220 {
221 get
222 {
223 return _velocity;
224 }
225 set
226 {
227 _velocity = value;
228 }
229 }
230
231 public override bool Kinematic
232 {
233 get
234 {
235 return false;
236 }
237 set
238 {
239
240 }
241 }
242
243 public override Axiom.MathLib.Quaternion Orientation
244 {
245 get
246 {
247 return Axiom.MathLib.Quaternion.Identity;
248 }
249 set
250 {
251
252 }
253 }
254
255 public override PhysicsVector Acceleration
256 {
257 get
258 {
259 return _acceleration;
260 }
261
262 }
263 public void SetAcceleration (PhysicsVector accel)
264 {
265 this._acceleration = accel;
266 }
267
268 public override void AddForce(PhysicsVector force)
269 {
270
271 }
272
273 public override void SetMomentum(PhysicsVector momentum)
274 {
275
276 }
277
278 public void Move(float timeStep)
279 {
280 Vec3 vec = new Vec3();
281 vec.X = this._velocity.X * timeStep;
282 vec.Y = this._velocity.Y * timeStep;
283 if(flying)
284 {
285 vec.Z = ( this._velocity.Z) * timeStep;
286 }
287 else
288 {
289 gravityAccel+= -9.8f;
290 vec.Z = (gravityAccel + this._velocity.Z) * timeStep;
291 }
292 int res = this._character.Move(vec);
293 if(res == 1)
294 {
295 gravityAccel = 0;
296 }
297 }
298
299 public void UpdatePosition()
300 {
301 Vec3 vec = this._character.Position;
302 this._position.X = vec.X;
303 this._position.Y = vec.Y;
304 this._position.Z = vec.Z;
305 }
306 }
307
308 public class PhysXPrim : PhysicsActor
309 {
310 private PhysicsVector _position;
311 private PhysicsVector _velocity;
312 private PhysicsVector _acceleration;
313 private NxActor _prim;
314
315 public PhysXPrim(NxActor prim)
316 {
317 _velocity = new PhysicsVector();
318 _position = new PhysicsVector();
319 _acceleration = new PhysicsVector();
320 _prim = prim;
321 }
322 public override bool Flying
323 {
324 get
325 {
326 return false; //no flying prims for you
327 }
328 set
329 {
330
331 }
332 }
333 public override PhysicsVector Position
334 {
335 get
336 {
337 PhysicsVector pos = new PhysicsVector();
338 Vec3 vec = this._prim.Position;
339 pos.X = vec.X;
340 pos.Y = vec.Y;
341 pos.Z = vec.Z;
342 return pos;
343
344 }
345 set
346 {
347 PhysicsVector vec = value;
348 Vec3 pos = new Vec3();
349 pos.X = vec.X;
350 pos.Y = vec.Y;
351 pos.Z = vec.Z;
352 this._prim.Position = pos;
353 }
354 }
355
356 public override PhysicsVector Velocity
357 {
358 get
359 {
360 return _velocity;
361 }
362 set
363 {
364 _velocity = value;
365 }
366 }
367
368 public override bool Kinematic
369 {
370 get
371 {
372 return this._prim.Kinematic;
373 }
374 set
375 {
376 this._prim.Kinematic = value;
377 }
378 }
379
380 public override Axiom.MathLib.Quaternion Orientation
381 {
382 get
383 {
384 Axiom.MathLib.Quaternion res = new Axiom.MathLib.Quaternion();
385 PhysXWrapper.Quaternion quat = this._prim.GetOrientation();
386 res.w = quat.W;
387 res.x = quat.X;
388 res.y = quat.Y;
389 res.z = quat.Z;
390 return res;
391 }
392 set
393 {
394
395 }
396 }
397
398 public override PhysicsVector Acceleration
399 {
400 get
401 {
402 return _acceleration;
403 }
404
405 }
406 public void SetAcceleration (PhysicsVector accel)
407 {
408 this._acceleration = accel;
409 }
410
411 public override void AddForce(PhysicsVector force)
412 {
413
414 }
415
416 public override void SetMomentum(PhysicsVector momentum)
417 {
418
419 }
420
421
422 }
423
424}
diff --git a/OpenSim/OpenSim.RegionServer/AgentAssetUpload.cs b/OpenSim/OpenSim.RegionServer/AgentAssetUpload.cs
deleted file mode 100644
index 6781781..0000000
--- a/OpenSim/OpenSim.RegionServer/AgentAssetUpload.cs
+++ /dev/null
@@ -1,259 +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 OpenSim.RegionServer.Assets;
32using OpenSim.RegionServer.Client;
33using OpenSim.Framework.Types;
34using OpenSim.Framework.Utilities;
35using libsecondlife;
36using libsecondlife.Packets;
37
38namespace OpenSim.RegionServer
39{
40 public class AgentAssetUpload
41 {
42 private Dictionary<LLUUID, AssetTransaction> transactions = new Dictionary<LLUUID, AssetTransaction>();
43 private ClientView ourClient;
44 private AssetCache m_assetCache;
45 private InventoryCache m_inventoryCache;
46
47 public AgentAssetUpload(ClientView client, AssetCache assetCache, InventoryCache inventoryCache)
48 {
49 this.ourClient = client;
50 m_assetCache = assetCache;
51 m_inventoryCache = inventoryCache;
52 }
53
54 public void AddUpload(LLUUID transactionID, AssetBase asset)
55 {
56 AssetTransaction upload = new AssetTransaction();
57 lock (this.transactions)
58 {
59 upload.Asset = asset;
60 upload.TransactionID = transactionID;
61 this.transactions.Add(transactionID, upload);
62 }
63 if (upload.Asset.Data.Length > 2)
64 {
65 //is complete
66 upload.UploadComplete = true;
67 AssetUploadCompletePacket response = new AssetUploadCompletePacket();
68 response.AssetBlock.Type = asset.Type;
69 response.AssetBlock.Success = true;
70 response.AssetBlock.UUID = transactionID.Combine(this.ourClient.SecureSessionID);
71 this.ourClient.OutPacket(response);
72 m_assetCache.AddAsset(asset);
73 }
74 else
75 {
76 upload.UploadComplete = false;
77 upload.XferID = Util.GetNextXferID();
78 RequestXferPacket xfer = new RequestXferPacket();
79 xfer.XferID.ID = upload.XferID;
80 xfer.XferID.VFileType = upload.Asset.Type;
81 xfer.XferID.VFileID = transactionID.Combine(this.ourClient.SecureSessionID);
82 xfer.XferID.FilePath = 0;
83 xfer.XferID.Filename = new byte[0];
84 this.ourClient.OutPacket(xfer);
85 }
86
87 }
88
89 public AssetBase GetUpload(LLUUID transactionID)
90 {
91 if (this.transactions.ContainsKey(transactionID))
92 {
93 return this.transactions[transactionID].Asset;
94 }
95
96 return null;
97 }
98
99 public void HandleUploadPacket(AssetUploadRequestPacket pack, LLUUID assetID)
100 {
101 // Console.Write("asset upload request , type = " + pack.AssetBlock.Type.ToString());
102 AssetBase asset = null;
103 if (pack.AssetBlock.Type == 0)
104 {
105
106 //first packet for transaction
107 asset = new AssetBase();
108 asset.FullID = assetID;
109 asset.Type = pack.AssetBlock.Type;
110 asset.InvType = asset.Type;
111 asset.Name = "UploadedTexture" + Util.RandomClass.Next(1, 1000).ToString("000");
112 asset.Data = pack.AssetBlock.AssetData;
113
114
115 }
116 else if (pack.AssetBlock.Type == 13 | pack.AssetBlock.Type == 5 | pack.AssetBlock.Type == 7)
117 {
118
119 asset = new AssetBase();
120 asset.FullID = assetID;
121 asset.Type = pack.AssetBlock.Type;
122 asset.InvType = asset.Type;
123 asset.Name = "NewClothing" + Util.RandomClass.Next(1, 1000).ToString("000");
124 asset.Data = pack.AssetBlock.AssetData;
125
126
127 }
128
129 if (asset != null)
130 {
131 this.AddUpload(pack.AssetBlock.TransactionID, asset);
132 }
133 else
134 {
135
136 //currently we don't support this asset type
137 //so lets just tell the client that the upload is complete
138 AssetUploadCompletePacket response = new AssetUploadCompletePacket();
139 response.AssetBlock.Type = pack.AssetBlock.Type;
140 response.AssetBlock.Success = true;
141 response.AssetBlock.UUID = pack.AssetBlock.TransactionID.Combine(this.ourClient.SecureSessionID);
142 this.ourClient.OutPacket(response);
143 }
144
145 }
146
147 #region Xfer packet system for larger uploads
148
149 public void HandleXferPacket(SendXferPacketPacket xferPacket)
150 {
151 lock (this.transactions)
152 {
153 foreach (AssetTransaction trans in this.transactions.Values)
154 {
155 if (trans.XferID == xferPacket.XferID.ID)
156 {
157 if (trans.Asset.Data.Length > 1)
158 {
159 byte[] newArray = new byte[trans.Asset.Data.Length + xferPacket.DataPacket.Data.Length];
160 Array.Copy(trans.Asset.Data, 0, newArray, 0, trans.Asset.Data.Length);
161 Array.Copy(xferPacket.DataPacket.Data, 0, newArray, trans.Asset.Data.Length, xferPacket.DataPacket.Data.Length);
162 trans.Asset.Data = newArray;
163 }
164 else
165 {
166 byte[] newArray = new byte[xferPacket.DataPacket.Data.Length - 4];
167 Array.Copy(xferPacket.DataPacket.Data, 4, newArray, 0, xferPacket.DataPacket.Data.Length - 4);
168 trans.Asset.Data = newArray;
169 }
170
171 if ((xferPacket.XferID.Packet & 2147483648) != 0)
172 {
173 //end of transfer
174 trans.UploadComplete = true;
175 AssetUploadCompletePacket response = new AssetUploadCompletePacket();
176 response.AssetBlock.Type = trans.Asset.Type;
177 response.AssetBlock.Success = true;
178 response.AssetBlock.UUID = trans.TransactionID.Combine(this.ourClient.SecureSessionID);
179 this.ourClient.OutPacket(response);
180
181 m_assetCache.AddAsset(trans.Asset);
182 //check if we should add it to inventory
183 if (trans.AddToInventory)
184 {
185 // m_assetCache.AddAsset(trans.Asset);
186 m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset);
187 }
188
189
190 }
191 break;
192 }
193
194 }
195 }
196
197 ConfirmXferPacketPacket confirmXfer = new ConfirmXferPacketPacket();
198 confirmXfer.XferID.ID = xferPacket.XferID.ID;
199 confirmXfer.XferID.Packet = xferPacket.XferID.Packet;
200 this.ourClient.OutPacket(confirmXfer);
201 }
202
203 #endregion
204
205 public AssetBase AddUploadToAssetCache(LLUUID transactionID)
206 {
207 AssetBase asset = null;
208 if (this.transactions.ContainsKey(transactionID))
209 {
210 AssetTransaction trans = this.transactions[transactionID];
211 if (trans.UploadComplete)
212 {
213 m_assetCache.AddAsset(trans.Asset);
214 asset = trans.Asset;
215 }
216 }
217
218 return asset;
219 }
220
221 public void CreateInventoryItem(CreateInventoryItemPacket packet)
222 {
223 if (this.transactions.ContainsKey(packet.InventoryBlock.TransactionID))
224 {
225 AssetTransaction trans = this.transactions[packet.InventoryBlock.TransactionID];
226 trans.Asset.Description = Util.FieldToString(packet.InventoryBlock.Description);
227 trans.Asset.Name = Util.FieldToString(packet.InventoryBlock.Name);
228 trans.Asset.Type = packet.InventoryBlock.Type;
229 trans.Asset.InvType = packet.InventoryBlock.InvType;
230 if (trans.UploadComplete)
231 {
232 //already complete so we can add it to the inventory
233 //m_assetCache.AddAsset(trans.Asset);
234 m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset);
235 }
236 else
237 {
238 trans.AddToInventory = true;
239 trans.InventFolder = packet.InventoryBlock.FolderID;
240 }
241 }
242 }
243
244 private class AssetTransaction
245 {
246 public uint XferID;
247 public AssetBase Asset;
248 public bool AddToInventory;
249 public LLUUID InventFolder = LLUUID.Zero;
250 public bool UploadComplete = false;
251 public LLUUID TransactionID = LLUUID.Zero;
252
253 public AssetTransaction()
254 {
255
256 }
257 }
258 }
259}
diff --git a/OpenSim/OpenSim.RegionServer/Assets/AssetCache.cs b/OpenSim/OpenSim.RegionServer/Assets/AssetCache.cs
deleted file mode 100644
index 466f9f9..0000000
--- a/OpenSim/OpenSim.RegionServer/Assets/AssetCache.cs
+++ /dev/null
@@ -1,572 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Threading;
32using libsecondlife;
33using libsecondlife.Packets;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36using OpenSim.Framework.Utilities;
37using OpenSim.Framework.Console;
38using OpenSim.RegionServer.Client;
39
40namespace OpenSim.RegionServer.Assets
41{
42 /// <summary>
43 /// Manages local cache of assets and their sending to viewers.
44 /// </summary>
45 public class AssetCache : IAssetReceiver
46 {
47 public Dictionary<libsecondlife.LLUUID, AssetInfo> Assets;
48 public Dictionary<libsecondlife.LLUUID, TextureImage> Textures;
49
50 public List<AssetRequest> AssetRequests = new List<AssetRequest>(); //assets ready to be sent to viewers
51 public List<AssetRequest> TextureRequests = new List<AssetRequest>(); //textures ready to be sent
52
53 public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); //Assets requested from the asset server
54 public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>(); //Textures requested from the asset server
55
56 private IAssetServer _assetServer;
57 private Thread _assetCacheThread;
58 private LLUUID[] textureList = new LLUUID[5];
59
60 /// <summary>
61 ///
62 /// </summary>
63 public AssetCache(IAssetServer assetServer)
64 {
65 MainConsole.Instance.Verbose("Creating Asset cache");
66 _assetServer = assetServer;
67 _assetServer.SetReceiver(this);
68 Assets = new Dictionary<libsecondlife.LLUUID, AssetInfo>();
69 Textures = new Dictionary<libsecondlife.LLUUID, TextureImage>();
70 this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
71 this._assetCacheThread.IsBackground = true;
72 this._assetCacheThread.Start();
73
74 }
75
76 /// <summary>
77 ///
78 /// </summary>
79 public void RunAssetManager()
80 {
81 while (true)
82 {
83 try
84 {
85 this.ProcessAssetQueue();
86 this.ProcessTextureQueue();
87 Thread.Sleep(500);
88 }
89 catch (Exception e)
90 {
91 MainConsole.Instance.Error(e.Message);
92 }
93 }
94 }
95
96 public void LoadDefaultTextureSet()
97 {
98 //hack: so we can give each user a set of textures
99 textureList[0] = new LLUUID("00000000-0000-0000-9999-000000000001");
100 textureList[1] = new LLUUID("00000000-0000-0000-9999-000000000002");
101 textureList[2] = new LLUUID("00000000-0000-0000-9999-000000000003");
102 textureList[3] = new LLUUID("00000000-0000-0000-9999-000000000004");
103 textureList[4] = new LLUUID("00000000-0000-0000-9999-000000000005");
104
105 for (int i = 0; i < textureList.Length; i++)
106 {
107 this._assetServer.RequestAsset(textureList[i], true);
108 }
109
110 }
111
112 public AssetBase[] CreateNewInventorySet(LLUUID agentID)
113 {
114 AssetBase[] inventorySet = new AssetBase[this.textureList.Length];
115 for (int i = 0; i < textureList.Length; i++)
116 {
117 if (this.Textures.ContainsKey(textureList[i]))
118 {
119 inventorySet[i] = this.CloneImage(agentID, this.Textures[textureList[i]]);
120 TextureImage image = new TextureImage(inventorySet[i]);
121 this.Textures.Add(image.FullID, image);
122 this._assetServer.UploadNewAsset(image); //save the asset to the asset server
123 }
124 }
125 return inventorySet;
126 }
127
128 public AssetBase GetAsset(LLUUID assetID)
129 {
130 AssetBase asset = null;
131 if(this.Textures.ContainsKey(assetID))
132 {
133 asset = this.Textures[assetID];
134 }
135 else if (this.Assets.ContainsKey(assetID))
136 {
137 asset = this.Assets[assetID];
138 }
139 return asset;
140 }
141
142 public void AddAsset(AssetBase asset)
143 {
144 if (asset.Type == 0)
145 {
146 if (!this.Textures.ContainsKey(asset.FullID))
147 { //texture
148 TextureImage textur = new TextureImage(asset);
149 this.Textures.Add(textur.FullID, textur);
150 this._assetServer.UploadNewAsset(asset);
151 }
152 }
153 else
154 {
155 if (!this.Assets.ContainsKey(asset.FullID))
156 {
157 AssetInfo assetInf = new AssetInfo(asset);
158 this.Assets.Add(assetInf.FullID, assetInf);
159 this._assetServer.UploadNewAsset(asset);
160 }
161 }
162 }
163
164 /// <summary>
165 ///
166 /// </summary>
167 private void ProcessTextureQueue()
168 {
169 if (this.TextureRequests.Count == 0)
170 {
171 //no requests waiting
172 return;
173 }
174 int num;
175
176 if (this.TextureRequests.Count < 5)
177 {
178 //lower than 5 so do all of them
179 num = this.TextureRequests.Count;
180 }
181 else
182 {
183 num = 5;
184 }
185 AssetRequest req;
186 for (int i = 0; i < num; i++)
187 {
188 req = (AssetRequest)this.TextureRequests[i];
189 if (req.PacketCounter != req.NumPackets)
190 {
191 // if (req.ImageInfo.FullID == new LLUUID("00000000-0000-0000-5005-000000000005"))
192 if (req.PacketCounter == 0)
193 {
194 //first time for this request so send imagedata packet
195 if (req.NumPackets == 1)
196 {
197 //only one packet so send whole file
198 ImageDataPacket im = new ImageDataPacket();
199 im.ImageID.Packets = 1;
200 im.ImageID.ID = req.ImageInfo.FullID;
201 im.ImageID.Size = (uint)req.ImageInfo.Data.Length;
202 im.ImageData.Data = req.ImageInfo.Data;
203 im.ImageID.Codec = 2;
204 req.RequestUser.OutPacket(im);
205 req.PacketCounter++;
206 //req.ImageInfo.l= time;
207 }
208 else
209 {
210 //more than one packet so split file up
211 ImageDataPacket im = new ImageDataPacket();
212 im.ImageID.Packets = (ushort)req.NumPackets;
213 im.ImageID.ID = req.ImageInfo.FullID;
214 im.ImageID.Size = (uint)req.ImageInfo.Data.Length;
215 im.ImageData.Data = new byte[600];
216 Array.Copy(req.ImageInfo.Data, 0, im.ImageData.Data, 0, 600);
217 im.ImageID.Codec = 2;
218 req.RequestUser.OutPacket(im);
219 req.PacketCounter++;
220 //req.ImageInfo.last_used = time;
221 }
222 }
223 else
224 {
225 //send imagepacket
226 //more than one packet so split file up
227 ImagePacketPacket im = new ImagePacketPacket();
228 im.ImageID.Packet = (ushort)req.PacketCounter;
229 im.ImageID.ID = req.ImageInfo.FullID;
230 int size = req.ImageInfo.Data.Length - 600 - 1000 * (req.PacketCounter - 1);
231 if (size > 1000) size = 1000;
232 im.ImageData.Data = new byte[size];
233 Array.Copy(req.ImageInfo.Data, 600 + 1000 * (req.PacketCounter - 1), im.ImageData.Data, 0, size);
234 req.RequestUser.OutPacket(im);
235 req.PacketCounter++;
236 //req.ImageInfo.last_used = time;
237 }
238 }
239 }
240
241 //remove requests that have been completed
242 int count = 0;
243 for (int i = 0; i < num; i++)
244 {
245 if (this.TextureRequests.Count > count)
246 {
247 req = (AssetRequest)this.TextureRequests[count];
248 if (req.PacketCounter == req.NumPackets)
249 {
250 this.TextureRequests.Remove(req);
251 }
252 else
253 {
254 count++;
255 }
256 }
257 }
258
259 }
260 public void AssetReceived(AssetBase asset, bool IsTexture)
261 {
262 if (asset.FullID != LLUUID.Zero) // if it is set to zero then the asset wasn't found by the server
263 {
264 //check if it is a texture or not
265 //then add to the correct cache list
266 //then check for waiting requests for this asset/texture (in the Requested lists)
267 //and move those requests into the Requests list.
268 if (IsTexture)
269 {
270 TextureImage image = new TextureImage(asset);
271 this.Textures.Add(image.FullID, image);
272 if (this.RequestedTextures.ContainsKey(image.FullID))
273 {
274 AssetRequest req = this.RequestedTextures[image.FullID];
275 req.ImageInfo = image;
276 if (image.Data.LongLength > 600)
277 {
278 //over 600 bytes so split up file
279 req.NumPackets = 1 + (int)(image.Data.Length - 600 + 999) / 1000;
280 }
281 else
282 {
283 req.NumPackets = 1;
284 }
285 this.RequestedTextures.Remove(image.FullID);
286 this.TextureRequests.Add(req);
287 }
288 }
289 else
290 {
291 AssetInfo assetInf = new AssetInfo(asset);
292 this.Assets.Add(assetInf.FullID, assetInf);
293 if (this.RequestedAssets.ContainsKey(assetInf.FullID))
294 {
295 AssetRequest req = this.RequestedAssets[assetInf.FullID];
296 req.AssetInf = assetInf;
297 if (assetInf.Data.LongLength > 600)
298 {
299 //over 600 bytes so split up file
300 req.NumPackets = 1 + (int)(assetInf.Data.Length - 600 + 999) / 1000;
301 }
302 else
303 {
304 req.NumPackets = 1;
305 }
306 this.RequestedAssets.Remove(assetInf.FullID);
307 this.AssetRequests.Add(req);
308 }
309 }
310 }
311 }
312
313 public void AssetNotFound(AssetBase asset)
314 {
315 //the asset server had no knowledge of requested asset
316
317 }
318
319 #region Assets
320 /// <summary>
321 ///
322 /// </summary>
323 /// <param name="userInfo"></param>
324 /// <param name="transferRequest"></param>
325 public void AddAssetRequest(ClientView userInfo, TransferRequestPacket transferRequest)
326 {
327 LLUUID requestID = new LLUUID(transferRequest.TransferInfo.Params, 0);
328 //check to see if asset is in local cache, if not we need to request it from asset server.
329 if (!this.Assets.ContainsKey(requestID))
330 {
331 //not found asset
332 // so request from asset server
333 if (!this.RequestedAssets.ContainsKey(requestID))
334 {
335 AssetRequest request = new AssetRequest();
336 request.RequestUser = userInfo;
337 request.RequestAssetID = requestID;
338 request.TransferRequestID = transferRequest.TransferInfo.TransferID;
339 this.RequestedAssets.Add(requestID, request);
340 this._assetServer.RequestAsset(requestID, false);
341 }
342 return;
343 }
344 //it is in our cache
345 AssetInfo asset = this.Assets[requestID];
346
347 //work out how many packets it should be sent in
348 // and add to the AssetRequests list
349 AssetRequest req = new AssetRequest();
350 req.RequestUser = userInfo;
351 req.RequestAssetID = requestID;
352 req.TransferRequestID = transferRequest.TransferInfo.TransferID;
353 req.AssetInf = asset;
354
355 if (asset.Data.LongLength > 600)
356 {
357 //over 600 bytes so split up file
358 req.NumPackets = 1 + (int)(asset.Data.Length - 600 + 999) / 1000;
359 }
360 else
361 {
362 req.NumPackets = 1;
363 }
364
365 this.AssetRequests.Add(req);
366 }
367
368 /// <summary>
369 ///
370 /// </summary>
371 private void ProcessAssetQueue()
372 {
373 if (this.AssetRequests.Count == 0)
374 {
375 //no requests waiting
376 return;
377 }
378 int num;
379
380 if (this.AssetRequests.Count < 5)
381 {
382 //lower than 5 so do all of them
383 num = this.AssetRequests.Count;
384 }
385 else
386 {
387 num = 5;
388 }
389 AssetRequest req;
390 for (int i = 0; i < num; i++)
391 {
392 req = (AssetRequest)this.AssetRequests[i];
393
394 TransferInfoPacket Transfer = new TransferInfoPacket();
395 Transfer.TransferInfo.ChannelType = 2;
396 Transfer.TransferInfo.Status = 0;
397 Transfer.TransferInfo.TargetType = 0;
398 Transfer.TransferInfo.Params = req.RequestAssetID.GetBytes();
399 Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length;
400 Transfer.TransferInfo.TransferID = req.TransferRequestID;
401 req.RequestUser.OutPacket(Transfer);
402
403 if (req.NumPackets == 1)
404 {
405 TransferPacketPacket TransferPacket = new TransferPacketPacket();
406 TransferPacket.TransferData.Packet = 0;
407 TransferPacket.TransferData.ChannelType = 2;
408 TransferPacket.TransferData.TransferID = req.TransferRequestID;
409 TransferPacket.TransferData.Data = req.AssetInf.Data;
410 TransferPacket.TransferData.Status = 1;
411 req.RequestUser.OutPacket(TransferPacket);
412 }
413 else
414 {
415 //more than one packet so split file up , for now it can't be bigger than 2000 bytes
416 TransferPacketPacket TransferPacket = new TransferPacketPacket();
417 TransferPacket.TransferData.Packet = 0;
418 TransferPacket.TransferData.ChannelType = 2;
419 TransferPacket.TransferData.TransferID = req.TransferRequestID;
420 byte[] chunk = new byte[1000];
421 Array.Copy(req.AssetInf.Data, chunk, 1000);
422 TransferPacket.TransferData.Data = chunk;
423 TransferPacket.TransferData.Status = 0;
424 req.RequestUser.OutPacket(TransferPacket);
425
426 TransferPacket = new TransferPacketPacket();
427 TransferPacket.TransferData.Packet = 1;
428 TransferPacket.TransferData.ChannelType = 2;
429 TransferPacket.TransferData.TransferID = req.TransferRequestID;
430 byte[] chunk1 = new byte[(req.AssetInf.Data.Length - 1000)];
431 Array.Copy(req.AssetInf.Data, 1000, chunk1, 0, chunk1.Length);
432 TransferPacket.TransferData.Data = chunk1;
433 TransferPacket.TransferData.Status = 1;
434 req.RequestUser.OutPacket(TransferPacket);
435 }
436
437 }
438
439 //remove requests that have been completed
440 for (int i = 0; i < num; i++)
441 {
442 this.AssetRequests.RemoveAt(0);
443 }
444
445 }
446
447 public AssetInfo CloneAsset(LLUUID newOwner, AssetInfo sourceAsset)
448 {
449 AssetInfo newAsset = new AssetInfo();
450 newAsset.Data = new byte[sourceAsset.Data.Length];
451 Array.Copy(sourceAsset.Data, newAsset.Data, sourceAsset.Data.Length);
452 newAsset.FullID = LLUUID.Random();
453 newAsset.Type = sourceAsset.Type;
454 newAsset.InvType = sourceAsset.InvType;
455 return (newAsset);
456 }
457 #endregion
458
459 #region Textures
460 /// <summary>
461 ///
462 /// </summary>
463 /// <param name="userInfo"></param>
464 /// <param name="imageID"></param>
465 public void AddTextureRequest(ClientView userInfo, LLUUID imageID)
466 {
467 //check to see if texture is in local cache, if not request from asset server
468 if (!this.Textures.ContainsKey(imageID))
469 {
470 if (!this.RequestedTextures.ContainsKey(imageID))
471 {
472 //not is cache so request from asset server
473 AssetRequest request = new AssetRequest();
474 request.RequestUser = userInfo;
475 request.RequestAssetID = imageID;
476 request.IsTextureRequest = true;
477 this.RequestedTextures.Add(imageID, request);
478 this._assetServer.RequestAsset(imageID, true);
479 }
480 return;
481 }
482
483 TextureImage imag = this.Textures[imageID];
484 AssetRequest req = new AssetRequest();
485 req.RequestUser = userInfo;
486 req.RequestAssetID = imageID;
487 req.IsTextureRequest = true;
488 req.ImageInfo = imag;
489
490 if (imag.Data.LongLength > 600)
491 {
492 //over 600 bytes so split up file
493 req.NumPackets = 1 + (int)(imag.Data.Length - 600 + 999) / 1000;
494 }
495 else
496 {
497 req.NumPackets = 1;
498 }
499 this.TextureRequests.Add(req);
500 }
501
502 public TextureImage CloneImage(LLUUID newOwner, TextureImage source)
503 {
504 TextureImage newImage = new TextureImage();
505 newImage.Data = new byte[source.Data.Length];
506 Array.Copy(source.Data, newImage.Data, source.Data.Length);
507 //newImage.filename = source.filename;
508 newImage.FullID = LLUUID.Random();
509 newImage.Name = source.Name;
510 return (newImage);
511 }
512 #endregion
513
514 }
515
516 public class AssetRequest
517 {
518 public ClientView RequestUser;
519 public LLUUID RequestAssetID;
520 public AssetInfo AssetInf;
521 public TextureImage ImageInfo;
522 public LLUUID TransferRequestID;
523 public long DataPointer = 0;
524 public int NumPackets = 0;
525 public int PacketCounter = 0;
526 public bool IsTextureRequest;
527 //public bool AssetInCache;
528 //public int TimeRequested;
529
530 public AssetRequest()
531 {
532
533 }
534 }
535
536 public class AssetInfo : AssetBase
537 {
538 public AssetInfo()
539 {
540
541 }
542
543 public AssetInfo(AssetBase aBase)
544 {
545 Data = aBase.Data;
546 FullID = aBase.FullID;
547 Type = aBase.Type;
548 InvType = aBase.InvType;
549 Name = aBase.Name;
550 Description = aBase.Description;
551 }
552 }
553
554 public class TextureImage : AssetBase
555 {
556 public TextureImage()
557 {
558
559 }
560
561 public TextureImage(AssetBase aBase)
562 {
563 Data = aBase.Data;
564 FullID = aBase.FullID;
565 Type = aBase.Type;
566 InvType = aBase.InvType;
567 Name = aBase.Name;
568 Description = aBase.Description;
569 }
570 }
571
572}
diff --git a/OpenSim/OpenSim.RegionServer/Assets/InventoryCache.cs b/OpenSim/OpenSim.RegionServer/Assets/InventoryCache.cs
deleted file mode 100644
index 9ed5dcb..0000000
--- a/OpenSim/OpenSim.RegionServer/Assets/InventoryCache.cs
+++ /dev/null
@@ -1,338 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using libsecondlife;
32using OpenSim;
33using libsecondlife.Packets;
34
35using OpenSim.Framework.Inventory;
36using OpenSim.Framework.Types;
37using OpenSim.Framework.Interfaces;
38using OpenSim.RegionServer.Client;
39
40namespace OpenSim.RegionServer.Assets
41{
42 /// <summary>
43 /// Description of InventoryManager.
44 /// </summary>
45 public class InventoryCache
46 {
47 private Dictionary<LLUUID, AgentInventory> _agentsInventory;
48 private List<UserServerRequest> _serverRequests; //list of requests made to user server.
49 private System.Text.Encoding _enc = System.Text.Encoding.ASCII;
50 private const uint FULL_MASK_PERMISSIONS = 2147483647;
51
52 public InventoryCache()
53 {
54 _agentsInventory = new Dictionary<LLUUID, AgentInventory>();
55 _serverRequests = new List<UserServerRequest>();
56 }
57
58 public void AddNewAgentsInventory(AgentInventory agentInventory)
59 {
60 if (!this._agentsInventory.ContainsKey(agentInventory.AgentID))
61 {
62 this._agentsInventory.Add(agentInventory.AgentID, agentInventory);
63 }
64 }
65
66 public AgentInventory FetchAgentsInventory(LLUUID agentID, IUserServer userserver)
67 {
68 AgentInventory res = null;
69 if (!this._agentsInventory.ContainsKey(agentID))
70 {
71 res = userserver.RequestAgentsInventory(agentID);
72 this._agentsInventory.Add(agentID,res);
73 }
74 return res;
75 }
76
77 public AgentInventory GetAgentsInventory(LLUUID agentID)
78 {
79 if (this._agentsInventory.ContainsKey(agentID))
80 {
81 return this._agentsInventory[agentID];
82 }
83
84 return null;
85 }
86
87 public void ClientLeaving(LLUUID clientID, IUserServer userserver)
88 {
89 if (this._agentsInventory.ContainsKey(clientID))
90 {
91 if (userserver != null)
92 {
93 userserver.UpdateAgentsInventory(clientID, this._agentsInventory[clientID]);
94 }
95 this._agentsInventory.Remove(clientID);
96 }
97 }
98
99 public bool CreateNewInventoryFolder(ClientView remoteClient, LLUUID folderID)
100 {
101 return this.CreateNewInventoryFolder(remoteClient, folderID, 0);
102 }
103
104 public bool CreateNewInventoryFolder(ClientView remoteClient, LLUUID folderID, ushort type)
105 {
106 bool res = false;
107 if (folderID != LLUUID.Zero) //don't create a folder with a zero id
108 {
109 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
110 {
111 res = this._agentsInventory[remoteClient.AgentID].CreateNewFolder(folderID, type);
112 }
113 }
114 return res;
115 }
116
117 public bool CreateNewInventoryFolder(ClientView remoteClient, LLUUID folderID, ushort type, string folderName, LLUUID parent)
118 {
119 bool res = false;
120 if (folderID != LLUUID.Zero) //don't create a folder with a zero id
121 {
122 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
123 {
124 res = this._agentsInventory[remoteClient.AgentID].CreateNewFolder(folderID, type, folderName, parent);
125 }
126 }
127 return res;
128 }
129
130 public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, OpenSim.Framework.Types.AssetBase asset)
131 {
132 LLUUID newItem = null;
133 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
134 {
135 newItem = this._agentsInventory[remoteClient.AgentID].AddToInventory(folderID, asset);
136 if (newItem != null)
137 {
138 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[newItem];
139 this.SendItemUpdateCreate(remoteClient, Item);
140 }
141 }
142
143 return newItem;
144 }
145 public bool DeleteInventoryItem(ClientView remoteClient, LLUUID itemID)
146 {
147 bool res = false;
148 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
149 {
150 res = this._agentsInventory[remoteClient.AgentID].DeleteFromInventory(itemID);
151 if (res)
152 {
153 RemoveInventoryItemPacket remove = new RemoveInventoryItemPacket();
154 remove.AgentData.AgentID = remoteClient.AgentID;
155 remove.AgentData.SessionID = remoteClient.SessionID;
156 remove.InventoryData = new RemoveInventoryItemPacket.InventoryDataBlock[1];
157 remove.InventoryData[0] = new RemoveInventoryItemPacket.InventoryDataBlock();
158 remove.InventoryData[0].ItemID = itemID;
159 remoteClient.OutPacket(remove);
160 }
161 }
162
163 return res;
164 }
165
166 public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, OpenSim.Framework.Types.AssetBase asset)
167 {
168 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
169 {
170 bool res = _agentsInventory[remoteClient.AgentID].UpdateItemAsset(itemID, asset);
171 if (res)
172 {
173 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[itemID];
174 this.SendItemUpdateCreate(remoteClient, Item);
175 }
176 return res;
177 }
178
179 return false;
180 }
181
182 public bool UpdateInventoryItemDetails(ClientView remoteClient, LLUUID itemID, UpdateInventoryItemPacket.InventoryDataBlock packet)
183 {
184 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
185 {
186 bool res = _agentsInventory[remoteClient.AgentID].UpdateItemDetails(itemID, packet);
187 if (res)
188 {
189 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[itemID];
190 this.SendItemUpdateCreate(remoteClient, Item);
191 }
192 return res;
193 }
194
195 return false;
196 }
197
198 public void FetchInventoryDescendents(ClientView userInfo, FetchInventoryDescendentsPacket FetchDescend)
199 {
200 if (this._agentsInventory.ContainsKey(userInfo.AgentID))
201 {
202 AgentInventory agentInventory = this._agentsInventory[userInfo.AgentID];
203 if (FetchDescend.InventoryData.FetchItems)
204 {
205 if (agentInventory.InventoryFolders.ContainsKey(FetchDescend.InventoryData.FolderID))
206 {
207 InventoryFolder Folder = agentInventory.InventoryFolders[FetchDescend.InventoryData.FolderID];
208 InventoryDescendentsPacket Descend = new InventoryDescendentsPacket();
209 Descend.AgentData.AgentID = userInfo.AgentID;
210 Descend.AgentData.OwnerID = Folder.OwnerID;
211 Descend.AgentData.FolderID = FetchDescend.InventoryData.FolderID;
212 Descend.AgentData.Descendents = Folder.Items.Count;
213 Descend.AgentData.Version = Folder.Items.Count;
214
215
216 Descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[Folder.Items.Count];
217 for (int i = 0; i < Folder.Items.Count; i++)
218 {
219
220 InventoryItem Item = Folder.Items[i];
221 Descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock();
222 Descend.ItemData[i].ItemID = Item.ItemID;
223 Descend.ItemData[i].AssetID = Item.AssetID;
224 Descend.ItemData[i].CreatorID = Item.CreatorID;
225 Descend.ItemData[i].BaseMask = FULL_MASK_PERMISSIONS;
226 Descend.ItemData[i].CreationDate = 1000;
227 Descend.ItemData[i].Description = _enc.GetBytes(Item.Description + "\0");
228 Descend.ItemData[i].EveryoneMask = FULL_MASK_PERMISSIONS;
229 Descend.ItemData[i].Flags = 1;
230 Descend.ItemData[i].FolderID = Item.FolderID;
231 Descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
232 Descend.ItemData[i].GroupMask = FULL_MASK_PERMISSIONS;
233 Descend.ItemData[i].InvType = Item.InvType;
234 Descend.ItemData[i].Name = _enc.GetBytes(Item.Name + "\0");
235 Descend.ItemData[i].NextOwnerMask = FULL_MASK_PERMISSIONS;
236 Descend.ItemData[i].OwnerID = Item.OwnerID;
237 Descend.ItemData[i].OwnerMask = FULL_MASK_PERMISSIONS;
238 Descend.ItemData[i].SalePrice = 100;
239 Descend.ItemData[i].SaleType = 0;
240 Descend.ItemData[i].Type = Item.Type;
241 Descend.ItemData[i].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
242 }
243
244 userInfo.OutPacket(Descend);
245
246 }
247 }
248 else
249 {
250 Console.WriteLine("fetch subfolders");
251 }
252 }
253 }
254
255 public void FetchInventory(ClientView userInfo, FetchInventoryPacket FetchItems)
256 {
257 if (this._agentsInventory.ContainsKey(userInfo.AgentID))
258 {
259 AgentInventory agentInventory = this._agentsInventory[userInfo.AgentID];
260
261 for (int i = 0; i < FetchItems.InventoryData.Length; i++)
262 {
263 if (agentInventory.InventoryItems.ContainsKey(FetchItems.InventoryData[i].ItemID))
264 {
265 InventoryItem Item = agentInventory.InventoryItems[FetchItems.InventoryData[i].ItemID];
266 FetchInventoryReplyPacket InventoryReply = new FetchInventoryReplyPacket();
267 InventoryReply.AgentData.AgentID = userInfo.AgentID;
268 InventoryReply.InventoryData = new FetchInventoryReplyPacket.InventoryDataBlock[1];
269 InventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock();
270 InventoryReply.InventoryData[0].ItemID = Item.ItemID;
271 InventoryReply.InventoryData[0].AssetID = Item.AssetID;
272 InventoryReply.InventoryData[0].CreatorID = Item.CreatorID;
273 InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS;
274 InventoryReply.InventoryData[0].CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
275 InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0");
276 InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
277 InventoryReply.InventoryData[0].Flags = 0;
278 InventoryReply.InventoryData[0].FolderID = Item.FolderID;
279 InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
280 InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
281 InventoryReply.InventoryData[0].InvType = Item.InvType;
282 InventoryReply.InventoryData[0].Name = _enc.GetBytes(Item.Name + "\0");
283 InventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS;
284 InventoryReply.InventoryData[0].OwnerID = Item.OwnerID;
285 InventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS;
286 InventoryReply.InventoryData[0].SalePrice = 100;
287 InventoryReply.InventoryData[0].SaleType = 0;
288 InventoryReply.InventoryData[0].Type = Item.Type;
289 InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
290 userInfo.OutPacket(InventoryReply);
291 }
292 }
293 }
294 }
295
296 private void SendItemUpdateCreate(ClientView remoteClient, InventoryItem Item)
297 {
298
299 UpdateCreateInventoryItemPacket InventoryReply = new UpdateCreateInventoryItemPacket();
300 InventoryReply.AgentData.AgentID = remoteClient.AgentID;
301 InventoryReply.AgentData.SimApproved = true;
302 InventoryReply.InventoryData = new UpdateCreateInventoryItemPacket.InventoryDataBlock[1];
303 InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock();
304 InventoryReply.InventoryData[0].ItemID = Item.ItemID;
305 InventoryReply.InventoryData[0].AssetID = Item.AssetID;
306 InventoryReply.InventoryData[0].CreatorID = Item.CreatorID;
307 InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS;
308 InventoryReply.InventoryData[0].CreationDate = 1000;
309 InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0");
310 InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
311 InventoryReply.InventoryData[0].Flags = 0;
312 InventoryReply.InventoryData[0].FolderID = Item.FolderID;
313 InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
314 InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
315 InventoryReply.InventoryData[0].InvType = Item.InvType;
316 InventoryReply.InventoryData[0].Name = _enc.GetBytes(Item.Name + "\0");
317 InventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS;
318 InventoryReply.InventoryData[0].OwnerID = Item.OwnerID;
319 InventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS;
320 InventoryReply.InventoryData[0].SalePrice = 100;
321 InventoryReply.InventoryData[0].SaleType = 0;
322 InventoryReply.InventoryData[0].Type = Item.Type;
323 InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
324
325 remoteClient.OutPacket(InventoryReply);
326 }
327 }
328
329
330
331 public class UserServerRequest
332 {
333 public UserServerRequest()
334 {
335
336 }
337 }
338}
diff --git a/OpenSim/OpenSim.RegionServer/AuthenticateSessionsBase.cs b/OpenSim/OpenSim.RegionServer/AuthenticateSessionsBase.cs
deleted file mode 100644
index 6f80210..0000000
--- a/OpenSim/OpenSim.RegionServer/AuthenticateSessionsBase.cs
+++ /dev/null
@@ -1,131 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Types;
34
35namespace OpenSim.RegionServer
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 }
112 }
113
114 public void UpdateAgentChildStatus(uint circuitcode, bool childstatus)
115 {
116 if (this.AgentCircuits.ContainsKey(circuitcode))
117 {
118 this.AgentCircuits[circuitcode].child = childstatus;
119 }
120 }
121
122 public bool GetAgentChildStatus(uint circuitcode)
123 {
124 if (this.AgentCircuits.ContainsKey(circuitcode))
125 {
126 return this.AgentCircuits[circuitcode].child;
127 }
128 return false;
129 }
130 }
131}
diff --git a/OpenSim/OpenSim.RegionServer/AuthenticateSessionsLocal.cs b/OpenSim/OpenSim.RegionServer/AuthenticateSessionsLocal.cs
deleted file mode 100644
index e0ffd71..0000000
--- a/OpenSim/OpenSim.RegionServer/AuthenticateSessionsLocal.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using OpenSim.Framework.Types;
33
34namespace OpenSim.RegionServer
35{
36 public class AuthenticateSessionsLocal : AuthenticateSessionsBase
37 {
38 public AuthenticateSessionsLocal()
39 {
40
41 }
42
43 public void AddNewSession(Login loginData)
44 {
45 AgentCircuitData agent = new AgentCircuitData();
46 agent.AgentID = loginData.Agent;
47 agent.firstname = loginData.First;
48 agent.lastname = loginData.Last;
49 agent.SessionID = loginData.Session;
50 agent.SecureSessionID = loginData.SecureSession;
51 agent.circuitcode = loginData.CircuitCode;
52 agent.BaseFolder = loginData.BaseFolder;
53 agent.InventoryFolder = loginData.InventoryFolder;
54 agent.startpos = new LLVector3(128,128,70);
55 this.AddNewCircuit(agent.circuitcode, agent);
56 }
57 }
58}
diff --git a/OpenSim/OpenSim.RegionServer/AuthenticateSessionsRemote.cs b/OpenSim/OpenSim.RegionServer/AuthenticateSessionsRemote.cs
deleted file mode 100644
index 5747f8a..0000000
--- a/OpenSim/OpenSim.RegionServer/AuthenticateSessionsRemote.cs
+++ /dev/null
@@ -1,72 +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;
30using System.Collections.Generic;
31using System.Text;
32using System.Xml;
33using libsecondlife;
34using OpenSim.Framework.Types;
35using Nwc.XmlRpc;
36
37namespace OpenSim.RegionServer
38{
39 public class AuthenticateSessionsRemote : AuthenticateSessionsBase
40 {
41 public AuthenticateSessionsRemote()
42 {
43
44 }
45
46 public XmlRpcResponse ExpectUser(XmlRpcRequest request)
47 {
48 Hashtable requestData = (Hashtable)request.Params[0];
49 AgentCircuitData agentData = new AgentCircuitData();
50 agentData.SessionID = new LLUUID((string)requestData["session_id"]);
51 agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]);
52 agentData.firstname = (string)requestData["firstname"];
53 agentData.lastname = (string)requestData["lastname"];
54 agentData.AgentID = new LLUUID((string)requestData["agent_id"]);
55 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
56 if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1"))
57 {
58 agentData.child = true;
59 }
60 else
61 {
62 agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"]));
63 agentData.child = false;
64
65 }
66
67 this.AddNewCircuit(agentData.circuitcode, agentData);
68
69 return new XmlRpcResponse();
70 }
71 }
72}
diff --git a/OpenSim/OpenSim.RegionServer/CAPS/AdminWebFront.cs b/OpenSim/OpenSim.RegionServer/CAPS/AdminWebFront.cs
deleted file mode 100644
index ead902d..0000000
--- a/OpenSim/OpenSim.RegionServer/CAPS/AdminWebFront.cs
+++ /dev/null
@@ -1,281 +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 OpenSim.RegionServer.Simulator;
33using OpenSim.UserServer;
34using OpenSim.Servers;
35using OpenSim.RegionServer.Assets;
36using OpenSim.Framework.Inventory;
37using libsecondlife;
38using OpenSim.RegionServer.Scripting;
39using Avatar=libsecondlife.Avatar;
40
41namespace OpenSim.RegionServer.CAPS
42{
43 public class AdminWebFront
44 {
45 private string AdminPage;
46 private string NewAccountForm;
47 private string LoginForm;
48 private string passWord = "Admin";
49 private World m_world;
50 private LoginServer _userServer;
51 private InventoryCache _inventoryCache;
52
53 public AdminWebFront(string password, World world, InventoryCache inventoryCache, LoginServer userserver)
54 {
55 _inventoryCache = inventoryCache;
56 _userServer = userserver;
57 m_world = world;
58 passWord = password;
59 LoadAdminPage();
60 }
61
62 public void LoadMethods( BaseHttpServer server )
63 {
64 server.AddRestHandler("GET", "/Admin", GetAdminPage);
65 server.AddRestHandler("GET", "/Admin/Welcome", GetWelcomePage);
66 server.AddRestHandler("GET", "/Admin/Accounts", GetAccountsPage );
67 server.AddRestHandler("GET", "/Admin/Clients", GetConnectedClientsPage);
68 server.AddRestHandler("GET", "/Admin/Entities", GetEntitiesPage);
69 server.AddRestHandler("GET", "/Admin/Scripts", GetScriptsPage);
70 server.AddRestHandler("GET", "/Admin/AddTestScript", AddTestScript );
71 server.AddRestHandler("GET", "/ClientInventory", GetClientsInventory);
72
73 server.AddRestHandler("POST", "/Admin/NewAccount", PostNewAccount );
74 server.AddRestHandler("POST", "/Admin/Login", PostLogin );
75 }
76
77 private string GetWelcomePage(string request, string path, string param)
78 {
79 string responseString;
80 responseString = "Welcome to the OpenSim Admin Page";
81 responseString += "<br><br><br> " + LoginForm;
82 return responseString;
83 }
84
85 private string PostLogin(string requestBody, string path, string param)
86 {
87 string responseString;
88 if (requestBody == passWord)
89 {
90 responseString = "<p> Login Successful </p>";
91 }
92 else
93 {
94 responseString = "<p> Password Error </p>";
95 responseString += "<p> Please Login with the correct password </p>";
96 responseString += "<br><br> " + LoginForm;
97 }
98 return responseString;
99 }
100
101 private string PostNewAccount(string requestBody, string path, string param)
102 {
103 string responseString;
104 string firstName = "";
105 string secondName = "";
106 string userPasswd = "";
107 string[] comp;
108 string[] passw;
109 string[] line;
110 string delimStr = "&";
111 char[] delimiter = delimStr.ToCharArray();
112 string delimStr2 = "=";
113 char[] delimiter2 = delimStr2.ToCharArray();
114
115 comp = requestBody.Split(delimiter);
116 passw = comp[3].Split(delimiter2);
117 if (passw[1] == passWord) // check admin password is correct
118 {
119
120 line = comp[0].Split(delimiter2); //split firstname
121 if (line.Length > 1)
122 {
123 firstName = line[1];
124 }
125 line = comp[1].Split(delimiter2); //split secondname
126 if (line.Length > 1)
127 {
128 secondName = line[1];
129 }
130 line = comp[2].Split(delimiter2); //split user password
131 if (line.Length > 1)
132 {
133 userPasswd = line[1];
134 }
135 if (this._userServer != null)
136 {
137 this._userServer.CreateUserAccount(firstName, secondName, userPasswd);
138 }
139 responseString = "<p> New Account created </p>";
140 }
141 else
142 {
143 responseString = "<p> Admin password is incorrect, please login with the correct password</p>";
144 responseString += "<br><br>" + LoginForm;
145 }
146 return responseString;
147 }
148
149 private string GetConnectedClientsPage(string request, string path, string param)
150 {
151 string responseString;
152 responseString = " <p> Listing connected Clients </p>";
153 OpenSim.RegionServer.Simulator.Avatar TempAv;
154 foreach (libsecondlife.LLUUID UUID in m_world.Entities.Keys)
155 {
156 if (m_world.Entities[UUID].ToString() == "OpenSim.RegionServer.Simulator.Avatar")
157 {
158 TempAv = (OpenSim.RegionServer.Simulator.Avatar)m_world.Entities[UUID];
159 responseString += "<p> Client: ";
160 responseString += TempAv.firstname + " , " + TempAv.lastname + " , <A HREF=\"javascript:loadXMLDoc('ClientInventory/" + UUID.ToString() + "')\">" + UUID + "</A> , " + TempAv.ControllingClient.SessionID + " , " + TempAv.ControllingClient.CircuitCode + " , " + TempAv.ControllingClient.userEP.ToString();
161 responseString += "</p>";
162 }
163 }
164 return responseString;
165 }
166
167 private string AddTestScript(string request, string path, string param)
168 {
169 int index = path.LastIndexOf('/');
170
171 string lluidStr = path.Substring(index+1);
172
173 LLUUID id;
174
175 if( LLUUID.TryParse( lluidStr, out id ) )
176 {
177 // This is just here for concept purposes... Remove!
178 m_world.AddScript( m_world.Entities[id], new FollowRandomAvatar());
179 return String.Format("Added new script to object [{0}]", id);
180 }
181 else
182 {
183 return String.Format("Couldn't parse [{0}]", lluidStr );
184 }
185 }
186
187 private string GetScriptsPage(string request, string path, string param)
188 {
189 return String.Empty;
190 }
191
192 private string GetEntitiesPage(string request, string path, string param)
193 {
194 string responseString;
195 responseString = " <p> Listing current entities</p><ul>";
196
197 foreach (Entity entity in m_world.Entities.Values)
198 {
199 string testScriptLink = "javascript:loadXMLDoc('Admin/AddTestScript/" + entity.uuid.ToString() + "');";
200 responseString += String.Format( "<li>[{0}] \"{1}\" @ {2} <a href=\"{3}\">add test script</a></li>", entity.uuid, entity.Name, entity.Pos, testScriptLink );
201 }
202 responseString += "</ul>";
203 return responseString;
204 }
205
206 private string GetClientsInventory(string request, string path, string param)
207 {
208 string[] line;
209 string delimStr = "/";
210 char[] delimiter = delimStr.ToCharArray();
211 string responseString;
212 responseString = " <p> Listing Inventory </p>";
213
214 line = path.Split(delimiter);
215 if (line.Length > 2)
216 {
217 if (line[1] == "ClientInventory")
218 {
219 AgentInventory inven = this._inventoryCache.GetAgentsInventory(new libsecondlife.LLUUID(line[2]));
220 responseString += " <p> Client: " + inven.AgentID.ToStringHyphenated() +" </p>";
221 if (inven != null)
222 {
223 foreach (InventoryItem item in inven.InventoryItems.Values)
224 {
225 responseString += "<p> InventoryItem: ";
226 responseString += item.Name +" , "+ item.ItemID +" , "+ item.Type +" , "+ item.FolderID +" , "+ item.AssetID +" , "+ item.Description ;
227 responseString += "</p>";
228 }
229 }
230 }
231 }
232 return responseString;
233 }
234
235 private string GetCachedAssets(string request, string path, string param)
236 {
237 return "";
238 }
239
240 private string GetAccountsPage(string request, string path, string param)
241 {
242 string responseString;
243 responseString = "<p> Account management </p>";
244 responseString += "<br> ";
245 responseString += "<p> Create New Account </p>";
246 responseString += NewAccountForm;
247 return responseString;
248 }
249
250 private string GetAdminPage(string request, string path, string param)
251 {
252 return AdminPage;
253 }
254
255 private void LoadAdminPage()
256 {
257 try
258 {
259 StreamReader SR;
260
261 SR = File.OpenText("testadmin.htm");
262 AdminPage = SR.ReadToEnd();
263 SR.Close();
264
265 SR = File.OpenText("newaccountform.htm");
266 NewAccountForm = SR.ReadToEnd();
267 SR.Close();
268
269 SR = File.OpenText("login.htm");
270 LoginForm = SR.ReadToEnd();
271 SR.Close();
272 }
273 catch (Exception e)
274 {
275 Console.WriteLine(e.ToString());
276 }
277
278 }
279
280 }
281}
diff --git a/OpenSim/OpenSim.RegionServer/Client/ClientView.Grid.cs b/OpenSim/OpenSim.RegionServer/Client/ClientView.Grid.cs
deleted file mode 100644
index 0bccbc2..0000000
--- a/OpenSim/OpenSim.RegionServer/Client/ClientView.Grid.cs
+++ /dev/null
@@ -1,192 +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;
30using System.Collections.Generic;
31using libsecondlife;
32using libsecondlife.Packets;
33using Nwc.XmlRpc;
34using System.Net;
35using System.Net.Sockets;
36using System.IO;
37using System.Threading;
38using System.Timers;
39using OpenSim.Framework.Interfaces;
40using OpenSim.Framework.Types;
41using OpenSim.Framework.Inventory;
42using OpenSim.Framework.Utilities;
43using OpenSim.RegionServer.Simulator;
44using OpenSim.RegionServer.Assets;
45using OpenSim.Framework.Console;
46
47namespace OpenSim.RegionServer.Client
48{
49 public partial class ClientView
50 {
51
52 public void EnableNeighbours()
53 {
54 if ((this.m_gridServer.GetName() == "Remote") && (!this.m_child))
55 {
56 Hashtable SimParams;
57 ArrayList SendParams;
58 XmlRpcRequest GridReq;
59 XmlRpcResponse GridResp;
60 List<Packet> enablePackets = new List<Packet>();
61
62 RemoteGridBase gridServer = (RemoteGridBase)this.m_gridServer;
63
64 foreach (Hashtable neighbour in gridServer.neighbours)
65 {
66 try
67 {
68 string neighbourIPStr = (string)neighbour["sim_ip"];
69 System.Net.IPAddress neighbourIP = System.Net.IPAddress.Parse(neighbourIPStr);
70 ushort neighbourPort = (ushort)Convert.ToInt32(neighbour["sim_port"]);
71 string reqUrl = "http://" + neighbourIPStr + ":" + neighbourPort.ToString();
72
73 MainConsole.Instance.Verbose("Requesting " + reqUrl);
74
75 SimParams = new Hashtable();
76 SimParams["session_id"] = this.SessionID.ToString();
77 SimParams["secure_session_id"] = this.SecureSessionID.ToString();
78 SimParams["firstname"] = this.ClientAvatar.firstname;
79 SimParams["lastname"] = this.ClientAvatar.lastname;
80 SimParams["agent_id"] = this.AgentID.ToString();
81 SimParams["circuit_code"] = (Int32)this.CircuitCode;
82 SimParams["child_agent"] = "1";
83 SendParams = new ArrayList();
84 SendParams.Add(SimParams);
85
86 GridReq = new XmlRpcRequest("expect_user", SendParams);
87 GridResp = GridReq.Send(reqUrl, 3000);
88 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket();
89 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock();
90 enablesimpacket.SimulatorInfo.Handle = Helpers.UIntsToLong((uint)(Convert.ToInt32(neighbour["region_locx"]) * 256), (uint)(Convert.ToInt32(neighbour["region_locy"]) * 256));
91
92
93 byte[] byteIP = neighbourIP.GetAddressBytes();
94 enablesimpacket.SimulatorInfo.IP = (uint)byteIP[3] << 24;
95 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[2] << 16;
96 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8;
97 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0];
98 enablesimpacket.SimulatorInfo.Port = neighbourPort;
99 enablePackets.Add(enablesimpacket);
100 }
101 catch
102 {
103 MainConsole.Instance.Notice("Could not connect to neighbour " + neighbour["sim_ip"] + ":" + neighbour["sim_port"] + ", continuing.");
104 }
105 }
106 Thread.Sleep(3000);
107 foreach (Packet enable in enablePackets)
108 {
109 this.OutPacket(enable);
110 }
111 enablePackets.Clear();
112
113 }
114 }
115
116 public void CrossSimBorder(LLVector3 avatarpos)
117 { // VERY VERY BASIC
118
119 LLVector3 newpos = avatarpos;
120 uint neighbourx = this.m_regionData.RegionLocX;
121 uint neighboury = this.m_regionData.RegionLocY;
122
123 if (avatarpos.X < 0)
124 {
125 neighbourx -= 1;
126 newpos.X = 254;
127 }
128 if (avatarpos.X > 255)
129 {
130 neighbourx += 1;
131 newpos.X = 1;
132 }
133 if (avatarpos.Y < 0)
134 {
135 neighboury -= 1;
136 newpos.Y = 254;
137 }
138 if (avatarpos.Y > 255)
139 {
140 neighboury += 1;
141 newpos.Y = 1;
142 }
143 MainConsole.Instance.Notice("SimClient.cs:CrossSimBorder() - Crossing border to neighbouring sim at [" + neighbourx.ToString() + "," + neighboury.ToString() + "]");
144
145 Hashtable SimParams;
146 ArrayList SendParams;
147 XmlRpcRequest GridReq;
148 XmlRpcResponse GridResp;
149 foreach (Hashtable borderingSim in ((RemoteGridBase)m_gridServer).neighbours)
150 {
151 if (((string)borderingSim["region_locx"]).Equals(neighbourx.ToString()) && ((string)borderingSim["region_locy"]).Equals(neighboury.ToString()))
152 {
153 SimParams = new Hashtable();
154 SimParams["firstname"] = this.ClientAvatar.firstname;
155 SimParams["lastname"] = this.ClientAvatar.lastname;
156 SimParams["circuit_code"] = this.CircuitCode.ToString();
157 SimParams["pos_x"] = newpos.X.ToString();
158 SimParams["pos_y"] = newpos.Y.ToString();
159 SimParams["pos_z"] = newpos.Z.ToString();
160 SendParams = new ArrayList();
161 SendParams.Add(SimParams);
162
163 GridReq = new XmlRpcRequest("agent_crossing", SendParams);
164 GridResp = GridReq.Send("http://" + borderingSim["sim_ip"] + ":" + borderingSim["sim_port"], 3000);
165
166 CrossedRegionPacket NewSimPack = new CrossedRegionPacket();
167 NewSimPack.AgentData = new CrossedRegionPacket.AgentDataBlock();
168 NewSimPack.AgentData.AgentID = this.AgentID;
169 NewSimPack.AgentData.SessionID = this.SessionID;
170 NewSimPack.Info = new CrossedRegionPacket.InfoBlock();
171 NewSimPack.Info.Position = newpos;
172 NewSimPack.Info.LookAt = new LLVector3(0.99f, 0.042f, 0); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!!
173 NewSimPack.RegionData = new libsecondlife.Packets.CrossedRegionPacket.RegionDataBlock();
174 NewSimPack.RegionData.RegionHandle = Helpers.UIntsToLong((uint)(Convert.ToInt32(borderingSim["region_locx"]) * 256), (uint)(Convert.ToInt32(borderingSim["region_locy"]) * 256));
175 System.Net.IPAddress neighbourIP = System.Net.IPAddress.Parse((string)borderingSim["sim_ip"]);
176 byte[] byteIP = neighbourIP.GetAddressBytes();
177 NewSimPack.RegionData.SimIP = (uint)byteIP[3] << 24;
178 NewSimPack.RegionData.SimIP += (uint)byteIP[2] << 16;
179 NewSimPack.RegionData.SimIP += (uint)byteIP[1] << 8;
180 NewSimPack.RegionData.SimIP += (uint)byteIP[0];
181 NewSimPack.RegionData.SimPort = (ushort)Convert.ToInt32(borderingSim["sim_port"]);
182 NewSimPack.RegionData.SeedCapability = new byte[0];
183 lock (PacketQueue)
184 {
185 ProcessOutPacket(NewSimPack);
186 DowngradeClient();
187 }
188 }
189 }
190 }
191 }
192}
diff --git a/OpenSim/OpenSim.RegionServer/Client/ClientView.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/Client/ClientView.PacketHandlers.cs
deleted file mode 100644
index 4af0485..0000000
--- a/OpenSim/OpenSim.RegionServer/Client/ClientView.PacketHandlers.cs
+++ /dev/null
@@ -1,196 +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;
30using System.Collections.Generic;
31using libsecondlife;
32using libsecondlife.Packets;
33using Nwc.XmlRpc;
34using System.Net;
35using System.Net.Sockets;
36using System.IO;
37using System.Threading;
38using System.Timers;
39using OpenSim.Framework.Interfaces;
40using OpenSim.Framework.Types;
41using OpenSim.Framework.Inventory;
42using OpenSim.Framework.Utilities;
43using OpenSim.RegionServer.Simulator;
44using OpenSim.RegionServer.Assets;
45using OpenSim.Framework.Console;
46
47namespace OpenSim.RegionServer.Client
48{
49 public partial class ClientView
50 {
51 protected virtual void RegisterLocalPacketHandlers()
52 {
53 this.AddLocalPacketHandler(PacketType.LogoutRequest, this.Logout);
54 this.AddLocalPacketHandler(PacketType.AgentCachedTexture, this.AgentTextureCached);
55 this.AddLocalPacketHandler(PacketType.MultipleObjectUpdate, this.MultipleObjUpdate);
56 }
57
58 protected virtual bool Logout(ClientView simClient, Packet packet)
59 {
60 MainConsole.Instance.Notice("OpenSimClient.cs:ProcessInPacket() - Got a logout request");
61 //send reply to let the client logout
62 LogoutReplyPacket logReply = new LogoutReplyPacket();
63 logReply.AgentData.AgentID = this.AgentID;
64 logReply.AgentData.SessionID = this.SessionID;
65 logReply.InventoryData = new LogoutReplyPacket.InventoryDataBlock[1];
66 logReply.InventoryData[0] = new LogoutReplyPacket.InventoryDataBlock();
67 logReply.InventoryData[0].ItemID = LLUUID.Zero;
68 OutPacket(logReply);
69 //tell all clients to kill our object
70 KillObjectPacket kill = new KillObjectPacket();
71 kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
72 kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock();
73 kill.ObjectData[0].ID = this.ClientAvatar.localid;
74 foreach (ClientView client in m_clientThreads.Values)
75 {
76 client.OutPacket(kill);
77 }
78 if (this.m_userServer != null)
79 {
80 this.m_inventoryCache.ClientLeaving(this.AgentID, this.m_userServer);
81 }
82 else
83 {
84 this.m_inventoryCache.ClientLeaving(this.AgentID, null);
85 }
86
87 m_gridServer.LogoutSession(this.SessionID, this.AgentID, this.CircuitCode);
88 /*lock (m_world.Entities)
89 {
90 m_world.Entities.Remove(this.AgentID);
91 }*/
92 m_world.RemoveViewerAgent(this);
93 //need to do other cleaning up here too
94 m_clientThreads.Remove(this.CircuitCode);
95 m_networkServer.RemoveClientCircuit(this.CircuitCode);
96 this.ClientThread.Abort();
97 return true;
98 }
99
100 protected bool AgentTextureCached(ClientView simclient, Packet packet)
101 {
102 AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)packet;
103 AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket();
104 cachedresp.AgentData.AgentID = this.AgentID;
105 cachedresp.AgentData.SessionID = this.SessionID;
106 cachedresp.AgentData.SerialNum = this.cachedtextureserial;
107 this.cachedtextureserial++;
108 cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[chechedtex.WearableData.Length];
109 for (int i = 0; i < chechedtex.WearableData.Length; i++)
110 {
111 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
112 cachedresp.WearableData[i].TextureIndex = chechedtex.WearableData[i].TextureIndex;
113 cachedresp.WearableData[i].TextureID = LLUUID.Zero;
114 cachedresp.WearableData[i].HostName = new byte[0];
115 }
116 this.OutPacket(cachedresp);
117 return true;
118 }
119
120 protected bool MultipleObjUpdate(ClientView simClient, Packet packet)
121 {
122 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet;
123 for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
124 {
125 if (multipleupdate.ObjectData[i].Type == 9) //change position
126 {
127 libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
128 OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
129 //should update stored position of the prim
130 }
131 else if (multipleupdate.ObjectData[i].Type == 10)//rotation
132 {
133 libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
134 OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
135 }
136 else if (multipleupdate.ObjectData[i].Type == 13)//scale
137 {
138 libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
139 OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
140 }
141 }
142 return true;
143 }
144
145 public void RequestMapLayer() //should be getting the map layer from the grid server
146 {
147 //send a layer covering the 800,800 - 1200,1200 area (should be covering the requested area)
148 MapLayerReplyPacket mapReply = new MapLayerReplyPacket();
149 mapReply.AgentData.AgentID = this.AgentID;
150 mapReply.AgentData.Flags = 0;
151 mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1];
152 mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock();
153 mapReply.LayerData[0].Bottom = this.m_regionData.RegionLocY - 50;
154 mapReply.LayerData[0].Left = this.m_regionData.RegionLocX - 50;
155 mapReply.LayerData[0].Top = this.m_regionData.RegionLocY + 50;
156 mapReply.LayerData[0].Right = this.m_regionData.RegionLocX + 50;
157 mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000005");
158 this.OutPacket(mapReply);
159 }
160
161 public void RequestMapBlocks(int minX, int minY, int maxX, int maxY)
162 {
163 IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY);
164 int len;
165 if (simMapProfiles == null)
166 len = 0;
167 else
168 len = simMapProfiles.Count;
169
170 int i;
171 int mtu = 24; // Number of regions to send per packet. Will be more precise in future. ( TODO )
172 for (i = 0; i < len; i += mtu)
173 {
174 MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
175 mbReply.AgentData.AgentID = this.AgentID;
176
177 mbReply.Data = new MapBlockReplyPacket.DataBlock[Math.Min(mtu, len - i)];
178 int j;
179 for (j = 0; (j < mtu) && ((i + j) < len); j++)
180 {
181 Hashtable mp = (Hashtable)simMapProfiles[j];
182 mbReply.Data[j] = new MapBlockReplyPacket.DataBlock();
183 mbReply.Data[j].Name = libsecondlife.Helpers.StringToField((string)mp["name"]);
184 mbReply.Data[j].Access = System.Convert.ToByte(mp["access"]);
185 mbReply.Data[j].Agents = System.Convert.ToByte(mp["agents"]);
186 mbReply.Data[j].MapImageID = new LLUUID((string)mp["map-image-id"]);
187 mbReply.Data[j].RegionFlags = System.Convert.ToUInt32(mp["region-flags"]);
188 mbReply.Data[j].WaterHeight = System.Convert.ToByte(mp["water-height"]);
189 mbReply.Data[j].X = System.Convert.ToUInt16(mp["x"]);
190 mbReply.Data[j].Y = System.Convert.ToUInt16(mp["y"]);
191 }
192 this.OutPacket(mbReply);
193 }
194 }
195 }
196}
diff --git a/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs
deleted file mode 100644
index 306bf63..0000000
--- a/OpenSim/OpenSim.RegionServer/Client/ClientView.ProcessPackets.cs
+++ /dev/null
@@ -1,523 +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;
30using System.Collections.Generic;
31using libsecondlife;
32using libsecondlife.Packets;
33using Nwc.XmlRpc;
34using System.Net;
35using System.Net.Sockets;
36using System.IO;
37using System.Threading;
38using System.Timers;
39using OpenSim.Framework.Interfaces;
40using OpenSim.Framework.Types;
41using OpenSim.Framework.Inventory;
42using OpenSim.Framework.Utilities;
43using OpenSim.RegionServer.Simulator;
44using OpenSim.RegionServer.Assets;
45using OpenSim.Framework.Console;
46
47namespace OpenSim.RegionServer.Client
48{
49 public partial class ClientView
50 {
51 public delegate void GenericCall(ClientView remoteClient);
52 public delegate void GenericCall2();
53 public delegate void GenericCall3(Packet packet); // really don't want to be passing packets in these events, so this is very temporary.
54 public delegate void GenericCall4(Packet packet, ClientView remoteClient);
55 public delegate void UpdateShape(uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock);
56 public delegate void ObjectSelect(uint localID, ClientView remoteClient);
57 public delegate void UpdatePrimFlags(uint localID, Packet packet, ClientView remoteClient);
58 public delegate void UpdatePrimTexture(uint localID, byte[] texture, ClientView remoteClient);
59 public delegate void UpdatePrimVector(uint localID, LLVector3 pos, ClientView remoteClient);
60 public delegate void UpdatePrimRotation(uint localID, LLQuaternion rot, ClientView remoteClient);
61 public delegate void StatusChange(bool status);
62
63
64 public event ChatFromViewer OnChatFromViewer;
65 public event RezObject OnRezObject;
66 public event GenericCall4 OnDeRezObject;
67 public event ModifyTerrain OnModifyTerrain;
68 public event GenericCall OnRegionHandShakeReply;
69 public event GenericCall OnRequestWearables;
70 public event SetAppearance OnSetAppearance;
71 public event GenericCall2 OnCompleteMovementToRegion;
72 public event GenericCall3 OnAgentUpdate;
73 public event StartAnim OnStartAnim;
74 public event GenericCall OnRequestAvatarsData;
75 public event LinkObjects OnLinkObjects;
76 public event GenericCall4 OnAddPrim;
77 public event UpdateShape OnUpdatePrimShape;
78 public event ObjectSelect OnObjectSelect;
79 public event UpdatePrimFlags OnUpdatePrimFlags;
80 public event UpdatePrimTexture OnUpdatePrimTexture;
81 public event UpdatePrimVector OnUpdatePrimPosition;
82 public event UpdatePrimRotation OnUpdatePrimRotation;
83 public event UpdatePrimVector OnUpdatePrimScale;
84 public event StatusChange OnChildAgentStatus;
85
86 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
87 public event ParcelDivideRequest OnParcelDivideRequest;
88 public event ParcelJoinRequest OnParcelJoinRequest;
89 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
90
91 protected override void ProcessInPacket(Packet Pack)
92 {
93 ack_pack(Pack);
94 if (debug)
95 {
96 if (Pack.Type != PacketType.AgentUpdate)
97 {
98 Console.WriteLine("IN: " + Pack.Type.ToString());
99 }
100 }
101
102
103 if (this.ProcessPacketMethod(Pack))
104 {
105 //there is a handler registered that handled this packet type
106 return;
107 }
108 else
109 {
110 System.Text.Encoding _enc = System.Text.Encoding.ASCII;
111
112 switch (Pack.Type)
113 {
114 case PacketType.ViewerEffect:
115 ViewerEffectPacket viewer = (ViewerEffectPacket)Pack;
116 foreach (ClientView client in m_clientThreads.Values)
117 {
118 if (client.AgentID != this.AgentID)
119 {
120 viewer.AgentData.AgentID = client.AgentID;
121 viewer.AgentData.SessionID = client.SessionID;
122 client.OutPacket(viewer);
123 }
124 }
125 break;
126
127 #region New Event System - World/Avatar
128 case PacketType.ChatFromViewer:
129 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
130 if (Util.FieldToString(inchatpack.ChatData.Message) == "")
131 {
132 //empty message so don't bother with it
133 break;
134 }
135 string fromName = ClientAvatar.firstname + " " + ClientAvatar.lastname;
136 byte[] message = inchatpack.ChatData.Message;
137 byte type = inchatpack.ChatData.Type;
138 LLVector3 fromPos = ClientAvatar.Pos;
139 LLUUID fromAgentID = AgentID;
140 this.OnChatFromViewer(message, type, fromPos, fromName, fromAgentID);
141 break;
142 case PacketType.RezObject:
143 RezObjectPacket rezPacket = (RezObjectPacket)Pack;
144 AgentInventory inven = this.m_inventoryCache.GetAgentsInventory(this.AgentID);
145 if (inven != null)
146 {
147 if (inven.InventoryItems.ContainsKey(rezPacket.InventoryData.ItemID))
148 {
149 AssetBase asset = this.m_assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID);
150 if (asset != null)
151 {
152 this.OnRezObject(asset, rezPacket.RezData.RayEnd);
153 this.m_inventoryCache.DeleteInventoryItem(this, rezPacket.InventoryData.ItemID);
154 }
155 }
156 }
157 break;
158 case PacketType.DeRezObject:
159 OnDeRezObject(Pack, this);
160 break;
161 case PacketType.ModifyLand:
162 ModifyLandPacket modify = (ModifyLandPacket)Pack;
163 if (modify.ParcelData.Length > 0)
164 {
165 OnModifyTerrain(modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West);
166 }
167 break;
168 case PacketType.RegionHandshakeReply:
169 OnRegionHandShakeReply(this);
170 break;
171 case PacketType.AgentWearablesRequest:
172 OnRequestWearables(this);
173 OnRequestAvatarsData(this);
174 break;
175 case PacketType.AgentSetAppearance:
176 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
177 OnSetAppearance(appear.ObjectData.TextureEntry, appear.VisualParam);
178 break;
179 case PacketType.CompleteAgentMovement:
180 if (this.m_child) this.UpgradeClient();
181 OnCompleteMovementToRegion();
182 this.EnableNeighbours();
183 break;
184 case PacketType.AgentUpdate:
185 OnAgentUpdate(Pack);
186 break;
187 case PacketType.AgentAnimation:
188 if (!m_child)
189 {
190 AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack;
191 for (int i = 0; i < AgentAni.AnimationList.Length; i++)
192 {
193 if (AgentAni.AnimationList[i].StartAnim)
194 {
195 OnStartAnim(AgentAni.AnimationList[i].AnimID, 1);
196 }
197 }
198 }
199 break;
200
201 #endregion
202
203 #region New Event System - Objects/Prims
204 case PacketType.ObjectLink:
205 ObjectLinkPacket link = (ObjectLinkPacket)Pack;
206 uint parentprimid = 0;
207 List<uint> childrenprims = new List<uint>();
208 if (link.ObjectData.Length > 1)
209 {
210 parentprimid = link.ObjectData[0].ObjectLocalID;
211
212 for (int i = 1; i < link.ObjectData.Length; i++)
213 {
214 childrenprims.Add(link.ObjectData[i].ObjectLocalID);
215 }
216 }
217 OnLinkObjects(parentprimid, childrenprims);
218 break;
219 case PacketType.ObjectAdd:
220 m_world.AddNewPrim((ObjectAddPacket)Pack, this);
221 OnAddPrim(Pack, this);
222 break;
223 case PacketType.ObjectShape:
224 ObjectShapePacket shape = (ObjectShapePacket)Pack;
225 for (int i = 0; i < shape.ObjectData.Length; i++)
226 {
227 OnUpdatePrimShape(shape.ObjectData[i].ObjectLocalID, shape.ObjectData[i]);
228 }
229 break;
230 case PacketType.ObjectSelect:
231 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack;
232 for (int i = 0; i < incomingselect.ObjectData.Length; i++)
233 {
234 OnObjectSelect(incomingselect.ObjectData[i].ObjectLocalID, this);
235 }
236 break;
237 case PacketType.ObjectFlagUpdate:
238 ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack;
239 OnUpdatePrimFlags(flags.AgentData.ObjectLocalID, Pack, this);
240 break;
241 case PacketType.ObjectImage:
242 ObjectImagePacket imagePack = (ObjectImagePacket)Pack;
243 for (int i = 0; i < imagePack.ObjectData.Length; i++)
244 {
245 OnUpdatePrimTexture(imagePack.ObjectData[i].ObjectLocalID, imagePack.ObjectData[i].TextureEntry, this);
246
247 }
248 break;
249 #endregion
250
251 #region Inventory/Asset/Other related packets
252 case PacketType.RequestImage:
253 RequestImagePacket imageRequest = (RequestImagePacket)Pack;
254 for (int i = 0; i < imageRequest.RequestImage.Length; i++)
255 {
256 m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image);
257 }
258 break;
259 case PacketType.TransferRequest:
260 TransferRequestPacket transfer = (TransferRequestPacket)Pack;
261 m_assetCache.AddAssetRequest(this, transfer);
262 break;
263 case PacketType.AssetUploadRequest:
264 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
265 this.UploadAssets.HandleUploadPacket(request, request.AssetBlock.TransactionID.Combine(this.SecureSessionID));
266 break;
267 case PacketType.RequestXfer:
268 break;
269 case PacketType.SendXferPacket:
270 this.UploadAssets.HandleXferPacket((SendXferPacketPacket)Pack);
271 break;
272 case PacketType.CreateInventoryFolder:
273 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack;
274 m_inventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type, Util.FieldToString(invFolder.FolderData.Name), invFolder.FolderData.ParentID);
275 break;
276 case PacketType.CreateInventoryItem:
277 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
278 if (createItem.InventoryBlock.TransactionID != LLUUID.Zero)
279 {
280 this.UploadAssets.CreateInventoryItem(createItem);
281 }
282 else
283 {
284 this.CreateInventoryItem(createItem);
285 }
286 break;
287 case PacketType.FetchInventory:
288 FetchInventoryPacket FetchInventory = (FetchInventoryPacket)Pack;
289 m_inventoryCache.FetchInventory(this, FetchInventory);
290 break;
291 case PacketType.FetchInventoryDescendents:
292 FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack;
293 m_inventoryCache.FetchInventoryDescendents(this, Fetch);
294 break;
295 case PacketType.UpdateInventoryItem:
296 UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack;
297 for (int i = 0; i < update.InventoryData.Length; i++)
298 {
299 if (update.InventoryData[i].TransactionID != LLUUID.Zero)
300 {
301 AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID));
302 if (asset != null)
303 {
304 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
305 }
306 else
307 {
308 asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID);
309 if (asset != null)
310 {
311 m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
312 }
313 else
314 {
315
316 }
317 }
318 }
319 else
320 {
321 m_inventoryCache.UpdateInventoryItemDetails(this, update.InventoryData[i].ItemID, update.InventoryData[i]); ;
322 }
323 }
324 break;
325 case PacketType.RequestTaskInventory:
326 RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack;
327 ReplyTaskInventoryPacket replytask = new ReplyTaskInventoryPacket();
328 bool foundent = false;
329 foreach (Entity ent in m_world.Entities.Values)
330 {
331 if (ent.localid == requesttask.InventoryData.LocalID)
332 {
333 replytask.InventoryData.TaskID = ent.uuid;
334 replytask.InventoryData.Serial = 0;
335 replytask.InventoryData.Filename = new byte[0];
336 foundent = true;
337 }
338 }
339 if (foundent)
340 {
341 this.OutPacket(replytask);
342 }
343 break;
344 case PacketType.UpdateTaskInventory:
345 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
346 AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID);
347 if (myinventory != null)
348 {
349 if (updatetask.UpdateData.Key == 0)
350 {
351 if (myinventory.InventoryItems[updatetask.InventoryData.ItemID] != null)
352 {
353 if (myinventory.InventoryItems[updatetask.InventoryData.ItemID].Type == 7)
354 {
355 LLUUID noteaid = myinventory.InventoryItems[updatetask.InventoryData.ItemID].AssetID;
356 AssetBase assBase = this.m_assetCache.GetAsset(noteaid);
357 if (assBase != null)
358 {
359 foreach (Entity ent in m_world.Entities.Values)
360 {
361 if (ent.localid == updatetask.UpdateData.LocalID)
362 {
363 if (ent is OpenSim.RegionServer.Simulator.Primitive)
364 {
365 this.m_world.AddScript(ent, Util.FieldToString(assBase.Data));
366 }
367 }
368 }
369 }
370 }
371 }
372 }
373 }
374 break;
375 case PacketType.MapLayerRequest:
376 // This be busted.
377 MapLayerRequestPacket MapRequest = (MapLayerRequestPacket)Pack;
378 this.RequestMapLayer();
379 this.RequestMapBlocks((int)this.m_regionData.RegionLocX - 5, (int)this.m_regionData.RegionLocY - 5, (int)this.m_regionData.RegionLocX + 5, (int)this.m_regionData.RegionLocY + 5);
380 break;
381
382 case PacketType.MapBlockRequest:
383 MapBlockRequestPacket MapBRequest = (MapBlockRequestPacket)Pack;
384 this.RequestMapBlocks(MapBRequest.PositionData.MinX, MapBRequest.PositionData.MinY, MapBRequest.PositionData.MaxX, MapBRequest.PositionData.MaxY);
385 break;
386
387 case PacketType.MapNameRequest:
388 // TODO.
389 break;
390
391 case PacketType.TeleportLandmarkRequest:
392 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
393
394 TeleportStartPacket tpStart = new TeleportStartPacket();
395 tpStart.Info.TeleportFlags = 8; // tp via lm
396 this.OutPacket(tpStart);
397
398 TeleportProgressPacket tpProgress = new TeleportProgressPacket();
399 tpProgress.Info.Message = (new System.Text.ASCIIEncoding()).GetBytes("sending_landmark");
400 tpProgress.Info.TeleportFlags = 8;
401 tpProgress.AgentData.AgentID = tpReq.Info.AgentID;
402 this.OutPacket(tpProgress);
403
404 // Fetch landmark
405 LLUUID lmid = tpReq.Info.LandmarkID;
406 AssetBase lma = this.m_assetCache.GetAsset(lmid);
407 if (lma != null)
408 {
409 AssetLandmark lm = new AssetLandmark(lma);
410
411 if (lm.RegionID == m_regionData.SimUUID)
412 {
413 TeleportLocalPacket tpLocal = new TeleportLocalPacket();
414
415 tpLocal.Info.AgentID = tpReq.Info.AgentID;
416 tpLocal.Info.TeleportFlags = 8; // Teleport via landmark
417 tpLocal.Info.LocationID = 2;
418 tpLocal.Info.Position = lm.Position;
419 OutPacket(tpLocal);
420 }
421 else
422 {
423 TeleportCancelPacket tpCancel = new TeleportCancelPacket();
424 tpCancel.Info.AgentID = tpReq.Info.AgentID;
425 tpCancel.Info.SessionID = tpReq.Info.SessionID;
426 OutPacket(tpCancel);
427 }
428 }
429 else
430 {
431 Console.WriteLine("Cancelling Teleport - fetch asset not yet implemented");
432
433 TeleportCancelPacket tpCancel = new TeleportCancelPacket();
434 tpCancel.Info.AgentID = tpReq.Info.AgentID;
435 tpCancel.Info.SessionID = tpReq.Info.SessionID;
436 OutPacket(tpCancel);
437 }
438 break;
439 case PacketType.TeleportLocationRequest:
440 TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack;
441 Console.WriteLine(tpLocReq.ToString());
442
443 tpStart = new TeleportStartPacket();
444 tpStart.Info.TeleportFlags = 16; // Teleport via location
445 Console.WriteLine(tpStart.ToString());
446 OutPacket(tpStart);
447
448 if (m_regionData.RegionHandle != tpLocReq.Info.RegionHandle)
449 {
450 /* m_gridServer.getRegion(tpLocReq.Info.RegionHandle); */
451 Console.WriteLine("Inter-sim teleport not yet implemented");
452 TeleportCancelPacket tpCancel = new TeleportCancelPacket();
453 tpCancel.Info.SessionID = tpLocReq.AgentData.SessionID;
454 tpCancel.Info.AgentID = tpLocReq.AgentData.AgentID;
455
456 OutPacket(tpCancel);
457 }
458 else
459 {
460 Console.WriteLine("Local teleport");
461 TeleportLocalPacket tpLocal = new TeleportLocalPacket();
462 tpLocal.Info.AgentID = tpLocReq.AgentData.AgentID;
463 tpLocal.Info.TeleportFlags = tpStart.Info.TeleportFlags;
464 tpLocal.Info.LocationID = 2;
465 tpLocal.Info.LookAt = tpLocReq.Info.LookAt;
466 tpLocal.Info.Position = tpLocReq.Info.Position;
467 OutPacket(tpLocal);
468
469 }
470 break;
471 #endregion
472
473 #region Parcel Packets
474 case PacketType.ParcelPropertiesRequest:
475 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack;
476 OnParcelPropertiesRequest((int)Math.Round(propertiesRequest.ParcelData.West), (int)Math.Round(propertiesRequest.ParcelData.South), (int)Math.Round(propertiesRequest.ParcelData.East), (int)Math.Round(propertiesRequest.ParcelData.North),propertiesRequest.ParcelData.SequenceID,propertiesRequest.ParcelData.SnapSelection, this);
477 break;
478 case PacketType.ParcelDivide:
479 ParcelDividePacket parcelDivide = (ParcelDividePacket)Pack;
480 OnParcelDivideRequest((int)Math.Round(parcelDivide.ParcelData.West), (int)Math.Round(parcelDivide.ParcelData.South), (int)Math.Round(parcelDivide.ParcelData.East), (int)Math.Round(parcelDivide.ParcelData.North), this);
481 break;
482 case PacketType.ParcelJoin:
483 ParcelJoinPacket parcelJoin = (ParcelJoinPacket)Pack;
484 OnParcelJoinRequest((int)Math.Round(parcelJoin.ParcelData.West), (int)Math.Round(parcelJoin.ParcelData.South), (int)Math.Round(parcelJoin.ParcelData.East), (int)Math.Round(parcelJoin.ParcelData.North), this);
485 break;
486 case PacketType.ParcelPropertiesUpdate:
487 ParcelPropertiesUpdatePacket updatePacket = (ParcelPropertiesUpdatePacket)Pack;
488 OnParcelPropertiesUpdateRequest(updatePacket, this);
489 break;
490 #endregion
491
492 #region Estate Packets
493 case PacketType.EstateOwnerMessage:
494 this.m_world.estateManager.handleEstateOwnerMessage((EstateOwnerMessagePacket)Pack, this);
495 break;
496 #endregion
497 #region unimplemented handlers
498 case PacketType.AgentIsNowWearing:
499 // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack;
500 break;
501 case PacketType.ObjectScale:
502 break;
503 case PacketType.MoneyBalanceRequest:
504 //This need to be actually done and not thrown back with fake infos
505 break;
506
507 case PacketType.EstateCovenantRequest:
508 //This should be actually done and not thrown back with fake info
509 EstateCovenantRequestPacket estateCovenantRequest = (EstateCovenantRequestPacket)Pack;
510 EstateCovenantReplyPacket estateCovenantReply = new EstateCovenantReplyPacket();
511 estateCovenantReply.Data.EstateName = libsecondlife.Helpers.StringToField("Leet Estate");
512 estateCovenantReply.Data.EstateOwnerID = LLUUID.Zero;
513 estateCovenantReply.Data.CovenantID = LLUUID.Zero;
514 estateCovenantReply.Data.CovenantTimestamp = (uint)0;
515 this.OutPacket((Packet)estateCovenantReply);
516 MainConsole.Instance.Notice("Sent Temporary Estate packet (they are in leet estate)");
517 break;
518 #endregion
519 }
520 }
521 }
522 }
523}
diff --git a/OpenSim/OpenSim.RegionServer/Client/ClientView.cs b/OpenSim/OpenSim.RegionServer/Client/ClientView.cs
deleted file mode 100644
index 29efcc9..0000000
--- a/OpenSim/OpenSim.RegionServer/Client/ClientView.cs
+++ /dev/null
@@ -1,461 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using libsecondlife;
33using libsecondlife.Packets;
34using Nwc.XmlRpc;
35using System.Net;
36using System.Net.Sockets;
37using System.IO;
38using System.Threading;
39using System.Timers;
40using OpenSim.Framework.Interfaces;
41using OpenSim.Framework.Types;
42using OpenSim.Framework.Inventory;
43using OpenSim.Framework.Utilities;
44using OpenSim.RegionServer.Simulator;
45using OpenSim.RegionServer.Assets;
46using OpenSim.Framework.Console;
47
48namespace OpenSim.RegionServer.Client
49{
50 public delegate bool PacketMethod(ClientView simClient, Packet packet);
51
52 /// <summary>
53 /// Handles new client connections
54 /// Constructor takes a single Packet and authenticates everything
55 /// </summary>
56 public partial class ClientView : ClientViewBase, IClientAPI
57 {
58 protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
59 protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance
60
61 public LLUUID AgentID;
62 public LLUUID SessionID;
63 public LLUUID SecureSessionID = LLUUID.Zero;
64 public bool m_child;
65 public Simulator.Avatar ClientAvatar;
66 private UseCircuitCodePacket cirpack;
67 public Thread ClientThread;
68 public LLVector3 startpos;
69
70 private AgentAssetUpload UploadAssets;
71 private LLUUID newAssetFolder = LLUUID.Zero;
72 private bool debug = false;
73 private World m_world;
74 private Dictionary<uint, ClientView> m_clientThreads;
75 private AssetCache m_assetCache;
76 private IGridServer m_gridServer;
77 private IUserServer m_userServer = null;
78 private InventoryCache m_inventoryCache;
79 public bool m_sandboxMode;
80 private int cachedtextureserial = 0;
81 private RegionInfo m_regionData;
82 protected AuthenticateSessionsBase m_authenticateSessionsHandler;
83
84 public IUserServer UserServer
85 {
86 set
87 {
88 this.m_userServer = value;
89 }
90 }
91
92 public LLVector3 StartPos
93 {
94 get
95 {
96 return startpos;
97 }
98 set
99 {
100 startpos = value;
101 }
102 }
103
104 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, World world, Dictionary<uint, ClientView> clientThreads, AssetCache assetCache, IGridServer gridServer, OpenSimNetworkHandler application, InventoryCache inventoryCache, bool sandboxMode, bool child, RegionInfo regionDat, AuthenticateSessionsBase authenSessions)
105 {
106 m_world = world;
107 m_clientThreads = clientThreads;
108 m_assetCache = assetCache;
109 m_gridServer = gridServer;
110 m_networkServer = application;
111 m_inventoryCache = inventoryCache;
112 m_sandboxMode = sandboxMode;
113 m_child = child;
114 m_regionData = regionDat;
115 m_authenticateSessionsHandler = authenSessions;
116 MainConsole.Instance.Notice("OpenSimClient.cs - Started up new client thread to handle incoming request");
117 cirpack = initialcirpack;
118 userEP = remoteEP;
119
120 if (m_gridServer.GetName() == "Remote")
121 {
122 this.m_child = m_authenticateSessionsHandler.GetAgentChildStatus(initialcirpack.CircuitCode.Code);
123 this.startpos = m_authenticateSessionsHandler.GetPosition(initialcirpack.CircuitCode.Code);
124
125 // Dont rez new users underground
126 float aboveGround = 3.0f; // rez at least 3 meters above ground
127 if (this.startpos.Z < (m_world.Terrain[(int)this.startpos.X, (int)this.startpos.Y] + aboveGround))
128 this.startpos.Z = m_world.Terrain[(int)this.startpos.X, (int)this.startpos.Y] + aboveGround;
129
130 }
131 else
132 {
133 this.startpos = new LLVector3(128, 128, m_world.Terrain[(int)128, (int)128] + 15.0f); // new LLVector3(128.0f, 128.0f, 60f);
134 }
135
136 PacketQueue = new BlockingQueue<QueItem>();
137
138 this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache);
139 AckTimer = new System.Timers.Timer(500);
140 AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed);
141 AckTimer.Start();
142
143 this.RegisterLocalPacketHandlers();
144
145
146
147 ClientThread = new Thread(new ThreadStart(AuthUser));
148 ClientThread.IsBackground = true;
149 ClientThread.Start();
150 }
151
152 # region Client Methods
153 public void UpgradeClient()
154 {
155 MainConsole.Instance.Notice("SimClient.cs:UpgradeClient() - upgrading child to full agent");
156 this.m_child = false;
157 //this.m_world.RemoveViewerAgent(this);
158 if (!this.m_sandboxMode)
159 {
160 this.startpos = m_authenticateSessionsHandler.GetPosition(CircuitCode);
161 m_authenticateSessionsHandler.UpdateAgentChildStatus(CircuitCode, false);
162 }
163 OnChildAgentStatus(this.m_child);
164 //this.InitNewClient();
165 }
166
167 public void DowngradeClient()
168 {
169 MainConsole.Instance.Notice("SimClient.cs:UpgradeClient() - changing full agent to child");
170 this.m_child = true;
171 OnChildAgentStatus(this.m_child);
172 //this.m_world.RemoveViewerAgent(this);
173 //this.m_world.AddViewerAgent(this);
174 }
175
176 public void KillClient()
177 {
178 KillObjectPacket kill = new KillObjectPacket();
179 kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
180 kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock();
181 kill.ObjectData[0].ID = this.ClientAvatar.localid;
182 foreach (ClientView client in m_clientThreads.Values)
183 {
184 client.OutPacket(kill);
185 }
186 if (this.m_userServer != null)
187 {
188 this.m_inventoryCache.ClientLeaving(this.AgentID, this.m_userServer);
189 }
190 else
191 {
192 this.m_inventoryCache.ClientLeaving(this.AgentID, null);
193 }
194
195 m_world.RemoveViewerAgent(this);
196
197 m_clientThreads.Remove(this.CircuitCode);
198 m_networkServer.RemoveClientCircuit(this.CircuitCode);
199 this.ClientThread.Abort();
200 }
201 #endregion
202
203 # region Packet Handling
204 public static bool AddPacketHandler(PacketType packetType, PacketMethod handler)
205 {
206 bool result = false;
207 lock (PacketHandlers)
208 {
209 if (!PacketHandlers.ContainsKey(packetType))
210 {
211 PacketHandlers.Add(packetType, handler);
212 result = true;
213 }
214 }
215 return result;
216 }
217
218 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler)
219 {
220 bool result = false;
221 lock (m_packetHandlers)
222 {
223 if (!m_packetHandlers.ContainsKey(packetType))
224 {
225 m_packetHandlers.Add(packetType, handler);
226 result = true;
227 }
228 }
229 return result;
230 }
231
232 protected virtual bool ProcessPacketMethod(Packet packet)
233 {
234 bool result = false;
235 bool found = false;
236 PacketMethod method;
237 if (m_packetHandlers.TryGetValue(packet.Type, out method))
238 {
239 //there is a local handler for this packet type
240 result = method(this, packet);
241 }
242 else
243 {
244 //there is not a local handler so see if there is a Global handler
245 lock (PacketHandlers)
246 {
247 found = PacketHandlers.TryGetValue(packet.Type, out method);
248 }
249 if (found)
250 {
251 result = method(this, packet);
252 }
253 }
254 return result;
255 }
256
257 protected virtual void ClientLoop()
258 {
259 MainConsole.Instance.Notice("OpenSimClient.cs:ClientLoop() - Entered loop");
260 while (true)
261 {
262 QueItem nextPacket = PacketQueue.Dequeue();
263 if (nextPacket.Incoming)
264 {
265 //is a incoming packet
266 ProcessInPacket(nextPacket.Packet);
267 }
268 else
269 {
270 //is a out going packet
271 ProcessOutPacket(nextPacket.Packet);
272 }
273 }
274 }
275 # endregion
276
277 # region Setup
278
279 protected virtual void InitNewClient()
280 {
281 MainConsole.Instance.Notice("OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
282 this.ClientAvatar = m_world.AddViewerAgent(this);
283 }
284
285 protected virtual void AuthUser()
286 {
287 // AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code);
288 AuthenticateResponse sessionInfo = this.m_networkServer.AuthenticateSession(cirpack.CircuitCode.SessionID, cirpack.CircuitCode.ID, cirpack.CircuitCode.Code);
289 if (!sessionInfo.Authorised)
290 {
291 //session/circuit not authorised
292 OpenSim.Framework.Console.MainConsole.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString());
293 ClientThread.Abort();
294 }
295 else
296 {
297 OpenSim.Framework.Console.MainConsole.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString());
298 //session is authorised
299 this.AgentID = cirpack.CircuitCode.ID;
300 this.SessionID = cirpack.CircuitCode.SessionID;
301 this.CircuitCode = cirpack.CircuitCode.Code;
302 InitNewClient();
303 this.ClientAvatar.firstname = sessionInfo.LoginInfo.First;
304 this.ClientAvatar.lastname = sessionInfo.LoginInfo.Last;
305 if (sessionInfo.LoginInfo.SecureSession != LLUUID.Zero)
306 {
307 this.SecureSessionID = sessionInfo.LoginInfo.SecureSession;
308 }
309
310 // Create Inventory, currently only works for sandbox mode
311 if (m_sandboxMode)
312 {
313 this.SetupInventory(sessionInfo);
314 }
315
316 //m_world.parcelManager.sendParcelOverlay(this);
317 m_world.estateManager.sendRegionInfoPacket(this);
318
319 ClientLoop();
320 }
321 }
322 # endregion
323
324
325 protected override void KillThread()
326 {
327 this.ClientThread.Abort();
328 }
329
330 #region World/Avatar To Viewer Methods
331
332 public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
333 {
334 System.Text.Encoding enc = System.Text.Encoding.ASCII;
335 libsecondlife.Packets.ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket();
336 reply.ChatData.Audible = 1;
337 reply.ChatData.Message = message;
338 reply.ChatData.ChatType = type;
339 reply.ChatData.SourceType = 1;
340 reply.ChatData.Position = fromPos;
341 reply.ChatData.FromName = enc.GetBytes(fromName + "\0");
342 reply.ChatData.OwnerID = fromAgentID;
343 reply.ChatData.SourceID = fromAgentID;
344
345 this.OutPacket(reply);
346 }
347
348 public void SendAppearance(AvatarWearable[] wearables)
349 {
350 AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket();
351 aw.AgentData.AgentID = this.AgentID;
352 aw.AgentData.SerialNum = 0;
353 aw.AgentData.SessionID = this.SessionID;
354
355 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
356 AgentWearablesUpdatePacket.WearableDataBlock awb;
357 for (int i = 0; i < wearables.Length; i++)
358 {
359 awb = new AgentWearablesUpdatePacket.WearableDataBlock();
360 awb.WearableType = (byte)i;
361 awb.AssetID = wearables[i].AssetID;
362 awb.ItemID = wearables[i].ItemID;
363 aw.WearableData[i] = awb;
364 }
365
366 this.OutPacket(aw);
367 }
368 #endregion
369
370 #region Inventory Creation
371 private void SetupInventory(AuthenticateResponse sessionInfo)
372 {
373 AgentInventory inventory = null;
374 if (sessionInfo.LoginInfo.InventoryFolder != null)
375 {
376 inventory = this.CreateInventory(sessionInfo.LoginInfo.InventoryFolder);
377 if (sessionInfo.LoginInfo.BaseFolder != null)
378 {
379 if (!inventory.HasFolder(sessionInfo.LoginInfo.BaseFolder))
380 {
381 m_inventoryCache.CreateNewInventoryFolder(this, sessionInfo.LoginInfo.BaseFolder);
382 }
383 this.newAssetFolder = sessionInfo.LoginInfo.BaseFolder;
384 AssetBase[] inventorySet = m_assetCache.CreateNewInventorySet(this.AgentID);
385 if (inventorySet != null)
386 {
387 for (int i = 0; i < inventorySet.Length; i++)
388 {
389 if (inventorySet[i] != null)
390 {
391 m_inventoryCache.AddNewInventoryItem(this, sessionInfo.LoginInfo.BaseFolder, inventorySet[i]);
392 }
393 }
394 }
395 }
396 }
397 }
398 private AgentInventory CreateInventory(LLUUID baseFolder)
399 {
400 AgentInventory inventory = null;
401 if (this.m_userServer != null)
402 {
403 // a user server is set so request the inventory from it
404 MainConsole.Instance.Verbose("getting inventory from user server");
405 inventory = m_inventoryCache.FetchAgentsInventory(this.AgentID, m_userServer);
406 }
407 else
408 {
409 inventory = new AgentInventory();
410 inventory.AgentID = this.AgentID;
411 inventory.CreateRootFolder(this.AgentID, false);
412 m_inventoryCache.AddNewAgentsInventory(inventory);
413 m_inventoryCache.CreateNewInventoryFolder(this, baseFolder);
414 }
415 return inventory;
416 }
417
418 private void CreateInventoryItem(CreateInventoryItemPacket packet)
419 {
420 if (!(packet.InventoryBlock.Type == 3 || packet.InventoryBlock.Type == 7))
421 {
422 MainConsole.Instance.Warn("Attempted to create " + Util.FieldToString(packet.InventoryBlock.Name) + " in inventory. Unsupported type");
423 return;
424 }
425
426 //lets try this out with creating a notecard
427 AssetBase asset = new AssetBase();
428
429 asset.Name = Util.FieldToString(packet.InventoryBlock.Name);
430 asset.Description = Util.FieldToString(packet.InventoryBlock.Description);
431 asset.InvType = packet.InventoryBlock.InvType;
432 asset.Type = packet.InventoryBlock.Type;
433 asset.FullID = LLUUID.Random();
434
435 switch (packet.InventoryBlock.Type)
436 {
437 case 7: // Notecard
438 asset.Data = new byte[0];
439 break;
440
441 case 3: // Landmark
442 String content;
443 content = "Landmark version 2\n";
444 content += "region_id " + m_regionData.SimUUID + "\n";
445 String strPos = String.Format("%.2f %.2f %.2f>",
446 this.ClientAvatar.Pos.X,
447 this.ClientAvatar.Pos.Y,
448 this.ClientAvatar.Pos.Z);
449 content += "local_pos " + strPos + "\n";
450 asset.Data = (new System.Text.ASCIIEncoding()).GetBytes(content);
451 break;
452 default:
453 break;
454 }
455 m_assetCache.AddAsset(asset);
456 m_inventoryCache.AddNewInventoryItem(this, packet.InventoryBlock.FolderID, asset);
457 }
458 #endregion
459
460 }
461}
diff --git a/OpenSim/OpenSim.RegionServer/Client/ClientViewBase.cs b/OpenSim/OpenSim.RegionServer/Client/ClientViewBase.cs
deleted file mode 100644
index 2ff245f..0000000
--- a/OpenSim/OpenSim.RegionServer/Client/ClientViewBase.cs
+++ /dev/null
@@ -1,326 +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;
30using System.Collections.Generic;
31using libsecondlife;
32using libsecondlife.Packets;
33using System.Net;
34using System.Net.Sockets;
35using System.IO;
36using System.Threading;
37using System.Timers;
38using OpenSim.Framework.Utilities;
39using OpenSim.Framework.Interfaces;
40using OpenSim.Framework.Console;
41
42namespace OpenSim.RegionServer.Client
43{
44 public class ClientViewBase
45 {
46 protected BlockingQueue<QueItem> PacketQueue;
47 protected Dictionary<uint, uint> PendingAcks = new Dictionary<uint, uint>();
48 protected Dictionary<uint, Packet> NeedAck = new Dictionary<uint, Packet>();
49
50 protected System.Timers.Timer AckTimer;
51 protected uint Sequence = 0;
52 protected object SequenceLock = new object();
53 protected const int MAX_APPENDED_ACKS = 10;
54 protected const int RESEND_TIMEOUT = 4000;
55 protected const int MAX_SEQUENCE = 0xFFFFFF;
56
57 public uint CircuitCode;
58 public EndPoint userEP;
59
60 protected OpenSimNetworkHandler m_networkServer;
61
62 public ClientViewBase()
63 {
64
65 }
66
67 protected virtual void ProcessInPacket(Packet Pack)
68 {
69
70 }
71
72 protected virtual void ProcessOutPacket(Packet Pack)
73 {
74 // Keep track of when this packet was sent out
75 Pack.TickCount = Environment.TickCount;
76
77
78 if (!Pack.Header.Resent)
79 {
80 // Set the sequence number
81 lock (SequenceLock)
82 {
83 if (Sequence >= MAX_SEQUENCE)
84 Sequence = 1;
85 else
86 Sequence++;
87 Pack.Header.Sequence = Sequence;
88 }
89
90 if (Pack.Header.Reliable) //DIRTY HACK
91 {
92 lock (NeedAck)
93 {
94 if (!NeedAck.ContainsKey(Pack.Header.Sequence))
95 {
96 try
97 {
98 NeedAck.Add(Pack.Header.Sequence, Pack);
99 }
100 catch (Exception e) // HACKY
101 {
102 e.ToString();
103 // Ignore
104 // Seems to throw a exception here occasionally
105 // of 'duplicate key' despite being locked.
106 // !?!?!?
107 }
108 }
109 else
110 {
111 // Client.Log("Attempted to add a duplicate sequence number (" +
112 // packet.Header.Sequence + ") to the NeedAck dictionary for packet type " +
113 // packet.Type.ToString(), Helpers.LogLevel.Warning);
114 }
115 }
116
117 // Don't append ACKs to resent packets, in case that's what was causing the
118 // delivery to fail
119 if (!Pack.Header.Resent)
120 {
121 // Append any ACKs that need to be sent out to this packet
122 lock (PendingAcks)
123 {
124 if (PendingAcks.Count > 0 && PendingAcks.Count < MAX_APPENDED_ACKS &&
125 Pack.Type != PacketType.PacketAck &&
126 Pack.Type != PacketType.LogoutRequest)
127 {
128 Pack.Header.AckList = new uint[PendingAcks.Count];
129 int i = 0;
130
131 foreach (uint ack in PendingAcks.Values)
132 {
133 Pack.Header.AckList[i] = ack;
134 i++;
135 }
136
137 PendingAcks.Clear();
138 Pack.Header.AppendedAcks = true;
139 }
140 }
141 }
142 }
143 }
144
145 byte[] ZeroOutBuffer = new byte[4096];
146 byte[] sendbuffer;
147 sendbuffer = Pack.ToBytes();
148
149 try
150 {
151 if (Pack.Header.Zerocoded)
152 {
153 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer);
154 m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, CircuitCode);//userEP);
155 }
156 else
157 {
158 m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, CircuitCode); //userEP);
159 }
160 }
161 catch (Exception)
162 {
163 MainConsole.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread");
164 this.KillThread();
165 }
166
167 }
168
169 public virtual void InPacket(Packet NewPack)
170 {
171 // Handle appended ACKs
172 if (NewPack.Header.AppendedAcks)
173 {
174 lock (NeedAck)
175 {
176 foreach (uint ack in NewPack.Header.AckList)
177 {
178 NeedAck.Remove(ack);
179 }
180 }
181 }
182
183 // Handle PacketAck packets
184 if (NewPack.Type == PacketType.PacketAck)
185 {
186 PacketAckPacket ackPacket = (PacketAckPacket)NewPack;
187
188 lock (NeedAck)
189 {
190 foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets)
191 {
192 NeedAck.Remove(block.ID);
193 }
194 }
195 }
196 else if ((NewPack.Type == PacketType.StartPingCheck))
197 {
198 //reply to pingcheck
199 libsecondlife.Packets.StartPingCheckPacket startPing = (libsecondlife.Packets.StartPingCheckPacket)NewPack;
200 libsecondlife.Packets.CompletePingCheckPacket endPing = new CompletePingCheckPacket();
201 endPing.PingID.PingID = startPing.PingID.PingID;
202 OutPacket(endPing);
203 }
204 else
205 {
206 QueItem item = new QueItem();
207 item.Packet = NewPack;
208 item.Incoming = true;
209 this.PacketQueue.Enqueue(item);
210 }
211
212 }
213
214 public virtual void OutPacket(Packet NewPack)
215 {
216 QueItem item = new QueItem();
217 item.Packet = NewPack;
218 item.Incoming = false;
219 this.PacketQueue.Enqueue(item);
220 }
221
222 # region Low Level Packet Methods
223
224 protected void ack_pack(Packet Pack)
225 {
226 if (Pack.Header.Reliable)
227 {
228 libsecondlife.Packets.PacketAckPacket ack_it = new PacketAckPacket();
229 ack_it.Packets = new PacketAckPacket.PacketsBlock[1];
230 ack_it.Packets[0] = new PacketAckPacket.PacketsBlock();
231 ack_it.Packets[0].ID = Pack.Header.Sequence;
232 ack_it.Header.Reliable = false;
233
234 OutPacket(ack_it);
235
236 }
237 /*
238 if (Pack.Header.Reliable)
239 {
240 lock (PendingAcks)
241 {
242 uint sequence = (uint)Pack.Header.Sequence;
243 if (!PendingAcks.ContainsKey(sequence)) { PendingAcks[sequence] = sequence; }
244 }
245 }*/
246 }
247
248 protected void ResendUnacked()
249 {
250 int now = Environment.TickCount;
251
252 lock (NeedAck)
253 {
254 foreach (Packet packet in NeedAck.Values)
255 {
256 if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent))
257 {
258 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Resending " + packet.Type.ToString() + " packet, " +
259 (now - packet.TickCount) + "ms have passed");
260
261 packet.Header.Resent = true;
262 OutPacket(packet);
263 }
264 }
265 }
266 }
267
268 protected void SendAcks()
269 {
270 lock (PendingAcks)
271 {
272 if (PendingAcks.Count > 0)
273 {
274 if (PendingAcks.Count > 250)
275 {
276 // FIXME: Handle the odd case where we have too many pending ACKs queued up
277 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Too many ACKs queued up!");
278 return;
279 }
280
281
282 int i = 0;
283 PacketAckPacket acks = new PacketAckPacket();
284 acks.Packets = new PacketAckPacket.PacketsBlock[PendingAcks.Count];
285
286 foreach (uint ack in PendingAcks.Values)
287 {
288 acks.Packets[i] = new PacketAckPacket.PacketsBlock();
289 acks.Packets[i].ID = ack;
290 i++;
291 }
292
293 acks.Header.Reliable = false;
294 OutPacket(acks);
295
296 PendingAcks.Clear();
297 }
298 }
299 }
300
301 protected void AckTimer_Elapsed(object sender, ElapsedEventArgs ea)
302 {
303 SendAcks();
304 ResendUnacked();
305 }
306 #endregion
307
308 protected virtual void KillThread()
309 {
310
311 }
312
313 #region Nested Classes
314
315 public class QueItem
316 {
317 public QueItem()
318 {
319 }
320
321 public Packet Packet;
322 public bool Incoming;
323 }
324 #endregion
325 }
326}
diff --git a/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs b/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs
deleted file mode 100644
index 0bf0615..0000000
--- a/OpenSim/OpenSim.RegionServer/Estate/EstateManager.cs
+++ /dev/null
@@ -1,293 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5using OpenSim.Framework.Types;
6using OpenSim.RegionServer.Simulator;
7using OpenSim.RegionServer.Client;
8
9using libsecondlife;
10using libsecondlife.Packets;
11
12namespace OpenSim.RegionServer.Estate
13{
14
15 /// <summary>
16 /// Processes requests regarding estates. Refer to EstateSettings.cs in OpenSim.Framework. Types for all of the core settings
17 /// </summary>
18 public class EstateManager
19 {
20 private World m_world;
21
22 public EstateManager(World world)
23 {
24 m_world = world; //Estate settings found at world.m_regInfo.estateSettings
25 }
26
27 private bool convertParamStringToBool(byte[] field)
28 {
29 string s = Helpers.FieldToUTF8String(field);
30 if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true")
31 {
32 return true;
33 }
34 return false;
35 }
36
37 public void handleEstateOwnerMessage(EstateOwnerMessagePacket packet, ClientView remote_client)
38 {
39 if (remote_client.AgentID == m_world.m_regInfo.MasterAvatarAssignedUUID)
40 {
41 switch (Helpers.FieldToUTF8String(packet.MethodData.Method))
42 {
43 case "getinfo":
44 Console.WriteLine("GETINFO Requested");
45 this.sendRegionInfoPacketToAll();
46
47 break;
48 case "setregioninfo":
49 if (packet.ParamList.Length != 9)
50 {
51 OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length");
52 }
53 else
54 {
55 m_world.m_regInfo.estateSettings.regionFlags = libsecondlife.Simulator.RegionFlags.None;
56
57 if (convertParamStringToBool(packet.ParamList[0].Parameter))
58 {
59 m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockTerraform;
60 }
61
62 if (convertParamStringToBool(packet.ParamList[1].Parameter))
63 {
64 m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.NoFly;
65 }
66
67 if (convertParamStringToBool(packet.ParamList[2].Parameter))
68 {
69 m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowDamage;
70 }
71
72 if (convertParamStringToBool(packet.ParamList[3].Parameter) == false)
73 {
74 m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.BlockLandResell;
75 }
76
77
78 int tempMaxAgents = Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter)));
79 m_world.m_regInfo.estateSettings.maxAgents = (byte)tempMaxAgents;
80
81 float tempObjectBonusFactor = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
82 m_world.m_regInfo.estateSettings.objectBonusFactor = tempObjectBonusFactor;
83
84 int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter));
85 m_world.m_regInfo.estateSettings.simAccess = (libsecondlife.Simulator.SimAccess)tempMatureLevel;
86
87
88 if (convertParamStringToBool(packet.ParamList[7].Parameter))
89 {
90 m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.RestrictPushObject;
91 }
92
93 if (convertParamStringToBool(packet.ParamList[8].Parameter))
94 {
95 m_world.m_regInfo.estateSettings.regionFlags = m_world.m_regInfo.estateSettings.regionFlags | libsecondlife.Simulator.RegionFlags.AllowParcelChanges;
96 }
97
98 sendRegionInfoPacketToAll();
99
100 }
101 break;
102 case "texturebase":
103 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
104 {
105 string s = Helpers.FieldToUTF8String(block.Parameter);
106 string[] splitField = s.Split(' ');
107 if (splitField.Length == 2)
108 {
109 LLUUID tempUUID = new LLUUID(splitField[1]);
110 switch (Convert.ToInt16(splitField[0]))
111 {
112 case 0:
113 m_world.m_regInfo.estateSettings.terrainBase0 = tempUUID;
114 break;
115 case 1:
116 m_world.m_regInfo.estateSettings.terrainBase1 = tempUUID;
117 break;
118 case 2:
119 m_world.m_regInfo.estateSettings.terrainBase2 = tempUUID;
120 break;
121 case 3:
122 m_world.m_regInfo.estateSettings.terrainBase3 = tempUUID;
123 break;
124 }
125 }
126 }
127 break;
128 case "texturedetail":
129 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
130 {
131
132 string s = Helpers.FieldToUTF8String(block.Parameter);
133 string[] splitField = s.Split(' ');
134 if (splitField.Length == 2)
135 {
136 LLUUID tempUUID = new LLUUID(splitField[1]);
137 switch (Convert.ToInt16(splitField[0]))
138 {
139 case 0:
140 m_world.m_regInfo.estateSettings.terrainDetail0 = tempUUID;
141 break;
142 case 1:
143 m_world.m_regInfo.estateSettings.terrainDetail1 = tempUUID;
144 break;
145 case 2:
146 m_world.m_regInfo.estateSettings.terrainDetail2 = tempUUID;
147 break;
148 case 3:
149 m_world.m_regInfo.estateSettings.terrainDetail3 = tempUUID;
150 break;
151 }
152 }
153 }
154 break;
155 case "textureheights":
156 foreach (EstateOwnerMessagePacket.ParamListBlock block in packet.ParamList)
157 {
158
159 string s = Helpers.FieldToUTF8String(block.Parameter);
160 string[] splitField = s.Split(' ');
161 if (splitField.Length == 3)
162 {
163
164 float tempHeightLow = (float)Convert.ToDecimal(splitField[1]);
165 float tempHeightHigh = (float)Convert.ToDecimal(splitField[2]);
166
167 switch (Convert.ToInt16(splitField[0]))
168 {
169 case 0:
170 m_world.m_regInfo.estateSettings.terrainStartHeight0 = tempHeightLow;
171 m_world.m_regInfo.estateSettings.terrainHeightRange0 = tempHeightHigh;
172 break;
173 case 1:
174 m_world.m_regInfo.estateSettings.terrainStartHeight1 = tempHeightLow;
175 m_world.m_regInfo.estateSettings.terrainHeightRange1 = tempHeightHigh;
176 break;
177 case 2:
178 m_world.m_regInfo.estateSettings.terrainStartHeight2 = tempHeightLow;
179 m_world.m_regInfo.estateSettings.terrainHeightRange2 = tempHeightHigh;
180 break;
181 case 3:
182 m_world.m_regInfo.estateSettings.terrainStartHeight3 = tempHeightLow;
183 m_world.m_regInfo.estateSettings.terrainHeightRange3 = tempHeightHigh;
184 break;
185 }
186 }
187 }
188 break;
189 case "texturecommit":
190 sendRegionHandshakeToAll();
191 break;
192 case "setregionterrain":
193 if (packet.ParamList.Length != 9)
194 {
195 OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
196 }
197 else
198 {
199 m_world.m_regInfo.estateSettings.waterHeight = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[0].Parameter));
200 m_world.m_regInfo.estateSettings.terrainRaiseLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter));
201 m_world.m_regInfo.estateSettings.terrainLowerLimit = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter));
202 m_world.m_regInfo.estateSettings.useFixedSun = this.convertParamStringToBool(packet.ParamList[4].Parameter);
203 m_world.m_regInfo.estateSettings.sunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
204
205 sendRegionInfoPacketToAll();
206 }
207 break;
208 default:
209 OpenSim.Framework.Console.MainConsole.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString());
210 break;
211 }
212 }
213 }
214
215 public void sendRegionInfoPacketToAll()
216 {
217 foreach (OpenSim.RegionServer.Simulator.Avatar av in m_world.Avatars.Values)
218 {
219 this.sendRegionInfoPacket(av.ControllingClient);
220 }
221 }
222
223 public void sendRegionHandshakeToAll()
224 {
225 foreach (OpenSim.RegionServer.Simulator.Avatar av in m_world.Avatars.Values)
226 {
227 this.sendRegionHandshake(av.ControllingClient);
228 }
229 }
230
231 public void sendRegionInfoPacket(ClientView remote_client)
232 {
233
234 RegionInfoPacket regionInfoPacket = new RegionInfoPacket();
235 regionInfoPacket.AgentData.AgentID = remote_client.AgentID;
236 regionInfoPacket.AgentData.SessionID = remote_client.SessionID;
237 regionInfoPacket.RegionInfo.BillableFactor = m_world.m_regInfo.estateSettings.billableFactor;
238 regionInfoPacket.RegionInfo.EstateID = m_world.m_regInfo.estateSettings.estateID;
239 regionInfoPacket.RegionInfo.MaxAgents = m_world.m_regInfo.estateSettings.maxAgents;
240 regionInfoPacket.RegionInfo.ObjectBonusFactor = m_world.m_regInfo.estateSettings.objectBonusFactor;
241 regionInfoPacket.RegionInfo.ParentEstateID = m_world.m_regInfo.estateSettings.parentEstateID;
242 regionInfoPacket.RegionInfo.PricePerMeter = m_world.m_regInfo.estateSettings.pricePerMeter;
243 regionInfoPacket.RegionInfo.RedirectGridX = m_world.m_regInfo.estateSettings.redirectGridX;
244 regionInfoPacket.RegionInfo.RedirectGridY = m_world.m_regInfo.estateSettings.redirectGridY;
245 regionInfoPacket.RegionInfo.RegionFlags = (uint)m_world.m_regInfo.estateSettings.regionFlags;
246 regionInfoPacket.RegionInfo.SimAccess = (byte)m_world.m_regInfo.estateSettings.simAccess;
247 regionInfoPacket.RegionInfo.SimName = Helpers.StringToField(m_world.m_regInfo.RegionName);
248 regionInfoPacket.RegionInfo.SunHour = m_world.m_regInfo.estateSettings.sunHour;
249 regionInfoPacket.RegionInfo.TerrainLowerLimit = m_world.m_regInfo.estateSettings.terrainLowerLimit;
250 regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_world.m_regInfo.estateSettings.terrainRaiseLimit;
251 regionInfoPacket.RegionInfo.UseEstateSun = !m_world.m_regInfo.estateSettings.useFixedSun;
252 regionInfoPacket.RegionInfo.WaterHeight = m_world.m_regInfo.estateSettings.waterHeight;
253
254 remote_client.OutPacket(regionInfoPacket);
255 }
256
257 public void sendRegionHandshake(ClientView remote_client)
258 {
259 System.Text.Encoding _enc = System.Text.Encoding.ASCII;
260 RegionHandshakePacket handshake = new RegionHandshakePacket();
261
262 handshake.RegionInfo.BillableFactor = m_world.m_regInfo.estateSettings.billableFactor;
263 handshake.RegionInfo.IsEstateManager = false;
264 handshake.RegionInfo.TerrainHeightRange00 = m_world.m_regInfo.estateSettings.terrainHeightRange0;
265 handshake.RegionInfo.TerrainHeightRange01 = m_world.m_regInfo.estateSettings.terrainHeightRange1;
266 handshake.RegionInfo.TerrainHeightRange10 = m_world.m_regInfo.estateSettings.terrainHeightRange2;
267 handshake.RegionInfo.TerrainHeightRange11 = m_world.m_regInfo.estateSettings.terrainHeightRange3;
268 handshake.RegionInfo.TerrainStartHeight00 = m_world.m_regInfo.estateSettings.terrainStartHeight0;
269 handshake.RegionInfo.TerrainStartHeight01 = m_world.m_regInfo.estateSettings.terrainStartHeight1;
270 handshake.RegionInfo.TerrainStartHeight10 = m_world.m_regInfo.estateSettings.terrainStartHeight2;
271 handshake.RegionInfo.TerrainStartHeight11 = m_world.m_regInfo.estateSettings.terrainStartHeight3;
272 handshake.RegionInfo.SimAccess = (byte)m_world.m_regInfo.estateSettings.simAccess;
273 handshake.RegionInfo.WaterHeight = m_world.m_regInfo.estateSettings.waterHeight;
274
275
276 handshake.RegionInfo.RegionFlags = (uint)m_world.m_regInfo.estateSettings.regionFlags;
277
278 handshake.RegionInfo.SimName = _enc.GetBytes(m_world.m_regInfo.RegionName + "\0");
279 handshake.RegionInfo.SimOwner = m_world.m_regInfo.MasterAvatarAssignedUUID;
280 handshake.RegionInfo.TerrainBase0 = m_world.m_regInfo.estateSettings.terrainBase0;
281 handshake.RegionInfo.TerrainBase1 = m_world.m_regInfo.estateSettings.terrainBase1;
282 handshake.RegionInfo.TerrainBase2 = m_world.m_regInfo.estateSettings.terrainBase2;
283 handshake.RegionInfo.TerrainBase3 = m_world.m_regInfo.estateSettings.terrainBase3;
284 handshake.RegionInfo.TerrainDetail0 = m_world.m_regInfo.estateSettings.terrainDetail0;
285 handshake.RegionInfo.TerrainDetail1 = m_world.m_regInfo.estateSettings.terrainDetail1;
286 handshake.RegionInfo.TerrainDetail2 = m_world.m_regInfo.estateSettings.terrainDetail2;
287 handshake.RegionInfo.TerrainDetail3 = m_world.m_regInfo.estateSettings.terrainDetail3;
288 handshake.RegionInfo.CacheID = LLUUID.Random(); //I guess this is for the client to remember an old setting?
289
290 remote_client.OutPacket(handshake);
291 }
292 }
293}
diff --git a/OpenSim/OpenSim.RegionServer/Grid.cs b/OpenSim/OpenSim.RegionServer/Grid.cs
deleted file mode 100644
index 844bb71..0000000
--- a/OpenSim/OpenSim.RegionServer/Grid.cs
+++ /dev/null
@@ -1,117 +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.Reflection;
32using OpenSim.Framework.Interfaces;
33using OpenSim.UserServer;
34
35namespace OpenSim.RegionServer
36{
37 public class Grid
38 {
39 public IAssetServer AssetServer;
40 public IGridServer GridServer;
41 public IUserServer UserServer;
42 public string AssetDll = "";
43 public string GridDll = "";
44
45 public Grid()
46 {
47 }
48
49 public virtual void Initialise()
50 {
51 //load the dlls
52 this.AssetServer = this.LoadAssetDll(this.AssetDll);
53 this.GridServer = this.LoadGridDll(this.GridDll);
54 }
55 public virtual void Close()
56 {
57 this.AssetServer.Close();
58 this.GridServer.Close();
59 }
60
61 private IAssetServer LoadAssetDll(string dllName)
62 {
63 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
64 IAssetServer server = null;
65
66 foreach (Type pluginType in pluginAssembly.GetTypes())
67 {
68 if (pluginType.IsPublic)
69 {
70 if (!pluginType.IsAbstract)
71 {
72 Type typeInterface = pluginType.GetInterface("IAssetPlugin", true);
73
74 if (typeInterface != null)
75 {
76 IAssetPlugin plug = (IAssetPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
77 server = plug.GetAssetServer();
78 break;
79 }
80
81 typeInterface = null;
82 }
83 }
84 }
85 pluginAssembly = null;
86 return server;
87 }
88
89 private IGridServer LoadGridDll(string dllName)
90 {
91 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
92 IGridServer server = null;
93
94 foreach (Type pluginType in pluginAssembly.GetTypes())
95 {
96 if (pluginType.IsPublic)
97 {
98 if (!pluginType.IsAbstract)
99 {
100 Type typeInterface = pluginType.GetInterface("IGridPlugin", true);
101
102 if (typeInterface != null)
103 {
104 IGridPlugin plug = (IGridPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
105 server = plug.GetGridServer();
106 break;
107 }
108
109 typeInterface = null;
110 }
111 }
112 }
113 pluginAssembly = null;
114 return server;
115 }
116 }
117}
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
deleted file mode 100644
index 889135b..0000000
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
+++ /dev/null
@@ -1,264 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{632E1BFD-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.RegionServer</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.RegionServer</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="Axiom.MathLib.dll" >
62 <HintPath>..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="Db4objects.Db4o.dll" >
66 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="libsecondlife.dll" >
70 <HintPath>..\..\bin\libsecondlife.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="System.Xml" >
78 <HintPath>System.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 <ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj">
84 <Name>OpenSim.Framework</Name>
85 <Project>{8ACA2445-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.Console\OpenSim.Framework.Console.csproj">
90 <Name>OpenSim.Framework.Console</Name>
91 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private>
94 </ProjectReference>
95 <ProjectReference Include="..\..\Common\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj">
96 <Name>OpenSim.GenericConfig.Xml</Name>
97 <Project>{E88EF749-0000-0000-0000-000000000000}</Project>
98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
99 <Private>False</Private>
100 </ProjectReference>
101 <ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj">
102 <Name>OpenSim.Physics.Manager</Name>
103 <Project>{8BE16150-0000-0000-0000-000000000000}</Project>
104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
105 <Private>False</Private>
106 </ProjectReference>
107 <ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj">
108 <Name>OpenSim.Servers</Name>
109 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
111 <Private>False</Private>
112 </ProjectReference>
113 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj">
114 <Name>OpenSim.Terrain.BasicTerrain</Name>
115 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project>
116 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
117 <Private>False</Private>
118 </ProjectReference>
119 <ProjectReference Include="..\..\Common\XmlRpcCS\XMLRPC.csproj">
120 <Name>XMLRPC</Name>
121 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
122 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
123 <Private>False</Private>
124 </ProjectReference>
125 </ItemGroup>
126 <ItemGroup>
127 <Compile Include="AgentAssetUpload.cs">
128 <SubType>Code</SubType>
129 </Compile>
130 <Compile Include="AuthenticateSessionsBase.cs">
131 <SubType>Code</SubType>
132 </Compile>
133 <Compile Include="AuthenticateSessionsLocal.cs">
134 <SubType>Code</SubType>
135 </Compile>
136 <Compile Include="AuthenticateSessionsRemote.cs">
137 <SubType>Code</SubType>
138 </Compile>
139 <Compile Include="Grid.cs">
140 <SubType>Code</SubType>
141 </Compile>
142 <Compile Include="OpenSimMain.cs">
143 <SubType>Code</SubType>
144 </Compile>
145 <Compile Include="OpenSimNetworkHandler.cs">
146 <SubType>Code</SubType>
147 </Compile>
148 <Compile Include="PacketServer.cs">
149 <SubType>Code</SubType>
150 </Compile>
151 <Compile Include="RegionInfo.cs">
152 <SubType>Code</SubType>
153 </Compile>
154 <Compile Include="RegionInfoBase.cs">
155 <SubType>Code</SubType>
156 </Compile>
157 <Compile Include="RegionServerBase.cs">
158 <SubType>Code</SubType>
159 </Compile>
160 <Compile Include="UDPServer.cs">
161 <SubType>Code</SubType>
162 </Compile>
163 <Compile Include="VersionInfo.cs">
164 <SubType>Code</SubType>
165 </Compile>
166 <Compile Include="Assets\AssetCache.cs">
167 <SubType>Code</SubType>
168 </Compile>
169 <Compile Include="Assets\InventoryCache.cs">
170 <SubType>Code</SubType>
171 </Compile>
172 <Compile Include="CAPS\AdminWebFront.cs">
173 <SubType>Code</SubType>
174 </Compile>
175 <Compile Include="Client\ClientView.cs">
176 <SubType>Code</SubType>
177 </Compile>
178 <Compile Include="Client\ClientView.Grid.cs">
179 <SubType>Code</SubType>
180 </Compile>
181 <Compile Include="Client\ClientView.PacketHandlers.cs">
182 <SubType>Code</SubType>
183 </Compile>
184 <Compile Include="Client\ClientView.ProcessPackets.cs">
185 <SubType>Code</SubType>
186 </Compile>
187 <Compile Include="Client\ClientViewBase.cs">
188 <SubType>Code</SubType>
189 </Compile>
190 <Compile Include="Estate\EstateManager.cs">
191 <SubType>Code</SubType>
192 </Compile>
193 <Compile Include="Scripting\IScriptContext.cs">
194 <SubType>Code</SubType>
195 </Compile>
196 <Compile Include="Scripting\IScriptEntity.cs">
197 <SubType>Code</SubType>
198 </Compile>
199 <Compile Include="Scripting\IScriptHandler.cs">
200 <SubType>Code</SubType>
201 </Compile>
202 <Compile Include="Scripting\Script.cs">
203 <SubType>Code</SubType>
204 </Compile>
205 <Compile Include="Scripting\ScriptFactory.cs">
206 <SubType>Code</SubType>
207 </Compile>
208 <Compile Include="Scripting\Scripts\FollowRandomAvatar.cs">
209 <SubType>Code</SubType>
210 </Compile>
211 <Compile Include="Simulator\Avatar.Client.cs">
212 <SubType>Code</SubType>
213 </Compile>
214 <Compile Include="Simulator\Avatar.cs">
215 <SubType>Code</SubType>
216 </Compile>
217 <Compile Include="Simulator\Avatar.Update.cs">
218 <SubType>Code</SubType>
219 </Compile>
220 <Compile Include="Simulator\AvatarAnimations.cs">
221 <SubType>Code</SubType>
222 </Compile>
223 <Compile Include="Simulator\Entity.cs">
224 <SubType>Code</SubType>
225 </Compile>
226 <Compile Include="Simulator\ParcelManager.cs">
227 <SubType>Code</SubType>
228 </Compile>
229 <Compile Include="Simulator\Primitive.cs">
230 <SubType>Code</SubType>
231 </Compile>
232 <Compile Include="Simulator\Primitive2.cs">
233 <SubType>Code</SubType>
234 </Compile>
235 <Compile Include="Simulator\SceneObject.cs">
236 <SubType>Code</SubType>
237 </Compile>
238 <Compile Include="Simulator\World.cs">
239 <SubType>Code</SubType>
240 </Compile>
241 <Compile Include="Simulator\World.PacketHandlers.cs">
242 <SubType>Code</SubType>
243 </Compile>
244 <Compile Include="Simulator\World.Scripting.cs">
245 <SubType>Code</SubType>
246 </Compile>
247 <Compile Include="Simulator\WorldBase.cs">
248 <SubType>Code</SubType>
249 </Compile>
250 <Compile Include="Types\Mesh.cs">
251 <SubType>Code</SubType>
252 </Compile>
253 <Compile Include="Types\Triangle.cs">
254 <SubType>Code</SubType>
255 </Compile>
256 </ItemGroup>
257 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
258 <PropertyGroup>
259 <PreBuildEvent>
260 </PreBuildEvent>
261 <PostBuildEvent>
262 </PostBuildEvent>
263 </PropertyGroup>
264</Project>
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build
deleted file mode 100644
index 13341b3..0000000
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.dll.build
+++ /dev/null
@@ -1,92 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.RegionServer" 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.RegionServer" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AgentAssetUpload.cs" />
15 <include name="AuthenticateSessionsBase.cs" />
16 <include name="AuthenticateSessionsLocal.cs" />
17 <include name="AuthenticateSessionsRemote.cs" />
18 <include name="Grid.cs" />
19 <include name="OpenSimMain.cs" />
20 <include name="OpenSimNetworkHandler.cs" />
21 <include name="PacketServer.cs" />
22 <include name="RegionInfo.cs" />
23 <include name="RegionInfoBase.cs" />
24 <include name="RegionServerBase.cs" />
25 <include name="UDPServer.cs" />
26 <include name="VersionInfo.cs" />
27 <include name="Assets/AssetCache.cs" />
28 <include name="Assets/InventoryCache.cs" />
29 <include name="CAPS/AdminWebFront.cs" />
30 <include name="Client/ClientView.cs" />
31 <include name="Client/ClientView.Grid.cs" />
32 <include name="Client/ClientView.PacketHandlers.cs" />
33 <include name="Client/ClientView.ProcessPackets.cs" />
34 <include name="Client/ClientViewBase.cs" />
35 <include name="Estate/EstateManager.cs" />
36 <include name="Scripting/IScriptContext.cs" />
37 <include name="Scripting/IScriptEntity.cs" />
38 <include name="Scripting/IScriptHandler.cs" />
39 <include name="Scripting/Script.cs" />
40 <include name="Scripting/ScriptFactory.cs" />
41 <include name="Scripting/Scripts/FollowRandomAvatar.cs" />
42 <include name="Simulator/Avatar.Client.cs" />
43 <include name="Simulator/Avatar.cs" />
44 <include name="Simulator/Avatar.Update.cs" />
45 <include name="Simulator/AvatarAnimations.cs" />
46 <include name="Simulator/Entity.cs" />
47 <include name="Simulator/ParcelManager.cs" />
48 <include name="Simulator/Primitive.cs" />
49 <include name="Simulator/Primitive2.cs" />
50 <include name="Simulator/SceneObject.cs" />
51 <include name="Simulator/World.cs" />
52 <include name="Simulator/World.PacketHandlers.cs" />
53 <include name="Simulator/World.Scripting.cs" />
54 <include name="Simulator/WorldBase.cs" />
55 <include name="Types/Mesh.cs" />
56 <include name="Types/Triangle.cs" />
57 </sources>
58 <references basedir="${project::get-base-directory()}">
59 <lib>
60 <include name="${project::get-base-directory()}" />
61 <include name="${project::get-base-directory()}/${build.dir}" />
62 </lib>
63 <include name="../../bin/Axiom.MathLib.dll" />
64 <include name="../../bin/Db4objects.Db4o.dll" />
65 <include name="../../bin/libsecondlife.dll" />
66 <include name="../../bin/OpenSim.Framework.dll" />
67 <include name="../../bin/OpenSim.Framework.Console.dll" />
68 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
69 <include name="../../bin/OpenSim.Physics.Manager.dll" />
70 <include name="../../bin/OpenSim.Servers.dll" />
71 <include name="../../bin/OpenSim.Terrain.BasicTerrain.dll" />
72 <include name="System.dll" />
73 <include name="System.Xml.dll" />
74 <include name="../../bin/XMLRPC.dll" />
75 </references>
76 </csc>
77 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
78 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
79 <copy todir="${project::get-base-directory()}/../../bin/">
80 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
81 <include name="*.dll"/>
82 <include name="*.exe"/>
83 </fileset>
84 </copy>
85 </target>
86 <target name="clean">
87 <delete dir="${bin.dir}" failonerror="false" />
88 <delete dir="${obj.dir}" failonerror="false" />
89 </target>
90 <target name="doc" description="Creates documentation.">
91 </target>
92</project>
diff --git a/OpenSim/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim/OpenSim.RegionServer/OpenSimMain.cs
deleted file mode 100644
index 5aba625..0000000
--- a/OpenSim/OpenSim.RegionServer/OpenSimMain.cs
+++ /dev/null
@@ -1,531 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Text;
31using System.IO;
32using System.Threading;
33using System.Net;
34using System.Net.Sockets;
35using System.Timers;
36using System.Reflection;
37using System.Collections;
38using System.Collections.Generic;
39using libsecondlife;
40using libsecondlife.Packets;
41using OpenSim.RegionServer.Simulator;
42using OpenSim.Terrain;
43using OpenSim.Framework.Interfaces;
44using OpenSim.Framework.Types;
45using OpenSim.UserServer;
46using OpenSim.RegionServer.Assets;
47using OpenSim.RegionServer.CAPS;
48using OpenSim.Framework.Console;
49using OpenSim.Physics.Manager;
50using Nwc.XmlRpc;
51using OpenSim.Servers;
52using OpenSim.GenericConfig;
53
54namespace OpenSim
55{
56 //moved to the opensim main application project (do we want it there or here?)
57/*
58 public class OpenSimMain : OpenSimApplicationBase , conscmd_callback
59 {
60
61 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
62 {
63 this.configFileSetup = useConfigFile;
64 m_sandbox = sandBoxMode;
65 m_loginserver = startLoginServer;
66 m_physicsEngine = physicsEngine;
67 m_config = configFile;
68
69 m_console = new ConsoleBase("region-console-" + Guid.NewGuid().ToString() + ".log", "Region", this, silent);
70 OpenSim.Framework.Console.MainConsole.Instance = m_console;
71 }
72
73 /// <summary>
74 /// Performs initialisation of the world, such as loading configuration from disk.
75 /// </summary>
76 public override void StartUp()
77 {
78 this.regionData = new RegionInfo();
79 try
80 {
81 this.localConfig = new XmlConfig(m_config);
82 this.localConfig.LoadData();
83 }
84 catch (Exception e)
85 {
86 Console.WriteLine(e.Message);
87 }
88 if (this.configFileSetup)
89 {
90 this.SetupFromConfigFile(this.localConfig);
91 }
92 m_console.Notice("Main.cs:Startup() - Loading configuration");
93 this.regionData.InitConfig(this.m_sandbox, this.localConfig);
94 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
95
96 GridServers = new Grid();
97 if (m_sandbox)
98 {
99 this.SetupLocalGridServers();
100 //Authenticate Session Handler
101 AuthenticateSessionsLocal authen = new AuthenticateSessionsLocal();
102 this.AuthenticateSessionsHandler = authen;
103 }
104 else
105 {
106 this.SetupRemoteGridServers();
107 //Authenticate Session Handler
108 AuthenticateSessionsRemote authen = new AuthenticateSessionsRemote();
109 this.AuthenticateSessionsHandler = authen;
110 }
111
112 startuptime = DateTime.Now;
113
114 try
115 {
116 AssetCache = new AssetCache(GridServers.AssetServer);
117 InventoryCache = new InventoryCache();
118 }
119 catch (Exception e)
120 {
121 m_console.Error(e.Message + "\nSorry, could not setup local cache");
122 Environment.Exit(1);
123 }
124
125 m_udpServer = new UDPServer(this.regionData.IPListenPort, this.GridServers, this.AssetCache, this.InventoryCache, this.regionData, this.m_sandbox, this.user_accounts, this.m_console, this.AuthenticateSessionsHandler);
126
127 //should be passing a IGenericConfig object to these so they can read the config data they want from it
128 GridServers.AssetServer.SetServerInfo(regionData.AssetURL, regionData.AssetSendKey);
129 IGridServer gridServer = GridServers.GridServer;
130 gridServer.SetServerInfo(regionData.GridURL, regionData.GridSendKey, regionData.GridRecvKey);
131
132 if (!m_sandbox)
133 {
134 this.ConnectToRemoteGridServer();
135 }
136
137 this.SetupLocalWorld();
138
139 if (m_sandbox)
140 {
141 AssetCache.LoadDefaultTextureSet();
142 }
143
144 m_console.Notice("Main.cs:Startup() - Initialising HTTP server");
145
146 this.SetupHttpListener();
147
148 LoginServer loginServer = null;
149 LoginServer adminLoginServer = null;
150
151 bool sandBoxWithLoginServer = m_loginserver && m_sandbox;
152 if (sandBoxWithLoginServer)
153 {
154 loginServer = new LoginServer( regionData.IPListenAddr, regionData.IPListenPort, regionData.RegionLocX, regionData.RegionLocY, this.user_accounts);
155 loginServer.Startup();
156 loginServer.SetSessionHandler(((AuthenticateSessionsLocal) this.AuthenticateSessionsHandler).AddNewSession);
157
158 if (user_accounts)
159 {
160 //sandbox mode with loginserver using accounts
161 this.GridServers.UserServer = loginServer;
162 adminLoginServer = loginServer;
163
164 httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod);
165 }
166 else
167 {
168 //sandbox mode with loginserver not using accounts
169 httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod);
170 }
171 }
172
173 AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer);
174 adminWebFront.LoadMethods(httpServer);
175
176 m_console.Notice("Main.cs:Startup() - Starting HTTP server");
177 httpServer.Start();
178
179 //MainServerListener();
180 this.m_udpServer.ServerListener();
181
182 m_heartbeatTimer.Enabled = true;
183 m_heartbeatTimer.Interval = 100;
184 m_heartbeatTimer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
185 }
186
187 # region Setup methods
188 protected virtual void SetupLocalGridServers()
189 {
190 GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll";
191 GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll";
192
193 m_console.Notice("Starting in Sandbox mode");
194
195 try
196 {
197 GridServers.Initialise();
198 }
199 catch (Exception e)
200 {
201 m_console.Error(e.Message + "\nSorry, could not setup the grid interface");
202 Environment.Exit(1);
203 }
204 }
205
206 protected virtual void SetupRemoteGridServers()
207 {
208 if (this.gridLocalAsset)
209 {
210 GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll";
211 }
212 else
213 {
214 GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll";
215 }
216 GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll";
217
218 m_console.Notice("Starting in Grid mode");
219
220 try
221 {
222 GridServers.Initialise();
223 }
224 catch (Exception e)
225 {
226 m_console.Error(e.Message + "\nSorry, could not setup the grid interface");
227 Environment.Exit(1);
228 }
229 }
230
231 protected virtual void SetupLocalWorld()
232 {
233 m_console.Notice("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString());
234 m_console.Notice("Initialising world");
235 m_console.componentname = "Region " + regionData.RegionName;
236
237 m_localWorld = new World(this.m_udpServer.PacketServer.ClientThreads, regionData, regionData.RegionHandle, regionData.RegionName);
238 LocalWorld.InventoryCache = InventoryCache;
239 LocalWorld.AssetCache = AssetCache;
240
241 this.m_udpServer.LocalWorld = LocalWorld;
242 this.m_udpServer.PacketServer.RegisterClientPacketHandlers();
243
244 this.physManager = new OpenSim.Physics.Manager.PhysicsManager();
245 this.physManager.LoadPlugins();
246
247 LocalWorld.m_datastore = this.regionData.DataStore;
248
249 LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
250 LocalWorld.LoadWorldMap();
251
252 m_console.Notice("Main.cs:Startup() - Starting up messaging system");
253 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine);
254 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D());
255 LocalWorld.LoadPrimsFromStorage();
256 }
257
258 protected virtual void SetupHttpListener()
259 {
260 httpServer = new BaseHttpServer(regionData.IPListenPort);
261
262 if (this.GridServers.GridServer.GetName() == "Remote")
263 {
264
265 // we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server
266 httpServer.AddXmlRPCHandler("expect_user", ((AuthenticateSessionsRemote)this.AuthenticateSessionsHandler).ExpectUser );
267
268 httpServer.AddXmlRPCHandler("agent_crossing",
269 delegate(XmlRpcRequest request)
270 {
271 Hashtable requestData = (Hashtable)request.Params[0];
272 AgentCircuitData agent_data = new AgentCircuitData();
273 agent_data.firstname = (string)requestData["firstname"];
274 agent_data.lastname = (string)requestData["lastname"];
275 agent_data.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
276 agent_data.startpos = new LLVector3(Single.Parse((string)requestData["pos_x"]), Single.Parse((string)requestData["pos_y"]), Single.Parse((string)requestData["pos_z"]));
277
278 if (((RemoteGridBase)this.GridServers.GridServer).agentcircuits.ContainsKey((uint)agent_data.circuitcode))
279 {
280 ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[(uint)agent_data.circuitcode].firstname = agent_data.firstname;
281 ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[(uint)agent_data.circuitcode].lastname = agent_data.lastname;
282 ((RemoteGridBase)this.GridServers.GridServer).agentcircuits[(uint)agent_data.circuitcode].startpos = agent_data.startpos;
283 }
284
285 return new XmlRpcResponse();
286 });
287
288 httpServer.AddRestHandler("GET", "/simstatus/",
289 delegate(string request, string path, string param)
290 {
291 return "OK";
292 });
293 }
294 }
295
296 protected virtual void ConnectToRemoteGridServer()
297 {
298 if (GridServers.GridServer.RequestConnection(regionData.SimUUID, regionData.IPListenAddr, (uint)regionData.IPListenPort))
299 {
300 m_console.Notice("Main.cs:Startup() - Success: Got a grid connection OK!");
301 }
302 else
303 {
304 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL, "Main.cs:Startup() - FAILED: Unable to get connection to grid. Shutting down.");
305 Shutdown();
306 }
307
308 GridServers.AssetServer.SetServerInfo((string)((RemoteGridBase)GridServers.GridServer).GridData["asset_url"], (string)((RemoteGridBase)GridServers.GridServer).GridData["asset_sendkey"]);
309
310 // If we are being told to load a file, load it.
311 string dataUri = (string)((RemoteGridBase)GridServers.GridServer).GridData["data_uri"];
312
313 if (!String.IsNullOrEmpty(dataUri))
314 {
315 this.LocalWorld.m_datastore = dataUri;
316 }
317
318 if (((RemoteGridBase)(GridServers.GridServer)).GridData["regionname"].ToString() != "")
319 {
320 // The grid server has told us who we are
321 // We must obey the grid server.
322 try
323 {
324 regionData.RegionLocX = Convert.ToUInt32(((RemoteGridBase)(GridServers.GridServer)).GridData["region_locx"].ToString());
325 regionData.RegionLocY = Convert.ToUInt32(((RemoteGridBase)(GridServers.GridServer)).GridData["region_locy"].ToString());
326 regionData.RegionName = ((RemoteGridBase)(GridServers.GridServer)).GridData["regionname"].ToString();
327 }
328 catch (Exception e)
329 {
330 m_console.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL, e.Message + "\nBAD ERROR! THIS SHOULD NOT HAPPEN! Bad GridData from the grid interface!!!! ZOMG!!!");
331 Environment.Exit(1);
332 }
333 }
334 }
335
336 #endregion
337
338 private void SetupFromConfigFile(IGenericConfig configData)
339 {
340 try
341 {
342 // SandBoxMode
343 string attri = "";
344 attri = configData.GetAttribute("SandBox");
345 if ((attri == "") || ((attri != "false") && (attri != "true")))
346 {
347 this.m_sandbox = false;
348 configData.SetAttribute("SandBox", "false");
349 }
350 else
351 {
352 this.m_sandbox = Convert.ToBoolean(attri);
353 }
354
355 // LoginServer
356 attri = "";
357 attri = configData.GetAttribute("LoginServer");
358 if ((attri == "") || ((attri != "false") && (attri != "true")))
359 {
360 this.m_loginserver = false;
361 configData.SetAttribute("LoginServer", "false");
362 }
363 else
364 {
365 this.m_loginserver = Convert.ToBoolean(attri);
366 }
367
368 // Sandbox User accounts
369 attri = "";
370 attri = configData.GetAttribute("UserAccount");
371 if ((attri == "") || ((attri != "false") && (attri != "true")))
372 {
373 this.user_accounts = false;
374 configData.SetAttribute("UserAccounts", "false");
375 }
376 else if (attri == "true")
377 {
378 this.user_accounts = Convert.ToBoolean(attri);
379 }
380
381 // Grid mode hack to use local asset server
382 attri = "";
383 attri = configData.GetAttribute("LocalAssets");
384 if ((attri == "") || ((attri != "false") && (attri != "true")))
385 {
386 this.gridLocalAsset = false;
387 configData.SetAttribute("LocalAssets", "false");
388 }
389 else if (attri == "true")
390 {
391 this.gridLocalAsset = Convert.ToBoolean(attri);
392 }
393
394
395 attri = "";
396 attri = configData.GetAttribute("PhysicsEngine");
397 switch (attri)
398 {
399 default:
400 m_console.Warn("Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating");
401 Environment.Exit(1);
402 break;
403
404 case "":
405 this.m_physicsEngine = "basicphysics";
406 configData.SetAttribute("PhysicsEngine", "basicphysics");
407 OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying = false;
408 break;
409
410 case "basicphysics":
411 this.m_physicsEngine = "basicphysics";
412 configData.SetAttribute("PhysicsEngine", "basicphysics");
413 OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying = false;
414 break;
415
416 case "RealPhysX":
417 this.m_physicsEngine = "RealPhysX";
418 OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying = true;
419 break;
420
421 case "OpenDynamicsEngine":
422 this.m_physicsEngine = "OpenDynamicsEngine";
423 OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying = true;
424 break;
425 }
426
427 configData.Commit();
428 }
429 catch (Exception e)
430 {
431 Console.WriteLine(e.Message);
432 Console.WriteLine("\nSorry, a fatal error occurred while trying to initialise the configuration data");
433 Console.WriteLine("Can not continue starting up");
434 Environment.Exit(1);
435 }
436 }
437
438 /// <summary>
439 /// Performs any last-minute sanity checking and shuts down the region server
440 /// </summary>
441 public virtual void Shutdown()
442 {
443 m_console.Notice("Main.cs:Shutdown() - Closing all threads");
444 m_console.Notice("Main.cs:Shutdown() - Killing listener thread");
445 m_console.Notice("Main.cs:Shutdown() - Killing clients");
446 // IMPLEMENT THIS
447 m_console.Notice("Main.cs:Shutdown() - Closing console and terminating");
448 LocalWorld.Close();
449 GridServers.Close();
450 m_console.Close();
451 Environment.Exit(0);
452 }
453
454 /// <summary>
455 /// Performs per-frame updates regularly
456 /// </summary>
457 /// <param name="sender"></param>
458 /// <param name="e"></param>
459 void Heartbeat(object sender, System.EventArgs e)
460 {
461 LocalWorld.Update();
462 }
463
464 #region Console Commands
465 /// <summary>
466 /// Runs commands issued by the server console from the operator
467 /// </summary>
468 /// <param name="command">The first argument of the parameter (the command)</param>
469 /// <param name="cmdparams">Additional arguments passed to the command</param>
470 public void RunCmd(string command, string[] cmdparams)
471 {
472 switch (command)
473 {
474 case "help":
475 m_console.Error("show users - show info about connected users");
476 m_console.Error("shutdown - disconnect all clients and shutdown");
477 break;
478
479 case "show":
480 Show(cmdparams[0]);
481 break;
482
483 case "terrain":
484 string result = "";
485 if (!LocalWorld.Terrain.RunTerrainCmd(cmdparams, ref result))
486 {
487 m_console.Error(result);
488 }
489 break;
490
491 case "shutdown":
492 Shutdown();
493 break;
494
495 default:
496 m_console.Error("Unknown command");
497 break;
498 }
499 }
500
501 /// <summary>
502 /// Outputs to the console information about the region
503 /// </summary>
504 /// <param name="ShowWhat">What information to display (valid arguments are "uptime", "users")</param>
505 public void Show(string ShowWhat)
506 {
507 switch (ShowWhat)
508 {
509 case "uptime":
510 m_console.Error("OpenSim has been running since " + startuptime.ToString());
511 m_console.Error("That is " + (DateTime.Now - startuptime).ToString());
512 break;
513 case "users":
514 OpenSim.RegionServer.Simulator.Avatar TempAv;
515 m_console.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP"));
516 foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys)
517 {
518 if (LocalWorld.Entities[UUID].ToString() == "OpenSim.RegionServer.Simulator.Avatar")
519 {
520 TempAv = (OpenSim.RegionServer.Simulator.Avatar)LocalWorld.Entities[UUID];
521 m_console.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString()));
522 }
523 }
524 break;
525 }
526 }
527 #endregion
528 }
529
530 */
531}
diff --git a/OpenSim/OpenSim.RegionServer/OpenSimNetworkHandler.cs b/OpenSim/OpenSim.RegionServer/OpenSimNetworkHandler.cs
deleted file mode 100644
index bc85cdb..0000000
--- a/OpenSim/OpenSim.RegionServer/OpenSimNetworkHandler.cs
+++ /dev/null
@@ -1,45 +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.Net;
32using System.Net.Sockets;
33using libsecondlife;
34using OpenSim.Framework.Interfaces;
35
36namespace OpenSim.RegionServer
37{
38 public interface OpenSimNetworkHandler
39 {
40 void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode);// EndPoint packetSender);
41 void RemoveClientCircuit(uint circuitcode);
42 void RegisterPacketServer(PacketServer server);
43 AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode);
44 }
45}
diff --git a/OpenSim/OpenSim.RegionServer/PacketServer.cs b/OpenSim/OpenSim.RegionServer/PacketServer.cs
deleted file mode 100644
index 7267ae8..0000000
--- a/OpenSim/OpenSim.RegionServer/PacketServer.cs
+++ /dev/null
@@ -1,116 +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 OpenSim.RegionServer.Simulator;
32using OpenSim.RegionServer.Client;
33using libsecondlife.Packets;
34
35namespace OpenSim.RegionServer
36{
37 public class PacketServer
38 {
39 private OpenSimNetworkHandler _networkHandler;
40 private World _localWorld;
41 public Dictionary<uint, ClientView> ClientThreads = new Dictionary<uint, ClientView>();
42
43 public PacketServer(OpenSimNetworkHandler networkHandler)
44 {
45 _networkHandler = networkHandler;
46 _networkHandler.RegisterPacketServer(this);
47 }
48
49 public World LocalWorld
50 {
51 set
52 {
53 this._localWorld = value;
54 }
55 }
56
57 public virtual void ClientInPacket(uint circuitCode, Packet packet)
58 {
59 if (this.ClientThreads.ContainsKey(circuitCode))
60 {
61 ClientThreads[circuitCode].InPacket(packet);
62 }
63 }
64
65 public virtual bool AddNewCircuitCodeClient(uint circuitCode)
66 {
67 return false;
68 }
69
70 public virtual void SendPacketToAllClients(Packet packet)
71 {
72
73 }
74
75 public virtual void SendPacketToAllExcept(Packet packet, ClientView simClient)
76 {
77
78 }
79
80 public virtual void AddClientPacketHandler(PacketType packetType, PacketMethod handler)
81 {
82
83 }
84
85 public virtual void RegisterClientPacketHandlers()
86 {
87 if (this._localWorld != null)
88 {
89 ClientView.AddPacketHandler(PacketType.UUIDNameRequest, this.RequestUUIDName);
90 }
91 }
92
93 #region Client Packet Handlers
94
95 public bool RequestUUIDName(ClientView simClient, Packet packet)
96 {
97 System.Text.Encoding enc = System.Text.Encoding.ASCII;
98 Console.WriteLine(packet.ToString());
99 UUIDNameRequestPacket nameRequest = (UUIDNameRequestPacket)packet;
100 UUIDNameReplyPacket nameReply = new UUIDNameReplyPacket();
101 nameReply.UUIDNameBlock = new UUIDNameReplyPacket.UUIDNameBlockBlock[nameRequest.UUIDNameBlock.Length];
102
103 for (int i = 0; i < nameRequest.UUIDNameBlock.Length; i++)
104 {
105 nameReply.UUIDNameBlock[i] = new UUIDNameReplyPacket.UUIDNameBlockBlock();
106 nameReply.UUIDNameBlock[i].ID = nameRequest.UUIDNameBlock[i].ID;
107 nameReply.UUIDNameBlock[i].FirstName = enc.GetBytes("Who\0"); //for now send any name
108 nameReply.UUIDNameBlock[i].LastName = enc.GetBytes("Knows\0"); //in future need to look it up
109 }
110 simClient.OutPacket(nameReply);
111 return true;
112 }
113
114 #endregion
115 }
116}
diff --git a/OpenSim/OpenSim.RegionServer/RegionInfo.cs b/OpenSim/OpenSim.RegionServer/RegionInfo.cs
deleted file mode 100644
index de1750c..0000000
--- a/OpenSim/OpenSim.RegionServer/RegionInfo.cs
+++ /dev/null
@@ -1,380 +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.Globalization;
32using System.Net;
33using System.Web;
34using System.IO;
35using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Utilities;
37using libsecondlife;
38
39namespace OpenSim.RegionServer
40{
41 public class RegionInfo : RegionInfoBase
42 {
43 //following should be removed and the GenericConfig object passed around,
44 //so each class (AssetServer, GridServer etc) can access what config data they want
45 public string AssetURL = "http://127.0.0.1:8003/";
46 public string AssetSendKey = "";
47
48 public string GridURL = "";
49 public string GridSendKey = "";
50 public string GridRecvKey = "";
51 public string UserURL = "";
52 public string UserSendKey = "";
53 public string UserRecvKey = "";
54 private bool isSandbox;
55
56 public string MasterAvatarFirstName = "";
57 public string MasterAvatarLastName = "";
58 public string MasterAvatarSandboxPassword = "";
59 public LLUUID MasterAvatarAssignedUUID = LLUUID.Zero;
60
61 public string DataStore;
62
63 public RegionInfo()
64 {
65
66 }
67
68 public void SaveToGrid()
69 {
70 //we really want to keep any server connection code out of here and out of the code code
71 // and put it in the server connection classes (those inheriting from IGridServer etc)
72 string reqtext;
73 reqtext = "<Root>";
74 reqtext += "<authkey>" + this.GridSendKey + "</authkey>";
75 reqtext += "<sim>";
76 reqtext += "<uuid>" + this.SimUUID.ToString() + "</uuid>";
77 reqtext += "<regionname>" + this.RegionName + "</regionname>";
78 reqtext += "<sim_ip>" + this.IPListenAddr + "</sim_ip>";
79 reqtext += "<sim_port>" + this.IPListenPort.ToString() + "</sim_port>";
80 reqtext += "<region_locx>" + this.RegionLocX.ToString() + "</region_locx>";
81 reqtext += "<region_locy>" + this.RegionLocY.ToString() + "</region_locy>";
82 reqtext += "<estate_id>1</estate_id>";
83 reqtext += "</sim>";
84 reqtext += "</Root>";
85
86 byte[] reqdata = (new System.Text.ASCIIEncoding()).GetBytes(reqtext);
87 string newpath = "";
88 if (this.GridURL.EndsWith("/"))
89 {
90 newpath = this.GridURL + "sims/";
91 }
92 else
93 {
94 newpath = this.GridURL + "/sims/";
95 }
96
97 WebRequest GridSaveReq = WebRequest.Create(newpath + this.SimUUID.ToString());
98 GridSaveReq.Method = "POST";
99 GridSaveReq.ContentType = "application/x-www-form-urlencoded";
100 GridSaveReq.ContentLength = reqdata.Length;
101
102 Stream stOut = GridSaveReq.GetRequestStream();
103 stOut.Write(reqdata, 0, reqdata.Length);
104 stOut.Close();
105
106 WebResponse gridresp = GridSaveReq.GetResponse();
107 StreamReader stIn = new StreamReader(gridresp.GetResponseStream(), Encoding.ASCII);
108 string GridResponse = stIn.ReadToEnd();
109 stIn.Close();
110 gridresp.Close();
111
112 OpenSim.Framework.Console.MainConsole.Instance.Verbose("RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse);
113 }
114
115 public void InitConfig(bool sandboxMode, IGenericConfig configData)
116 {
117 this.isSandbox = sandboxMode;
118 try
119 {
120 // Sim UUID
121 string attri = "";
122 attri = configData.GetAttribute("SimUUID");
123 if (attri == "")
124 {
125 this.SimUUID = LLUUID.Random();
126 configData.SetAttribute("SimUUID", this.SimUUID.ToString());
127 }
128 else
129 {
130 this.SimUUID = new LLUUID(attri);
131 }
132
133 // Sim name
134 attri = "";
135 attri = configData.GetAttribute("SimName");
136 if (attri == "")
137 {
138 this.RegionName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: Simulator Name", "OpenSim Island");
139 configData.SetAttribute("SimName", this.RegionName);
140 }
141 else
142 {
143 this.RegionName = attri;
144 }
145 // Sim/Grid location X
146 attri = "";
147 attri = configData.GetAttribute("SimLocationX");
148 if (attri == "")
149 {
150 string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: Grid Location X", "997");
151 configData.SetAttribute("SimLocationX", location);
152 this.RegionLocX = (uint)Convert.ToUInt32(location);
153 }
154 else
155 {
156 this.RegionLocX = (uint)Convert.ToUInt32(attri);
157 }
158 // Sim/Grid location Y
159 attri = "";
160 attri = configData.GetAttribute("SimLocationY");
161 if (attri == "")
162 {
163 string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: Grid Location Y", "996");
164 configData.SetAttribute("SimLocationY", location);
165 this.RegionLocY = (uint)Convert.ToUInt32(location);
166 }
167 else
168 {
169 this.RegionLocY = (uint)Convert.ToUInt32(attri);
170 }
171
172 // Local storage datastore
173 attri = "";
174 attri = configData.GetAttribute("Datastore");
175 if (attri == "")
176 {
177 string datastore = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: Filename for local world storage", "localworld.yap");
178 configData.SetAttribute("Datastore", datastore);
179 this.DataStore = datastore;
180 }
181 else
182 {
183 this.DataStore = attri;
184 }
185
186 //Sim Listen Port
187 attri = "";
188 attri = configData.GetAttribute("SimListenPort");
189 if (attri == "")
190 {
191 string port = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: UDP port for client connections", "9000");
192 configData.SetAttribute("SimListenPort", port);
193 this.IPListenPort = Convert.ToInt32(port);
194 }
195 else
196 {
197 this.IPListenPort = Convert.ToInt32(attri);
198 }
199 //Sim Listen Address
200 attri = "";
201 attri = configData.GetAttribute("SimListenAddress");
202 if (attri == "")
203 {
204 this.IPListenAddr = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: IP Address to listen on for client connections", "127.0.0.1");
205 configData.SetAttribute("SimListenAddress", this.IPListenAddr);
206 }
207 else
208 {
209 // Probably belongs elsewhere, but oh well.
210 if (attri.Trim().StartsWith("SYSTEMIP"))
211 {
212 string localhostname = System.Net.Dns.GetHostName();
213 System.Net.IPAddress[] ips = System.Net.Dns.GetHostAddresses(localhostname);
214 try
215 {
216 this.IPListenAddr = ips[0].ToString();
217 }
218 catch (Exception e)
219 {
220 e.ToString();
221 this.IPListenAddr = "127.0.0.1"; // Use the default if we fail
222 }
223 }
224 else
225 {
226 this.IPListenAddr = attri;
227 }
228 }
229
230 // Terrain Default File
231 attri = "";
232 attri = configData.GetAttribute("TerrainFile");
233 if (attri == "")
234 {
235 this.estateSettings.terrainFile = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: Default Terrain File", "default.r32");
236 configData.SetAttribute("TerrainFile", this.estateSettings.terrainFile);
237 }
238 else
239 {
240 this.estateSettings.terrainFile = attri;
241 }
242
243 attri = "";
244 attri = configData.GetAttribute("TerrainMultiplier");
245 if (attri == "")
246 {
247 string re = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: Terrain Height Multiplier", "60.0");
248 this.estateSettings.terrainMultiplier = Convert.ToDouble(re, CultureInfo.InvariantCulture);
249 configData.SetAttribute("TerrainMultiplier", this.estateSettings.terrainMultiplier.ToString());
250 }
251 else
252 {
253 this.estateSettings.terrainMultiplier = Convert.ToDouble(attri);
254 }
255
256 attri = "";
257 attri = configData.GetAttribute("MasterAvatarFirstName");
258 if (attri == "")
259 {
260 this.MasterAvatarFirstName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: First name of Master Avatar", "Test");
261
262 configData.SetAttribute("MasterAvatarFirstName", this.MasterAvatarFirstName);
263 }
264 else
265 {
266 this.MasterAvatarFirstName = attri;
267 }
268
269 attri = "";
270 attri = configData.GetAttribute("MasterAvatarLastName");
271 if (attri == "")
272 {
273 this.MasterAvatarLastName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GENERAL SETTING: Last name of Master Avatar", "User");
274
275 configData.SetAttribute("MasterAvatarLastName", this.MasterAvatarLastName);
276 }
277 else
278 {
279 this.MasterAvatarLastName = attri;
280 }
281
282 if (isSandbox) //Sandbox Mode Settings
283 {
284 attri = "";
285 attri = configData.GetAttribute("MasterAvatarSandboxPassword");
286 if (attri == "")
287 {
288 this.MasterAvatarSandboxPassword = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("SANDBOX MODE SETTING: Password of Master Avatar", "test");
289
290 configData.SetAttribute("MasterAvatarSandboxPassword", this.MasterAvatarSandboxPassword);
291 }
292 else
293 {
294 this.MasterAvatarSandboxPassword = attri;
295 }
296 }
297 else //Grid Mode Settings
298 {
299 //shouldn't be reading this data in here, it should be up to the classes implementing the server interfaces to read what they need from the config object
300
301 //Grid Server URL
302 attri = "";
303 attri = configData.GetAttribute("GridServerURL");
304 if (attri == "")
305 {
306 this.GridURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GRID MODE SETTING: Grid server URL", "http://127.0.0.1:8001/");
307 configData.SetAttribute("GridServerURL", this.GridURL);
308 }
309 else
310 {
311 this.GridURL = attri;
312 }
313
314 //Grid Send Key
315 attri = "";
316 attri = configData.GetAttribute("GridSendKey");
317 if (attri == "")
318 {
319 this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GRID MODE SETTING: Key to send to grid server", "null");
320 configData.SetAttribute("GridSendKey", this.GridSendKey);
321 }
322 else
323 {
324 this.GridSendKey = attri;
325 }
326
327 //Grid Receive Key
328 attri = "";
329 attri = configData.GetAttribute("GridRecvKey");
330 if (attri == "")
331 {
332 this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GRID MODE SETTING: Key to expect from grid server", "null");
333 configData.SetAttribute("GridRecvKey", this.GridRecvKey);
334 }
335 else
336 {
337 this.GridRecvKey = attri;
338 }
339
340 attri = "";
341 attri = configData.GetAttribute("AssetServerURL");
342 if (attri == "")
343 {
344 this.AssetURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("GRID MODE SETTING: Asset server URL", "http://127.0.0.1:8003/");
345 configData.SetAttribute("AssetServerURL", this.AssetURL);
346 }
347 else
348 {
349 this.AssetURL = attri;
350 }
351
352 }
353
354 this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
355 if (!this.isSandbox)
356 {
357 this.SaveToGrid();
358 }
359 configData.Commit();
360 }
361 catch (Exception e)
362 {
363 OpenSim.Framework.Console.MainConsole.Instance.Warn("Config.cs:InitConfig() - Exception occured");
364 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
365 }
366
367 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Simulator Settings Loaded");
368 /* MainConsole.Instance.Notice("UUID: " + this.SimUUID.ToStringHyphenated());
369 MainConsole.Instance.Notice("Name: " + this.RegionName);
370 MainConsole.Instance.Notice("Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]");
371 MainConsole.Instance.Notice("Region Handle: " + this.RegionHandle.ToString());
372 MainConsole.Instance.Notice("Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort);
373 MainConsole.Instance.Notice("Sandbox Mode? " + isSandbox.ToString());
374 MainConsole.Instance.Notice("Asset URL: " + this.AssetURL);
375 MainConsole.Instance.Notice("Asset key: " + this.AssetSendKey);
376 MainConsole.Instance.Notice("Grid URL: " + this.GridURL);
377 MainConsole.Instance.Notice("Grid key: " + this.GridSendKey); */
378 }
379 }
380}
diff --git a/OpenSim/OpenSim.RegionServer/RegionInfoBase.cs b/OpenSim/OpenSim.RegionServer/RegionInfoBase.cs
deleted file mode 100644
index 481b865..0000000
--- a/OpenSim/OpenSim.RegionServer/RegionInfoBase.cs
+++ /dev/null
@@ -1,62 +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.Net;
32using System.Web;
33using System.IO;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Utilities;
36using OpenSim.Framework.Types;
37using libsecondlife;
38
39namespace OpenSim.RegionServer
40{
41 public class RegionInfoBase
42 {
43 public LLUUID SimUUID = new LLUUID();
44 public string RegionName = "";
45 public uint RegionLocX = 0;
46 public uint RegionLocY = 0;
47 public ulong RegionHandle = 0;
48
49
50 public int IPListenPort = 0;
51 public string IPListenAddr = "";
52
53
54 public EstateSettings estateSettings;
55
56 public RegionInfoBase()
57 {
58 estateSettings = new EstateSettings();
59 }
60 }
61
62}
diff --git a/OpenSim/OpenSim.RegionServer/RegionServerBase.cs b/OpenSim/OpenSim.RegionServer/RegionServerBase.cs
deleted file mode 100644
index 2d99bb3..0000000
--- a/OpenSim/OpenSim.RegionServer/RegionServerBase.cs
+++ /dev/null
@@ -1,130 +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.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.RegionServer.Simulator;
41using OpenSim.Terrain;
42using OpenSim.Framework.Interfaces;
43using OpenSim.Framework.Types;
44using OpenSim.UserServer;
45using OpenSim.RegionServer.Assets;
46using OpenSim.RegionServer.CAPS;
47using OpenSim.Framework.Console;
48using OpenSim.Physics.Manager;
49using Nwc.XmlRpc;
50using OpenSim.Servers;
51using OpenSim.GenericConfig;
52
53namespace OpenSim.RegionServer
54{
55 public class RegionServerBase
56 {
57 protected IGenericConfig localConfig;
58 protected PhysicsManager physManager;
59 protected Grid GridServers;
60 protected AssetCache AssetCache;
61 protected InventoryCache InventoryCache;
62 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
63 protected DateTime startuptime;
64 protected RegionInfo regionData;
65
66 protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer();
67 public string m_physicsEngine;
68 public bool m_sandbox = false;
69 public bool m_loginserver;
70 public bool user_accounts = false;
71 public bool gridLocalAsset = false;
72 protected bool configFileSetup = false;
73 public string m_config;
74
75 protected UDPServer m_udpServer;
76 protected BaseHttpServer httpServer;
77 protected AuthenticateSessionsBase AuthenticateSessionsHandler;
78
79 protected ConsoleBase m_console;
80
81 public RegionServerBase()
82 {
83
84 }
85
86 public RegionServerBase(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
87 {
88 this.configFileSetup = useConfigFile;
89 m_sandbox = sandBoxMode;
90 m_loginserver = startLoginServer;
91 m_physicsEngine = physicsEngine;
92 m_config = configFile;
93 }
94
95 protected World m_localWorld;
96 public World LocalWorld
97 {
98 get { return m_localWorld; }
99 }
100
101 /// <summary>
102 /// Performs initialisation of the world, such as loading configuration from disk.
103 /// </summary>
104 public virtual void StartUp()
105 {
106 }
107
108 protected virtual void SetupLocalGridServers()
109 {
110 }
111
112 protected virtual void SetupRemoteGridServers()
113 {
114
115 }
116
117 protected virtual void SetupLocalWorld()
118 {
119 }
120
121 protected virtual void SetupHttpListener()
122 {
123 }
124
125 protected virtual void ConnectToRemoteGridServer()
126 {
127
128 }
129 }
130}
diff --git a/OpenSim/OpenSim.RegionServer/Scripting/IScriptContext.cs b/OpenSim/OpenSim.RegionServer/Scripting/IScriptContext.cs
deleted file mode 100644
index 2ac0a2e..0000000
--- a/OpenSim/OpenSim.RegionServer/Scripting/IScriptContext.cs
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.RegionServer.Scripting
34{
35 public interface IScriptContext
36 {
37 IScriptEntity Entity { get; }
38 bool TryGetRandomAvatar(out IScriptReadonlyEntity avatar);
39 }
40}
diff --git a/OpenSim/OpenSim.RegionServer/Scripting/IScriptEntity.cs b/OpenSim/OpenSim.RegionServer/Scripting/IScriptEntity.cs
deleted file mode 100644
index 05a1237..0000000
--- a/OpenSim/OpenSim.RegionServer/Scripting/IScriptEntity.cs
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.RegionServer.Scripting
34{
35 public interface IScriptReadonlyEntity
36 {
37 LLVector3 Pos { get; }
38 string Name { get; }
39 }
40
41 public interface IScriptEntity
42 {
43 LLVector3 Pos { get; set; }
44 string Name { get; }
45 }
46}
diff --git a/OpenSim/OpenSim.RegionServer/Scripting/IScriptHandler.cs b/OpenSim/OpenSim.RegionServer/Scripting/IScriptHandler.cs
deleted file mode 100644
index 7431799..0000000
--- a/OpenSim/OpenSim.RegionServer/Scripting/IScriptHandler.cs
+++ /dev/null
@@ -1,125 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using OpenSim.Physics.Manager;
33using OpenSim.RegionServer.Simulator;
34using Avatar=OpenSim.RegionServer.Simulator.Avatar;
35using Primitive = OpenSim.RegionServer.Simulator.Primitive;
36
37namespace OpenSim.RegionServer.Scripting
38{
39 public delegate void ScriptEventHandler(IScriptContext context);
40
41 public class ScriptHandler : IScriptContext, IScriptEntity, IScriptReadonlyEntity
42 {
43 private World m_world;
44 private Script m_script;
45 private Entity m_entity;
46
47 public LLUUID ScriptId
48 {
49 get
50 {
51 return m_script.ScriptId;
52 }
53 }
54
55 public void OnFrame()
56 {
57 m_script.OnFrame(this);
58 }
59
60 public ScriptHandler(Script script, Entity entity, World world)
61 {
62 m_script = script;
63 m_entity = entity;
64 m_world = world;
65 }
66
67 #region IScriptContext Members
68
69 IScriptEntity IScriptContext.Entity
70 {
71 get
72 {
73 return this;
74 }
75 }
76
77 bool IScriptContext.TryGetRandomAvatar(out IScriptReadonlyEntity avatar)
78 {
79 foreach (Entity entity in m_world.Entities.Values )
80 {
81 if( entity is Avatar )
82 {
83 avatar = entity;
84 return true;
85 }
86 }
87
88 avatar = null;
89 return false;
90 }
91
92 #endregion
93
94 #region IScriptEntity and IScriptReadonlyEntity Members
95
96 public string Name
97 {
98 get
99 {
100 return m_entity.Name;
101 }
102 }
103
104 public LLVector3 Pos
105 {
106 get
107 {
108 return m_entity.Pos;
109 }
110
111 set
112 {
113 if (m_entity is Primitive)
114 {
115 Primitive prim = m_entity as Primitive;
116 // Of course, we really should have asked the physEngine if this is possible, and if not, returned false.
117 prim.UpdatePosition( value );
118 }
119 }
120 }
121
122 #endregion
123 }
124
125}
diff --git a/OpenSim/OpenSim.RegionServer/Scripting/Script.cs b/OpenSim/OpenSim.RegionServer/Scripting/Script.cs
deleted file mode 100644
index e6732a6..0000000
--- a/OpenSim/OpenSim.RegionServer/Scripting/Script.cs
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.RegionServer.Scripting
34{
35 public class Script
36 {
37 private LLUUID m_scriptId;
38 public virtual LLUUID ScriptId
39 {
40 get
41 {
42 return m_scriptId;
43 }
44 }
45
46 public Script( LLUUID scriptId )
47 {
48 m_scriptId = scriptId;
49 }
50
51 public ScriptEventHandler OnFrame;
52 }
53}
diff --git a/OpenSim/OpenSim.RegionServer/Scripting/ScriptFactory.cs b/OpenSim/OpenSim.RegionServer/Scripting/ScriptFactory.cs
deleted file mode 100644
index 525f63d..0000000
--- a/OpenSim/OpenSim.RegionServer/Scripting/ScriptFactory.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.RegionServer.Scripting
33{
34 public delegate Script ScriptFactory();
35}
diff --git a/OpenSim/OpenSim.RegionServer/Scripting/Scripts/FollowRandomAvatar.cs b/OpenSim/OpenSim.RegionServer/Scripting/Scripts/FollowRandomAvatar.cs
deleted file mode 100644
index 55ea795..0000000
--- a/OpenSim/OpenSim.RegionServer/Scripting/Scripts/FollowRandomAvatar.cs
+++ /dev/null
@@ -1,64 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenSim.RegionServer.Scripting
34{
35 public class FollowRandomAvatar : Script
36 {
37 public FollowRandomAvatar()
38 : base(LLUUID.Random())
39 {
40 OnFrame += MyOnFrame;
41 }
42
43 private void MyOnFrame(IScriptContext context)
44 {
45 LLVector3 pos = context.Entity.Pos;
46
47 IScriptReadonlyEntity avatar;
48
49 if (context.TryGetRandomAvatar(out avatar))
50 {
51 LLVector3 avatarPos = avatar.Pos;
52
53 float x = pos.X + ((float)avatarPos.X.CompareTo(pos.X)) / 2;
54 float y = pos.Y + ((float)avatarPos.Y.CompareTo(pos.Y)) / 2;
55
56 LLVector3 newPos = new LLVector3(x, y, pos.Z);
57
58 context.Entity.Pos = newPos;
59 }
60 }
61 }
62
63
64}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/Avatar.Client.cs b/OpenSim/OpenSim.RegionServer/Simulator/Avatar.Client.cs
deleted file mode 100644
index c6ce258..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/Avatar.Client.cs
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife.Packets;
32
33namespace OpenSim.RegionServer.Simulator
34{
35 partial class Avatar
36 {
37 private List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> updateList = new List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
38 private List<Entity> interestList = new List<Entity>();
39
40 public void SendPacketToViewer(Packet packet)
41 {
42 this.ControllingClient.OutPacket(packet);
43 }
44
45 public void AddTerseUpdateToViewersList(ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock)
46 {
47
48 }
49
50 public void SendUpdateListToViewer()
51 {
52
53 }
54
55 private void UpdateInterestList()
56 {
57
58 }
59 }
60}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/Avatar.Update.cs b/OpenSim/OpenSim.RegionServer/Simulator/Avatar.Update.cs
deleted file mode 100644
index 03da861..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/Avatar.Update.cs
+++ /dev/null
@@ -1,371 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using libsecondlife.Packets;
33using OpenSim.RegionServer.Client;
34
35namespace OpenSim.RegionServer.Simulator
36{
37 partial class Avatar
38 {
39 public override void update()
40 {
41 if (!this.childAvatar)
42 {
43 if (this._physActor == null)
44 {
45 //HACKHACK: Note to work out why this entity does not have a physics actor
46 // and prehaps create one.
47 return;
48 }
49 libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z);
50 if (this.updateflag)
51 {
52 //need to send movement info
53 //so create the improvedterseobjectupdate packet
54 //use CreateTerseBlock()
55 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
56 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
57 terse.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
58 terse.RegionData.TimeDilation = 64096;
59 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
60 terse.ObjectData[0] = terseBlock;
61 List<Avatar> avList = this.m_world.RequestAvatarList();
62 foreach (Avatar client in avList)
63 {
64 client.SendPacketToViewer(terse);
65 }
66
67 updateflag = false;
68 //this._updateCount = 0;
69 }
70 else
71 {
72
73 if ((pos2 != this.positionLastFrame) || (this.movementflag == 16))
74 {
75 _updateCount++;
76 if (((!PhysicsEngineFlying) && (_updateCount > 3)) || (PhysicsEngineFlying) && (_updateCount > 0))
77 {
78 //It has been a while since last update was sent so lets send one.
79 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
80 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
81 terse.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
82 terse.RegionData.TimeDilation = 64096;
83 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
84 terse.ObjectData[0] = terseBlock;
85 List<Avatar> avList = this.m_world.RequestAvatarList();
86 foreach (Avatar client in avList)
87 {
88 client.SendPacketToViewer(terse);
89 }
90 _updateCount = 0;
91 }
92
93 if (this.movementflag == 16)
94 {
95 movementflag = 0;
96 }
97 }
98
99 }
100
101 if (positionFrameBeforeLast != pos2)
102 {
103 this.positionFrameBeforeLast = this.positionLastFrame;
104 this.positionLastFrame = pos2;
105 int tempRoundedX = (int)Math.Round(positionLastFrame.X);
106 int tempRoundedY = (int)Math.Round(positionLastFrame.Y);
107 if (this.positionRoundedX != tempRoundedX || this.positionRoundedY != tempRoundedY)
108 {
109
110 this.positionRoundedX = tempRoundedX;
111 this.positionRoundedY = tempRoundedY;
112 int currentParcelLocalID = m_world.parcelManager.getParcel(tempRoundedX, tempRoundedY).parcelData.localID;
113 if(currentParcelLocalID != this.positionParcelHoverLocalID)
114 {
115
116 Console.WriteLine("NEW PARCEL: " + m_world.parcelManager.getParcel(tempRoundedX, tempRoundedY).parcelData.parcelName);
117 m_world.parcelManager.getParcel(tempRoundedX, tempRoundedY).sendParcelProperties(this.parcelUpdateSequenceIncrement, false, 0,this.ControllingClient);
118 this.positionParcelHoverLocalID = currentParcelLocalID;
119 this.parcelUpdateSequenceIncrement++;
120 }
121 }
122 }
123
124 if (!this.ControllingClient.m_sandboxMode)
125 {
126 if (pos2.X < 0)
127 {
128 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z));
129 }
130
131 if (pos2.Y < 0)
132 {
133 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z));
134 }
135
136 if (pos2.X > 255)
137 {
138 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z));
139 }
140
141 if (pos2.Y > 255)
142 {
143 ControllingClient.CrossSimBorder(new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z));
144 }
145 }
146 }
147
148 }
149
150 public void SendUpdateToOtherClient(Avatar remoteAvatar)
151 {
152 ObjectUpdatePacket objupdate = CreateUpdatePacket();
153 remoteAvatar.SendPacketToViewer(objupdate);
154 }
155
156 public ObjectUpdatePacket CreateUpdatePacket()
157 {
158 System.Text.Encoding _enc = System.Text.Encoding.ASCII;
159 //send a objectupdate packet with information about the clients avatar
160 ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
161 objupdate.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
162 objupdate.RegionData.TimeDilation = 64096;
163 objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1];
164
165 objupdate.ObjectData[0] = AvatarTemplate;
166 //give this avatar object a local id and assign the user a name
167 objupdate.ObjectData[0].ID = this.localid;
168 objupdate.ObjectData[0].FullID = ControllingClient.AgentID;
169 objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstname + "\nLastName STRING RW SV " + lastname + " \0");
170
171 libsecondlife.LLVector3 pos2 = new LLVector3((float)this._physActor.Position.X, (float)this._physActor.Position.Y, (float)this._physActor.Position.Z);
172
173 byte[] pb = pos2.GetBytes();
174
175 Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length);
176 return objupdate;
177 }
178
179 public void SendInitialPosition()
180 {
181 System.Text.Encoding _enc = System.Text.Encoding.ASCII;
182 //send a objectupdate packet with information about the clients avatar
183
184 ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
185 objupdate.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
186 objupdate.RegionData.TimeDilation = 64096;
187 objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1];
188 objupdate.ObjectData[0] = AvatarTemplate;
189 //give this avatar object a local id and assign the user a name
190
191 objupdate.ObjectData[0].ID = this.localid;
192 this.uuid = objupdate.ObjectData[0].FullID = ControllingClient.AgentID;
193 objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstname + "\nLastName STRING RW SV " + lastname + " \0");
194 libsecondlife.LLVector3 pos2 = new LLVector3((float)this.Pos.X, (float)this.Pos.Y, (float)this.Pos.Z);
195 byte[] pb = pos2.GetBytes();
196 Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length);
197 m_world._localNumber++;
198
199 List<Avatar> avList = this.m_world.RequestAvatarList();
200 foreach (Avatar client in avList)
201 {
202 client.SendPacketToViewer(objupdate);
203 if (client.ControllingClient.AgentID != this.ControllingClient.AgentID)
204 {
205 SendAppearanceToOtherAgent(client);
206 }
207 }
208 }
209
210 public void SendOurAppearance()
211 {
212 ControllingClient.SendAppearance(this.Wearables);
213 }
214
215 public void SendOurAppearance(ClientView OurClient)
216 {
217 //event handler for wearables request
218 this.SendOurAppearance();
219 }
220
221 public void SendAppearanceToOtherAgent(Avatar avatarInfo)
222 {
223 AvatarAppearancePacket avp = new AvatarAppearancePacket();
224 avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218];
225 avp.ObjectData.TextureEntry = this.avatarAppearanceTexture.ToBytes();
226
227 AvatarAppearancePacket.VisualParamBlock avblock = null;
228 for (int i = 0; i < 218; i++)
229 {
230 avblock = new AvatarAppearancePacket.VisualParamBlock();
231 avblock.ParamValue = visualParams[i];
232 avp.VisualParam[i] = avblock;
233 }
234
235 avp.Sender.IsTrial = false;
236 avp.Sender.ID = ControllingClient.AgentID;
237 avatarInfo.SendPacketToViewer(avp);
238 }
239
240 public void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam)
241 {
242 LLObject.TextureEntry tex = new LLObject.TextureEntry(texture, 0, texture.Length);
243 this.avatarAppearanceTexture = tex;
244
245 for (int i = 0; i < visualParam.Length; i++)
246 {
247 this.visualParams[i] = visualParam[i].ParamValue;
248 }
249
250 List<Avatar> avList = this.m_world.RequestAvatarList();
251 foreach (Avatar client in avList)
252 {
253 if (client.ControllingClient.AgentID != this.ControllingClient.AgentID)
254 {
255 SendAppearanceToOtherAgent(client);
256 }
257 }
258 }
259
260 public ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateTerseBlock()
261 {
262 byte[] bytes = new byte[60];
263 int i = 0;
264 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
265
266 dat.TextureEntry = new byte[0];// AvatarTemplate.TextureEntry;
267 libsecondlife.LLVector3 pos2 = new LLVector3(0, 0, 0);
268 lock (m_world.LockPhysicsEngine)
269 {
270 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z);
271 }
272
273 uint ID = this.localid;
274
275 bytes[i++] = (byte)(ID % 256);
276 bytes[i++] = (byte)((ID >> 8) % 256);
277 bytes[i++] = (byte)((ID >> 16) % 256);
278 bytes[i++] = (byte)((ID >> 24) % 256);
279 bytes[i++] = 0;
280 bytes[i++] = 1;
281 i += 14;
282 bytes[i++] = 128;
283 bytes[i++] = 63;
284
285 byte[] pb = pos2.GetBytes();
286 Array.Copy(pb, 0, bytes, i, pb.Length);
287 i += 12;
288 ushort InternVelocityX;
289 ushort InternVelocityY;
290 ushort InternVelocityZ;
291 Axiom.MathLib.Vector3 internDirec = new Axiom.MathLib.Vector3(0, 0, 0);
292 lock (m_world.LockPhysicsEngine)
293 {
294 internDirec = new Axiom.MathLib.Vector3(this._physActor.Velocity.X, this._physActor.Velocity.Y, this._physActor.Velocity.Z);
295 }
296 internDirec = internDirec / 128.0f;
297 internDirec.x += 1;
298 internDirec.y += 1;
299 internDirec.z += 1;
300
301 InternVelocityX = (ushort)(32768 * internDirec.x);
302 InternVelocityY = (ushort)(32768 * internDirec.y);
303 InternVelocityZ = (ushort)(32768 * internDirec.z);
304
305 ushort ac = 32767;
306 bytes[i++] = (byte)(InternVelocityX % 256);
307 bytes[i++] = (byte)((InternVelocityX >> 8) % 256);
308 bytes[i++] = (byte)(InternVelocityY % 256);
309 bytes[i++] = (byte)((InternVelocityY >> 8) % 256);
310 bytes[i++] = (byte)(InternVelocityZ % 256);
311 bytes[i++] = (byte)((InternVelocityZ >> 8) % 256);
312
313 //accel
314 bytes[i++] = (byte)(ac % 256);
315 bytes[i++] = (byte)((ac >> 8) % 256);
316 bytes[i++] = (byte)(ac % 256);
317 bytes[i++] = (byte)((ac >> 8) % 256);
318 bytes[i++] = (byte)(ac % 256);
319 bytes[i++] = (byte)((ac >> 8) % 256);
320
321 //rot
322 bytes[i++] = (byte)(ac % 256);
323 bytes[i++] = (byte)((ac >> 8) % 256);
324 bytes[i++] = (byte)(ac % 256);
325 bytes[i++] = (byte)((ac >> 8) % 256);
326 bytes[i++] = (byte)(ac % 256);
327 bytes[i++] = (byte)((ac >> 8) % 256);
328 bytes[i++] = (byte)(ac % 256);
329 bytes[i++] = (byte)((ac >> 8) % 256);
330
331 //rotation vel
332 bytes[i++] = (byte)(ac % 256);
333 bytes[i++] = (byte)((ac >> 8) % 256);
334 bytes[i++] = (byte)(ac % 256);
335 bytes[i++] = (byte)((ac >> 8) % 256);
336 bytes[i++] = (byte)(ac % 256);
337 bytes[i++] = (byte)((ac >> 8) % 256);
338
339 dat.Data = bytes;
340 return (dat);
341 }
342
343 // Sends animation update
344 public void SendAnimPack(LLUUID animID, int seq)
345 {
346 AvatarAnimationPacket ani = new AvatarAnimationPacket();
347 ani.AnimationSourceList = new AvatarAnimationPacket.AnimationSourceListBlock[1];
348 ani.AnimationSourceList[0] = new AvatarAnimationPacket.AnimationSourceListBlock();
349 ani.AnimationSourceList[0].ObjectID = ControllingClient.AgentID;
350 ani.Sender = new AvatarAnimationPacket.SenderBlock();
351 ani.Sender.ID = ControllingClient.AgentID;
352 ani.AnimationList = new AvatarAnimationPacket.AnimationListBlock[1];
353 ani.AnimationList[0] = new AvatarAnimationPacket.AnimationListBlock();
354 ani.AnimationList[0].AnimID = this.current_anim = animID;
355 ani.AnimationList[0].AnimSequenceID = this.anim_seq = seq;
356
357 List<Avatar> avList = this.m_world.RequestAvatarList();
358 foreach (Avatar client in avList)
359 {
360 client.SendPacketToViewer(ani);
361 }
362
363 }
364
365 public void SendAnimPack()
366 {
367 this.SendAnimPack(this.current_anim, this.anim_seq);
368 }
369
370 }
371}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs b/OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs
deleted file mode 100644
index a64ee9e..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/Avatar.cs
+++ /dev/null
@@ -1,435 +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.IO;
31using System.Text;
32using libsecondlife;
33using libsecondlife.Packets;
34using OpenSim.Physics.Manager;
35using OpenSim.Framework.Inventory;
36using OpenSim.Framework.Interfaces;
37using OpenSim.RegionServer.Client;
38
39using Axiom.MathLib;
40
41namespace OpenSim.RegionServer.Simulator
42{
43 public partial class Avatar : Entity
44 {
45 public static bool PhysicsEngineFlying = false;
46 public static AvatarAnimations Animations;
47 public string firstname;
48 public string lastname;
49 public ClientView ControllingClient;
50 public LLUUID current_anim;
51 public int anim_seq;
52 private static libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock AvatarTemplate;
53 private bool updateflag = false;
54 private byte movementflag = 0;
55 private List<NewForce> forcesList = new List<NewForce>();
56 private short _updateCount = 0;
57 private Axiom.MathLib.Quaternion bodyRot;
58 private LLObject.TextureEntry avatarAppearanceTexture = null;
59 private byte[] visualParams;
60 private AvatarWearable[] Wearables;
61 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
62 private LLVector3 positionFrameBeforeLast = new LLVector3(0, 0, 0);
63
64 private int positionRoundedX = 0;
65 private int positionRoundedY = 0;
66
67 private int positionParcelHoverLocalID = -1; //Local ID of the last parcel they were over
68 private int parcelUpdateSequenceIncrement = 1;
69
70 private bool childAvatar = false;
71
72 public Avatar(ClientView TheClient, World world)
73 {
74 m_world = world;
75 ControllingClient = TheClient;
76
77 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs - Loading details from grid (DUMMY)");
78 localid = 8880000 + (this.m_world._localNumber++);
79 Pos = ControllingClient.startpos;
80 visualParams = new byte[218];
81 for (int i = 0; i < 218; i++)
82 {
83 visualParams[i] = 100;
84 }
85 Wearables = new AvatarWearable[13]; //should be 13 of these
86 for (int i = 0; i < 13; i++)
87 {
88 Wearables[i] = new AvatarWearable();
89 }
90 this.Wearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
91 this.Wearables[0].ItemID = LLUUID.Random();
92
93 this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
94
95 //register for events
96 ControllingClient.OnRequestWearables += new ClientView.GenericCall(this.SendOurAppearance);
97 ControllingClient.OnSetAppearance += new SetAppearance(this.SetAppearance);
98 ControllingClient.OnCompleteMovementToRegion += new ClientView.GenericCall2(this.CompleteMovement);
99 ControllingClient.OnCompleteMovementToRegion += new ClientView.GenericCall2(this.SendInitialPosition);
100 ControllingClient.OnAgentUpdate += new ClientView.GenericCall3(this.HandleAgentUpdate);
101 ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack);
102 ControllingClient.OnChildAgentStatus += new ClientView.StatusChange(this.ChildStatusChange);
103
104 }
105
106 public PhysicsActor PhysActor
107 {
108 set
109 {
110 this._physActor = value;
111 }
112 get
113 {
114 return _physActor;
115 }
116 }
117
118 public void ChildStatusChange(bool status)
119 {
120 this.childAvatar = status;
121
122 if (this.childAvatar == true)
123 {
124 this._physActor.Velocity = new PhysicsVector(0, 0, 0);
125 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
126 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
127 terse.RegionData.RegionHandle = m_world.m_regInfo.RegionHandle;
128 terse.RegionData.TimeDilation = 64096;
129 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
130 terse.ObjectData[0] = terseBlock;
131 List<Avatar> avList = this.m_world.RequestAvatarList();
132 foreach (Avatar client in avList)
133 {
134 client.SendPacketToViewer(terse);
135 }
136 }
137 else
138 {
139 LLVector3 startp = ControllingClient.StartPos;
140 lock (m_world.LockPhysicsEngine)
141 {
142 this._physActor.Position = new PhysicsVector(startp.X, startp.Y, startp.Z);
143 }
144 }
145 }
146
147 public override void addForces()
148 {
149 lock (this.forcesList)
150 {
151 if (this.forcesList.Count > 0)
152 {
153 for (int i = 0; i < this.forcesList.Count; i++)
154 {
155 NewForce force = this.forcesList[i];
156 PhysicsVector phyVector = new PhysicsVector(force.X, force.Y, force.Z);
157 lock (m_world.LockPhysicsEngine)
158 {
159 this._physActor.Velocity = phyVector;
160 }
161 this.updateflag = true;
162 this.velocity = new LLVector3(force.X, force.Y, force.Z); //shouldn't really be doing this
163 // but as we are setting the velocity (rather than using real forces) at the moment it is okay.
164 }
165 for (int i = 0; i < this.forcesList.Count; i++)
166 {
167 this.forcesList.RemoveAt(0);
168 }
169 }
170 }
171 }
172
173 public static void SetupTemplate(string name)
174 {
175 FileInfo fInfo = new FileInfo(name);
176 long numBytes = fInfo.Length;
177 FileStream fStream = new FileStream(name, FileMode.Open, FileAccess.Read);
178 BinaryReader br = new BinaryReader(fStream);
179 byte[] data1 = br.ReadBytes((int)numBytes);
180 br.Close();
181 fStream.Close();
182
183 libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
184
185 SetDefaultPacketValues(objdata);
186 objdata.TextureEntry = data1;
187 objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24);
188 objdata.PathCurve = 16;
189 objdata.ProfileCurve = 1;
190 objdata.PathScaleX = 100;
191 objdata.PathScaleY = 100;
192 objdata.ParentID = 0;
193 objdata.OwnerID = LLUUID.Zero;
194 objdata.Scale = new LLVector3(1, 1, 1);
195 objdata.PCode = 47;
196 System.Text.Encoding enc = System.Text.Encoding.ASCII;
197 libsecondlife.LLVector3 pos = new LLVector3(objdata.ObjectData, 16);
198 pos.X = 100f;
199 objdata.ID = 8880000;
200 objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0");
201 libsecondlife.LLVector3 pos2 = new LLVector3(100f, 100f, 23f);
202 //objdata.FullID=user.AgentID;
203 byte[] pb = pos.GetBytes();
204 Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length);
205
206 Avatar.AvatarTemplate = objdata;
207 }
208
209 protected static void SetDefaultPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata)
210 {
211 objdata.PSBlock = new byte[0];
212 objdata.ExtraParams = new byte[1];
213 objdata.MediaURL = new byte[0];
214 objdata.NameValue = new byte[0];
215 objdata.Text = new byte[0];
216 objdata.TextColor = new byte[4];
217 objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0);
218 objdata.JointPivot = new LLVector3(0, 0, 0);
219 objdata.Material = 4;
220 objdata.TextureAnim = new byte[0];
221 objdata.Sound = LLUUID.Zero;
222 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
223 objdata.TextureEntry = ntex.ToBytes();
224 objdata.State = 0;
225 objdata.Data = new byte[0];
226
227 objdata.ObjectData = new byte[76];
228 objdata.ObjectData[15] = 128;
229 objdata.ObjectData[16] = 63;
230 objdata.ObjectData[56] = 128;
231 objdata.ObjectData[61] = 102;
232 objdata.ObjectData[62] = 40;
233 objdata.ObjectData[63] = 61;
234 objdata.ObjectData[64] = 189;
235
236
237 }
238
239 public void CompleteMovement()
240 {
241 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet");
242 AgentMovementCompletePacket mov = new AgentMovementCompletePacket();
243 mov.AgentData.SessionID = this.ControllingClient.SessionID;
244 mov.AgentData.AgentID = this.ControllingClient.AgentID;
245 mov.Data.RegionHandle = this.m_world.m_regInfo.RegionHandle;
246 // TODO - dynamicalise this stuff
247 mov.Data.Timestamp = 1172750370;
248 mov.Data.Position = this.ControllingClient.startpos;
249 mov.Data.LookAt = new LLVector3(0.99f, 0.042f, 0);
250
251 ControllingClient.OutPacket(mov);
252 }
253
254 public void HandleAgentUpdate(Packet pack)
255 {
256 this.HandleUpdate((AgentUpdatePacket)pack);
257 }
258
259 public void HandleUpdate(AgentUpdatePacket pack)
260 {
261 if (((uint)pack.AgentData.ControlFlags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0)
262 {
263 if (this._physActor.Flying == false)
264 {
265 this.current_anim = Animations.AnimsLLUUID["FLY"];
266 this.anim_seq = 1;
267 this.SendAnimPack();
268 }
269 this._physActor.Flying = true;
270
271 }
272 else
273 {
274 if (this._physActor.Flying == true)
275 {
276 this.current_anim = Animations.AnimsLLUUID["STAND"];
277 this.anim_seq = 1;
278 this.SendAnimPack();
279 }
280 this._physActor.Flying = false;
281 }
282 if (((uint)pack.AgentData.ControlFlags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_AT_POS) != 0)
283 {
284 Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(pack.AgentData.BodyRotation.W, pack.AgentData.BodyRotation.X, pack.AgentData.BodyRotation.Y, pack.AgentData.BodyRotation.Z);
285 if (((movementflag & 1) == 0) || (q != this.bodyRot))
286 {
287
288 if (((movementflag & 1) == 0) && (!this._physActor.Flying))
289 {
290 this.current_anim = Animations.AnimsLLUUID["WALK"];
291 this.anim_seq = 1;
292 this.SendAnimPack();
293 }
294
295
296 //we should add a new force to the list
297 // but for now we will deal with velocities
298 NewForce newVelocity = new NewForce();
299 Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(1, 0, 0);
300 Axiom.MathLib.Vector3 direc = q * v3;
301 direc.Normalize();
302
303 //work out velocity for sim physics system
304 direc = direc * ((0.03f) * 128f);
305 if (this._physActor.Flying)
306 direc *= 4;
307
308 newVelocity.X = direc.x;
309 newVelocity.Y = direc.y;
310 newVelocity.Z = direc.z;
311 this.forcesList.Add(newVelocity);
312 movementflag = 1;
313 this.bodyRot = q;
314 }
315 }
316 else if ((((uint)pack.AgentData.ControlFlags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS) != 0) && (PhysicsEngineFlying))
317 {
318 if (((movementflag & 2) == 0) && this._physActor.Flying)
319 {
320 //we should add a new force to the list
321 // but for now we will deal with velocities
322 NewForce newVelocity = new NewForce();
323 Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(0, 0, 1);
324 Axiom.MathLib.Vector3 direc = v3;
325 direc.Normalize();
326
327 //work out velocity for sim physics system
328 direc = direc * ((0.03f) * 128f * 2);
329 newVelocity.X = direc.x;
330 newVelocity.Y = direc.y;
331 newVelocity.Z = direc.z;
332 this.forcesList.Add(newVelocity);
333 movementflag = 2;
334 }
335 }
336 else if ((((uint)pack.AgentData.ControlFlags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && (PhysicsEngineFlying))
337 {
338 if (((movementflag & 4) == 0) && this._physActor.Flying)
339 {
340 //we should add a new force to the list
341 // but for now we will deal with velocities
342 NewForce newVelocity = new NewForce();
343 Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(0, 0, -1);
344 //Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(pack.AgentData.BodyRotation.W, pack.AgentData.BodyRotation.X, pack.AgentData.BodyRotation.Y, pack.AgentData.BodyRotation.Z);
345 Axiom.MathLib.Vector3 direc = v3;
346 direc.Normalize();
347
348 //work out velocity for sim physics system
349 direc = direc * ((0.03f) * 128f * 2);
350 newVelocity.X = direc.x;
351 newVelocity.Y = direc.y;
352 newVelocity.Z = direc.z;
353 this.forcesList.Add(newVelocity);
354 movementflag = 4;
355 }
356 }
357 else if (((uint)pack.AgentData.ControlFlags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_AT_NEG) != 0)
358 {
359 Axiom.MathLib.Quaternion q = new Axiom.MathLib.Quaternion(pack.AgentData.BodyRotation.W, pack.AgentData.BodyRotation.X, pack.AgentData.BodyRotation.Y, pack.AgentData.BodyRotation.Z);
360 if (((movementflag & 8) == 0) || (q != this.bodyRot))
361 {
362 //we should add a new force to the list
363 // but for now we will deal with velocities
364 NewForce newVelocity = new NewForce();
365 Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(-1, 0, 0);
366 Axiom.MathLib.Vector3 direc = q * v3;
367 direc.Normalize();
368
369 //work out velocity for sim physics system
370 direc = direc * ((0.03f) * 128f);
371 if (this._physActor.Flying)
372 direc *= 2;
373
374 newVelocity.X = direc.x;
375 newVelocity.Y = direc.y;
376 newVelocity.Z = direc.z;
377 this.forcesList.Add(newVelocity);
378 movementflag = 8;
379 this.bodyRot = q;
380 }
381 }
382 else
383 {
384 if (movementflag == 16)
385 {
386 movementflag = 0;
387 }
388 if ((movementflag) != 0)
389 {
390 NewForce newVelocity = new NewForce();
391 newVelocity.X = 0;
392 newVelocity.Y = 0;
393 newVelocity.Z = 0;
394 this.forcesList.Add(newVelocity);
395 movementflag = 0;
396 // We're standing still, so make it show!
397 if (this._physActor.Flying == false)
398 {
399 this.current_anim = Animations.AnimsLLUUID["STAND"];
400 this.anim_seq = 1;
401 this.SendAnimPack();
402 }
403 this.movementflag = 16;
404
405 }
406 }
407 }
408
409
410
411 public static void LoadAnims()
412 {
413 Avatar.Animations = new AvatarAnimations();
414 Avatar.Animations.LoadAnims();
415 }
416
417 public override void LandRenegerated()
418 {
419 Pos = new LLVector3(100.0f, 100.0f, m_world.Terrain[(int)Pos.X, (int)Pos.Y] + 50.0f);
420 }
421 }
422
423 public class NewForce
424 {
425 public float X;
426 public float Y;
427 public float Z;
428
429 public NewForce()
430 {
431
432 }
433 }
434
435}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/AvatarAnimations.cs b/OpenSim/OpenSim.RegionServer/Simulator/AvatarAnimations.cs
deleted file mode 100644
index c7557dc..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/AvatarAnimations.cs
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using System.Xml;
33
34namespace OpenSim.RegionServer.Simulator
35{
36 public class AvatarAnimations
37 {
38
39 public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>();
40 public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>();
41
42 public AvatarAnimations()
43 {
44 }
45
46 public void LoadAnims()
47 {
48 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations");
49 XmlTextReader reader = new XmlTextReader("data/avataranimations.xml");
50
51 XmlDocument doc = new XmlDocument();
52 doc.Load(reader);
53 foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
54 {
55
56 if ( nod.Attributes["name"] != null)
57 {
58 AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText);
59 }
60
61 }
62
63 reader.Close();
64
65 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
66
67 foreach (KeyValuePair<string, LLUUID> kp in OpenSim.RegionServer.Simulator.Avatar.Animations.AnimsLLUUID)
68 {
69 AnimsNames.Add(kp.Value, kp.Key);
70 }
71 }
72 }
73}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/Entity.cs b/OpenSim/OpenSim.RegionServer/Simulator/Entity.cs
deleted file mode 100644
index 6d25c81..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/Entity.cs
+++ /dev/null
@@ -1,151 +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 Axiom.MathLib;
32using OpenSim.Physics.Manager;
33using OpenSim.RegionServer.Types;
34using libsecondlife;
35using OpenSim.RegionServer.Scripting;
36
37namespace OpenSim.RegionServer.Simulator
38{
39 public abstract class Entity : IScriptReadonlyEntity
40 {
41 public libsecondlife.LLUUID uuid;
42 public uint localid;
43 public LLVector3 velocity;
44 public Quaternion rotation;
45 protected List<Entity> children;
46
47 protected string m_name;
48 public virtual string Name
49 {
50 get { return m_name; }
51 }
52
53 protected LLVector3 m_pos;
54 protected PhysicsActor _physActor;
55 protected World m_world;
56
57 public virtual LLVector3 Pos
58 {
59 get
60 {
61 if (this._physActor != null)
62 {
63 m_pos.X = _physActor.Position.X;
64 m_pos.Y = _physActor.Position.Y;
65 m_pos.Z = _physActor.Position.Z;
66 }
67
68 return m_pos;
69 }
70 set
71 {
72 if (this._physActor != null)
73 {
74 try
75 {
76 lock (this.m_world.LockPhysicsEngine)
77 {
78
79 this._physActor.Position = new PhysicsVector(value.X, value.Y, value.Z);
80 }
81 }
82 catch (Exception e)
83 {
84 Console.WriteLine(e.Message);
85 }
86 }
87
88 m_pos = value;
89 }
90 }
91
92 /// <summary>
93 /// Creates a new Entity (should not occur on it's own)
94 /// </summary>
95 public Entity()
96 {
97 uuid = new libsecondlife.LLUUID();
98 localid = 0;
99 m_pos = new LLVector3();
100 velocity = new LLVector3();
101 rotation = new Quaternion();
102 m_name = "(basic entity)";
103 children = new List<Entity>();
104 }
105
106 public virtual void addForces()
107 {
108 foreach (Entity child in children)
109 {
110 child.addForces();
111 }
112 }
113
114 /// <summary>
115 /// Performs any updates that need to be done at each frame. This function is overridable from it's children.
116 /// </summary>
117 public virtual void update() {
118 // Do any per-frame updates needed that are applicable to every type of entity
119 foreach (Entity child in children)
120 {
121 child.update();
122 }
123 }
124
125 /// <summary>
126 /// Returns a mesh for this object and any dependents
127 /// </summary>
128 /// <returns>The mesh of this entity tree</returns>
129 public virtual Mesh getMesh()
130 {
131 Mesh mesh = new Mesh();
132
133 foreach (Entity child in children)
134 {
135 mesh += child.getMesh();
136 }
137
138 return mesh;
139 }
140
141 public virtual void BackUp()
142 {
143
144 }
145
146 public virtual void LandRenegerated()
147 {
148
149 }
150 }
151}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/ParcelManager.cs b/OpenSim/OpenSim.RegionServer/Simulator/ParcelManager.cs
deleted file mode 100644
index 21b783f..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/ParcelManager.cs
+++ /dev/null
@@ -1,837 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using libsecondlife.Packets;
33using OpenSim.RegionServer.Simulator;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36using OpenSim.RegionServer.Client;
37
38namespace OpenSim.RegionServer.Simulator
39{
40 public delegate void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, ClientView remote_client);
41 public delegate void ParcelDivideRequest(int west, int south, int east, int north, ClientView remote_client);
42 public delegate void ParcelJoinRequest(int west, int south, int east, int north, ClientView remote_client);
43 public delegate void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, ClientView remote_client);
44
45 #region ParcelManager Class
46 /// <summary>
47 /// Handles Parcel objects and operations requiring information from other Parcel objects (divide, join, etc)
48 /// </summary>
49 public class ParcelManager : OpenSim.Framework.Interfaces.ILocalStorageParcelReceiver
50 {
51
52 #region Constants
53 //Parcel types set with flags in ParcelOverlay.
54 //Only one of these can be used.
55 public const byte PARCEL_TYPE_PUBLIC = (byte)0; //Equals 00000000
56 public const byte PARCEL_TYPE_OWNED_BY_OTHER = (byte)1; //Equals 00000001
57 public const byte PARCEL_TYPE_OWNED_BY_GROUP = (byte)2; //Equals 00000010
58 public const byte PARCEL_TYPE_OWNED_BY_REQUESTER = (byte)3; //Equals 00000011
59 public const byte PARCEL_TYPE_IS_FOR_SALE = (byte)4; //Equals 00000100
60 public const byte PARCEL_TYPE_IS_BEING_AUCTIONED = (byte)5; //Equals 00000101
61
62
63 //Flags that when set, a border on the given side will be placed
64 //NOTE: North and East is assumable by the west and south sides (if parcel to east has a west border, then I have an east border; etc)
65 //This took forever to figure out -- jeesh. /blame LL for even having to send these
66 public const byte PARCEL_FLAG_PROPERTY_BORDER_WEST = (byte)64; //Equals 01000000
67 public const byte PARCEL_FLAG_PROPERTY_BORDER_SOUTH = (byte)128; //Equals 10000000
68
69 //RequestResults (I think these are right, they seem to work):
70 public const int PARCEL_RESULT_ONE_PARCEL = 0; // The request they made contained only one parcel
71 public const int PARCEL_RESULT_MULTIPLE_PARCELS = 1; // The request they made contained more than one parcel
72
73 //These are other constants. Yay!
74 public const int START_PARCEL_LOCAL_ID = 1;
75 #endregion
76
77 #region Member Variables
78 public Dictionary<int, Parcel> parcelList = new Dictionary<int, Parcel>();
79 private int lastParcelLocalID = START_PARCEL_LOCAL_ID - 1;
80 private int[,] parcelIDList = new int[64, 64];
81
82 private static World m_world;
83 #endregion
84
85 #region Constructors
86 public ParcelManager(World world)
87 {
88
89 m_world = world;
90 parcelIDList.Initialize();
91
92 }
93 #endregion
94
95 #region Member Functions
96
97 #region Parcel From Storage Functions
98 public void ParcelFromStorage(ParcelData data)
99 {
100 Parcel new_parcel = new Parcel(data.ownerID, data.isGroupOwned, m_world);
101 new_parcel.parcelData = data.Copy();
102 new_parcel.setParcelBitmapFromByteArray();
103 addParcel(new_parcel);
104
105 }
106
107 public void NoParcelDataFromStorage()
108 {
109 resetSimParcels();
110 }
111 #endregion
112
113 #region Parcel Add/Remove/Get/Create
114 /// <summary>
115 /// Creates a basic Parcel object without an owner (a zeroed key)
116 /// </summary>
117 /// <returns></returns>
118 public Parcel createBaseParcel()
119 {
120 return new Parcel(new LLUUID(), false, m_world);
121 }
122
123 /// <summary>
124 /// Adds a parcel to the stored list and adds them to the parcelIDList to what they own
125 /// </summary>
126 /// <param name="new_parcel">The parcel being added</param>
127 public void addParcel(Parcel new_parcel)
128 {
129 lastParcelLocalID++;
130 new_parcel.parcelData.localID = lastParcelLocalID;
131 parcelList.Add(lastParcelLocalID, new_parcel.Copy());
132
133
134 bool[,] parcelBitmap = new_parcel.getParcelBitmap();
135 int x, y;
136 for (x = 0; x < 64; x++)
137 {
138 for (y = 0; y < 64; y++)
139 {
140 if (parcelBitmap[x, y])
141 {
142 parcelIDList[x, y] = lastParcelLocalID;
143 }
144 }
145 }
146 parcelList[lastParcelLocalID].forceUpdateParcelInfo();
147
148
149 }
150 /// <summary>
151 /// Removes a parcel from the list. Will not remove if local_id is still owning an area in parcelIDList
152 /// </summary>
153 /// <param name="local_id">Parcel.localID of the parcel to remove.</param>
154 public void removeParcel(int local_id)
155 {
156 int x, y;
157 for (x = 0; x < 64; x++)
158 {
159 for (y = 0; y < 64; y++)
160 {
161 if (parcelIDList[x, y] == local_id)
162 {
163 throw new Exception("Could not remove parcel. Still being used at " + x + ", " + y);
164 }
165 }
166 }
167 m_world.localStorage.RemoveParcel(parcelList[local_id].parcelData);
168 parcelList.Remove(local_id);
169 }
170
171 public void performFinalParcelJoin(Parcel master, Parcel slave)
172 {
173 int x, y;
174 bool[,] parcelBitmapSlave = slave.getParcelBitmap();
175 for (x = 0; x < 64; x++)
176 {
177 for (y = 0; y < 64; y++)
178 {
179 if (parcelBitmapSlave[x, y])
180 {
181 parcelIDList[x, y] = master.parcelData.localID;
182 }
183 }
184 }
185 removeParcel(slave.parcelData.localID);
186 }
187 /// <summary>
188 /// Get the parcel at the specified point
189 /// </summary>
190 /// <param name="x">Value between 0 - 256 on the x axis of the point</param>
191 /// <param name="y">Value between 0 - 256 on the y axis of the point</param>
192 /// <returns>Parcel at the point supplied</returns>
193 public Parcel getParcel(int x, int y)
194 {
195 if (x > 256 || y > 256 || x < 0 || y < 0)
196 {
197 throw new Exception("Error: Parcel not found at point " + x + ", " + y);
198 }
199 else
200 {
201 return parcelList[parcelIDList[x / 4, y / 4]];
202 }
203
204 }
205 #endregion
206
207 #region Parcel Modification
208 /// <summary>
209 /// Subdivides a parcel
210 /// </summary>
211 /// <param name="start_x">West Point</param>
212 /// <param name="start_y">South Point</param>
213 /// <param name="end_x">East Point</param>
214 /// <param name="end_y">North Point</param>
215 /// <param name="attempting_user_id">LLUUID of user who is trying to subdivide</param>
216 /// <returns>Returns true if successful</returns>
217 public bool subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id)
218 {
219 //First, lets loop through the points and make sure they are all in the same parcel
220 //Get the parcel at start
221 Parcel startParcel = getParcel(start_x, start_y);
222 if (startParcel == null) return false; //No such parcel at the beginning
223
224 //Loop through the points
225 try
226 {
227 int totalX = end_x - start_x;
228 int totalY = end_y - start_y;
229 int x, y;
230 for (y = 0; y < totalY; y++)
231 {
232 for (x = 0; x < totalX; x++)
233 {
234 Parcel tempParcel = getParcel(start_x + x, start_y + y);
235 if (tempParcel == null) return false; //No such parcel at that point
236 if (tempParcel != startParcel) return false; //Subdividing over 2 parcels; no-no
237 }
238 }
239 }
240 catch
241 {
242 return false; //Exception. For now, lets skip subdivision
243 }
244
245 //If we are still here, then they are subdividing within one parcel
246 //Check owner
247 if (startParcel.parcelData.ownerID != attempting_user_id)
248 {
249 return false; //They cant do this!
250 }
251
252 //Lets create a new parcel with bitmap activated at that point (keeping the old parcels info)
253 Parcel newParcel = startParcel.Copy();
254 newParcel.parcelData.parcelName = "Subdivision of " + newParcel.parcelData.parcelName;
255 newParcel.parcelData.globalID = LLUUID.Random();
256
257 newParcel.setParcelBitmap(Parcel.getSquareParcelBitmap(start_x, start_y, end_x, end_y));
258
259 //Now, lets set the subdivision area of the original to false
260 int startParcelIndex = startParcel.parcelData.localID;
261 parcelList[startParcelIndex].setParcelBitmap(Parcel.modifyParcelBitmapSquare(startParcel.getParcelBitmap(), start_x, start_y, end_x, end_y, false));
262 parcelList[startParcelIndex].forceUpdateParcelInfo();
263
264
265 //Now add the new parcel
266 addParcel(newParcel);
267
268
269
270
271
272 return true;
273 }
274 /// <summary>
275 /// Join 2 parcels together
276 /// </summary>
277 /// <param name="start_x">x value in first parcel</param>
278 /// <param name="start_y">y value in first parcel</param>
279 /// <param name="end_x">x value in second parcel</param>
280 /// <param name="end_y">y value in second parcel</param>
281 /// <param name="attempting_user_id">LLUUID of the avatar trying to join the parcels</param>
282 /// <returns>Returns true if successful</returns>
283 public bool join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id)
284 {
285 end_x -= 4;
286 end_y -= 4;
287
288 //NOTE: The following only connects the parcels in each corner and not all the parcels that are within the selection box!
289 //This should be fixed later -- somewhat "incomplete code" --Ming
290 Parcel startParcel, endParcel;
291
292 try
293 {
294 startParcel = getParcel(start_x, start_y);
295 endParcel = getParcel(end_x, end_y);
296 }
297 catch
298 {
299 return false; //Error occured when trying to get the start and end parcels
300 }
301 if (startParcel == endParcel)
302 {
303 return false; //Subdivision of the same parcel is not allowed
304 }
305
306 //Check the parcel owners:
307 if (startParcel.parcelData.ownerID != endParcel.parcelData.ownerID)
308 {
309 return false;
310 }
311 if (startParcel.parcelData.ownerID != attempting_user_id)
312 {
313 //TODO: Group editing stuff. Avatar owner support for now
314 return false;
315 }
316
317 //Same owners! Lets join them
318 //Merge them to startParcel
319 parcelList[startParcel.parcelData.localID].setParcelBitmap(Parcel.mergeParcelBitmaps(startParcel.getParcelBitmap(), endParcel.getParcelBitmap()));
320 performFinalParcelJoin(startParcel, endParcel);
321
322 return true;
323
324
325
326 }
327 #endregion
328
329 #region Parcel Updating
330 /// <summary>
331 /// Where we send the ParcelOverlay packet to the client
332 /// </summary>
333 /// <param name="remote_client">The object representing the client</param>
334 public void sendParcelOverlay(ClientView remote_client)
335 {
336 const int PARCEL_BLOCKS_PER_PACKET = 1024;
337 int x, y = 0;
338 byte[] byteArray = new byte[PARCEL_BLOCKS_PER_PACKET];
339 int byteArrayCount = 0;
340 int sequenceID = 0;
341 ParcelOverlayPacket packet;
342
343 for (y = 0; y < 64; y++)
344 {
345 for (x = 0; x < 64; x++)
346 {
347 byte tempByte = (byte)0; //This represents the byte for the current 4x4
348 Parcel currentParcelBlock = getParcel(x * 4, y * 4);
349
350 if (currentParcelBlock.parcelData.ownerID == remote_client.AgentID)
351 {
352 //Owner Flag
353 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_OWNED_BY_REQUESTER);
354 }
355 else if (currentParcelBlock.parcelData.salePrice > 0 && (currentParcelBlock.parcelData.authBuyerID == LLUUID.Zero || currentParcelBlock.parcelData.authBuyerID == remote_client.AgentID))
356 {
357 //Sale Flag
358 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_IS_FOR_SALE);
359 }
360 else if (currentParcelBlock.parcelData.ownerID == LLUUID.Zero)
361 {
362 //Public Flag
363 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_PUBLIC);
364 }
365 else
366 {
367 //Other Flag
368 tempByte = Convert.ToByte(tempByte | PARCEL_TYPE_OWNED_BY_OTHER);
369 }
370
371
372 //Now for border control
373 if (x == 0)
374 {
375 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_WEST);
376 }
377 else if (getParcel((x - 1) * 4, y * 4) != currentParcelBlock)
378 {
379 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_WEST);
380 }
381
382 if (y == 0)
383 {
384 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_SOUTH);
385 }
386 else if (getParcel(x * 4, (y - 1) * 4) != currentParcelBlock)
387 {
388 tempByte = Convert.ToByte(tempByte | PARCEL_FLAG_PROPERTY_BORDER_SOUTH);
389 }
390
391 byteArray[byteArrayCount] = tempByte;
392 byteArrayCount++;
393 if (byteArrayCount >= PARCEL_BLOCKS_PER_PACKET)
394 {
395 byteArrayCount = 0;
396 packet = new ParcelOverlayPacket();
397 packet.ParcelData.Data = byteArray;
398 packet.ParcelData.SequenceID = sequenceID;
399 //remote_client.OutPacket((Packet)packet);
400 sequenceID++;
401 byteArray = new byte[PARCEL_BLOCKS_PER_PACKET];
402 }
403 }
404 }
405
406 packet = new ParcelOverlayPacket();
407 packet.ParcelData.Data = byteArray;
408 packet.ParcelData.SequenceID = sequenceID; //Eh?
409 //remote_client.OutPacket((Packet)packet);
410 }
411 #endregion
412
413 /// <summary>
414 /// Resets the sim to the default parcel (full sim parcel owned by the default user)
415 /// </summary>
416 public void resetSimParcels()
417 {
418 //Remove all the parcels in the sim and add a blank, full sim parcel set to public
419 parcelList.Clear();
420 lastParcelLocalID = START_PARCEL_LOCAL_ID - 1;
421 parcelIDList.Initialize();
422
423 Parcel fullSimParcel = new Parcel(LLUUID.Zero, false, m_world);
424
425 fullSimParcel.setParcelBitmap(Parcel.getSquareParcelBitmap(0, 0, 256, 256));
426 fullSimParcel.parcelData.parcelName = "Your Sim Parcel";
427 fullSimParcel.parcelData.parcelDesc = "";
428
429 fullSimParcel.parcelData.ownerID = m_world.m_regInfo.MasterAvatarAssignedUUID;
430 fullSimParcel.parcelData.salePrice = 1;
431 fullSimParcel.parcelData.parcelFlags = libsecondlife.Parcel.ParcelFlags.ForSale;
432 fullSimParcel.parcelData.parcelStatus = libsecondlife.Parcel.ParcelStatus.Leased;
433
434 addParcel(fullSimParcel);
435
436 }
437 #endregion
438 }
439 #endregion
440
441
442 #region Parcel Class
443 /// <summary>
444 /// Keeps track of a specific parcel's information
445 /// </summary>
446 public class Parcel
447 {
448 #region Member Variables
449 public ParcelData parcelData = new ParcelData();
450 public World m_world;
451
452 private bool[,] parcelBitmap = new bool[64, 64];
453
454 #endregion
455
456
457 #region Constructors
458 public Parcel(LLUUID owner_id, bool is_group_owned, World world)
459 {
460 m_world = world;
461 parcelData.ownerID = owner_id;
462 parcelData.isGroupOwned = is_group_owned;
463
464 }
465 #endregion
466
467
468 #region Member Functions
469
470 #region General Functions
471 /// <summary>
472 /// Checks to see if this parcel contains a point
473 /// </summary>
474 /// <param name="x"></param>
475 /// <param name="y"></param>
476 /// <returns>Returns true if the parcel contains the specified point</returns>
477 public bool containsPoint(int x, int y)
478 {
479 if (x >= 0 && y >= 0 && x <= 256 && x <= 256)
480 {
481 return (parcelBitmap[x / 4, y / 4] == true);
482 }
483 else
484 {
485 return false;
486 }
487 }
488
489 public Parcel Copy()
490 {
491 Parcel newParcel = new Parcel(this.parcelData.ownerID, this.parcelData.isGroupOwned, m_world);
492
493 //Place all new variables here!
494 newParcel.parcelBitmap = (bool[,])(this.parcelBitmap.Clone());
495 newParcel.parcelData = parcelData.Copy();
496
497 return newParcel;
498 }
499
500 #endregion
501
502
503 #region Packet Request Handling
504 /// <summary>
505 /// Sends parcel properties as requested
506 /// </summary>
507 /// <param name="sequence_id">ID sent by client for them to keep track of</param>
508 /// <param name="snap_selection">Bool sent by client for them to use</param>
509 /// <param name="remote_client">Object representing the client</param>
510 public void sendParcelProperties(int sequence_id, bool snap_selection, int request_result, ClientView remote_client)
511 {
512
513 /*ParcelPropertiesPacket updatePacket = new ParcelPropertiesPacket();
514 updatePacket.ParcelData.AABBMax = parcelData.AABBMax;
515 updatePacket.ParcelData.AABBMin = parcelData.AABBMin;
516 updatePacket.ParcelData.Area = parcelData.area;
517 updatePacket.ParcelData.AuctionID = parcelData.auctionID;
518 updatePacket.ParcelData.AuthBuyerID =parcelData.authBuyerID; //unemplemented
519
520 updatePacket.ParcelData.Bitmap = parcelData.parcelBitmapByteArray;
521
522 updatePacket.ParcelData.Desc = libsecondlife.Helpers.StringToField(parcelData.parcelDesc);
523 updatePacket.ParcelData.Category = (byte)parcelData.category;
524 updatePacket.ParcelData.ClaimDate = parcelData.claimDate;
525 updatePacket.ParcelData.ClaimPrice = parcelData.claimPrice;
526 updatePacket.ParcelData.GroupID = parcelData.groupID;
527 updatePacket.ParcelData.GroupPrims = parcelData.groupPrims;
528 updatePacket.ParcelData.IsGroupOwned = parcelData.isGroupOwned;
529 updatePacket.ParcelData.LandingType = (byte)parcelData.landingType;
530 updatePacket.ParcelData.LocalID = parcelData.localID;
531 updatePacket.ParcelData.MaxPrims = 1000; //unemplemented
532 updatePacket.ParcelData.MediaAutoScale = parcelData.mediaAutoScale;
533 updatePacket.ParcelData.MediaID = parcelData.mediaID;
534 updatePacket.ParcelData.MediaURL = Helpers.StringToField(parcelData.mediaURL);
535 updatePacket.ParcelData.MusicURL = Helpers.StringToField(parcelData.musicURL);
536 updatePacket.ParcelData.Name = Helpers.StringToField(parcelData.parcelName);
537 updatePacket.ParcelData.OtherCleanTime = 0; //unemplemented
538 updatePacket.ParcelData.OtherCount = 0; //unemplemented
539 updatePacket.ParcelData.OtherPrims = 0; //unemplented
540 updatePacket.ParcelData.OwnerID = parcelData.ownerID;
541 updatePacket.ParcelData.OwnerPrims = 0; //unemplemented
542 updatePacket.ParcelData.ParcelFlags = (uint)parcelData.parcelFlags; //unemplemented
543 updatePacket.ParcelData.ParcelPrimBonus = (float)1.0; //unemplemented
544 updatePacket.ParcelData.PassHours = parcelData.passHours;
545 updatePacket.ParcelData.PassPrice = parcelData.passPrice;
546 updatePacket.ParcelData.PublicCount = 0; //unemplemented
547 updatePacket.ParcelData.RegionDenyAnonymous = false; //unemplemented
548 updatePacket.ParcelData.RegionDenyIdentified = false; //unemplemented
549 updatePacket.ParcelData.RegionDenyTransacted = false; //unemplemented
550 updatePacket.ParcelData.RegionPushOverride = true; //unemplemented
551 updatePacket.ParcelData.RentPrice = 0; //??
552 updatePacket.ParcelData.RequestResult = request_result;
553 updatePacket.ParcelData.SalePrice = parcelData.salePrice; //unemplemented
554 updatePacket.ParcelData.SelectedPrims = 0; //unemeplemented
555 updatePacket.ParcelData.SelfCount = 0;//unemplemented
556 updatePacket.ParcelData.SequenceID = sequence_id;
557 updatePacket.ParcelData.SimWideMaxPrims = 15000; //unemplemented
558 updatePacket.ParcelData.SimWideTotalPrims = 0; //unemplemented
559 updatePacket.ParcelData.SnapSelection = snap_selection;
560 updatePacket.ParcelData.SnapshotID = parcelData.snapshotID;
561 updatePacket.ParcelData.Status = (byte)parcelData.parcelStatus;
562 updatePacket.ParcelData.TotalPrims = 0; //unemplemented
563 updatePacket.ParcelData.UserLocation = parcelData.userLocation;
564 updatePacket.ParcelData.UserLookAt = parcelData.userLookAt;
565 remote_client.OutPacket((Packet)updatePacket); */
566 }
567
568 public void updateParcelProperties(ParcelPropertiesUpdatePacket packet, ClientView remote_client)
569 {
570 if (remote_client.AgentID == parcelData.ownerID)
571 {
572 //Needs later group support
573 parcelData.authBuyerID = packet.ParcelData.AuthBuyerID;
574 parcelData.category = (libsecondlife.Parcel.ParcelCategory)packet.ParcelData.Category;
575 parcelData.parcelDesc = Helpers.FieldToUTF8String(packet.ParcelData.Desc);
576 parcelData.groupID = packet.ParcelData.GroupID;
577 parcelData.landingType = packet.ParcelData.LandingType;
578 parcelData.mediaAutoScale = packet.ParcelData.MediaAutoScale;
579 parcelData.mediaID = packet.ParcelData.MediaID;
580 parcelData.mediaURL = Helpers.FieldToUTF8String(packet.ParcelData.MediaURL);
581 parcelData.musicURL = Helpers.FieldToUTF8String(packet.ParcelData.MusicURL);
582 parcelData.parcelName = libsecondlife.Helpers.FieldToUTF8String(packet.ParcelData.Name);
583 parcelData.parcelFlags = (libsecondlife.Parcel.ParcelFlags)packet.ParcelData.ParcelFlags;
584 parcelData.passHours = packet.ParcelData.PassHours;
585 parcelData.passPrice = packet.ParcelData.PassPrice;
586 parcelData.salePrice = packet.ParcelData.SalePrice;
587 parcelData.snapshotID = packet.ParcelData.SnapshotID;
588 parcelData.userLocation = packet.ParcelData.UserLocation;
589 parcelData.userLookAt = packet.ParcelData.UserLookAt;
590
591 foreach (Avatar av in m_world.Avatars.Values)
592 {
593 Parcel over = m_world.parcelManager.getParcel((int)Math.Round(av.Pos.X), (int)Math.Round(av.Pos.Y));
594 if (over == this)
595 {
596 sendParcelProperties(0, false, 0, av.ControllingClient);
597 }
598 }
599 }
600 }
601 #endregion
602
603
604 #region Update Functions
605 /// <summary>
606 /// Updates the AABBMin and AABBMax values after area/shape modification of parcel
607 /// </summary>
608 private void updateAABBAndAreaValues()
609 {
610 int min_x = 64;
611 int min_y = 64;
612 int max_x = 0;
613 int max_y = 0;
614 int tempArea = 0;
615 int x, y;
616 for (x = 0; x < 64; x++)
617 {
618 for (y = 0; y < 64; y++)
619 {
620 if (parcelBitmap[x, y] == true)
621 {
622 if (min_x > x) min_x = x;
623 if (min_y > y) min_y = y;
624 if (max_x < x) max_x = x;
625 if (max_y < y) max_y = y;
626 tempArea += 16; //16sqm parcel
627 }
628 }
629 }
630 parcelData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), m_world.Terrain[(min_x * 4), (min_y * 4)]);
631 parcelData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), m_world.Terrain[(max_x * 4), (max_y * 4)]);
632 parcelData.area = tempArea;
633 }
634
635 public void updateParcelBitmapByteArray()
636 {
637 parcelData.parcelBitmapByteArray = convertParcelBitmapToBytes();
638 }
639
640 /// <summary>
641 /// Update all settings in parcel such as area, bitmap byte array, etc
642 /// </summary>
643 public void forceUpdateParcelInfo()
644 {
645 this.updateAABBAndAreaValues();
646 this.updateParcelBitmapByteArray();
647 }
648
649 public void setParcelBitmapFromByteArray()
650 {
651 parcelBitmap = convertBytesToParcelBitmap();
652 }
653 #endregion
654
655
656 #region Parcel Bitmap Functions
657 /// <summary>
658 /// Sets the parcel's bitmap manually
659 /// </summary>
660 /// <param name="bitmap">64x64 block representing where this parcel is on a map</param>
661 public void setParcelBitmap(bool[,] bitmap)
662 {
663 if (bitmap.GetLength(0) != 64 || bitmap.GetLength(1) != 64 || bitmap.Rank != 2)
664 {
665 //Throw an exception - The bitmap is not 64x64
666 throw new Exception("Error: Invalid Parcel Bitmap");
667 }
668 else
669 {
670 //Valid: Lets set it
671 parcelBitmap = bitmap;
672 forceUpdateParcelInfo();
673
674 }
675 }
676 /// <summary>
677 /// Gets the parcels bitmap manually
678 /// </summary>
679 /// <returns></returns>
680 public bool[,] getParcelBitmap()
681 {
682 return parcelBitmap;
683 }
684 /// <summary>
685 /// Converts the parcel bitmap to a packet friendly byte array
686 /// </summary>
687 /// <returns></returns>
688 private byte[] convertParcelBitmapToBytes()
689 {
690 byte[] tempConvertArr = new byte[512];
691 byte tempByte = 0;
692 int x, y, i, byteNum = 0;
693 i = 0;
694 for (y = 0; y < 64; y++)
695 {
696 for (x = 0; x < 64; x++)
697 {
698 tempByte = Convert.ToByte(tempByte | Convert.ToByte(parcelBitmap[x, y]) << (i++ % 8));
699 if (i % 8 == 0)
700 {
701 tempConvertArr[byteNum] = tempByte;
702 tempByte = (byte)0;
703 i = 0;
704 byteNum++;
705 }
706 }
707 }
708 return tempConvertArr;
709 }
710
711 private bool[,] convertBytesToParcelBitmap()
712 {
713 bool[,] tempConvertMap = new bool[64, 64];
714 tempConvertMap.Initialize();
715 byte tempByte = 0;
716 int x = 0, y = 0, i = 0, bitNum = 0;
717 for(i = 0; i < 512; i++)
718 {
719 tempByte = parcelData.parcelBitmapByteArray[i];
720 for(bitNum = 0; bitNum < 8; bitNum++)
721 {
722 bool bit = Convert.ToBoolean(Convert.ToByte(tempByte >> bitNum) & (byte)1);
723 tempConvertMap[x, y] = bit;
724 x++;
725 if(x > 63)
726 {
727 x = 0;
728 y++;
729 }
730
731 }
732
733 }
734 return tempConvertMap;
735 }
736 /// <summary>
737 /// Full sim parcel creation
738 /// </summary>
739 /// <returns></returns>
740 public static bool[,] basicFullRegionParcelBitmap()
741 {
742 return getSquareParcelBitmap(0, 0, 256, 256);
743 }
744
745 /// <summary>
746 /// Used to modify the bitmap between the x and y points. Points use 64 scale
747 /// </summary>
748 /// <param name="start_x"></param>
749 /// <param name="start_y"></param>
750 /// <param name="end_x"></param>
751 /// <param name="end_y"></param>
752 /// <returns></returns>
753 public static bool[,] getSquareParcelBitmap(int start_x, int start_y, int end_x, int end_y)
754 {
755
756 bool[,] tempBitmap = new bool[64, 64];
757 tempBitmap.Initialize();
758
759 tempBitmap = modifyParcelBitmapSquare(tempBitmap, start_x, start_y, end_x, end_y, true);
760 return tempBitmap;
761 }
762
763 /// <summary>
764 /// Change a parcel's bitmap at within a square and set those points to a specific value
765 /// </summary>
766 /// <param name="parcel_bitmap"></param>
767 /// <param name="start_x"></param>
768 /// <param name="start_y"></param>
769 /// <param name="end_x"></param>
770 /// <param name="end_y"></param>
771 /// <param name="set_value"></param>
772 /// <returns></returns>
773 public static bool[,] modifyParcelBitmapSquare(bool[,] parcel_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value)
774 {
775 if (parcel_bitmap.GetLength(0) != 64 || parcel_bitmap.GetLength(1) != 64 || parcel_bitmap.Rank != 2)
776 {
777 //Throw an exception - The bitmap is not 64x64
778 throw new Exception("Error: Invalid Parcel Bitmap in modifyParcelBitmapSquare()");
779 }
780
781 int x, y;
782 for (y = 0; y < 64; y++)
783 {
784 for (x = 0; x < 64; x++)
785 {
786 if (x >= start_x / 4 && x < end_x / 4
787 && y >= start_y / 4 && y < end_y / 4)
788 {
789 parcel_bitmap[x, y] = set_value;
790 }
791 }
792 }
793 return parcel_bitmap;
794 }
795 /// <summary>
796 /// Join the true values of 2 bitmaps together
797 /// </summary>
798 /// <param name="bitmap_base"></param>
799 /// <param name="bitmap_add"></param>
800 /// <returns></returns>
801 public static bool[,] mergeParcelBitmaps(bool[,] bitmap_base, bool[,] bitmap_add)
802 {
803 if (bitmap_base.GetLength(0) != 64 || bitmap_base.GetLength(1) != 64 || bitmap_base.Rank != 2)
804 {
805 //Throw an exception - The bitmap is not 64x64
806 throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_base in mergeParcelBitmaps");
807 }
808 if (bitmap_add.GetLength(0) != 64 || bitmap_add.GetLength(1) != 64 || bitmap_add.Rank != 2)
809 {
810 //Throw an exception - The bitmap is not 64x64
811 throw new Exception("Error: Invalid Parcel Bitmap - Bitmap_add in mergeParcelBitmaps");
812
813 }
814
815 int x, y;
816 for (y = 0; y < 64; y++)
817 {
818 for (x = 0; x < 64; x++)
819 {
820 if (bitmap_add[x, y])
821 {
822 bitmap_base[x, y] = true;
823 }
824 }
825 }
826 return bitmap_base;
827 }
828 #endregion
829
830 #endregion
831
832
833 }
834 #endregion
835
836
837}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/Primitive.cs b/OpenSim/OpenSim.RegionServer/Simulator/Primitive.cs
deleted file mode 100644
index f1417d0..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/Primitive.cs
+++ /dev/null
@@ -1,598 +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 OpenSim.RegionServer.Types;
32using libsecondlife;
33using libsecondlife.Packets;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Physics.Manager;
36using OpenSim.Framework.Types;
37using OpenSim.RegionServer.Client;
38
39namespace OpenSim.RegionServer.Simulator
40{
41 public class Primitive : Entity
42 {
43 protected float mesh_cutbegin;
44 protected float mesh_cutend;
45 protected PrimData primData;
46 protected bool newPrimFlag = false;
47 protected bool updateFlag = false;
48 protected bool dirtyFlag = false;
49 private ObjectUpdatePacket OurPacket;
50 private bool physicsEnabled = false;
51 private bool physicstest = false;
52 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
53 private Dictionary<uint, ClientView> m_clientThreads;
54 private ulong m_regionHandle;
55 private const uint FULL_MASK_PERMISSIONS = 2147483647;
56
57 public bool PhysicsEnabled
58 {
59 get
60 {
61 return physicsEnabled;
62 }
63 set
64 {
65 physicsEnabled = value;
66 }
67 }
68 public bool UpdateFlag
69 {
70 get
71 {
72 return updateFlag;
73 }
74 set
75 {
76 updateFlag = value;
77 }
78 }
79 public LLVector3 Scale
80 {
81 set
82 {
83 LLVector3 offset = (value - primData.Scale);
84 offset.X /= 2;
85 offset.Y /= 2;
86 offset.Z /= 2;
87
88 this.primData.Position += offset;
89 this.primData.Scale = value;
90
91 this.dirtyFlag = true;
92 }
93 get
94 {
95 return this.primData.Scale;
96 }
97 }
98 public PhysicsActor PhysActor
99 {
100 set
101 {
102 this._physActor = value;
103 }
104 }
105
106 public Primitive(Dictionary<uint, ClientView> clientThreads, ulong regionHandle, World world)
107 {
108 mesh_cutbegin = 0.0f;
109 mesh_cutend = 1.0f;
110
111 m_clientThreads = clientThreads;
112 m_regionHandle = regionHandle;
113 m_world = world;
114 }
115
116 public override Mesh getMesh()
117 {
118 Mesh mesh = new Mesh();
119 Triangle tri = new Triangle(
120 new Axiom.MathLib.Vector3(0.0f, 1.0f, 1.0f),
121 new Axiom.MathLib.Vector3(1.0f, 0.0f, 1.0f),
122 new Axiom.MathLib.Vector3(1.0f, 1.0f, 0.0f));
123
124 mesh.AddTri(tri);
125 mesh += base.getMesh();
126
127 return mesh;
128 }
129
130 public byte[] GetByteArray()
131 {
132 return this.primData.ToBytes();
133 }
134
135 public void GetProperites(ClientView client)
136 {
137 ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
138 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
139 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
140 proper.ObjectData[0].ItemID = LLUUID.Zero; // this.uuid;
141 proper.ObjectData[0].CreationDate = (ulong) this.primData.CreationDate;
142 proper.ObjectData[0].CreatorID = this.primData.OwnerID;
143 proper.ObjectData[0].FolderID = LLUUID.Zero;
144 proper.ObjectData[0].FromTaskID = LLUUID.Zero;
145 proper.ObjectData[0].GroupID = LLUUID.Zero;
146 proper.ObjectData[0].InventorySerial = 0;
147 proper.ObjectData[0].LastOwnerID = LLUUID.Zero;
148 proper.ObjectData[0].ObjectID = this.uuid;
149 proper.ObjectData[0].OwnerID = primData.OwnerID;
150 proper.ObjectData[0].TouchName = new byte[0];
151 proper.ObjectData[0].TextureID = new byte[0];
152 proper.ObjectData[0].SitName = new byte[0];
153 proper.ObjectData[0].Name = new byte[0];
154 proper.ObjectData[0].Description = new byte[0];
155 proper.ObjectData[0].OwnerMask = this.primData.OwnerMask;
156 proper.ObjectData[0].NextOwnerMask = this.primData.NextOwnerMask;
157 proper.ObjectData[0].GroupMask = this.primData.GroupMask;
158 proper.ObjectData[0].EveryoneMask = this.primData.EveryoneMask;
159 proper.ObjectData[0].BaseMask = this.primData.BaseMask;
160
161 client.OutPacket(proper);
162 }
163
164 public void UpdatePosition(LLVector3 pos)
165 {
166 this.Pos = pos;
167 if (this._physActor != null) // && this.physicsEnabled)
168 {
169 try
170 {
171 lock (m_world.LockPhysicsEngine)
172 {
173 this._physActor.Position = new PhysicsVector(pos.X, pos.Y, pos.Z);
174 }
175 }
176 catch (Exception e)
177 {
178 Console.WriteLine(e.Message);
179 }
180 }
181 this.updateFlag = true;
182 }
183
184 public override void update()
185 {
186 LLVector3 pos2 = new LLVector3(0, 0, 0);
187 if (this._physActor != null && this.physicsEnabled)
188 {
189
190 PhysicsVector pPos = this._physActor.Position;
191 pos2 = new LLVector3(pPos.X, pPos.Y, pPos.Z);
192 }
193 if (this.newPrimFlag)
194 {
195 foreach (ClientView client in m_clientThreads.Values)
196 {
197 client.OutPacket(OurPacket);
198 }
199 this.newPrimFlag = false;
200 }
201 else if (this.updateFlag)
202 {
203 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
204 terse.RegionData.RegionHandle = m_regionHandle; // FIXME
205 terse.RegionData.TimeDilation = 64096;
206 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
207 terse.ObjectData[0] = this.CreateImprovedBlock();
208 foreach (ClientView client in m_clientThreads.Values)
209 {
210 client.OutPacket(terse);
211 }
212 this.updateFlag = false;
213 }
214 else if (this.dirtyFlag)
215 {
216 foreach (ClientView client in m_clientThreads.Values)
217 {
218 UpdateClient(client);
219 }
220 this.dirtyFlag = false;
221 }
222 else
223 {
224 if (this._physActor != null && this.physicsEnabled)
225 {
226 if (pos2 != this.positionLastFrame)
227 {
228 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
229 terse.RegionData.RegionHandle = m_regionHandle; // FIXME
230 terse.RegionData.TimeDilation = 64096;
231 terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
232 terse.ObjectData[0] = this.CreateImprovedBlock();
233 foreach (ClientView client in m_clientThreads.Values)
234 {
235 client.OutPacket(terse);
236 }
237 }
238 this.positionLastFrame = pos2;
239 }
240 }
241
242 if (this.physicstest)
243 {
244 LLVector3 pos = this.Pos;
245 pos.Z += 0.0001f;
246 this.UpdatePosition(pos);
247 this.physicstest = false;
248 }
249 }
250
251 public void UpdateClient(ClientView RemoteClient)
252 {
253
254 LLVector3 lPos;
255 if (this._physActor != null && this.physicsEnabled)
256 {
257 PhysicsVector pPos = this._physActor.Position;
258 lPos = new LLVector3(pPos.X, pPos.Y, pPos.Z);
259 }
260 else
261 {
262 lPos = this.Pos;
263 }
264 byte[] pb = lPos.GetBytes();
265 Array.Copy(pb, 0, OurPacket.ObjectData[0].ObjectData, 0, pb.Length);
266
267 // OurPacket should be update with the follwing in updateShape() rather than having to do it here
268 OurPacket.ObjectData[0].OwnerID = this.primData.OwnerID;
269 OurPacket.ObjectData[0].PCode = this.primData.PCode;
270 OurPacket.ObjectData[0].PathBegin = this.primData.PathBegin;
271 OurPacket.ObjectData[0].PathEnd = this.primData.PathEnd;
272 OurPacket.ObjectData[0].PathScaleX = this.primData.PathScaleX;
273 OurPacket.ObjectData[0].PathScaleY = this.primData.PathScaleY;
274 OurPacket.ObjectData[0].PathShearX = this.primData.PathShearX;
275 OurPacket.ObjectData[0].PathShearY = this.primData.PathShearY;
276 OurPacket.ObjectData[0].PathSkew = this.primData.PathSkew;
277 OurPacket.ObjectData[0].ProfileBegin = this.primData.ProfileBegin;
278 OurPacket.ObjectData[0].ProfileEnd = this.primData.ProfileEnd;
279 OurPacket.ObjectData[0].Scale = this.primData.Scale;
280 OurPacket.ObjectData[0].PathCurve = this.primData.PathCurve;
281 OurPacket.ObjectData[0].ProfileCurve = this.primData.ProfileCurve;
282 OurPacket.ObjectData[0].ParentID = this.primData.ParentID ;
283 OurPacket.ObjectData[0].ProfileHollow = this.primData.ProfileHollow;
284 //finish off copying rest of shape data
285 OurPacket.ObjectData[0].PathRadiusOffset = this.primData.PathRadiusOffset;
286 OurPacket.ObjectData[0].PathRevolutions = this.primData.PathRevolutions;
287 OurPacket.ObjectData[0].PathTaperX = this.primData.PathTaperX;
288 OurPacket.ObjectData[0].PathTaperY = this.primData.PathTaperY;
289 OurPacket.ObjectData[0].PathTwist = this.primData.PathTwist;
290 OurPacket.ObjectData[0].PathTwistBegin = this.primData.PathTwistBegin;
291
292 RemoteClient.OutPacket(OurPacket);
293 }
294
295 public void UpdateShape(ObjectShapePacket.ObjectDataBlock addPacket)
296 {
297 this.primData.PathBegin = addPacket.PathBegin;
298 this.primData.PathEnd = addPacket.PathEnd;
299 this.primData.PathScaleX = addPacket.PathScaleX;
300 this.primData.PathScaleY = addPacket.PathScaleY;
301 this.primData.PathShearX = addPacket.PathShearX;
302 this.primData.PathShearY = addPacket.PathShearY;
303 this.primData.PathSkew = addPacket.PathSkew;
304 this.primData.ProfileBegin = addPacket.ProfileBegin;
305 this.primData.ProfileEnd = addPacket.ProfileEnd;
306 this.primData.PathCurve = addPacket.PathCurve;
307 this.primData.ProfileCurve = addPacket.ProfileCurve;
308 this.primData.ProfileHollow = addPacket.ProfileHollow;
309 this.primData.PathRadiusOffset = addPacket.PathRadiusOffset;
310 this.primData.PathRevolutions = addPacket.PathRevolutions;
311 this.primData.PathTaperX = addPacket.PathTaperX;
312 this.primData.PathTaperY = addPacket.PathTaperY;
313 this.primData.PathTwist = addPacket.PathTwist;
314 this.primData.PathTwistBegin = addPacket.PathTwistBegin;
315 this.dirtyFlag = true;
316 }
317
318 public void UpdateTexture(byte[] tex)
319 {
320 this.OurPacket.ObjectData[0].TextureEntry = tex;
321 this.primData.Texture = tex;
322 this.dirtyFlag = true;
323 }
324
325 public void UpdateObjectFlags(ObjectFlagUpdatePacket pack)
326 {
327 if (this._physActor != null)
328 {
329 if (this._physActor.Kinematic == pack.AgentData.UsePhysics)
330 {
331 this._physActor.Kinematic = !pack.AgentData.UsePhysics; //if Usephysics = true, then Kinematic should = false
332 }
333 this.physicsEnabled = pack.AgentData.UsePhysics;
334 if (this._physActor.Kinematic == false)
335 {
336 LLVector3 pos = this.Pos;
337 this.UpdatePosition(pos);
338 pos.Z += 0.000001f;
339 this.UpdatePosition(pos);
340 this.physicstest = true;
341 }
342 else
343 {
344 PhysicsVector vec = this._physActor.Position;
345 LLVector3 pos = new LLVector3(vec.X, vec.Y, vec.Z);
346 this.Pos = pos;
347 this.updateFlag = true;
348 }
349 }
350 }
351
352 public void MakeParent(Primitive prim)
353 {
354 this.primData.ParentID = prim.localid;
355 this.Pos -= prim.Pos;
356 this.dirtyFlag = true;
357 }
358
359 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID ownerID, uint localID)
360 {
361 ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
362 objupdate.RegionData.RegionHandle = m_regionHandle;
363 objupdate.RegionData.TimeDilation = 64096;
364
365 objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1];
366 PrimData PData = new PrimData();
367 this.primData = PData;
368 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
369
370 objupdate.ObjectData[0] = new ObjectUpdatePacket.ObjectDataBlock();
371 objupdate.ObjectData[0].PSBlock = new byte[0];
372 objupdate.ObjectData[0].ExtraParams = new byte[1];
373 objupdate.ObjectData[0].MediaURL = new byte[0];
374 objupdate.ObjectData[0].NameValue = new byte[0];
375 objupdate.ObjectData[0].Text = new byte[0];
376 objupdate.ObjectData[0].TextColor = new byte[4];
377 objupdate.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 0);
378 objupdate.ObjectData[0].JointPivot = new LLVector3(0, 0, 0);
379 objupdate.ObjectData[0].Material = 3;
380 objupdate.ObjectData[0].UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456;
381 objupdate.ObjectData[0].TextureAnim = new byte[0];
382 objupdate.ObjectData[0].Sound = LLUUID.Zero;
383 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
384 this.primData.Texture = objupdate.ObjectData[0].TextureEntry = ntex.ToBytes();
385 objupdate.ObjectData[0].State = 0;
386 objupdate.ObjectData[0].Data = new byte[0];
387 PData.OwnerID = objupdate.ObjectData[0].OwnerID = ownerID;
388 PData.PCode = objupdate.ObjectData[0].PCode = addPacket.ObjectData.PCode;
389 PData.PathBegin = objupdate.ObjectData[0].PathBegin = addPacket.ObjectData.PathBegin;
390 PData.PathEnd = objupdate.ObjectData[0].PathEnd = addPacket.ObjectData.PathEnd;
391 PData.PathScaleX = objupdate.ObjectData[0].PathScaleX = addPacket.ObjectData.PathScaleX;
392 PData.PathScaleY = objupdate.ObjectData[0].PathScaleY = addPacket.ObjectData.PathScaleY;
393 PData.PathShearX = objupdate.ObjectData[0].PathShearX = addPacket.ObjectData.PathShearX;
394 PData.PathShearY = objupdate.ObjectData[0].PathShearY = addPacket.ObjectData.PathShearY;
395 PData.PathSkew = objupdate.ObjectData[0].PathSkew = addPacket.ObjectData.PathSkew;
396 PData.ProfileBegin = objupdate.ObjectData[0].ProfileBegin = addPacket.ObjectData.ProfileBegin;
397 PData.ProfileEnd = objupdate.ObjectData[0].ProfileEnd = addPacket.ObjectData.ProfileEnd;
398 PData.Scale = objupdate.ObjectData[0].Scale = addPacket.ObjectData.Scale;
399 PData.PathCurve = objupdate.ObjectData[0].PathCurve = addPacket.ObjectData.PathCurve;
400 PData.ProfileCurve = objupdate.ObjectData[0].ProfileCurve = addPacket.ObjectData.ProfileCurve;
401 PData.ParentID = objupdate.ObjectData[0].ParentID = 0;
402 PData.ProfileHollow = objupdate.ObjectData[0].ProfileHollow = addPacket.ObjectData.ProfileHollow;
403 PData.PathRadiusOffset = objupdate.ObjectData[0].PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset;
404 PData.PathRevolutions = objupdate.ObjectData[0].PathRevolutions = addPacket.ObjectData.PathRevolutions;
405 PData.PathTaperX = objupdate.ObjectData[0].PathTaperX = addPacket.ObjectData.PathTaperX;
406 PData.PathTaperY = objupdate.ObjectData[0].PathTaperY = addPacket.ObjectData.PathTaperY;
407 PData.PathTwist = objupdate.ObjectData[0].PathTwist = addPacket.ObjectData.PathTwist;
408 PData.PathTwistBegin = objupdate.ObjectData[0].PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
409
410 objupdate.ObjectData[0].ID = (uint)(localID);
411 objupdate.ObjectData[0].FullID = new LLUUID("edba7151-5857-acc5-b30b-f01efef" + (localID - 702000).ToString("00000"));
412 objupdate.ObjectData[0].ObjectData = new byte[60];
413 objupdate.ObjectData[0].ObjectData[46] = 128;
414 objupdate.ObjectData[0].ObjectData[47] = 63;
415 LLVector3 pos1 = addPacket.ObjectData.RayEnd;
416 //update position
417 byte[] pb = pos1.GetBytes();
418 Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 0, pb.Length);
419 this.newPrimFlag = true;
420 this.primData.FullID = this.uuid = objupdate.ObjectData[0].FullID;
421 this.localid = objupdate.ObjectData[0].ID;
422 this.primData.Position = this.Pos = pos1;
423 this.OurPacket = objupdate;
424 }
425
426 public void CreateFromStorage(PrimData store)
427 {
428 this.CreateFromStorage(store, store.Position, store.LocalID, false);
429 }
430
431 public void CreateFromStorage(PrimData store, LLVector3 posi, uint localID, bool newprim)
432 {
433 //need to clean this up as it shares a lot of code with CreateFromPacket()
434 ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
435 objupdate.RegionData.RegionHandle = m_regionHandle;
436 objupdate.RegionData.TimeDilation = 64096;
437 objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1];
438
439 this.primData = store;
440 objupdate.ObjectData[0] = new ObjectUpdatePacket.ObjectDataBlock();
441 objupdate.ObjectData[0].PSBlock = new byte[0];
442 objupdate.ObjectData[0].ExtraParams = new byte[1];
443 objupdate.ObjectData[0].MediaURL = new byte[0];
444 objupdate.ObjectData[0].NameValue = new byte[0];
445 objupdate.ObjectData[0].Text = new byte[0];
446 objupdate.ObjectData[0].TextColor = new byte[4];
447 objupdate.ObjectData[0].JointAxisOrAnchor = new LLVector3(0, 0, 0);
448 objupdate.ObjectData[0].JointPivot = new LLVector3(0, 0, 0);
449 objupdate.ObjectData[0].Material = 3;
450 objupdate.ObjectData[0].UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456;
451 objupdate.ObjectData[0].TextureAnim = new byte[0];
452 objupdate.ObjectData[0].Sound = LLUUID.Zero;
453
454 if (store.Texture == null)
455 {
456 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
457 objupdate.ObjectData[0].TextureEntry = ntex.ToBytes();
458 }
459 else
460 {
461 objupdate.ObjectData[0].TextureEntry = store.Texture;
462 }
463
464 objupdate.ObjectData[0].State = 0;
465 objupdate.ObjectData[0].Data = new byte[0];
466 objupdate.ObjectData[0].OwnerID = this.primData.OwnerID;
467 objupdate.ObjectData[0].PCode = this.primData.PCode;
468 objupdate.ObjectData[0].PathBegin = this.primData.PathBegin;
469 objupdate.ObjectData[0].PathEnd = this.primData.PathEnd;
470 objupdate.ObjectData[0].PathScaleX = this.primData.PathScaleX;
471 objupdate.ObjectData[0].PathScaleY = this.primData.PathScaleY;
472 objupdate.ObjectData[0].PathShearX = this.primData.PathShearX;
473 objupdate.ObjectData[0].PathShearY = this.primData.PathShearY;
474 objupdate.ObjectData[0].PathSkew = this.primData.PathSkew;
475 objupdate.ObjectData[0].ProfileBegin = this.primData.ProfileBegin;
476 objupdate.ObjectData[0].ProfileEnd = this.primData.ProfileEnd;
477 objupdate.ObjectData[0].Scale = this.primData.Scale;
478 objupdate.ObjectData[0].PathCurve = this.primData.PathCurve;
479 objupdate.ObjectData[0].ProfileCurve = this.primData.ProfileCurve;
480 objupdate.ObjectData[0].ParentID = 0;
481 objupdate.ObjectData[0].ProfileHollow = this.primData.ProfileHollow;
482 //finish off copying rest of shape data
483 objupdate.ObjectData[0].PathRadiusOffset = this.primData.PathRadiusOffset;
484 objupdate.ObjectData[0].PathRevolutions = this.primData.PathRevolutions;
485 objupdate.ObjectData[0].PathTaperX = this.primData.PathTaperX;
486 objupdate.ObjectData[0].PathTaperY = this.primData.PathTaperY;
487 objupdate.ObjectData[0].PathTwist = this.primData.PathTwist;
488 objupdate.ObjectData[0].PathTwistBegin = this.primData.PathTwistBegin;
489
490 objupdate.ObjectData[0].ID = localID; // (uint)store.LocalID;
491 objupdate.ObjectData[0].FullID = store.FullID;
492
493 objupdate.ObjectData[0].ObjectData = new byte[60];
494 objupdate.ObjectData[0].ObjectData[46] = 128;
495 objupdate.ObjectData[0].ObjectData[47] = 63;
496 LLVector3 pos1 = posi; // store.Position;
497 //update position
498 byte[] pb = pos1.GetBytes();
499 Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 0, pb.Length);
500
501 this.uuid = objupdate.ObjectData[0].FullID;
502 this.localid = objupdate.ObjectData[0].ID;
503 this.Pos = pos1;
504 this.OurPacket = objupdate;
505 if (newprim)
506 {
507 this.newPrimFlag = true;
508 }
509 }
510
511 public ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedBlock()
512 {
513 uint ID = this.localid;
514 byte[] bytes = new byte[60];
515
516 int i = 0;
517 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
518 //dat.TextureEntry = this.OurPacket.ObjectData[0].TextureEntry;
519 dat.TextureEntry = new byte[0];
520 bytes[i++] = (byte)(ID % 256);
521 bytes[i++] = (byte)((ID >> 8) % 256);
522 bytes[i++] = (byte)((ID >> 16) % 256);
523 bytes[i++] = (byte)((ID >> 24) % 256);
524 bytes[i++] = 0;
525 bytes[i++] = 0;
526
527 LLVector3 lPos;
528 Axiom.MathLib.Quaternion lRot;
529 if (this._physActor != null && this.physicsEnabled)
530 {
531 PhysicsVector pPos = this._physActor.Position;
532 lPos = new LLVector3(pPos.X, pPos.Y, pPos.Z);
533 lRot = this._physActor.Orientation;
534 }
535 else
536 {
537 lPos = this.Pos;
538 lRot = this.rotation;
539 }
540 byte[] pb = lPos.GetBytes();
541 Array.Copy(pb, 0, bytes, i, pb.Length);
542 i += 12;
543 ushort ac = 32767;
544
545 //vel
546 bytes[i++] = (byte)(ac % 256);
547 bytes[i++] = (byte)((ac >> 8) % 256);
548 bytes[i++] = (byte)(ac % 256);
549 bytes[i++] = (byte)((ac >> 8) % 256);
550 bytes[i++] = (byte)(ac % 256);
551 bytes[i++] = (byte)((ac >> 8) % 256);
552
553 //accel
554 bytes[i++] = (byte)(ac % 256);
555 bytes[i++] = (byte)((ac >> 8) % 256);
556 bytes[i++] = (byte)(ac % 256);
557 bytes[i++] = (byte)((ac >> 8) % 256);
558 bytes[i++] = (byte)(ac % 256);
559 bytes[i++] = (byte)((ac >> 8) % 256);
560
561 ushort rw, rx, ry, rz;
562 rw = (ushort)(32768 * (lRot.w + 1));
563 rx = (ushort)(32768 * (lRot.x + 1));
564 ry = (ushort)(32768 * (lRot.y + 1));
565 rz = (ushort)(32768 * (lRot.z + 1));
566
567 //rot
568 bytes[i++] = (byte)(rx % 256);
569 bytes[i++] = (byte)((rx >> 8) % 256);
570 bytes[i++] = (byte)(ry % 256);
571 bytes[i++] = (byte)((ry >> 8) % 256);
572 bytes[i++] = (byte)(rz % 256);
573 bytes[i++] = (byte)((rz >> 8) % 256);
574 bytes[i++] = (byte)(rw % 256);
575 bytes[i++] = (byte)((rw >> 8) % 256);
576
577 //rotation vel
578 bytes[i++] = (byte)(ac % 256);
579 bytes[i++] = (byte)((ac >> 8) % 256);
580 bytes[i++] = (byte)(ac % 256);
581 bytes[i++] = (byte)((ac >> 8) % 256);
582 bytes[i++] = (byte)(ac % 256);
583 bytes[i++] = (byte)((ac >> 8) % 256);
584
585 dat.Data = bytes;
586 return dat;
587 }
588
589 public override void BackUp()
590 {
591 this.primData.FullID = this.uuid;
592 this.primData.LocalID = this.localid;
593 this.primData.Position = this.Pos;
594 this.primData.Rotation = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w);
595 this.m_world.localStorage.StorePrim(this.primData);
596 }
597 }
598}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/Primitive2.cs b/OpenSim/OpenSim.RegionServer/Simulator/Primitive2.cs
deleted file mode 100644
index 0286e54..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/Primitive2.cs
+++ /dev/null
@@ -1,519 +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 OpenSim.RegionServer.Types;
32using libsecondlife;
33using libsecondlife.Packets;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Physics.Manager;
36using OpenSim.Framework.Types;
37using OpenSim.Framework.Inventory;
38using OpenSim.RegionServer.Client;
39
40namespace OpenSim.RegionServer.Simulator
41{
42 public class Primitive2 : Entity
43 {
44 protected PrimData primData;
45 //private ObjectUpdatePacket OurPacket;
46 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
47 private Dictionary<uint, ClientView> m_clientThreads;
48 private ulong m_regionHandle;
49 private const uint FULL_MASK_PERMISSIONS = 2147483647;
50 private bool physicsEnabled = false;
51
52 private Dictionary<LLUUID, InventoryItem> inventoryItems;
53
54 #region Properties
55
56 public LLVector3 Scale
57 {
58 set
59 {
60 this.primData.Scale = value;
61 //this.dirtyFlag = true;
62 }
63 get
64 {
65 return this.primData.Scale;
66 }
67 }
68
69 public PhysicsActor PhysActor
70 {
71 set
72 {
73 this._physActor = value;
74 }
75 }
76 public override LLVector3 Pos
77 {
78 get
79 {
80 return base.Pos;
81 }
82 set
83 {
84 base.Pos = value;
85 }
86 }
87 #endregion
88
89 public Primitive2(Dictionary<uint, ClientView> clientThreads, ulong regionHandle, World world)
90 {
91 m_clientThreads = clientThreads;
92 m_regionHandle = regionHandle;
93 m_world = world;
94 inventoryItems = new Dictionary<LLUUID, InventoryItem>();
95 }
96
97 public Primitive2(Dictionary<uint, ClientView> clientThreads, ulong regionHandle, World world, LLUUID owner)
98 {
99 m_clientThreads = clientThreads;
100 m_regionHandle = regionHandle;
101 m_world = world;
102 inventoryItems = new Dictionary<LLUUID, InventoryItem>();
103 this.primData = new PrimData();
104 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
105 this.primData.OwnerID = owner;
106 }
107
108 public byte[] GetByteArray()
109 {
110 byte[] result = null;
111 List<byte[]> dataArrays = new List<byte[]>();
112 dataArrays.Add(primData.ToBytes());
113 foreach (Entity child in children)
114 {
115 if (child is OpenSim.RegionServer.Simulator.Primitive2)
116 {
117 dataArrays.Add(((OpenSim.RegionServer.Simulator.Primitive2)child).GetByteArray());
118 }
119 }
120 byte[] primstart = Helpers.StringToField("<Prim>");
121 byte[] primend = Helpers.StringToField("</Prim>");
122 int totalLength = primstart.Length + primend.Length;
123 for (int i = 0; i < dataArrays.Count; i++)
124 {
125 totalLength += dataArrays[i].Length;
126 }
127
128 result = new byte[totalLength];
129 int arraypos = 0;
130 Array.Copy(primstart, 0, result, 0, primstart.Length);
131 arraypos += primstart.Length;
132 for (int i = 0; i < dataArrays.Count; i++)
133 {
134 Array.Copy(dataArrays[i], 0, result, arraypos, dataArrays[i].Length);
135 arraypos += dataArrays[i].Length;
136 }
137 Array.Copy(primend, 0, result, arraypos, primend.Length);
138
139 return result;
140 }
141
142 #region Overridden Methods
143
144 public override void update()
145 {
146 LLVector3 pos2 = new LLVector3(0, 0, 0);
147 }
148
149 public override void BackUp()
150 {
151
152 }
153
154 #endregion
155
156 #region Packet handlers
157
158 public void UpdatePosition(LLVector3 pos)
159 {
160
161 }
162
163 public void UpdateShape(ObjectShapePacket.ObjectDataBlock addPacket)
164 {
165 this.primData.PathBegin = addPacket.PathBegin;
166 this.primData.PathEnd = addPacket.PathEnd;
167 this.primData.PathScaleX = addPacket.PathScaleX;
168 this.primData.PathScaleY = addPacket.PathScaleY;
169 this.primData.PathShearX = addPacket.PathShearX;
170 this.primData.PathShearY = addPacket.PathShearY;
171 this.primData.PathSkew = addPacket.PathSkew;
172 this.primData.ProfileBegin = addPacket.ProfileBegin;
173 this.primData.ProfileEnd = addPacket.ProfileEnd;
174 this.primData.PathCurve = addPacket.PathCurve;
175 this.primData.ProfileCurve = addPacket.ProfileCurve;
176 this.primData.ProfileHollow = addPacket.ProfileHollow;
177 this.primData.PathRadiusOffset = addPacket.PathRadiusOffset;
178 this.primData.PathRevolutions = addPacket.PathRevolutions;
179 this.primData.PathTaperX = addPacket.PathTaperX;
180 this.primData.PathTaperY = addPacket.PathTaperY;
181 this.primData.PathTwist = addPacket.PathTwist;
182 this.primData.PathTwistBegin = addPacket.PathTwistBegin;
183 }
184
185 public void UpdateTexture(byte[] tex)
186 {
187 this.primData.Texture = tex;
188 //this.dirtyFlag = true;
189 }
190
191 public void UpdateObjectFlags(ObjectFlagUpdatePacket pack)
192 {
193
194 }
195
196 public void AssignToParent(Primitive prim)
197 {
198
199 }
200
201 public void GetProperites(ClientView client)
202 {
203 ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
204 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
205 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
206 proper.ObjectData[0].ItemID = LLUUID.Zero;
207 proper.ObjectData[0].CreationDate = (ulong)this.primData.CreationDate;
208 proper.ObjectData[0].CreatorID = this.primData.OwnerID;
209 proper.ObjectData[0].FolderID = LLUUID.Zero;
210 proper.ObjectData[0].FromTaskID = LLUUID.Zero;
211 proper.ObjectData[0].GroupID = LLUUID.Zero;
212 proper.ObjectData[0].InventorySerial = 0;
213 proper.ObjectData[0].LastOwnerID = LLUUID.Zero;
214 proper.ObjectData[0].ObjectID = this.uuid;
215 proper.ObjectData[0].OwnerID = primData.OwnerID;
216 proper.ObjectData[0].TouchName = new byte[0];
217 proper.ObjectData[0].TextureID = new byte[0];
218 proper.ObjectData[0].SitName = new byte[0];
219 proper.ObjectData[0].Name = new byte[0];
220 proper.ObjectData[0].Description = new byte[0];
221 proper.ObjectData[0].OwnerMask = this.primData.OwnerMask;
222 proper.ObjectData[0].NextOwnerMask = this.primData.NextOwnerMask;
223 proper.ObjectData[0].GroupMask = this.primData.GroupMask;
224 proper.ObjectData[0].EveryoneMask = this.primData.EveryoneMask;
225 proper.ObjectData[0].BaseMask = this.primData.BaseMask;
226
227 client.OutPacket(proper);
228 }
229
230 #endregion
231
232 # region Inventory Methods
233
234 public bool AddToInventory(InventoryItem item)
235 {
236 return false;
237 }
238
239 public InventoryItem RemoveFromInventory(LLUUID itemID)
240 {
241 return null;
242 }
243
244 public void RequestInventoryInfo(ClientView simClient, RequestTaskInventoryPacket packet)
245 {
246
247 }
248
249 public void RequestXferInventory(ClientView simClient, ulong xferID)
250 {
251 //will only currently work if the total size of the inventory data array is under about 1000 bytes
252 SendXferPacketPacket send = new SendXferPacketPacket();
253
254 send.XferID.ID = xferID;
255 send.XferID.Packet = 1 + 2147483648;
256 send.DataPacket.Data = this.ConvertInventoryToBytes();
257
258 simClient.OutPacket(send);
259 }
260
261 public byte[] ConvertInventoryToBytes()
262 {
263 System.Text.Encoding enc = System.Text.Encoding.ASCII;
264 byte[] result = new byte[0];
265 List<byte[]> inventoryData = new List<byte[]>();
266 int totallength = 0;
267 foreach (InventoryItem invItem in inventoryItems.Values)
268 {
269 byte[] data = enc.GetBytes(invItem.ExportString());
270 inventoryData.Add(data);
271 totallength += data.Length;
272 }
273 //TODO: copy arrays into the single result array
274
275 return result;
276 }
277
278 public void CreateInventoryFromBytes(byte[] data)
279 {
280
281 }
282
283 #endregion
284
285 #region Update viewers Methods
286
287 //should change these mehtods, so that outgoing packets are sent through the avatar class
288 public void SendFullUpdateToClient(ClientView remoteClient)
289 {
290 LLVector3 lPos;
291 if (this._physActor != null && this.physicsEnabled)
292 {
293 PhysicsVector pPos = this._physActor.Position;
294 lPos = new LLVector3(pPos.X, pPos.Y, pPos.Z);
295 }
296 else
297 {
298 lPos = this.Pos;
299 }
300
301 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
302 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
303 outPacket.ObjectData[0] = this.CreateUpdateBlock();
304 byte[] pb = lPos.GetBytes();
305 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
306
307 remoteClient.OutPacket(outPacket);
308 }
309
310 public void SendFullUpdateToAllClients()
311 {
312
313 }
314
315 public void SendTerseUpdateToClient(ClientView RemoteClient)
316 {
317
318 }
319
320 public void SendTerseUpdateToALLClients()
321 {
322
323 }
324
325 #endregion
326
327 #region Create Methods
328
329 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID ownerID, uint localID)
330 {
331 PrimData PData = new PrimData();
332 this.primData = PData;
333 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
334
335 PData.OwnerID = ownerID;
336 PData.PCode = addPacket.ObjectData.PCode;
337 PData.PathBegin = addPacket.ObjectData.PathBegin;
338 PData.PathEnd = addPacket.ObjectData.PathEnd;
339 PData.PathScaleX = addPacket.ObjectData.PathScaleX;
340 PData.PathScaleY = addPacket.ObjectData.PathScaleY;
341 PData.PathShearX = addPacket.ObjectData.PathShearX;
342 PData.PathShearY = addPacket.ObjectData.PathShearY;
343 PData.PathSkew = addPacket.ObjectData.PathSkew;
344 PData.ProfileBegin = addPacket.ObjectData.ProfileBegin;
345 PData.ProfileEnd = addPacket.ObjectData.ProfileEnd;
346 PData.Scale = addPacket.ObjectData.Scale;
347 PData.PathCurve = addPacket.ObjectData.PathCurve;
348 PData.ProfileCurve = addPacket.ObjectData.ProfileCurve;
349 PData.ParentID = 0;
350 PData.ProfileHollow = addPacket.ObjectData.ProfileHollow;
351 PData.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset;
352 PData.PathRevolutions = addPacket.ObjectData.PathRevolutions;
353 PData.PathTaperX = addPacket.ObjectData.PathTaperX;
354 PData.PathTaperY = addPacket.ObjectData.PathTaperY;
355 PData.PathTwist = addPacket.ObjectData.PathTwist;
356 PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
357 LLVector3 pos1 = addPacket.ObjectData.RayEnd;
358 this.primData.FullID = this.uuid = LLUUID.Random();
359 this.localid = (uint)(localID);
360 this.primData.Position = this.Pos = pos1;
361 }
362
363 public void CreateFromBytes(byte[] data)
364 {
365
366 }
367
368 public void CreateFromPrimData(PrimData primData)
369 {
370 this.CreateFromPrimData(primData, primData.Position, primData.LocalID, false);
371 }
372
373 public void CreateFromPrimData(PrimData primData, LLVector3 posi, uint localID, bool newprim)
374 {
375
376 }
377
378 #endregion
379
380 #region Packet Update Methods
381 protected void SetDefaultPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata)
382 {
383 objdata.PSBlock = new byte[0];
384 objdata.ExtraParams = new byte[1];
385 objdata.MediaURL = new byte[0];
386 objdata.NameValue = new byte[0];
387 objdata.Text = new byte[0];
388 objdata.TextColor = new byte[4];
389 objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0);
390 objdata.JointPivot = new LLVector3(0, 0, 0);
391 objdata.Material = 3;
392 objdata.TextureAnim = new byte[0];
393 objdata.Sound = LLUUID.Zero;
394 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
395 this.primData.Texture = objdata.TextureEntry = ntex.ToBytes();
396 objdata.State = 0;
397 objdata.Data = new byte[0];
398
399 objdata.ObjectData = new byte[60];
400 objdata.ObjectData[46] = 128;
401 objdata.ObjectData[47] = 63;
402 }
403
404 protected void SetPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData)
405 {
406 objectData.OwnerID = this.primData.OwnerID;
407 objectData.PCode = this.primData.PCode;
408 objectData.PathBegin = this.primData.PathBegin;
409 objectData.PathEnd = this.primData.PathEnd;
410 objectData.PathScaleX = this.primData.PathScaleX;
411 objectData.PathScaleY = this.primData.PathScaleY;
412 objectData.PathShearX = this.primData.PathShearX;
413 objectData.PathShearY = this.primData.PathShearY;
414 objectData.PathSkew = this.primData.PathSkew;
415 objectData.ProfileBegin = this.primData.ProfileBegin;
416 objectData.ProfileEnd = this.primData.ProfileEnd;
417 objectData.Scale = this.primData.Scale;
418 objectData.PathCurve = this.primData.PathCurve;
419 objectData.ProfileCurve = this.primData.ProfileCurve;
420 objectData.ParentID = this.primData.ParentID;
421 objectData.ProfileHollow = this.primData.ProfileHollow;
422 objectData.PathRadiusOffset = this.primData.PathRadiusOffset;
423 objectData.PathRevolutions = this.primData.PathRevolutions;
424 objectData.PathTaperX = this.primData.PathTaperX;
425 objectData.PathTaperY = this.primData.PathTaperY;
426 objectData.PathTwist = this.primData.PathTwist;
427 objectData.PathTwistBegin = this.primData.PathTwistBegin;
428 }
429
430 #endregion
431 protected ObjectUpdatePacket.ObjectDataBlock CreateUpdateBlock()
432 {
433 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock();
434 this.SetDefaultPacketValues(objupdate);
435 objupdate.UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456;
436 this.SetPacketShapeData(objupdate);
437 byte[] pb = this.Pos.GetBytes();
438 Array.Copy(pb, 0, objupdate.ObjectData, 0, pb.Length);
439 return objupdate;
440 }
441
442 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedBlock()
443 {
444 uint ID = this.localid;
445 byte[] bytes = new byte[60];
446
447 int i = 0;
448 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
449 dat.TextureEntry = new byte[0];
450 bytes[i++] = (byte)(ID % 256);
451 bytes[i++] = (byte)((ID >> 8) % 256);
452 bytes[i++] = (byte)((ID >> 16) % 256);
453 bytes[i++] = (byte)((ID >> 24) % 256);
454 bytes[i++] = 0;
455 bytes[i++] = 0;
456
457 LLVector3 lPos;
458 Axiom.MathLib.Quaternion lRot;
459 if (this._physActor != null && this.physicsEnabled)
460 {
461 PhysicsVector pPos = this._physActor.Position;
462 lPos = new LLVector3(pPos.X, pPos.Y, pPos.Z);
463 lRot = this._physActor.Orientation;
464 }
465 else
466 {
467 lPos = this.Pos;
468 lRot = this.rotation;
469 }
470 byte[] pb = lPos.GetBytes();
471 Array.Copy(pb, 0, bytes, i, pb.Length);
472 i += 12;
473 ushort ac = 32767;
474
475 //vel
476 bytes[i++] = (byte)(ac % 256);
477 bytes[i++] = (byte)((ac >> 8) % 256);
478 bytes[i++] = (byte)(ac % 256);
479 bytes[i++] = (byte)((ac >> 8) % 256);
480 bytes[i++] = (byte)(ac % 256);
481 bytes[i++] = (byte)((ac >> 8) % 256);
482
483 //accel
484 bytes[i++] = (byte)(ac % 256);
485 bytes[i++] = (byte)((ac >> 8) % 256);
486 bytes[i++] = (byte)(ac % 256);
487 bytes[i++] = (byte)((ac >> 8) % 256);
488 bytes[i++] = (byte)(ac % 256);
489 bytes[i++] = (byte)((ac >> 8) % 256);
490
491 ushort rw, rx, ry, rz;
492 rw = (ushort)(32768 * (lRot.w + 1));
493 rx = (ushort)(32768 * (lRot.x + 1));
494 ry = (ushort)(32768 * (lRot.y + 1));
495 rz = (ushort)(32768 * (lRot.z + 1));
496
497 //rot
498 bytes[i++] = (byte)(rx % 256);
499 bytes[i++] = (byte)((rx >> 8) % 256);
500 bytes[i++] = (byte)(ry % 256);
501 bytes[i++] = (byte)((ry >> 8) % 256);
502 bytes[i++] = (byte)(rz % 256);
503 bytes[i++] = (byte)((rz >> 8) % 256);
504 bytes[i++] = (byte)(rw % 256);
505 bytes[i++] = (byte)((rw >> 8) % 256);
506
507 //rotation vel
508 bytes[i++] = (byte)(ac % 256);
509 bytes[i++] = (byte)((ac >> 8) % 256);
510 bytes[i++] = (byte)(ac % 256);
511 bytes[i++] = (byte)((ac >> 8) % 256);
512 bytes[i++] = (byte)(ac % 256);
513 bytes[i++] = (byte)((ac >> 8) % 256);
514
515 dat.Data = bytes;
516 return dat;
517 }
518 }
519}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/SceneObject.cs b/OpenSim/OpenSim.RegionServer/Simulator/SceneObject.cs
deleted file mode 100644
index ce2b50d..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/SceneObject.cs
+++ /dev/null
@@ -1,102 +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 OpenSim.RegionServer.Types;
32using libsecondlife;
33using libsecondlife.Packets;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Physics.Manager;
36using OpenSim.Framework.Types;
37using OpenSim.Framework.Inventory;
38using OpenSim.RegionServer.Client;
39
40namespace OpenSim.RegionServer.Simulator
41{
42 public class SceneObject : Entity
43 {
44 private Dictionary<LLUUID, Primitive2> ChildPrimitives = new Dictionary<LLUUID, Primitive2>();
45
46 public SceneObject()
47 {
48
49 }
50
51 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID)
52 {
53 }
54
55 public void CreateFromBytes(byte[] data)
56 {
57
58 }
59
60 public override void update()
61 {
62
63 }
64
65 public override void BackUp()
66 {
67
68 }
69
70 public void GetProperites(ClientView client)
71 {
72 /*
73 ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
74 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
75 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
76 proper.ObjectData[0].ItemID = LLUUID.Zero;
77 proper.ObjectData[0].CreationDate = (ulong)this.primData.CreationDate;
78 proper.ObjectData[0].CreatorID = this.primData.OwnerID;
79 proper.ObjectData[0].FolderID = LLUUID.Zero;
80 proper.ObjectData[0].FromTaskID = LLUUID.Zero;
81 proper.ObjectData[0].GroupID = LLUUID.Zero;
82 proper.ObjectData[0].InventorySerial = 0;
83 proper.ObjectData[0].LastOwnerID = LLUUID.Zero;
84 proper.ObjectData[0].ObjectID = this.uuid;
85 proper.ObjectData[0].OwnerID = primData.OwnerID;
86 proper.ObjectData[0].TouchName = new byte[0];
87 proper.ObjectData[0].TextureID = new byte[0];
88 proper.ObjectData[0].SitName = new byte[0];
89 proper.ObjectData[0].Name = new byte[0];
90 proper.ObjectData[0].Description = new byte[0];
91 proper.ObjectData[0].OwnerMask = this.primData.OwnerMask;
92 proper.ObjectData[0].NextOwnerMask = this.primData.NextOwnerMask;
93 proper.ObjectData[0].GroupMask = this.primData.GroupMask;
94 proper.ObjectData[0].EveryoneMask = this.primData.EveryoneMask;
95 proper.ObjectData[0].BaseMask = this.primData.BaseMask;
96
97 client.OutPacket(proper);
98 * */
99 }
100
101 }
102}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/World.PacketHandlers.cs b/OpenSim/OpenSim.RegionServer/Simulator/World.PacketHandlers.cs
deleted file mode 100644
index 2c5a05f..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/World.PacketHandlers.cs
+++ /dev/null
@@ -1,449 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32using libsecondlife.Packets;
33using OpenSim.Physics.Manager;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36using OpenSim.Framework.Terrain;
37using OpenSim.Framework.Inventory;
38using OpenSim.Framework.Utilities;
39using OpenSim.RegionServer.Assets;
40using OpenSim.RegionServer.Client;
41
42namespace OpenSim.RegionServer.Simulator
43{
44 public partial class World
45 {
46 public void ModifyTerrain(byte action, float north, float west)
47 {
48 switch (action)
49 {
50 case 1:
51 // raise terrain
52 Terrain.raise(north, west, 10.0, 0.001);
53 RegenerateTerrain(true, (int)north, (int)west);
54 break;
55 case 2:
56 //lower terrain
57 Terrain.lower(north, west, 10.0, 0.001);
58 RegenerateTerrain(true, (int)north, (int)west);
59 break;
60 }
61 return;
62 }
63
64 public void SimChat(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
65 {
66 foreach (ClientView client in m_clientThreads.Values)
67 {
68 // int dis = Util.fast_distance2d((int)(client.ClientAvatar.Pos.X - simClient.ClientAvatar.Pos.X), (int)(client.ClientAvatar.Pos.Y - simClient.ClientAvatar.Pos.Y));
69 int dis = (int)client.ClientAvatar.Pos.GetDistanceTo(fromPos);
70
71 switch (type)
72 {
73 case 0: // Whisper
74 if ((dis < 10) && (dis > -10))
75 {
76 //should change so the message is sent through the avatar rather than direct to the ClientView
77 client.SendChatMessage(message, type, fromPos, fromName, fromAgentID);
78 }
79 break;
80 case 1: // Say
81 if ((dis < 30) && (dis > -30))
82 {
83 client.SendChatMessage(message, type, fromPos, fromName, fromAgentID);
84 }
85 break;
86 case 2: // Shout
87 if ((dis < 100) && (dis > -100))
88 {
89 client.SendChatMessage(message, type, fromPos, fromName, fromAgentID);
90 }
91 break;
92
93 case 0xff: // Broadcast
94 client.SendChatMessage(message, type, fromPos, fromName, fromAgentID);
95 break;
96 }
97
98 }
99 }
100
101 public void RezObject(AssetBase primAsset, LLVector3 pos)
102 {
103 PrimData primd = new PrimData(primAsset.Data);
104 Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this);
105 nPrim.CreateFromStorage(primd, pos, this._primCount, true);
106 this.Entities.Add(nPrim.uuid, nPrim);
107 this._primCount++;
108 }
109
110 public void DeRezObject(Packet packet, ClientView simClient)
111 {
112 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)packet;
113
114 //Needs to delete object from physics at a later date
115 if (DeRezPacket.AgentBlock.DestinationID == LLUUID.Zero)
116 {
117 //currently following code not used (or don't know of any case of destination being zero
118 libsecondlife.LLUUID[] DeRezEnts;
119 DeRezEnts = new libsecondlife.LLUUID[DeRezPacket.ObjectData.Length];
120 int i = 0;
121 foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
122 {
123
124 //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LocalID:" + Data.ObjectLocalID.ToString());
125 foreach (Entity ent in this.Entities.Values)
126 {
127 if (ent.localid == Data.ObjectLocalID)
128 {
129 DeRezEnts[i++] = ent.uuid;
130 this.localStorage.RemovePrim(ent.uuid);
131 KillObjectPacket kill = new KillObjectPacket();
132 kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
133 kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock();
134 kill.ObjectData[0].ID = ent.localid;
135 foreach (ClientView client in m_clientThreads.Values)
136 {
137 client.OutPacket(kill);
138 }
139 //Uncommenting this means an old UUID will be re-used, thus crashing the asset server
140 //Uncomment when prim/object UUIDs are random or such
141 //2007-03-22 - Randomskk
142 //this._primCount--;
143 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Deleted UUID " + ent.uuid);
144 }
145 }
146 }
147 foreach (libsecondlife.LLUUID uuid in DeRezEnts)
148 {
149 lock (Entities)
150 {
151 Entities.Remove(uuid);
152 }
153 }
154 }
155 else
156 {
157 foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData)
158 {
159 Entity selectedEnt = null;
160 //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LocalID:" + Data.ObjectLocalID.ToString());
161 foreach (Entity ent in this.Entities.Values)
162 {
163 if (ent.localid == Data.ObjectLocalID)
164 {
165 AssetBase primAsset = new AssetBase();
166 primAsset.FullID = LLUUID.Random();//DeRezPacket.AgentBlock.TransactionID.Combine(LLUUID.Zero); //should be combining with securesessionid
167 primAsset.InvType = 6;
168 primAsset.Type = 6;
169 primAsset.Name = "Prim";
170 primAsset.Description = "";
171 primAsset.Data = ((Primitive)ent).GetByteArray();
172 this._assetCache.AddAsset(primAsset);
173 this._inventoryCache.AddNewInventoryItem(simClient, DeRezPacket.AgentBlock.DestinationID, primAsset);
174 selectedEnt = ent;
175 break;
176 }
177 }
178 if (selectedEnt != null)
179 {
180 this.localStorage.RemovePrim(selectedEnt.uuid);
181 KillObjectPacket kill = new KillObjectPacket();
182 kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
183 kill.ObjectData[0] = new KillObjectPacket.ObjectDataBlock();
184 kill.ObjectData[0].ID = selectedEnt.localid;
185 foreach (ClientView client in m_clientThreads.Values)
186 {
187 client.OutPacket(kill);
188 }
189 lock (Entities)
190 {
191 Entities.Remove(selectedEnt.uuid);
192 }
193 }
194 }
195 }
196
197 }
198
199 public void SendAvatarsToClient(ClientView remoteClient)
200 {
201 foreach (ClientView client in m_clientThreads.Values)
202 {
203 if (client.AgentID != remoteClient.AgentID)
204 {
205 // ObjectUpdatePacket objupdate = client.ClientAvatar.CreateUpdatePacket();
206 // RemoteClient.OutPacket(objupdate);
207 client.ClientAvatar.SendUpdateToOtherClient(remoteClient.ClientAvatar);
208 client.ClientAvatar.SendAppearanceToOtherAgent(remoteClient.ClientAvatar);
209 }
210 }
211 }
212
213 public void LinkObjects(uint parentPrim, List<uint> childPrims)
214 {
215 Primitive parentprim = null;
216 foreach (Entity ent in Entities.Values)
217 {
218 if (ent.localid == parentPrim)
219 {
220 parentprim = (OpenSim.RegionServer.Simulator.Primitive)ent;
221
222 }
223 }
224
225 for (int i = 0; i < childPrims.Count; i++)
226 {
227 uint childId = childPrims[i];
228 foreach (Entity ent in Entities.Values)
229 {
230 if (ent.localid == childId)
231 {
232 ((OpenSim.RegionServer.Simulator.Primitive)ent).MakeParent(parentprim);
233 }
234 }
235 }
236
237 }
238
239 public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
240 {
241 foreach (Entity ent in Entities.Values)
242 {
243 if (ent.localid == primLocalID)
244 {
245 ((OpenSim.RegionServer.Simulator.Primitive)ent).UpdateShape(shapeBlock);
246 break;
247 }
248 }
249 }
250
251 public void SelectPrim(uint primLocalID, ClientView remoteClient)
252 {
253 foreach (Entity ent in Entities.Values)
254 {
255 if (ent.localid == primLocalID)
256 {
257 ((OpenSim.RegionServer.Simulator.Primitive)ent).GetProperites(remoteClient);
258 break;
259 }
260 }
261 }
262
263 public void UpdatePrimFlags(uint localID, Packet packet, ClientView remoteClient)
264 {
265 foreach (Entity ent in Entities.Values)
266 {
267 if (ent.localid == localID)
268 {
269 ((OpenSim.RegionServer.Simulator.Primitive)ent).UpdateObjectFlags((ObjectFlagUpdatePacket) packet);
270 break;
271 }
272 }
273 }
274
275 public void UpdatePrimTexture(uint localID, byte[] texture, ClientView remoteClient)
276 {
277 foreach (Entity ent in Entities.Values)
278 {
279 if (ent.localid == localID)
280 {
281 ((OpenSim.RegionServer.Simulator.Primitive)ent).UpdateTexture(texture);
282 break;
283 }
284 }
285 }
286
287 public void UpdatePrimPosition(uint localID, LLVector3 pos, ClientView remoteClient)
288 {
289 foreach (Entity ent in Entities.Values)
290 {
291 if (ent.localid == localID)
292 {
293 ((OpenSim.RegionServer.Simulator.Primitive)ent).UpdatePosition(pos);
294 break;
295 }
296 }
297 }
298
299 public void UpdatePrimRotation(uint localID, LLQuaternion rot, ClientView remoteClient)
300 {
301 foreach (Entity ent in Entities.Values)
302 {
303 if (ent.localid == localID)
304 {
305 ent.rotation = new Axiom.MathLib.Quaternion(rot.W, rot.X, rot.Y, rot.Z);
306 ((OpenSim.RegionServer.Simulator.Primitive)ent).UpdateFlag = true;
307 break;
308 }
309 }
310 }
311
312 public void UpdatePrimScale(uint localID, LLVector3 scale, ClientView remoteClient)
313 {
314 foreach (Entity ent in Entities.Values)
315 {
316 if (ent.localid == localID)
317 {
318 ((OpenSim.RegionServer.Simulator.Primitive)ent).Scale = scale;
319 break;
320 }
321 }
322 }
323 #region Parcel Packet Handlers
324 void ParcelPropertiesRequest(int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, ClientView remote_client)
325 {
326 //Get the parcels within the bounds
327 List<OpenSim.RegionServer.Simulator.Parcel> temp = new List<OpenSim.RegionServer.Simulator.Parcel>();
328 int x, y, i;
329 int inc_x = end_x - start_x;
330 int inc_y = end_y - start_y;
331 for(x = 0; x < inc_x; x++)
332 {
333 for(y = 0; y < inc_y; y++)
334 {
335 OpenSim.RegionServer.Simulator.Parcel currentParcel = parcelManager.getParcel(start_x + x, start_y + y);
336 if(!temp.Contains(currentParcel))
337 {
338 currentParcel.
339 forceUpdateParcelInfo();
340 temp.Add(currentParcel);
341 }
342 }
343 }
344
345 int requestResult = OpenSim.RegionServer.Simulator.ParcelManager.PARCEL_RESULT_ONE_PARCEL;
346 if (temp.Count > 1)
347 {
348 requestResult = OpenSim.RegionServer.Simulator.ParcelManager.PARCEL_RESULT_MULTIPLE_PARCELS;
349 }
350
351 for (i = 0; i < temp.Count; i++)
352 {
353 temp[i].sendParcelProperties(sequence_id, snap_selection, requestResult, remote_client);
354 }
355
356
357 parcelManager.sendParcelOverlay(remote_client);
358 }
359
360 void ParcelDivideRequest(int west, int south, int east, int north, ClientView remote_client)
361 {
362 parcelManager.subdivide(west, south, east, north, remote_client.AgentID);
363 }
364 void ParcelJoinRequest(int west, int south, int east, int north, ClientView remote_client)
365 {
366 parcelManager.join(west, south, east, north, remote_client.AgentID);
367 }
368 void ParcelPropertiesUpdateRequest(ParcelPropertiesUpdatePacket packet, ClientView remote_client)
369 {
370 if (parcelManager.parcelList.ContainsKey(packet.ParcelData.LocalID))
371 {
372 parcelManager.parcelList[packet.ParcelData.LocalID].updateParcelProperties(packet, remote_client);
373 }
374 }
375 #endregion
376
377 /*
378 public void RequestMapBlock(ClientView simClient, int minX, int minY, int maxX, int maxY)
379 {
380 System.Text.Encoding _enc = System.Text.Encoding.ASCII;
381 if (((m_regInfo.RegionLocX > minX) && (m_regInfo.RegionLocX < maxX)) && ((m_regInfo.RegionLocY > minY) && (m_regInfo.RegionLocY < maxY)))
382 {
383 MapBlockReplyPacket mapReply = new MapBlockReplyPacket();
384 mapReply.AgentData.AgentID = simClient.AgentID;
385 mapReply.AgentData.Flags = 0;
386 mapReply.Data = new MapBlockReplyPacket.DataBlock[1];
387 mapReply.Data[0] = new MapBlockReplyPacket.DataBlock();
388 mapReply.Data[0].MapImageID = new LLUUID("00000000-0000-0000-9999-000000000007");
389 mapReply.Data[0].X = (ushort)m_regInfo.RegionLocX;
390 mapReply.Data[0].Y = (ushort)m_regInfo.RegionLocY;
391 mapReply.Data[0].WaterHeight = (byte)m_regInfo.RegionWaterHeight;
392 mapReply.Data[0].Name = _enc.GetBytes(this.m_regionName);
393 mapReply.Data[0].RegionFlags = 72458694;
394 mapReply.Data[0].Access = 13;
395 mapReply.Data[0].Agents = 1; //should send number of clients connected
396 simClient.OutPacket(mapReply);
397 }
398 }
399 public bool RezObjectHandler(ClientView simClient, Packet packet)
400 {
401 RezObjectPacket rezPacket = (RezObjectPacket)packet;
402 AgentInventory inven = this._inventoryCache.GetAgentsInventory(simClient.AgentID);
403 if (inven != null)
404 {
405 if (inven.InventoryItems.ContainsKey(rezPacket.InventoryData.ItemID))
406 {
407 AssetBase asset = this._assetCache.GetAsset(inven.InventoryItems[rezPacket.InventoryData.ItemID].AssetID);
408 if (asset != null)
409 {
410 PrimData primd = new PrimData(asset.Data);
411 Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this);
412 nPrim.CreateFromStorage(primd, rezPacket.RezData.RayEnd, this._primCount, true);
413 this.Entities.Add(nPrim.uuid, nPrim);
414 this._primCount++;
415 this._inventoryCache.DeleteInventoryItem(simClient, rezPacket.InventoryData.ItemID);
416 }
417 }
418 }
419 return true;
420 }
421 public bool ModifyTerrain(ClientView simClient, Packet packet)
422 {
423 ModifyLandPacket modify = (ModifyLandPacket)packet;
424
425 switch (modify.ModifyBlock.Action)
426 {
427 case 1:
428 // raise terrain
429 if (modify.ParcelData.Length > 0)
430 {
431 Terrain.raise(modify.ParcelData[0].North, modify.ParcelData[0].West, 10.0, 0.1);
432 RegenerateTerrain(true, (int)modify.ParcelData[0].North, (int)modify.ParcelData[0].West);
433 }
434 break;
435 case 2:
436 //lower terrain
437 if (modify.ParcelData.Length > 0)
438 {
439 Terrain.lower(modify.ParcelData[0].North, modify.ParcelData[0].West, 10.0, 0.1);
440 RegenerateTerrain(true, (int)modify.ParcelData[0].North, (int)modify.ParcelData[0].West);
441 }
442 break;
443 }
444 return true;
445 }
446 */
447
448 }
449}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/World.Scripting.cs b/OpenSim/OpenSim.RegionServer/Simulator/World.Scripting.cs
deleted file mode 100644
index 747730c..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/World.Scripting.cs
+++ /dev/null
@@ -1,151 +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.RegionServer.Simulator
39{
40 public partial class World
41 {
42 private Dictionary<string, IScriptEngine> scriptEngines = new Dictionary<string, IScriptEngine>();
43
44 private void LoadScriptEngines()
45 {
46 this.LoadScriptPlugins();
47 }
48
49 public void LoadScriptPlugins()
50 {
51 string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "ScriptEngines");
52 string[] pluginFiles = Directory.GetFiles(path, "*.dll");
53
54
55 for (int i = 0; i < pluginFiles.Length; i++)
56 {
57 this.AddPlugin(pluginFiles[i]);
58 }
59 }
60
61 private void AddPlugin(string FileName)
62 {
63 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
64
65 foreach (Type pluginType in pluginAssembly.GetTypes())
66 {
67 if (pluginType.IsPublic)
68 {
69 if (!pluginType.IsAbstract)
70 {
71 Type typeInterface = pluginType.GetInterface("IScriptEngine", true);
72
73 if (typeInterface != null)
74 {
75 IScriptEngine plug = (IScriptEngine)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
76 plug.Init(this);
77 this.scriptEngines.Add(plug.GetName(), plug);
78
79 }
80
81 typeInterface = null;
82 }
83 }
84 }
85
86 pluginAssembly = null;
87 }
88
89 public void LoadScript(string scriptType, string scriptName, string script, Entity ent)
90 {
91 if(this.scriptEngines.ContainsKey(scriptType))
92 {
93 this.scriptEngines[scriptType].LoadScript(script, scriptName, ent.localid);
94 }
95 }
96
97 #region IScriptAPI Methods
98
99 public OSVector3 GetEntityPosition(uint localID)
100 {
101 OSVector3 res = new OSVector3();
102 // Console.WriteLine("script- getting entity " + localID + " position");
103 foreach (Entity entity in this.Entities.Values)
104 {
105 if (entity.localid == localID)
106 {
107 res.X = entity.Pos.X;
108 res.Y = entity.Pos.Y;
109 res.Z = entity.Pos.Z;
110 }
111 }
112 return res;
113 }
114
115 public void SetEntityPosition(uint localID, float x , float y, float z)
116 {
117 foreach (Entity entity in this.Entities.Values)
118 {
119 if (entity.localid == localID && entity is Primitive)
120 {
121 LLVector3 pos = entity.Pos;
122 pos.X = x;
123 pos.Y = y;
124 Primitive prim = entity as Primitive;
125 // Of course, we really should have asked the physEngine if this is possible, and if not, returned false.
126 prim.UpdatePosition(pos);
127 // Console.WriteLine("script- setting entity " + localID + " positon");
128 }
129 }
130
131 }
132
133 public uint GetRandomAvatarID()
134 {
135 //Console.WriteLine("script- getting random avatar id");
136 uint res = 0;
137 foreach (Entity entity in this.Entities.Values)
138 {
139 if (entity is Avatar)
140 {
141 res = entity.localid;
142 }
143 }
144 return res;
145 }
146
147 #endregion
148
149
150 }
151}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/World.cs b/OpenSim/OpenSim.RegionServer/Simulator/World.cs
deleted file mode 100644
index ac64c79..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/World.cs
+++ /dev/null
@@ -1,737 +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 libsecondlife;
30using libsecondlife.Packets;
31using System.Collections.Generic;
32using System.Text;
33using System.Reflection;
34using System.IO;
35using System.Threading;
36using OpenSim.Physics.Manager;
37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Types;
39using OpenSim.Framework.Terrain;
40using OpenSim.Framework.Inventory;
41using OpenSim.RegionServer.Assets;
42
43using OpenSim.RegionServer.Scripting;
44using OpenSim.Terrain;
45using OpenSim.Framework.Console;
46using OpenSim.RegionServer.Client;
47
48
49namespace OpenSim.RegionServer.Simulator
50{
51 public partial class World : WorldBase, ILocalStorageReceiver, IScriptAPI
52 {
53 public object LockPhysicsEngine = new object();
54 public Dictionary<libsecondlife.LLUUID, Avatar> Avatars;
55 public Dictionary<libsecondlife.LLUUID, Primitive> Prims;
56 //public ScriptEngine Scripts;
57 public uint _localNumber = 0;
58 private PhysicsScene phyScene;
59 private float timeStep = 0.1f;
60 public ILocalStorage localStorage;
61 private Random Rand = new Random();
62 private uint _primCount = 702000;
63 private int storageCount;
64 private Dictionary<LLUUID, ScriptHandler> m_scriptHandlers;
65 private Dictionary<string, ScriptFactory> m_scripts;
66 private Mutex updateLock;
67 public string m_datastore;
68 public OpenSim.RegionServer.Simulator.ParcelManager parcelManager;
69 public OpenSim.RegionServer.Estate.EstateManager estateManager;
70
71 #region Properties
72 public PhysicsScene PhysScene
73 {
74 set
75 {
76 this.phyScene = value;
77 }
78 get
79 {
80 return (this.phyScene);
81 }
82 }
83 #endregion
84
85 #region Constructors
86 /// <summary>
87 /// Creates a new World class, and a region to go with it.
88 /// </summary>
89 /// <param name="clientThreads">Dictionary to contain client threads</param>
90 /// <param name="regionHandle">Region Handle for this region</param>
91 /// <param name="regionName">Region Name for this region</param>
92 public World(Dictionary<uint, ClientView> clientThreads, RegionInfo regInfo, ulong regionHandle, string regionName)
93 {
94 try
95 {
96 updateLock = new Mutex(false);
97 m_clientThreads = clientThreads;
98 m_regionHandle = regionHandle;
99 m_regionName = regionName;
100 m_regInfo = regInfo;
101
102 m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>();
103 m_scripts = new Dictionary<string, ScriptFactory>();
104
105 MainConsole.Instance.Notice("World.cs - creating new entitities instance");
106 Entities = new Dictionary<libsecondlife.LLUUID, Entity>();
107 Avatars = new Dictionary<LLUUID, Avatar>();
108 Prims = new Dictionary<LLUUID, Primitive>();
109
110 MainConsole.Instance.Notice("World.cs - creating LandMap");
111 TerrainManager = new TerrainManager(new SecondLife());
112 Terrain = new TerrainEngine();
113 Avatar.SetupTemplate("avatar-texture.dat");
114 // MainConsole.Instance.WriteLine("World.cs - Creating script engine instance");
115 // Initialise this only after the world has loaded
116 // Scripts = new ScriptEngine(this);
117 Avatar.LoadAnims();
118 this.SetDefaultScripts();
119 this.LoadScriptEngines();
120
121 }
122 catch (Exception e)
123 {
124 OpenSim.Framework.Console.MainConsole.Instance.Error("World.cs: Constructor failed with exception " + e.ToString());
125 }
126 }
127 #endregion
128
129 #region Script Methods
130 /// <summary>
131 /// Loads a new script into the specified entity
132 /// </summary>
133 /// <param name="entity">Entity to be scripted</param>
134 /// <param name="script">The script to load</param>
135 public void AddScript(Entity entity, Script script)
136 {
137 try
138 {
139 ScriptHandler scriptHandler = new ScriptHandler(script, entity, this);
140 m_scriptHandlers.Add(scriptHandler.ScriptId, scriptHandler);
141 }
142 catch (Exception e)
143 {
144 MainConsole.Instance.Warn("World.cs: AddScript() - Failed with exception " + e.ToString());
145 }
146 }
147
148 /// <summary>
149 /// Loads a new script into the specified entity, using a script loaded from a string.
150 /// </summary>
151 /// <param name="entity">The entity to be scripted</param>
152 /// <param name="scriptData">The string containing the script</param>
153 public void AddScript(Entity entity, string scriptData)
154 {
155 try
156 {
157 int scriptstart = 0;
158 int scriptend = 0;
159 string substring;
160 scriptstart = scriptData.LastIndexOf("<Script>");
161 scriptend = scriptData.LastIndexOf("</Script>");
162 substring = scriptData.Substring(scriptstart + 8, scriptend - scriptstart - 8);
163 substring = substring.Trim();
164 //Console.WriteLine("searching for script to add: " + substring);
165
166 ScriptFactory scriptFactory;
167 //Console.WriteLine("script string is " + substring);
168 if (substring.StartsWith("<ScriptEngine:"))
169 {
170 string substring1 = "";
171 string script = "";
172 // Console.WriteLine("searching for script engine");
173 substring1 = substring.Remove(0, 14);
174 int dev = substring1.IndexOf(',');
175 string sEngine = substring1.Substring(0, dev);
176 substring1 = substring1.Remove(0, dev + 1);
177 int end = substring1.IndexOf('>');
178 string sName = substring1.Substring(0, end);
179 //Console.WriteLine(" script info : " + sEngine + " , " + sName);
180 int startscript = substring.IndexOf('>');
181 script = substring.Remove(0, startscript + 1);
182 // Console.WriteLine("script data is " + script);
183 if (this.scriptEngines.ContainsKey(sEngine))
184 {
185 this.scriptEngines[sEngine].LoadScript(script, sName, entity.localid);
186 }
187 }
188 else if (this.m_scripts.TryGetValue(substring, out scriptFactory))
189 {
190 //Console.WriteLine("added script");
191 this.AddScript(entity, scriptFactory());
192 }
193 }
194 catch (Exception e)
195 {
196 MainConsole.Instance.Warn("World.cs: AddScript() - Failed with exception " + e.ToString());
197 }
198 }
199
200 #endregion
201
202 #region Update Methods
203 /// <summary>
204 /// Performs per-frame updates on the world, this should be the central world loop
205 /// </summary>
206 public override void Update()
207 {
208 updateLock.WaitOne();
209 try
210 {
211 if (this.phyScene.IsThreaded)
212 {
213 this.phyScene.GetResults();
214
215 }
216
217 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
218 {
219 Entities[UUID].addForces();
220 }
221
222 lock (this.LockPhysicsEngine)
223 {
224 this.phyScene.Simulate(timeStep);
225 }
226
227 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
228 {
229 Entities[UUID].update();
230 }
231
232 foreach (ScriptHandler scriptHandler in m_scriptHandlers.Values)
233 {
234 scriptHandler.OnFrame();
235 }
236 foreach (IScriptEngine scripteng in this.scriptEngines.Values)
237 {
238 scripteng.OnFrame();
239 }
240 //backup world data
241 this.storageCount++;
242 if (storageCount > 1200) //set to how often you want to backup
243 {
244 this.Backup();
245 storageCount = 0;
246 }
247 }
248 catch (Exception e)
249 {
250 MainConsole.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString());
251 }
252 updateLock.ReleaseMutex();
253 }
254
255 public bool Backup()
256 {
257 try
258 {
259 // Terrain backup routines
260 if (Terrain.tainted > 0)
261 {
262 Terrain.tainted = 0;
263 MainConsole.Instance.Notice("World.cs: Backup() - Terrain tainted, saving.");
264 localStorage.SaveMap(Terrain.getHeights1D());
265 MainConsole.Instance.Notice("World.cs: Backup() - Rebuilding world map image.");
266 Terrain.exportImage("map_" + m_regInfo.RegionName.ToLower() + ".png", "defaultstripe.png");
267 MainConsole.Instance.Notice("World.cs: Backup() - Terrain saved, informing Physics.");
268 phyScene.SetTerrain(Terrain.getHeights1D());
269
270 // Needs optimising to just send patches which have changed.
271 MainConsole.Instance.Notice("World.cs: Backup() - Terrain changed, informing Clients.");
272 foreach (ClientView client in m_clientThreads.Values)
273 {
274 this.SendLayerData(client);
275 }
276 }
277
278 // Primitive backup routines -- should only do if there's been a change.
279 MainConsole.Instance.Notice("World.cs: Backup() - Backing up Primitives");
280 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
281 {
282 Entities[UUID].BackUp();
283 }
284
285
286 //Parcel backup routines. Yay!
287 ParcelData[] parcels = new ParcelData[parcelManager.parcelList.Count];
288 int i = 0;
289 foreach(OpenSim.RegionServer.Simulator.Parcel parcel in parcelManager.parcelList.Values)
290 {
291 parcels[i] = parcel.parcelData;
292 i++;
293 }
294 localStorage.SaveParcels(parcels);
295
296
297 // Backup successful
298 return true;
299 }
300 catch (Exception e)
301 {
302 // Backup failed
303 OpenSim.Framework.Console.MainConsole.Instance.Error("World.cs: Backup() - Backup Failed with exception " + e.ToString());
304 return false;
305 }
306 }
307 #endregion
308
309 #region Setup Methods
310 /// <summary>
311 /// Loads a new storage subsystem from a named library
312 /// </summary>
313 /// <param name="dllName">Storage Library</param>
314 /// <returns>Successful or not</returns>
315 public bool LoadStorageDLL(string dllName)
316 {
317 try
318 {
319 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
320 ILocalStorage store = null;
321
322 foreach (Type pluginType in pluginAssembly.GetTypes())
323 {
324 if (pluginType.IsPublic)
325 {
326 if (!pluginType.IsAbstract)
327 {
328 Type typeInterface = pluginType.GetInterface("ILocalStorage", true);
329
330 if (typeInterface != null)
331 {
332 ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
333 store = plug;
334
335 store.Initialise(this.m_datastore);
336 break;
337 }
338
339 typeInterface = null;
340 }
341 }
342 }
343 pluginAssembly = null;
344 this.localStorage = store;
345 return (store == null);
346 }
347 catch (Exception e)
348 {
349 MainConsole.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString());
350 return false;
351 }
352 }
353
354 public void SetDefaultScripts()
355 {
356 this.m_scripts.Add("FollowRandomAvatar", delegate()
357 {
358 return new OpenSim.RegionServer.Scripting.FollowRandomAvatar();
359 });
360 }
361
362 #endregion
363
364 #region Regenerate Terrain
365
366 /// <summary>
367 /// Rebuilds the terrain using a procedural algorithm
368 /// </summary>
369 public void RegenerateTerrain()
370 {
371 try
372 {
373 Terrain.hills();
374
375 lock (this.LockPhysicsEngine)
376 {
377 this.phyScene.SetTerrain(Terrain.getHeights1D());
378 }
379 this.localStorage.SaveMap(this.Terrain.getHeights1D());
380
381 foreach (ClientView client in m_clientThreads.Values)
382 {
383 this.SendLayerData(client);
384 }
385
386 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
387 {
388 Entities[UUID].LandRenegerated();
389 }
390 }
391 catch (Exception e)
392 {
393 MainConsole.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
394 }
395 }
396
397 /// <summary>
398 /// Rebuilds the terrain using a 2D float array
399 /// </summary>
400 /// <param name="newMap">256,256 float array containing heights</param>
401 public void RegenerateTerrain(float[,] newMap)
402 {
403 try
404 {
405 this.Terrain.setHeights2D(newMap);
406 lock (this.LockPhysicsEngine)
407 {
408 this.phyScene.SetTerrain(this.Terrain.getHeights1D());
409 }
410 this.localStorage.SaveMap(this.Terrain.getHeights1D());
411
412 foreach (ClientView client in m_clientThreads.Values)
413 {
414 this.SendLayerData(client);
415 }
416
417 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
418 {
419 Entities[UUID].LandRenegerated();
420 }
421 }
422 catch (Exception e)
423 {
424 MainConsole.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
425 }
426 }
427
428 /// <summary>
429 /// Rebuilds the terrain assuming changes occured at a specified point[?]
430 /// </summary>
431 /// <param name="changes">???</param>
432 /// <param name="pointx">???</param>
433 /// <param name="pointy">???</param>
434 public void RegenerateTerrain(bool changes, int pointx, int pointy)
435 {
436 try
437 {
438 if (changes)
439 {
440 /* Dont save here, rely on tainting system instead */
441
442 foreach (ClientView client in m_clientThreads.Values)
443 {
444 this.SendLayerData(pointx, pointy, client);
445 }
446 }
447 }
448 catch (Exception e)
449 {
450 MainConsole.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
451 }
452 }
453
454 #endregion
455
456 #region Load Terrain
457 /// <summary>
458 /// Loads the World heightmap
459 /// </summary>
460 public override void LoadWorldMap()
461 {
462 try
463 {
464 float[] map = this.localStorage.LoadWorld();
465 if (map == null)
466 {
467 if (string.IsNullOrEmpty(this.m_regInfo.estateSettings.terrainFile))
468 {
469 Console.WriteLine("No default terrain, procedurally generating...");
470 this.Terrain.hills();
471
472 this.localStorage.SaveMap(this.Terrain.getHeights1D());
473 }
474 else
475 {
476 try
477 {
478 this.Terrain.loadFromFileF32(this.m_regInfo.estateSettings.terrainFile);
479 this.Terrain *= this.m_regInfo.estateSettings.terrainMultiplier;
480 }
481 catch
482 {
483 Console.WriteLine("Unable to load default terrain, procedurally generating instead...");
484 Terrain.hills();
485 }
486 this.localStorage.SaveMap(this.Terrain.getHeights1D());
487 }
488 }
489 else
490 {
491 this.Terrain.setHeights1D(map);
492 }
493 }
494 catch (Exception e)
495 {
496 MainConsole.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
497 }
498 }
499 #endregion
500
501 #region Primitives Methods
502
503 /// <summary>
504 /// Sends prims to a client
505 /// </summary>
506 /// <param name="RemoteClient">Client to send to</param>
507 public void GetInitialPrims(ClientView RemoteClient)
508 {
509 try
510 {
511 foreach (libsecondlife.LLUUID UUID in Entities.Keys)
512 {
513 if (Entities[UUID] is Primitive)
514 {
515 Primitive primitive = Entities[UUID] as Primitive;
516 primitive.UpdateClient(RemoteClient);
517 }
518 }
519 }
520 catch (Exception e)
521 {
522 MainConsole.Instance.Warn("World.cs: GetInitialPrims() - Failed with exception " + e.ToString());
523 }
524 }
525
526 /// <summary>
527 /// Loads the World's objects
528 /// </summary>
529 public void LoadPrimsFromStorage()
530 {
531 try
532 {
533 MainConsole.Instance.Notice("World.cs: LoadPrimsFromStorage() - Loading primitives");
534 this.localStorage.LoadPrimitives(this);
535 }
536 catch (Exception e)
537 {
538 MainConsole.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString());
539 }
540 }
541
542 /// <summary>
543 /// Loads a specific object from storage
544 /// </summary>
545 /// <param name="prim">The object to load</param>
546 public void PrimFromStorage(PrimData prim)
547 {
548 try
549 {
550 if (prim.LocalID >= this._primCount)
551 {
552 _primCount = prim.LocalID + 1;
553 }
554 MainConsole.Instance.Notice("World.cs: PrimFromStorage() - Reloading prim (localId " + prim.LocalID + " ) from storage");
555 Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this);
556 nPrim.CreateFromStorage(prim);
557 this.Entities.Add(nPrim.uuid, nPrim);
558 }
559 catch (Exception e)
560 {
561 MainConsole.Instance.Warn("World.cs: PrimFromStorage() - Failed with exception " + e.ToString());
562 }
563 }
564
565 public void AddNewPrim(Packet addPacket, ClientView agentClient)
566 {
567 AddNewPrim((ObjectAddPacket)addPacket, agentClient.AgentID);
568 }
569
570 public void AddNewPrim(ObjectAddPacket addPacket, LLUUID ownerID)
571 {
572 try
573 {
574 MainConsole.Instance.Notice("World.cs: AddNewPrim() - Creating new prim");
575 Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this);
576 prim.CreateFromPacket(addPacket, ownerID, this._primCount);
577 PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z);
578 PhysicsVector pSize = new PhysicsVector(0.255f, 0.255f, 0.255f);
579 if (OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying)
580 {
581 lock (this.LockPhysicsEngine)
582 {
583 prim.PhysActor = this.phyScene.AddPrim(pVec, pSize);
584 }
585 }
586
587 this.Entities.Add(prim.uuid, prim);
588 this._primCount++;
589 }
590 catch (Exception e)
591 {
592 MainConsole.Instance.Warn("World.cs: AddNewPrim() - Failed with exception " + e.ToString());
593 }
594 }
595
596 #endregion
597
598 #region Add/Remove Avatar Methods
599
600 public override Avatar AddViewerAgent(ClientView agentClient)
601 {
602 //register for events
603 agentClient.OnChatFromViewer += new ChatFromViewer(this.SimChat);
604 agentClient.OnRezObject += new RezObject(this.RezObject);
605 agentClient.OnModifyTerrain += new ModifyTerrain(this.ModifyTerrain);
606 agentClient.OnRegionHandShakeReply += new ClientView.GenericCall(this.SendLayerData);
607 agentClient.OnRequestWearables += new ClientView.GenericCall(this.GetInitialPrims);
608 agentClient.OnRequestAvatarsData += new ClientView.GenericCall(this.SendAvatarsToClient);
609 agentClient.OnLinkObjects += new LinkObjects(this.LinkObjects);
610 agentClient.OnAddPrim += new ClientView.GenericCall4(this.AddNewPrim);
611 agentClient.OnUpdatePrimShape += new ClientView.UpdateShape(this.UpdatePrimShape);
612
613 agentClient.OnObjectSelect += new ClientView.ObjectSelect(this.SelectPrim);
614 agentClient.OnUpdatePrimFlags += new ClientView.UpdatePrimFlags(this.UpdatePrimFlags);
615 agentClient.OnUpdatePrimTexture += new ClientView.UpdatePrimTexture(this.UpdatePrimTexture);
616 agentClient.OnUpdatePrimPosition += new ClientView.UpdatePrimVector(this.UpdatePrimPosition);
617 agentClient.OnUpdatePrimRotation += new ClientView.UpdatePrimRotation(this.UpdatePrimRotation);
618 agentClient.OnUpdatePrimScale += new ClientView.UpdatePrimVector(this.UpdatePrimScale);
619 agentClient.OnDeRezObject += new ClientView.GenericCall4(this.DeRezObject);
620
621 agentClient.OnParcelPropertiesRequest += new OpenSim.RegionServer.Simulator.ParcelPropertiesRequest(ParcelPropertiesRequest);
622 agentClient.OnParcelDivideRequest += new OpenSim.RegionServer.Simulator.ParcelDivideRequest(ParcelDivideRequest);
623 agentClient.OnParcelJoinRequest+=new OpenSim.RegionServer.Simulator.ParcelJoinRequest(ParcelJoinRequest);
624 agentClient.OnParcelPropertiesUpdateRequest += new OpenSim.RegionServer.Simulator.ParcelPropertiesUpdateRequest(ParcelPropertiesUpdateRequest);
625
626 Avatar newAvatar = null;
627 try
628 {
629 MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
630 newAvatar = new Avatar(agentClient, this);
631 MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Adding new avatar to world");
632 MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Starting RegionHandshake ");
633 estateManager.sendRegionHandshake(newAvatar.ControllingClient);
634
635 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
636 lock (this.LockPhysicsEngine)
637 {
638 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec);
639 }
640
641
642 lock (Entities)
643 {
644 if (!Entities.ContainsKey(agentClient.AgentID))
645 {
646 this.Entities.Add(agentClient.AgentID, newAvatar);
647 }
648 else
649 {
650 Entities[agentClient.AgentID] = newAvatar;
651 }
652 }
653 lock (Avatars)
654 {
655 if (Avatars.ContainsKey(agentClient.AgentID))
656 {
657 Avatars[agentClient.AgentID] = newAvatar;
658 }
659 else
660 {
661 this.Avatars.Add(agentClient.AgentID, newAvatar);
662 }
663 }
664 }
665 catch (Exception e)
666 {
667 MainConsole.Instance.Warn("World.cs: AddViewerAgent() - Failed with exception " + e.ToString());
668 }
669 return newAvatar;
670 }
671
672
673
674
675
676
677
678 public override void RemoveViewerAgent(ClientView agentClient)
679 {
680 try
681 {
682 lock (Entities)
683 {
684 Entities.Remove(agentClient.AgentID);
685 }
686 lock (Avatars)
687 {
688 Avatars.Remove(agentClient.AgentID);
689 }
690 if (agentClient.ClientAvatar.PhysActor != null)
691 {
692 this.phyScene.RemoveAvatar(agentClient.ClientAvatar.PhysActor);
693 }
694 }
695 catch (Exception e)
696 {
697 MainConsole.Instance.Warn("World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString());
698 }
699 }
700 #endregion
701
702 #region Request Avatars List Methods
703 //The idea is to have a group of method that return a list of avatars meeting some requirement
704 // ie it could be all Avatars within a certain range of the calling prim/avatar.
705
706 public List<Avatar> RequestAvatarList()
707 {
708 List<Avatar> result = new List<Avatar>();
709
710 foreach (Avatar avatar in Avatars.Values)
711 {
712 result.Add(avatar);
713 }
714
715 return result;
716 }
717 #endregion
718
719 #region ShutDown
720 /// <summary>
721 /// Tidy before shutdown
722 /// </summary>
723 public override void Close()
724 {
725 try
726 {
727 this.localStorage.ShutDown();
728 }
729 catch (Exception e)
730 {
731 OpenSim.Framework.Console.MainConsole.Instance.Error("World.cs: Close() - Failed with exception " + e.ToString());
732 }
733 }
734 #endregion
735
736 }
737}
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/WorldBase.cs b/OpenSim/OpenSim.RegionServer/Simulator/WorldBase.cs
deleted file mode 100644
index c09ddd0..0000000
--- a/OpenSim/OpenSim.RegionServer/Simulator/WorldBase.cs
+++ /dev/null
@@ -1,205 +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 libsecondlife;
30using libsecondlife.Packets;
31using System.Collections.Generic;
32using System.Text;
33using System.Reflection;
34using System.IO;
35using System.Threading;
36using OpenSim.Physics.Manager;
37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Types;
39using OpenSim.Framework.Terrain;
40using OpenSim.Framework.Inventory;
41using OpenSim.RegionServer.Assets;
42using OpenSim.RegionServer.Scripting;
43using OpenSim.RegionServer.Client;
44using OpenSim.Terrain;
45using OpenSim.Framework.Console;
46
47namespace OpenSim.RegionServer.Simulator
48{
49 public class WorldBase
50 {
51 public Dictionary<libsecondlife.LLUUID, Entity> Entities;
52 protected Dictionary<uint, ClientView> m_clientThreads;
53 protected ulong m_regionHandle;
54 protected string m_regionName;
55 protected InventoryCache _inventoryCache;
56 protected AssetCache _assetCache;
57 public RegionInfo m_regInfo;
58
59 public TerrainEngine Terrain; //TODO: Replace TerrainManager with this.
60 protected libsecondlife.TerrainManager TerrainManager; // To be referenced via TerrainEngine
61
62 #region Properties
63 public InventoryCache InventoryCache
64 {
65 set
66 {
67 this._inventoryCache = value;
68 }
69 }
70
71 public AssetCache AssetCache
72 {
73 set
74 {
75 this._assetCache = value;
76 }
77 }
78 #endregion
79
80 #region Constructors
81 public WorldBase()
82 {
83
84 }
85 #endregion
86
87 #region Setup Methods
88 /// <summary>
89 /// Register Packet handler Methods with the packet server (which will register them with the SimClient)
90 /// </summary>
91 /// <param name="packetServer"></param>
92 public virtual void RegisterPacketHandlers(PacketServer packetServer)
93 {
94
95 }
96 #endregion
97
98 #region Update Methods
99 /// <summary>
100 /// Normally called once every frame/tick to let the world preform anything required (like running the physics simulation)
101 /// </summary>
102 public virtual void Update()
103 {
104
105 }
106 #endregion
107
108 #region Terrain Methods
109
110 /// <summary>
111 /// Loads the World heightmap
112 /// </summary>
113 public virtual void LoadWorldMap()
114 {
115
116 }
117
118 /// <summary>
119 /// Send the region heightmap to the client
120 /// </summary>
121 /// <param name="RemoteClient">Client to send to</param>
122 public virtual void SendLayerData(ClientView RemoteClient)
123 {
124 try
125 {
126 int[] patches = new int[4];
127
128 for (int y = 0; y < 16; y++)
129 {
130 for (int x = 0; x < 16; x = x + 4)
131 {
132 patches[0] = x + 0 + y * 16;
133 patches[1] = x + 1 + y * 16;
134 patches[2] = x + 2 + y * 16;
135 patches[3] = x + 3 + y * 16;
136
137 Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
138 RemoteClient.OutPacket(layerpack);
139 }
140 }
141 }
142 catch (Exception e)
143 {
144 MainConsole.Instance.Warn("World.cs: SendLayerData() - Failed with exception " + e.ToString());
145 }
146 }
147
148 /// <summary>
149 /// Sends a specified patch to a client
150 /// </summary>
151 /// <param name="px">Patch coordinate (x) 0..16</param>
152 /// <param name="py">Patch coordinate (y) 0..16</param>
153 /// <param name="RemoteClient">The client to send to</param>
154 public void SendLayerData(int px, int py, ClientView RemoteClient)
155 {
156 try
157 {
158 int[] patches = new int[1];
159 int patchx, patchy;
160 patchx = px / 16;
161 patchy = py / 16;
162
163 patches[0] = patchx + 0 + patchy * 16;
164
165 Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches);
166 RemoteClient.OutPacket(layerpack);
167 }
168 catch (Exception e)
169 {
170 MainConsole.Instance.Warn("World.cs: SendLayerData() - Failed with exception " + e.ToString());
171 }
172 }
173 #endregion
174
175 #region Add/Remove Agent/Avatar
176 /// <summary>
177 /// Add a new Agent's avatar
178 /// </summary>
179 /// <param name="agentClient"></param>
180 public virtual Avatar AddViewerAgent(ClientView agentClient)
181 {
182 return null;
183 }
184
185 /// <summary>
186 /// Remove a Agent's avatar
187 /// </summary>
188 /// <param name="agentClient"></param>
189 public virtual void RemoveViewerAgent(ClientView agentClient)
190 {
191
192 }
193 #endregion
194
195 #region Shutdown
196 /// <summary>
197 /// Tidy before shutdown
198 /// </summary>
199 public virtual void Close()
200 {
201
202 }
203 #endregion
204 }
205}
diff --git a/OpenSim/OpenSim.RegionServer/Types/Mesh.cs b/OpenSim/OpenSim.RegionServer/Types/Mesh.cs
deleted file mode 100644
index 4c8acab..0000000
--- a/OpenSim/OpenSim.RegionServer/Types/Mesh.cs
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.RegionServer.Types
33{
34 // TODO: This will need some performance tuning no doubt.
35 public class Mesh
36 {
37 public List<Triangle> mesh;
38
39 public Mesh()
40 {
41 mesh = new List<Triangle>();
42 }
43
44 public void AddTri(Triangle tri)
45 {
46 mesh.Add(tri);
47 }
48
49 public static Mesh operator +(Mesh a, Mesh b)
50 {
51 a.mesh.AddRange(b.mesh);
52 return a;
53 }
54 }
55}
diff --git a/OpenSim/OpenSim.RegionServer/Types/Triangle.cs b/OpenSim/OpenSim.RegionServer/Types/Triangle.cs
deleted file mode 100644
index ffb62e5..0000000
--- a/OpenSim/OpenSim.RegionServer/Types/Triangle.cs
+++ /dev/null
@@ -1,55 +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 Axiom.MathLib;
32
33namespace OpenSim.RegionServer.Types
34{
35 public class Triangle
36 {
37 Vector3 a;
38 Vector3 b;
39 Vector3 c;
40
41 public Triangle()
42 {
43 a = new Vector3();
44 b = new Vector3();
45 c = new Vector3();
46 }
47
48 public Triangle(Vector3 A, Vector3 B, Vector3 C)
49 {
50 a = A;
51 b = B;
52 c = C;
53 }
54 }
55}
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs
deleted file mode 100644
index ae62607..0000000
--- a/OpenSim/OpenSim.RegionServer/UDPServer.cs
+++ /dev/null
@@ -1,265 +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.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.Terrain;
41
42using OpenSim.Framework.Interfaces;
43using OpenSim.Framework.Types;
44using OpenSim.Framework.Console;
45
46using OpenSim.UserServer;
47
48using OpenSim.RegionServer.Simulator;
49using OpenSim.RegionServer.Assets;
50using OpenSim.RegionServer.CAPS;
51using OpenSim.RegionServer.Client;
52
53using Nwc.XmlRpc;
54using OpenSim.Servers;
55using OpenSim.GenericConfig;
56
57namespace OpenSim.RegionServer
58{
59 public delegate AuthenticateResponse AuthenticateSessionHandler(LLUUID sessionID, LLUUID agentID, uint circuitCode);
60
61 public class UDPServer : OpenSimNetworkHandler
62 {
63 protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
64 private Socket Server;
65 protected IPEndPoint ServerIncoming;
66 protected byte[] RecvBuffer = new byte[4096];
67 protected byte[] ZeroBuffer = new byte[8192];
68 protected IPEndPoint ipeSender;
69 protected EndPoint epSender;
70 protected AsyncCallback ReceivedData;
71 protected PacketServer _packetServer;
72
73 protected int listenPort;
74 protected Grid m_gridServers;
75 protected World m_localWorld;
76 protected AssetCache m_assetCache;
77 protected InventoryCache m_inventoryCache;
78 protected RegionInfo m_regionData;
79 protected bool m_sandbox = false;
80 protected bool user_accounts = false;
81 protected ConsoleBase m_console;
82 protected AuthenticateSessionsBase m_authenticateSessionsClass;
83
84 public AuthenticateSessionHandler AuthenticateHandler;
85
86 public PacketServer PacketServer
87 {
88 get
89 {
90 return _packetServer;
91 }
92 set
93 {
94 _packetServer = value;
95 }
96 }
97
98 public World LocalWorld
99 {
100 set
101 {
102 this.m_localWorld = value;
103 this._packetServer.LocalWorld = this.m_localWorld;
104 }
105 }
106
107 public UDPServer()
108 {
109 }
110
111 public UDPServer(int port, Grid gridServers, AssetCache assetCache, InventoryCache inventoryCache, RegionInfo _regionData, bool sandbox, bool accounts, ConsoleBase console, AuthenticateSessionsBase authenticateClass)
112 {
113 listenPort = port;
114 this.m_gridServers = gridServers;
115 this.m_assetCache = assetCache;
116 this.m_inventoryCache = inventoryCache;
117 this.m_regionData = _regionData;
118 this.m_sandbox = sandbox;
119 this.user_accounts = accounts;
120 this.m_console = console;
121 this.m_authenticateSessionsClass = authenticateClass;
122 this.CreatePacketServer();
123
124 //set up delegate for authenticate sessions
125 this.AuthenticateHandler = new AuthenticateSessionHandler(this.m_authenticateSessionsClass.AuthenticateSession);
126 }
127
128 protected virtual void CreatePacketServer()
129 {
130 PacketServer packetServer = new PacketServer(this);
131 }
132
133 protected virtual void OnReceivedData(IAsyncResult result)
134 {
135 ipeSender = new IPEndPoint(IPAddress.Any, 0);
136 epSender = (EndPoint)ipeSender;
137 Packet packet = null;
138
139 int numBytes;
140
141 try
142 {
143 numBytes = Server.EndReceiveFrom(result, ref epSender);
144 }
145 catch (SocketException e)
146 {
147 switch( e.SocketErrorCode )
148 {
149 case SocketError.NotConnected:
150 case SocketError.ConnectionReset:
151 // At this point, we should clear the client connection altogether.
152 // The app should hook a disconnect event into the UDPServer.
153 // But for now, just ignore it.
154 return;
155 default:
156 throw;
157 }
158 }
159
160 int packetEnd = numBytes - 1;
161
162 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
163
164 // do we already have a circuit for this endpoint
165 if (this.clientCircuits.ContainsKey(epSender))
166 {
167 //if so then send packet to the packetserver
168 this._packetServer.ClientInPacket(this.clientCircuits[epSender], packet);
169 }
170 else if (packet.Type == PacketType.UseCircuitCode)
171 {
172 // new client
173 this.AddNewClient(packet);
174 }
175 else
176 { // invalid client
177 Console.Error.WriteLine("UDPServer.cs:OnReceivedData() - WARNING: Got a packet from an invalid client - " + epSender.ToString());
178 }
179
180 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
181 }
182
183 protected virtual void AddNewClient(Packet packet)
184 {
185 UseCircuitCodePacket useCircuit = (UseCircuitCodePacket)packet;
186 this.clientCircuits.Add(epSender, useCircuit.CircuitCode.Code);
187 bool isChildAgent = false;
188
189 ClientView newuser = new ClientView(epSender, useCircuit, m_localWorld, _packetServer.ClientThreads, m_assetCache, m_gridServers.GridServer, this, m_inventoryCache, m_sandbox, isChildAgent, this.m_regionData, m_authenticateSessionsClass);
190 if ((this.m_gridServers.UserServer != null) && (user_accounts))
191 {
192 newuser.UserServer = this.m_gridServers.UserServer;
193 }
194 //OpenSimRoot.Instance.ClientThreads.Add(epSender, newuser);
195 this._packetServer.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser);
196 }
197
198 public void ServerListener()
199 {
200 m_console.Notice("UDPServer.cs:ServerListener() - Opening UDP socket on " + listenPort);
201
202 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
203 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
204
205 /// Add this new socket to the list of sockets that was opened by the application. When the application
206 /// closes, either gracefully or not, all sockets can be cleaned up. Right now I am not aware of any method
207 /// to get all of the sockets for a process within .NET, but if so, this process can be refactored, as
208 /// socket registration would not be neccessary.
209 SocketRegistry.Register(Server);
210
211 Server.Bind(ServerIncoming);
212
213 m_console.Notice("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
214
215 ipeSender = new IPEndPoint(IPAddress.Any, 0);
216 epSender = (EndPoint)ipeSender;
217 ReceivedData = new AsyncCallback(this.OnReceivedData);
218 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
219
220 m_console.Notice("UDPServer.cs:ServerListener() - Listening...");
221
222 }
223
224 public virtual void RegisterPacketServer(PacketServer server)
225 {
226 this._packetServer = server;
227 }
228
229 public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode)//EndPoint packetSender)
230 {
231 // find the endpoint for this circuit
232 EndPoint sendto = null;
233 foreach (KeyValuePair<EndPoint, uint> p in this.clientCircuits)
234 {
235 if (p.Value == circuitcode)
236 {
237 sendto = p.Key;
238 break;
239 }
240 }
241 if (sendto != null)
242 {
243 //we found the endpoint so send the packet to it
244 this.Server.SendTo(buffer, size, flags, sendto);
245 }
246 }
247
248 public virtual void RemoveClientCircuit(uint circuitcode)
249 {
250 foreach (KeyValuePair<EndPoint, uint> p in this.clientCircuits)
251 {
252 if (p.Value == circuitcode)
253 {
254 this.clientCircuits.Remove(p.Key);
255 break;
256 }
257 }
258 }
259
260 public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode)
261 {
262 return this.AuthenticateHandler(sessionID, agentID, circuitCode);
263 }
264 }
265}
diff --git a/OpenSim/OpenSim.RegionServer/VersionInfo.cs b/OpenSim/OpenSim.RegionServer/VersionInfo.cs
deleted file mode 100644
index 5e0eed6..0000000
--- a/OpenSim/OpenSim.RegionServer/VersionInfo.cs
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30
31namespace OpenSim.RegionServer
32{
33 /// <summary>
34 /// </summary>
35 public class VersionInfo
36 {
37 public static string Version = "0.2, SVN build - please use releng if you desire any form of support";
38 }
39}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/ClassInstance.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/ClassInstance.cs
deleted file mode 100644
index 1d93197..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/ClassInstance.cs
+++ /dev/null
@@ -1,45 +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 OpenSim.Scripting.EmbeddedJVM.Types;
32
33namespace OpenSim.Scripting.EmbeddedJVM
34{
35 public class ClassInstance : Object
36 {
37 public int size;
38 public Dictionary<string, BaseType> Fields = new Dictionary<string, BaseType>();
39
40 public ClassInstance()
41 {
42
43 }
44 }
45}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/ClassRecord.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/ClassRecord.cs
deleted file mode 100644
index f4ab1a2..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/ClassRecord.cs
+++ /dev/null
@@ -1,503 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.IO;
30using System.Collections.Generic;
31using System.Text;
32using OpenSim.Scripting.EmbeddedJVM.Types;
33
34namespace OpenSim.Scripting.EmbeddedJVM
35{
36 public class ClassRecord
37 {
38 private ushort _majorVersion;
39 private ushort _minorVersion;
40 private ushort _constantPoolCount;
41 private ushort _accessFlags;
42 private ushort _thisClass;
43 private ushort _supperClass;
44 private ushort _interfaceCount;
45 private ushort _fieldCount;
46 private ushort _methodCount;
47 //private ushort _attributeCount;
48 //private string _name;
49 public Dictionary<string, BaseType> StaticFields = new Dictionary<string, BaseType>();
50 public PoolClass mClass;
51
52 public List<PoolItem> _constantsPool = new List<PoolItem>();
53 private List<MethodInfo> _methodsList = new List<MethodInfo>();
54 private List<FieldInfo> _fieldList = new List<FieldInfo>();
55
56 public ClassRecord()
57 {
58
59 }
60
61 public ClassInstance CreateNewInstance()
62 {
63 return new ClassInstance();
64 }
65
66 public void LoadClassFromFile(string fileName)
67 {
68 Console.WriteLine("loading script " + fileName);
69 FileStream fs = File.OpenRead(fileName);
70 this.LoadClassFromBytes(ReadFully(fs));
71 fs.Close();
72 }
73
74 public void LoadClassFromBytes(byte[] data)
75 {
76 int i = 0;
77 i += 4;
78 _minorVersion = (ushort)((data[i++] << 8) + data[i++] );
79 _majorVersion = (ushort)((data[i++] << 8) + data[i++] );
80 _constantPoolCount = (ushort)((data[i++] << 8) + data[i++] );
81 // Console.WriteLine("there should be " + _constantPoolCount + " items in the pool");
82 for (int count = 0; count < _constantPoolCount -1 ; count++)
83 {
84 //read in the constant pool
85 byte pooltype = data[i++];
86 //Console.WriteLine("#" +count +": new constant type = " +pooltype);
87 //Console.WriteLine("start position is: " + i);
88 switch (pooltype)
89 {
90 case 1: //Utf8
91 ushort uLength = (ushort)((data[i++] << 8) + data[i++] );
92
93 // Console.WriteLine("new utf8 type, length is " + uLength);
94 PoolUtf8 utf8 = new PoolUtf8();
95 utf8.readValue(data, ref i, uLength);
96 this._constantsPool.Add(utf8);
97 break;
98 case 3: //Int
99 break;
100 case 7: //Class
101 PoolClass pClass = new PoolClass(this);
102 pClass.readValue(data, ref i);
103 this._constantsPool.Add(pClass);
104 break;
105 case 10: //Method
106 PoolMethodRef pMeth = new PoolMethodRef(this);
107 pMeth.readValue(data, ref i);
108 this._constantsPool.Add(pMeth);
109 break;
110 case 12: //NamedType
111 PoolNamedType pNamed = new PoolNamedType(this);
112 pNamed.readValue(data, ref i);
113 this._constantsPool.Add(pNamed);
114 break;
115 }
116 }
117
118 _accessFlags = (ushort)((data[i++] << 8) + data[i++] );
119 _thisClass = (ushort)((data[i++] << 8) + data[i++] );
120 _supperClass = (ushort)((data[i++] << 8) + data[i++] );
121
122 if (this._constantsPool[this._thisClass - 1] is PoolClass)
123 {
124 this.mClass = ((PoolClass)this._constantsPool[this._thisClass - 1]);
125 }
126
127 _interfaceCount = (ushort)((data[i++] << 8) + data[i++]);
128 //should now read in the info for each interface
129 _fieldCount = (ushort)((data[i++] << 8) + data[i++]);
130 //should now read in the info for each field
131 _methodCount = (ushort)((data[i++] << 8) + data[i++]);
132 for (int count = 0; count < _methodCount; count++)
133 {
134 MethodInfo methInf = new MethodInfo(this);
135 methInf.ReadData(data, ref i);
136 this._methodsList.Add(methInf);
137 }
138 }
139
140 public void AddMethodsToMemory(MethodMemory memory)
141 {
142 for (int count = 0; count < _methodCount; count++)
143 {
144 this._methodsList[count].AddMethodCode(memory);
145 }
146 }
147
148 public bool StartMethod(Thread thread, string methodName)
149 {
150 for (int count = 0; count < _methodCount; count++)
151 {
152 if (this._constantsPool[this._methodsList[count].NameIndex-1] is PoolUtf8)
153 {
154 if (((PoolUtf8)this._constantsPool[this._methodsList[count].NameIndex-1]).Value == methodName)
155 {
156 //Console.WriteLine("found method: " + ((PoolUtf8)this._constantsPool[this._methodsList[count].NameIndex - 1]).Value);
157 thread.SetPC(this._methodsList[count].CodePointer);
158 return true;
159 }
160 }
161 }
162 return false;
163 }
164
165 public void PrintToConsole()
166 {
167 Console.WriteLine("Class File:");
168 Console.WriteLine("Major version: " + _majorVersion);
169 Console.WriteLine("Minor version: " + _minorVersion);
170 Console.WriteLine("Pool size: " + _constantPoolCount);
171
172 for (int i = 0; i < _constantsPool.Count; i++)
173 {
174 this._constantsPool[i].Print();
175 }
176
177 Console.WriteLine("Access flags: " + _accessFlags);
178 Console.WriteLine("This class: " + _thisClass );
179 Console.WriteLine("Super class: " + _supperClass);
180
181 for (int count = 0; count < _methodCount; count++)
182 {
183 Console.WriteLine();
184 this._methodsList[count].Print();
185 }
186
187 Console.WriteLine("class name is " + this.mClass.Name.Value);
188 }
189
190 public static byte[] ReadFully(Stream stream)
191 {
192 byte[] buffer = new byte[1024];
193 using (MemoryStream ms = new MemoryStream())
194 {
195 while (true)
196 {
197 int read = stream.Read(buffer, 0, buffer.Length);
198 if (read <= 0)
199 return ms.ToArray();
200 ms.Write(buffer, 0, read);
201 }
202 }
203 }
204
205 #region nested classes
206 public class PoolItem
207 {
208 public virtual void Print()
209 {
210
211 }
212 }
213
214 public class PoolUtf8 : PoolItem
215 {
216 public string Value = "";
217
218 public void readValue(byte[] data,ref int pointer , int length)
219 {
220 for (int i = 0; i < length; i++)
221 {
222 int a =(int) data[pointer++];
223 if ((a & 0x80) == 0)
224 {
225 Value = Value + (char)a;
226 }
227 else if ((a & 0x20) == 0)
228 {
229 int b = (int) data[pointer++];
230 Value = Value + (char)(((a & 0x1f) << 6) + (b & 0x3f));
231 }
232 else
233 {
234 int b = (int)data[pointer++];
235 int c = (int)data[pointer++];
236 Value = Value + (char)(((a & 0xf) << 12) + ((b & 0x3f) << 6) + (c & 0x3f));
237 }
238 }
239 }
240
241 public override void Print()
242 {
243 Console.WriteLine("Utf8 type: " + Value);
244 }
245 }
246
247 private class PoolInt : PoolItem
248 {
249
250 }
251
252 public class PoolClass : PoolItem
253 {
254 //public string name = "";
255 public ushort namePointer = 0;
256 private ClassRecord parent;
257 public PoolUtf8 Name;
258
259 public PoolClass(ClassRecord paren)
260 {
261 parent = paren;
262 }
263
264 public void readValue(byte[] data, ref int pointer)
265 {
266 namePointer = (ushort)((data[pointer++] << 8) + data[pointer++] );
267 }
268
269 public override void Print()
270 {
271 this.Name = ((PoolUtf8)this.parent._constantsPool[namePointer - 1]);
272 Console.Write("Class type: " + namePointer);
273 Console.WriteLine(" // " + ((PoolUtf8)this.parent._constantsPool[namePointer - 1]).Value);
274
275 }
276 }
277
278 public class PoolMethodRef : PoolItem
279 {
280 public ushort classPointer = 0;
281 public ushort nameTypePointer = 0;
282 public PoolNamedType mNameType;
283 public PoolClass mClass;
284 private ClassRecord parent;
285
286 public PoolMethodRef(ClassRecord paren)
287 {
288 parent = paren;
289 }
290
291 public void readValue(byte[] data, ref int pointer)
292 {
293 classPointer = (ushort)((data[pointer++] << 8) + data[pointer++]);
294 nameTypePointer = (ushort)((data[pointer++] << 8) + data[pointer++]);
295 }
296
297 public override void Print()
298 {
299 this.mNameType = ((PoolNamedType)this.parent._constantsPool[nameTypePointer - 1]);
300 this.mClass = ((PoolClass)this.parent._constantsPool[classPointer - 1]);
301 Console.WriteLine("MethodRef type: " + classPointer + " , " + nameTypePointer);
302 }
303 }
304
305 public class PoolNamedType : PoolItem
306 {
307 public ushort namePointer = 0;
308 public ushort typePointer = 0;
309 private ClassRecord parent;
310 public PoolUtf8 Name;
311 public PoolUtf8 Type;
312
313 public PoolNamedType(ClassRecord paren)
314 {
315 parent = paren;
316 }
317
318 public void readValue(byte[] data, ref int pointer)
319 {
320 namePointer = (ushort)((data[pointer++] << 8) + data[pointer++] );
321 typePointer = (ushort)((data[pointer++] << 8) + data[pointer++] );
322 }
323
324 public override void Print()
325 {
326 Name = ((PoolUtf8)this.parent._constantsPool[namePointer-1]);
327 Type = ((PoolUtf8)this.parent._constantsPool[typePointer-1]);
328 Console.Write("Named type: " + namePointer + " , " + typePointer );
329 Console.WriteLine(" // "+ ((PoolUtf8)this.parent._constantsPool[namePointer-1]).Value);
330 }
331 }
332
333 //***********************
334 public class MethodInfo
335 {
336 public ushort AccessFlags = 0;
337 public ushort NameIndex = 0;
338 public string Name = "";
339 public ushort DescriptorIndex = 0;
340 public ushort AttributeCount = 0;
341 public List<MethodAttribute> Attributes = new List<MethodAttribute>();
342 private ClassRecord parent;
343 public int CodePointer = 0;
344
345 public MethodInfo(ClassRecord paren)
346 {
347 parent = paren;
348 }
349
350 public void AddMethodCode(MethodMemory memory)
351 {
352 Array.Copy(this.Attributes[0].Code, 0, memory.MethodBuffer, memory.NextMethodPC, this.Attributes[0].Code.Length);
353 memory.Methodcount++;
354 this.CodePointer = memory.NextMethodPC;
355 memory.NextMethodPC += this.Attributes[0].Code.Length;
356 }
357
358 public void ReadData(byte[] data, ref int pointer)
359 {
360 AccessFlags = (ushort)((data[pointer++] << 8) + data[pointer++]);
361 NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
362 DescriptorIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
363 AttributeCount = (ushort)((data[pointer++] << 8) + data[pointer++]);
364 for(int i =0; i< AttributeCount; i++)
365 {
366 MethodAttribute attri = new MethodAttribute(this.parent);
367 attri.ReadData(data, ref pointer);
368 this.Attributes.Add(attri);
369 }
370 }
371
372 public void Print()
373 {
374 Console.WriteLine("Method Info Struct: ");
375 Console.WriteLine("AccessFlags: " + AccessFlags);
376 Console.WriteLine("NameIndex: " + NameIndex +" // "+ ((PoolUtf8)this.parent._constantsPool[NameIndex-1]).Value);
377 Console.WriteLine("DescriptorIndex: " + DescriptorIndex + " // "+ ((PoolUtf8)this.parent._constantsPool[DescriptorIndex-1]).Value);
378 Console.WriteLine("Attribute Count:" + AttributeCount);
379 for (int i = 0; i < AttributeCount; i++)
380 {
381 this.Attributes[i].Print();
382 }
383 }
384
385 public class MethodAttribute
386 {
387 public ushort NameIndex = 0;
388 public string Name = "";
389 public Int32 Length = 0;
390 //for now only support code attribute
391 public ushort MaxStack = 0;
392 public ushort MaxLocals = 0;
393 public Int32 CodeLength = 0;
394 public byte[] Code;
395 public ushort ExceptionTableLength = 0;
396 public ushort SubAttributeCount = 0;
397 public List<SubAttribute> SubAttributes = new List<SubAttribute>();
398 private ClassRecord parent;
399
400 public MethodAttribute(ClassRecord paren)
401 {
402 parent = paren;
403 }
404
405 public void ReadData(byte[] data, ref int pointer)
406 {
407 NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
408 Length = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]);
409 MaxStack = (ushort)((data[pointer++] << 8) + data[pointer++]);
410 MaxLocals = (ushort)((data[pointer++] << 8) + data[pointer++]);
411 CodeLength = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]);
412 Code = new byte[CodeLength];
413 for (int i = 0; i < CodeLength; i++)
414 {
415 Code[i] = data[pointer++];
416 }
417 ExceptionTableLength = (ushort)((data[pointer++] << 8) + data[pointer++]);
418 SubAttributeCount = (ushort)((data[pointer++] << 8) + data[pointer++]);
419 for (int i = 0; i < SubAttributeCount; i++)
420 {
421 SubAttribute subAttri = new SubAttribute(this.parent);
422 subAttri.ReadData(data, ref pointer);
423 this.SubAttributes.Add(subAttri);
424 }
425 }
426
427 public void Print()
428 {
429 Console.WriteLine("Method Attribute: ");
430 Console.WriteLine("Name Index: " + NameIndex + " // "+ ((PoolUtf8)this.parent._constantsPool[NameIndex-1]).Value);
431 Console.WriteLine("Length: " + Length);
432 Console.WriteLine("MaxStack: " + MaxStack);
433 Console.WriteLine("MaxLocals: " + MaxLocals);
434 Console.WriteLine("CodeLength: " + CodeLength);
435 for (int i = 0; i < Code.Length; i++)
436 {
437 Console.WriteLine("OpCode #" + i + " is: " + Code[i]);
438 }
439 Console.WriteLine("SubAttributes: " + SubAttributeCount);
440 for (int i = 0; i < SubAttributeCount; i++)
441 {
442 this.SubAttributes[i].Print();
443 }
444 }
445
446 public class SubAttribute
447 {
448 public ushort NameIndex = 0;
449 public string Name = "";
450 public Int32 Length = 0;
451 public byte[] Data;
452 private ClassRecord parent;
453
454 public SubAttribute(ClassRecord paren)
455 {
456 parent = paren;
457 }
458
459 public void ReadData(byte[] data, ref int pointer)
460 {
461 NameIndex = (ushort)((data[pointer++] << 8) + data[pointer++]);
462 Length = (Int32)((data[pointer++] << 24) + (data[pointer++] << 16) + (data[pointer++] << 8) + data[pointer++]);
463 Data = new byte[Length];
464 for (int i = 0; i < Length; i++)
465 {
466 Data[i] = data[pointer++];
467 }
468 }
469
470 public void Print()
471 {
472 Console.WriteLine("SubAttribute: NameIndex: " + NameIndex + " // " + ((PoolUtf8)this.parent._constantsPool[NameIndex - 1]).Value);
473 }
474
475 }
476 }
477
478 }
479 private class InterfaceInfo
480 {
481 public void ReadData(byte[] data, ref int i)
482 {
483
484 }
485 }
486 private class FieldInfo
487 {
488 public void ReadData(byte[] data, ref int i)
489 {
490
491 }
492 }
493 private class AttributeInfo
494 {
495 public void ReadData(byte[] data, ref int i)
496 {
497
498 }
499 }
500 #endregion
501
502 }
503}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Heap.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Heap.cs
deleted file mode 100644
index f213c36..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Heap.cs
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Scripting.EmbeddedJVM
33{
34 public class Heap
35 {
36 public List<ClassInstance> ClassObjects = new List<ClassInstance>();
37
38 public Heap()
39 {
40
41 }
42 }
43}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs
deleted file mode 100644
index c5995b2..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs
+++ /dev/null
@@ -1,135 +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 OpenSim.Scripting.EmbeddedJVM.Types;
32using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
33
34namespace OpenSim.Scripting.EmbeddedJVM
35{
36 partial class Thread
37 {
38 private partial class Interpreter
39 {
40 private Thread _mThread;
41
42 public Interpreter(Thread parentThread)
43 {
44 _mThread = parentThread;
45 }
46
47 public bool Excute()
48 {
49 bool run = true;
50 byte currentOpCode = GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC++];
51 // Console.WriteLine("opCode is: " + currentOpCode);
52 bool handled = false;
53
54 handled = this.IsLogicOpCode(currentOpCode);
55 if (!handled)
56 {
57 handled = this.IsMethodOpCode(currentOpCode);
58 }
59 if (!handled)
60 {
61 if (currentOpCode == 172)
62 {
63 if (this._mThread.stack.StackFrames.Count > 1)
64 {
65 Console.WriteLine("returning int from function");
66 int retPC1 = this._mThread.currentFrame.ReturnPC;
67 BaseType bas1 = this._mThread.currentFrame.OpStack.Pop();
68 this._mThread.stack.StackFrames.Pop();
69 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
70 this._mThread.PC = retPC1;
71 if (bas1 is Int)
72 {
73 this._mThread.currentFrame.OpStack.Push((Int)bas1);
74 }
75 }
76 else
77 {
78 // Console.WriteLine("No parent function so ending program");
79 this._mThread.stack.StackFrames.Pop();
80 run = false;
81 }
82 handled = true;
83 }
84 if (currentOpCode == 174)
85 {
86 if (this._mThread.stack.StackFrames.Count > 1)
87 {
88 Console.WriteLine("returning float from function");
89 int retPC1 = this._mThread.currentFrame.ReturnPC;
90 BaseType bas1 = this._mThread.currentFrame.OpStack.Pop();
91 this._mThread.stack.StackFrames.Pop();
92 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
93 this._mThread.PC = retPC1;
94 if (bas1 is Float)
95 {
96 this._mThread.currentFrame.OpStack.Push((Float)bas1);
97 }
98 }
99 else
100 {
101 // Console.WriteLine("No parent function so ending program");
102 this._mThread.stack.StackFrames.Pop();
103 run = false;
104 }
105 handled = true;
106 }
107 if (currentOpCode == 177)
108 {
109 if (this._mThread.stack.StackFrames.Count > 1)
110 {
111 Console.WriteLine("returning from function");
112 int retPC = this._mThread.currentFrame.ReturnPC;
113 this._mThread.stack.StackFrames.Pop();
114 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
115 this._mThread.PC = retPC;
116 }
117 else
118 {
119 // Console.WriteLine("No parent function so ending program");
120 this._mThread.stack.StackFrames.Pop();
121 run = false;
122 }
123 handled = true;
124 }
125 }
126 if (!handled)
127 {
128 Console.WriteLine("opcode " + currentOpCode + " not been handled ");
129 }
130 return run;
131
132 }
133 }
134 }
135}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterLogic.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterLogic.cs
deleted file mode 100644
index 2a11afd..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterLogic.cs
+++ /dev/null
@@ -1,427 +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 OpenSim.Scripting.EmbeddedJVM.Types;
32using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
33
34namespace OpenSim.Scripting.EmbeddedJVM
35{
36 partial class Thread
37 {
38 private partial class Interpreter
39 {
40 private bool IsLogicOpCode(byte opcode)
41 {
42 bool result = false;
43 switch (opcode)
44 {
45 case 2:
46 Int m_int= new Int();
47 m_int.mValue = -1;
48 this._mThread.currentFrame.OpStack.Push(m_int);
49 result = true;
50 break;
51 case 3:
52 m_int= new Int();
53 m_int.mValue = 0;
54 this._mThread.currentFrame.OpStack.Push(m_int);
55 result = true;
56 break;
57 case 4:
58 m_int = new Int();
59 m_int.mValue = 1;
60 this._mThread.currentFrame.OpStack.Push(m_int);
61 result = true;
62 break;
63 case 5:
64 m_int = new Int();
65 m_int.mValue = 2;
66 this._mThread.currentFrame.OpStack.Push(m_int);
67 result = true;
68 break;
69 case 6:
70 m_int = new Int();
71 m_int.mValue = 3;
72 this._mThread.currentFrame.OpStack.Push(m_int);
73 break;
74 case 7:
75 m_int = new Int();
76 m_int.mValue = 4;
77 this._mThread.currentFrame.OpStack.Push(m_int);
78 result = true;
79 break;
80 case 8:
81 m_int = new Int();
82 m_int.mValue = 5;
83 this._mThread.currentFrame.OpStack.Push(m_int);
84 result = true;
85 break;
86 case 11:
87 Float m_float = new Float();
88 m_float.mValue = 0.0f;
89 this._mThread.currentFrame.OpStack.Push(m_float);
90 result = true;
91 break;
92 case 12:
93 m_float = new Float();
94 m_float.mValue = 1.0f;
95 this._mThread.currentFrame.OpStack.Push(m_float);
96 result = true;
97 break;
98 case 13:
99 m_float = new Float();
100 m_float.mValue = 2.0f;
101 this._mThread.currentFrame.OpStack.Push(m_float);
102 result = true;
103 break;
104 case 16:
105 int pushvalue = (int)GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC];
106 Int pushInt = new Int();
107 pushInt.mValue = pushvalue;
108 this._mThread.currentFrame.OpStack.Push(pushInt);
109 this._mThread.PC++;
110 result = true;
111 break;
112 case 17:
113 short pushvalue2 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
114 Int pushInt2 = new Int();
115 pushInt2.mValue = pushvalue2;
116 this._mThread.currentFrame.OpStack.Push(pushInt2);
117 this._mThread.PC += 2;
118 result = true;
119 break;
120 case 23:
121 short findex1 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]));
122 Float fload = new Float();
123 if (this._mThread.currentFrame.LocalVariables[findex1] != null)
124 {
125 if (this._mThread.currentFrame.LocalVariables[findex1] is Float)
126 {
127 fload.mValue = ((Float)this._mThread.currentFrame.LocalVariables[findex1]).mValue;
128 this._mThread.currentFrame.OpStack.Push(fload);
129 }
130 }
131 this._mThread.PC++;
132 result = true;
133 break;
134 case 26:
135 if (this._mThread.currentFrame.LocalVariables[0] != null)
136 {
137 if (this._mThread.currentFrame.LocalVariables[0] is Int)
138 {
139 Int newInt = new Int();
140 newInt.mValue = ((Int)this._mThread.currentFrame.LocalVariables[0]).mValue;
141 this._mThread.currentFrame.OpStack.Push(newInt);
142 }
143 }
144 result = true;
145 break;
146 case 27:
147 if (this._mThread.currentFrame.LocalVariables[1] != null)
148 {
149 if (this._mThread.currentFrame.LocalVariables[1] is Int)
150 {
151 Int newInt = new Int();
152 newInt.mValue = ((Int)this._mThread.currentFrame.LocalVariables[1]).mValue;
153 this._mThread.currentFrame.OpStack.Push(newInt);
154 }
155 }
156 result = true;
157 break;
158 case 34:
159 if (this._mThread.currentFrame.LocalVariables[0] != null)
160 {
161 if (this._mThread.currentFrame.LocalVariables[0] is Float)
162 {
163 Float newfloat = new Float();
164 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[0]).mValue;
165 this._mThread.currentFrame.OpStack.Push(newfloat);
166 }
167 }
168 result = true;
169 break;
170 case 35:
171 if (this._mThread.currentFrame.LocalVariables[1] != null)
172 {
173 if (this._mThread.currentFrame.LocalVariables[1] is Float)
174 {
175 Float newfloat = new Float();
176 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[1]).mValue;
177 this._mThread.currentFrame.OpStack.Push(newfloat);
178 }
179 }
180 result = true;
181 break;
182 case 36:
183 if (this._mThread.currentFrame.LocalVariables[2] != null)
184 {
185 if (this._mThread.currentFrame.LocalVariables[2] is Float)
186 {
187 Float newfloat = new Float();
188 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[2]).mValue;
189 this._mThread.currentFrame.OpStack.Push(newfloat);
190 }
191 }
192 result = true;
193 break;
194 case 37:
195 if (this._mThread.currentFrame.LocalVariables[3] != null)
196 {
197 if (this._mThread.currentFrame.LocalVariables[3] is Float)
198 {
199 Float newfloat = new Float();
200 newfloat.mValue = ((Float)this._mThread.currentFrame.LocalVariables[3]).mValue;
201 this._mThread.currentFrame.OpStack.Push(newfloat);
202 }
203 }
204 result = true;
205 break;
206 case 56:
207 short findex = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] ));
208 BaseType fstor = this._mThread.currentFrame.OpStack.Pop();
209 if (fstor is Float)
210 {
211 this._mThread.currentFrame.LocalVariables[findex] = (Float)fstor;
212 }
213 this._mThread.PC++;
214 result = true;
215 break;
216 case 59:
217 BaseType baset = this._mThread.currentFrame.OpStack.Pop();
218 if (baset is Int)
219 {
220 this._mThread.currentFrame.LocalVariables[0] = (Int)baset;
221 }
222 result = true;
223 break;
224 case 60:
225 baset = this._mThread.currentFrame.OpStack.Pop();
226 if (baset is Int)
227 {
228 this._mThread.currentFrame.LocalVariables[1] = (Int)baset;
229 }
230 result = true;
231 break;
232 case 67:
233 baset = this._mThread.currentFrame.OpStack.Pop();
234 if (baset is Float)
235 {
236 this._mThread.currentFrame.LocalVariables[0] = (Float)baset;
237 }
238 result = true;
239 break;
240 case 68:
241 baset = this._mThread.currentFrame.OpStack.Pop();
242 if (baset is Float)
243 {
244 this._mThread.currentFrame.LocalVariables[1] = (Float)baset;
245 }
246 result = true;
247 break;
248 case 69:
249 baset = this._mThread.currentFrame.OpStack.Pop();
250 if (baset is Float)
251 {
252 this._mThread.currentFrame.LocalVariables[2] = (Float)baset;
253 }
254 result = true;
255 break;
256 case 70:
257 baset = this._mThread.currentFrame.OpStack.Pop();
258 if (baset is Float)
259 {
260 this._mThread.currentFrame.LocalVariables[3] = (Float)baset;
261 }
262 result = true;
263 break;
264 case 87:
265 this._mThread.currentFrame.OpStack.Pop();
266 result = true;
267 break;
268 case 98:
269 BaseType bf2 = this._mThread.currentFrame.OpStack.Pop();
270 BaseType bf1 = this._mThread.currentFrame.OpStack.Pop();
271 if (bf1 is Float && bf2 is Float)
272 {
273 Float nflt = new Float();
274 nflt.mValue = ((Float)bf1).mValue + ((Float)bf2).mValue;
275 this._mThread.currentFrame.OpStack.Push(nflt);
276 }
277 result = true;
278 break;
279 case 102:
280 BaseType bsf2 = this._mThread.currentFrame.OpStack.Pop();
281 BaseType bsf1 = this._mThread.currentFrame.OpStack.Pop();
282 if (bsf1 is Float && bsf2 is Float)
283 {
284 Float resf = new Float();
285 resf.mValue = ((Float)bsf1).mValue - ((Float)bsf2).mValue;
286 this._mThread.currentFrame.OpStack.Push(resf);
287 }
288 result = true;
289 break;
290 case 104: //check the order of the two values off the stack is correct
291 BaseType bs2 = this._mThread.currentFrame.OpStack.Pop();
292 BaseType bs1 = this._mThread.currentFrame.OpStack.Pop();
293 if (bs1 is Int && bs2 is Int)
294 {
295 Int nInt = new Int();
296 nInt.mValue = ((Int)bs1).mValue * ((Int)bs2).mValue;
297 this._mThread.currentFrame.OpStack.Push(nInt);
298 }
299 result = true;
300 break;
301 case 132:
302 if (this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]] != null)
303 {
304 if (this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]] is Int)
305 {
306 ((Int)this._mThread.currentFrame.LocalVariables[GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC]]).mValue += (sbyte) GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1];
307 }
308 }
309 this._mThread.PC += 2;
310 result = true;
311 break;
312 case 139:
313 BaseType conv1 = this._mThread.currentFrame.OpStack.Pop();
314 if (conv1 is Float)
315 {
316 Int newconv = new Int();
317 newconv.mValue = (int)((Float)conv1).mValue;
318 this._mThread.currentFrame.OpStack.Push(newconv);
319 }
320 result = true;
321 break;
322 case 149:
323 BaseType flcom2 = this._mThread.currentFrame.OpStack.Pop();
324 BaseType flcom1 = this._mThread.currentFrame.OpStack.Pop();
325 if (flcom1 is Float && flcom2 is Float)
326 {
327 Int compres = new Int();
328 if (((Float)flcom1).mValue < ((Float)flcom2).mValue)
329 {
330 compres.mValue = -1;
331 }
332 else if (((Float)flcom1).mValue > ((Float)flcom2).mValue)
333 {
334 compres.mValue = 1;
335 }
336 else
337 {
338 compres.mValue = 0;
339 }
340 this._mThread.currentFrame.OpStack.Push(compres);
341 }
342 result = true;
343 break;
344 case 158:
345 short compareoffset1 = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
346 BaseType comp1 = this._mThread.currentFrame.OpStack.Pop();
347 if (comp1 is Int)
348 {
349 if (((Int)comp1).mValue <= 0)
350 {
351 this._mThread.PC += -1 + compareoffset1;
352 }
353 else
354 {
355 this._mThread.PC += 2;
356 }
357 }
358 else
359 {
360 this._mThread.PC += 2;
361 }
362 result = true;
363 break;
364 case 162:
365 short compareoffset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
366 BaseType bc2 = this._mThread.currentFrame.OpStack.Pop();
367 BaseType bc1 = this._mThread.currentFrame.OpStack.Pop();
368 if (bc1 is Int && bc2 is Int)
369 {
370 //Console.WriteLine("comparing " + ((Int)bc1).mValue + " and " + ((Int)bc2).mValue);
371 if (((Int)bc1).mValue >= ((Int)bc2).mValue)
372 {
373 // Console.WriteLine("branch compare true , offset is " +compareoffset);
374 // Console.WriteLine("current PC is " + this._mThread.PC);
375 this._mThread.PC += -1 + compareoffset;
376 //Console.WriteLine("new PC is " + this._mThread.PC);
377 }
378 else
379 {
380 //Console.WriteLine("branch compare false");
381 this._mThread.PC += 2;
382 }
383 }
384 else
385 {
386 this._mThread.PC += 2;
387 }
388 result = true;
389 break;
390 case 164:
391 short compareloffset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC + 1]);
392 BaseType bcl2 = this._mThread.currentFrame.OpStack.Pop();
393 BaseType bcl1 = this._mThread.currentFrame.OpStack.Pop();
394 if (bcl1 is Int && bcl2 is Int)
395 {
396 //Console.WriteLine("comparing " + ((Int)bcl1).mValue + " and " + ((Int)bcl2).mValue);
397 if (((Int)bcl1).mValue <= ((Int)bcl2).mValue)
398 {
399 // Console.WriteLine("branch compare true , offset is " + compareloffset);
400 // Console.WriteLine("current PC is " + this._mThread.PC);
401 this._mThread.PC += -1 + compareloffset;
402 // Console.WriteLine("new PC is " + this._mThread.PC);
403 }
404 else
405 {
406 //Console.WriteLine("branch compare false");
407 this._mThread.PC += 2;
408 }
409 }
410 else
411 {
412 this._mThread.PC += 2;
413 }
414 result = true;
415 break;
416 case 167:
417 short offset = (short)((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]);
418 this._mThread.PC += -1 + offset;
419 result = true;
420 break;
421 }
422
423 return result;
424 }
425 }
426 }
427}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterMethods.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterMethods.cs
deleted file mode 100644
index 8e34de7..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterMethods.cs
+++ /dev/null
@@ -1,161 +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 OpenSim.Scripting.EmbeddedJVM.Types;
32using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
33using OpenSim.Framework.Interfaces;
34using OpenSim.Framework;
35using OpenSim.Framework.Types;
36
37namespace OpenSim.Scripting.EmbeddedJVM
38{
39 partial class Thread
40 {
41 private partial class Interpreter
42 {
43 private bool IsMethodOpCode(byte opcode)
44 {
45 bool result = false;
46 switch (opcode)
47 {
48 case 184:
49 short refIndex = (short) ((GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC] << 8) + GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC+1]);
50 if (this._mThread.currentClass._constantsPool[refIndex - 1] is ClassRecord.PoolMethodRef)
51 {
52 string typ = ((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Type.Value;
53 string typeparam = "";
54 string typereturn = "";
55 int firstbrak = 0;
56 int secondbrak = 0;
57 firstbrak = typ.LastIndexOf('(');
58 secondbrak = typ.LastIndexOf(')');
59 typeparam = typ.Substring(firstbrak + 1, secondbrak - firstbrak - 1);
60 typereturn = typ.Substring(secondbrak + 1, typ.Length - secondbrak - 1);
61 if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == this._mThread.currentClass.mClass.Name.Value)
62 {
63 //calling a method in this class
64 if (typeparam.Length == 0)
65 {
66 this._mThread.JumpToStaticVoidMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, (this._mThread.PC + 2));
67 }
68 else
69 {
70 this._mThread.JumpToStaticParamMethod(((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value, typeparam, (this._mThread.PC + 2));
71 }
72 }
73 else
74 {
75 //calling a method of a different class
76
77 //for now we will have a built in OpenSimAPI class, but this should be a java class that then calls native methods
78 if (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mClass.Name.Value == "OpenSimAPI")
79 {
80 switch (((ClassRecord.PoolMethodRef)this._mThread.currentClass._constantsPool[refIndex - 1]).mNameType.Name.Value)
81 {
82 case "GetEntityID":
83 Int entityID = new Int();
84 entityID.mValue =(int) this._mThread.EntityId;
85 this._mThread.currentFrame.OpStack.Push(entityID);
86 this._mThread.PC += 2;
87 break;
88 case "GetRandomAvatarID":
89 entityID = new Int();
90 entityID.mValue = (int)Thread.OpenSimScriptAPI.GetRandomAvatarID();
91 this._mThread.currentFrame.OpStack.Push(entityID);
92 this._mThread.PC += 2;
93 break;
94 case "GetEntityPositionX":
95 BaseType bs1 = this._mThread.currentFrame.OpStack.Pop();
96 if (bs1 is Int)
97 {
98 //should get the position of the entity from the IScriptAPI
99 OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
100 Float pos = new Float();
101 pos.mValue = vec3.X;
102 this._mThread.currentFrame.OpStack.Push(pos);
103 }
104 this._mThread.PC += 2;
105 break;
106 case "GetEntityPositionY":
107 bs1 = this._mThread.currentFrame.OpStack.Pop();
108 if (bs1 is Int)
109 {
110 //should get the position of the entity from the IScriptAPI
111 OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
112 Float pos = new Float();
113 pos.mValue = vec3.Y;
114 this._mThread.currentFrame.OpStack.Push(pos);
115 }
116 this._mThread.PC += 2;
117 break;
118 case "GetEntityPositionZ":
119 bs1 = this._mThread.currentFrame.OpStack.Pop();
120 if (bs1 is Int)
121 {
122 //should get the position of the entity from the IScriptAPI
123 OSVector3 vec3 = Thread.OpenSimScriptAPI.GetEntityPosition((uint)((Int)bs1).mValue);
124 Float pos = new Float();
125 pos.mValue = vec3.Z;
126 this._mThread.currentFrame.OpStack.Push(pos);
127 }
128 this._mThread.PC += 2;
129 break;
130 case "SetEntityPosition":
131 //pop the three float values and the entity id
132 BaseType ft3 = this._mThread.currentFrame.OpStack.Pop();
133 BaseType ft2 = this._mThread.currentFrame.OpStack.Pop();
134 BaseType ft1 = this._mThread.currentFrame.OpStack.Pop();
135 BaseType in1 = this._mThread.currentFrame.OpStack.Pop();
136 if (ft1 is Float && ft2 is Float && ft3 is Float)
137 {
138 if(in1 is Int)
139 {
140 Thread.OpenSimScriptAPI.SetEntityPosition((uint)((Int) in1).mValue, ((Float)ft1).mValue, ((Float)ft2).mValue, ((Float)ft3).mValue);
141 }
142 }
143 this._mThread.PC += 2;
144 break;
145 }
146 }
147 }
148 }
149 else
150 {
151 this._mThread.PC += 2;
152 }
153 result = true;
154 break;
155 }
156
157 return result;
158 }
159 }
160 }
161}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterReturn.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterReturn.cs
deleted file mode 100644
index cbedb71..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/InterpreterReturn.cs
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Scripting.EmbeddedJVM
33{
34 partial class Thread
35 {
36 private partial class Interpreter
37 {
38 }
39 }
40}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/MainMemory.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/MainMemory.cs
deleted file mode 100644
index 97d9fb6..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/MainMemory.cs
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Scripting.EmbeddedJVM
33{
34 public class MainMemory
35 {
36 public Heap HeapArea;
37 public MethodMemory MethodArea;
38
39 public MainMemory()
40 {
41 MethodArea = new MethodMemory();
42 HeapArea = new Heap();
43 }
44 }
45}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/MethodMemory.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/MethodMemory.cs
deleted file mode 100644
index 7e938b4..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/MethodMemory.cs
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Scripting.EmbeddedJVM
33{
34 public class MethodMemory
35 {
36 public byte[] MethodBuffer;
37 public List<ClassRecord> Classes = new List<ClassRecord>();
38 public int NextMethodPC = 0;
39 public int Methodcount = 0;
40
41 public MethodMemory()
42 {
43 MethodBuffer = new byte[20000];
44 }
45 }
46}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Object.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Object.cs
deleted file mode 100644
index 2c3bedd..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Object.cs
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Scripting.EmbeddedJVM
33{
34 public class Object
35 {
36 }
37}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj b/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj
deleted file mode 100644
index bd1a332..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.csproj
+++ /dev/null
@@ -1,153 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{97A82740-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.Scripting.EmbeddedJVM</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.Scripting.EmbeddedJVM</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\ScriptEngines\</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\ScriptEngines\</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="..\..\..\Common\OpenSim.Framework\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="ClassInstance.cs">
80 <SubType>Code</SubType>
81 </Compile>
82 <Compile Include="ClassRecord.cs">
83 <SubType>Code</SubType>
84 </Compile>
85 <Compile Include="Heap.cs">
86 <SubType>Code</SubType>
87 </Compile>
88 <Compile Include="Interpreter.cs">
89 <SubType>Code</SubType>
90 </Compile>
91 <Compile Include="InterpreterLogic.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="InterpreterMethods.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="InterpreterReturn.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 <Compile Include="MainMemory.cs">
101 <SubType>Code</SubType>
102 </Compile>
103 <Compile Include="MethodMemory.cs">
104 <SubType>Code</SubType>
105 </Compile>
106 <Compile Include="Object.cs">
107 <SubType>Code</SubType>
108 </Compile>
109 <Compile Include="OpenSimJVM.cs">
110 <SubType>Code</SubType>
111 </Compile>
112 <Compile Include="Stack.cs">
113 <SubType>Code</SubType>
114 </Compile>
115 <Compile Include="StackFrame.cs">
116 <SubType>Code</SubType>
117 </Compile>
118 <Compile Include="Thread.cs">
119 <SubType>Code</SubType>
120 </Compile>
121 <Compile Include="Properties\AssemblyInfo.cs">
122 <SubType>Code</SubType>
123 </Compile>
124 <Compile Include="Types\ArrayReference.cs">
125 <SubType>Code</SubType>
126 </Compile>
127 <Compile Include="Types\BaseType.cs">
128 <SubType>Code</SubType>
129 </Compile>
130 <Compile Include="Types\ObjectReference.cs">
131 <SubType>Code</SubType>
132 </Compile>
133 <Compile Include="Types\PrimitiveTypes\Byte.cs">
134 <SubType>Code</SubType>
135 </Compile>
136 <Compile Include="Types\PrimitiveTypes\Char.cs">
137 <SubType>Code</SubType>
138 </Compile>
139 <Compile Include="Types\PrimitiveTypes\Float.cs">
140 <SubType>Code</SubType>
141 </Compile>
142 <Compile Include="Types\PrimitiveTypes\Int.cs">
143 <SubType>Code</SubType>
144 </Compile>
145 </ItemGroup>
146 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
147 <PropertyGroup>
148 <PreBuildEvent>
149 </PreBuildEvent>
150 <PostBuildEvent>
151 </PostBuildEvent>
152 </PropertyGroup>
153</Project>
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build b/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build
deleted file mode 100644
index cce2fef..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSim.Scripting.EmbeddedJVM.dll.build
+++ /dev/null
@@ -1,62 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Scripting.EmbeddedJVM" 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.Scripting.EmbeddedJVM" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="ClassInstance.cs" />
15 <include name="ClassRecord.cs" />
16 <include name="Heap.cs" />
17 <include name="Interpreter.cs" />
18 <include name="InterpreterLogic.cs" />
19 <include name="InterpreterMethods.cs" />
20 <include name="InterpreterReturn.cs" />
21 <include name="MainMemory.cs" />
22 <include name="MethodMemory.cs" />
23 <include name="Object.cs" />
24 <include name="OpenSimJVM.cs" />
25 <include name="Stack.cs" />
26 <include name="StackFrame.cs" />
27 <include name="Thread.cs" />
28 <include name="Properties/AssemblyInfo.cs" />
29 <include name="Types/ArrayReference.cs" />
30 <include name="Types/BaseType.cs" />
31 <include name="Types/ObjectReference.cs" />
32 <include name="Types/PrimitiveTypes/Byte.cs" />
33 <include name="Types/PrimitiveTypes/Char.cs" />
34 <include name="Types/PrimitiveTypes/Float.cs" />
35 <include name="Types/PrimitiveTypes/Int.cs" />
36 </sources>
37 <references basedir="${project::get-base-directory()}">
38 <lib>
39 <include name="${project::get-base-directory()}" />
40 <include name="${project::get-base-directory()}/${build.dir}" />
41 </lib>
42 <include name="../../../bin/OpenSim.Framework.dll" />
43 <include name="System.dll" />
44 <include name="System.Xml.dll" />
45 </references>
46 </csc>
47 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/ScriptEngines/" />
48 <mkdir dir="${project::get-base-directory()}/../../../bin/ScriptEngines/"/>
49 <copy todir="${project::get-base-directory()}/../../../bin/ScriptEngines/">
50 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
51 <include name="*.dll"/>
52 <include name="*.exe"/>
53 </fileset>
54 </copy>
55 </target>
56 <target name="clean">
57 <delete dir="${bin.dir}" failonerror="false" />
58 <delete dir="${obj.dir}" failonerror="false" />
59 </target>
60 <target name="doc" description="Creates documentation.">
61 </target>
62</project>
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSimJVM.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSimJVM.cs
deleted file mode 100644
index 2de8152..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/OpenSimJVM.cs
+++ /dev/null
@@ -1,161 +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.Threading;
33using OpenSim.Framework;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Utilities;
36
37namespace OpenSim.Scripting.EmbeddedJVM
38{
39 public class OpenSimJVM : IScriptEngine
40 {
41 private List<Thread> _threads = new List<Thread>();
42 private BlockingQueue<CompileInfo> CompileScripts = new BlockingQueue<CompileInfo>();
43 private MainMemory _mainMemory;
44 private System.Threading.Thread compileThread;
45
46 public OpenSimJVM()
47 {
48
49 }
50
51 public bool Init(IScriptAPI api)
52 {
53 Console.WriteLine("Creating OpenSim JVM scripting engine");
54 _mainMemory = new MainMemory();
55 Thread.GlobalMemory = this._mainMemory;
56 Thread.OpenSimScriptAPI = api;
57 compileThread = new System.Threading.Thread(new ThreadStart(CompileScript));
58 compileThread.IsBackground = true;
59 compileThread.Start();
60 return true;
61 }
62
63 public string GetName()
64 {
65 return "OpenSimJVM";
66 }
67
68 public void LoadScript(string script, string scriptName, uint entityID)
69 {
70 Console.WriteLine("OpenSimJVM - loading new script: " + scriptName);
71 CompileInfo comp = new CompileInfo();
72 comp.entityId = entityID;
73 comp.script = script;
74 comp.scriptName = scriptName;
75 this.CompileScripts.Enqueue(comp);
76 }
77
78 public void CompileScript()
79 {
80 while (true)
81 {
82 CompileInfo comp = this.CompileScripts.Dequeue();
83 string script = comp.script;
84 string scriptName = comp.scriptName;
85 uint entityID = comp.entityId;
86 try
87 {
88 //need to compile the script into a java class file
89
90 //first save it to a java source file
91 TextWriter tw = new StreamWriter(scriptName + ".java");
92 tw.WriteLine(script);
93 tw.Close();
94
95 //now compile
96 System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("javac.exe", "*.java");
97 // psi.RedirectStandardOutput = true;
98 psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
99 psi.UseShellExecute = false;
100
101 System.Diagnostics.Process javacomp;
102 javacomp = System.Diagnostics.Process.Start(psi);
103 javacomp.WaitForExit();
104
105
106 //now load in class file
107 ClassRecord class1 = new ClassRecord();
108 class1.LoadClassFromFile(scriptName + ".class");
109 class1.PrintToConsole();
110 //Console.WriteLine();
111 this._mainMemory.MethodArea.Classes.Add(class1);
112 class1.AddMethodsToMemory(this._mainMemory.MethodArea);
113
114 Thread newThread = new Thread();
115 this._threads.Add(newThread);
116 newThread.EntityId = entityID;
117 newThread.currentClass = class1;
118
119 //now delete the created files
120 System.IO.File.Delete(scriptName + ".java");
121 System.IO.File.Delete(scriptName + ".class");
122 //this.OnFrame();
123 }
124 catch (Exception e)
125 {
126 Console.WriteLine("exception");
127 Console.WriteLine(e.StackTrace);
128 Console.WriteLine(e.Message);
129 }
130 }
131 }
132
133 public void OnFrame()
134 {
135 for (int i = 0; i < this._threads.Count; i++)
136 {
137 if (!this._threads[i].running)
138 {
139 this._threads[i].StartMethod("OnFrame");
140 bool run = true;
141 while (run)
142 {
143 run = this._threads[i].Excute();
144 }
145 }
146 }
147 }
148
149 private class CompileInfo
150 {
151 public string script;
152 public string scriptName;
153 public uint entityId;
154
155 public CompileInfo()
156 {
157
158 }
159 }
160 }
161}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Properties/AssemblyInfo.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Properties/AssemblyInfo.cs
deleted file mode 100644
index 53a0f08..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Scripting.EmbeddedJVM")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Scripting.EmbeddedJVM")]
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("087c0917-5a6a-4b47-a4dd-0928dd85bd4b")]
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/OpenSim.Scripting/EmbeddedJVM/Stack.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Stack.cs
deleted file mode 100644
index 69a274c..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Stack.cs
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Scripting.EmbeddedJVM
33{
34 public class Stack
35 {
36 public Stack<StackFrame> StackFrames = new Stack<StackFrame>();
37
38 public Stack()
39 {
40 }
41 }
42}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/StackFrame.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/StackFrame.cs
deleted file mode 100644
index 3a2b58a..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/StackFrame.cs
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenSim.Scripting.EmbeddedJVM.Types;
32
33namespace OpenSim.Scripting.EmbeddedJVM
34{
35 public class StackFrame
36 {
37 public BaseType[] LocalVariables;
38 public Stack<BaseType> OpStack = new Stack<BaseType>();
39
40 public int ReturnPC = 0;
41 public ClassRecord CallingClass = null;
42
43 public StackFrame()
44 {
45 LocalVariables = new BaseType[20];
46 }
47
48 }
49}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Thread.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Thread.cs
deleted file mode 100644
index 6813a20..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Thread.cs
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenSim.Scripting.EmbeddedJVM.Types;
32using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
33using OpenSim.Framework;
34using OpenSim.Framework.Interfaces;
35
36namespace OpenSim.Scripting.EmbeddedJVM
37{
38 public partial class Thread
39 {
40 public static MainMemory GlobalMemory;
41 public static IScriptAPI OpenSimScriptAPI;
42 private int PC = 0;
43 private Stack stack;
44 private Interpreter mInterpreter;
45 public ClassRecord currentClass;
46 public ClassInstance currentInstance;
47 private StackFrame currentFrame;
48 public int excutionCounter = 0;
49 public bool running = false;
50 public uint EntityId = 0;
51
52 public Thread()
53 {
54 this.mInterpreter = new Interpreter(this);
55 this.stack = new Stack();
56 }
57
58 public void SetPC(int methodpointer)
59 {
60 //Console.WriteLine("Thread PC has been set to " + methodpointer);
61 PC = methodpointer;
62 }
63
64 public void StartMethod(ClassRecord rec, string methName)
65 {
66 currentFrame = new StackFrame();
67 this.stack.StackFrames.Push(currentFrame);
68 this.currentClass = rec;
69 currentClass.StartMethod(this, methName);
70 }
71
72 public void StartMethod( string methName)
73 {
74 currentFrame = new StackFrame();
75 this.stack.StackFrames.Push(currentFrame);
76 currentClass.StartMethod(this, methName);
77 }
78
79 public void JumpToStaticVoidMethod(string methName, int returnPC)
80 {
81 currentFrame = new StackFrame();
82 currentFrame.ReturnPC = returnPC;
83 this.stack.StackFrames.Push(currentFrame);
84 currentClass.StartMethod(this, methName);
85 }
86
87 public void JumpToStaticParamMethod(string methName, string param, int returnPC)
88 {
89 if (param == "I")
90 {
91 BaseType bs1 = currentFrame.OpStack.Pop();
92 currentFrame = new StackFrame();
93 currentFrame.ReturnPC = returnPC;
94 this.stack.StackFrames.Push(currentFrame);
95 currentFrame.LocalVariables[0] = ((Int)bs1);
96 currentClass.StartMethod(this, methName);
97 }
98 if (param == "F")
99 {
100
101 }
102 }
103
104 public void JumpToClassStaticVoidMethod(string className, string methName, int returnPC)
105 {
106
107 }
108
109 public bool Excute()
110 {
111 excutionCounter++;
112 return this.mInterpreter.Excute();
113 }
114 }
115}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/ArrayReference.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/ArrayReference.cs
deleted file mode 100644
index 2854eab..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/ArrayReference.cs
+++ /dev/null
@@ -1,10 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Scripting.EmbeddedJVM.Types
6{
7 public class ArrayReference :BaseType
8 {
9 }
10}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/BaseType.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/BaseType.cs
deleted file mode 100644
index 270aa7b..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/BaseType.cs
+++ /dev/null
@@ -1,10 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Scripting.EmbeddedJVM.Types
6{
7 public class BaseType : Object
8 {
9 }
10}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/ObjectReference.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/ObjectReference.cs
deleted file mode 100644
index da28eaa..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/ObjectReference.cs
+++ /dev/null
@@ -1,16 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Scripting.EmbeddedJVM.Types
6{
7 public class ObjectReference : BaseType
8 {
9 public ushort Reference;
10
11 public ObjectReference()
12 {
13
14 }
15 }
16}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Byte.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Byte.cs
deleted file mode 100644
index 1a3ecff..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Byte.cs
+++ /dev/null
@@ -1,10 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes
6{
7 public class Byte : BaseType
8 {
9 }
10}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Char.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Char.cs
deleted file mode 100644
index 19002d4..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Char.cs
+++ /dev/null
@@ -1,10 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes
6{
7 public class Char : BaseType
8 {
9 }
10}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Float.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Float.cs
deleted file mode 100644
index 91f1679..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Float.cs
+++ /dev/null
@@ -1,16 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes
6{
7 public class Float : BaseType
8 {
9 public float mValue = 0;
10
11 public Float()
12 {
13
14 }
15 }
16}
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Int.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Int.cs
deleted file mode 100644
index 4ecd325..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Types/PrimitiveTypes/Int.cs
+++ /dev/null
@@ -1,16 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes
6{
7 public class Int : BaseType
8 {
9 public int mValue = 0;
10
11 public Int()
12 {
13
14 }
15 }
16}
diff --git a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
deleted file mode 100644
index 1818e3a..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
+++ /dev/null
@@ -1,118 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29// BDB Support
30// Apparently broken on Mono
31
32using System;
33using System.Collections.Generic;
34using System.Data;
35using libsecondlife;
36using OpenSim.Framework.Interfaces;
37using OpenSim.Framework.Types;
38using OpenSim.Framework.Terrain;
39using BerkeleyDb;
40using Kds.Serialization;
41using Kds.Serialization.Buffer;
42
43namespace OpenSim.Storage.LocalStorageBDB
44{
45 public class BDBLocalStorage : ILocalStorage
46 {
47 const string simDbName = "localsim.db";
48
49 DbHash sim;
50 Db DB;
51 //BEFormatter formatter;
52
53 public BDBLocalStorage()
54 {
55 DB = new Db(DbCreateFlags.None);
56 sim = (DbHash)DB.Open(null, simDbName, null, BerkeleyDb.DbType.Hash, Db.OpenFlags.Create, 0);
57 //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0);
58 }
59
60 public void Initialise(string file)
61 {
62 // Blank
63 }
64
65 public void StorePrim(PrimData prim)
66 {
67 DbEntry key = new DbEntry();
68 DbEntry data = new DbEntry();
69 lock (sim)
70 {
71 sim.PutUnique(null, ref key, ref data, DbFile.WriteFlags.AutoCommit);
72 }
73 }
74 public void RemovePrim(LLUUID primID)
75 {
76
77 }
78 public void LoadPrimitives(ILocalStorageReceiver receiver)
79 {
80
81 }
82 public float[] LoadWorld()
83 {
84 return new float[65536];
85 }
86 public void SaveMap(float[] heightmap)
87 {
88
89 }
90
91 public void SaveParcels(ParcelData[] parcel_data)
92 {
93 }
94
95 public void SaveParcel(ParcelData parcel)
96 {
97 }
98
99 public void RemoveParcel(ParcelData parcel)
100 {
101 }
102
103 public void RemoveAllParcels()
104 {
105 }
106
107 public void LoadParcels(ILocalStorageParcelReceiver recv)
108 {
109 recv.NoParcelDataFromStorage();
110 }
111
112 public void ShutDown()
113 {
114 sim.GetDb().Close();
115 DB.Close();
116 }
117 }
118} \ No newline at end of file
diff --git a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj b/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj
deleted file mode 100644
index 417643f..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj
+++ /dev/null
@@ -1,112 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{EE9E5D96-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.Storage.LocalStorageBerkeleyDB</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.Storage.LocalStorageBerkeleyDB</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="Kds.Serialization.dll" >
62 <HintPath>..\..\..\bin\Kds.Serialization.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="libdb_dotNET43.dll" >
66 <HintPath>..\..\..\bin\libdb_dotNET43.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="libsecondlife.dll" >
70 <HintPath>..\..\..\bin\libsecondlife.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="System.Data" >
78 <HintPath>System.Data.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="System.Xml" >
82 <HintPath>System.Xml.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 </ItemGroup>
86 <ItemGroup>
87 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\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="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
94 <Name>OpenSim.Framework.Console</Name>
95 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
96 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
97 <Private>False</Private>
98 </ProjectReference>
99 </ItemGroup>
100 <ItemGroup>
101 <Compile Include="BDBLocalStorage.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/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build b/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build
deleted file mode 100644
index bc2d8ec..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.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.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/LocalStorageDb4o/AssemblyInfo.cs b/OpenSim/OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs
deleted file mode 100644
index ea2b62e..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices;
31
32// Information about this assembly is defined by the following
33// attributes.
34//
35// change them to the information which is associated with the assembly
36// you compile.
37
38[assembly: AssemblyTitle("Db4LocalStorage")]
39[assembly: AssemblyDescription("")]
40[assembly: AssemblyConfiguration("")]
41[assembly: AssemblyCompany("")]
42[assembly: AssemblyProduct("Db4LocalStorage")]
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/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
deleted file mode 100644
index 46fecd0..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
+++ /dev/null
@@ -1,271 +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 Db4objects.Db4o;
31using Db4objects.Db4o.Query;
32
33using libsecondlife;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36using OpenSim.Framework.Terrain;
37using OpenSim.Framework.Console;
38
39
40namespace OpenSim.Storage.LocalStorageDb4o
41{
42 /// <summary>
43 ///
44 /// </summary>
45 public class Db4LocalStorage : ILocalStorage
46 {
47 private IObjectContainer db;
48 private string datastore;
49
50 public Db4LocalStorage()
51 {
52
53 }
54
55 public void Initialise(string dfile)
56 {
57 OpenSim.Framework.Console.MainConsole.Instance.Warn("Db4LocalStorage Opening " + dfile);
58 datastore = dfile;
59 try
60 {
61 db = Db4oFactory.OpenFile(datastore);
62 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Db4LocalStorage creation");
63 }
64 catch (Exception e)
65 {
66 db.Close();
67 OpenSim.Framework.Console.MainConsole.Instance.Warn("Db4LocalStorage :Constructor - Exception occured");
68 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
69 }
70 }
71
72 public void StorePrim(PrimData prim)
73 {
74 IObjectSet result = db.Query(new UUIDPrimQuery(prim.FullID));
75 if(result.Count>0)
76 {
77 //prim already in storage
78 //so update it
79 PrimData found = (PrimData) result.Next();
80 found.PathBegin = prim.PathBegin;
81 found.PathCurve= prim.PathCurve;
82 found.PathEnd = prim.PathEnd;
83 found.PathRadiusOffset = prim.PathRadiusOffset;
84 found.PathRevolutions = prim.PathRevolutions;
85 found.PathScaleX= prim.PathScaleX;
86 found.PathScaleY = prim.PathScaleY;
87 found.PathShearX = prim.PathShearX;
88 found.PathShearY = prim.PathShearY;
89 found.PathSkew = prim.PathSkew;
90 found.PathTaperX = prim.PathTaperX;
91 found.PathTaperY = prim.PathTaperY;
92 found.PathTwist = prim.PathTwist;
93 found.PathTwistBegin = prim.PathTwistBegin;
94 found.PCode = prim.PCode;
95 found.ProfileBegin = prim.ProfileBegin;
96 found.ProfileCurve = prim.ProfileCurve;
97 found.ProfileEnd = prim.ProfileEnd;
98 found.ProfileHollow = prim.ProfileHollow;
99 found.Position = prim.Position;
100 found.Rotation = prim.Rotation;
101 found.Texture = prim.Texture;
102 db.Set(found);
103 db.Commit();
104 }
105 else
106 {
107 //not in storage
108 db.Set(prim);
109 db.Commit();
110 }
111 }
112
113 public void RemovePrim(LLUUID primID)
114 {
115 IObjectSet result = db.Query(new UUIDPrimQuery(primID));
116 if(result.Count>0)
117 {
118 PrimData found = (PrimData) result.Next();
119 db.Delete(found);
120 }
121 }
122
123
124 public void LoadPrimitives(ILocalStorageReceiver receiver)
125 {
126 IObjectSet result = db.Get(typeof(PrimData));
127 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is "+result.Count);
128 foreach (PrimData prim in result) {
129 receiver.PrimFromStorage(prim);
130 }
131 }
132
133 public float[] LoadWorld()
134 {
135 OpenSim.Framework.Console.MainConsole.Instance.Verbose("LoadWorld() - Loading world....");
136 float[] heightmap = null;
137 OpenSim.Framework.Console.MainConsole.Instance.Verbose("LoadWorld() - Looking for a heightmap in local DB");
138 IObjectSet world_result = db.Get(typeof(MapStorage));
139 if (world_result.Count > 0)
140 {
141 OpenSim.Framework.Console.MainConsole.Instance.Verbose("LoadWorld() - Found a heightmap in local database, loading");
142 MapStorage map = (MapStorage)world_result.Next();
143 //blank.LandMap = map.Map;
144 heightmap = map.Map;
145 }
146 return heightmap;
147 }
148
149 public void SaveMap(float[] heightmap)
150 {
151 IObjectSet world_result = db.Get(typeof(MapStorage));
152 if (world_result.Count > 0)
153 {
154 OpenSim.Framework.Console.MainConsole.Instance.Verbose("SaveWorld() - updating saved copy of heightmap in local database");
155 MapStorage map = (MapStorage)world_result.Next();
156 db.Delete(map);
157 }
158 MapStorage map1 = new MapStorage();
159 map1.Map = heightmap; //OpenSim_Main.local_world.LandMap;
160 db.Set(map1);
161 db.Commit();
162 }
163
164 public void SaveParcel(ParcelData parcel)
165 {
166 IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID));
167 if (result.Count > 0)
168 {
169 //Old Parcel
170 ParcelData updateParcel = (ParcelData)result.Next();
171 updateParcel.AABBMax = parcel.AABBMax;
172 updateParcel.AABBMin = parcel.AABBMin;
173 updateParcel.area = parcel.area;
174 updateParcel.auctionID = parcel.auctionID;
175 updateParcel.authBuyerID = parcel.authBuyerID;
176 updateParcel.category = parcel.category;
177 updateParcel.claimDate = parcel.claimDate;
178 updateParcel.claimPrice = parcel.claimPrice;
179 updateParcel.groupID = parcel.groupID;
180 updateParcel.groupPrims = parcel.groupPrims;
181 updateParcel.isGroupOwned = parcel.isGroupOwned;
182 updateParcel.landingType = parcel.landingType;
183 updateParcel.mediaAutoScale = parcel.mediaAutoScale;
184 updateParcel.mediaID = parcel.mediaID;
185 updateParcel.mediaURL = parcel.mediaURL;
186 updateParcel.musicURL = parcel.musicURL;
187 updateParcel.localID = parcel.localID;
188 updateParcel.ownerID = parcel.ownerID;
189 updateParcel.passHours = parcel.passHours;
190 updateParcel.passPrice = parcel.passPrice;
191 updateParcel.parcelBitmapByteArray = (byte[])parcel.parcelBitmapByteArray.Clone();
192 updateParcel.parcelDesc = parcel.parcelDesc;
193 updateParcel.parcelFlags = parcel.parcelFlags;
194 updateParcel.parcelName = parcel.parcelName;
195 updateParcel.parcelStatus = parcel.parcelStatus;
196 updateParcel.salePrice = parcel.salePrice;
197 updateParcel.snapshotID = parcel.snapshotID;
198 updateParcel.userLocation = parcel.userLocation;
199 updateParcel.userLookAt = parcel.userLookAt;
200
201 db.Set(updateParcel);
202 }
203 else
204 {
205 db.Set(parcel);
206 }
207 db.Commit();
208 }
209
210 public void SaveParcels(ParcelData[] parcel_data)
211 {
212 MainConsole.Instance.Notice("Parcel Backup: Saving Parcels...");
213 int i;
214 for (i = 0; i < parcel_data.GetLength(0); i++)
215 {
216
217 SaveParcel(parcel_data[i]);
218
219 }
220 MainConsole.Instance.Notice("Parcel Backup: Parcel Save Complete");
221 }
222
223 public void RemoveParcel(ParcelData parcel)
224 {
225 IObjectSet result = db.Query(new UUIDParcelQuery(parcel.globalID));
226 if (result.Count > 0)
227 {
228 db.Delete(result[0]);
229 }
230 db.Commit();
231 }
232 public void RemoveAllParcels()
233 {
234 MainConsole.Instance.Notice("Parcel Backup: Removing all parcels...");
235 IObjectSet result = db.Get(typeof(ParcelData));
236 if (result.Count > 0)
237 {
238 foreach (ParcelData parcelData in result)
239 {
240 RemoveParcel(parcelData);
241 }
242 }
243 }
244
245 public void LoadParcels(ILocalStorageParcelReceiver recv)
246 {
247 MainConsole.Instance.Notice("Parcel Backup: Loading Parcels...");
248 IObjectSet result = db.Get(typeof(ParcelData));
249 if (result.Count > 0)
250 {
251 MainConsole.Instance.Notice("Parcel Backup: Parcels exist in database.");
252 foreach (ParcelData parcelData in result)
253 {
254
255 recv.ParcelFromStorage(parcelData);
256 }
257 }
258 else
259 {
260 MainConsole.Instance.Notice("Parcel Backup: No parcels exist. Creating basic parcel.");
261 recv.NoParcelDataFromStorage();
262 }
263 MainConsole.Instance.Notice("Parcel Backup: Parcels Restored");
264 }
265 public void ShutDown()
266 {
267 db.Commit();
268 db.Close();
269 }
270 }
271} \ No newline at end of file
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs
deleted file mode 100644
index 56387ac..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Storage.LocalStorageDb4o
33{
34 public class MapStorage
35 {
36 public float[] Map;
37
38 public MapStorage()
39 {
40
41 }
42 }
43} \ No newline at end of file
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj b/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj
deleted file mode 100644
index 5b8f1c1..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj
+++ /dev/null
@@ -1,116 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{E1B79ECF-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.Storage.LocalStorageDb4o</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.Storage.LocalStorageDb4o</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="Db4objects.Db4o.dll" >
62 <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="libsecondlife.dll" >
66 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System" >
70 <HintPath>System.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="System.Xml" >
74 <HintPath>System.Xml.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup>
78 <ItemGroup>
79 <ProjectReference Include="..\..\..\Common\OpenSim.Framework\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="..\..\..\Common\OpenSim.Framework.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="AssemblyInfo.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="Db4LocalStorage.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="MapStorage.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="UUIDParcelQuery.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 <Compile Include="UUIDPrimQuery.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.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build b/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
deleted file mode 100644
index 739b98c..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
+++ /dev/null
@@ -1,48 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.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.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/OpenSim.Storage/LocalStorageDb4o/UUIDParcelQuery.cs
deleted file mode 100644
index d24fb5f..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDParcelQuery.cs
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using Db4objects.Db4o;
32using Db4objects.Db4o.Query;
33using libsecondlife;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36
37namespace OpenSim.Storage.LocalStorageDb4o
38{
39 public class UUIDParcelQuery : Predicate
40 {
41 private LLUUID globalIDSearch;
42
43 public UUIDParcelQuery(LLUUID find)
44 {
45 globalIDSearch = find;
46 }
47 public bool Match(ParcelData parcel)
48 {
49 return (parcel.globalID == globalIDSearch);
50 }
51 }
52}
diff --git a/OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDPrimQuery.cs b/OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDPrimQuery.cs
deleted file mode 100644
index b2e8a91..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageDb4o/UUIDPrimQuery.cs
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using Db4objects.Db4o;
32using Db4objects.Db4o.Query;
33using libsecondlife;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36
37namespace OpenSim.Storage.LocalStorageDb4o
38{
39 public class UUIDPrimQuery : Predicate
40 {
41 private LLUUID _findID;
42
43 public UUIDPrimQuery(LLUUID find)
44 {
45 _findID = find;
46 }
47 public bool Match(PrimData prim)
48 {
49 return (prim.FullID == _findID);
50 }
51 }
52}
diff --git a/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj b/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj
deleted file mode 100644
index ff93a8f..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.csproj
+++ /dev/null
@@ -1,111 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{6B20B603-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.Storage.LocalStorageSQLite</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.Storage.LocalStorageSQLite</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="..\..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj">
84 <Name>OpenSim.Framework</Name>
85 <Project>{8ACA2445-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.Console\OpenSim.Framework.Console.csproj">
90 <Name>OpenSim.Framework.Console</Name>
91 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private>
94 </ProjectReference>
95 </ItemGroup>
96 <ItemGroup>
97 <Compile Include="SQLiteLocalStorage.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/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build b/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build
deleted file mode 100644
index bd4c731..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/OpenSim.Storage.LocalStorageSQLite.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.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.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/Properties/AssemblyInfo.cs b/OpenSim/OpenSim.Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs
deleted file mode 100644
index fe81f8a..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Storage.LocalStorageSQLite")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Storage.LocalStorageSQLite")]
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("ecd6e0c1-7909-413e-9e3f-659678ac3bc3")]
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.*")]
35[assembly: AssemblyFileVersion("1.0.0.*")]
diff --git a/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
deleted file mode 100644
index 8106727..0000000
--- a/OpenSim/OpenSim.Storage/LocalStorageSQLite/SQLiteLocalStorage.cs
+++ /dev/null
@@ -1,199 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29// SQLite Support
30// A bad idea, but the IRC people told me to!
31
32using System;
33using System.Collections.Generic;
34using System.Data;
35using System.Data.SQLite;
36using libsecondlife;
37using OpenSim.Framework.Interfaces;
38using OpenSim.Framework.Types;
39using OpenSim.Framework.Terrain;
40
41namespace OpenSim.Storage.LocalStorageSQLite
42{
43 public class SQLiteLocalStorage : ILocalStorage
44 {
45 IDbConnection db;
46
47 public SQLiteLocalStorage()
48 {
49 try
50 {
51 string connectionstring = "URI=file:localsim.sdb";
52 db = (IDbConnection)new SQLiteConnection(connectionstring);
53 db.Open();
54 }
55 catch (Exception e)
56 {
57 db.Close();
58 OpenSim.Framework.Console.MainConsole.Instance.Warn("SQLiteLocalStorage :Constructor - Exception occured");
59 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
60 }
61 }
62
63 public void Initialise(string file)
64 {
65 // Blank
66 }
67
68 public void StorePrim(PrimData prim)
69 {
70 IDbCommand cmd = db.CreateCommand();
71
72 //SECURITY WARNING:
73 // These parameters wont produce SQL injections since they are all integer based, however.
74 // if inserting strings such as name or description, you will need to use appropriate
75 // measures to prevent SQL injection (although the value of SQL injection in this is limited).
76
77 string sql = "REPLACE INTO prim (OwnerID,PCode,PathBegin,PathEnd,PathScaleX,PathScaleY,PathShearX,PathShearY,PathSkew,ProfileBegin,ProfileEnd,Scale,PathCurve,ProfileCurve,ParentID,ProfileHollow,PathRadiusOffset,PathRevolutions,PathTaperX,PathTaperY,PathTwist,PathTwistBegin,Texture,CreationDate,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,Position,Rotation,LocalID,FullID) ";
78 sql += "VALUES (";
79 sql += "\"" + prim.OwnerID.ToStringHyphenated() + "\","; // KILL ME NOW!
80 sql += "\"" + prim.PCode.ToString() + "\",";
81 sql += "\"" + prim.PathBegin.ToString() + "\",";
82 sql += "\"" + prim.PathEnd.ToString() + "\",";
83 sql += "\"" + prim.PathScaleX.ToString() + "\",";
84 sql += "\"" + prim.PathScaleY.ToString() + "\",";
85 sql += "\"" + prim.PathShearX.ToString() + "\",";
86 sql += "\"" + prim.PathShearY.ToString() + "\",";
87 sql += "\"" + prim.PathSkew.ToString() + "\",";
88 sql += "\"" + prim.ProfileBegin.ToString() + "\",";
89 sql += "\"" + prim.ProfileEnd.ToString() + "\",";
90 sql += "\"" + prim.Scale.ToString() + "\",";
91 sql += "\"" + prim.PathCurve.ToString() + "\",";
92 sql += "\"" + prim.ProfileCurve.ToString() + "\",";
93 sql += "\"" + prim.ParentID.ToString() + "\",";
94 sql += "\"" + prim.ProfileHollow.ToString() + "\",";
95 sql += "\"" + prim.PathRadiusOffset.ToString() + "\",";
96 sql += "\"" + prim.PathRevolutions.ToString() + "\",";
97 sql += "\"" + prim.PathTaperX.ToString() + "\",";
98 sql += "\"" + prim.PathTaperY.ToString() + "\",";
99 sql += "\"" + prim.PathTwist.ToString() + "\",";
100 sql += "\"" + prim.PathTwistBegin.ToString() + "\",";
101 sql += "\"" + prim.Texture.ToString() + "\",";
102 sql += "\"" + prim.CreationDate.ToString() + "\",";
103 sql += "\"" + prim.OwnerMask.ToString() + "\",";
104 sql += "\"" + prim.NextOwnerMask.ToString() + "\",";
105 sql += "\"" + prim.GroupMask.ToString() + "\",";
106 sql += "\"" + prim.EveryoneMask.ToString() + "\",";
107 sql += "\"" + prim.BaseMask.ToString() + "\",";
108 sql += "\"" + prim.Position.ToString() + "\",";
109 sql += "\"" + prim.Rotation.ToString() + "\",";
110 sql += "\"" + prim.LocalID.ToString() + "\",";
111 sql += "\"" + prim.FullID.ToString() + "\")";
112
113 cmd.CommandText = sql;
114
115 try
116 {
117 cmd.ExecuteNonQuery();
118 }
119 catch (Exception e)
120 {
121 OpenSim.Framework.Console.MainConsole.Instance.Warn("SQLiteLocalStorage :StorePrim - Exception occured");
122 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
123 }
124
125 cmd.Dispose();
126 cmd = null;
127 }
128
129 public void RemovePrim(LLUUID primID)
130 {
131 IDbCommand cmd = db.CreateCommand();
132
133 //SECURITY WARNING:
134 // These parameters wont produce SQL injections since they are all integer based, however.
135 // if inserting strings such as name or description, you will need to use appropriate
136 // measures to prevent SQL injection (although the value of SQL injection in this is limited).
137
138 string sql = "DELETE FROM prim WHERE FullID = \"" + primID.ToStringHyphenated() + "\"";
139
140 cmd.CommandText = sql;
141
142 try
143 {
144 cmd.ExecuteNonQuery();
145 }
146 catch (Exception e)
147 {
148 OpenSim.Framework.Console.MainConsole.Instance.Warn("SQLiteLocalStorage :RemovePrim - Exception occured");
149 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
150 }
151
152 cmd.Dispose();
153 cmd = null;
154 }
155
156 public void LoadPrimitives(ILocalStorageReceiver receiver)
157 {
158
159 }
160
161 public float[] LoadWorld()
162 {
163 return new float[65536];
164 }
165
166 public void SaveMap(float[] heightmap)
167 {
168
169 }
170
171 public void SaveParcels(ParcelData[] parcel_manager)
172 {
173
174 }
175
176 public void SaveParcel(ParcelData parcel)
177 {
178 }
179
180 public void RemoveParcel(ParcelData parcel)
181 {
182 }
183
184 public void RemoveAllParcels()
185 {
186 }
187
188 public void LoadParcels(ILocalStorageParcelReceiver recv)
189 {
190 recv.NoParcelDataFromStorage();
191 }
192
193 public void ShutDown()
194 {
195 db.Close();
196 db = null;
197 }
198 }
199} \ No newline at end of file
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj b/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj
deleted file mode 100644
index aae0ab8..0000000
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.csproj
+++ /dev/null
@@ -1,99 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{2270B8FE-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.Terrain.BasicTerrain</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.Terrain.BasicTerrain</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="libTerrain-BSD.dll" >
62 <HintPath>..\..\bin\libTerrain-BSD.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.Drawing" >
74 <HintPath>System.Drawing.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 </ItemGroup>
84 <ItemGroup>
85 <Compile Include="TerrainEngine.cs">
86 <SubType>Code</SubType>
87 </Compile>
88 <Compile Include="Properties\AssemblyInfo.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.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build b/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build
deleted file mode 100644
index 6526648..0000000
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/OpenSim.Terrain.BasicTerrain.dll.build
+++ /dev/null
@@ -1,44 +0,0 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Terrain.BasicTerrain" 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.Terrain.BasicTerrain" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="TerrainEngine.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/libTerrain-BSD.dll" />
23 <include name="System.dll" />
24 <include name="System.Data.dll" />
25 <include name="System.Drawing.dll" />
26 <include name="System.Xml.dll" />
27 </references>
28 </csc>
29 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
30 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
31 <copy todir="${project::get-base-directory()}/../../bin/">
32 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
33 <include name="*.dll"/>
34 <include name="*.exe"/>
35 </fileset>
36 </copy>
37 </target>
38 <target name="clean">
39 <delete dir="${bin.dir}" failonerror="false" />
40 <delete dir="${obj.dir}" failonerror="false" />
41 </target>
42 <target name="doc" description="Creates documentation.">
43 </target>
44</project>
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/Properties/AssemblyInfo.cs b/OpenSim/OpenSim.Terrain.BasicTerrain/Properties/AssemblyInfo.cs
deleted file mode 100644
index bd74993..0000000
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Terrain.BasicTerrain")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenSim.Terrain.BasicTerrain")]
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("3263f5b5-0a41-4ed5-91a2-9baaaeecc849")]
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.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
deleted file mode 100644
index 373d6ad..0000000
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
+++ /dev/null
@@ -1,533 +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.Drawing;
32using libTerrain;
33
34namespace OpenSim.Terrain
35{
36 public class TerrainEngine
37 {
38 /// <summary>
39 /// A [normally] 256x256 heightmap
40 /// </summary>
41 public Channel heightmap;
42
43 /// <summary>
44 /// Whether or not the terrain has been modified since it was last saved and sent to the Physics engine.
45 /// Counts the number of modifications since the last save. (0 = Untainted)
46 /// </summary>
47 public int tainted;
48
49 int w, h;
50
51 /// <summary>
52 /// Generate a new TerrainEngine instance and creates a new heightmap
53 /// </summary>
54 public TerrainEngine()
55 {
56 w = 256;
57 h = 256;
58 heightmap = new Channel(w, h);
59
60 tainted++;
61 }
62
63 /// <summary>
64 /// Converts the heightmap to a 65536 value 1D floating point array
65 /// </summary>
66 /// <returns>A float[65536] array containing the heightmap</returns>
67 public float[] getHeights1D()
68 {
69 float[] heights = new float[w * h];
70 int i;
71
72 for (i = 0; i < w * h; i++)
73 {
74 heights[i] = (float)heightmap.map[i / w, i % w];
75 }
76
77 return heights;
78 }
79
80 /// <summary>
81 /// Converts the heightmap to a 256x256 value 2D floating point array.
82 /// </summary>
83 /// <returns>An array of 256,256 values containing the heightmap</returns>
84 public float[,] getHeights2D()
85 {
86 float[,] heights = new float[w, h];
87 int x, y;
88 for (x = 0; x < w; x++)
89 {
90 for (y = 0; y < h; y++)
91 {
92 heights[x, y] = (float)heightmap.map[x, y];
93 }
94 }
95 return heights;
96 }
97
98 /// <summary>
99 /// Imports a 1D floating point array into the 2D heightmap array
100 /// </summary>
101 /// <param name="heights">The array to import (must have 65536 members)</param>
102 public void setHeights1D(float[] heights)
103 {
104 int i;
105 for (i = 0; i < w * h; i++)
106 {
107 heightmap.map[i / w, i % w] = heights[i];
108 }
109
110 tainted++;
111 }
112
113 /// <summary>
114 /// Loads a 2D array of values into the heightmap
115 /// </summary>
116 /// <param name="heights">An array of 256,256 float values</param>
117 public void setHeights2D(float[,] heights)
118 {
119 int x, y;
120 for (x = 0; x < w; x++)
121 {
122 for (y = 0; y < h; y++)
123 {
124 heightmap.set(x, y, (double)heights[x, y]);
125 }
126 }
127 tainted++;
128 }
129
130 /// <summary>
131 /// Processes a terrain-specific command
132 /// </summary>
133 /// <param name="args">Commandline arguments (space seperated)</param>
134 /// <param name="resultText">Reference that returns error or help text if returning false</param>
135 /// <returns>If the operation was successful (if not, the error is placed into resultText)</returns>
136 public bool RunTerrainCmd(string[] args, ref string resultText)
137 {
138 string command = args[0];
139
140 try
141 {
142
143 switch (command)
144 {
145 case "help":
146 resultText += "terrain regenerate - rebuilds the sims terrain using a default algorithm\n";
147 resultText += "terrain seed <seed> - sets the random seed value to <seed>\n";
148 resultText += "terrain load <type> <filename> - loads a terrain from disk, type can be 'F32', 'F64', 'RAW' or 'IMG'\n";
149 resultText += "terrain save <type> <filename> - saves a terrain to disk, type can be 'F32' or 'F64'\n";
150 resultText += "terrain save grdmap <filename> <gradient map> - creates a PNG snapshot of the region using a named gradient map\n";
151 resultText += "terrain rescale <min> <max> - rescales a terrain to be between <min> and <max> meters high\n";
152 resultText += "terrain erode aerobic <windspeed> <pickupmin> <dropmin> <carry> <rounds> <lowest>\n";
153 resultText += "terrain erode thermal <talus> <rounds> <carry>\n";
154 resultText += "terrain multiply <val> - multiplies a terrain by <val>\n";
155 return false;
156
157 case "seed":
158 setSeed(Convert.ToInt32(args[1]));
159 break;
160
161 case "erode":
162 switch (args[1].ToLower())
163 {
164 case "aerobic":
165 // WindSpeed, PickupMinimum,DropMinimum,Carry,Rounds,Lowest
166 heightmap.AerobicErosion(Convert.ToDouble(args[2]), Convert.ToDouble(args[3]), Convert.ToDouble(args[4]), Convert.ToDouble(args[5]), Convert.ToInt32(args[6]), Convert.ToBoolean(args[7]));
167 break;
168 case "thermal":
169 heightmap.thermalWeathering(Convert.ToDouble(args[2]), Convert.ToInt32(args[3]), Convert.ToDouble(args[4]));
170 break;
171 default:
172 resultText = "Unknown erosion type";
173 return false;
174 }
175 break;
176
177 case "regenerate":
178 hills();
179 break;
180
181 case "rescale":
182 setRange(Convert.ToSingle(args[1]), Convert.ToSingle(args[2]));
183 break;
184
185 case "multiply":
186 heightmap *= Convert.ToDouble(args[1]);
187 break;
188
189 case "load":
190 switch (args[1].ToLower())
191 {
192 case "f32":
193 loadFromFileF32(args[2]);
194 break;
195
196 case "f64":
197 loadFromFileF64(args[2]);
198 break;
199
200 case "raw":
201 loadFromFileSLRAW(args[2]);
202 break;
203
204 case "img":
205 loadFromFileIMG(args[2]);
206 return false;
207
208 default:
209 resultText = "Unknown image or data format";
210 return false;
211 }
212 break;
213
214 case "save":
215 switch (args[1].ToLower())
216 {
217 case "f32":
218 writeToFileF32(args[2]);
219 break;
220
221 case "f64":
222 writeToFileF64(args[2]);
223 break;
224
225 case "grdmap":
226 exportImage(args[2], args[3]);
227 break;
228
229 default:
230 resultText = "Unknown image or data format";
231 return false;
232 }
233 break;
234
235 default:
236 resultText = "Unknown terrain command";
237 return false;
238 }
239 return true;
240 }
241 catch (Exception e)
242 {
243 resultText = "Error running terrain command: " + e.ToString();
244 return false;
245 }
246 }
247
248 /// <summary>
249 /// Renormalises the array between min and max
250 /// </summary>
251 /// <param name="min">Minimum value of the new array</param>
252 /// <param name="max">Maximum value of the new array</param>
253 public void setRange(float min, float max)
254 {
255 heightmap.normalise((double)min, (double)max);
256 tainted++;
257 }
258
259 /// <summary>
260 /// Loads a file from an image compatible with System.Drawing
261 /// </summary>
262 /// <param name="filename">File to load</param>
263 public void loadFromFileIMG(string filename)
264 {
265 System.Drawing.Bitmap bmp = new Bitmap(filename);
266
267 if (bmp.Width != heightmap.w && bmp.Height != heightmap.h)
268 throw new Exception("Wrong image size! Images for this region must be " + heightmap.w.ToString() + " by " + heightmap.h.ToString() + " pixels in dimension");
269
270 int x, y;
271
272 for (x = 0; x < w; x++)
273 {
274 for (y = 0; y < h; y++)
275 {
276 Color c = bmp.GetPixel(x, y);
277 }
278 }
279 }
280
281 /// <summary>
282 /// Loads a file consisting of 256x256 doubles and imports it as an array into the map.
283 /// </summary>
284 /// <remarks>TODO: Move this to libTerrain itself</remarks>
285 /// <param name="filename">The filename of the double array to import</param>
286 public void loadFromFileF64(string filename)
287 {
288 System.IO.FileInfo file = new System.IO.FileInfo(filename);
289 System.IO.FileStream s = file.Open(System.IO.FileMode.Open, System.IO.FileAccess.Read);
290 System.IO.BinaryReader bs = new System.IO.BinaryReader(s);
291 int x, y;
292 for (x = 0; x < w; x++)
293 {
294 for (y = 0; y < h; y++)
295 {
296 heightmap.map[x, y] = bs.ReadDouble();
297 }
298 }
299
300 bs.Close();
301 s.Close();
302
303 tainted++;
304 }
305
306 /// <summary>
307 /// Loads a file consisting of 256x256 floats and imports it as an array into the map.
308 /// </summary>
309 /// <remarks>TODO: Move this to libTerrain itself</remarks>
310 /// <param name="filename">The filename of the float array to import</param>
311 public void loadFromFileF32(string filename)
312 {
313 System.IO.FileInfo file = new System.IO.FileInfo(filename);
314 System.IO.FileStream s = file.Open(System.IO.FileMode.Open, System.IO.FileAccess.Read);
315 System.IO.BinaryReader bs = new System.IO.BinaryReader(s);
316 int x, y;
317 for (x = 0; x < w; x++)
318 {
319 for (y = 0; y < h; y++)
320 {
321 heightmap.map[x, y] = (double)bs.ReadSingle();
322 }
323 }
324
325 bs.Close();
326 s.Close();
327
328 tainted++;
329 }
330
331 /// <summary>
332 /// Loads a file formatted in the SL .RAW Format used on the main grid
333 /// </summary>
334 /// <remarks>This file format stinks and is best avoided.</remarks>
335 /// <param name="filename">A path to the .RAW format</param>
336 public void loadFromFileSLRAW(string filename)
337 {
338 System.IO.FileInfo file = new System.IO.FileInfo(filename);
339 System.IO.FileStream s = file.Open(System.IO.FileMode.Open, System.IO.FileAccess.Read);
340 System.IO.BinaryReader bs = new System.IO.BinaryReader(s);
341 int x, y;
342 for (x = 0; x < w; x++)
343 {
344 for (y = 0; y < h; y++)
345 {
346 heightmap.map[x, y] = (double)bs.ReadByte() * ((double)bs.ReadByte() / 127.0);
347 bs.ReadBytes(11); // Advance the stream to next bytes.
348 }
349 }
350
351 bs.Close();
352 s.Close();
353
354 tainted++;
355 }
356
357 /// <summary>
358 /// Writes the current terrain heightmap to disk, in the format of a 65536 entry double[] array.
359 /// </summary>
360 /// <param name="filename">The desired output filename</param>
361 public void writeToFileF64(string filename)
362 {
363 System.IO.FileInfo file = new System.IO.FileInfo(filename);
364 System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write);
365 System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s);
366
367 int x, y;
368 for (x = 0; x < w; x++)
369 {
370 for (y = 0; y < h; y++)
371 {
372 bs.Write(heightmap.get(x, y));
373 }
374 }
375
376 bs.Close();
377 s.Close();
378 }
379
380 /// <summary>
381 /// Writes the current terrain heightmap to disk, in the format of a 65536 entry float[] array
382 /// </summary>
383 /// <param name="filename">The desired output filename</param>
384 public void writeToFileF32(string filename)
385 {
386 System.IO.FileInfo file = new System.IO.FileInfo(filename);
387 System.IO.FileStream s = file.Open(System.IO.FileMode.CreateNew, System.IO.FileAccess.Write);
388 System.IO.BinaryWriter bs = new System.IO.BinaryWriter(s);
389
390 int x, y;
391 for (x = 0; x < w; x++)
392 {
393 for (y = 0; y < h; y++)
394 {
395 bs.Write((float)heightmap.get(x, y));
396 }
397 }
398
399 bs.Close();
400 s.Close();
401 }
402
403 /// <summary>
404 /// Sets the random seed to be used by procedural functions which involve random numbers.
405 /// </summary>
406 /// <param name="val">The desired seed</param>
407 public void setSeed(int val)
408 {
409 heightmap.seed = val;
410 }
411
412 /// <summary>
413 /// Raises land in a sphere around the specified coordinates
414 /// </summary>
415 /// <param name="rx">Center of the sphere on the X axis</param>
416 /// <param name="ry">Center of the sphere on the Y axis</param>
417 /// <param name="size">The radius of the sphere</param>
418 /// <param name="amount">Scale the height of the sphere by this amount (recommended 0..2)</param>
419 public void raise(double rx, double ry, double size, double amount)
420 {
421 lock (heightmap)
422 {
423 heightmap.raise(rx, ry, size, amount);
424 }
425
426 tainted++;
427 }
428
429 /// <summary>
430 /// Lowers the land in a sphere around the specified coordinates
431 /// </summary>
432 /// <param name="rx">The center of the sphere at the X axis</param>
433 /// <param name="ry">The center of the sphere at the Y axis</param>
434 /// <param name="size">The radius of the sphere in meters</param>
435 /// <param name="amount">Scale the height of the sphere by this amount (recommended 0..2)</param>
436 public void lower(double rx, double ry, double size, double amount)
437 {
438 lock (heightmap)
439 {
440 heightmap.lower(rx, ry, size, amount);
441 }
442
443 tainted++;
444 }
445
446 /// <summary>
447 /// Generates a simple set of hills in the shape of an island
448 /// </summary>
449 public void hills()
450 {
451 lock (heightmap)
452 {
453 heightmap.hillsSpheres(200, 20, 40, true, true, false);
454 heightmap.normalise();
455 heightmap *= 60.0; // Raise to 60m
456 }
457
458 tainted++;
459 }
460
461 /// <summary>
462 /// Multiplies the heightfield by val
463 /// </summary>
464 /// <param name="meep">The heightfield</param>
465 /// <param name="val">The multiplier</param>
466 /// <returns></returns>
467 public static TerrainEngine operator *(TerrainEngine meep, Double val)
468 {
469 meep.heightmap *= val;
470 meep.tainted++;
471 return meep;
472 }
473
474 /// <summary>
475 /// Returns the height at the coordinates x,y
476 /// </summary>
477 /// <param name="x">X Coordinate</param>
478 /// <param name="y">Y Coordinate</param>
479 /// <returns></returns>
480 public float this[int x, int y]
481 {
482 get
483 {
484 return (float)heightmap.get(x, y);
485 }
486 set
487 {
488 tainted++;
489 heightmap.set(x, y, (double)value);
490 }
491 }
492
493 /// <summary>
494 /// Exports the current heightmap to a PNG file
495 /// </summary>
496 /// <param name="filename">The destination filename for the image</param>
497 /// <param name="gradientmap">A 1x*height* image which contains the colour gradient to export with. Must be at least 1x2 pixels, 1x256 or more is ideal.</param>
498 public void exportImage(string filename, string gradientmap)
499 {
500 try
501 {
502 Bitmap gradientmapLd = new Bitmap(gradientmap);
503
504 int pallete = gradientmapLd.Height;
505
506 Bitmap bmp = new Bitmap(heightmap.w, heightmap.h);
507 Color[] colours = new Color[pallete];
508
509 for (int i = 0; i < pallete; i++)
510 {
511 colours[i] = gradientmapLd.GetPixel(0, i);
512 }
513
514 Channel copy = heightmap.copy();
515 for (int x = 0; x < copy.w; x++)
516 {
517 for (int y = 0; y < copy.h; y++)
518 {
519 // 512 is the largest possible height before colours clamp
520 int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(x, y) / 512.0), 0.0) * pallete);
521 bmp.SetPixel(y, 255 - x, colours[colorindex]);
522 }
523 }
524
525 bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Png);
526 }
527 catch (Exception e)
528 {
529 Console.WriteLine("Failed generating terrain map: " + e.ToString());
530 }
531 }
532 }
533} \ No newline at end of file
diff --git a/OpenSim/OpenSim/Application.cs b/OpenSim/OpenSim/Application.cs
deleted file mode 100644
index dec0029..0000000
--- a/OpenSim/OpenSim/Application.cs
+++ /dev/null
@@ -1,137 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using OpenSim.UserServer;
33using OpenSim.Framework.Console;
34using OpenSim.RegionServer;
35
36namespace OpenSim
37{
38 public class Application
39 {
40 //could move our main function into OpenSimMain and kill this class
41 [STAThread]
42 public static void Main(string[] args)
43 {
44 try
45 {
46 Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
47 Console.WriteLine("Starting...\n");
48
49 bool sandBoxMode = false;
50 bool startLoginServer = false;
51 string physicsEngine = "basicphysics";
52 bool allowFlying = false;
53 bool userAccounts = false;
54 bool gridLocalAsset = false;
55 bool useConfigFile = false;
56 bool silent = false;
57 string configFile = "simconfig.xml";
58
59 for (int i = 0; i < args.Length; i++)
60 {
61 if (args[i] == "-sandbox")
62 {
63 sandBoxMode = true;
64 userAccounts = true;
65 startLoginServer = true;
66 }
67 /*
68 if (args[i] == "-loginserver")
69 {
70 startLoginServer = true;
71 }*/
72 if (args[i] == "-accounts")
73 {
74 userAccounts = true;
75 }
76 if (args[i] == "-realphysx")
77 {
78 physicsEngine = "RealPhysX";
79 allowFlying = true;
80 }
81 if (args[i] == "-ode")
82 {
83 physicsEngine = "OpenDynamicsEngine";
84 allowFlying = true;
85 }
86 if (args[i] == "-localasset")
87 {
88 gridLocalAsset = true;
89 }
90 if (args[i] == "-configfile")
91 {
92 useConfigFile = true;
93 }
94 if (args[i] == "-noverbose")
95 {
96 silent = true;
97 }
98 if (args[i] == "-config")
99 {
100 try
101 {
102 i++;
103 configFile = args[i];
104 }
105 catch (Exception e)
106 {
107 Console.WriteLine("-config: Please specify a config file. (" + e.ToString() + ")");
108 }
109 }
110 }
111
112 OpenSimMain sim = new OpenSimMain(sandBoxMode, startLoginServer, physicsEngine, useConfigFile, silent, configFile);
113 // OpenSimRoot.Instance.Application = sim;
114 sim.m_sandbox = sandBoxMode;
115 sim.user_accounts = userAccounts;
116 sim.gridLocalAsset = gridLocalAsset;
117 OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying = allowFlying;
118
119 sim.StartUp();
120
121 while (true)
122 {
123 OpenSim.Framework.Console.MainConsole.Instance.MainConsolePrompt();
124 }
125 }
126 finally
127 {
128 /// Ensure that all sockets have been closed before the process closes. This helps ensure that no
129 /// open ports are left open on process that '<do not exist>'. This is in the finally block, as it
130 /// should be done regardless of whether a exception closes the application, or if the application
131 /// is closed normally.
132
133 OpenSim.Servers.SocketRegistry.UnregisterAllAndClose();
134 }
135 }
136 }
137}
diff --git a/OpenSim/OpenSim/OpenSim.csproj b/OpenSim/OpenSim/OpenSim.csproj
deleted file mode 100644
index f55735f..0000000
--- a/OpenSim/OpenSim/OpenSim.csproj
+++ /dev/null
@@ -1,147 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{438A9556-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</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</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="Axiom.MathLib.dll" >
62 <HintPath>..\..\bin\Axiom.MathLib.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="Db4objects.Db4o.dll" >
66 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="libsecondlife.dll" >
70 <HintPath>..\..\bin\libsecondlife.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="System.Xml" >
78 <HintPath>System.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 <ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj">
84 <Name>OpenSim.Framework</Name>
85 <Project>{8ACA2445-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.Console\OpenSim.Framework.Console.csproj">
90 <Name>OpenSim.Framework.Console</Name>
91 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private>
94 </ProjectReference>
95 <ProjectReference Include="..\..\Common\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj">
96 <Name>OpenSim.GenericConfig.Xml</Name>
97 <Project>{E88EF749-0000-0000-0000-000000000000}</Project>
98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
99 <Private>False</Private>
100 </ProjectReference>
101 <ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj">
102 <Name>OpenSim.Physics.Manager</Name>
103 <Project>{8BE16150-0000-0000-0000-000000000000}</Project>
104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
105 <Private>False</Private>
106 </ProjectReference>
107 <ProjectReference Include="..\OpenSim.RegionServer\OpenSim.RegionServer.csproj">
108 <Name>OpenSim.RegionServer</Name>
109 <Project>{632E1BFD-0000-0000-0000-000000000000}</Project>
110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
111 <Private>False</Private>
112 </ProjectReference>
113 <ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj">
114 <Name>OpenSim.Servers</Name>
115 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
116 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
117 <Private>False</Private>
118 </ProjectReference>
119 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj">
120 <Name>OpenSim.Terrain.BasicTerrain</Name>
121 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project>
122 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
123 <Private>False</Private>
124 </ProjectReference>
125 <ProjectReference Include="..\..\Common\XmlRpcCS\XMLRPC.csproj">
126 <Name>XMLRPC</Name>
127 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
128 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
129 <Private>False</Private>
130 </ProjectReference>
131 </ItemGroup>
132 <ItemGroup>
133 <Compile Include="Application.cs">
134 <SubType>Code</SubType>
135 </Compile>
136 <Compile Include="OpenSimMain.cs">
137 <SubType>Code</SubType>
138 </Compile>
139 </ItemGroup>
140 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
141 <PropertyGroup>
142 <PreBuildEvent>
143 </PreBuildEvent>
144 <PostBuildEvent>
145 </PostBuildEvent>
146 </PropertyGroup>
147</Project>
diff --git a/OpenSim/OpenSim/OpenSim.exe.build b/OpenSim/OpenSim/OpenSim.exe.build
deleted file mode 100644
index 784c9ca..0000000
--- a/OpenSim/OpenSim/OpenSim.exe.build
+++ /dev/null
@@ -1,52 +0,0 @@
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 </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/Db4objects.Db4o.dll" />
24 <include name="../../bin/libsecondlife.dll" />
25 <include name="../../bin/OpenSim.Framework.dll" />
26 <include name="../../bin/OpenSim.Framework.Console.dll" />
27 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
28 <include name="../../bin/OpenSim.Physics.Manager.dll" />
29 <include name="../../bin/OpenSim.RegionServer.dll" />
30 <include name="../../bin/OpenSim.Servers.dll" />
31 <include name="../../bin/OpenSim.Terrain.BasicTerrain.dll" />
32 <include name="System.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/OpenSim/OpenSimMain.cs b/OpenSim/OpenSim/OpenSimMain.cs
deleted file mode 100644
index 0a316bd..0000000
--- a/OpenSim/OpenSim/OpenSimMain.cs
+++ /dev/null
@@ -1,552 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29using System;
30using System.Text;
31using System.IO;
32using System.Threading;
33using System.Net;
34using System.Net.Sockets;
35using System.Timers;
36using System.Reflection;
37using System.Collections;
38using System.Collections.Generic;
39using libsecondlife;
40using libsecondlife.Packets;
41using OpenSim.RegionServer;
42
43using OpenSim.RegionServer.Simulator;
44using OpenSim.Terrain;
45using OpenSim.Framework.Interfaces;
46using OpenSim.Framework.Types;
47using OpenSim.UserServer;
48using OpenSim.RegionServer.Assets;
49using OpenSim.RegionServer.CAPS;
50using OpenSim.Framework.Console;
51using OpenSim.Physics.Manager;
52using Nwc.XmlRpc;
53using OpenSim.Servers;
54using OpenSim.GenericConfig;
55
56namespace OpenSim
57{
58
59 public class OpenSimMain : OpenSim.RegionServer.RegionServerBase, conscmd_callback
60 {
61 private CheckSumServer checkServer;
62
63 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
64 {
65 this.configFileSetup = useConfigFile;
66 m_sandbox = sandBoxMode;
67 m_loginserver = startLoginServer;
68 m_physicsEngine = physicsEngine;
69 m_config = configFile;
70
71 m_console = new ConsoleBase("region-console-" + Guid.NewGuid().ToString() + ".log", "Region", this, silent);
72 OpenSim.Framework.Console.MainConsole.Instance = m_console;
73 }
74
75 /// <summary>
76 /// Performs initialisation of the world, such as loading configuration from disk.
77 /// </summary>
78 public override void StartUp()
79 {
80 this.regionData = new RegionInfo();
81
82 this.localConfig = new XmlConfig(m_config);
83 this.localConfig.LoadData();
84
85 if (this.configFileSetup)
86 {
87 this.SetupFromConfigFile(this.localConfig);
88 }
89 m_console.Notice("Main.cs:Startup() - Loading configuration");
90 this.regionData.InitConfig(this.m_sandbox, this.localConfig);
91 this.localConfig.Close();//for now we can close it as no other classes read from it , but this should change
92
93 GridServers = new Grid();
94 if (m_sandbox)
95 {
96 this.SetupLocalGridServers();
97 //Authenticate Session Handler
98 AuthenticateSessionsLocal authen = new AuthenticateSessionsLocal();
99 this.AuthenticateSessionsHandler = authen;
100 this.checkServer = new CheckSumServer(12036);
101 this.checkServer.ServerListener();
102 }
103 else
104 {
105 this.SetupRemoteGridServers();
106 //Authenticate Session Handler
107 AuthenticateSessionsRemote authen = new AuthenticateSessionsRemote();
108 this.AuthenticateSessionsHandler = authen;
109 }
110
111 startuptime = DateTime.Now;
112
113
114 AssetCache = new AssetCache(GridServers.AssetServer);
115 InventoryCache = new InventoryCache();
116
117
118 m_udpServer = new UDPServer(this.regionData.IPListenPort, this.GridServers, this.AssetCache, this.InventoryCache, this.regionData, this.m_sandbox, this.user_accounts, this.m_console, this.AuthenticateSessionsHandler);
119
120 //should be passing a IGenericConfig object to these so they can read the config data they want from it
121 GridServers.AssetServer.SetServerInfo(regionData.AssetURL, regionData.AssetSendKey);
122 IGridServer gridServer = GridServers.GridServer;
123 gridServer.SetServerInfo(regionData.GridURL, regionData.GridSendKey, regionData.GridRecvKey);
124
125 if (!m_sandbox)
126 {
127 this.ConnectToRemoteGridServer();
128 }
129
130 this.SetupLocalWorld();
131
132 if (m_sandbox)
133 {
134 AssetCache.LoadDefaultTextureSet();
135 }
136
137 m_console.Notice("Main.cs:Startup() - Initialising HTTP server");
138
139 this.SetupHttpListener();
140
141 //Login server setup
142 LoginServer loginServer = null;
143 LoginServer adminLoginServer = null;
144
145 bool sandBoxWithLoginServer = m_loginserver && m_sandbox;
146 if (sandBoxWithLoginServer)
147 {
148 loginServer = new LoginServer(regionData.IPListenAddr, regionData.IPListenPort, regionData.RegionLocX, regionData.RegionLocY, this.user_accounts);
149 loginServer.Startup();
150 loginServer.SetSessionHandler(((AuthenticateSessionsLocal)this.AuthenticateSessionsHandler).AddNewSession);
151
152 if (user_accounts)
153 {
154 //sandbox mode with loginserver using accounts
155 this.GridServers.UserServer = loginServer;
156 adminLoginServer = loginServer;
157
158 httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.LocalUserManager.XmlRpcLoginMethod);
159 }
160 else
161 {
162 //sandbox mode with loginserver not using accounts
163 httpServer.AddXmlRPCHandler("login_to_simulator", loginServer.XmlRpcLoginMethod);
164 }
165 }
166
167 //Web front end setup
168 AdminWebFront adminWebFront = new AdminWebFront("Admin", LocalWorld, InventoryCache, adminLoginServer);
169 adminWebFront.LoadMethods(httpServer);
170
171 //Start http server
172 m_console.Notice("Main.cs:Startup() - Starting HTTP server");
173 httpServer.Start();
174
175 // Start UDP server
176 this.m_udpServer.ServerListener();
177
178 //Setup Master Avatar
179 m_console.Notice("Main.cs:Startup() - Setting up Master Avatar");
180 if (this.m_sandbox)
181 {
182 OpenSim.Framework.User.UserProfile masterUser = adminLoginServer.LocalUserManager.GetProfileByName(this.regionData.MasterAvatarFirstName, this.regionData.MasterAvatarLastName);
183 if (masterUser == null)
184 {
185 m_console.Notice("Main.cs:Startup() - Sandbox Mode; Master Avatar is a new user; creating account.");
186 adminLoginServer.CreateUserAccount(this.regionData.MasterAvatarFirstName, this.regionData.MasterAvatarLastName, this.regionData.MasterAvatarSandboxPassword);
187 masterUser = adminLoginServer.LocalUserManager.GetProfileByName(this.regionData.MasterAvatarFirstName, this.regionData.MasterAvatarLastName);
188 if (masterUser == null) //Still NULL?!!?! OMG FAIL!
189 {
190 throw new Exception("Failure to create master user account");
191 }
192 }
193 m_console.Notice("Main.cs:Startup() - Master User UUID: " + masterUser.UUID.ToStringHyphenated());
194 regionData.MasterAvatarAssignedUUID = masterUser.UUID;
195
196 }
197 else
198 {
199 m_console.Warn("Main.cs:Startup() - Grid Mode; Do not know how to get the user's master key yet!");
200 }
201
202 m_console.Notice("Creating Estate Manager");
203 LocalWorld.estateManager = new OpenSim.RegionServer.Estate.EstateManager(this.LocalWorld);
204
205 m_console.Notice("Creating Parcel Manager");
206 LocalWorld.parcelManager = new OpenSim.RegionServer.Simulator.ParcelManager(this.LocalWorld);
207
208 m_console.Notice("Loading Parcels from DB...");
209 LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager);
210
211 m_heartbeatTimer.Enabled = true;
212 m_heartbeatTimer.Interval = 100;
213 m_heartbeatTimer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
214 }
215
216 # region Setup methods
217 protected override void SetupLocalGridServers()
218 {
219 GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll";
220 GridServers.GridDll = "OpenSim.GridInterfaces.Local.dll";
221
222 m_console.Notice("Starting in Sandbox mode");
223
224 GridServers.Initialise();
225 }
226
227 protected override void SetupRemoteGridServers()
228 {
229 if (this.gridLocalAsset)
230 {
231 GridServers.AssetDll = "OpenSim.GridInterfaces.Local.dll";
232 }
233 else
234 {
235 GridServers.AssetDll = "OpenSim.GridInterfaces.Remote.dll";
236 }
237 GridServers.GridDll = "OpenSim.GridInterfaces.Remote.dll";
238
239 m_console.Notice("Starting in Grid mode");
240
241
242 GridServers.Initialise();
243
244 }
245
246 protected override void SetupLocalWorld()
247 {
248 m_console.Status("Main.cs:Startup() - We are " + regionData.RegionName + " at " + regionData.RegionLocX.ToString() + "," + regionData.RegionLocY.ToString());
249 m_console.Notice("Initialising world");
250 m_console.componentname = "Region " + regionData.RegionName;
251
252 m_localWorld = new World(this.m_udpServer.PacketServer.ClientThreads, regionData, regionData.RegionHandle, regionData.RegionName);
253 LocalWorld.InventoryCache = InventoryCache;
254 LocalWorld.AssetCache = AssetCache;
255
256 this.m_udpServer.LocalWorld = LocalWorld;
257 this.m_udpServer.PacketServer.RegisterClientPacketHandlers();
258
259 this.physManager = new OpenSim.Physics.Manager.PhysicsManager();
260 this.physManager.LoadPlugins();
261
262 LocalWorld.m_datastore = this.regionData.DataStore;
263
264 LocalWorld.LoadStorageDLL("OpenSim.Storage.LocalStorageDb4o.dll"); //all these dll names shouldn't be hard coded.
265 LocalWorld.LoadWorldMap();
266
267 m_console.Notice("Main.cs:Startup() - Starting up messaging system");
268 LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine);
269 LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D());
270 LocalWorld.LoadPrimsFromStorage();
271 }
272
273 protected override void SetupHttpListener()
274 {
275 httpServer = new BaseHttpServer(regionData.IPListenPort);
276
277 if (this.GridServers.GridServer.GetName() == "Remote")
278 {
279
280 // we are in Grid mode so set a XmlRpc handler to handle "expect_user" calls from the user server
281 httpServer.AddXmlRPCHandler("expect_user", ((AuthenticateSessionsRemote)this.AuthenticateSessionsHandler).ExpectUser);
282
283 httpServer.AddXmlRPCHandler("agent_crossing",
284 delegate(XmlRpcRequest request)
285 {
286 Hashtable requestData = (Hashtable)request.Params[0];
287 uint circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
288
289 AgentCircuitData agent_data = new AgentCircuitData();
290 agent_data.firstname = (string)requestData["firstname"];
291 agent_data.lastname = (string)requestData["lastname"];
292 agent_data.circuitcode = circuitcode;
293 agent_data.startpos = new LLVector3(Single.Parse((string)requestData["pos_x"]), Single.Parse((string)requestData["pos_y"]), Single.Parse((string)requestData["pos_z"]));
294
295 AuthenticateSessionsHandler.UpdateAgentData(agent_data);
296
297 return new XmlRpcResponse();
298 });
299
300 httpServer.AddRestHandler("GET", "/simstatus/",
301 delegate(string request, string path, string param)
302 {
303 return "OK";
304 });
305 }
306 }
307
308 protected override void ConnectToRemoteGridServer()
309 {
310 if (GridServers.GridServer.RequestConnection(regionData.SimUUID, regionData.IPListenAddr, (uint)regionData.IPListenPort))
311 {
312 m_console.Notice("Main.cs:Startup() - Success: Got a grid connection OK!");
313 }
314 else
315 {
316 m_console.Error("Main.cs:Startup() - FAILED: Unable to get connection to grid. Shutting down.");
317 Shutdown();
318 }
319
320 GridServers.AssetServer.SetServerInfo((string)((RemoteGridBase)GridServers.GridServer).GridData["asset_url"], (string)((RemoteGridBase)GridServers.GridServer).GridData["asset_sendkey"]);
321
322 // If we are being told to load a file, load it.
323 string dataUri = (string)((RemoteGridBase)GridServers.GridServer).GridData["data_uri"];
324
325 if (!String.IsNullOrEmpty(dataUri))
326 {
327 this.LocalWorld.m_datastore = dataUri;
328 }
329
330 if (((RemoteGridBase)(GridServers.GridServer)).GridData["regionname"].ToString() != "")
331 {
332 // The grid server has told us who we are
333 // We must obey the grid server.
334
335 regionData.RegionLocX = Convert.ToUInt32(((RemoteGridBase)(GridServers.GridServer)).GridData["region_locx"].ToString());
336 regionData.RegionLocY = Convert.ToUInt32(((RemoteGridBase)(GridServers.GridServer)).GridData["region_locy"].ToString());
337 regionData.RegionName = ((RemoteGridBase)(GridServers.GridServer)).GridData["regionname"].ToString();
338
339
340 }
341 }
342
343 #endregion
344
345 private void SetupFromConfigFile(IGenericConfig configData)
346 {
347
348 // SandBoxMode
349 string attri = "";
350 attri = configData.GetAttribute("SandBox");
351 if ((attri == "") || ((attri != "false") && (attri != "true")))
352 {
353 this.m_sandbox = false;
354 configData.SetAttribute("SandBox", "false");
355 }
356 else
357 {
358 this.m_sandbox = Convert.ToBoolean(attri);
359 }
360
361 // LoginServer
362 attri = "";
363 attri = configData.GetAttribute("LoginServer");
364 if ((attri == "") || ((attri != "false") && (attri != "true")))
365 {
366 this.m_loginserver = false;
367 configData.SetAttribute("LoginServer", "false");
368 }
369 else
370 {
371 this.m_loginserver = Convert.ToBoolean(attri);
372 }
373
374 // Sandbox User accounts
375 attri = "";
376 attri = configData.GetAttribute("UserAccount");
377 if ((attri == "") || ((attri != "false") && (attri != "true")))
378 {
379 this.user_accounts = false;
380 configData.SetAttribute("UserAccounts", "false");
381 }
382 else if (attri == "true")
383 {
384 this.user_accounts = Convert.ToBoolean(attri);
385 }
386
387 // Grid mode hack to use local asset server
388 attri = "";
389 attri = configData.GetAttribute("LocalAssets");
390 if ((attri == "") || ((attri != "false") && (attri != "true")))
391 {
392 this.gridLocalAsset = false;
393 configData.SetAttribute("LocalAssets", "false");
394 }
395 else if (attri == "true")
396 {
397 this.gridLocalAsset = Convert.ToBoolean(attri);
398 }
399
400
401 attri = "";
402 attri = configData.GetAttribute("PhysicsEngine");
403 switch (attri)
404 {
405 default:
406 m_console.Warn("Main.cs: SetupFromConfig() - Invalid value for PhysicsEngine attribute, terminating");
407 Environment.Exit(1);
408 break;
409
410 case "":
411 this.m_physicsEngine = "basicphysics";
412 configData.SetAttribute("PhysicsEngine", "basicphysics");
413 OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying = false;
414 break;
415
416 case "basicphysics":
417 this.m_physicsEngine = "basicphysics";
418 configData.SetAttribute("PhysicsEngine", "basicphysics");
419 OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying = false;
420 break;
421
422 case "RealPhysX":
423 this.m_physicsEngine = "RealPhysX";
424 OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying = true;
425 break;
426
427 case "OpenDynamicsEngine":
428 this.m_physicsEngine = "OpenDynamicsEngine";
429 OpenSim.RegionServer.Simulator.Avatar.PhysicsEngineFlying = true;
430 break;
431 }
432
433 configData.Commit();
434 }
435
436 /// <summary>
437 /// Performs any last-minute sanity checking and shuts down the region server
438 /// </summary>
439 public virtual void Shutdown()
440 {
441 m_console.Notice("Main.cs:Shutdown() - Closing all threads");
442 m_console.Notice("Main.cs:Shutdown() - Killing listener thread");
443 m_console.Notice("Main.cs:Shutdown() - Killing clients");
444 // IMPLEMENT THIS
445 m_console.Notice("Main.cs:Shutdown() - Closing console and terminating");
446 LocalWorld.Close();
447 GridServers.Close();
448 m_console.Close();
449 Environment.Exit(0);
450 }
451
452 /// <summary>
453 /// Performs per-frame updates regularly
454 /// </summary>
455 /// <param name="sender"></param>
456 /// <param name="e"></param>
457 void Heartbeat(object sender, System.EventArgs e)
458 {
459 LocalWorld.Update();
460 }
461
462 #region Console Commands
463 /// <summary>
464 /// Runs commands issued by the server console from the operator
465 /// </summary>
466 /// <param name="command">The first argument of the parameter (the command)</param>
467 /// <param name="cmdparams">Additional arguments passed to the command</param>
468 public void RunCmd(string command, string[] cmdparams)
469 {
470 switch (command)
471 {
472 case "help":
473 m_console.Error("show users - show info about connected users");
474 m_console.Error("shutdown - disconnect all clients and shutdown");
475 m_console.Error("backup - start a backup manually");
476 break;
477
478 case "show":
479 Show(cmdparams[0]);
480 break;
481
482 case "terrain":
483 string result = "";
484 if (!LocalWorld.Terrain.RunTerrainCmd(cmdparams, ref result))
485 {
486 m_console.Error(result);
487 }
488 break;
489
490 case "shutdown":
491 Shutdown();
492 break;
493
494 case "backup":
495 LocalWorld.Backup();
496 break;
497
498 case "reset":
499 if (cmdparams[0] == "parcels")
500 {
501 LocalWorld.localStorage.RemoveAllParcels();
502 LocalWorld.localStorage.LoadParcels((ILocalStorageParcelReceiver)LocalWorld.parcelManager);
503 }
504 break;
505
506 default:
507 m_console.Error("Unknown command");
508 break;
509 }
510 }
511
512 /// <summary>
513 /// Outputs to the console information about the region
514 /// </summary>
515 /// <param name="ShowWhat">What information to display (valid arguments are "uptime", "users")</param>
516 public void Show(string ShowWhat)
517 {
518 switch (ShowWhat)
519 {
520 case "uptime":
521 m_console.Error("OpenSim has been running since " + startuptime.ToString());
522 m_console.Error("That is " + (DateTime.Now - startuptime).ToString());
523 break;
524 case "users":
525 OpenSim.RegionServer.Simulator.Avatar TempAv;
526 m_console.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}", "Firstname", "Lastname", "Agent ID", "Session ID", "Circuit", "IP"));
527 foreach (libsecondlife.LLUUID UUID in LocalWorld.Entities.Keys)
528 {
529 if (LocalWorld.Entities[UUID].ToString() == "OpenSim.RegionServer.Simulator.Avatar")
530 {
531 TempAv = (OpenSim.RegionServer.Simulator.Avatar)LocalWorld.Entities[UUID];
532 m_console.Error(String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString()));
533 }
534 }
535 break;
536 case "parcels":
537 foreach (OpenSim.RegionServer.Simulator.Parcel parcel in LocalWorld.parcelManager.parcelList.Values)
538 {
539 m_console.Error("Parcel ID#" + parcel.parcelData.localID + "(Global UUID: " + parcel.parcelData.globalID + "):");
540 m_console.Error("\tParcel Name: " + parcel.parcelData.parcelName);
541 m_console.Error("\tParcel Owner UUID: " + parcel.parcelData.ownerID);
542 m_console.Error("\tParcel Area: " + parcel.parcelData.area + "sqm");
543 m_console.Error(" ");
544 }
545 break;
546 }
547 }
548 #endregion
549 }
550
551
552} \ No newline at end of file
diff --git a/Prebuild/Prebuild.build b/Prebuild/Prebuild.build
deleted file mode 100644
index 395fb31..0000000
--- a/Prebuild/Prebuild.build
+++ /dev/null
@@ -1,67 +0,0 @@
1<?xml version="1.0" ?>
2<project name="Prebuild" default="build">
3 <echo message="Using '${nant.settings.currentframework}' Framework"/>
4
5 <property name="bin.dir" value="bin" />
6 <property name="obj.dir" value="obj" />
7 <property name="doc.dir" value="doc" />
8 <property name="project.main.dir" value="${project::get-base-directory()}" />
9
10 <target name="Debug" description="">
11 <property name="project.config" value="Debug" />
12 <property name="build.debug" value="true" />
13 </target>
14
15 <property name="project.config" value="Release" />
16
17 <target name="Release" description="">
18 <property name="project.config" value="Release" />
19 <property name="build.debug" value="false" />
20 </target>
21
22 <target name="net-1.1" description="Sets framework to .NET 1.1">
23 <property name="nant.settings.currentframework" value="net-1.1" />
24 </target>
25
26 <target name="net-2.0" description="Sets framework to .NET 2.0">
27 <property name="nant.settings.currentframework" value="net-2.0" />
28 </target>
29
30 <target name="mono-2.0" description="Sets framework to mono 2.0">
31 <property name="nant.settings.currentframework" value="mono-2.0" />
32 </target>
33
34 <target name="mono-1.0" description="Sets framework to mono 1.0">
35 <property name="nant.settings.currentframework" value="mono-1.0" />
36 </target>
37
38 <target name="init" description="">
39 <call target="${project.config}" />
40 <sysinfo />
41 <echo message="Platform ${sys.os.platform}" />
42 <property name="build.dir" value="${bin.dir}/${project.config}" />
43 </target>
44
45 <target name="clean" description="">
46 <echo message="Deleting all builds from all configurations" />
47 <delete dir="${bin.dir}" failonerror="false" />
48 <delete dir="${obj.dir}" failonerror="false" />
49 <nant buildfile="src/Prebuild.exe.build" target="clean" />
50 </target>
51
52 <target name="build" depends="init" description="">
53 <nant buildfile="src/Prebuild.exe.build" target="build" />
54 </target>
55
56 <target name="build-release" depends="Release, init, build" description="Builds in Release mode" />
57
58 <target name="build-debug" depends="Debug, init, build" description="Builds in Debug mode" />
59
60 <target name="package" depends="clean, doc" description="Builds all" />
61
62 <target name="doc" depends="build-release">
63 <echo message="Generating all documentation from all builds" />
64 <nant buildfile="src/Prebuild.exe.build" target="doc" />
65 </target>
66
67</project>
diff --git a/Prebuild/Prebuild.sln b/Prebuild/Prebuild.sln
deleted file mode 100644
index 449896b..0000000
--- a/Prebuild/Prebuild.sln
+++ /dev/null
@@ -1,19 +0,0 @@
1Microsoft Visual Studio Solution File, Format Version 9.00
2# Visual Studio 2005
3Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prebuild", "src\Prebuild.csproj", "{92E80C1C-0000-0000-0000-000000000000}"
4EndProject
5Global
6 GlobalSection(SolutionConfigurationPlatforms) = preSolution
7 Debug|Any CPU = Debug|Any CPU
8 Release|Any CPU = Release|Any CPU
9 EndGlobalSection
10 GlobalSection(ProjectConfigurationPlatforms) = postSolution
11 {92E80C1C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12 {92E80C1C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
13 {92E80C1C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
14 {92E80C1C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
15 EndGlobalSection
16 GlobalSection(SolutionProperties) = preSolution
17 HideSolutionNode = FALSE
18 EndGlobalSection
19EndGlobal
diff --git a/Prebuild/README b/Prebuild/README
deleted file mode 100644
index eca6be1..0000000
--- a/Prebuild/README
+++ /dev/null
@@ -1,230 +0,0 @@
1Prebuild Instructions
2
3Prebuild is an XML-driven pre-build tool allowing developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio 2005, Visual Studio 2003, Visual Studio 2002, SharpDevelop, SharpDevelop2, MonoDevelop, and NAnt.
4
5_________________________________________________________________________________
6Overview
7
8Prebuild can be either be run from the command line to generate the project and make files or you can execute the included batch (*.bat) and Unix Shell script (*.sh) files.
9The Prebuild file
10
11_________________________________________________________________________________
12The currently supported developement tools and their associated batch and shell script files.
13
14Visual Studio .NET 2005 (VS2005.bat)
15Visual Studio .NET 2003 (VS2003.bat)
16Visual Studio .NET 2002 (VS2002.bat)
17SharpDevelop (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/
18SharpDevelop2 (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/
19MonoDevelop (MonoDevelop.sh) - http://www.monodevelop.com/
20NAnt (nant.sh and nant.bat) - http://nant.sourceforge.net/
21Autotools (autotools.bat and autotools.sh) http://www.gnu.org. Only partial support
22
23Notes:
24A Unix Shell script is provided for MonoDevelop, as this is more appropriate than a windows batch file.
25Visual Studio .NET 2005 and the Visual Express IDE's can import solutions from older versions of Visual Studio .NET.
26Makefiles are not currently supported.
27
28_________________________________________________________________________________
29Command Line Syntax:
30
31Example:
32>Prebuild /target vs2003
33
34This will generate the project files for Visual Studio.NET 2003 and place the redirect the log to a file named PrebuildLog.txt in the parent directory
35
36
37The syntax structure is as below, where commandParameter is optional depending on the command and you can provide several option-value pairs.
38Note: The '>' signified the command line, do not actually enter this manually
39
40>Prebuild /<option> <commandParameter>
41
42>Prebuild /target vs2003 /pause
43
44>Prebuild /target vs2003 /log ../Log.txt /pause /ppo /file ProjectConfig.xml
45
46>Prebuild /target sharpdev /log
47
48>Prebuild /removedir obj|bin
49
50>Prebuild /target vs2003 /allowedgroups Group1|Group2
51
52>Prebuild /clean
53
54>Prebuild /clean /yes
55
56>Prebuild /clean vs2003
57
58_________________________________________________________________________________
59Command Line Options:
60
61/usage - Shows the help information on how to use Prebuild and what the different options are and what they do
62
63/clean - The project files generated for the target type specified as a parameter for this option will be deleted. If no value is specified or if 'all' is specified, then project files for all the target types will be deleted.
64
65/target - Specified the name of the development tool for which project or make files will be generated. Possible parameter values include: vs2003, vs2002, sharpdev
66
67/file - Specifies the name of the XML which defines what files are to be referenced by the generated project files as well as configures the options for them. If not specified, prebuild.xml will be used as the default.
68
69/log - Specified the log file that should be written to for build errors. If this option is not specified, no log file is generated, but if just no value is specified, then the defaul filename will be used for the log (Prebuild.log).
70
71/ppo - Preprocesses the xml file to test for syntax errors or problems but doesn't generate the files
72
73/pause - Shows the console until you press a key so that you can view the messages written while performing the specified actions.
74This allows you to check if an errors occurred and - if so - what it was.
75
76/showtargets - Shows a list of all the targets that can be specified as values for the /clean and /target commands.
77
78/allowedgroups - This is followed by a pipe-delimited list of project group filter flags (eg. Group1|Group2) allow optional filtering of all projects that dont have at least one of these flags
79
80/removedir - This is followed by a pipe-delimited list of directory names that will be deleted while recursivly searching the directory of the prebuild application and its child directories (eg. use obj|bin to delete all output and temporary directories before file releases)
81
82/yes - Answer yes to any warnings (e.g. when cleaning all projects).
83
84_________________________________________________________________________________
85Example Batch Files and Shell Scripts
86
87NOTE: Common batch and shell script files are included with Prebuild source and file releases.
88______________________________
89MonoDevelop
90
91#!/bin/sh
92# Generates a combine (.cmbx) and a set of project files (.prjx)
93# for MonoDevelop, a Mono port of SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx)
94./Prebuild /target sharpdev /pause
95
96______________________________
97Visual Studio .NET 2003
98
99@rem Generates a solution (.sln) and a set of project files (.csproj)
100@rem for Microsoft Visual Studio .NET 2002
101Prebuild /target vs2003 /pause
102
103Notes:
104Text after lines that start with @rem are comments and are not evaluated
105You can also place pause on the last line instead of specifing the /pause command.
106
107________________________________________________________________________________
108Example XML Configuration File
109
110Note:
111XML Comments (<!-- Comment -->) are used to markup the prebuild.xml file with notes
112The below file may be out-of-date, however the RealmForge Prebuild file serves as an up-to-date and extensive example.
113It can be viewed using Tigris.org's WebSVN (http://realmforge.tigris.org/source/browse/realmforge/trunk/src/prebuild.xml) by just clicking on the "view file" link for the latest revision.
114
115_________________________________
116
117<?xml version="1.0" encoding="utf-8"?>
118 <!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.3 schema, you can find the XSD schema file at the url specified in the xmlns attribute. -->
119<Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
120 <Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)-->
121 <!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.-->
122 <Configuration name="Debug">
123 <Options>
124 <!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 -->
125 <?if OS = "Win32" ?>
126 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
127 <?else ?>
128 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
129 <?endif ?>
130 <OptimizeCode>false</OptimizeCode>
131 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
132 <AllowUnsafe>false</AllowUnsafe>
133 <WarningLevel>4</WarningLevel>
134 <!-The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).-->
135
136 <WarningsAsErrors>false</WarningsAsErrors>
137 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
138 <!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)-->
139
140 <OutputPath>..\bin</OutputPath>
141 <DebugInformation>true</DebugInformation>
142 <RegisterComInterop>false</RegisterComInterop>
143 <IncrementalBuild>true</IncrementalBuild>
144 <BaseAddress>285212672</BaseAddress>
145 <FileAlignment>4096</FileAlignment>
146 <NoStdLib>false</NoStdLib>
147 <XmlDocFile>Docs.xml</XmlDocFile>
148 </Options>
149 </Configuration>
150 <Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files -->
151 <Options>
152 <CompilerDefines>TRACE</CompilerDefines>
153 <OptimizeCode>true</OptimizeCode>
154 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
155 <AllowUnsafe>false</AllowUnsafe>
156 <WarningLevel>4</WarningLevel>
157 <WarningsAsErrors>false</WarningsAsErrors>
158 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
159 <OutputPath>..\bin</OutputPath>
160 <DebugInformation>false</DebugInformation>
161 <RegisterComInterop>false</RegisterComInterop>
162 <IncrementalBuild>true</IncrementalBuild>
163 <BaseAddress>285212672</BaseAddress>
164 <FileAlignment>4096</FileAlignment>
165 <NoStdLib>false</NoStdLib>
166 <GenerateXmlDocFile>true</GenerateXmlDocFile>
167 <XmlDocFile>Docs.xml</XmlDocFile>
168 </Options>
169 </Configuration>
170
171 <!-- One of the projects that is included in the Solution -->
172 <Project name="RealmForge.Utility" Language="VisualBasic" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge">
173 <Configuration name="Debug">
174 <Options>
175 <OutputPath>..\bin\lib\Utility</OutputPath>
176 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
177 </Options>
178 </Configuration>
179 <Configuration name="Release">
180 <Options>
181 <OutputPath>..\bin\lib\Utility</OutputPath>
182 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
183 </Options>
184 </Configuration>
185 <ReferencePath>../bin</ReferencePath>
186 <Reference name="System"/>
187 <Reference name="System.Data"/>
188 <Reference name="System.Drawing"/>
189 <Reference name="System.Xml"/>
190 <Reference name="System.Runtime.Serialization.Formatters.Soap"/>
191 <Reference name="ICSharpCode.SharpZipLib"/>
192 <Files>
193 <Match path="." pattern="*.vb" recurse="true"/>
194 </Files>
195 </Project>
196
197 <!-- Another projects that is included in the Solution -->
198 <Project name="DemoGame" Language="C#" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge">
199 <!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path -->
200 <!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started-->
201
202 <Configuration name="Debug">
203 <Options>
204 <OutputPath>..\bin</OutputPath>
205 <XmlDocFile>DemoGame.xml</XmlDocFile>
206 </Options>
207 </Configuration>
208 <Configuration name="Release">
209 <Options>
210 <OutputPath>..\bin</OutputPath>
211 <XmlDocFile>DemoGame.xml</XmlDocFile>
212 </Options>
213 </Configuration>
214 <ReferencePath>../bin</ReferencePath>
215 <Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced-->
216 <Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced -->
217 <Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly-->
218 <Files>
219 <Match path="." pattern="*.cs" recurse="true"/>
220 <Match path="." pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/>
221 <Match path="." pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/>
222
223 <!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.-->
224 <!--EmbeddedResource, Content, and Compile are valid buildAction's-->
225 </Files>
226 </Project>
227
228 </Solution>
229</Prebuild>
230
diff --git a/Prebuild/TODO b/Prebuild/TODO
deleted file mode 100644
index d01780a..0000000
--- a/Prebuild/TODO
+++ /dev/null
@@ -1,21 +0,0 @@
1* monodev target should be able to detect whether the project is 1.x
2 or 2.x runtime
3
4* make an autotools install target for .exe files
5
6* Fix the autotools target so that
7
8if(numProjects == 1){
9 for($projectDir){
10 generate_a_project_configure_dot_ac()
11 }
12}else{
13 generate_a_solution_configure_dot_ac()
14
15 foreach($project in $projectsList){
16 mkdir $project/
17 cd $project/
18 generate_a_project_configure_dot_ac
19 }
20}
21
diff --git a/Prebuild/doc/prebuild-example1.xml b/Prebuild/doc/prebuild-example1.xml
deleted file mode 100644
index ea6f455..0000000
--- a/Prebuild/doc/prebuild-example1.xml
+++ /dev/null
@@ -1,300 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
3 <Solution name="RealmForge">
4 <Configuration name="Debug">
5 <Options>
6 <CompilerDefines>TRACE;DEBUG</CompilerDefines>
7 <OptimizeCode>false</OptimizeCode>
8 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
9 <AllowUnsafe>false</AllowUnsafe>
10 <WarningLevel>4</WarningLevel>
11 <WarningsAsErrors>false</WarningsAsErrors>
12 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
13 <OutputPath>..\bin</OutputPath>
14 <DebugInformation>true</DebugInformation>
15 <RegisterComInterop>false</RegisterComInterop>
16 <IncrementalBuild>true</IncrementalBuild>
17 <BaseAddress>285212672</BaseAddress>
18 <FileAlignment>4096</FileAlignment>
19 <NoStdLib>false</NoStdLib>
20 <XmlDocFile>Docs.xml</XmlDocFile>
21 </Options>
22 </Configuration>
23 <Configuration name="Release">
24 <Options>
25 <CompilerDefines>TRACE</CompilerDefines>
26 <OptimizeCode>true</OptimizeCode>
27 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
28 <AllowUnsafe>false</AllowUnsafe>
29 <WarningLevel>4</WarningLevel>
30 <WarningsAsErrors>false</WarningsAsErrors>
31 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
32 <OutputPath>..\bin</OutputPath>
33 <DebugInformation>false</DebugInformation>
34 <RegisterComInterop>false</RegisterComInterop>
35 <IncrementalBuild>true</IncrementalBuild>
36 <BaseAddress>285212672</BaseAddress>
37 <FileAlignment>4096</FileAlignment>
38 <NoStdLib>false</NoStdLib>
39 <XmlDocFile>Docs.xml</XmlDocFile>
40 </Options>
41 </Configuration>
42
43 <Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge">
44 <Configuration name="Debug">
45 <Options>
46 <OutputPath>..\bin\lib\Utility</OutputPath>
47 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
48 </Options>
49 </Configuration>
50 <Configuration name="Release">
51 <Options>
52 <OutputPath>..\bin\lib\Utility</OutputPath>
53 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
54 </Options>
55 </Configuration>
56 <ReferencePath>../bin</ReferencePath>
57 <Reference name="System"/>
58 <Reference name="System.Data"/>
59 <Reference name="System.Drawing"/>
60 <Reference name="System.Xml"/>
61 <Reference name="System.Runtime.Serialization.Formatters.Soap"/>
62 <Reference name="ICSharpCode.SharpZipLib"/>
63 <Files>
64 <Match pattern="*.cs" recurse="true"/>
65 </Files>
66 </Project>
67
68 <Project name="RealmForge.Framework" path="Framework" type="Library" assemblyName="RealmForge.Framework" rootNamespace="RealmForge">
69 <Configuration name="Debug">
70 <Options>
71 <OutputPath>..\bin\lib\Framework</OutputPath>
72 <XmlDocFile>RealmForge.Framework.xml</XmlDocFile>
73 </Options>
74 </Configuration>
75 <Configuration name="Release">
76 <Options>
77 <OutputPath>..\bin\lib\Framework</OutputPath>
78 <XmlDocFile>RealmForge.Framework.xml</XmlDocFile>
79 </Options>
80 </Configuration>
81 <ReferencePath>../bin</ReferencePath>
82 <Reference name="System"/>
83 <Reference name="System.Data"/>
84 <Reference name="System.Xml"/>
85 <Reference name="System.Windows.Forms"/>
86 <Reference name="System.Drawing"/>
87 <Reference name="Axiom.MathLib"/>
88 <Reference name="RealmForge.Utility"/>
89 <Reference name="Tao.OpenAl"/>
90 <Reference name="ICSharpCode.SharpZipLib"/>
91 <Reference name="csogg"/>
92 <Reference name="csvorbis"/>
93 <Files>
94 <Match pattern="*.cs" recurse="true"/>
95 <Match pattern="*.txt" recurse="true"/>
96 </Files>
97 </Project>
98
99 <Project name="RealmForge.Genres" path="Genres" type="Library" assemblyName="RealmForge.Genres" rootNamespace="RealmForge">
100 <Configuration name="Debug">
101 <Options>
102 <OutputPath>..\bin\lib\Genres</OutputPath>
103 <XmlDocFile>RealmForge.Genres.xml</XmlDocFile>
104 </Options>
105 </Configuration>
106 <Configuration name="Release">
107 <Options>
108 <OutputPath>..\bin\lib\Genres</OutputPath>
109 <XmlDocFile>RealmForge.Genres.xml</XmlDocFile>
110 </Options>
111 </Configuration>
112 <ReferencePath>../bin</ReferencePath>
113 <Reference name="System"/>
114 <Reference name="System.Data"/>
115 <Reference name="System.Xml"/>
116 <Reference name="System.Windows.Forms"/>
117 <Reference name="System.Drawing"/>
118 <Reference name="Axiom.MathLib"/>
119 <Reference name="RealmForge.Utility"/>
120 <Reference name="RealmForge.Framework"/>
121 <Files>
122 <Match pattern="*.cs" recurse="true"/>
123 </Files>
124 </Project>
125
126 <Project name="RealmForge.UI.Forms" path="Forms" type="Library" assemblyName="RealmForge.UI.Forms" rootNamespace="RealmForge">
127 <Configuration name="Debug">
128 <Options>
129 <OutputPath>..\bin\lib\Forms</OutputPath>
130 <XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile>
131 <AllowUnsafe>true</AllowUnsafe>
132 </Options>
133 </Configuration>
134 <Configuration name="Release">
135 <Options>
136 <OutputPath>..\bin\lib\Forms</OutputPath>
137 <XmlDocFile>RealmForge.UI.Forms.xml</XmlDocFile>
138 <AllowUnsafe>true</AllowUnsafe>
139 </Options>
140 </Configuration>
141 <ReferencePath>../bin</ReferencePath>
142 <Reference name="System"/>
143 <Reference name="System.Drawing"/>
144 <Reference name="System.Data"/>
145 <Reference name="System.Design"/>
146 <Reference name="System.Windows.Forms"/>
147 <Reference name="System.Xml"/>
148 <Reference name="Axiom.MathLib"/>
149 <Reference name="wx.NET"/>
150 <Reference name="RealmForge.Framework"/>
151 <Reference name="RealmForge.Utility"/>
152 <Files>
153 <File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionIDE.bmp</File>
154 <File buildAction="EmbeddedResource">IDE\Resources\ImagesCaptionPlain.bmp</File>
155 <File buildAction="EmbeddedResource">IDE\Resources\ImagesMenuControl.bmp</File>
156 <File buildAction="EmbeddedResource">IDE\Resources\ImagesPopupMenu.bmp</File>
157 <File buildAction="EmbeddedResource">IDE\Resources\ImagesTabbedGroups.bmp</File>
158 <File buildAction="EmbeddedResource">IDE\Resources\ImagesTabControl.bmp</File>
159 <File buildAction="EmbeddedResource">IDE\Resources\LibraryIcon.ico</File>
160 <File buildAction="EmbeddedResource">IDE\Resources\TabbedInvalid.cur</File>
161 <File buildAction="EmbeddedResource">IDE\Resources\TabbedValid.cur</File>
162 <File buildAction="EmbeddedResource">IDE\Resources\WizardPicture.bmp</File>
163 <File buildAction="EmbeddedResource">Controls\Trees\tv_minus.bmp</File>
164 <File buildAction="EmbeddedResource">Controls\Trees\tv_plus.bmp</File>
165 <File buildAction="EmbeddedResource">Controls\Trees\treeview.bmp</File>
166 <File buildAction="EmbeddedResource">Controls\Trees\listview.bmp</File>
167 <File buildAction="EmbeddedResource">IDE\Menus\MenuControl.bmp</File>
168 <File buildAction="EmbeddedResource">IDE\Controls\InertButton.bmp</File>
169 <File buildAction="EmbeddedResource">IDE\Controls\TabbedGroups.bmp</File>
170 <File buildAction="EmbeddedResource">IDE\Controls\TabCOntrol.bmp</File>
171 <File buildAction="EmbeddedResource">IDE\Controls\WizardControl.bmp</File>
172 <File buildAction="EmbeddedResource">Forms\IDETest.resx</File>
173 <File buildAction="EmbeddedResource">Forms\IDEWindow.resx</File>
174 <File buildAction="EmbeddedResource">Forms\Launcher.resx</File>
175 <File buildAction="EmbeddedResource">Forms\MainRenderFrame.resx</File>
176 <Match pattern="*.cs" recurse="true"/>
177 </Files>
178 </Project>
179
180 <Project name="RealmForge.RAGE" path="RAGE" type="Library" assemblyName="RealmForge.RAGE" rootNamespace="RealmForge">
181 <Configuration name="Debug">
182 <Options>
183 <OutputPath>..\bin\lib\RAGE</OutputPath>
184 <XmlDocFile>RealmForge.RAGE.xml</XmlDocFile>
185 </Options>
186 </Configuration>
187 <Configuration name="Release">
188 <Options>
189 <OutputPath>..\bin\lib\RAGE</OutputPath>
190 <XmlDocFile>RealmForge.RAGE.xml</XmlDocFile>
191 </Options>
192 </Configuration>
193 <ReferencePath>../bin</ReferencePath>
194 <ReferencePath>../bin</ReferencePath>
195 <Reference name="System"/>
196 <Reference name="System.XML"/>
197 <Reference name="System.Windows.Forms"/>
198 <Reference name="System.Drawing"/>
199 <Reference name="Axiom.Plugins.CgProgramManager"/>
200 <Reference name="Axiom.Engine"/>
201 <Reference name="Axiom.MathLib"/>
202 <Reference name="Axiom.Plugins.ParticleFX"/>
203 <Reference name="Axiom.Platforms.Win32"/>
204 <Reference name="Axiom.RenderSystems.DirectX9"/>
205 <Reference localCopy="false" name="Axiom.RenderSystems.OpenGL"/>
206 <Reference name="Axiom.SceneManagers.Octree"/>
207 <Reference name="ICSharpCode.SharpZipLib"/>
208 <Reference name="System.Data"/>
209 <Reference name="RealmForge.Framework"/>
210 <Reference name="RealmForge.Utility"/>
211 <Reference name="ode"/>
212 <Files>
213 <Match pattern="*.cs" recurse="true"/>
214 </Files>
215 </Project>
216
217
218 <Project name="RealmForge.ScriptLibrary" path="ScriptLibrary" type="Library" assemblyName="RealmForge.ScriptLibrary" rootNamespace="RSL">
219 <Configuration name="Debug">
220 <Options>
221 <OutputPath>..\bin\ScriptLibrary</OutputPath>
222 <XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile>
223 </Options>
224 </Configuration>
225 <Configuration name="Release">
226 <Options>
227 <OutputPath>..\bin\ScriptLibrary</OutputPath>
228 <XmlDocFile>RealmForge.ScriptLibrary.xml</XmlDocFile>
229 </Options>
230 </Configuration>
231 <ReferencePath>../bin</ReferencePath>
232 <Reference name="System"/>
233 <Reference name="System.XML"/>
234 <Reference name="System.Windows.Forms"/>
235 <Reference name="System.Drawing"/>
236 <Reference name="Axiom.MathLib"/>
237 <Reference name="wx.NET"/>
238 <Reference name="RealmForge.UI.Forms"/>
239 <Reference name="RealmForge.RAGE"/>
240 <Reference name="RealmForge.Framework"/>
241 <Reference name="RealmForge.Utility"/>
242 <Files>
243 <Match pattern="*.cs" recurse="true"/>
244 </Files>
245 </Project>
246
247
248 <Project name="Updater" path="Updater" type="WinExe" icon="..\bin\Updater.ico" assemblyName="Updater" rootNamespace="RealmForge">
249 <Configuration name="Debug">
250 <Options>
251 <OutputPath>..\bin\lib\Updater</OutputPath>
252 <XmlDocFile>Updater.xml</XmlDocFile>
253 </Options>
254 </Configuration>
255 <Configuration name="Release">
256 <Options>
257 <OutputPath>..\bin\lib\Updater</OutputPath>
258 <XmlDocFile>Updater.xml</XmlDocFile>
259 </Options>
260 </Configuration>
261 <ReferencePath>../bin</ReferencePath>
262 <Reference name="System"/>
263 <Reference name="RealmForge.UI.Forms"/>
264 <Reference name="RealmForge.Framework"/>
265 <Reference name="RealmForge.Utility"/>
266 <Files>
267 <Match pattern="*.cs" recurse="true"/>
268 </Files>
269 </Project>
270
271
272 <Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge">
273 <Configuration name="Debug">
274 <Options>
275 <OutputPath>..\bin</OutputPath>
276 <XmlDocFile>DemoGame.xml</XmlDocFile>
277 </Options>
278 </Configuration>
279 <Configuration name="Release">
280 <Options>
281 <OutputPath>..\bin</OutputPath>
282 <XmlDocFile>DemoGame.xml</XmlDocFile>
283 </Options>
284 </Configuration>
285 <ReferencePath>../bin</ReferencePath>
286 <Reference name="System"/>
287 <Reference name="RealmForge.UI.Forms"/>
288 <Reference name="RealmForge.ScriptLibrary"/>
289 <Reference name="RealmForge.RAGE"/>
290 <Reference name="RealmForge.Framework"/>
291 <Reference name="RealmForge.Utility"/>
292 <Files>
293 <Match pattern="*.cs" recurse="true"/>
294 </Files>
295 </Project>
296
297 </Solution>
298</Prebuild>
299
300
diff --git a/Prebuild/doc/prebuild-example2.xml b/Prebuild/doc/prebuild-example2.xml
deleted file mode 100644
index 02276f6..0000000
--- a/Prebuild/doc/prebuild-example2.xml
+++ /dev/null
@@ -1,72 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
3 <Solution name="Prebuild">
4 <Configuration name="Debug">
5 <Options>
6 <?if OS = "Win32" ?>
7 <CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines>
8 <?else ?>
9 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
10 <?endif ?>
11 <OptimizeCode>false</OptimizeCode>
12 <OutputPath>bin\Debug</OutputPath>
13 <DebugInformation>true</DebugInformation>
14 <SuppressWarnings>1595</SuppressWarnings>
15 </Options>
16 </Configuration>
17 <Configuration name="Release">
18 <Options>
19 <?if OS = "Win32" ?>
20 <CompilerDefines>TRACE;WIN32;NET</CompilerDefines>
21 <?else ?>
22 <CompilerDefines>TRACE;POSIX</CompilerDefines>
23 <?endif ?>
24 <OutputPath>bin\Release</OutputPath>
25 <OptimizeCode>true</OptimizeCode>
26 <DebugInformation>false</DebugInformation>
27 <SuppressWarnings>1595</SuppressWarnings>
28 </Options>
29 </Configuration>
30 <Files>
31 <File>prebuild.xml</File>
32 <Match path="doc" pattern="*.txt"/>
33 </Files>
34 <Project name="Prebuild" path="src" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild">
35 <Configuration name="Debug">
36 <Options>
37 <?if OS = "Win32" ?>
38 <CompilerDefines>DEBUG;TRACE;WIN32;NET</CompilerDefines>
39 <?else ?>
40 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
41 <?endif ?>
42 <OptimizeCode>false</OptimizeCode>
43 <OutputPath>bin\Debug</OutputPath>
44 <DebugInformation>true</DebugInformation>
45 <XmlDocFile>Prebuild.xml</XmlDocFile>
46 <SuppressWarnings>1595</SuppressWarnings>
47 </Options>
48 </Configuration>
49 <Configuration name="Release">
50 <Options>
51 <?if OS = "Win32" ?>
52 <CompilerDefines>TRACE;WIN32;NET</CompilerDefines>
53 <?else ?>
54 <CompilerDefines>TRACE;POSIX</CompilerDefines>
55 <?endif ?>
56 <OutputPath>bin\Release</OutputPath>
57 <OptimizeCode>true</OptimizeCode>
58 <DebugInformation>false</DebugInformation>
59 <XmlDocFile>Prebuild.xml</XmlDocFile>
60 <SuppressWarnings>1595</SuppressWarnings>
61 </Options>
62 </Configuration>
63 <Reference name="System.Xml" />
64 <Reference name="System" />
65 <Files>
66 <Match pattern="App.ico" buildAction="EmbeddedResource"/>
67 <Match path="data" pattern="prebuild-1.6.xsd" buildAction="EmbeddedResource"/>
68 <Match pattern="*.cs" recurse="true"/>
69 </Files>
70 </Project>
71 </Solution>
72</Prebuild>
diff --git a/Prebuild/doc/prebuild-example3.xml b/Prebuild/doc/prebuild-example3.xml
deleted file mode 100644
index 1ba38f7..0000000
--- a/Prebuild/doc/prebuild-example3.xml
+++ /dev/null
@@ -1,113 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2 <!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.6 schema, you can find the XSD schema file at the url specified in the xmlns attribute. -->
3 <Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
4 <Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)-->
5 <!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.-->
6 <Configuration name="Debug">
7 <Options>
8 <!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 -->
9 <?if OS = "Win32" ?>
10 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
11 <?else ?>
12 <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines>
13 <?endif ?>
14 <OptimizeCode>false</OptimizeCode>
15 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
16 <AllowUnsafe>false</AllowUnsafe>
17 <WarningLevel>4</WarningLevel>
18 <!--The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).-->
19
20 <WarningsAsErrors>false</WarningsAsErrors>
21 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
22 <!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)-->
23
24 <OutputPath>..\bin</OutputPath>
25 <DebugInformation>true</DebugInformation>
26 <RegisterComInterop>false</RegisterComInterop>
27 <IncrementalBuild>true</IncrementalBuild>
28 <BaseAddress>285212672</BaseAddress>
29 <FileAlignment>4096</FileAlignment>
30 <NoStdLib>false</NoStdLib>
31 <XmlDocFile>Docs.xml</XmlDocFile>
32 </Options>
33 </Configuration>
34 <Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files -->
35 <Options>
36 <CompilerDefines>TRACE</CompilerDefines>
37 <OptimizeCode>true</OptimizeCode>
38 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
39 <AllowUnsafe>false</AllowUnsafe>
40 <WarningLevel>4</WarningLevel>
41 <WarningsAsErrors>false</WarningsAsErrors>
42 <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings>
43 <OutputPath>..\bin</OutputPath>
44 <DebugInformation>false</DebugInformation>
45 <RegisterComInterop>false</RegisterComInterop>
46 <IncrementalBuild>true</IncrementalBuild>
47 <BaseAddress>285212672</BaseAddress>
48 <FileAlignment>4096</FileAlignment>
49 <NoStdLib>false</NoStdLib>
50 <XmlDocFile>Docs.xml</XmlDocFile>
51 </Options>
52 </Configuration>
53
54 <!-- One of the projects that is included in the Solution -->
55 <Project name="RealmForge.Utility" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge">
56 <Configuration name="Debug">
57 <Options>
58 <OutputPath>..\bin\lib\Utility</OutputPath>
59 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
60 </Options>
61 </Configuration>
62 <Configuration name="Release">
63 <Options>
64 <OutputPath>..\bin\lib\Utility</OutputPath>
65 <XmlDocFile>RealmForge.Utility.xml</XmlDocFile>
66 </Options>
67 </Configuration>
68 <ReferencePath>../bin</ReferencePath>
69 <Reference name="System"/>
70 <Reference name="System.Data"/>
71 <Reference name="System.Drawing"/>
72 <Reference name="System.Xml"/>
73 <Reference name="System.Runtime.Serialization.Formatters.Soap"/>
74 <Reference name="ICSharpCode.SharpZipLib"/>
75 <Files>
76 <Match pattern="*.cs" recurse="true"/>
77 </Files>
78 </Project>
79
80 <!-- Another projects that is included in the Solution -->
81 <Project name="DemoGame" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge">
82 <!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path -->
83 <!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started-->
84
85 <Configuration name="Debug">
86 <Options>
87 <OutputPath>..\bin</OutputPath>
88 <XmlDocFile>DemoGame.xml</XmlDocFile>
89 </Options>
90 </Configuration>
91 <Configuration name="Release">
92 <Options>
93 <OutputPath>..\bin</OutputPath>
94 <XmlDocFile>DemoGame.xml</XmlDocFile>
95 </Options>
96 </Configuration>
97 <ReferencePath>../bin</ReferencePath>
98 <Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced-->
99 <Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced -->
100 <Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly-->
101 <Files>
102 <!-- path defaults to . or the directory that prebuild.exe resides in -->
103 <Match path="." pattern="*.cs" recurse="true"/>
104 <Match pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/>
105 <Match pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/>
106
107 <!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.-->
108 <!--EmbeddedResource, Content, and Compile are valid buildAction's-->
109 </Files>
110 </Project>
111
112 </Solution>
113</Prebuild>
diff --git a/Prebuild/doc/prebuild-example4.xml b/Prebuild/doc/prebuild-example4.xml
deleted file mode 100644
index c6c223f..0000000
--- a/Prebuild/doc/prebuild-example4.xml
+++ /dev/null
@@ -1,715 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" version="1.6">
3 <Solution name="SdlDotNet">
4 <Configuration name="Debug">
5 <Options>
6 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
7 <OptimizeCode>false</OptimizeCode>
8 <AllowUnsafe>false</AllowUnsafe>
9 <OutputPath>bin\Debug</OutputPath>
10 <DebugInformation>true</DebugInformation>
11 <WarningLevel>4</WarningLevel>
12 <SuppressWarnings>1595</SuppressWarnings>
13 </Options>
14 </Configuration>
15 <Configuration name="Release">
16 <Options>
17 <CompilerDefines>TRACE</CompilerDefines>
18 <OptimizeCode>true</OptimizeCode>
19 <AllowUnsafe>false</AllowUnsafe>
20 <OutputPath>bin\Release</OutputPath>
21 <DebugInformation>false</DebugInformation>
22 <WarningLevel>1</WarningLevel>
23 <SuppressWarnings>1595</SuppressWarnings>
24 </Options>
25 </Configuration>
26 <Files>
27 <File buildAction="Content">SdlDotNet.build</File>
28 <File buildAction="Content">prebuild.xml</File>
29 </Files>
30 <Project name="SdlDotNet" path="src" language="C#" type="Library" assemblyName="SdlDotNet" rootNamespace="SdlDotNet">
31 <Configuration name="Debug">
32 <Options>
33 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
34 <OptimizeCode>false</OptimizeCode>
35 <AllowUnsafe>false</AllowUnsafe>
36 <OutputPath>bin\Debug</OutputPath>
37 <DebugInformation>true</DebugInformation>
38 <XmlDocFile>SdlDotNet.xml</XmlDocFile>
39 <WarningLevel>4</WarningLevel>
40 <SuppressWarnings>1595</SuppressWarnings>
41 </Options>
42 </Configuration>
43 <Configuration name="Release">
44 <Options>
45 <CompilerDefines>TRACE</CompilerDefines>
46 <OptimizeCode>true</OptimizeCode>
47 <AllowUnsafe>false</AllowUnsafe>
48 <OutputPath>bin\Release</OutputPath>
49 <XmlDocFile>SdlDotNet.xml</XmlDocFile>
50 <DebugInformation>false</DebugInformation>
51 <WarningLevel>1</WarningLevel>
52 <SuppressWarnings>1595</SuppressWarnings>
53 </Options>
54 </Configuration>
55 <Reference name="System" />
56 <Reference name="System.Windows.Forms" />
57 <Reference name="System.Drawing" />
58 <Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/>
59 <Files>
60 <Match path="." pattern="SurfaceControl.cs" subType="Component" recurse="true"/>
61 <Match path="." pattern="*.bmp" buildAction="EmbeddedResource" recurse="true"/>
62 <Match path="." pattern="*.cs" recurse="true">
63 <Exclude name="SurfaceControl.cs"/>
64 </Match>
65 </Files>
66 </Project>
67 <Project name="Rectangles" path="examples\\Rectangles" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Rectangles.Rectangles" assemblyName="Rectangles" rootNamespace="SdlDotNet.Examples.Rectangles" icon="App.ico">
68 <Configuration name="Debug">
69 <Options>
70 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
71 <OptimizeCode>false</OptimizeCode>
72 <AllowUnsafe>false</AllowUnsafe>
73 <OutputPath>bin\Debug</OutputPath>
74 <DebugInformation>true</DebugInformation>
75 <XmlDocFile>Rectangles.xml</XmlDocFile>
76 <WarningLevel>4</WarningLevel>
77 <SuppressWarnings>1595</SuppressWarnings>
78 </Options>
79 </Configuration>
80 <Configuration name="Release">
81 <Options>
82 <CompilerDefines>TRACE</CompilerDefines>
83 <OptimizeCode>true</OptimizeCode>
84 <AllowUnsafe>false</AllowUnsafe>
85 <OutputPath>bin\Release</OutputPath>
86 <DebugInformation>false</DebugInformation>
87 <XmlDocFile>Rectangles.xml</XmlDocFile>
88 <WarningLevel>1</WarningLevel>
89 <SuppressWarnings>1595</SuppressWarnings>
90 </Options>
91 </Configuration>
92 <Reference name="System" />
93 <Reference name="System.Drawing" />
94 <Reference name="SdlDotNet" localCopy="true"/>
95 <Files>
96 <File buildAction="EmbeddedResource">App.ico</File>
97 <Match path="." pattern="*.cs" recurse="true"/>
98 </Files>
99 </Project>
100 <Project name="Gears" path="examples\\Gears" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Gears.Gears" assemblyName="Gears" rootNamespace="SdlDotNet.Examples.Gears" icon="App.ico">
101 <Configuration name="Debug">
102 <Options>
103 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
104 <OptimizeCode>false</OptimizeCode>
105 <AllowUnsafe>false</AllowUnsafe>
106 <OutputPath>bin\Debug</OutputPath>
107 <DebugInformation>true</DebugInformation>
108 <XmlDocFile>Gears.xml</XmlDocFile>
109 <WarningLevel>4</WarningLevel>
110 <SuppressWarnings>1595</SuppressWarnings>
111 </Options>
112 </Configuration>
113 <Configuration name="Release">
114 <Options>
115 <CompilerDefines>TRACE</CompilerDefines>
116 <OptimizeCode>true</OptimizeCode>
117 <AllowUnsafe>false</AllowUnsafe>
118 <OutputPath>bin\Release</OutputPath>
119 <DebugInformation>false</DebugInformation>
120 <XmlDocFile>Gears.xml</XmlDocFile>
121 <WarningLevel>1</WarningLevel>
122 <SuppressWarnings>1595</SuppressWarnings>
123 </Options>
124 </Configuration>
125 <Reference name="System" />
126 <Reference name="System.Drawing" />
127 <Reference name="SdlDotNet" localCopy="true"/>
128 <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/>
129 <Files>
130 <File buildAction="EmbeddedResource">App.ico</File>
131 <Match path="." pattern="*.cs" recurse="true"/>
132 </Files>
133 </Project>
134 <Project name="CDPlayer" path="examples\\CDPlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.CDPlayer.CDPlayer" assemblyName="CDPlayer" rootNamespace="SdlDotNet.Examples.CDPlayer" icon="App.ico">
135 <Configuration name="Debug">
136 <Options>
137 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
138 <OptimizeCode>false</OptimizeCode>
139 <AllowUnsafe>false</AllowUnsafe>
140 <OutputPath>bin\Debug</OutputPath>
141 <DebugInformation>true</DebugInformation>
142 <XmlDocFile>CDPlayer.xml</XmlDocFile>
143 <WarningLevel>4</WarningLevel>
144 <SuppressWarnings>1595</SuppressWarnings>
145 </Options>
146 </Configuration>
147 <Configuration name="Release">
148 <Options>
149 <CompilerDefines>TRACE</CompilerDefines>
150 <OptimizeCode>true</OptimizeCode>
151 <AllowUnsafe>false</AllowUnsafe>
152 <OutputPath>bin\Release</OutputPath>
153 <DebugInformation>false</DebugInformation>
154 <XmlDocFile>CDPlayer.xml</XmlDocFile>
155 <WarningLevel>1</WarningLevel>
156 <SuppressWarnings>1595</SuppressWarnings>
157 </Options>
158 </Configuration>
159 <Reference name="System" />
160 <Reference name="System.Drawing" />
161 <Reference name="System.Windows.Forms" />
162 <Reference name="SdlDotNet" localCopy="true"/>
163 <Files>
164 <File buildAction="EmbeddedResource">App.ico</File>
165 <File subType="Form">CDPlayer.cs</File>
166 <Match path="." pattern="*.cs" recurse="true">
167 <Exclude name="CDPlayer.cs"/>
168 </Match>
169 </Files>
170 </Project>
171 <Project name="MoviePlayer" path="examples\\MoviePlayer" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.MoviePlayer.MoviePlayer" assemblyName="MoviePlayer" rootNamespace="SdlDotNet.Examples.MoviePlayer" icon="App.ico">
172 <Configuration name="Debug">
173 <Options>
174 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
175 <OptimizeCode>false</OptimizeCode>
176 <AllowUnsafe>false</AllowUnsafe>
177 <OutputPath>bin\Debug</OutputPath>
178 <DebugInformation>true</DebugInformation>
179 <XmlDocFile>MoviePlayer.xml</XmlDocFile>
180 <WarningLevel>4</WarningLevel>
181 <SuppressWarnings>1595</SuppressWarnings>
182 </Options>
183 </Configuration>
184 <Configuration name="Release">
185 <Options>
186 <CompilerDefines>TRACE</CompilerDefines>
187 <OptimizeCode>true</OptimizeCode>
188 <AllowUnsafe>false</AllowUnsafe>
189 <OutputPath>bin\Release</OutputPath>
190 <DebugInformation>false</DebugInformation>
191 <XmlDocFile>MoviePlayer.xml</XmlDocFile>
192 <WarningLevel>1</WarningLevel>
193 <SuppressWarnings>1595</SuppressWarnings>
194 </Options>
195 </Configuration>
196 <Reference name="System" />
197 <Reference name="System.Drawing" />
198 <Reference name="SdlDotNet" localCopy="true"/>
199 <Files>
200 <File buildAction="EmbeddedResource">App.ico</File>
201 <Match path="." pattern="*.cs" recurse="true"/>
202 </Files>
203 </Project>
204 <Project name="SimpleGame" path="examples\\SimpleGame" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SimpleGame.GameMain" assemblyName="SimpleGame" rootNamespace="SdlDotNet.Examples.SimpleGame" icon="App.ico">
205 <Configuration name="Debug">
206 <Options>
207 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
208 <OptimizeCode>false</OptimizeCode>
209 <AllowUnsafe>false</AllowUnsafe>
210 <OutputPath>bin\Debug</OutputPath>
211 <DebugInformation>true</DebugInformation>
212 <XmlDocFile>SimpleGame.xml</XmlDocFile>
213 <WarningLevel>4</WarningLevel>
214 <SuppressWarnings>1595</SuppressWarnings>
215 </Options>
216 </Configuration>
217 <Configuration name="Release">
218 <Options>
219 <CompilerDefines>TRACE</CompilerDefines>
220 <OptimizeCode>true</OptimizeCode>
221 <AllowUnsafe>false</AllowUnsafe>
222 <OutputPath>bin\Release</OutputPath>
223 <DebugInformation>false</DebugInformation>
224 <XmlDocFile>SimpleGame.xml</XmlDocFile>
225 <WarningLevel>1</WarningLevel>
226 <SuppressWarnings>1595</SuppressWarnings>
227 </Options>
228 </Configuration>
229 <Reference name="System" />
230 <Reference name="System.Drawing" />
231 <Reference name="SdlDotNet" localCopy="true"/>
232 <Files>
233 <File buildAction="EmbeddedResource">App.ico</File>
234 <Match path="." pattern="*.cs" recurse="true"/>
235 </Files>
236 </Project>
237 <Project name="BombRun" path="examples\\BombRun" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BombRun.BombRun" assemblyName="BombRun" rootNamespace="SdlDotNet.Examples.BombRun" icon="App.ico">
238 <Configuration name="Debug">
239 <Options>
240 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
241 <OptimizeCode>false</OptimizeCode>
242 <AllowUnsafe>false</AllowUnsafe>
243 <OutputPath>bin\Debug</OutputPath>
244 <DebugInformation>true</DebugInformation>
245 <XmlDocFile>BombRun.xml</XmlDocFile>
246 <WarningLevel>4</WarningLevel>
247 <SuppressWarnings>1595</SuppressWarnings>
248 </Options>
249 </Configuration>
250 <Configuration name="Release">
251 <Options>
252 <CompilerDefines>TRACE</CompilerDefines>
253 <OptimizeCode>true</OptimizeCode>
254 <AllowUnsafe>false</AllowUnsafe>
255 <OutputPath>bin\Release</OutputPath>
256 <DebugInformation>false</DebugInformation>
257 <XmlDocFile>BombRun.xml</XmlDocFile>
258 <WarningLevel>1</WarningLevel>
259 <SuppressWarnings>1595</SuppressWarnings>
260 </Options>
261 </Configuration>
262 <Reference name="System" />
263 <Reference name="System.Drawing" />
264 <Reference name="SdlDotNet" localCopy="true"/>
265 <Files>
266 <File buildAction="EmbeddedResource">App.ico</File>
267 <Match path="." pattern="*.cs" recurse="true"/>
268 </Files>
269 </Project>
270 <Project name="SnowDemo" path="examples\\SnowDemo" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SnowDemo.SnowDemo" assemblyName="SnowDemo" rootNamespace="SdlDotNet.Examples.SnowDemo" icon="App.ico">
271 <Configuration name="Debug">
272 <Options>
273 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
274 <OptimizeCode>false</OptimizeCode>
275 <AllowUnsafe>false</AllowUnsafe>
276 <OutputPath>bin\Debug</OutputPath>
277 <DebugInformation>true</DebugInformation>
278 <XmlDocFile>SnowDemo.xml</XmlDocFile>
279 <WarningLevel>4</WarningLevel>
280 <SuppressWarnings>1595</SuppressWarnings>
281 </Options>
282 </Configuration>
283 <Configuration name="Release">
284 <Options>
285 <CompilerDefines>TRACE</CompilerDefines>
286 <OptimizeCode>true</OptimizeCode>
287 <AllowUnsafe>false</AllowUnsafe>
288 <OutputPath>bin\Release</OutputPath>
289 <DebugInformation>false</DebugInformation>
290 <XmlDocFile>SnowDemo.xml</XmlDocFile>
291 <WarningLevel>1</WarningLevel>
292 <SuppressWarnings>1595</SuppressWarnings>
293 </Options>
294 </Configuration>
295 <Reference name="System" />
296 <Reference name="System.Drawing" />
297 <Reference name="SdlDotNet" localCopy="true"/>
298 <Files>
299 <File buildAction="EmbeddedResource">App.ico</File>
300 <Match path="." pattern="*.cs" recurse="true"/>
301 </Files>
302 </Project>
303 <Project name="BounceSprites" path="examples\\BounceSprites" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.BounceSprites.BounceSprites" assemblyName="BounceSprites" rootNamespace="SdlDotNet.Examples.BounceSprites" icon="App.ico">
304 <Configuration name="Debug">
305 <Options>
306 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
307 <OptimizeCode>false</OptimizeCode>
308 <AllowUnsafe>false</AllowUnsafe>
309 <OutputPath>bin\Debug</OutputPath>
310 <DebugInformation>true</DebugInformation>
311 <XmlDocFile>BounceSprites.xml</XmlDocFile>
312 <WarningLevel>4</WarningLevel>
313 <SuppressWarnings>1595</SuppressWarnings>
314 </Options>
315 </Configuration>
316 <Configuration name="Release">
317 <Options>
318 <CompilerDefines>TRACE</CompilerDefines>
319 <OptimizeCode>true</OptimizeCode>
320 <AllowUnsafe>false</AllowUnsafe>
321 <OutputPath>bin\Release</OutputPath>
322 <DebugInformation>false</DebugInformation>
323 <XmlDocFile>BounceSprites.xml</XmlDocFile>
324 <WarningLevel>1</WarningLevel>
325 <SuppressWarnings>1595</SuppressWarnings>
326 </Options>
327 </Configuration>
328 <Reference name="System" />
329 <Reference name="System.Drawing" />
330 <Reference name="SdlDotNet" localCopy="true"/>
331 <Files>
332 <File buildAction="EmbeddedResource">App.ico</File>
333 <Match path="." pattern="*.cs" recurse="true"/>
334 </Files>
335 </Project>
336 <Project name="Triad" path="examples\\Triad" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.Triad.MainObject" assemblyName="Triad" rootNamespace="SdlDotNet.Examples.Triad" icon="App.ico">
337 <Configuration name="Debug">
338 <Options>
339 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
340 <OptimizeCode>false</OptimizeCode>
341 <AllowUnsafe>false</AllowUnsafe>
342 <OutputPath>bin\Debug</OutputPath>
343 <DebugInformation>true</DebugInformation>
344 <XmlDocFile>Triad.xml</XmlDocFile>
345 <WarningLevel>4</WarningLevel>
346 <SuppressWarnings>1595</SuppressWarnings>
347 </Options>
348 </Configuration>
349 <Configuration name="Release">
350 <Options>
351 <CompilerDefines>TRACE</CompilerDefines>
352 <OptimizeCode>true</OptimizeCode>
353 <AllowUnsafe>false</AllowUnsafe>
354 <OutputPath>bin\Release</OutputPath>
355 <DebugInformation>false</DebugInformation>
356 <XmlDocFile>Triad.xml</XmlDocFile>
357 <WarningLevel>1</WarningLevel>
358 <SuppressWarnings>1595</SuppressWarnings>
359 </Options>
360 </Configuration>
361 <Reference name="System" />
362 <Reference name="System.Drawing" />
363 <Reference name="SdlDotNet" localCopy="true"/>
364 <Reference name="nunit.framework" localCopy="true" path="..\\..\\lib"/>
365 <Files>
366 <File buildAction="EmbeddedResource">App.ico</File>
367 <Match path="." pattern="*.cs" recurse="true"/>
368 </Files>
369 </Project>
370 <Project name="GuiExample" path="examples\\GuiExample" language="C#" type="Library" assemblyName="GuiExample" rootNamespace="SdlDotNet.Examples.GuiExample">
371 <Configuration name="Debug">
372 <Options>
373 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
374 <OptimizeCode>false</OptimizeCode>
375 <AllowUnsafe>false</AllowUnsafe>
376 <OutputPath>bin\Debug</OutputPath>
377 <DebugInformation>true</DebugInformation>
378 <XmlDocFile>GuiExample.xml</XmlDocFile>
379 <WarningLevel>4</WarningLevel>
380 <SuppressWarnings>1595</SuppressWarnings>
381 </Options>
382 </Configuration>
383 <Configuration name="Release">
384 <Options>
385 <CompilerDefines>TRACE</CompilerDefines>
386 <OptimizeCode>true</OptimizeCode>
387 <AllowUnsafe>false</AllowUnsafe>
388 <OutputPath>bin\Release</OutputPath>
389 <DebugInformation>false</DebugInformation>
390 <XmlDocFile>GuiExample.xml</XmlDocFile>
391 <WarningLevel>1</WarningLevel>
392 <SuppressWarnings>1595</SuppressWarnings>
393 </Options>
394 </Configuration>
395 <Reference name="System" />
396 <Reference name="System.Drawing" />
397 <Reference name="SdlDotNet" localCopy="true"/>
398 <Files>
399 <Match path="." pattern="*.cs" recurse="true"/>
400 </Files>
401 </Project>
402 <Project name="SpriteGuiDemos" path="examples\\SpriteGuiDemos" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.SpriteGuiDemos.SdlDemo" assemblyName="SpriteGuiDemo" rootNamespace="SdlDotNet.Examples.SpriteGuiDemos" icon="App.ico">
403 <Configuration name="Debug">
404 <Options>
405 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
406 <OptimizeCode>false</OptimizeCode>
407 <AllowUnsafe>false</AllowUnsafe>
408 <OutputPath>bin\Debug</OutputPath>
409 <DebugInformation>true</DebugInformation>
410 <XmlDocFile>SpriteGuiDemos.xml</XmlDocFile>
411 <WarningLevel>4</WarningLevel>
412 <SuppressWarnings>1595</SuppressWarnings>
413 </Options>
414 </Configuration>
415 <Configuration name="Release">
416 <Options>
417 <CompilerDefines>TRACE</CompilerDefines>
418 <OptimizeCode>true</OptimizeCode>
419 <AllowUnsafe>false</AllowUnsafe>
420 <OutputPath>bin\Release</OutputPath>
421 <DebugInformation>false</DebugInformation>
422 <XmlDocFile>SpriteGuiDemos.xml</XmlDocFile>
423 <WarningLevel>1</WarningLevel>
424 <SuppressWarnings>1595</SuppressWarnings>
425 </Options>
426 </Configuration>
427 <Reference name="System" />
428 <Reference name="System.Drawing" />
429 <Reference name="SdlDotNet" localCopy="true"/>
430 <Reference name="GuiExample" localCopy="true"/>
431 <Files>
432 <File buildAction="EmbeddedResource">App.ico</File>
433 <Match path="." pattern="*.cs" recurse="true"/>
434 </Files>
435 </Project>
436 <Project name="Tests" path="tests" language="C#" type="Library" assemblyName="SdlDotNet.Tests" rootNamespace="SdlDotNet.Tests">
437 <Configuration name="Debug">
438 <Options>
439 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
440 <OptimizeCode>false</OptimizeCode>
441 <AllowUnsafe>false</AllowUnsafe>
442 <OutputPath>bin\Debug</OutputPath>
443 <DebugInformation>true</DebugInformation>
444 <XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile>
445 <WarningLevel>4</WarningLevel>
446 <SuppressWarnings>1595</SuppressWarnings>
447 </Options>
448 </Configuration>
449 <Configuration name="Release">
450 <Options>
451 <CompilerDefines>TRACE</CompilerDefines>
452 <OptimizeCode>true</OptimizeCode>
453 <AllowUnsafe>false</AllowUnsafe>
454 <OutputPath>bin\Release</OutputPath>
455 <DebugInformation>false</DebugInformation>
456 <XmlDocFile>SdlDotNet.Tests.xml</XmlDocFile>
457 <WarningLevel>1</WarningLevel>
458 <SuppressWarnings>1595</SuppressWarnings>
459 </Options>
460 </Configuration>
461 <Reference name="System" />
462 <Reference name="System.Drawing" />
463 <Reference name="SdlDotNet" localCopy="true"/>
464 <Reference name="Tao.Sdl" localCopy="true" path="..\\lib"/>
465 <Reference name="GuiExample" localCopy="true"/>
466 <Reference name="nunit.framework" localCopy="true" path="..\\lib"/>
467 <Files>
468 <Match path="." pattern="*.cs" recurse="true"/>
469 </Files>
470 </Project>
471 <Project name="AudioExample" path="examples\\AudioExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.AudioExample.AudioExample" assemblyName="AudioExample" rootNamespace="SdlDotNet.Examples.AudioExample" icon="App.ico">
472 <Configuration name="Debug">
473 <Options>
474 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
475 <OptimizeCode>false</OptimizeCode>
476 <AllowUnsafe>false</AllowUnsafe>
477 <OutputPath>bin\Debug</OutputPath>
478 <DebugInformation>true</DebugInformation>
479 <XmlDocFile>AudioExample.xml</XmlDocFile>
480 <WarningLevel>4</WarningLevel>
481 <SuppressWarnings>1595</SuppressWarnings>
482 </Options>
483 </Configuration>
484 <Configuration name="Release">
485 <Options>
486 <CompilerDefines>TRACE</CompilerDefines>
487 <OptimizeCode>true</OptimizeCode>
488 <AllowUnsafe>false</AllowUnsafe>
489 <OutputPath>bin\Release</OutputPath>
490 <DebugInformation>false</DebugInformation>
491 <XmlDocFile>AudioExample.xml</XmlDocFile>
492 <WarningLevel>1</WarningLevel>
493 <SuppressWarnings>1595</SuppressWarnings>
494 </Options>
495 </Configuration>
496 <Reference name="System" />
497 <Reference name="System.Drawing" />
498 <Reference name="SdlDotNet" localCopy="true"/>
499 <Files>
500 <File buildAction="EmbeddedResource">App.ico</File>
501 <Match path="." pattern="*.cs" recurse="true"/>
502 </Files>
503 </Project>
504 <Project name="SdlDotNet.Particles" path="extras\\Particles" language="C#" type="Library" assemblyName="SdlDotNet.Particles" rootNamespace="SdlDotNet.Particles">
505 <Configuration name="Debug">
506 <Options>
507 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
508 <OptimizeCode>false</OptimizeCode>
509 <AllowUnsafe>false</AllowUnsafe>
510 <OutputPath>bin\Debug</OutputPath>
511 <DebugInformation>true</DebugInformation>
512 <XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile>
513 <WarningLevel>4</WarningLevel>
514 <SuppressWarnings>1595</SuppressWarnings>
515 </Options>
516 </Configuration>
517 <Configuration name="Release">
518 <Options>
519 <CompilerDefines>TRACE</CompilerDefines>
520 <OptimizeCode>true</OptimizeCode>
521 <AllowUnsafe>false</AllowUnsafe>
522 <OutputPath>bin\Release</OutputPath>
523 <DebugInformation>false</DebugInformation>
524 <XmlDocFile>SdlDotNet.Particles.xml</XmlDocFile>
525 <WarningLevel>1</WarningLevel>
526 <SuppressWarnings>1595</SuppressWarnings>
527 </Options>
528 </Configuration>
529 <Reference name="System" />
530 <Reference name="System.Drawing" />
531 <Reference name="SdlDotNet" localCopy="true"/>
532 <Files>
533 <Match path="." pattern="*.cs" recurse="true"/>
534 </Files>
535 </Project>
536 <Project name="ParticlesExample" path="examples\\ParticlesExample" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.ParticlesExample.ParticlesExample" assemblyName="ParticlesExample" rootNamespace="SdlDotNet.Examples.ParticlesExample" icon="App.ico">
537 <Configuration name="Debug">
538 <Options>
539 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
540 <OptimizeCode>false</OptimizeCode>
541 <AllowUnsafe>false</AllowUnsafe>
542 <OutputPath>bin\Debug</OutputPath>
543 <DebugInformation>true</DebugInformation>
544 <XmlDocFile>ParticlesExample.xml</XmlDocFile>
545 <WarningLevel>4</WarningLevel>
546 <SuppressWarnings>1595</SuppressWarnings>
547 </Options>
548 </Configuration>
549 <Configuration name="Release">
550 <Options>
551 <CompilerDefines>TRACE</CompilerDefines>
552 <OptimizeCode>true</OptimizeCode>
553 <AllowUnsafe>false</AllowUnsafe>
554 <OutputPath>bin\Release</OutputPath>
555 <DebugInformation>false</DebugInformation>
556 <XmlDocFile>ParticlesExample.xml</XmlDocFile>
557 <WarningLevel>1</WarningLevel>
558 <SuppressWarnings>1595</SuppressWarnings>
559 </Options>
560 </Configuration>
561 <Reference name="System" />
562 <Reference name="System.Drawing" />
563 <Reference name="SdlDotNet" localCopy="true"/>
564 <Reference name="SdlDotNet.Particles" localCopy="true"/>
565 <Files>
566 <File buildAction="EmbeddedResource">App.ico</File>
567 <Match path="." pattern="*.cs" recurse="true"/>
568 </Files>
569 </Project>
570 <!--<Project name="SdlDotNet.Gui" path="extras\\Gui" language="C#" type="Library" assemblyName="SdlDotNet.Gui" rootNamespace="SdlDotNet.Gui">
571 <Configuration name="Debug">
572 <Options>
573 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
574 <OptimizeCode>false</OptimizeCode>
575 <AllowUnsafe>false</AllowUnsafe>
576 <OutputPath>bin\Debug</OutputPath>
577 <DebugInformation>true</DebugInformation>
578 <XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile>
579 <WarningLevel>4</WarningLevel>
580 </Options>
581 </Configuration>
582 <Configuration name="Release">
583 <Options>
584 <CompilerDefines>TRACE</CompilerDefines>
585 <OptimizeCode>true</OptimizeCode>
586 <AllowUnsafe>false</AllowUnsafe>
587 <OutputPath>bin\Release</OutputPath>
588 <DebugInformation>false</DebugInformation>
589 <XmlDocFile>SdlDotNet.Gui.xml</XmlDocFile>
590 <WarningLevel>1</WarningLevel>
591 </Options>
592 </Configuration>
593 <Reference name="System" />
594 <Reference name="System.Drawing" />
595 <Reference name="SdlDotNet" localCopy="true"/>
596 <Files>
597 <Match path="." pattern="*.cs" recurse="true"/>
598 </Files>
599 </Project>-->
600 <Project name="NeHe" path="examples\\NeHe" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.NeHe.NeHe" assemblyName="NeHe" rootNamespace="SdlDotNet.Examples.NeHe" icon="App.ico">
601 <Configuration name="Debug">
602 <Options>
603 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
604 <OptimizeCode>false</OptimizeCode>
605 <AllowUnsafe>false</AllowUnsafe>
606 <OutputPath>bin\Debug</OutputPath>
607 <DebugInformation>true</DebugInformation>
608 <XmlDocFile>NeHe.xml</XmlDocFile>
609 <WarningLevel>4</WarningLevel>
610 <SuppressWarnings>1595</SuppressWarnings>
611 </Options>
612 </Configuration>
613 <Configuration name="Release">
614 <Options>
615 <CompilerDefines>TRACE</CompilerDefines>
616 <OptimizeCode>true</OptimizeCode>
617 <AllowUnsafe>false</AllowUnsafe>
618 <OutputPath>bin\Release</OutputPath>
619 <DebugInformation>false</DebugInformation>
620 <XmlDocFile>NeHe.xml</XmlDocFile>
621 <WarningLevel>1</WarningLevel>
622 <SuppressWarnings>1595</SuppressWarnings>
623 </Options>
624 </Configuration>
625 <Reference name="System" />
626 <Reference name="System.Drawing" />
627 <Reference name="System.Windows.Forms" />
628 <Reference name="SdlDotNet" localCopy="true"/>
629 <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/>
630 <Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/>
631 <Reference name="Tao.Platform.Windows" localCopy="true" path="..\\..\\lib"/>
632 <Files>
633 <File buildAction="EmbeddedResource">App.ico</File>
634 <File subType="Form">NeHe.cs</File>
635 <Match path="." pattern="*.cs" recurse="true">
636 <Exclude name="NeHe.cs"/>
637 </Match>
638 </Files>
639 </Project>
640 <Project name="RedBook" path="examples\\RedBook" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.RedBook.RedBook" assemblyName="RedBook" rootNamespace="SdlDotNet.Examples.RedBook" icon="App.ico">
641 <Configuration name="Debug">
642 <Options>
643 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
644 <OptimizeCode>false</OptimizeCode>
645 <AllowUnsafe>false</AllowUnsafe>
646 <OutputPath>bin\Debug</OutputPath>
647 <DebugInformation>true</DebugInformation>
648 <XmlDocFile>RedBook.xml</XmlDocFile>
649 <WarningLevel>4</WarningLevel>
650 <SuppressWarnings>1595</SuppressWarnings>
651 </Options>
652 </Configuration>
653 <Configuration name="Release">
654 <Options>
655 <CompilerDefines>TRACE</CompilerDefines>
656 <OptimizeCode>true</OptimizeCode>
657 <AllowUnsafe>false</AllowUnsafe>
658 <OutputPath>bin\Release</OutputPath>
659 <DebugInformation>false</DebugInformation>
660 <XmlDocFile>RedBook.xml</XmlDocFile>
661 <WarningLevel>1</WarningLevel>
662 <SuppressWarnings>1595</SuppressWarnings>
663 </Options>
664 </Configuration>
665 <Reference name="System" />
666 <Reference name="System.Drawing" />
667 <Reference name="System.Windows.Forms" />
668 <Reference name="SdlDotNet" localCopy="true"/>
669 <Reference name="Tao.OpenGl" localCopy="true" path="..\\..\\lib"/>
670 <Reference name="Tao.OpenGl.Glu" localCopy="true" path="..\\..\\lib"/>
671 <Reference name="Tao.FreeGlut" localCopy="true" path="..\\..\\lib"/>
672 <Files>
673 <File buildAction="EmbeddedResource">App.ico</File>
674 <File subType="Form">RedBook.cs</File>
675 <Match path="." pattern="*.cs" recurse="true">
676 <Exclude name="RedBook.cs" />
677 </Match>
678 </Files>
679 </Project>
680 <Project name="PhysFsTest" path="examples\\PhysFsTest" language="C#" type="WinExe" startupObject="SdlDotNet.Examples.PhysFsTest.PhysFsTest" assemblyName="PhysFsTest" rootNamespace="SdlDotNet.Examples.PhysFsTest" icon="App.ico">
681 <Configuration name="Debug">
682 <Options>
683 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
684 <OptimizeCode>false</OptimizeCode>
685 <AllowUnsafe>false</AllowUnsafe>
686 <OutputPath>bin\Debug</OutputPath>
687 <DebugInformation>true</DebugInformation>
688 <XmlDocFile>PhysFsTest.xml</XmlDocFile>
689 <WarningLevel>4</WarningLevel>
690 <SuppressWarnings>1595</SuppressWarnings>
691 </Options>
692 </Configuration>
693 <Configuration name="Release">
694 <Options>
695 <CompilerDefines>TRACE</CompilerDefines>
696 <OptimizeCode>true</OptimizeCode>
697 <AllowUnsafe>false</AllowUnsafe>
698 <OutputPath>bin\Release</OutputPath>
699 <DebugInformation>false</DebugInformation>
700 <XmlDocFile>PhysFsTest.xml</XmlDocFile>
701 <WarningLevel>1</WarningLevel>
702 <SuppressWarnings>1595</SuppressWarnings>
703 </Options>
704 </Configuration>
705 <Reference name="System" />
706 <Reference name="System.Drawing" />
707 <Reference name="SdlDotNet" localCopy="true"/>
708 <Reference name="Tao.PhysFs" localCopy="true" path="..\\..\\lib"/>
709 <Files>
710 <File buildAction="EmbeddedResource">App.ico</File>
711 <Match path="." pattern="*.cs" recurse="true"/>
712 </Files>
713 </Project>
714 </Solution>
715</Prebuild>
diff --git a/Prebuild/doc/prebuild-example5.xml b/Prebuild/doc/prebuild-example5.xml
deleted file mode 100644
index 5221547..0000000
--- a/Prebuild/doc/prebuild-example5.xml
+++ /dev/null
@@ -1,187 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd" version="1.6">
3 <Solution name="Tao.Sdl">
4 <Configuration name="Debug">
5 <Options>
6 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
7 <OptimizeCode>false</OptimizeCode>
8 <AllowUnsafe>true</AllowUnsafe>
9 <OutputPath>bin\Debug</OutputPath>
10 <XmlDocFile>Tao.Sdl.xml</XmlDocFile>
11 <DebugInformation>true</DebugInformation>
12 </Options>
13 </Configuration>
14 <Configuration name="Release">
15 <Options>
16 <CompilerDefines>TRACE;WIN32</CompilerDefines>
17 <OptimizeCode>true</OptimizeCode>
18 <AllowUnsafe>true</AllowUnsafe>
19 <OutputPath>bin\Release</OutputPath>
20 <XmlDocFile>Tao.Sdl.xml</XmlDocFile>
21 <DebugInformation>false</DebugInformation>
22 </Options>
23 </Configuration>
24 <Files>
25 <File>Tao.Sdl.License.txt</File>
26 <File>Tao.Sdl.Readme.txt</File>
27 <File>Tao.Sdl.snk</File>
28 <File>Tao.Sdl.dll.config</File>
29 </Files>
30 <Project name="Tao.Sdl" path="." language="C#" type="Library">
31 <Reference name="System" />
32 <Files>
33 <File>AssemblyInfo.cs</File>
34 <File>Sdl.cs</File>
35 <File>SdlImage.cs</File>
36 <File>SdlMixer.cs</File>
37 <File>SdlTtf.cs</File>
38 <File>SdlNet.cs</File>
39 <File>SdlGfx.cs</File>
40 <File>Smpeg.cs</File>
41 <File>DelegateCallingConventionCdeclAttribute.cs</File>
42 </Files>
43 </Project>
44 <Project name="Tao.Sdl.Tests" path="..\\..\\tests\\Sdl\\" language="C#" type="Library">
45 <Configuration name="Debug">
46 <Options>
47 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
48 <OptimizeCode>false</OptimizeCode>
49 <AllowUnsafe>false</AllowUnsafe>
50 <OutputPath>bin\Debug</OutputPath>
51 <XmlDocFile>Tao.Sdl.Tests.xml</XmlDocFile>
52 <DebugInformation>true</DebugInformation>
53 </Options>
54 </Configuration>
55 <Configuration name="Release">
56 <Options>
57 <CompilerDefines>TRACE;WIN32</CompilerDefines>
58 <OptimizeCode>true</OptimizeCode>
59 <AllowUnsafe>false</AllowUnsafe>
60 <OutputPath>bin\Release</OutputPath>
61 <XmlDocFile>Tao.Sdl.Tests.xml</XmlDocFile>
62 <DebugInformation>false</DebugInformation>
63 </Options>
64 </Configuration>
65 <Reference name="System" />
66 <Reference name="nunit.framework.dll"/>
67 <Reference name="Tao.Sdl" />
68 <Files>
69 <File>AssemblyInfo.cs</File>
70 <File>SdlTest.cs</File>
71 <File>SdlTestVideo.cs</File>
72 <File>SdlTestImage.cs</File>
73 <File>SdlTestTtf.cs</File>
74 <File>SdlTestMixer.cs</File>
75 <File>SdlTestGfx.cs</File>
76 <File>SmpegTest.cs</File>
77 </Files>
78 </Project>
79 <Project name="SdlExamples.Rectangles" path="..\\..\\examples\\SdlExamples\\Rectangles" language="C#" type="WinExe" startupObject="SdlExamples.Rectangles">
80 <Configuration name="Debug">
81 <Options>
82 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
83 <OptimizeCode>false</OptimizeCode>
84 <AllowUnsafe>false</AllowUnsafe>
85 <OutputPath>bin\Debug</OutputPath>
86 <DebugInformation>true</DebugInformation>
87 </Options>
88 </Configuration>
89 <Configuration name="Release">
90 <Options>
91 <CompilerDefines>TRACE;WIN32</CompilerDefines>
92 <OptimizeCode>true</OptimizeCode>
93 <AllowUnsafe>false</AllowUnsafe>
94 <OutputPath>bin\Release</OutputPath>
95 <DebugInformation>false</DebugInformation>
96 </Options>
97 </Configuration>
98 <Reference name="System" />
99 <Reference name="Tao.Sdl" />
100 <Files>
101 <File>AssemblyInfo.cs</File>
102 <File>Rectangles.cs</File>
103 </Files>
104 </Project>
105 <Project name="SdlExamples.SmpegPlayer" path="..\\..\\examples\\SdlExamples\\SmpegPlayer" language="C#" type="WinExe" startupObject="SdlExamples.SmpegPlayer">
106 <Configuration name="Debug">
107 <Options>
108 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
109 <OptimizeCode>false</OptimizeCode>
110 <AllowUnsafe>false</AllowUnsafe>
111 <OutputPath>bin\Debug</OutputPath>
112 <DebugInformation>true</DebugInformation>
113 </Options>
114 </Configuration>
115 <Configuration name="Release">
116 <Options>
117 <CompilerDefines>TRACE;WIN32</CompilerDefines>
118 <OptimizeCode>true</OptimizeCode>
119 <AllowUnsafe>false</AllowUnsafe>
120 <OutputPath>bin\Release</OutputPath>
121 <DebugInformation>false</DebugInformation>
122 </Options>
123 </Configuration>
124 <Reference name="System" />
125 <Reference name="Tao.Sdl" />
126 <Files>
127 <File>AssemblyInfo.cs</File>
128 <File>SmpegPlayer.cs</File>
129 </Files>
130 </Project>
131 <Project name="SdlExamples.GfxPrimitives" path="..\\..\\examples\\SdlExamples\\GfxPrimitives" language="C#" type="WinExe" startupObject="SdlExamples.GfxPrimitives">
132 <Configuration name="Debug">
133 <Options>
134 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
135 <OptimizeCode>false</OptimizeCode>
136 <AllowUnsafe>false</AllowUnsafe>
137 <OutputPath>bin\Debug</OutputPath>
138 <DebugInformation>true</DebugInformation>
139 </Options>
140 </Configuration>
141 <Configuration name="Release">
142 <Options>
143 <CompilerDefines>TRACE;WIN32</CompilerDefines>
144 <OptimizeCode>true</OptimizeCode>
145 <AllowUnsafe>false</AllowUnsafe>
146 <OutputPath>bin\Release</OutputPath>
147 <DebugInformation>false</DebugInformation>
148 </Options>
149 </Configuration>
150 <Reference name="System" />
151 <Reference name="Tao.Sdl" />
152 <Files>
153 <File>AssemblyInfo.cs</File>
154 <File>GfxPrimitives.cs</File>
155 </Files>
156 </Project>
157 <Project name="Tao.PostProcess" path="..\\Tao.PostProcess\\" language="C#" type="Exe">
158 <Configuration name="Debug">
159 <Options>
160 <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
161 <OptimizeCode>false</OptimizeCode>
162 <AllowUnsafe>false</AllowUnsafe>
163 <OutputPath>bin\Debug</OutputPath>
164 <DebugInformation>true</DebugInformation>
165 </Options>
166 </Configuration>
167 <Configuration name="Release">
168 <Options>
169 <CompilerDefines>TRACE;WIN32</CompilerDefines>
170 <OptimizeCode>true</OptimizeCode>
171 <AllowUnsafe>false</AllowUnsafe>
172 <OutputPath>bin\Release</OutputPath>
173 <DebugInformation>false</DebugInformation>
174 </Options>
175 </Configuration>
176 <Reference name="System" />
177 <Files>
178 <File>AssemblyInfo.cs</File>
179 <File>AppMain.cs</File>
180 <File>BuildProcessor.cs</File>
181 <File>Options.cs</File>
182 <File>ReleaseBuildProcessor.cs</File>
183 <File>UsageHelp.cs</File>
184 </Files>
185 </Project>
186 </Solution>
187</Prebuild>
diff --git a/Prebuild/prebuild b/Prebuild/prebuild
deleted file mode 100644
index 0dc648d..0000000
--- a/Prebuild/prebuild
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/sh
2exec mono [PREFIX]/prebuild.exe "$@"
diff --git a/Prebuild/scripts/Clean.bat b/Prebuild/scripts/Clean.bat
deleted file mode 100644
index 39fa685..0000000
--- a/Prebuild/scripts/Clean.bat
+++ /dev/null
@@ -1,2 +0,0 @@
1cd ..
2Prebuild.exe /clean /yes /removedir obj /file prebuild.xml /build NET_2_0 /pause
diff --git a/Prebuild/scripts/Help.bat b/Prebuild/scripts/Help.bat
deleted file mode 100644
index a7d3db4..0000000
--- a/Prebuild/scripts/Help.bat
+++ /dev/null
@@ -1,2 +0,0 @@
1cd ..
2Prebuild.exe /usage /pause \ No newline at end of file
diff --git a/Prebuild/scripts/MonoDevelop.sh b/Prebuild/scripts/MonoDevelop.sh
deleted file mode 100644
index dae3cf4..0000000
--- a/Prebuild/scripts/MonoDevelop.sh
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/sh
2prebuild /target monodev /file ../prebuild.xml /build NET_1_1 /pause
diff --git a/Prebuild/scripts/Prebuild.nsi b/Prebuild/scripts/Prebuild.nsi
deleted file mode 100644
index 0c6e2bc..0000000
--- a/Prebuild/scripts/Prebuild.nsi
+++ /dev/null
@@ -1,231 +0,0 @@
1!verbose 3
2
3!define PRODUCT_NAME "Prebuild"
4!define PRODUCT_VERSION "1.3.1"
5!define PRODUCT_PUBLISHER "Prebuild"
6!define PRODUCT_PACKAGE "prebuild"
7!define PRODUCT_WEB_SITE "http://dnpb.sourceforge.net"
8!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Prebuild"
9!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Prebuild"
10!define PRODUCT_UNINST_ROOT_KEY "HKLM"
11!define PRODUCT_PATH ".."
12
13;!define MUI_WELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp"
14;!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
15;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "PrebuildLogo.bmp"
16;!define MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
17
18BrandingText "© 2003-2006 David Hudson, http://dnpb.sourceforge.net/"
19SetCompressor lzma
20CRCCheck on
21
22; File Association defines
23;!include "fileassoc.nsh"
24
25; MUI 1.67 compatible ------
26!include "MUI.nsh"
27
28; MUI Settings
29!define MUI_ABORTWARNING
30!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
31!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
32
33;--------------------------------
34;Variables
35
36;--------------------------------
37;Installer Pages
38
39; Welcome page
40!insertmacro MUI_PAGE_WELCOME
41; License page
42!insertmacro MUI_PAGE_LICENSE "..\doc\license.txt"
43; Directory page
44!insertmacro MUI_PAGE_DIRECTORY
45
46; Instfiles page
47!insertmacro MUI_PAGE_INSTFILES
48
49; Finish page
50!insertmacro MUI_PAGE_FINISH
51
52;------------------------------------
53; Uninstaller pages
54!insertmacro MUI_UNPAGE_CONFIRM
55!insertmacro MUI_UNPAGE_INSTFILES
56!insertmacro MUI_UNPAGE_FINISH
57;------------------------------------
58
59; Language files
60!insertmacro MUI_LANGUAGE "English"
61
62; Reserve files
63!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
64
65; MUI end ------
66
67Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
68OutFile "..\${PRODUCT_PACKAGE}-${PRODUCT_VERSION}-setup.exe"
69InstallDir "$PROGRAMFILES\Prebuild"
70InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
71ShowInstDetails show
72ShowUnInstDetails show
73
74; .NET Framework check
75; http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/redistdeploy1_1.asp
76; Section "Detecting that the .NET Framework 1.1 is installed"
77Function .onInit
78 ReadRegDWORD $R0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322" Install
79 StrCmp $R0 "" 0 CheckPreviousVersion
80 MessageBox MB_OK "Microsoft .NET Framework 1.1 was not found on this system.$\r$\n$\r$\nUnable to continue this installation."
81 Abort
82
83 CheckPreviousVersion:
84 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName"
85 StrCmp $R0 "" CheckOSVersion 0
86 MessageBox MB_OK "An old version of Prebuild is installed on this computer, please uninstall first.$\r$\n$\r$\nUnable to continue this installation."
87 Abort
88
89 CheckOSVersion:
90 Call IsSupportedWindowsVersion
91 Pop $R0
92 StrCmp $R0 "False" NoAbort 0
93 MessageBox MB_OK "The operating system you are using is not supported by Prebuild (95/98/ME/NT3.x/NT4.x)."
94 Abort
95
96 NoAbort:
97FunctionEnd
98
99Section "Source" SecSource
100 SetOverwrite ifnewer
101 SetOutPath "$INSTDIR\src"
102 File /r /x *.swp /x .svn /x *.xml /x *.csproj /x *.user /x *.build /x *.prjx /x *.mdp /x bin /x obj /x *.nsi ${PRODUCT_PATH}\src\*.*
103
104 ;Store installation folder
105 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
106
107SectionEnd
108
109Section "Runtime" SecRuntime
110 SetOverwrite ifnewer
111 SetOutPath "$INSTDIR"
112 File /r /x *.swp /x .svn /x *.nsi /x src /x *.sln /x *.cmbx /x *.mds ${PRODUCT_PATH}\Prebuild.exe ${PRODUCT_PATH}\prebuild.xml
113
114 ;Store installation folder
115 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
116
117SectionEnd
118
119Section "Documentation" SecDocs
120 SetOverwrite ifnewer
121 SetOutPath "$INSTDIR\doc"
122 File /r /x *.swp /x .svn /x *.exe ${PRODUCT_PATH}\doc\*.*
123
124 ;Store installation folder
125 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
126SectionEnd
127
128Section "Scripts" SecScripts
129 SetOverwrite ifnewer
130 SetOutPath "$INSTDIR\scripts"
131 File /r /x *.swp /x .svn /x *.nsi /x *.exe ${PRODUCT_PATH}\scripts\*.*
132
133 ;Store installation folder
134 WriteRegStr HKCU "Software\Prebuild" "" $INSTDIR
135SectionEnd
136
137;Language strings
138
139Section -AdditionalIcons
140 WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
141SectionEnd
142
143Section -Post
144 WriteUninstaller "$INSTDIR\uninst.exe"
145 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
146 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
147 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
148 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
149 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
150SectionEnd
151
152Section Uninstall
153
154 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
155 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
156 RMDir /r "$INSTDIR"
157
158SectionEnd
159
160; GetWindowsVersion, taken from NSIS help, modified for our purposes
161Function IsSupportedWindowsVersion
162
163 Push $R0
164 Push $R1
165
166 ReadRegStr $R0 HKLM \
167 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
168
169 IfErrors 0 lbl_winnt
170
171 ; we are not NT
172 ReadRegStr $R0 HKLM \
173 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
174
175 StrCpy $R1 $R0 1
176 StrCmp $R1 '4' 0 lbl_error
177
178 StrCpy $R1 $R0 3
179
180 StrCmp $R1 '4.0' lbl_win32_95
181 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
182
183 lbl_win32_95:
184 StrCpy $R0 'False'
185 Goto lbl_done
186
187 lbl_win32_98:
188 StrCpy $R0 'False'
189 Goto lbl_done
190
191 lbl_win32_ME:
192 StrCpy $R0 'False'
193 Goto lbl_done
194
195 lbl_winnt:
196
197 StrCpy $R1 $R0 1
198
199 StrCmp $R1 '3' lbl_winnt_x
200 StrCmp $R1 '4' lbl_winnt_x
201
202 StrCpy $R1 $R0 3
203
204 StrCmp $R1 '5.0' lbl_winnt_2000
205 StrCmp $R1 '5.1' lbl_winnt_XP
206 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
207
208 lbl_winnt_x:
209 StrCpy $R0 'False'
210 Goto lbl_done
211
212 lbl_winnt_2000:
213 Strcpy $R0 'True'
214 Goto lbl_done
215
216 lbl_winnt_XP:
217 Strcpy $R0 'True'
218 Goto lbl_done
219
220 lbl_winnt_2003:
221 Strcpy $R0 'True'
222 Goto lbl_done
223
224 lbl_error:
225 Strcpy $R0 'False'
226 lbl_done:
227
228 Pop $R1
229 Exch $R0
230
231FunctionEnd
diff --git a/Prebuild/scripts/SharpDevelop.bat b/Prebuild/scripts/SharpDevelop.bat
deleted file mode 100644
index 483d9c9..0000000
--- a/Prebuild/scripts/SharpDevelop.bat
+++ /dev/null
@@ -1,4 +0,0 @@
1@rem Generates a combine (.cmbx) and a set of project files (.prjx)
2@rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx)
3cd ..
4Prebuild.exe /target sharpdev /file prebuild.xml /build NET_1_1 /pause
diff --git a/Prebuild/scripts/SharpDevelop2.bat b/Prebuild/scripts/SharpDevelop2.bat
deleted file mode 100644
index 4ca0272..0000000
--- a/Prebuild/scripts/SharpDevelop2.bat
+++ /dev/null
@@ -1,4 +0,0 @@
1@rem Generates a combine (.cmbx) and a set of project files (.prjx)
2@rem for SharpDevelop (http://icsharpcode.net/OpenSource/SD/Default.aspx)
3cd ..
4Prebuild.exe /target sharpdev2 /file prebuild.xml /pause
diff --git a/Prebuild/scripts/VS2002.bat b/Prebuild/scripts/VS2002.bat
deleted file mode 100644
index a11740e..0000000
--- a/Prebuild/scripts/VS2002.bat
+++ /dev/null
@@ -1,4 +0,0 @@
1@rem Generates a solution (.sln) and a set of project files (.csproj)
2@rem for Microsoft Visual Studio .NET 2002
3cd ..
4Prebuild.exe /target vs2002 /file prebuild.xml /build NET_1_1 /pause
diff --git a/Prebuild/scripts/VS2003.bat b/Prebuild/scripts/VS2003.bat
deleted file mode 100644
index 1be57f8..0000000
--- a/Prebuild/scripts/VS2003.bat
+++ /dev/null
@@ -1,4 +0,0 @@
1@rem Generates a solution (.sln) and a set of project files (.csproj)
2@rem for Microsoft Visual Studio .NET 2002
3cd ..
4Prebuild.exe /target vs2003 /file prebuild.xml /build NET_1_1 /pause
diff --git a/Prebuild/scripts/VS2005.bat b/Prebuild/scripts/VS2005.bat
deleted file mode 100644
index 86ad3fc..0000000
--- a/Prebuild/scripts/VS2005.bat
+++ /dev/null
@@ -1,4 +0,0 @@
1@rem Generates a solution (.sln) and a set of project files (.csproj, .vbproj, etc.)
2@rem for Microsoft Visual Studio .NET 2005
3cd ..
4Prebuild.exe /target vs2005 /file prebuild.xml /build NET_2_0 /pause
diff --git a/Prebuild/scripts/autotools.bat b/Prebuild/scripts/autotools.bat
deleted file mode 100644
index 1fd3469..0000000
--- a/Prebuild/scripts/autotools.bat
+++ /dev/null
@@ -1,4 +0,0 @@
1@rem Generates Makefiles
2@rem for autotools
3cd ..
4Prebuild.exe /target autotools /file prebuild.xml /pause
diff --git a/Prebuild/scripts/autotools.sh b/Prebuild/scripts/autotools.sh
deleted file mode 100644
index 18cd46f..0000000
--- a/Prebuild/scripts/autotools.sh
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/sh
2prebuild /target autotools /file ../prebuild.xml /build NET_2_0 /pause
diff --git a/Prebuild/scripts/nant.bat b/Prebuild/scripts/nant.bat
deleted file mode 100644
index 2a6ae60..0000000
--- a/Prebuild/scripts/nant.bat
+++ /dev/null
@@ -1,4 +0,0 @@
1@rem Generates a .build files
2@rem for NAnt
3cd ..
4Prebuild.exe /target nant /file prebuild.xml /pause
diff --git a/Prebuild/scripts/nant.sh b/Prebuild/scripts/nant.sh
deleted file mode 100644
index 54a8254..0000000
--- a/Prebuild/scripts/nant.sh
+++ /dev/null
@@ -1,2 +0,0 @@
1#!/bin/sh
2prebuild /target nant /file ../prebuild.xml /pause
diff --git a/Prebuild/src/App.ico b/Prebuild/src/App.ico
deleted file mode 100644
index ac4ea6f..0000000
--- a/Prebuild/src/App.ico
+++ /dev/null
Binary files differ
diff --git a/Prebuild/src/Core/Attributes/DataNodeAttribute.cs b/Prebuild/src/Core/Attributes/DataNodeAttribute.cs
deleted file mode 100644
index dbdaf0b..0000000
--- a/Prebuild/src/Core/Attributes/DataNodeAttribute.cs
+++ /dev/null
@@ -1,81 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.Collections.Specialized;
37
38namespace Prebuild.Core.Attributes
39{
40 /// <summary>
41 ///
42 /// </summary>
43 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
44 public sealed class DataNodeAttribute : Attribute
45 {
46 #region Fields
47
48 private string m_Name = "unknown";
49
50 #endregion
51
52 #region Constructors
53
54 /// <summary>
55 /// Initializes a new instance of the <see cref="DataNodeAttribute"/> class.
56 /// </summary>
57 /// <param name="name">The name.</param>
58 public DataNodeAttribute(string name)
59 {
60 m_Name = name;
61 }
62
63 #endregion
64
65 #region Properties
66
67 /// <summary>
68 /// Gets the name.
69 /// </summary>
70 /// <value>The name.</value>
71 public string Name
72 {
73 get
74 {
75 return m_Name;
76 }
77 }
78
79 #endregion
80 }
81}
diff --git a/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs b/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs
deleted file mode 100644
index edda56d..0000000
--- a/Prebuild/src/Core/Attributes/OptionNodeAttribute.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36
37namespace Prebuild.Core.Attributes
38{
39 /// <summary>
40 ///
41 /// </summary>
42 [AttributeUsage(AttributeTargets.Field)]
43 public sealed class OptionNodeAttribute : Attribute
44 {
45 #region Fields
46
47 private string m_NodeName;
48
49 #endregion
50
51 #region Constructors
52
53 /// <summary>
54 /// Initializes a new instance of the <see cref="OptionNodeAttribute"/> class.
55 /// </summary>
56 /// <param name="nodeName">Name of the node.</param>
57 public OptionNodeAttribute(string nodeName)
58 {
59 m_NodeName = nodeName;
60 }
61
62 #endregion
63
64 #region Properties
65
66 /// <summary>
67 /// Gets the name of the node.
68 /// </summary>
69 /// <value>The name of the node.</value>
70 public string NodeName
71 {
72 get
73 {
74 return m_NodeName;
75 }
76 }
77
78 #endregion
79 }
80}
diff --git a/Prebuild/src/Core/Attributes/TargetAttribute.cs b/Prebuild/src/Core/Attributes/TargetAttribute.cs
deleted file mode 100644
index 985f180..0000000
--- a/Prebuild/src/Core/Attributes/TargetAttribute.cs
+++ /dev/null
@@ -1,80 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36
37namespace Prebuild.Core.Attributes
38{
39 /// <summary>
40 ///
41 /// </summary>
42 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
43 public sealed class TargetAttribute : Attribute
44 {
45 #region Fields
46
47 private string m_Name;
48
49 #endregion
50
51 #region Constructors
52
53 /// <summary>
54 /// Initializes a new instance of the <see cref="TargetAttribute"/> class.
55 /// </summary>
56 /// <param name="name">The name.</param>
57 public TargetAttribute(string name)
58 {
59 m_Name = name;
60 }
61
62 #endregion
63
64 #region Properties
65
66 /// <summary>
67 /// Gets the name.
68 /// </summary>
69 /// <value>The name.</value>
70 public string Name
71 {
72 get
73 {
74 return m_Name;
75 }
76 }
77
78 #endregion
79 }
80}
diff --git a/Prebuild/src/Core/FatalException.cs b/Prebuild/src/Core/FatalException.cs
deleted file mode 100644
index 92aad3d..0000000
--- a/Prebuild/src/Core/FatalException.cs
+++ /dev/null
@@ -1,94 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.Runtime.Serialization;
37
38namespace Prebuild.Core
39{
40 /// <summary>
41 ///
42 /// </summary>
43 [Serializable()]
44 public class FatalException : Exception
45 {
46 #region Constructors
47
48
49 /// <summary>
50 /// Initializes a new instance of the <see cref="FatalException"/> class.
51 /// </summary>
52 public FatalException()
53 {
54 }
55
56 /// <summary>
57 /// Initializes a new instance of the <see cref="FatalException"/> class.
58 /// </summary>
59 /// <param name="format">The format.</param>
60 /// <param name="args">The args.</param>
61 public FatalException(string format, params object[] args)
62 : base(String.Format(format, args))
63 {
64 }
65
66 /// <summary>
67 /// Exception with specified string
68 /// </summary>
69 /// <param name="message">Exception message</param>
70 public FatalException(string message): base(message)
71 {
72 }
73
74 /// <summary>
75 ///
76 /// </summary>
77 /// <param name="message"></param>
78 /// <param name="exception"></param>
79 public FatalException(string message, Exception exception) : base(message, exception)
80 {
81 }
82
83 /// <summary>
84 ///
85 /// </summary>
86 /// <param name="info"></param>
87 /// <param name="context"></param>
88 protected FatalException(SerializationInfo info, StreamingContext context) : base( info, context )
89 {
90 }
91
92 #endregion
93 }
94}
diff --git a/Prebuild/src/Core/Interfaces/IDataNode.cs b/Prebuild/src/Core/Interfaces/IDataNode.cs
deleted file mode 100644
index 0bad97c..0000000
--- a/Prebuild/src/Core/Interfaces/IDataNode.cs
+++ /dev/null
@@ -1,56 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.Xml;
37
38namespace Prebuild.Core.Interfaces
39{
40 /// <summary>
41 ///
42 /// </summary>
43 public interface IDataNode
44 {
45 /// <summary>
46 /// Gets or sets the parent.
47 /// </summary>
48 /// <value>The parent.</value>
49 IDataNode Parent { get; set; }
50 /// <summary>
51 /// Parses the specified node.
52 /// </summary>
53 /// <param name="node">The node.</param>
54 void Parse(XmlNode node);
55 }
56}
diff --git a/Prebuild/src/Core/Interfaces/ITarget.cs b/Prebuild/src/Core/Interfaces/ITarget.cs
deleted file mode 100644
index dac6cd6..0000000
--- a/Prebuild/src/Core/Interfaces/ITarget.cs
+++ /dev/null
@@ -1,60 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36
37namespace Prebuild.Core.Interfaces
38{
39 /// <summary>
40 ///
41 /// </summary>
42 public interface ITarget
43 {
44 /// <summary>
45 /// Writes the specified kern.
46 /// </summary>
47 /// <param name="kern">The kern.</param>
48 void Write(Kernel kern);
49 /// <summary>
50 /// Cleans the specified kern.
51 /// </summary>
52 /// <param name="kern">The kern.</param>
53 void Clean(Kernel kern);
54 /// <summary>
55 /// Gets the name.
56 /// </summary>
57 /// <value>The name.</value>
58 string Name { get; }
59 }
60} \ No newline at end of file
diff --git a/Prebuild/src/Core/Kernel.cs b/Prebuild/src/Core/Kernel.cs
deleted file mode 100644
index 3117e7c..0000000
--- a/Prebuild/src/Core/Kernel.cs
+++ /dev/null
@@ -1,758 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: robloach $
30 * $Date: 2006-09-26 00:30:53 +0200 (ti, 26 sep 2006) $
31 * $Revision: 165 $
32 */
33#endregion
34
35using System;
36using System.Diagnostics;
37using System.Collections;
38using System.Collections.Specialized;
39using System.IO;
40using System.Reflection;
41using System.Xml;
42using System.Xml.Schema;
43using System.Text;
44
45using Prebuild.Core.Attributes;
46using Prebuild.Core.Interfaces;
47using Prebuild.Core.Nodes;
48using Prebuild.Core.Parse;
49using Prebuild.Core.Utilities;
50
51namespace Prebuild.Core
52{
53 /// <summary>
54 ///
55 /// </summary>
56 public class Kernel : IDisposable
57 {
58 #region Inner Classes
59
60 private struct NodeEntry
61 {
62 public Type Type;
63 public DataNodeAttribute Attribute;
64 }
65
66 #endregion
67
68 #region Fields
69
70 private static Kernel m_Instance = new Kernel();
71
72 /// <summary>
73 /// This must match the version of the schema that is embeeded
74 /// </summary>
75 private static string m_SchemaVersion = "1.7";
76 private static string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd";
77 private static string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema;
78 bool disposed;
79 private Version m_Version;
80 private string m_Revision = "";
81 private CommandLineCollection m_CommandLine;
82 private Log m_Log;
83 private CurrentDirectory m_CurrentWorkingDirectory;
84 private XmlSchemaCollection m_Schemas;
85
86 private Hashtable m_Targets;
87 private Hashtable m_Nodes;
88
89 ArrayList m_Solutions;
90 string m_Target;
91 string m_Clean;
92 string[] m_RemoveDirectories;
93 string m_CurrentFile;
94 bool m_PauseAfterFinish;
95 string[] m_ProjectGroups;
96 StringCollection m_Refs;
97
98
99 #endregion
100
101 #region Constructors
102
103 private Kernel()
104 {
105 }
106
107 #endregion
108
109 #region Properties
110
111 /// <summary>
112 /// Gets a value indicating whether [pause after finish].
113 /// </summary>
114 /// <value><c>true</c> if [pause after finish]; otherwise, <c>false</c>.</value>
115 public bool PauseAfterFinish
116 {
117 get
118 {
119 return m_PauseAfterFinish;
120 }
121 }
122
123 /// <summary>
124 /// Gets the instance.
125 /// </summary>
126 /// <value>The instance.</value>
127 public static Kernel Instance
128 {
129 get
130 {
131 return m_Instance;
132 }
133 }
134
135 /// <summary>
136 /// Gets the version.
137 /// </summary>
138 /// <value>The version.</value>
139 public string Version
140 {
141 get
142 {
143 return String.Format("{0}.{1}.{2}{3}", m_Version.Major, m_Version.Minor, m_Version.Build, m_Revision);
144 }
145 }
146
147 /// <summary>
148 /// Gets the command line.
149 /// </summary>
150 /// <value>The command line.</value>
151 public CommandLineCollection CommandLine
152 {
153 get
154 {
155 return m_CommandLine;
156 }
157 }
158
159 /// <summary>
160 /// Gets the targets.
161 /// </summary>
162 /// <value>The targets.</value>
163 public Hashtable Targets
164 {
165 get
166 {
167 return m_Targets;
168 }
169 }
170
171 /// <summary>
172 /// Gets the log.
173 /// </summary>
174 /// <value>The log.</value>
175 public Log Log
176 {
177 get
178 {
179 return m_Log;
180 }
181 }
182
183 /// <summary>
184 /// Gets the current working directory.
185 /// </summary>
186 /// <value>The current working directory.</value>
187 public CurrentDirectory CurrentWorkingDirectory
188 {
189 get
190 {
191 return m_CurrentWorkingDirectory;
192 }
193 }
194
195 /// <summary>
196 /// Gets the solutions.
197 /// </summary>
198 /// <value>The solutions.</value>
199 public ArrayList Solutions
200 {
201 get
202 {
203 return m_Solutions;
204 }
205 }
206
207 #endregion
208
209 #region Private Methods
210
211 private void RemoveDirectories(string rootDir, string[] dirNames)
212 {
213 foreach(string dir in Directory.GetDirectories(rootDir))
214 {
215 string simpleName = Path.GetFileName(dir);
216
217 if(Array.IndexOf(dirNames, simpleName) != -1)
218 {
219 //delete if the name matches one of the directory names to delete
220 string fullDirPath = Path.GetFullPath(dir);
221 Directory.Delete(fullDirPath,true);
222 }
223 else//not a match, so check children
224 {
225 RemoveDirectories(dir,dirNames);
226 //recurse, checking children for them
227 }
228 }
229 }
230
231// private void RemoveDirectoryMatches(string rootDir, string dirPattern)
232// {
233// foreach(string dir in Directory.GetDirectories(rootDir))
234// {
235// foreach(string match in Directory.GetDirectories(dir))
236// {//delete all child directories that match
237// Directory.Delete(Path.GetFullPath(match),true);
238// }
239// //recure through the rest checking for nested matches to delete
240// RemoveDirectoryMatches(dir,dirPattern);
241// }
242// }
243
244 private void LoadSchema()
245 {
246 Assembly assembly = this.GetType().Assembly;
247 Stream stream = assembly.GetManifestResourceStream("Prebuild.data." + m_Schema);
248 if(stream == null)
249 {
250 //try without the default namespace prepending to it in case was compiled with SharpDevelop or MonoDevelop instead of Visual Studio .NET
251 stream = assembly.GetManifestResourceStream(m_Schema);
252 if(stream == null)
253 {
254 throw new System.Reflection.TargetException(string.Format("Could not find the scheme embedded resource file '{0}'.", m_Schema));
255 }
256 }
257 XmlReader schema = new XmlTextReader(stream);
258
259 m_Schemas = new XmlSchemaCollection();
260 m_Schemas.Add(m_SchemaURI, schema);
261 }
262
263 private void CacheVersion()
264 {
265 m_Version = Assembly.GetEntryAssembly().GetName().Version;
266 }
267
268 private void CacheTargets(Assembly assm)
269 {
270 foreach(Type t in assm.GetTypes())
271 {
272 TargetAttribute ta = (TargetAttribute)Helper.CheckType(t, typeof(TargetAttribute), typeof(ITarget));
273 if(ta == null)
274 {
275 continue;
276 }
277
278 ITarget target = (ITarget)assm.CreateInstance(t.FullName);
279 if(target == null)
280 {
281 throw new MissingMethodException("Could not create ITarget instance");
282 }
283
284 m_Targets[ta.Name] = target;
285 }
286 }
287
288 private void CacheNodeTypes(Assembly assm)
289 {
290 foreach(Type t in assm.GetTypes())
291 {
292 DataNodeAttribute dna = (DataNodeAttribute)Helper.CheckType(t, typeof(DataNodeAttribute), typeof(IDataNode));
293 if(dna == null)
294 {
295 continue;
296 }
297
298 NodeEntry ne = new NodeEntry();
299 ne.Type = t;
300 ne.Attribute = dna;
301 m_Nodes[dna.Name] = ne;
302 }
303 }
304
305 private void LogBanner()
306 {
307 m_Log.Write("Prebuild v" + this.Version);
308 m_Log.Write("Copyright (c) Matthew Holmes, Dan Moorehead and David Hudson");
309 m_Log.Write("See 'prebuild /usage' for help");
310 m_Log.Write();
311 }
312
313 private void ProcessFile(string file)
314 {
315 m_CurrentWorkingDirectory.Push();
316
317 string path = file;
318 try
319 {
320 try
321 {
322 path = Helper.ResolvePath(path);
323 }
324 catch(ArgumentException)
325 {
326 m_Log.Write("Could not open Prebuild file: " + path);
327 m_CurrentWorkingDirectory.Pop();
328 return;
329 }
330
331 m_CurrentFile = path;
332 Helper.SetCurrentDir(Path.GetDirectoryName(path));
333
334
335 XmlTextReader reader = new XmlTextReader(path);
336
337 Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor();
338
339 //register command line arguments as XML variables
340 IDictionaryEnumerator dict = m_CommandLine.GetEnumerator();
341 while (dict.MoveNext())
342 {
343 string name = dict.Key.ToString().Trim();
344 if (name.Length > 0)
345 pre.RegisterVariable(name, dict.Value.ToString());
346 }
347
348 string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML
349
350
351 XmlDocument doc = new XmlDocument();
352 try
353 {
354 XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml)));
355
356 //validate while reading from string into XmlDocument DOM structure in memory
357 foreach(XmlSchema schema in m_Schemas)
358 {
359 validator.Schemas.Add(schema);
360 }
361 doc.Load(validator);
362 }
363 catch(XmlException e)
364 {
365 throw new XmlException(e.ToString());
366 }
367
368 //is there a purpose to writing it? An syntax/schema problem would have been found during pre.Process() and reported with details
369 if(m_CommandLine.WasPassed("ppo"))
370 {
371 string ppoFile = m_CommandLine["ppo"];
372 if(ppoFile == null || ppoFile.Trim().Length < 1)
373 {
374 ppoFile = "preprocessed.xml";
375 }
376
377 StreamWriter writer = null;
378 try
379 {
380 writer = new StreamWriter(ppoFile);
381 writer.Write(xml);
382 }
383 catch(IOException ex)
384 {
385 Console.WriteLine("Could not write PPO file '{0}': {1}", ppoFile, ex.Message);
386 }
387 finally
388 {
389 if(writer != null)
390 {
391 writer.Close();
392 }
393 }
394 return;
395 }
396 //start reading the xml config file
397 XmlElement rootNode = doc.DocumentElement;
398 //string suggestedVersion = Helper.AttributeValue(rootNode,"version","1.0");
399 Helper.CheckForOSVariables = Helper.ParseBoolean(rootNode,"checkOsVars",false);
400
401 foreach(XmlNode node in rootNode.ChildNodes)//solutions or if pre-proc instructions
402 {
403 IDataNode dataNode = ParseNode(node, null);
404 if(dataNode is ProcessNode)
405 {
406 ProcessNode proc = (ProcessNode)dataNode;
407 if(proc.IsValid)
408 {
409 ProcessFile(proc.Path);
410 }
411 }
412 else if(dataNode is SolutionNode)
413 {
414 m_Solutions.Add(dataNode);
415 }
416 }
417 }
418 catch(XmlSchemaException xse)
419 {
420 m_Log.Write("XML validation error at line {0} in {1}:\n\n{2}",
421 xse.LineNumber, path, xse.Message);
422 }
423 finally
424 {
425 m_CurrentWorkingDirectory.Pop();
426 }
427 }
428
429 #endregion
430
431 #region Public Methods
432
433 /// <summary>
434 /// Allows the project.
435 /// </summary>
436 /// <param name="projectGroupsFlags">The project groups flags.</param>
437 /// <returns></returns>
438 public bool AllowProject(string projectGroupsFlags)
439 {
440 if(m_ProjectGroups != null && m_ProjectGroups.Length > 0)
441 {
442 if(projectGroupsFlags != null && projectGroupsFlags.Length == 0)
443 {
444 foreach(string group in projectGroupsFlags.Split('|'))
445 {
446 if(Array.IndexOf(m_ProjectGroups, group) != -1) //if included in the filter list
447 {
448 return true;
449 }
450 }
451 }
452 return false;//not included in the list or no groups specified for the project
453 }
454 return true;//no filter specified in the command line args
455 }
456
457 /// <summary>
458 /// Gets the type of the node.
459 /// </summary>
460 /// <param name="node">The node.</param>
461 /// <returns></returns>
462 public Type GetNodeType(XmlNode node)
463 {
464 if( node == null )
465 {
466 throw new ArgumentNullException("node");
467 }
468 if(!m_Nodes.ContainsKey(node.Name))
469 {
470 return null;
471 }
472
473 NodeEntry ne = (NodeEntry)m_Nodes[node.Name];
474 return ne.Type;
475 }
476
477 /// <summary>
478 ///
479 /// </summary>
480 /// <param name="node"></param>
481 /// <param name="parent"></param>
482 /// <returns></returns>
483 public IDataNode ParseNode(XmlNode node, IDataNode parent)
484 {
485 return ParseNode(node, parent, null);
486 }
487
488 //Create an instance of the data node type that is mapped to the name of the xml DOM node
489 /// <summary>
490 /// Parses the node.
491 /// </summary>
492 /// <param name="node">The node.</param>
493 /// <param name="parent">The parent.</param>
494 /// <param name="preNode">The pre node.</param>
495 /// <returns></returns>
496 public IDataNode ParseNode(XmlNode node, IDataNode parent, IDataNode preNode)
497 {
498 IDataNode dataNode = null;
499
500 try
501 {
502 if( node == null )
503 {
504 throw new ArgumentNullException("node");
505 }
506 if(preNode == null)
507 {
508 if(!m_Nodes.ContainsKey(node.Name))
509 {
510 //throw new XmlException("Unknown XML node: " + node.Name);
511 return null;
512 }
513
514 NodeEntry ne = (NodeEntry)m_Nodes[node.Name];
515 Type type = ne.Type;
516 //DataNodeAttribute dna = ne.Attribute;
517
518 dataNode = (IDataNode)type.Assembly.CreateInstance(type.FullName);
519 if(dataNode == null)
520 {
521 throw new System.Reflection.TargetException("Could not create new parser instance: " + type.FullName);
522 }
523 }
524 else
525 dataNode = preNode;
526
527 dataNode.Parent = parent;
528 dataNode.Parse(node);
529 }
530 catch(WarningException wex)
531 {
532 m_Log.Write(LogType.Warning, wex.Message);
533 return null;
534 }
535 catch(FatalException fex)
536 {
537 m_Log.WriteException(LogType.Error, fex);
538 throw;
539 }
540 catch(Exception ex)
541 {
542 m_Log.WriteException(LogType.Error, ex);
543 throw;
544 }
545
546 return dataNode;
547 }
548
549 /// <summary>
550 /// Initializes the specified target.
551 /// </summary>
552 /// <param name="target">The target.</param>
553 /// <param name="args">The args.</param>
554 public void Initialize(LogTargets target, string[] args)
555 {
556 m_Targets = new Hashtable();
557 CacheTargets(this.GetType().Assembly);
558 m_Nodes = new Hashtable();
559 CacheNodeTypes(this.GetType().Assembly);
560 CacheVersion();
561
562 m_CommandLine = new CommandLineCollection(args);
563
564 string logFile = null;
565 if(m_CommandLine.WasPassed("log"))
566 {
567 logFile = m_CommandLine["log"];
568
569 if(logFile != null && logFile.Length == 0)
570 {
571 logFile = "Prebuild.log";
572 }
573 }
574 else
575 {
576 target = target & ~LogTargets.File; //dont output to a file
577 }
578
579 m_Log = new Log(target, logFile);
580 LogBanner();
581
582 m_CurrentWorkingDirectory = new CurrentDirectory();
583
584 m_Target = m_CommandLine["target"];
585 m_Clean = m_CommandLine["clean"];
586 string removeDirs = m_CommandLine["removedir"];
587 if(removeDirs != null && removeDirs.Length == 0)
588 {
589 m_RemoveDirectories = removeDirs.Split('|');
590 }
591
592 string flags = m_CommandLine["allowedgroups"];//allows filtering by specifying a pipe-delimited list of groups to include
593 if(flags != null && flags.Length == 0)
594 {
595 m_ProjectGroups = flags.Split('|');
596 }
597 m_PauseAfterFinish = m_CommandLine.WasPassed("pause");
598
599 LoadSchema();
600
601 m_Solutions = new ArrayList();
602 m_Refs = new StringCollection();
603 }
604
605 /// <summary>
606 /// Processes this instance.
607 /// </summary>
608 public void Process()
609 {
610 bool perfomedOtherTask = false;
611 if(m_RemoveDirectories != null && m_RemoveDirectories.Length > 0)
612 {
613 try
614 {
615 RemoveDirectories(".",m_RemoveDirectories);
616 }
617 catch(IOException e)
618 {
619 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories);
620 m_Log.WriteException(LogType.Error,e);
621 }
622 catch(UnauthorizedAccessException e)
623 {
624 m_Log.Write("Failed to remove directories named {0}",m_RemoveDirectories);
625 m_Log.WriteException(LogType.Error,e);
626 }
627 perfomedOtherTask = true;
628 }
629
630 if(m_Target != null && m_Clean != null)
631 {
632 m_Log.Write(LogType.Error, "The options /target and /clean cannot be passed together");
633 return;
634 }
635 else if(m_Target == null && m_Clean == null)
636 {
637 if(perfomedOtherTask) //finished
638 {
639 return;
640 }
641 m_Log.Write(LogType.Error, "Must pass either /target or /clean to process a Prebuild file");
642 return;
643 }
644
645 string file = "./prebuild.xml";
646 if(m_CommandLine.WasPassed("file"))
647 {
648 file = m_CommandLine["file"];
649 }
650
651 ProcessFile(file);
652
653 string target = (m_Target != null ? m_Target.ToLower() : m_Clean.ToLower());
654 bool clean = (m_Target == null);
655 if(clean && target != null && target.Length == 0)
656 {
657 target = "all";
658 }
659 if(clean && target == "all")//default to all if no target was specified for clean
660 {
661 //check if they passed yes
662 if (!m_CommandLine.WasPassed("yes"))
663 {
664 Console.WriteLine("WARNING: This operation will clean ALL project files for all targets, are you sure? (y/n):");
665 string ret = Console.ReadLine();
666 if(ret == null)
667 {
668 return;
669 }
670 ret = ret.Trim().ToLower();
671 if((ret.ToLower() != "y" && ret.ToLower() != "yes"))
672 {
673 return;
674 }
675 }
676 //clean all targets (just cleaning vs2002 target didn't clean nant)
677 foreach(ITarget targ in m_Targets.Values)
678 {
679 targ.Clean(this);
680 }
681 }
682 else
683 {
684 ITarget targ = (ITarget)m_Targets[target];
685
686 if(clean)
687 {
688 targ.Clean(this);
689 }
690 else
691 {
692 targ.Write(this);
693 }
694 }
695
696 m_Log.Flush();
697 }
698
699 #endregion
700
701 #region IDisposable Members
702
703 /// <summary>
704 ///
705 /// </summary>
706 public void Dispose()
707 {
708 Dispose(true);
709 GC.SuppressFinalize(this);
710 }
711
712 /// <summary>
713 /// Dispose objects
714 /// </summary>
715 /// <param name="disposing">
716 /// If true, it will dispose close the handle
717 /// </param>
718 /// <remarks>
719 /// Will dispose managed and unmanaged resources.
720 /// </remarks>
721 protected virtual void Dispose(bool disposing)
722 {
723 if (!this.disposed)
724 {
725 if (disposing)
726 {
727 if (this.m_Log != null)
728 {
729 this.m_Log.Close();
730 this.m_Log = null;
731 }
732 }
733 }
734 this.disposed = true;
735 }
736
737 /// <summary>
738 ///
739 /// </summary>
740 ~Kernel()
741 {
742 this.Dispose(false);
743 }
744
745 /// <summary>
746 /// Closes and destroys this object
747 /// </summary>
748 /// <remarks>
749 /// Same as Dispose(true)
750 /// </remarks>
751 public void Close()
752 {
753 Dispose();
754 }
755
756 #endregion
757 }
758} \ No newline at end of file
diff --git a/Prebuild/src/Core/Nodes/ConfigurationNode.cs b/Prebuild/src/Core/Nodes/ConfigurationNode.cs
deleted file mode 100644
index 390794f..0000000
--- a/Prebuild/src/Core/Nodes/ConfigurationNode.cs
+++ /dev/null
@@ -1,187 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.Xml;
37
38using Prebuild.Core.Attributes;
39using Prebuild.Core.Interfaces;
40using Prebuild.Core.Utilities;
41
42namespace Prebuild.Core.Nodes
43{
44 /// <summary>
45 ///
46 /// </summary>
47 [DataNode("Configuration")]
48 public class ConfigurationNode : DataNode, ICloneable, IComparable
49 {
50 #region Fields
51
52 private string m_Name = "unknown";
53 private OptionsNode m_Options;
54
55 #endregion
56
57 #region Constructors
58
59 /// <summary>
60 /// Initializes a new instance of the <see cref="ConfigurationNode"/> class.
61 /// </summary>
62 public ConfigurationNode()
63 {
64 m_Options = new OptionsNode();
65 }
66
67 #endregion
68
69 #region Properties
70
71 /// <summary>
72 /// Gets or sets the parent.
73 /// </summary>
74 /// <value>The parent.</value>
75 public override IDataNode Parent
76 {
77 get
78 {
79 return base.Parent;
80 }
81 set
82 {
83 base.Parent = value;
84 if(base.Parent is SolutionNode)
85 {
86 SolutionNode node = (SolutionNode)base.Parent;
87 if(node != null && node.Options != null)
88 {
89 node.Options.CopyTo(m_Options);
90 }
91 }
92 }
93 }
94
95 /// <summary>
96 /// Gets the name.
97 /// </summary>
98 /// <value>The name.</value>
99 public string Name
100 {
101 get
102 {
103 return m_Name;
104 }
105 }
106
107 /// <summary>
108 /// Gets or sets the options.
109 /// </summary>
110 /// <value>The options.</value>
111 public OptionsNode Options
112 {
113 get
114 {
115 return m_Options;
116 }
117 set
118 {
119 m_Options = value;
120 }
121 }
122
123 #endregion
124
125 #region Public Methods
126
127 /// <summary>
128 /// Parses the specified node.
129 /// </summary>
130 /// <param name="node">The node.</param>
131 public override void Parse(XmlNode node)
132 {
133 m_Name = Helper.AttributeValue(node, "name", m_Name);
134 if( node == null )
135 {
136 throw new ArgumentNullException("node");
137 }
138 foreach(XmlNode child in node.ChildNodes)
139 {
140 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
141 if(dataNode is OptionsNode)
142 {
143 ((OptionsNode)dataNode).CopyTo(m_Options);
144 }
145 }
146 }
147
148 /// <summary>
149 /// Copies to.
150 /// </summary>
151 /// <param name="conf">The conf.</param>
152 public void CopyTo(ConfigurationNode conf)
153 {
154 m_Options.CopyTo(conf.m_Options);
155 }
156
157 #endregion
158
159 #region ICloneable Members
160
161 /// <summary>
162 /// Creates a new object that is a copy of the current instance.
163 /// </summary>
164 /// <returns>
165 /// A new object that is a copy of this instance.
166 /// </returns>
167 public object Clone()
168 {
169 ConfigurationNode ret = new ConfigurationNode();
170 ret.m_Name = m_Name;
171 m_Options.CopyTo(ret.m_Options);
172 return ret;
173 }
174
175 #endregion
176
177 #region IComparable Members
178
179 public int CompareTo(object obj)
180 {
181 ConfigurationNode that = (ConfigurationNode) obj;
182 return this.m_Name.CompareTo(that.m_Name);
183 }
184
185 #endregion
186 }
187}
diff --git a/Prebuild/src/Core/Nodes/DataNode.cs b/Prebuild/src/Core/Nodes/DataNode.cs
deleted file mode 100644
index ef5f7ee..0000000
--- a/Prebuild/src/Core/Nodes/DataNode.cs
+++ /dev/null
@@ -1,82 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.Xml;
37
38using Prebuild.Core.Attributes;
39using Prebuild.Core.Interfaces;
40
41namespace Prebuild.Core.Nodes
42{
43 /// <summary>
44 ///
45 /// </summary>
46 public class DataNode : IDataNode
47 {
48 #region Fields
49
50 private IDataNode parent;
51
52 #endregion
53
54 #region IDataNode Members
55
56 /// <summary>
57 /// Gets or sets the parent.
58 /// </summary>
59 /// <value>The parent.</value>
60 public virtual IDataNode Parent
61 {
62 get
63 {
64 return parent;
65 }
66 set
67 {
68 parent = value;
69 }
70 }
71
72 /// <summary>
73 /// Parses the specified node.
74 /// </summary>
75 /// <param name="node">The node.</param>
76 public virtual void Parse(XmlNode node)
77 {
78 }
79
80 #endregion
81 }
82}
diff --git a/Prebuild/src/Core/Nodes/ExcludeNode.cs b/Prebuild/src/Core/Nodes/ExcludeNode.cs
deleted file mode 100644
index bfcebca..0000000
--- a/Prebuild/src/Core/Nodes/ExcludeNode.cs
+++ /dev/null
@@ -1,85 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-31 16:35:39 +0100 (ti, 31 jan 2006) $
31 * $Revision: 74 $
32 */
33#endregion
34
35using System;
36using System.Xml;
37
38using Prebuild.Core.Attributes;
39using Prebuild.Core.Interfaces;
40using Prebuild.Core.Utilities;
41
42namespace Prebuild.Core.Nodes
43{
44 /// <summary>
45 ///
46 /// </summary>
47 [DataNode("Exclude")]
48 public class ExcludeNode : DataNode
49 {
50 #region Fields
51
52 private string m_Name = "unknown";
53
54 #endregion
55
56 #region Properties
57
58 /// <summary>
59 /// Gets the name.
60 /// </summary>
61 /// <value>The name.</value>
62 public string Name
63 {
64 get
65 {
66 return m_Name;
67 }
68 }
69
70 #endregion
71
72 #region Public Methods
73
74 /// <summary>
75 /// Parses the specified node.
76 /// </summary>
77 /// <param name="node">The node.</param>
78 public override void Parse(XmlNode node)
79 {
80 m_Name = Helper.AttributeValue(node, "name", m_Name);
81 }
82
83 #endregion
84 }
85}
diff --git a/Prebuild/src/Core/Nodes/FileNode.cs b/Prebuild/src/Core/Nodes/FileNode.cs
deleted file mode 100644
index de3b69e..0000000
--- a/Prebuild/src/Core/Nodes/FileNode.cs
+++ /dev/null
@@ -1,238 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $
31 * $Revision: 197 $
32 */
33#endregion
34
35using System;
36using System.IO;
37using System.Xml;
38
39using Prebuild.Core.Attributes;
40using Prebuild.Core.Interfaces;
41using Prebuild.Core.Utilities;
42
43namespace Prebuild.Core.Nodes
44{
45 /// <summary>
46 ///
47 /// </summary>
48 public enum BuildAction
49 {
50 /// <summary>
51 ///
52 /// </summary>
53 None,
54 /// <summary>
55 ///
56 /// </summary>
57 Compile,
58 /// <summary>
59 ///
60 /// </summary>
61 Content,
62 /// <summary>
63 ///
64 /// </summary>
65 EmbeddedResource
66 }
67
68 /// <summary>
69 ///
70 /// </summary>
71 public enum SubType
72 {
73 /// <summary>
74 ///
75 /// </summary>
76 Code,
77 /// <summary>
78 ///
79 /// </summary>
80 Component,
81 /// <summary>
82 ///
83 /// </summary>
84 Designer,
85 /// <summary>
86 ///
87 /// </summary>
88 Form,
89 /// <summary>
90 ///
91 /// </summary>
92 Settings,
93 /// <summary>
94 ///
95 /// </summary>
96 UserControl
97 }
98
99 public enum CopyToOutput
100 {
101 Never,
102 Always,
103 PreserveNewest
104 }
105
106 /// <summary>
107 ///
108 /// </summary>
109 [DataNode("File")]
110 public class FileNode : DataNode
111 {
112 #region Fields
113
114 private string m_Path;
115 private string m_ResourceName = "";
116 private BuildAction m_BuildAction = BuildAction.Compile;
117 private bool m_Valid;
118 private SubType m_SubType = SubType.Code;
119 private CopyToOutput m_CopyToOutput = CopyToOutput.Never;
120 private bool m_Link = false;
121
122
123 #endregion
124
125 #region Properties
126
127 /// <summary>
128 ///
129 /// </summary>
130 public string Path
131 {
132 get
133 {
134 return m_Path;
135 }
136 }
137
138 /// <summary>
139 ///
140 /// </summary>
141 public string ResourceName
142 {
143 get
144 {
145 return m_ResourceName;
146 }
147 }
148
149 /// <summary>
150 ///
151 /// </summary>
152 public BuildAction BuildAction
153 {
154 get
155 {
156 return m_BuildAction;
157 }
158 }
159
160 public CopyToOutput CopyToOutput
161 {
162 get
163 {
164 return this.m_CopyToOutput;
165 }
166 }
167
168 public bool IsLink
169 {
170 get
171 {
172 return this.m_Link;
173 }
174 }
175
176 /// <summary>
177 ///
178 /// </summary>
179 public SubType SubType
180 {
181 get
182 {
183 return m_SubType;
184 }
185 }
186
187 /// <summary>
188 ///
189 /// </summary>
190 public bool IsValid
191 {
192 get
193 {
194 return m_Valid;
195 }
196 }
197
198 #endregion
199
200 #region Public Methods
201
202 /// <summary>
203 ///
204 /// </summary>
205 /// <param name="node"></param>
206 public override void Parse(XmlNode node)
207 {
208 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction),
209 Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString()));
210 m_SubType = (SubType)Enum.Parse(typeof(SubType),
211 Helper.AttributeValue(node, "subType", m_SubType.ToString()));
212 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
213 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
214 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
215
216 if( node == null )
217 {
218 throw new ArgumentNullException("node");
219 }
220
221 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
222 if(m_Path == null)
223 {
224 m_Path = "";
225 }
226
227 m_Path = m_Path.Trim();
228 m_Valid = true;
229 if(!File.Exists(m_Path))
230 {
231 m_Valid = false;
232 Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path);
233 }
234 }
235
236 #endregion
237 }
238}
diff --git a/Prebuild/src/Core/Nodes/FilesNode.cs b/Prebuild/src/Core/Nodes/FilesNode.cs
deleted file mode 100644
index d31307b..0000000
--- a/Prebuild/src/Core/Nodes/FilesNode.cs
+++ /dev/null
@@ -1,223 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $
31 * $Revision: 164 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Collections.Specialized;
38using System.Xml;
39
40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces;
42
43namespace Prebuild.Core.Nodes
44{
45 /// <summary>
46 ///
47 /// </summary>
48 [DataNode("Files")]
49 public class FilesNode : DataNode
50 {
51 #region Fields
52
53 private StringCollection m_Files;
54 private Hashtable m_BuildActions;
55 private Hashtable m_SubTypes;
56 private Hashtable m_ResourceNames;
57 private Hashtable m_CopyToOutputs;
58 private Hashtable m_Links;
59
60
61 #endregion
62
63 #region Constructors
64
65 /// <summary>
66 ///
67 /// </summary>
68 public FilesNode()
69 {
70 m_Files = new StringCollection();
71 m_BuildActions = new Hashtable();
72 m_SubTypes = new Hashtable();
73 m_ResourceNames = new Hashtable();
74 m_CopyToOutputs = new Hashtable();
75 m_Links = new Hashtable();
76 }
77
78 #endregion
79
80 #region Properties
81
82 /// <summary>
83 ///
84 /// </summary>
85 public int Count
86 {
87 get
88 {
89 return m_Files.Count;
90 }
91 }
92
93 #endregion
94
95 #region Public Methods
96
97 /// <summary>
98 ///
99 /// </summary>
100 /// <param name="file"></param>
101 /// <returns></returns>
102 public BuildAction GetBuildAction(string file)
103 {
104 if(!m_BuildActions.ContainsKey(file))
105 {
106 return BuildAction.Compile;
107 }
108
109 return (BuildAction)m_BuildActions[file];
110 }
111
112 public CopyToOutput GetCopyToOutput(string file)
113 {
114 if (!this.m_CopyToOutputs.ContainsKey(file))
115 {
116 return CopyToOutput.Never;
117 }
118 return (CopyToOutput) this.m_CopyToOutputs[file];
119 }
120
121 public bool GetIsLink(string file)
122 {
123 if (!this.m_Links.ContainsKey(file))
124 {
125 return false;
126 }
127 return (bool) this.m_Links[file];
128 }
129
130 /// <summary>
131 ///
132 /// </summary>
133 /// <param name="file"></param>
134 /// <returns></returns>
135 public SubType GetSubType(string file)
136 {
137 if(!m_SubTypes.ContainsKey(file))
138 {
139 return SubType.Code;
140 }
141
142 return (SubType)m_SubTypes[file];
143 }
144
145 /// <summary>
146 ///
147 /// </summary>
148 /// <param name="file"></param>
149 /// <returns></returns>
150 public string GetResourceName(string file)
151 {
152 if(!m_ResourceNames.ContainsKey(file))
153 {
154 return "";
155 }
156
157 return (string)m_ResourceNames[file];
158 }
159
160 /// <summary>
161 ///
162 /// </summary>
163 /// <param name="node"></param>
164 public override void Parse(XmlNode node)
165 {
166 if( node == null )
167 {
168 throw new ArgumentNullException("node");
169 }
170 foreach(XmlNode child in node.ChildNodes)
171 {
172 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
173 if(dataNode is FileNode)
174 {
175 FileNode fileNode = (FileNode)dataNode;
176 if(fileNode.IsValid)
177 {
178 if (!m_Files.Contains(fileNode.Path))
179 {
180 m_Files.Add(fileNode.Path);
181 m_BuildActions[fileNode.Path] = fileNode.BuildAction;
182 m_SubTypes[fileNode.Path] = fileNode.SubType;
183 m_ResourceNames[fileNode.Path] = fileNode.ResourceName;
184 this.m_Links[fileNode.Path] = fileNode.IsLink;
185 this.m_CopyToOutputs[fileNode.Path] = fileNode.CopyToOutput;
186
187 }
188 }
189 }
190 else if(dataNode is MatchNode)
191 {
192 foreach(string file in ((MatchNode)dataNode).Files)
193 {
194 if (!m_Files.Contains(file))
195 {
196 m_Files.Add(file);
197 m_BuildActions[file] = ((MatchNode)dataNode).BuildAction;
198 m_SubTypes[file] = ((MatchNode)dataNode).SubType;
199 m_ResourceNames[file] = ((MatchNode)dataNode).ResourceName;
200 this.m_Links[file] = ((MatchNode) dataNode).IsLink;
201 this.m_CopyToOutputs[file] = ((MatchNode) dataNode).CopyToOutput;
202
203 }
204 }
205 }
206 }
207 }
208
209 // TODO: Check in to why StringCollection's enumerator doesn't implement
210 // IEnumerator?
211 /// <summary>
212 ///
213 /// </summary>
214 /// <returns></returns>
215 public StringEnumerator GetEnumerator()
216 {
217 return m_Files.GetEnumerator();
218 }
219
220 #endregion
221
222 }
223}
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs
deleted file mode 100644
index e0d2fa8..0000000
--- a/Prebuild/src/Core/Nodes/MatchNode.cs
+++ /dev/null
@@ -1,299 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $
31 * $Revision: 164 $
32 */
33#endregion
34
35using System;
36using System.Collections.Specialized;
37using System.IO;
38using System.Text.RegularExpressions;
39using System.Xml;
40
41using Prebuild.Core.Attributes;
42using Prebuild.Core.Interfaces;
43using Prebuild.Core.Utilities;
44
45namespace Prebuild.Core.Nodes
46{
47 /// <summary>
48 ///
49 /// </summary>
50 [DataNode("Match")]
51 public class MatchNode : DataNode
52 {
53 #region Fields
54
55 private StringCollection m_Files;
56 private Regex m_Regex;
57 private BuildAction m_BuildAction = BuildAction.Compile;
58 private SubType m_SubType = SubType.Code;
59 string m_ResourceName = "";
60 private CopyToOutput m_CopyToOutput;
61 private bool m_Link;
62
63
64 #endregion
65
66 #region Constructors
67
68 /// <summary>
69 ///
70 /// </summary>
71 public MatchNode()
72 {
73 m_Files = new StringCollection();
74 }
75
76 #endregion
77
78 #region Properties
79
80 /// <summary>
81 ///
82 /// </summary>
83 public StringCollection Files
84 {
85 get
86 {
87 return m_Files;
88 }
89 }
90
91 /// <summary>
92 ///
93 /// </summary>
94 public BuildAction BuildAction
95 {
96 get
97 {
98 return m_BuildAction;
99 }
100 }
101
102 /// <summary>
103 ///
104 /// </summary>
105 public SubType SubType
106 {
107 get
108 {
109 return m_SubType;
110 }
111 }
112
113 public CopyToOutput CopyToOutput
114 {
115 get
116 {
117 return this.m_CopyToOutput;
118 }
119 }
120
121 public bool IsLink
122 {
123 get
124 {
125 return this.m_Link;
126 }
127 }
128
129 /// <summary>
130 ///
131 /// </summary>
132 public string ResourceName
133 {
134 get
135 {
136 return m_ResourceName;
137 }
138 }
139
140
141 #endregion
142
143 #region Private Methods
144
145 /// <summary>
146 /// Recurses the directories.
147 /// </summary>
148 /// <param name="path">The path.</param>
149 /// <param name="pattern">The pattern.</param>
150 /// <param name="recurse">if set to <c>true</c> [recurse].</param>
151 /// <param name="useRegex">if set to <c>true</c> [use regex].</param>
152 private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex)
153 {
154 try
155 {
156 string[] files;
157
158 if(!useRegex)
159 {
160 files = Directory.GetFiles(path, pattern);
161 if(files != null)
162 {
163 string fileTemp;
164 foreach (string file in files)
165 {
166 if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\")
167 {
168 fileTemp = file.Substring(2);
169 }
170 else
171 {
172 fileTemp = file;
173 }
174
175 m_Files.Add(fileTemp);
176 }
177 }
178 else
179 {
180 return;
181 }
182 }
183 else
184 {
185 Match match;
186 files = Directory.GetFiles(path);
187 foreach(string file in files)
188 {
189 match = m_Regex.Match(file);
190 if(match.Success)
191 {
192 m_Files.Add(file);
193 }
194 }
195 }
196
197 if(recurse)
198 {
199 string[] dirs = Directory.GetDirectories(path);
200 if(dirs != null && dirs.Length > 0)
201 {
202 foreach(string str in dirs)
203 {
204 RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex);
205 }
206 }
207 }
208 }
209 catch(DirectoryNotFoundException)
210 {
211 return;
212 }
213 catch(ArgumentException)
214 {
215 return;
216 }
217 }
218
219 #endregion
220
221 #region Public Methods
222
223 /// <summary>
224 ///
225 /// </summary>
226 /// <param name="node"></param>
227 public override void Parse(XmlNode node)
228 {
229 if( node == null )
230 {
231 throw new ArgumentNullException("node");
232 }
233 string path = Helper.AttributeValue(node, "path", ".");
234 string pattern = Helper.AttributeValue(node, "pattern", "*");
235 bool recurse = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "recurse", "false"));
236 bool useRegex = (bool)Helper.TranslateValue(typeof(bool), Helper.AttributeValue(node, "useRegex", "false"));
237 m_BuildAction = (BuildAction)Enum.Parse(typeof(BuildAction),
238 Helper.AttributeValue(node, "buildAction", m_BuildAction.ToString()));
239 m_SubType = (SubType)Enum.Parse(typeof(SubType),
240 Helper.AttributeValue(node, "subType", m_SubType.ToString()));
241 m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString());
242 this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString()));
243 this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString));
244
245
246 if(path != null && path.Length == 0)
247 {
248 path = ".";//use current directory
249 }
250 //throw new WarningException("Match must have a 'path' attribute");
251
252 if(pattern == null)
253 {
254 throw new WarningException("Match must have a 'pattern' attribute");
255 }
256
257 path = Helper.NormalizePath(path);
258 if(!Directory.Exists(path))
259 {
260 throw new WarningException("Match path does not exist: {0}", path);
261 }
262
263 try
264 {
265 if(useRegex)
266 {
267 m_Regex = new Regex(pattern);
268 }
269 }
270 catch(ArgumentException ex)
271 {
272 throw new WarningException("Could not compile regex pattern: {0}", ex.Message);
273 }
274
275 RecurseDirectories(path, pattern, recurse, useRegex);
276
277 foreach(XmlNode child in node.ChildNodes)
278 {
279 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
280 if(dataNode is ExcludeNode)
281 {
282 ExcludeNode excludeNode = (ExcludeNode)dataNode;
283 if (m_Files.Contains(Helper.NormalizePath(excludeNode.Name)))
284 {
285 m_Files.Remove(Helper.NormalizePath(excludeNode.Name));
286 }
287 }
288 }
289
290 if(m_Files.Count < 1)
291 {
292 throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern);
293 }
294 m_Regex = null;
295 }
296
297 #endregion
298 }
299}
diff --git a/Prebuild/src/Core/Nodes/OptionsNode.cs b/Prebuild/src/Core/Nodes/OptionsNode.cs
deleted file mode 100644
index b5a2f60..0000000
--- a/Prebuild/src/Core/Nodes/OptionsNode.cs
+++ /dev/null
@@ -1,655 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2007-01-08 17:55:40 +0100 (må, 08 jan 2007) $
31 * $Revision: 197 $
32 */
33#endregion
34
35
36
37using System;
38using System.Collections;
39using System.Collections.Specialized;
40using System.Reflection;
41using System.Xml;
42
43using Prebuild.Core.Attributes;
44using Prebuild.Core.Interfaces;
45using Prebuild.Core.Utilities;
46
47namespace Prebuild.Core.Nodes
48{
49 /// <summary>
50 ///
51 /// </summary>
52 [DataNode("Options")]
53 public class OptionsNode : DataNode
54 {
55 #region Fields
56
57 private static Hashtable m_OptionFields;
58
59 [OptionNode("CompilerDefines")]
60 private string m_CompilerDefines = "";
61
62 /// <summary>
63 ///
64 /// </summary>
65 public string CompilerDefines
66 {
67 get
68 {
69 return m_CompilerDefines;
70 }
71 set
72 {
73 m_CompilerDefines = value;
74 }
75 }
76
77 [OptionNode("OptimizeCode")]
78 private bool m_OptimizeCode;
79
80 /// <summary>
81 ///
82 /// </summary>
83 public bool OptimizeCode
84 {
85 get
86 {
87 return m_OptimizeCode;
88 }
89 set
90 {
91 m_OptimizeCode = value;
92 }
93 }
94
95 [OptionNode("CheckUnderflowOverflow")]
96 private bool m_CheckUnderflowOverflow;
97
98 /// <summary>
99 ///
100 /// </summary>
101 public bool CheckUnderflowOverflow
102 {
103 get
104 {
105 return m_CheckUnderflowOverflow;
106 }
107 set
108 {
109 m_CheckUnderflowOverflow = value;
110 }
111 }
112
113 [OptionNode("AllowUnsafe")]
114 private bool m_AllowUnsafe;
115
116 /// <summary>
117 ///
118 /// </summary>
119 public bool AllowUnsafe
120 {
121 get
122 {
123 return m_AllowUnsafe;
124 }
125 set
126 {
127 m_AllowUnsafe = value;
128 }
129 }
130
131 [OptionNode("PreBuildEvent")]
132 private string m_PreBuildEvent;
133
134 /// <summary>
135 ///
136 /// </summary>
137 public string PreBuildEvent
138 {
139 get
140 {
141 return m_PreBuildEvent;
142 }
143 set
144 {
145 m_PreBuildEvent = value;
146 }
147 }
148
149 [OptionNode("PostBuildEvent")]
150 private string m_PostBuildEvent;
151
152 /// <summary>
153 ///
154 /// </summary>
155 public string PostBuildEvent
156 {
157 get
158 {
159 return m_PostBuildEvent;
160 }
161 set
162 {
163 m_PostBuildEvent = value;
164 }
165 }
166
167 [OptionNode("PreBuildEventArgs")]
168 private string m_PreBuildEventArgs;
169
170 /// <summary>
171 ///
172 /// </summary>
173 public string PreBuildEventArgs
174 {
175 get
176 {
177 return m_PreBuildEventArgs;
178 }
179 set
180 {
181 m_PreBuildEventArgs = value;
182 }
183 }
184
185 [OptionNode("PostBuildEventArgs")]
186 private string m_PostBuildEventArgs;
187
188 /// <summary>
189 ///
190 /// </summary>
191 public string PostBuildEventArgs
192 {
193 get
194 {
195 return m_PostBuildEventArgs;
196 }
197 set
198 {
199 m_PostBuildEventArgs = value;
200 }
201 }
202
203 [OptionNode("RunPostBuildEvent")]
204 private string m_RunPostBuildEvent;
205
206 /// <summary>
207 ///
208 /// </summary>
209 public string RunPostBuildEvent
210 {
211 get
212 {
213 return m_RunPostBuildEvent;
214 }
215 set
216 {
217 m_RunPostBuildEvent = value;
218 }
219 }
220
221 [OptionNode("RunScript")]
222 private string m_RunScript;
223
224 /// <summary>
225 ///
226 /// </summary>
227 public string RunScript
228 {
229 get
230 {
231 return m_RunScript;
232 }
233 set
234 {
235 m_RunScript = value;
236 }
237 }
238
239 [OptionNode("WarningLevel")]
240 private int m_WarningLevel = 4;
241
242 /// <summary>
243 ///
244 /// </summary>
245 public int WarningLevel
246 {
247 get
248 {
249 return m_WarningLevel;
250 }
251 set
252 {
253 m_WarningLevel = value;
254 }
255 }
256
257 [OptionNode("WarningsAsErrors")]
258 private bool m_WarningsAsErrors;
259
260 /// <summary>
261 ///
262 /// </summary>
263 public bool WarningsAsErrors
264 {
265 get
266 {
267 return m_WarningsAsErrors;
268 }
269 set
270 {
271 m_WarningsAsErrors = value;
272 }
273 }
274
275 [OptionNode("SuppressWarnings")]
276 private string m_SuppressWarnings = "";
277
278 /// <summary>
279 ///
280 /// </summary>
281 public string SuppressWarnings
282 {
283 get
284 {
285 return m_SuppressWarnings;
286 }
287 set
288 {
289 m_SuppressWarnings = value;
290 }
291 }
292
293 [OptionNode("OutputPath")]
294 private string m_OutputPath = "bin/";
295
296 /// <summary>
297 ///
298 /// </summary>
299 public string OutputPath
300 {
301 get
302 {
303 return m_OutputPath;
304 }
305 set
306 {
307 m_OutputPath = value;
308 }
309 }
310
311 [OptionNode("GenerateDocumentation")]
312 private bool m_GenerateDocumentation;
313
314 /// <summary>
315 ///
316 /// </summary>
317 public bool GenerateDocumentation
318 {
319 get
320 {
321 return m_GenerateDocumentation;
322 }
323 set
324 {
325 m_GenerateDocumentation = value;
326 }
327 }
328
329 [OptionNode("GenerateXmlDocFile")]
330 private bool m_GenerateXmlDocFile;
331
332 /// <summary>
333 ///
334 /// </summary>
335 public bool GenerateXmlDocFile
336 {
337 get
338 {
339 return m_GenerateXmlDocFile;
340 }
341 set
342 {
343 m_GenerateXmlDocFile = value;
344 }
345 }
346
347 [OptionNode("XmlDocFile")]
348 private string m_XmlDocFile = "";
349
350 /// <summary>
351 ///
352 /// </summary>
353 public string XmlDocFile
354 {
355 get
356 {
357 return m_XmlDocFile;
358 }
359 set
360 {
361 m_XmlDocFile = value;
362 }
363 }
364
365 [OptionNode("KeyFile")]
366 private string m_KeyFile = "";
367
368 /// <summary>
369 ///
370 /// </summary>
371 public string KeyFile
372 {
373 get
374 {
375 return m_KeyFile;
376 }
377 set
378 {
379 m_KeyFile = value;
380 }
381 }
382
383 [OptionNode("DebugInformation")]
384 private bool m_DebugInformation;
385
386 /// <summary>
387 ///
388 /// </summary>
389 public bool DebugInformation
390 {
391 get
392 {
393 return m_DebugInformation;
394 }
395 set
396 {
397 m_DebugInformation = value;
398 }
399 }
400
401 [OptionNode("RegisterComInterop")]
402 private bool m_RegisterComInterop;
403
404 /// <summary>
405 ///
406 /// </summary>
407 public bool RegisterComInterop
408 {
409 get
410 {
411 return m_RegisterComInterop;
412 }
413 set
414 {
415 m_RegisterComInterop = value;
416 }
417 }
418
419 [OptionNode("RemoveIntegerChecks")]
420 private bool m_RemoveIntegerChecks;
421
422 /// <summary>
423 ///
424 /// </summary>
425 public bool RemoveIntegerChecks
426 {
427 get
428 {
429 return m_RemoveIntegerChecks;
430 }
431 set
432 {
433 m_RemoveIntegerChecks = value;
434 }
435 }
436
437 [OptionNode("IncrementalBuild")]
438 private bool m_IncrementalBuild;
439
440 /// <summary>
441 ///
442 /// </summary>
443 public bool IncrementalBuild
444 {
445 get
446 {
447 return m_IncrementalBuild;
448 }
449 set
450 {
451 m_IncrementalBuild = value;
452 }
453 }
454
455 [OptionNode("BaseAddress")]
456 private string m_BaseAddress = "285212672";
457
458 /// <summary>
459 ///
460 /// </summary>
461 public string BaseAddress
462 {
463 get
464 {
465 return m_BaseAddress;
466 }
467 set
468 {
469 m_BaseAddress = value;
470 }
471 }
472
473 [OptionNode("FileAlignment")]
474 private int m_FileAlignment = 4096;
475
476 /// <summary>
477 ///
478 /// </summary>
479 public int FileAlignment
480 {
481 get
482 {
483 return m_FileAlignment;
484 }
485 set
486 {
487 m_FileAlignment = value;
488 }
489 }
490
491 [OptionNode("NoStdLib")]
492 private bool m_NoStdLib;
493
494 /// <summary>
495 ///
496 /// </summary>
497 public bool NoStdLib
498 {
499 get
500 {
501 return m_NoStdLib;
502 }
503 set
504 {
505 m_NoStdLib = value;
506 }
507 }
508
509 private StringCollection m_FieldsDefined;
510
511 #endregion
512
513 #region Constructors
514
515 /// <summary>
516 /// Initializes the <see cref="OptionsNode"/> class.
517 /// </summary>
518 static OptionsNode()
519 {
520 Type t = typeof(OptionsNode);
521
522 m_OptionFields = new Hashtable();
523 foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance))
524 {
525 object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false);
526 if(attrs == null || attrs.Length < 1)
527 {
528 continue;
529 }
530
531 OptionNodeAttribute ona = (OptionNodeAttribute)attrs[0];
532 m_OptionFields[ona.NodeName] = f;
533 }
534 }
535
536 /// <summary>
537 /// Initializes a new instance of the <see cref="OptionsNode"/> class.
538 /// </summary>
539 public OptionsNode()
540 {
541 m_FieldsDefined = new StringCollection();
542 }
543
544 #endregion
545
546 #region Properties
547
548 /// <summary>
549 /// Gets the <see cref="Object"/> at the specified index.
550 /// </summary>
551 /// <value></value>
552 public object this[string index]
553 {
554 get
555 {
556 if(!m_OptionFields.ContainsKey(index))
557 {
558 return null;
559 }
560
561 FieldInfo f = (FieldInfo)m_OptionFields[index];
562 return f.GetValue(this);
563 }
564 }
565
566 /// <summary>
567 /// Gets the <see cref="Object"/> at the specified index.
568 /// </summary>
569 /// <value></value>
570 public object this[string index, object defaultValue]
571 {
572 get
573 {
574 object valueObject = this[index];
575 if(valueObject != null && valueObject is string && ((string)valueObject).Length == 0)
576 {
577 return defaultValue;
578 }
579 return valueObject;
580 }
581 }
582
583
584 #endregion
585
586 #region Private Methods
587
588 private void FlagDefined(string name)
589 {
590 if(!m_FieldsDefined.Contains(name))
591 {
592 m_FieldsDefined.Add(name);
593 }
594 }
595
596 private void SetOption(string nodeName, string val)
597 {
598 lock(m_OptionFields)
599 {
600 if(!m_OptionFields.ContainsKey(nodeName))
601 {
602 return;
603 }
604
605 FieldInfo f = (FieldInfo)m_OptionFields[nodeName];
606 f.SetValue(this, Helper.TranslateValue(f.FieldType, val));
607 FlagDefined(f.Name);
608 }
609 }
610
611 #endregion
612
613 #region Public Methods
614
615 /// <summary>
616 /// Parses the specified node.
617 /// </summary>
618 /// <param name="node">The node.</param>
619 public override void Parse(XmlNode node)
620 {
621 if( node == null )
622 {
623 throw new ArgumentNullException("node");
624 }
625
626 foreach(XmlNode child in node.ChildNodes)
627 {
628 SetOption(child.Name, Helper.InterpolateForEnvironmentVariables(child.InnerText));
629 }
630 }
631
632 /// <summary>
633 /// Copies to.
634 /// </summary>
635 /// <param name="opt">The opt.</param>
636 public void CopyTo(OptionsNode opt)
637 {
638 if(opt == null)
639 {
640 return;
641 }
642
643 foreach(FieldInfo f in m_OptionFields.Values)
644 {
645 if(m_FieldsDefined.Contains(f.Name))
646 {
647 f.SetValue(opt, f.GetValue(this));
648 opt.m_FieldsDefined.Add(f.Name);
649 }
650 }
651 }
652
653 #endregion
654 }
655}
diff --git a/Prebuild/src/Core/Nodes/ProcessNode.cs b/Prebuild/src/Core/Nodes/ProcessNode.cs
deleted file mode 100644
index f546a4b..0000000
--- a/Prebuild/src/Core/Nodes/ProcessNode.cs
+++ /dev/null
@@ -1,119 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Collections.Specialized;
38using System.Xml;
39
40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Utilities;
43
44namespace Prebuild.Core.Nodes
45{
46 /// <summary>
47 ///
48 /// </summary>
49 [DataNode("Process")]
50 public class ProcessNode : DataNode
51 {
52 #region Fields
53
54 private string m_Path;
55 private bool m_IsValid = true;
56
57 #endregion
58
59 #region Properties
60
61 /// <summary>
62 /// Gets the path.
63 /// </summary>
64 /// <value>The path.</value>
65 public string Path
66 {
67 get
68 {
69 return m_Path;
70 }
71 }
72
73 /// <summary>
74 /// Gets a value indicating whether this instance is valid.
75 /// </summary>
76 /// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value>
77 public bool IsValid
78 {
79 get
80 {
81 return m_IsValid;
82 }
83 }
84
85 #endregion
86
87 #region Public Methods
88
89 /// <summary>
90 /// Parses the specified node.
91 /// </summary>
92 /// <param name="node">The node.</param>
93 public override void Parse(XmlNode node)
94 {
95 if( node == null )
96 {
97 throw new ArgumentNullException("node");
98 }
99
100 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
101 if(m_Path == null)
102 {
103 m_Path = "";
104 }
105
106 try
107 {
108 m_Path = Helper.ResolvePath(m_Path);
109 }
110 catch(ArgumentException)
111 {
112 Kernel.Instance.Log.Write(LogType.Warning, "Could not find prebuild file for processing: {0}", m_Path);
113 m_IsValid = false;
114 }
115 }
116
117 #endregion
118 }
119}
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs
deleted file mode 100644
index c56dacc..0000000
--- a/Prebuild/src/Core/Nodes/ProjectNode.cs
+++ /dev/null
@@ -1,510 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-11-11 05:43:20 +0100 (lö, 11 nov 2006) $
31 * $Revision: 192 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.IO;
38using System.Xml;
39
40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Utilities;
43
44namespace Prebuild.Core.Nodes
45{
46 /// <summary>
47 ///
48 /// </summary>
49 public enum ProjectType
50 {
51 /// <summary>
52 ///
53 /// </summary>
54 Exe,
55 /// <summary>
56 ///
57 /// </summary>
58 WinExe,
59 /// <summary>
60 ///
61 /// </summary>
62 Library
63 }
64
65 /// <summary>
66 ///
67 /// </summary>
68 public enum ClrRuntime
69 {
70 /// <summary>
71 ///
72 /// </summary>
73 Microsoft,
74 /// <summary>
75 ///
76 /// </summary>
77 Mono
78 }
79
80 /// <summary>
81 ///
82 /// </summary>
83 [DataNode("Project")]
84 public class ProjectNode : DataNode, IComparable
85 {
86 #region Fields
87
88 private string m_Name = "unknown";
89 private string m_Path = "";
90 private string m_FullPath = "";
91 private string m_AssemblyName;
92 private string m_AppIcon = "";
93 private string m_DesignerFolder = "";
94 private string m_Language = "C#";
95 private ProjectType m_Type = ProjectType.Exe;
96 private ClrRuntime m_Runtime = ClrRuntime.Microsoft;
97 private string m_StartupObject = "";
98 private string m_RootNamespace;
99 private string m_FilterGroups = "";
100 private Guid m_Guid;
101
102 private Hashtable m_Configurations;
103 private ArrayList m_ReferencePaths;
104 private ArrayList m_References;
105 private FilesNode m_Files;
106
107 #endregion
108
109 #region Constructors
110
111 /// <summary>
112 /// Initializes a new instance of the <see cref="ProjectNode"/> class.
113 /// </summary>
114 public ProjectNode()
115 {
116 m_Configurations = new Hashtable();
117 m_ReferencePaths = new ArrayList();
118 m_References = new ArrayList();
119 }
120
121 #endregion
122
123 #region Properties
124
125 /// <summary>
126 /// Gets the name.
127 /// </summary>
128 /// <value>The name.</value>
129 public string Name
130 {
131 get
132 {
133 return m_Name;
134 }
135 }
136
137 /// <summary>
138 /// Gets the path.
139 /// </summary>
140 /// <value>The path.</value>
141 public string Path
142 {
143 get
144 {
145 return m_Path;
146 }
147 }
148
149 /// <summary>
150 /// Gets the filter groups.
151 /// </summary>
152 /// <value>The filter groups.</value>
153 public string FilterGroups
154 {
155 get
156 {
157 return m_FilterGroups;
158 }
159 }
160
161 /// <summary>
162 /// Gets the full path.
163 /// </summary>
164 /// <value>The full path.</value>
165 public string FullPath
166 {
167 get
168 {
169 return m_FullPath;
170 }
171 }
172
173 /// <summary>
174 /// Gets the name of the assembly.
175 /// </summary>
176 /// <value>The name of the assembly.</value>
177 public string AssemblyName
178 {
179 get
180 {
181 return m_AssemblyName;
182 }
183 }
184
185 /// <summary>
186 /// Gets the app icon.
187 /// </summary>
188 /// <value>The app icon.</value>
189 public string AppIcon
190 {
191 get
192 {
193 return m_AppIcon;
194 }
195 }
196
197 /// <summary>
198 ///
199 /// </summary>
200 public string DesignerFolder
201 {
202 get
203 {
204 return m_DesignerFolder;
205 }
206 }
207
208 /// <summary>
209 /// Gets the language.
210 /// </summary>
211 /// <value>The language.</value>
212 public string Language
213 {
214 get
215 {
216 return m_Language;
217 }
218 }
219
220 /// <summary>
221 /// Gets the type.
222 /// </summary>
223 /// <value>The type.</value>
224 public ProjectType Type
225 {
226 get
227 {
228 return m_Type;
229 }
230 }
231
232 /// <summary>
233 /// Gets the runtime.
234 /// </summary>
235 /// <value>The runtime.</value>
236 public ClrRuntime Runtime
237 {
238 get
239 {
240 return m_Runtime;
241 }
242 }
243
244 private bool m_GenerateAssemblyInfoFile = false;
245
246 /// <summary>
247 ///
248 /// </summary>
249 public bool GenerateAssemblyInfoFile
250 {
251 get
252 {
253 return m_GenerateAssemblyInfoFile;
254 }
255 set
256 {
257 m_GenerateAssemblyInfoFile = value;
258 }
259 }
260
261 /// <summary>
262 /// Gets the startup object.
263 /// </summary>
264 /// <value>The startup object.</value>
265 public string StartupObject
266 {
267 get
268 {
269 return m_StartupObject;
270 }
271 }
272
273 /// <summary>
274 /// Gets the root namespace.
275 /// </summary>
276 /// <value>The root namespace.</value>
277 public string RootNamespace
278 {
279 get
280 {
281 return m_RootNamespace;
282 }
283 }
284
285 /// <summary>
286 /// Gets the configurations.
287 /// </summary>
288 /// <value>The configurations.</value>
289 public ICollection Configurations
290 {
291 get
292 {
293 ArrayList tmp = new ArrayList( ConfigurationsTable.Values);
294 tmp.Sort();
295 return tmp;
296 }
297 }
298
299 /// <summary>
300 /// Gets the configurations table.
301 /// </summary>
302 /// <value>The configurations table.</value>
303 public Hashtable ConfigurationsTable
304 {
305 get
306 {
307 return m_Configurations;
308 }
309 }
310
311 /// <summary>
312 /// Gets the reference paths.
313 /// </summary>
314 /// <value>The reference paths.</value>
315 public ArrayList ReferencePaths
316 {
317 get
318 {
319 ArrayList tmp = new ArrayList(m_ReferencePaths);
320 tmp.Sort();
321 return tmp;
322 }
323 }
324
325 /// <summary>
326 /// Gets the references.
327 /// </summary>
328 /// <value>The references.</value>
329 public ArrayList References
330 {
331 get
332 {
333 ArrayList tmp = new ArrayList(m_References);
334 tmp.Sort();
335 return tmp;
336 }
337 }
338
339 /// <summary>
340 /// Gets the files.
341 /// </summary>
342 /// <value>The files.</value>
343 public FilesNode Files
344 {
345 get
346 {
347 return m_Files;
348 }
349 }
350
351 /// <summary>
352 /// Gets or sets the parent.
353 /// </summary>
354 /// <value>The parent.</value>
355 public override IDataNode Parent
356 {
357 get
358 {
359 return base.Parent;
360 }
361 set
362 {
363 base.Parent = value;
364 if(base.Parent is SolutionNode && m_Configurations.Count < 1)
365 {
366 SolutionNode parent = (SolutionNode)base.Parent;
367 foreach(ConfigurationNode conf in parent.Configurations)
368 {
369 m_Configurations[conf.Name] = conf.Clone();
370 }
371 }
372 }
373 }
374
375 /// <summary>
376 /// Gets the GUID.
377 /// </summary>
378 /// <value>The GUID.</value>
379 public Guid Guid
380 {
381 get
382 {
383 return m_Guid;
384 }
385 }
386
387 #endregion
388
389 #region Private Methods
390
391 private void HandleConfiguration(ConfigurationNode conf)
392 {
393 if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first,
394 //so it *may* override changes to the same properties for configurations defines at the project level
395 {
396 foreach(ConfigurationNode confNode in this.m_Configurations.Values)
397 {
398 conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides
399 }
400 }
401 if(m_Configurations.ContainsKey(conf.Name))
402 {
403 ConfigurationNode parentConf = (ConfigurationNode)m_Configurations[conf.Name];
404 conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides
405 }
406 else
407 {
408 m_Configurations[conf.Name] = conf;
409 }
410 }
411
412 #endregion
413
414 #region Public Methods
415
416 /// <summary>
417 /// Parses the specified node.
418 /// </summary>
419 /// <param name="node">The node.</param>
420 public override void Parse(XmlNode node)
421 {
422 m_Name = Helper.AttributeValue(node, "name", m_Name);
423 m_Path = Helper.AttributeValue(node, "path", m_Path);
424 m_FilterGroups = Helper.AttributeValue(node, "filterGroups", m_FilterGroups);
425 m_AppIcon = Helper.AttributeValue(node, "icon", m_AppIcon);
426 m_DesignerFolder = Helper.AttributeValue(node, "designerFolder", m_DesignerFolder);
427 m_AssemblyName = Helper.AttributeValue(node, "assemblyName", m_AssemblyName);
428 m_Language = Helper.AttributeValue(node, "language", m_Language);
429 m_Type = (ProjectType)Helper.EnumAttributeValue(node, "type", typeof(ProjectType), m_Type);
430 m_Runtime = (ClrRuntime)Helper.EnumAttributeValue(node, "runtime", typeof(ClrRuntime), m_Runtime);
431 m_StartupObject = Helper.AttributeValue(node, "startupObject", m_StartupObject);
432 m_RootNamespace = Helper.AttributeValue(node, "rootNamespace", m_RootNamespace);
433
434 int hash = m_Name.GetHashCode();
435
436 m_Guid = new Guid( hash, 0, 0, 0, 0, 0, 0,0,0,0,0 );
437
438 m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false);
439
440 if(m_AssemblyName == null || m_AssemblyName.Length < 1)
441 {
442 m_AssemblyName = m_Name;
443 }
444
445 if(m_RootNamespace == null || m_RootNamespace.Length < 1)
446 {
447 m_RootNamespace = m_Name;
448 }
449
450 m_FullPath = m_Path;
451 try
452 {
453 m_FullPath = Helper.ResolvePath(m_FullPath);
454 }
455 catch
456 {
457 throw new WarningException("Could not resolve Solution path: {0}", m_Path);
458 }
459
460 Kernel.Instance.CurrentWorkingDirectory.Push();
461 try
462 {
463 Helper.SetCurrentDir(m_FullPath);
464
465 if( node == null )
466 {
467 throw new ArgumentNullException("node");
468 }
469
470 foreach(XmlNode child in node.ChildNodes)
471 {
472 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
473 if(dataNode is ConfigurationNode)
474 {
475 HandleConfiguration((ConfigurationNode)dataNode);
476 }
477 else if(dataNode is ReferencePathNode)
478 {
479 m_ReferencePaths.Add(dataNode);
480 }
481 else if(dataNode is ReferenceNode)
482 {
483 m_References.Add(dataNode);
484 }
485 else if(dataNode is FilesNode)
486 {
487 m_Files = (FilesNode)dataNode;
488 }
489 }
490 }
491 finally
492 {
493 Kernel.Instance.CurrentWorkingDirectory.Pop();
494 }
495 }
496
497
498 #endregion
499
500 #region IComparable Members
501
502 public int CompareTo(object obj)
503 {
504 ProjectNode that = (ProjectNode)obj;
505 return this.m_Name.CompareTo(that.m_Name);
506 }
507
508 #endregion
509 }
510}
diff --git a/Prebuild/src/Core/Nodes/ReferenceNode.cs b/Prebuild/src/Core/Nodes/ReferenceNode.cs
deleted file mode 100644
index a2880c0..0000000
--- a/Prebuild/src/Core/Nodes/ReferenceNode.cs
+++ /dev/null
@@ -1,153 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-07-25 18:56:49 +0200 (ti, 25 jul 2006) $
31 * $Revision: 132 $
32 */
33#endregion
34
35using System;
36using System.Xml;
37
38using Prebuild.Core.Attributes;
39using Prebuild.Core.Interfaces;
40using Prebuild.Core.Utilities;
41
42namespace Prebuild.Core.Nodes
43{
44 /// <summary>
45 ///
46 /// </summary>
47 [DataNode("Reference")]
48 public class ReferenceNode : DataNode, IComparable
49 {
50 #region Fields
51
52 private string m_Name = "unknown";
53 private string m_Path;
54 private string m_LocalCopy;
55 private string m_Version;
56
57 #endregion
58
59 #region Properties
60
61 /// <summary>
62 /// Gets the name.
63 /// </summary>
64 /// <value>The name.</value>
65 public string Name
66 {
67 get
68 {
69 return m_Name;
70 }
71 }
72
73 /// <summary>
74 /// Gets the path.
75 /// </summary>
76 /// <value>The path.</value>
77 public string Path
78 {
79 get
80 {
81 return m_Path;
82 }
83 }
84
85 /// <summary>
86 /// Gets a value indicating whether [local copy specified].
87 /// </summary>
88 /// <value><c>true</c> if [local copy specified]; otherwise, <c>false</c>.</value>
89 public bool LocalCopySpecified
90 {
91 get
92 {
93 return ( m_LocalCopy != null && m_LocalCopy.Length == 0);
94 }
95 }
96
97 /// <summary>
98 /// Gets a value indicating whether [local copy].
99 /// </summary>
100 /// <value><c>true</c> if [local copy]; otherwise, <c>false</c>.</value>
101 public bool LocalCopy
102 {
103 get
104 {
105 if( m_LocalCopy == null)
106 {
107 return false;
108 }
109 return bool.Parse(m_LocalCopy);
110 }
111 }
112
113 /// <summary>
114 /// Gets the version.
115 /// </summary>
116 /// <value>The version.</value>
117 public string Version
118 {
119 get
120 {
121 return m_Version;
122 }
123 }
124
125 #endregion
126
127 #region Public Methods
128
129 /// <summary>
130 /// Parses the specified node.
131 /// </summary>
132 /// <param name="node">The node.</param>
133 public override void Parse(XmlNode node)
134 {
135 m_Name = Helper.AttributeValue(node, "name", m_Name);
136 m_Path = Helper.AttributeValue(node, "path", m_Path);
137 m_LocalCopy = Helper.AttributeValue(node, "localCopy", m_LocalCopy);
138 m_Version = Helper.AttributeValue(node, "version", m_Version);
139 }
140
141 #endregion
142
143 #region IComparable Members
144
145 public int CompareTo(object obj)
146 {
147 ReferenceNode that = (ReferenceNode)obj;
148 return this.m_Name.CompareTo(that.m_Name);
149 }
150
151 #endregion
152 }
153}
diff --git a/Prebuild/src/Core/Nodes/ReferencePathNode.cs b/Prebuild/src/Core/Nodes/ReferencePathNode.cs
deleted file mode 100644
index 0563c1b..0000000
--- a/Prebuild/src/Core/Nodes/ReferencePathNode.cs
+++ /dev/null
@@ -1,108 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Collections.Specialized;
38using System.Xml;
39
40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Utilities;
43
44namespace Prebuild.Core.Nodes
45{
46 /// <summary>
47 ///
48 /// </summary>
49 [DataNode("ReferencePath")]
50 public class ReferencePathNode : DataNode, IComparable
51 {
52 #region Fields
53
54 private string m_Path;
55
56 #endregion
57
58 #region Properties
59
60 /// <summary>
61 /// Gets the path.
62 /// </summary>
63 /// <value>The path.</value>
64 public string Path
65 {
66 get
67 {
68 return m_Path;
69 }
70 }
71
72 #endregion
73
74 #region Public Methods
75
76 /// <summary>
77 /// Parses the specified node.
78 /// </summary>
79 /// <param name="node">The node.</param>
80 public override void Parse(XmlNode node)
81 {
82 if( node == null )
83 {
84 throw new ArgumentNullException("node");
85 }
86
87 m_Path = Helper.InterpolateForEnvironmentVariables(node.InnerText);
88 if(m_Path == null)
89 {
90 m_Path = "";
91 }
92
93 m_Path = m_Path.Trim();
94 }
95
96 #endregion
97
98 #region IComparable Members
99
100 public int CompareTo(object obj)
101 {
102 ReferencePathNode that = (ReferencePathNode)obj;
103 return this.m_Path.CompareTo(that.m_Path);
104 }
105
106 #endregion
107 }
108}
diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs
deleted file mode 100644
index c777fa4..0000000
--- a/Prebuild/src/Core/Nodes/SolutionNode.cs
+++ /dev/null
@@ -1,288 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-02-28 17:15:42 +0100 (ti, 28 feb 2006) $
31 * $Revision: 92 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Diagnostics;
38using System.IO;
39using System.Xml;
40
41using Prebuild.Core.Attributes;
42using Prebuild.Core.Interfaces;
43using Prebuild.Core.Utilities;
44
45namespace Prebuild.Core.Nodes
46{
47 /// <summary>
48 ///
49 /// </summary>
50 [DataNode("Solution")]
51 public class SolutionNode : DataNode
52 {
53 #region Fields
54
55 private string m_Name = "unknown";
56 private string m_Path = "";
57 private string m_FullPath = "";
58 private string m_ActiveConfig = "Debug";
59
60 private OptionsNode m_Options;
61 private FilesNode m_Files;
62 private Hashtable m_Configurations;
63 private Hashtable m_Projects;
64 private ArrayList m_ProjectsOrder;
65
66 #endregion
67
68 #region Constructors
69
70 /// <summary>
71 /// Initializes a new instance of the <see cref="SolutionNode"/> class.
72 /// </summary>
73 public SolutionNode()
74 {
75 m_Configurations = new Hashtable();
76 m_Projects = new Hashtable();
77 m_ProjectsOrder = new ArrayList();
78 }
79
80 #endregion
81
82 #region Properties
83
84 /// <summary>
85 /// Gets or sets the active config.
86 /// </summary>
87 /// <value>The active config.</value>
88 public string ActiveConfig
89 {
90 get
91 {
92 return m_ActiveConfig;
93 }
94 set
95 {
96 m_ActiveConfig = value;
97 }
98 }
99
100 /// <summary>
101 /// Gets the name.
102 /// </summary>
103 /// <value>The name.</value>
104 public string Name
105 {
106 get
107 {
108 return m_Name;
109 }
110 }
111
112 /// <summary>
113 /// Gets the path.
114 /// </summary>
115 /// <value>The path.</value>
116 public string Path
117 {
118 get
119 {
120 return m_Path;
121 }
122 }
123
124 /// <summary>
125 /// Gets the full path.
126 /// </summary>
127 /// <value>The full path.</value>
128 public string FullPath
129 {
130 get
131 {
132 return m_FullPath;
133 }
134 }
135
136 /// <summary>
137 /// Gets the options.
138 /// </summary>
139 /// <value>The options.</value>
140 public OptionsNode Options
141 {
142 get
143 {
144 return m_Options;
145 }
146 }
147
148 /// <summary>
149 /// Gets the files.
150 /// </summary>
151 /// <value>The files.</value>
152 public FilesNode Files
153 {
154 get
155 {
156 return m_Files;
157 }
158 }
159
160 /// <summary>
161 /// Gets the configurations.
162 /// </summary>
163 /// <value>The configurations.</value>
164 public ICollection Configurations
165 {
166 get
167 {
168 ArrayList tmp = new ArrayList(ConfigurationsTable.Values);
169 tmp.Sort();
170 return tmp;
171 }
172 }
173
174 /// <summary>
175 /// Gets the configurations table.
176 /// </summary>
177 /// <value>The configurations table.</value>
178 public Hashtable ConfigurationsTable
179 {
180 get
181 {
182 return m_Configurations;
183 }
184 }
185
186 /// <summary>
187 /// Gets the projects.
188 /// </summary>
189 /// <value>The projects.</value>
190 public ICollection Projects
191 {
192 get
193 {
194 ArrayList tmp = new ArrayList(m_Projects.Values);
195 tmp.Sort();
196 return tmp;
197 }
198 }
199
200 /// <summary>
201 /// Gets the projects table.
202 /// </summary>
203 /// <value>The projects table.</value>
204 public Hashtable ProjectsTable
205 {
206 get
207 {
208 return m_Projects;
209 }
210 }
211
212 /// <summary>
213 /// Gets the projects table.
214 /// </summary>
215 /// <value>The projects table.</value>
216 public ArrayList ProjectsTableOrder
217 {
218 get
219 {
220 return m_ProjectsOrder;
221 }
222 }
223
224 #endregion
225
226 #region Public Methods
227
228 /// <summary>
229 /// Parses the specified node.
230 /// </summary>
231 /// <param name="node">The node.</param>
232 public override void Parse(XmlNode node)
233 {
234 m_Name = Helper.AttributeValue(node, "name", m_Name);
235 m_ActiveConfig = Helper.AttributeValue(node, "activeConfig", m_ActiveConfig);
236 m_Path = Helper.AttributeValue(node, "path", m_Path);
237
238 m_FullPath = m_Path;
239 try
240 {
241 m_FullPath = Helper.ResolvePath(m_FullPath);
242 }
243 catch
244 {
245 throw new WarningException("Could not resolve solution path: {0}", m_Path);
246 }
247
248 Kernel.Instance.CurrentWorkingDirectory.Push();
249 try
250 {
251 Helper.SetCurrentDir(m_FullPath);
252
253 if( node == null )
254 {
255 throw new ArgumentNullException("node");
256 }
257
258 foreach(XmlNode child in node.ChildNodes)
259 {
260 IDataNode dataNode = Kernel.Instance.ParseNode(child, this);
261 if(dataNode is OptionsNode)
262 {
263 m_Options = (OptionsNode)dataNode;
264 }
265 else if(dataNode is FilesNode)
266 {
267 m_Files = (FilesNode)dataNode;
268 }
269 else if(dataNode is ConfigurationNode)
270 {
271 m_Configurations[((ConfigurationNode)dataNode).Name] = dataNode;
272 }
273 else if(dataNode is ProjectNode)
274 {
275 m_Projects[((ProjectNode)dataNode).Name] = dataNode;
276 m_ProjectsOrder.Add(dataNode);
277 }
278 }
279 }
280 finally
281 {
282 Kernel.Instance.CurrentWorkingDirectory.Pop();
283 }
284 }
285
286 #endregion
287 }
288}
diff --git a/Prebuild/src/Core/Parse/IfContext.cs b/Prebuild/src/Core/Parse/IfContext.cs
deleted file mode 100644
index 383049d..0000000
--- a/Prebuild/src/Core/Parse/IfContext.cs
+++ /dev/null
@@ -1,163 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36
37namespace Prebuild.Core.Parse
38{
39 /// <summary>
40 ///
41 /// </summary>
42 public enum IfState
43 {
44 /// <summary>
45 ///
46 /// </summary>
47 None,
48 /// <summary>
49 ///
50 /// </summary>
51 If,
52 /// <summary>
53 ///
54 /// </summary>
55 ElseIf,
56 /// <summary>
57 ///
58 /// </summary>
59 Else
60 }
61
62 /// <summary>
63 /// Summary description for IfContext.
64 /// </summary>
65 // Inspired by the equivalent WiX class (see www.sourceforge.net/projects/wix/)
66 public class IfContext
67 {
68 #region Properties
69
70 bool m_Active;
71 bool m_Keep;
72 bool m_EverKept;
73 IfState m_State = IfState.None;
74
75 #endregion
76
77 #region Constructors
78
79 /// <summary>
80 /// Initializes a new instance of the <see cref="IfContext"/> class.
81 /// </summary>
82 /// <param name="active">if set to <c>true</c> [active].</param>
83 /// <param name="keep">if set to <c>true</c> [keep].</param>
84 /// <param name="state">The state.</param>
85 public IfContext(bool active, bool keep, IfState state)
86 {
87 m_Active = active;
88 m_Keep = keep;
89 m_EverKept = keep;
90 m_State = state;
91 }
92
93 #endregion
94
95 #region Properties
96
97 /// <summary>
98 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is active.
99 /// </summary>
100 /// <value><c>true</c> if active; otherwise, <c>false</c>.</value>
101 public bool Active
102 {
103 get
104 {
105 return m_Active;
106 }
107 set
108 {
109 m_Active = value;
110 }
111 }
112
113 /// <summary>
114 /// Gets or sets a value indicating whether this <see cref="IfContext"/> is keep.
115 /// </summary>
116 /// <value><c>true</c> if keep; otherwise, <c>false</c>.</value>
117 public bool Keep
118 {
119 get
120 {
121 return m_Keep;
122 }
123 set
124 {
125 m_Keep = value;
126 if(m_Keep)
127 {
128 m_EverKept = true;
129 }
130 }
131 }
132
133 /// <summary>
134 /// Gets a value indicating whether [ever kept].
135 /// </summary>
136 /// <value><c>true</c> if [ever kept]; otherwise, <c>false</c>.</value>
137 public bool EverKept
138 {
139 get
140 {
141 return m_EverKept;
142 }
143 }
144
145 /// <summary>
146 /// Gets or sets the state.
147 /// </summary>
148 /// <value>The state.</value>
149 public IfState State
150 {
151 get
152 {
153 return m_State;
154 }
155 set
156 {
157 m_State = value;
158 }
159 }
160
161 #endregion
162 }
163}
diff --git a/Prebuild/src/Core/Parse/Preprocessor.cs b/Prebuild/src/Core/Parse/Preprocessor.cs
deleted file mode 100644
index 85e92c3..0000000
--- a/Prebuild/src/Core/Parse/Preprocessor.cs
+++ /dev/null
@@ -1,519 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-09-01 19:55:06 +0200 (fr, 01 sep 2006) $
31 * $Revision: 147 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.IO;
38using System.Xml;
39
40namespace Prebuild.Core.Parse
41{
42 /// <summary>
43 ///
44 /// </summary>
45 public enum OperatorSymbol
46 {
47 /// <summary>
48 ///
49 /// </summary>
50 None,
51 /// <summary>
52 ///
53 /// </summary>
54 Equal,
55 /// <summary>
56 ///
57 /// </summary>
58 NotEqual,
59 /// <summary>
60 ///
61 /// </summary>
62 LessThan,
63 /// <summary>
64 ///
65 /// </summary>
66 GreaterThan,
67 /// <summary>
68 ///
69 /// </summary>
70 LessThanEqual,
71 /// <summary>
72 ///
73 /// </summary>
74 GreaterThanEqual
75 }
76
77 /// <summary>
78 ///
79 /// </summary>
80 public class Preprocessor
81 {
82 #region Fields
83
84 XmlDocument m_OutDoc;
85 Stack m_IfStack;
86 Hashtable m_Variables;
87
88 #endregion
89
90 #region Constructors
91
92 /// <summary>
93 /// Initializes a new instance of the <see cref="Preprocessor"/> class.
94 /// </summary>
95 public Preprocessor()
96 {
97 m_OutDoc = new XmlDocument();
98 m_IfStack = new Stack();
99 m_Variables = new Hashtable();
100
101 RegisterVariable("OS", GetOS());
102 RegisterVariable("RuntimeVersion", Environment.Version.Major);
103 RegisterVariable("RuntimeMajor", Environment.Version.Major);
104 RegisterVariable("RuntimeMinor", Environment.Version.Minor);
105 RegisterVariable("RuntimeRevision", Environment.Version.Revision);
106 }
107
108 #endregion
109
110 #region Properties
111
112 /// <summary>
113 /// Gets the processed doc.
114 /// </summary>
115 /// <value>The processed doc.</value>
116 public XmlDocument ProcessedDoc
117 {
118 get
119 {
120 return m_OutDoc;
121 }
122 }
123
124 #endregion
125
126 #region Private Methods
127
128 /// <summary>
129 /// Parts of this code were taken from NAnt and is subject to the GPL
130 /// as per NAnt's license. Thanks to the NAnt guys for this little gem.
131 /// </summary>
132 /// <returns></returns>
133 public static string GetOS()
134 {
135 PlatformID platId = Environment.OSVersion.Platform;
136 if(platId == PlatformID.Win32NT || platId == PlatformID.Win32Windows)
137 {
138 return "Win32";
139 }
140
141 /*
142 * .NET 1.x, under Mono, the UNIX code is 128. Under
143 * .NET 2.x, Mono or MS, the UNIX code is 4
144 */
145 if(Environment.Version.Major == 1)
146 {
147 if((int)platId == 128)
148 {
149 return "UNIX";
150 }
151 }
152 else if((int)platId == 4)
153 {
154 return "UNIX";
155 }
156
157 return "Unknown";
158 }
159
160 private static bool CompareNum(OperatorSymbol oper, int val1, int val2)
161 {
162 switch(oper)
163 {
164 case OperatorSymbol.Equal:
165 return (val1 == val2);
166 case OperatorSymbol.NotEqual:
167 return (val1 != val2);
168 case OperatorSymbol.LessThan:
169 return (val1 < val2);
170 case OperatorSymbol.LessThanEqual:
171 return (val1 <= val2);
172 case OperatorSymbol.GreaterThan:
173 return (val1 > val2);
174 case OperatorSymbol.GreaterThanEqual:
175 return (val1 >= val2);
176 }
177
178 throw new WarningException("Unknown operator type");
179 }
180
181 private static bool CompareStr(OperatorSymbol oper, string val1, string val2)
182 {
183 switch(oper)
184 {
185 case OperatorSymbol.Equal:
186 return (val1 == val2);
187 case OperatorSymbol.NotEqual:
188 return (val1 != val2);
189 case OperatorSymbol.LessThan:
190 return (val1.CompareTo(val2) < 0);
191 case OperatorSymbol.LessThanEqual:
192 return (val1.CompareTo(val2) <= 0);
193 case OperatorSymbol.GreaterThan:
194 return (val1.CompareTo(val2) > 0);
195 case OperatorSymbol.GreaterThanEqual:
196 return (val1.CompareTo(val2) >= 0);
197 }
198
199 throw new WarningException("Unknown operator type");
200 }
201
202 private static char NextChar(int idx, string str)
203 {
204 if((idx + 1) >= str.Length)
205 {
206 return Char.MaxValue;
207 }
208
209 return str[idx + 1];
210 }
211 // Very very simple expression parser. Can only match expressions of the form
212 // <var> <op> <value>:
213 // OS = Windows
214 // OS != Linux
215 // RuntimeMinor > 0
216 private bool ParseExpression(string exp)
217 {
218 if(exp == null)
219 {
220 throw new ArgumentException("Invalid expression, cannot be null");
221 }
222
223 exp = exp.Trim();
224 if(exp.Length < 1)
225 {
226 throw new ArgumentException("Invalid expression, cannot be 0 length");
227 }
228
229 string id = "";
230 string str = "";
231 OperatorSymbol oper = OperatorSymbol.None;
232 bool inStr = false;
233 char c;
234
235 for(int i = 0; i < exp.Length; i++)
236 {
237 c = exp[i];
238 if(Char.IsWhiteSpace(c))
239 {
240 continue;
241 }
242
243 if(Char.IsLetterOrDigit(c) || c == '_')
244 {
245 if(inStr)
246 {
247 str += c;
248 }
249 else
250 {
251 id += c;
252 }
253 }
254 else if(c == '\"')
255 {
256 inStr = !inStr;
257 if(inStr)
258 {
259 str = "";
260 }
261 }
262 else
263 {
264 if(inStr)
265 {
266 str += c;
267 }
268 else
269 {
270 switch(c)
271 {
272 case '=':
273 oper = OperatorSymbol.Equal;
274 break;
275
276 case '!':
277 if(NextChar(i, exp) == '=')
278 {
279 oper = OperatorSymbol.NotEqual;
280 }
281
282 break;
283
284 case '<':
285 if(NextChar(i, exp) == '=')
286 {
287 oper = OperatorSymbol.LessThanEqual;
288 }
289 else
290 {
291 oper = OperatorSymbol.LessThan;
292 }
293
294 break;
295
296 case '>':
297 if(NextChar(i, exp) == '=')
298 {
299 oper = OperatorSymbol.GreaterThanEqual;
300 }
301 else
302 {
303 oper = OperatorSymbol.GreaterThan;
304 }
305
306 break;
307 }
308 }
309 }
310 }
311
312
313 if(inStr)
314 {
315 throw new WarningException("Expected end of string in expression");
316 }
317
318 if(oper == OperatorSymbol.None)
319 {
320 throw new WarningException("Expected operator in expression");
321 }
322 else if(id.Length < 1)
323 {
324 throw new WarningException("Expected identifier in expression");
325 }
326 else if(str.Length < 1)
327 {
328 throw new WarningException("Expected value in expression");
329 }
330
331 bool ret = false;
332 try
333 {
334 object val = m_Variables[id.ToLower()];
335 if(val == null)
336 {
337 throw new WarningException("Unknown identifier '{0}'", id);
338 }
339
340 int numVal, numVal2;
341 string strVal, strVal2;
342 Type t = val.GetType();
343 if(t.IsAssignableFrom(typeof(int)))
344 {
345 numVal = (int)val;
346 numVal2 = Int32.Parse(str);
347 ret = CompareNum(oper, numVal, numVal2);
348 }
349 else
350 {
351 strVal = val.ToString();
352 strVal2 = str;
353 ret = CompareStr(oper, strVal, strVal2);
354 }
355 }
356 catch(ArgumentException ex)
357 {
358 ex.ToString();
359 throw new WarningException("Invalid value type for system variable '{0}', expected int", id);
360 }
361
362 return ret;
363 }
364
365 #endregion
366
367 #region Public Methods
368
369 /// <summary>
370 ///
371 /// </summary>
372 /// <param name="name"></param>
373 /// <param name="variableValue"></param>
374 public void RegisterVariable(string name, object variableValue)
375 {
376 if(name == null || variableValue == null)
377 {
378 return;
379 }
380
381 m_Variables[name.ToLower()] = variableValue;
382 }
383
384 /// <summary>
385 /// Performs validation on the xml source as well as evaluates conditional and flow expresions
386 /// </summary>
387 /// <exception cref="ArgumentException">For invalid use of conditional expressions or for invalid XML syntax. If a XmlValidatingReader is passed, then will also throw exceptions for non-schema-conforming xml</exception>
388 /// <param name="reader"></param>
389 /// <returns>the output xml </returns>
390 public string Process(XmlReader reader)
391 {
392 if(reader == null)
393 {
394 throw new ArgumentException("Invalid XML reader to pre-process");
395 }
396
397 IfContext context = new IfContext(true, true, IfState.None);
398 StringWriter xmlText = new StringWriter();
399 XmlTextWriter writer = new XmlTextWriter(xmlText);
400 writer.Formatting = Formatting.Indented;
401 while(reader.Read())
402 {
403 if(reader.NodeType == XmlNodeType.ProcessingInstruction)
404 {
405 bool ignore = false;
406 switch(reader.LocalName)
407 {
408 case "if":
409 m_IfStack.Push(context);
410 context = new IfContext(context.Keep & context.Active, ParseExpression(reader.Value), IfState.If);
411 ignore = true;
412 break;
413
414 case "elseif":
415 if(m_IfStack.Count == 0)
416 {
417 throw new WarningException("Unexpected 'elseif' outside of 'if'");
418 }
419 else if(context.State != IfState.If && context.State != IfState.ElseIf)
420 {
421 throw new WarningException("Unexpected 'elseif' outside of 'if'");
422 }
423
424 context.State = IfState.ElseIf;
425 if(!context.EverKept)
426 {
427 context.Keep = ParseExpression(reader.Value);
428 }
429 else
430 {
431 context.Keep = false;
432 }
433
434 ignore = true;
435 break;
436
437 case "else":
438 if(m_IfStack.Count == 0)
439 {
440 throw new WarningException("Unexpected 'else' outside of 'if'");
441 }
442 else if(context.State != IfState.If && context.State != IfState.ElseIf)
443 {
444 throw new WarningException("Unexpected 'else' outside of 'if'");
445 }
446
447 context.State = IfState.Else;
448 context.Keep = !context.EverKept;
449 ignore = true;
450 break;
451
452 case "endif":
453 if(m_IfStack.Count == 0)
454 {
455 throw new WarningException("Unexpected 'endif' outside of 'if'");
456 }
457
458 context = (IfContext)m_IfStack.Pop();
459 ignore = true;
460 break;
461 }
462
463 if(ignore)
464 {
465 continue;
466 }
467 }//end pre-proc instruction
468
469 if(!context.Active || !context.Keep)
470 {
471 continue;
472 }
473
474 switch(reader.NodeType)
475 {
476 case XmlNodeType.Element:
477 bool empty = reader.IsEmptyElement;
478 writer.WriteStartElement(reader.Name);
479
480 while (reader.MoveToNextAttribute())
481 {
482 writer.WriteAttributeString(reader.Name, reader.Value);
483 }
484
485 if(empty)
486 {
487 writer.WriteEndElement();
488 }
489
490 break;
491
492 case XmlNodeType.EndElement:
493 writer.WriteEndElement();
494 break;
495
496 case XmlNodeType.Text:
497 writer.WriteString(reader.Value);
498 break;
499
500 case XmlNodeType.CDATA:
501 writer.WriteCData(reader.Value);
502 break;
503
504 default:
505 break;
506 }
507 }
508
509 if(m_IfStack.Count != 0)
510 {
511 throw new WarningException("Mismatched 'if', 'endif' pair");
512 }
513
514 return xmlText.ToString();
515 }
516
517 #endregion
518 }
519}
diff --git a/Prebuild/src/Core/Targets/AutotoolsTarget.cs b/Prebuild/src/Core/Targets/AutotoolsTarget.cs
deleted file mode 100644
index 2b4a678..0000000
--- a/Prebuild/src/Core/Targets/AutotoolsTarget.cs
+++ /dev/null
@@ -1,926 +0,0 @@
1#region BSD License
2/*
3
4Copyright (c) 2004 - 2006
5Matthew Holmes (matthew@wildfiregames.com),
6Dan Moorehead (dan05a@gmail.com),
7Dave Hudson (jendave@yahoo.com),
8C.J. Adams-Collier (cjcollier@colliertech.org),
9
10Redistribution and use in source and binary forms, with or without
11modification, are permitted provided that the following conditions are
12met:
13
14* Redistributions of source code must retain the above copyright
15notice, this list of conditions and the following disclaimer.
16
17* Redistributions in binary form must reproduce the above copyright
18notice, this list of conditions and the following disclaimer in the
19documentation and/or other materials provided with the distribution.
20
21* The name of the author may not be used to endorse or promote
22products derived from this software without specific prior written
23permission.
24
25THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
29INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
34IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35POSSIBILITY OF SUCH DAMAGE.
36
37*/
38#endregion
39
40#region CVS Information
41/*
42 * $Source$
43 * $Author: jendave $
44 * $Date: 2006-07-28 22:43:24 -0700 (Fri, 28 Jul 2006) $
45 * $Revision: 136 $
46 */
47#endregion
48
49using System;
50using System.Collections;
51using System.Collections.Specialized;
52using System.IO;
53using System.Reflection;
54using System.Text;
55using System.Text.RegularExpressions;
56
57using Prebuild.Core.Attributes;
58using Prebuild.Core.Interfaces;
59using Prebuild.Core.Nodes;
60using Prebuild.Core.Parse;
61using Prebuild.Core.Utilities;
62
63namespace Prebuild.Core.Targets
64{
65 /// <summary>
66 ///
67 /// </summary>
68 [Target("autotools")]
69 public class AutotoolsTarget : ITarget
70 {
71 #region Fields
72
73 private Kernel m_Kernel;
74
75 #endregion
76
77 #region Private Methods
78
79 private static string PrependPath(string path)
80 {
81 string tmpPath = Helper.NormalizePath(path, '/');
82 Regex regex = new Regex(@"(\w):/(\w+)");
83 Match match = regex.Match(tmpPath);
84 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
85 {
86 tmpPath = Helper.NormalizePath(tmpPath);
87 }
88 else
89 {
90 tmpPath = Helper.NormalizePath("./" + tmpPath);
91 }
92
93 return tmpPath;
94 }
95
96 private static string BuildReference(SolutionNode solution, ReferenceNode refr)
97 {
98 string ret = "";
99 if(solution.ProjectsTable.ContainsKey(refr.Name))
100 {
101 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
102 string fileRef = FindFileReference(refr.Name, project);
103 string finalPath = Helper.NormalizePath(Helper.MakeFilePath(project.FullPath + "/$(BUILD_DIR)/$(CONFIG)/", refr.Name, "dll"), '/');
104 ret += finalPath;
105 return ret;
106 }
107 else
108 {
109 ProjectNode project = (ProjectNode)refr.Parent;
110 string fileRef = FindFileReference(refr.Name, project);
111
112 if(refr.Path != null || fileRef != null)
113 {
114 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path + "/" + refr.Name + ".dll", '/') : fileRef;
115 ret += Path.Combine(project.Path, finalPath);
116 return ret;
117 }
118
119 try
120 {
121 //Assembly assem = Assembly.Load(refr.Name);
122 //if (assem != null)
123 //{
124 // int index = refr.Name.IndexOf(",");
125 // if ( index > 0)
126 // {
127 // ret += assem.Location;
128 // //Console.WriteLine("Location1: " + assem.Location);
129 // }
130 // else
131 // {
132 // ret += (refr.Name + ".dll");
133 // //Console.WriteLine("Location2: " + assem.Location);
134 // }
135 //}
136 //else
137 //{
138 int index = refr.Name.IndexOf(",");
139 if ( index > 0)
140 {
141 ret += refr.Name.Substring(0, index) + ".dll";
142 //Console.WriteLine("Location3: " + assem.Location);
143 }
144 else
145 {
146 ret += (refr.Name + ".dll");
147 //Console.WriteLine("Location4: " + assem.Location);
148 }
149 //}
150 }
151 catch (System.NullReferenceException e)
152 {
153 e.ToString();
154 int index = refr.Name.IndexOf(",");
155 if ( index > 0)
156 {
157 ret += refr.Name.Substring(0, index) + ".dll";
158 //Console.WriteLine("Location5: " + assem.Location);
159 }
160 else
161 {
162 ret += (refr.Name + ".dll");
163 //Console.WriteLine("Location6: " + assem.Location);
164 }
165 }
166 }
167 return ret;
168 }
169
170 private static string BuildReferencePath(SolutionNode solution, ReferenceNode refr)
171 {
172 string ret = "";
173 if(solution.ProjectsTable.ContainsKey(refr.Name))
174 {
175 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
176 string finalPath = Helper.NormalizePath(Helper.MakeReferencePath(project.FullPath + "/${build.dir}/"), '/');
177 ret += finalPath;
178 return ret;
179 }
180 else
181 {
182 ProjectNode project = (ProjectNode)refr.Parent;
183 string fileRef = FindFileReference(refr.Name, project);
184
185
186 if(refr.Path != null || fileRef != null)
187 {
188 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path, '/') : fileRef;
189 ret += finalPath;
190 return ret;
191 }
192
193 try
194 {
195 Assembly assem = Assembly.Load(refr.Name);
196 if (assem != null)
197 {
198 ret += "";
199 }
200 else
201 {
202 ret += "";
203 }
204 }
205 catch (System.NullReferenceException e)
206 {
207 e.ToString();
208 ret += "";
209 }
210 }
211 return ret;
212 }
213
214 private static string FindFileReference(string refName, ProjectNode project)
215 {
216 foreach(ReferencePathNode refPath in project.ReferencePaths)
217 {
218 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
219
220 if(File.Exists(fullPath))
221 {
222 return fullPath;
223 }
224 }
225
226 return null;
227 }
228
229 /// <summary>
230 /// Gets the XML doc file.
231 /// </summary>
232 /// <param name="project">The project.</param>
233 /// <param name="conf">The conf.</param>
234 /// <returns></returns>
235 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
236 {
237 if( conf == null )
238 {
239 throw new ArgumentNullException("conf");
240 }
241 if( project == null )
242 {
243 throw new ArgumentNullException("project");
244 }
245 string docFile = (string)conf.Options["XmlDocFile"];
246 // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
247 // {
248 // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
249 // }
250 return docFile;
251 }
252
253 /// <summary>
254 /// Normalizes the path.
255 /// </summary>
256 /// <param name="path">The path.</param>
257 /// <returns></returns>
258 public static string NormalizePath(string path)
259 {
260 if(path == null)
261 {
262 return "";
263 }
264
265 StringBuilder tmpPath;
266
267 if (Core.Parse.Preprocessor.GetOS() == "Win32")
268 {
269 tmpPath = new StringBuilder(path.Replace('\\', '/'));
270 tmpPath.Replace("/", @"\\");
271 }
272 else
273 {
274 tmpPath = new StringBuilder(path.Replace('\\', '/'));
275 tmpPath = tmpPath.Replace('/', Path.DirectorySeparatorChar);
276 }
277 return tmpPath.ToString();
278 }
279
280 private void WriteProject(SolutionNode solution, ProjectNode project)
281 {
282 string projFile = Helper.MakeFilePath(project.FullPath, "Include", "am");
283 StreamWriter ss = new StreamWriter(projFile);
284 ss.NewLine = "\n";
285
286 m_Kernel.CurrentWorkingDirectory.Push();
287 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
288
289 using(ss)
290 {
291 ss.WriteLine(Helper.AssemblyFullName(project.AssemblyName, project.Type) + ":");
292 ss.WriteLine("\tmkdir -p " + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/");
293 foreach(string file in project.Files)
294 {
295 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
296 {
297 ss.Write("\tresgen ");
298 ss.Write(Helper.NormalizePath(Path.Combine(project.Path, file.Substring(0, file.LastIndexOf('.')) + ".resx "), '/'));
299 if (project.Files.GetResourceName(file) != "")
300 {
301 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/'));
302 }
303 else
304 {
305 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/'));
306 }
307 }
308 }
309 ss.WriteLine("\t$(CSC)\t/out:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " \\");
310 ss.WriteLine("\t\t/target:" + project.Type.ToString().ToLower() + " \\");
311 if (project.References.Count > 0)
312 {
313 ss.Write("\t\t/reference:");
314 bool firstref = true;
315 foreach(ReferenceNode refr in project.References)
316 {
317 if (firstref)
318 {
319 firstref = false;
320 }
321 else
322 {
323 ss.Write(",");
324 }
325 ss.Write("{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(solution.FullPath, BuildReference(solution, refr)), '/'));
326 }
327 ss.WriteLine(" \\");
328 }
329 //ss.WriteLine("\t\tProperties/AssemblyInfo.cs \\");
330
331 foreach(string file in project.Files)
332 {
333 switch(project.Files.GetBuildAction(file))
334 {
335 case BuildAction.EmbeddedResource:
336 ss.Write("\t\t/resource:");
337 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, file), '/') + " \\");
338 break;
339 default:
340 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
341 {
342 ss.Write("\t\t/resource:");
343 if (project.Files.GetResourceName(file) != "")
344 {
345 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/') + "," + project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources" + " \\");
346 }
347 else
348 {
349 ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/') + "," + project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources" + " \\");
350 }
351 }
352 break;
353 }
354 }
355
356 foreach(ConfigurationNode conf in project.Configurations)
357 {
358 if (conf.Options.KeyFile !="")
359 {
360 ss.WriteLine("\t\t/keyfile:" + Helper.NormalizePath(Path.Combine(project.Path, conf.Options.KeyFile), '/') + " \\");
361 break;
362 }
363 }
364 foreach(ConfigurationNode conf in project.Configurations)
365 {
366 if (conf.Options.AllowUnsafe)
367 {
368 ss.WriteLine("\t\t/unsafe \\");
369 break;
370 }
371 }
372 if (project.AppIcon != "")
373 {
374 ss.WriteLine("\t\t/win32icon:" + Helper.NormalizePath(Path.Combine(project.Path, project.AppIcon), '/') + " \\");
375 }
376
377 foreach(ConfigurationNode conf in project.Configurations)
378 {
379 ss.WriteLine("\t\t/define:{0}", conf.Options.CompilerDefines.Replace(';', ',') + " \\");
380 break;
381 }
382
383 foreach(ConfigurationNode conf in project.Configurations)
384 {
385 if (GetXmlDocFile(project, conf) !="")
386 {
387 ss.WriteLine("\t\t/doc:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + project.Name + ".xml \\");
388 break;
389 }
390 }
391 foreach(string file in project.Files)
392 {
393 switch(project.Files.GetBuildAction(file))
394 {
395 case BuildAction.Compile:
396 ss.WriteLine("\t\t\\");
397 ss.Write("\t\t" + NormalizePath(Path.Combine(Helper.MakePathRelativeTo(solution.FullPath, project.Path), file)));
398 break;
399 default:
400 break;
401 }
402 }
403 ss.WriteLine();
404 ss.WriteLine();
405
406 if (project.Type == ProjectType.Library)
407 {
408 ss.WriteLine("install-data-local:");
409 ss.WriteLine(" echo \"$(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS)\"; \\");
410 ss.WriteLine(" $(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS) || exit 1;");
411 ss.WriteLine();
412 ss.WriteLine("uninstall-local:");
413 ss.WriteLine(" echo \"$(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS)\"; \\");
414 ss.WriteLine(" $(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS) || exit 1;");
415 ss.WriteLine();
416 }
417 ss.WriteLine("CLEANFILES = $(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".mdb $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".pdb " + project.AssemblyName + ".xml");
418 ss.WriteLine("EXTRA_DIST = \\");
419 ss.Write(" $(FILES)");
420 foreach(ConfigurationNode conf in project.Configurations)
421 {
422 if (conf.Options.KeyFile != "")
423 {
424 ss.Write(" \\");
425 ss.WriteLine("\t" + conf.Options.KeyFile);
426 }
427 break;
428 }
429 }
430 m_Kernel.CurrentWorkingDirectory.Pop();
431 }
432 bool hasLibrary = false;
433
434 private void WriteCombine(SolutionNode solution)
435 {
436
437 /* TODO: These vars should be pulled from the prebuild.xml file */
438 string releaseVersion = "2.0.0";
439 string assemblyVersion = "2.1.0.0";
440 string description =
441 "Tao Framework " + solution.Name + " Binding For .NET";
442
443 hasLibrary = false;
444 m_Kernel.Log.Write("Creating Autotools make files");
445 foreach(ProjectNode project in solution.Projects)
446 {
447 if(m_Kernel.AllowProject(project.FilterGroups))
448 {
449 m_Kernel.Log.Write("...Creating makefile: {0}", project.Name);
450 WriteProject(solution, project);
451 }
452 }
453
454 m_Kernel.Log.Write("");
455 string combFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "am");
456 StreamWriter ss = new StreamWriter(combFile);
457 ss.NewLine = "\n";
458
459 m_Kernel.CurrentWorkingDirectory.Push();
460 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
461
462 using(ss)
463 {
464 foreach(ProjectNode project in solution.ProjectsTableOrder)
465 {
466 if (project.Type == ProjectType.Library)
467 {
468 hasLibrary = true;
469 break;
470 }
471 }
472
473 if (hasLibrary)
474 {
475 ss.Write("pkgconfig_in_files = ");
476 foreach(ProjectNode project in solution.ProjectsTableOrder)
477 {
478 if (project.Type == ProjectType.Library)
479 {
480 string combFilepc = Helper.MakeFilePath(solution.FullPath, project.Name, "pc.in");
481 ss.Write(" " + project.Name + ".pc.in ");
482 StreamWriter sspc = new StreamWriter(combFilepc);
483 sspc.NewLine = "\n";
484 using(sspc)
485 {
486 sspc.WriteLine("prefix=@prefix@");
487 sspc.WriteLine("exec_prefix=${prefix}");
488 sspc.WriteLine("libdir=${exec_prefix}/lib");
489 sspc.WriteLine();
490 sspc.WriteLine("Name: @PACKAGE_NAME@");
491 sspc.WriteLine("Description: @DESCRIPTION@");
492 sspc.WriteLine("Version: @ASSEMBLY_VERSION@");
493 sspc.WriteLine("Libs: -r:${libdir}/mono/gac/@PACKAGE_NAME@/@ASSEMBLY_VERSION@__@PUBKEY@/@PACKAGE_NAME@.dll");
494 }
495 }
496 }
497
498 ss.WriteLine();
499 ss.WriteLine("pkgconfigdir=$(prefix)/lib/pkgconfig");
500 ss.WriteLine("pkgconfig_DATA=$(pkgconfig_in_files:.pc.in=.pc)");
501 }
502 ss.WriteLine();
503 foreach(ProjectNode project in solution.ProjectsTableOrder)
504 {
505 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
506 ss.WriteLine("-include x {0}",
507 Helper.NormalizePath(Helper.MakeFilePath(path, "Include", "am"),'/'));
508 }
509 ss.WriteLine();
510 ss.WriteLine("all: \\");
511 ss.Write("\t");
512 foreach(ProjectNode project in solution.ProjectsTableOrder)
513 {
514 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
515 ss.Write(Helper.AssemblyFullName(project.AssemblyName, project.Type) + " ");
516
517 }
518 ss.WriteLine();
519 if (hasLibrary)
520 {
521 ss.WriteLine("EXTRA_DIST = \\");
522 ss.WriteLine("\t$(pkgconfig_in_files)");
523 }
524 else
525 {
526 ss.WriteLine("EXTRA_DIST = ");
527 }
528 ss.WriteLine();
529 ss.WriteLine("DISTCLEANFILES = \\");
530 ss.WriteLine("\tconfigure \\");
531 ss.WriteLine("\tMakefile.in \\");
532 ss.WriteLine("\taclocal.m4");
533 }
534 combFile = Helper.MakeFilePath(solution.FullPath, "configure", "ac");
535 StreamWriter ts = new StreamWriter(combFile);
536 ts.NewLine = "\n";
537 using(ts)
538 {
539 if (this.hasLibrary)
540 {
541 foreach(ProjectNode project in solution.ProjectsTableOrder)
542 {
543 if (project.Type == ProjectType.Library)
544 {
545 ts.WriteLine("AC_INIT(" + project.Name + ".pc.in)");
546 break;
547 }
548 }
549 }
550 else
551 {
552 ts.WriteLine("AC_INIT(Makefile.am)");
553 }
554 ts.WriteLine("AC_PREREQ(2.53)");
555 ts.WriteLine("AC_CANONICAL_SYSTEM");
556
557 ts.WriteLine("PACKAGE_NAME={0}", solution.Name);
558 ts.WriteLine("PACKAGE_VERSION={0}", releaseVersion);
559 ts.WriteLine("DESCRIPTION=\"{0}\"", description);
560 ts.WriteLine("AC_SUBST(DESCRIPTION)");
561 ts.WriteLine("AM_INIT_AUTOMAKE([$PACKAGE_NAME],[$PACKAGE_VERSION],[$DESCRIPTION])");
562
563 ts.WriteLine("ASSEMBLY_VERSION={0}", assemblyVersion);
564 ts.WriteLine("AC_SUBST(ASSEMBLY_VERSION)");
565
566 ts.WriteLine("PUBKEY=`sn -t $PACKAGE_NAME.snk | grep 'Public Key Token' | awk -F: '{print $2}' | sed -e 's/^ //'`");
567 ts.WriteLine("AC_SUBST(PUBKEY)");
568
569 ts.WriteLine();
570 ts.WriteLine("AM_MAINTAINER_MODE");
571 ts.WriteLine();
572 ts.WriteLine("dnl AC_PROG_INTLTOOL([0.25])");
573 ts.WriteLine();
574 ts.WriteLine("AC_PROG_INSTALL");
575 ts.WriteLine();
576 ts.WriteLine("MONO_REQUIRED_VERSION=1.1");
577 ts.WriteLine();
578 ts.WriteLine("AC_MSG_CHECKING([whether we're compiling from CVS])");
579 ts.WriteLine("if test -f \"$srcdir/.cvs_version\" ; then");
580 ts.WriteLine(" from_cvs=yes");
581 ts.WriteLine("else");
582 ts.WriteLine(" if test -f \"$srcdir/.svn\" ; then");
583 ts.WriteLine(" from_cvs=yes");
584 ts.WriteLine(" else");
585 ts.WriteLine(" from_cvs=no");
586 ts.WriteLine(" fi");
587 ts.WriteLine("fi");
588 ts.WriteLine();
589 ts.WriteLine("AC_MSG_RESULT($from_cvs)");
590 ts.WriteLine();
591 ts.WriteLine("AC_PATH_PROG(MONO, mono)");
592 ts.WriteLine("AC_PATH_PROG(GMCS, gmcs)");
593 ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil)");
594 ts.WriteLine();
595 ts.WriteLine("AC_MSG_CHECKING([for mono])");
596 ts.WriteLine("dnl if test \"x$MONO\" = \"x\" ; then");
597 ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"mono\" in your PATH])");
598 ts.WriteLine("dnl else");
599 ts.WriteLine(" AC_MSG_RESULT([found])");
600 ts.WriteLine("dnl fi");
601 ts.WriteLine();
602 ts.WriteLine("AC_MSG_CHECKING([for gmcs])");
603 ts.WriteLine("dnl if test \"x$GMCS\" = \"x\" ; then");
604 ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"gmcs\" in your PATH])");
605 ts.WriteLine("dnl else");
606 ts.WriteLine(" AC_MSG_RESULT([found])");
607 ts.WriteLine("dnl fi");
608 ts.WriteLine();
609 //ts.WriteLine("AC_MSG_CHECKING([for gacutil])");
610 //ts.WriteLine("if test \"x$GACUTIL\" = \"x\" ; then");
611 //ts.WriteLine(" AC_MSG_ERROR([Can't find \"gacutil\" in your PATH])");
612 //ts.WriteLine("else");
613 //ts.WriteLine(" AC_MSG_RESULT([found])");
614 //ts.WriteLine("fi");
615 ts.WriteLine();
616 ts.WriteLine("AC_SUBST(PATH)");
617 ts.WriteLine("AC_SUBST(LD_LIBRARY_PATH)");
618 ts.WriteLine();
619 ts.WriteLine("dnl CSFLAGS=\"-debug -nowarn:1574\"");
620 ts.WriteLine("CSFLAGS=\"\"");
621 ts.WriteLine("AC_SUBST(CSFLAGS)");
622 ts.WriteLine();
623 // ts.WriteLine("AC_MSG_CHECKING(--disable-sdl argument)");
624 // ts.WriteLine("AC_ARG_ENABLE(sdl,");
625 // ts.WriteLine(" [ --disable-sdl Disable Sdl interface.],");
626 // ts.WriteLine(" [disable_sdl=$disableval],");
627 // ts.WriteLine(" [disable_sdl=\"no\"])");
628 // ts.WriteLine("AC_MSG_RESULT($disable_sdl)");
629 // ts.WriteLine("if test \"$disable_sdl\" = \"yes\"; then");
630 // ts.WriteLine(" AC_DEFINE(FEAT_SDL)");
631 // ts.WriteLine("fi");
632 ts.WriteLine();
633 ts.WriteLine("dnl Find pkg-config");
634 ts.WriteLine("AC_PATH_PROG(PKGCONFIG, pkg-config, no)");
635 ts.WriteLine("if test \"x$PKG_CONFIG\" = \"xno\"; then");
636 ts.WriteLine(" AC_MSG_ERROR([You need to install pkg-config])");
637 ts.WriteLine("fi");
638 ts.WriteLine();
639 ts.WriteLine("PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)");
640 ts.WriteLine("BUILD_DIR=\"bin\"");
641 ts.WriteLine("AC_SUBST(BUILD_DIR)");
642 ts.WriteLine("CONFIG=\"Release\"");
643 ts.WriteLine("AC_SUBST(CONFIG)");
644 ts.WriteLine();
645 ts.WriteLine("if test \"x$has_mono\" = \"xtrue\"; then");
646 ts.WriteLine(" AC_PATH_PROG(RUNTIME, mono, no)");
647 ts.WriteLine(" AC_PATH_PROG(CSC, gmcs, no)");
648 ts.WriteLine(" if test `uname -s` = \"Darwin\"; then");
649 ts.WriteLine(" LIB_PREFIX=");
650 ts.WriteLine(" LIB_SUFFIX=.dylib");
651 ts.WriteLine(" else");
652 ts.WriteLine(" LIB_PREFIX=.so");
653 ts.WriteLine(" LIB_SUFFIX=");
654 ts.WriteLine(" fi");
655 ts.WriteLine("else");
656 ts.WriteLine(" AC_PATH_PROG(CSC, csc.exe, no)");
657 ts.WriteLine(" if test x$CSC = \"xno\"; then");
658 ts.WriteLine(" AC_MSG_ERROR([You need to install either mono or .Net])");
659 ts.WriteLine(" else");
660 ts.WriteLine(" RUNTIME=");
661 ts.WriteLine(" LIB_PREFIX=");
662 ts.WriteLine(" LIB_SUFFIX=.dylib");
663 ts.WriteLine(" fi");
664 ts.WriteLine("fi");
665 ts.WriteLine();
666 ts.WriteLine("AC_SUBST(LIB_PREFIX)");
667 ts.WriteLine("AC_SUBST(LIB_SUFFIX)");
668 ts.WriteLine();
669 ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_CFLAGS)");
670 ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_LIBS)");
671 ts.WriteLine();
672 ts.WriteLine("dnl Find monodoc");
673 ts.WriteLine("MONODOC_REQUIRED_VERSION=1.0");
674 ts.WriteLine("AC_SUBST(MONODOC_REQUIRED_VERSION)");
675 ts.WriteLine("PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no)");
676 ts.WriteLine();
677 ts.WriteLine("if test \"x$enable_monodoc\" = \"xyes\"; then");
678 ts.WriteLine(" AC_PATH_PROG(MONODOC, monodoc, no)");
679 ts.WriteLine(" if test x$MONODOC = xno; then");
680 ts.WriteLine(" enable_monodoc=no");
681 ts.WriteLine(" fi");
682 ts.WriteLine("else");
683 ts.WriteLine(" MONODOC=");
684 ts.WriteLine("fi");
685 ts.WriteLine();
686 ts.WriteLine("AC_SUBST(MONODOC)");
687 ts.WriteLine("AM_CONDITIONAL(ENABLE_MONODOC, test \"x$enable_monodoc\" = \"xyes\")");
688 ts.WriteLine();
689 ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil, no)");
690 ts.WriteLine("if test \"x$GACUTIL\" = \"xno\" ; then");
691 ts.WriteLine(" AC_MSG_ERROR([No gacutil tool found])");
692 ts.WriteLine("fi");
693 ts.WriteLine();
694 // foreach(ProjectNode project in solution.ProjectsTableOrder)
695 // {
696 // if (project.Type == ProjectType.Library)
697 // {
698 // }
699 // }
700 ts.WriteLine("GACUTIL_FLAGS='/package $(PACKAGE_NAME) /gacdir $(DESTDIR)$(prefix)'");
701 ts.WriteLine("AC_SUBST(GACUTIL_FLAGS)");
702 ts.WriteLine();
703 ts.WriteLine("winbuild=no");
704 ts.WriteLine("case \"$host\" in");
705 ts.WriteLine(" *-*-mingw*|*-*-cygwin*)");
706 ts.WriteLine(" winbuild=yes");
707 ts.WriteLine(" ;;");
708 ts.WriteLine("esac");
709 ts.WriteLine("AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes)");
710 ts.WriteLine();
711 // ts.WriteLine("dnl Check for SDL");
712 // ts.WriteLine();
713 // ts.WriteLine("AC_PATH_PROG([SDL_CONFIG], [sdl-config])");
714 // ts.WriteLine("have_sdl=no");
715 // ts.WriteLine("if test -n \"${SDL_CONFIG}\"; then");
716 // ts.WriteLine(" have_sdl=yes");
717 // ts.WriteLine(" SDL_CFLAGS=`$SDL_CONFIG --cflags`");
718 // ts.WriteLine(" SDL_LIBS=`$SDL_CONFIG --libs`");
719 // ts.WriteLine(" #");
720 // ts.WriteLine(" # sdl-config sometimes emits an rpath flag pointing at its library");
721 // ts.WriteLine(" # installation directory. We don't want this, as it prevents users from");
722 // ts.WriteLine(" # linking sdl-viewer against, for example, a locally compiled libGL when a");
723 // ts.WriteLine(" # version of the library also exists in SDL's library installation");
724 // ts.WriteLine(" # directory, typically /usr/lib.");
725 // ts.WriteLine(" #");
726 // ts.WriteLine(" SDL_LIBS=`echo $SDL_LIBS | sed 's/-Wl,-rpath,[[^ ]]* //'`");
727 // ts.WriteLine("fi");
728 // ts.WriteLine("AC_SUBST([SDL_CFLAGS])");
729 // ts.WriteLine("AC_SUBST([SDL_LIBS])");
730 ts.WriteLine();
731 ts.WriteLine("AC_OUTPUT([");
732 ts.WriteLine("Makefile");
733 // TODO: this does not work quite right.
734 //ts.WriteLine("Properties/AssemblyInfo.cs");
735 foreach(ProjectNode project in solution.ProjectsTableOrder)
736 {
737 if (project.Type == ProjectType.Library)
738 {
739 ts.WriteLine(project.Name + ".pc");
740 }
741 // string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
742 // ts.WriteLine(Helper.NormalizePath(Helper.MakeFilePath(path, "Include"),'/'));
743 }
744 ts.WriteLine("])");
745 ts.WriteLine();
746 ts.WriteLine("#po/Makefile.in");
747 ts.WriteLine();
748 ts.WriteLine("echo \"---\"");
749 ts.WriteLine("echo \"Configuration summary\"");
750 ts.WriteLine("echo \"\"");
751 ts.WriteLine("echo \" * Installation prefix: $prefix\"");
752 ts.WriteLine("echo \" * compiler: $CSC\"");
753 ts.WriteLine("echo \" * Documentation: $enable_monodoc ($MONODOC)\"");
754 ts.WriteLine("echo \" * Package Name: $PACKAGE_NAME\"");
755 ts.WriteLine("echo \" * Version: $PACKAGE_VERSION\"");
756 ts.WriteLine("echo \" * Public Key: $PUBKEY\"");
757 ts.WriteLine("echo \"\"");
758 ts.WriteLine("echo \"---\"");
759 ts.WriteLine();
760 }
761
762 ts.NewLine = "\n";
763 foreach (ProjectNode project in solution.ProjectsTableOrder)
764 {
765 if (project.GenerateAssemblyInfoFile)
766 {
767 GenerateAssemblyInfoFile(solution, combFile);
768 }
769 }
770 }
771
772 private static void GenerateAssemblyInfoFile(SolutionNode solution, string combFile)
773 {
774 System.IO.Directory.CreateDirectory(Helper.MakePathRelativeTo(solution.FullPath, "Properties"));
775 combFile = Helper.MakeFilePath(solution.FullPath + "/Properties/", "AssemblyInfo.cs", "in");
776 StreamWriter ai = new StreamWriter(combFile);
777
778 using (ai)
779 {
780 ai.WriteLine("#region License");
781 ai.WriteLine("/*");
782 ai.WriteLine("MIT License");
783 ai.WriteLine("Copyright (c)2003-2006 Tao Framework Team");
784 ai.WriteLine("http://www.taoframework.com");
785 ai.WriteLine("All rights reserved.");
786 ai.WriteLine("");
787 ai.WriteLine("Permission is hereby granted, free of charge, to any person obtaining a copy");
788 ai.WriteLine("of this software and associated documentation files (the \"Software\"), to deal");
789 ai.WriteLine("in the Software without restriction, including without limitation the rights");
790 ai.WriteLine("to use, copy, modify, merge, publish, distribute, sublicense, and/or sell");
791 ai.WriteLine("copies of the Software, and to permit persons to whom the Software is");
792 ai.WriteLine("furnished to do so, subject to the following conditions:");
793 ai.WriteLine("");
794 ai.WriteLine("The above copyright notice and this permission notice shall be included in all");
795 ai.WriteLine("copies or substantial portions of the Software.");
796 ai.WriteLine("");
797 ai.WriteLine("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR");
798 ai.WriteLine("IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,");
799 ai.WriteLine("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE");
800 ai.WriteLine("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER");
801 ai.WriteLine("LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,");
802 ai.WriteLine("OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE");
803 ai.WriteLine("SOFTWARE.");
804 ai.WriteLine("*/");
805 ai.WriteLine("#endregion License");
806 ai.WriteLine("");
807 ai.WriteLine("using System;");
808 ai.WriteLine("using System.Reflection;");
809 ai.WriteLine("using System.Runtime.InteropServices;");
810 ai.WriteLine("using System.Security;");
811 ai.WriteLine("using System.Security.Permissions;");
812 ai.WriteLine("");
813 ai.WriteLine("[assembly: AllowPartiallyTrustedCallers]");
814 ai.WriteLine("[assembly: AssemblyCompany(\"Tao Framework -- http://www.taoframework.com\")]");
815 ai.WriteLine("[assembly: AssemblyConfiguration(\"Retail\")]");
816 ai.WriteLine("[assembly: AssemblyCopyright(\"Copyright (c)2003-2006 Tao Framework Team. All rights reserved.\")]");
817 ai.WriteLine("[assembly: AssemblyCulture(\"\")]");
818 ai.WriteLine("[assembly: AssemblyDefaultAlias(\"@PACKAGE_NAME@\")]");
819 ai.WriteLine("[assembly: AssemblyDelaySign(false)]");
820 ai.WriteLine("[assembly: AssemblyDescription(\"@DESCRIPTION@\")]");
821 ai.WriteLine("[assembly: AssemblyFileVersion(\"@ASSEMBLY_VERSION@\")]");
822 ai.WriteLine("[assembly: AssemblyInformationalVersion(\"@ASSEMBLY_VERSION@\")]");
823 ai.WriteLine("[assembly: AssemblyKeyName(\"\")]");
824 ai.WriteLine("[assembly: AssemblyProduct(\"@PACKAGE_NAME@.dll\")]");
825 ai.WriteLine("[assembly: AssemblyTitle(\"@DESCRIPTION@\")]");
826 ai.WriteLine("[assembly: AssemblyTrademark(\"Tao Framework -- http://www.taoframework.com\")]");
827 ai.WriteLine("[assembly: AssemblyVersion(\"@ASSEMBLY_VERSION@\")]");
828 ai.WriteLine("[assembly: CLSCompliant(true)]");
829 ai.WriteLine("[assembly: ComVisible(false)]");
830 ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]");
831 ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]");
832 ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]");
833
834 }
835 //return combFile;
836 }
837
838 private void CleanProject(ProjectNode project)
839 {
840 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
841 string projectFile = Helper.MakeFilePath(project.FullPath, "Include", "am");
842 Helper.DeleteIfExists(projectFile);
843 }
844
845 private void CleanSolution(SolutionNode solution)
846 {
847 m_Kernel.Log.Write("Cleaning Autotools make files for", solution.Name);
848
849 string slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "am");
850 Helper.DeleteIfExists(slnFile);
851
852 slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "in");
853 Helper.DeleteIfExists(slnFile);
854
855 slnFile = Helper.MakeFilePath(solution.FullPath, "configure", "ac");
856 Helper.DeleteIfExists(slnFile);
857
858 slnFile = Helper.MakeFilePath(solution.FullPath, "configure");
859 Helper.DeleteIfExists(slnFile);
860
861 slnFile = Helper.MakeFilePath(solution.FullPath, "Makefile");
862 Helper.DeleteIfExists(slnFile);
863
864 foreach(ProjectNode project in solution.Projects)
865 {
866 CleanProject(project);
867 }
868
869 m_Kernel.Log.Write("");
870 }
871
872 #endregion
873
874 #region ITarget Members
875
876 /// <summary>
877 /// Writes the specified kern.
878 /// </summary>
879 /// <param name="kern">The kern.</param>
880 public void Write(Kernel kern)
881 {
882 if( kern == null )
883 {
884 throw new ArgumentNullException("kern");
885 }
886 m_Kernel = kern;
887 foreach(SolutionNode solution in kern.Solutions)
888 {
889 WriteCombine(solution);
890 }
891 m_Kernel = null;
892 }
893
894 /// <summary>
895 /// Cleans the specified kern.
896 /// </summary>
897 /// <param name="kern">The kern.</param>
898 public virtual void Clean(Kernel kern)
899 {
900 if( kern == null )
901 {
902 throw new ArgumentNullException("kern");
903 }
904 m_Kernel = kern;
905 foreach(SolutionNode sol in kern.Solutions)
906 {
907 CleanSolution(sol);
908 }
909 m_Kernel = null;
910 }
911
912 /// <summary>
913 /// Gets the name.
914 /// </summary>
915 /// <value>The name.</value>
916 public string Name
917 {
918 get
919 {
920 return "autotools";
921 }
922 }
923
924 #endregion
925 }
926}
diff --git a/Prebuild/src/Core/Targets/DebugTarget.cs b/Prebuild/src/Core/Targets/DebugTarget.cs
deleted file mode 100644
index 6baa623..0000000
--- a/Prebuild/src/Core/Targets/DebugTarget.cs
+++ /dev/null
@@ -1,102 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $
31 * $Revision: 164 $
32 */
33#endregion
34
35using System;
36
37using Prebuild.Core.Attributes;
38using Prebuild.Core.Interfaces;
39using Prebuild.Core.Nodes;
40
41#if (DEBUG && _DEBUG_TARGET)
42namespace Prebuild.Core.Targets
43{
44 [Target("debug")]
45 public class DebugTarget : ITarget
46 {
47#region Fields
48
49 private Kernel m_Kernel = null;
50
51#endregion
52
53#region ITarget Members
54
55 public void Write()
56 {
57 foreach(SolutionNode s in m_Kernel.Solutions)
58 {
59 Console.WriteLine("Solution [ {0}, {1} ]", s.Name, s.Path);
60 foreach(string file in s.Files)
61{
62 Console.WriteLine("\tFile [ {0} ]", file);
63}
64
65 foreach(ProjectNode proj in s.Projects)
66 {
67 Console.WriteLine("\tProject [ {0}, {1}. {2} ]", proj.Name, proj.Path, proj.Language);
68 foreach(string file in proj.Files)
69 Console.WriteLine("\t\tFile [ {0} ]", file);
70 }
71 }
72 }
73
74 public void Clean()
75 {
76 Console.WriteLine("Not implemented");
77 }
78
79 public string Name
80 {
81 get
82 {
83 return "debug";
84 }
85 }
86
87 public Kernel Kernel
88 {
89 get
90 {
91 return m_Kernel;
92 }
93 set
94 {
95 m_Kernel = value;
96 }
97 }
98
99#endregion
100 }
101}
102#endif
diff --git a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs b/Prebuild/src/Core/Targets/MonoDevelopTarget.cs
deleted file mode 100644
index 8620e4b..0000000
--- a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs
+++ /dev/null
@@ -1,458 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2007-02-13 22:07:07 +0100 (ti, 13 feb 2007) $
31 * $Revision: 206 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Collections.Specialized;
38using System.IO;
39using System.Reflection;
40using System.Text.RegularExpressions;
41
42using Prebuild.Core.Attributes;
43using Prebuild.Core.Interfaces;
44using Prebuild.Core.Nodes;
45using Prebuild.Core.Utilities;
46
47namespace Prebuild.Core.Targets
48{
49 /// <summary>
50 ///
51 /// </summary>
52 [Target("monodev")]
53 public class MonoDevelopTarget : ITarget
54 {
55 #region Fields
56
57 private Kernel m_Kernel;
58
59 #endregion
60
61 #region Private Methods
62
63 private static string PrependPath(string path)
64 {
65 string tmpPath = Helper.NormalizePath(path, '/');
66 Regex regex = new Regex(@"(\w):/(\w+)");
67 Match match = regex.Match(tmpPath);
68 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
69 {
70 tmpPath = Helper.NormalizePath(tmpPath);
71 }
72 else
73 {
74 tmpPath = Helper.NormalizePath("./" + tmpPath);
75 }
76
77 return tmpPath;
78 }
79
80 private static string BuildReference(SolutionNode solution, ReferenceNode refr)
81 {
82 string ret = "<ProjectReference type=\"";
83 if(solution.ProjectsTable.ContainsKey(refr.Name))
84 {
85 ret += "Project\"";
86 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\" refto=\"" + refr.Name + "\" />";
87 }
88 else
89 {
90 ProjectNode project = (ProjectNode)refr.Parent;
91 string fileRef = FindFileReference(refr.Name, project);
92
93 if(refr.Path != null || fileRef != null)
94 {
95 ret += "Assembly\" refto=\"";
96
97 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef;
98
99 ret += finalPath;
100 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
101 return ret;
102 }
103
104 ret += "Gac\"";
105 ret += " localcopy=\"" + refr.LocalCopy.ToString() + "\"";
106 ret += " refto=\"";
107 try
108 {
109 //Assembly assem = Assembly.Load(refr.Name);
110 //ret += assem.FullName;
111 ret += refr.Name;
112 }
113 catch (System.NullReferenceException e)
114 {
115 e.ToString();
116 ret += refr.Name;
117 }
118 ret += "\" />";
119 }
120
121 return ret;
122 }
123
124 private static string FindFileReference(string refName, ProjectNode project)
125 {
126 foreach(ReferencePathNode refPath in project.ReferencePaths)
127 {
128 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
129
130 if(File.Exists(fullPath))
131 {
132 return fullPath;
133 }
134 }
135
136 return null;
137 }
138
139 /// <summary>
140 /// Gets the XML doc file.
141 /// </summary>
142 /// <param name="project">The project.</param>
143 /// <param name="conf">The conf.</param>
144 /// <returns></returns>
145 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf)
146 {
147 if( conf == null )
148 {
149 throw new ArgumentNullException("conf");
150 }
151 if( project == null )
152 {
153 throw new ArgumentNullException("project");
154 }
155 string docFile = (string)conf.Options["XmlDocFile"];
156 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
157 {
158 return "False";
159 }
160 return "True";
161 }
162
163 private void WriteProject(SolutionNode solution, ProjectNode project)
164 {
165 string csComp = "Mcs";
166 string netRuntime = "Mono";
167 if(project.Runtime == ClrRuntime.Microsoft)
168 {
169 csComp = "Csc";
170 netRuntime = "MsNet";
171 }
172
173 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp");
174 StreamWriter ss = new StreamWriter(projFile);
175
176 m_Kernel.CurrentWorkingDirectory.Push();
177 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
178
179 using(ss)
180 {
181 ss.WriteLine(
182 "<Project name=\"{0}\" description=\"\" standardNamespace=\"{1}\" newfilesearch=\"None\" enableviewstate=\"True\" fileversion=\"2.0\" language=\"C#\" clr-version=\"Net_2_0\" ctype=\"DotNetProject\">",
183 project.Name,
184 project.RootNamespace
185 );
186
187 int count = 0;
188
189 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig);
190
191 foreach(ConfigurationNode conf in project.Configurations)
192 {
193 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"DotNetProjectConfiguration\">", conf.Name);
194 ss.Write(" <Output");
195 ss.Write(" directory=\"{0}\"", Helper.EndPath(Helper.NormalizePath(".\\" + conf.Options["OutputPath"].ToString())));
196 ss.Write(" assembly=\"{0}\"", project.AssemblyName);
197 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]);
198 //ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
199 //ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
200 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
201 {
202 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
203 }
204 else
205 {
206 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
207 }
208 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
209 {
210 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
211 }
212 else
213 {
214 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
215 }
216 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
217 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
218 ss.WriteLine(" />");
219
220 ss.Write(" <Build");
221 ss.Write(" debugmode=\"True\"");
222 if (project.Type == ProjectType.WinExe)
223 {
224 ss.Write(" target=\"{0}\"", ProjectType.Exe.ToString());
225 }
226 else
227 {
228 ss.Write(" target=\"{0}\"", project.Type);
229 }
230 ss.WriteLine(" />");
231
232 ss.Write(" <Execution");
233 ss.Write(" runwithwarnings=\"True\"");
234 ss.Write(" consolepause=\"True\"");
235 ss.Write(" runtime=\"{0}\"", netRuntime);
236 ss.Write(" clr-version=\"Net_2_0\"");
237 ss.WriteLine(" />");
238
239 ss.Write(" <CodeGeneration");
240 ss.Write(" compiler=\"{0}\"", csComp);
241 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]);
242 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]);
243 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]);
244 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]);
245 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]);
246 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]);
247 ss.Write(" mainclass=\"{0}\"", project.StartupObject);
248 ss.Write(" target=\"{0}\"", project.Type);
249 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]);
250 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf));
251 ss.Write(" win32Icon=\"{0}\"", project.AppIcon);
252 ss.Write(" ctype=\"CSharpCompilerParameters\"");
253 ss.WriteLine(" />");
254 ss.WriteLine(" </Configuration>");
255
256 count++;
257 }
258 ss.WriteLine(" </Configurations>");
259
260 ss.Write(" <DeploymentInformation");
261 ss.Write(" target=\"\"");
262 ss.Write(" script=\"\"");
263 ss.Write(" strategy=\"File\"");
264 ss.WriteLine(">");
265 ss.WriteLine(" <excludeFiles />");
266 ss.WriteLine(" </DeploymentInformation>");
267
268 ss.WriteLine(" <Contents>");
269 foreach(string file in project.Files)
270 {
271 string buildAction = "Compile";
272 switch(project.Files.GetBuildAction(file))
273 {
274 case BuildAction.None:
275 buildAction = "Nothing";
276 break;
277
278 case BuildAction.Content:
279 buildAction = "Exclude";
280 break;
281
282 case BuildAction.EmbeddedResource:
283 buildAction = "EmbedAsResource";
284 break;
285
286 default:
287 buildAction = "Compile";
288 break;
289 }
290
291 // Sort of a hack, we try and resolve the path and make it relative, if we can.
292 string filePath = PrependPath(file);
293 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction);
294 }
295 ss.WriteLine(" </Contents>");
296
297 ss.WriteLine(" <References>");
298 foreach(ReferenceNode refr in project.References)
299 {
300 ss.WriteLine(" {0}", BuildReference(solution, refr));
301 }
302 ss.WriteLine(" </References>");
303
304
305 ss.WriteLine("</Project>");
306 }
307
308 m_Kernel.CurrentWorkingDirectory.Pop();
309 }
310
311 private void WriteCombine(SolutionNode solution)
312 {
313 m_Kernel.Log.Write("Creating MonoDevelop combine and project files");
314 foreach(ProjectNode project in solution.Projects)
315 {
316 if(m_Kernel.AllowProject(project.FilterGroups))
317 {
318 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
319 WriteProject(solution, project);
320 }
321 }
322
323 m_Kernel.Log.Write("");
324 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds");
325 StreamWriter ss = new StreamWriter(combFile);
326
327 m_Kernel.CurrentWorkingDirectory.Push();
328 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
329
330 int count = 0;
331
332 using(ss)
333 {
334 ss.WriteLine("<Combine name=\"{0}\" fileversion=\"2.0\" description=\"\">", solution.Name);
335
336 count = 0;
337 foreach(ConfigurationNode conf in solution.Configurations)
338 {
339 if(count == 0)
340 {
341 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name);
342 }
343
344 ss.WriteLine(" <Configuration name=\"{0}\" ctype=\"CombineConfiguration\">", conf.Name);
345 foreach(ProjectNode project in solution.Projects)
346 {
347 ss.WriteLine(" <Entry configuration=\"{1}\" build=\"True\" name=\"{0}\" />", project.Name, conf.Name);
348 }
349 ss.WriteLine(" </Configuration>");
350
351 count++;
352 }
353 ss.WriteLine(" </Configurations>");
354
355 count = 0;
356
357 foreach(ProjectNode project in solution.Projects)
358 {
359 if(count == 0)
360 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name);
361
362 ss.WriteLine(" <Execute type=\"None\" entry=\"{0}\" />", project.Name);
363 count++;
364 }
365 ss.WriteLine(" </StartMode>");
366
367 ss.WriteLine(" <Entries>");
368 foreach(ProjectNode project in solution.Projects)
369 {
370 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
371 ss.WriteLine(" <Entry filename=\"{0}\" />",
372 Helper.MakeFilePath(path, project.Name, "mdp"));
373 }
374 ss.WriteLine(" </Entries>");
375
376 ss.WriteLine("</Combine>");
377 }
378
379 m_Kernel.CurrentWorkingDirectory.Pop();
380 }
381
382 private void CleanProject(ProjectNode project)
383 {
384 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
385 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "mdp");
386 Helper.DeleteIfExists(projectFile);
387 }
388
389 private void CleanSolution(SolutionNode solution)
390 {
391 m_Kernel.Log.Write("Cleaning MonoDevelop combine and project files for", solution.Name);
392
393 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "mds");
394 Helper.DeleteIfExists(slnFile);
395
396 foreach(ProjectNode project in solution.Projects)
397 {
398 CleanProject(project);
399 }
400
401 m_Kernel.Log.Write("");
402 }
403
404 #endregion
405
406 #region ITarget Members
407
408 /// <summary>
409 /// Writes the specified kern.
410 /// </summary>
411 /// <param name="kern">The kern.</param>
412 public void Write(Kernel kern)
413 {
414 if( kern == null )
415 {
416 throw new ArgumentNullException("kern");
417 }
418 m_Kernel = kern;
419 foreach(SolutionNode solution in kern.Solutions)
420 {
421 WriteCombine(solution);
422 }
423 m_Kernel = null;
424 }
425
426 /// <summary>
427 /// Cleans the specified kern.
428 /// </summary>
429 /// <param name="kern">The kern.</param>
430 public virtual void Clean(Kernel kern)
431 {
432 if( kern == null )
433 {
434 throw new ArgumentNullException("kern");
435 }
436 m_Kernel = kern;
437 foreach(SolutionNode sol in kern.Solutions)
438 {
439 CleanSolution(sol);
440 }
441 m_Kernel = null;
442 }
443
444 /// <summary>
445 /// Gets the name.
446 /// </summary>
447 /// <value>The name.</value>
448 public string Name
449 {
450 get
451 {
452 return "sharpdev";
453 }
454 }
455
456 #endregion
457 }
458}
diff --git a/Prebuild/src/Core/Targets/NAntTarget.cs b/Prebuild/src/Core/Targets/NAntTarget.cs
deleted file mode 100644
index 0f0deb2..0000000
--- a/Prebuild/src/Core/Targets/NAntTarget.cs
+++ /dev/null
@@ -1,621 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $
31 * $Revision: 205 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Collections.Specialized;
38using System.IO;
39using System.Reflection;
40using System.Text.RegularExpressions;
41
42using Prebuild.Core.Attributes;
43using Prebuild.Core.Interfaces;
44using Prebuild.Core.Nodes;
45using Prebuild.Core.Utilities;
46
47namespace Prebuild.Core.Targets
48{
49 /// <summary>
50 ///
51 /// </summary>
52 [Target("nant")]
53 public class NAntTarget : ITarget
54 {
55 #region Fields
56
57 private Kernel m_Kernel;
58
59 #endregion
60
61 #region Private Methods
62
63 private static string PrependPath(string path)
64 {
65 string tmpPath = Helper.NormalizePath(path, '/');
66 Regex regex = new Regex(@"(\w):/(\w+)");
67 Match match = regex.Match(tmpPath);
68 //if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
69 //{
70 tmpPath = Helper.NormalizePath(tmpPath);
71 //}
72// else
73// {
74// tmpPath = Helper.NormalizePath("./" + tmpPath);
75// }
76
77 return tmpPath;
78 }
79
80 private static string BuildReference(SolutionNode solution, ProjectNode currentProject, ReferenceNode refr)
81 {
82 string ret = "";
83 if(solution.ProjectsTable.ContainsKey(refr.Name))
84 {
85 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
86
87 string finalPath = Helper.NormalizePath(((ReferencePathNode)currentProject.ReferencePaths[0]).Path + refr.Name + ".dll", '/');
88
89 return finalPath;
90 }
91 else
92 {
93 ProjectNode project = (ProjectNode)refr.Parent;
94 string fileRef = FindFileReference(refr.Name, project);
95
96 if(refr.Path != null || fileRef != null)
97 {
98 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path + "/" + refr.Name + ".dll", '/') : fileRef;
99 ret += finalPath;
100 return ret;
101 }
102
103 try
104 {
105 //Assembly assem = Assembly.Load(refr.Name);
106 //if (assem != null)
107 //{
108 //ret += (refr.Name + ".dll");
109 //}
110 //else
111 //{
112 ret += (refr.Name + ".dll");
113 //}
114 }
115 catch (System.NullReferenceException e)
116 {
117 e.ToString();
118 ret += refr.Name + ".dll";
119 }
120 }
121 return ret;
122 }
123
124 private static string BuildReferencePath(SolutionNode solution, ReferenceNode refr)
125 {
126 string ret = "";
127 if(solution.ProjectsTable.ContainsKey(refr.Name))
128 {
129 ProjectNode project = (ProjectNode)solution.ProjectsTable[refr.Name];
130 string finalPath = Helper.NormalizePath(((ReferencePathNode)project.ReferencePaths[0]).Path, '/');
131
132 return finalPath;
133 }
134 else
135 {
136 ProjectNode project = (ProjectNode)refr.Parent;
137 string fileRef = FindFileReference(refr.Name, project);
138
139 if(refr.Path != null || fileRef != null)
140 {
141 string finalPath = (refr.Path != null) ? Helper.NormalizePath(refr.Path, '/') : fileRef;
142 ret += finalPath;
143 return ret;
144 }
145
146 try
147 {
148 Assembly assem = Assembly.Load(refr.Name);
149 if (assem != null)
150 {
151 ret += "";
152 }
153 else
154 {
155 ret += "";
156 }
157 }
158 catch (System.NullReferenceException e)
159 {
160 e.ToString();
161 ret += "";
162 }
163 }
164 return ret;
165 }
166
167 private static string FindFileReference(string refName, ProjectNode project)
168 {
169 foreach(ReferencePathNode refPath in project.ReferencePaths)
170 {
171 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
172
173 if(File.Exists(fullPath))
174 {
175 return fullPath;
176 }
177 }
178
179 return null;
180 }
181
182 /// <summary>
183 /// Gets the XML doc file.
184 /// </summary>
185 /// <param name="project">The project.</param>
186 /// <param name="conf">The conf.</param>
187 /// <returns></returns>
188 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
189 {
190 if( conf == null )
191 {
192 throw new ArgumentNullException("conf");
193 }
194 if( project == null )
195 {
196 throw new ArgumentNullException("project");
197 }
198 string docFile = (string)conf.Options["XmlDocFile"];
199 // if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
200 // {
201 // return Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
202 // }
203 return docFile;
204 }
205
206 private void WriteProject(SolutionNode solution, ProjectNode project)
207 {
208 string projFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build");
209 StreamWriter ss = new StreamWriter(projFile);
210
211 m_Kernel.CurrentWorkingDirectory.Push();
212 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
213 bool hasDoc = false;
214
215 using(ss)
216 {
217 ss.WriteLine("<?xml version=\"1.0\" ?>");
218 ss.WriteLine("<project name=\"{0}\" default=\"build\">", project.Name);
219 ss.WriteLine(" <target name=\"{0}\">", "build");
220 ss.WriteLine(" <echo message=\"Build Directory is ${project::get-base-directory()}/${build.dir}\" />");
221 ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/${build.dir}\" />");
222 ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/${build.dir}\">");
223 ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">");
224 foreach(ReferenceNode refr in project.References)
225 {
226 if (refr.LocalCopy)
227 {
228 ss.WriteLine(" <include name=\"{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr))+"\" />", '/'));
229 }
230 }
231 ss.WriteLine(" </fileset>");
232 ss.WriteLine(" </copy>");
233 ss.Write(" <csc");
234 ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower());
235 ss.Write(" debug=\"{0}\"", "${build.debug}");
236 foreach(ConfigurationNode conf in project.Configurations)
237 {
238 if (conf.Options.KeyFile !="")
239 {
240 ss.Write(" keyfile=\"{0}\"", conf.Options.KeyFile);
241 break;
242 }
243 }
244 foreach(ConfigurationNode conf in project.Configurations)
245 {
246 ss.Write(" unsafe=\"{0}\"", conf.Options.AllowUnsafe);
247 break;
248 }
249 foreach(ConfigurationNode conf in project.Configurations)
250 {
251 ss.Write(" define=\"{0}\"", conf.Options.CompilerDefines);
252 break;
253 }
254 foreach(ConfigurationNode conf in project.Configurations)
255 {
256 if (GetXmlDocFile(project, conf) !="")
257 {
258 ss.Write(" doc=\"{0}\"", "${project::get-base-directory()}/${build.dir}/" + GetXmlDocFile(project, conf));
259 hasDoc = true;
260 }
261 break;
262 }
263 ss.Write(" output=\"{0}", "${project::get-base-directory()}/${build.dir}/${project::get-name()}");
264 if (project.Type == ProjectType.Library)
265 {
266 ss.Write(".dll\"");
267 }
268 else
269 {
270 ss.Write(".exe\"");
271 }
272 if(project.AppIcon != null && project.AppIcon.Length != 0)
273 {
274 ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon,'/'));
275 }
276 ss.WriteLine(">");
277 ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace);
278 foreach (string file in project.Files)
279 {
280 switch (project.Files.GetBuildAction(file))
281 {
282 case BuildAction.EmbeddedResource:
283 ss.WriteLine(" {0}", "<include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
284 break;
285 default:
286 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
287 {
288 ss.WriteLine(" <include name=\"{0}\" />", file.Substring(0, file.LastIndexOf('.')) + ".resx");
289 }
290 break;
291 }
292 }
293 //if (project.Files.GetSubType(file).ToString() != "Code")
294 //{
295 // ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
296
297 ss.WriteLine(" </resources>");
298 ss.WriteLine(" <sources failonempty=\"true\">");
299 foreach(string file in project.Files)
300 {
301 switch(project.Files.GetBuildAction(file))
302 {
303 case BuildAction.Compile:
304 ss.WriteLine(" <include name=\"" + Helper.NormalizePath(PrependPath(file), '/') + "\" />");
305 break;
306 default:
307 break;
308 }
309 }
310 ss.WriteLine(" </sources>");
311 ss.WriteLine(" <references basedir=\"${project::get-base-directory()}\">");
312 ss.WriteLine(" <lib>");
313 ss.WriteLine(" <include name=\"${project::get-base-directory()}\" />");
314 ss.WriteLine(" <include name=\"${project::get-base-directory()}/${build.dir}\" />");
315 ss.WriteLine(" </lib>");
316 foreach(ReferenceNode refr in project.References)
317 {
318 string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/');
319 ss.WriteLine(" <include name=\""+ path + "\" />" );
320 }
321 ss.WriteLine(" </references>");
322
323 ss.WriteLine(" </csc>");
324
325 foreach (ConfigurationNode conf in project.Configurations)
326 {
327 if (!String.IsNullOrEmpty(conf.Options.OutputPath))
328 {
329 string targetDir = Helper.NormalizePath(conf.Options.OutputPath, '/');
330
331 ss.WriteLine(" <echo message=\"Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/" + targetDir + "\" />");
332
333 ss.WriteLine(" <mkdir dir=\"${project::get-base-directory()}/" + targetDir + "\"/>");
334
335 ss.WriteLine(" <copy todir=\"${project::get-base-directory()}/" + targetDir + "\">");
336 ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}/${build.dir}/\" >");
337 ss.WriteLine(" <include name=\"*.dll\"/>");
338 ss.WriteLine(" <include name=\"*.exe\"/>");
339 ss.WriteLine(" </fileset>");
340 ss.WriteLine(" </copy>");
341 break;
342 }
343 }
344
345 ss.WriteLine(" </target>");
346
347 ss.WriteLine(" <target name=\"clean\">");
348 ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
349 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
350 ss.WriteLine(" </target>");
351
352 ss.WriteLine(" <target name=\"doc\" description=\"Creates documentation.\">");
353 if (hasDoc)
354 {
355 ss.WriteLine(" <property name=\"doc.target\" value=\"\" />");
356 ss.WriteLine(" <if test=\"${platform::is-unix()}\">");
357 ss.WriteLine(" <property name=\"doc.target\" value=\"Web\" />");
358 ss.WriteLine(" </if>");
359 ss.WriteLine(" <ndoc failonerror=\"false\" verbose=\"true\">");
360 ss.WriteLine(" <assemblies basedir=\"${project::get-base-directory()}\">");
361 ss.Write(" <include name=\"${build.dir}/${project::get-name()}");
362 if (project.Type == ProjectType.Library)
363 {
364 ss.WriteLine(".dll\" />");
365 }
366 else
367 {
368 ss.WriteLine(".exe\" />");
369 }
370
371 ss.WriteLine(" </assemblies>");
372 ss.WriteLine(" <summaries basedir=\"${project::get-base-directory()}\">");
373 ss.WriteLine(" <include name=\"${build.dir}/${project::get-name()}.xml\"/>");
374 ss.WriteLine(" </summaries>");
375 ss.WriteLine(" <referencepaths basedir=\"${project::get-base-directory()}\">");
376 ss.WriteLine(" <include name=\"${build.dir}\" />");
377 // foreach(ReferenceNode refr in project.References)
378 // {
379 // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/');
380 // if (path != "")
381 // {
382 // ss.WriteLine(" <include name=\"{0}\" />", path);
383 // }
384 // }
385 ss.WriteLine(" </referencepaths>");
386 ss.WriteLine(" <documenters>");
387 ss.WriteLine(" <documenter name=\"MSDN\">");
388 ss.WriteLine(" <property name=\"OutputDirectory\" value=\"${project::get-base-directory()}/${build.dir}/doc/${project::get-name()}\" />");
389 ss.WriteLine(" <property name=\"OutputTarget\" value=\"${doc.target}\" />");
390 ss.WriteLine(" <property name=\"HtmlHelpName\" value=\"${project::get-name()}\" />");
391 ss.WriteLine(" <property name=\"IncludeFavorites\" value=\"False\" />");
392 ss.WriteLine(" <property name=\"Title\" value=\"${project::get-name()} SDK Documentation\" />");
393 ss.WriteLine(" <property name=\"SplitTOCs\" value=\"False\" />");
394 ss.WriteLine(" <property name=\"DefaulTOC\" value=\"\" />");
395 ss.WriteLine(" <property name=\"ShowVisualBasic\" value=\"True\" />");
396 ss.WriteLine(" <property name=\"AutoDocumentConstructors\" value=\"True\" />");
397 ss.WriteLine(" <property name=\"ShowMissingSummaries\" value=\"${build.debug}\" />");
398 ss.WriteLine(" <property name=\"ShowMissingRemarks\" value=\"${build.debug}\" />");
399 ss.WriteLine(" <property name=\"ShowMissingParams\" value=\"${build.debug}\" />");
400 ss.WriteLine(" <property name=\"ShowMissingReturns\" value=\"${build.debug}\" />");
401 ss.WriteLine(" <property name=\"ShowMissingValues\" value=\"${build.debug}\" />");
402 ss.WriteLine(" <property name=\"DocumentInternals\" value=\"False\" />");
403 ss.WriteLine(" <property name=\"DocumentPrivates\" value=\"False\" />");
404 ss.WriteLine(" <property name=\"DocumentProtected\" value=\"True\" />");
405 ss.WriteLine(" <property name=\"DocumentEmptyNamespaces\" value=\"${build.debug}\" />");
406 ss.WriteLine(" <property name=\"IncludeAssemblyVersion\" value=\"True\" />");
407 ss.WriteLine(" </documenter>");
408 ss.WriteLine(" </documenters>");
409 ss.WriteLine(" </ndoc>");
410 }
411 ss.WriteLine(" </target>");
412 ss.WriteLine("</project>");
413 }
414 m_Kernel.CurrentWorkingDirectory.Pop();
415 }
416
417 private void WriteCombine(SolutionNode solution)
418 {
419 m_Kernel.Log.Write("Creating NAnt build files");
420 foreach(ProjectNode project in solution.Projects)
421 {
422 if(m_Kernel.AllowProject(project.FilterGroups))
423 {
424 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
425 WriteProject(solution, project);
426 }
427 }
428
429 m_Kernel.Log.Write("");
430 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build");
431 StreamWriter ss = new StreamWriter(combFile);
432
433 m_Kernel.CurrentWorkingDirectory.Push();
434 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
435
436 using(ss)
437 {
438 ss.WriteLine("<?xml version=\"1.0\" ?>");
439 ss.WriteLine("<project name=\"{0}\" default=\"build\">", solution.Name);
440 ss.WriteLine(" <echo message=\"Using '${nant.settings.currentframework}' Framework\"/>");
441 ss.WriteLine();
442
443 //ss.WriteLine(" <property name=\"dist.dir\" value=\"dist\" />");
444 //ss.WriteLine(" <property name=\"source.dir\" value=\"source\" />");
445 ss.WriteLine(" <property name=\"bin.dir\" value=\"bin\" />");
446 ss.WriteLine(" <property name=\"obj.dir\" value=\"obj\" />");
447 ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />");
448 ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />");
449
450 foreach(ConfigurationNode conf in solution.Configurations)
451 {
452 // Set the project.config to a non-debug configuration
453 if( conf.Options["DebugInformation"].ToString().ToLower() != "true" )
454 {
455 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
456 }
457 ss.WriteLine();
458 ss.WriteLine(" <target name=\"{0}\" description=\"\">", conf.Name);
459 ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name);
460 ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower());
461 ss.WriteLine(" </target>");
462 ss.WriteLine();
463 }
464
465 ss.WriteLine(" <target name=\"net-1.1\" description=\"Sets framework to .NET 1.1\">");
466 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-1.1\" />");
467 ss.WriteLine(" </target>");
468 ss.WriteLine();
469
470 ss.WriteLine(" <target name=\"net-2.0\" description=\"Sets framework to .NET 2.0\">");
471 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"net-2.0\" />");
472 ss.WriteLine(" </target>");
473 ss.WriteLine();
474
475 ss.WriteLine(" <target name=\"mono-2.0\" description=\"Sets framework to mono 2.0\">");
476 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-2.0\" />");
477 ss.WriteLine(" </target>");
478 ss.WriteLine();
479
480 ss.WriteLine(" <target name=\"mono-1.0\" description=\"Sets framework to mono 1.0\">");
481 ss.WriteLine(" <property name=\"nant.settings.currentframework\" value=\"mono-1.0\" />");
482 ss.WriteLine(" </target>");
483 ss.WriteLine();
484
485 ss.WriteLine(" <target name=\"init\" description=\"\">");
486 ss.WriteLine(" <call target=\"${project.config}\" />");
487 ss.WriteLine(" <sysinfo />");
488 ss.WriteLine(" <echo message=\"Platform ${sys.os.platform}\" />");
489 ss.WriteLine(" <property name=\"build.dir\" value=\"${bin.dir}/${project.config}\" />");
490 ss.WriteLine(" </target>");
491 ss.WriteLine();
492
493 ss.WriteLine(" <target name=\"clean\" description=\"\">");
494 ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />");
495 //ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />");
496 ss.WriteLine(" <delete dir=\"${bin.dir}\" failonerror=\"false\" />");
497 ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
498 foreach(ProjectNode project in solution.Projects)
499 {
500 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
501 ss.Write(" <nant buildfile=\"{0}\"",
502 Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"),'/'));
503 ss.WriteLine(" target=\"clean\" />");
504 }
505 ss.WriteLine(" </target>");
506 ss.WriteLine();
507
508 ss.WriteLine(" <target name=\"build\" depends=\"init\" description=\"\">");
509
510 foreach(ProjectNode project in solution.ProjectsTableOrder)
511 {
512 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
513 ss.Write(" <nant buildfile=\"{0}\"",
514 Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"),'/'));
515 ss.WriteLine(" target=\"build\" />");
516 }
517 ss.WriteLine(" </target>");
518 ss.WriteLine();
519
520 ss.WriteLine(" <target name=\"build-release\" depends=\"Release, init, build\" description=\"Builds in Release mode\" />");
521 ss.WriteLine();
522 ss.WriteLine(" <target name=\"build-debug\" depends=\"Debug, init, build\" description=\"Builds in Debug mode\" />");
523 ss.WriteLine();
524 //ss.WriteLine(" <target name=\"package\" depends=\"clean, doc, copyfiles, zip\" description=\"Builds in Release mode\" />");
525 ss.WriteLine(" <target name=\"package\" depends=\"clean, doc\" description=\"Builds all\" />");
526 ss.WriteLine();
527
528 ss.WriteLine(" <target name=\"doc\" depends=\"build-release\">");
529 ss.WriteLine(" <echo message=\"Generating all documentation from all builds\" />");
530 foreach (ProjectNode project in solution.Projects)
531 {
532 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
533 ss.Write(" <nant buildfile=\"{0}\"",
534 Helper.NormalizePath(Helper.MakeFilePath(path, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build"), '/'));
535 ss.WriteLine(" target=\"doc\" />");
536 }
537 ss.WriteLine(" </target>");
538 ss.WriteLine();
539 ss.WriteLine("</project>");
540 }
541
542 m_Kernel.CurrentWorkingDirectory.Pop();
543 }
544
545 private void CleanProject(ProjectNode project)
546 {
547 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
548 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name + (project.Type == ProjectType.Library ? ".dll" : ".exe"), "build");
549 Helper.DeleteIfExists(projectFile);
550 }
551
552 private void CleanSolution(SolutionNode solution)
553 {
554 m_Kernel.Log.Write("Cleaning NAnt build files for", solution.Name);
555
556 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "build");
557 Helper.DeleteIfExists(slnFile);
558
559 foreach(ProjectNode project in solution.Projects)
560 {
561 CleanProject(project);
562 }
563
564 m_Kernel.Log.Write("");
565 }
566
567 #endregion
568
569 #region ITarget Members
570
571 /// <summary>
572 /// Writes the specified kern.
573 /// </summary>
574 /// <param name="kern">The kern.</param>
575 public void Write(Kernel kern)
576 {
577 if( kern == null )
578 {
579 throw new ArgumentNullException("kern");
580 }
581 m_Kernel = kern;
582 foreach(SolutionNode solution in kern.Solutions)
583 {
584 WriteCombine(solution);
585 }
586 m_Kernel = null;
587 }
588
589 /// <summary>
590 /// Cleans the specified kern.
591 /// </summary>
592 /// <param name="kern">The kern.</param>
593 public virtual void Clean(Kernel kern)
594 {
595 if( kern == null )
596 {
597 throw new ArgumentNullException("kern");
598 }
599 m_Kernel = kern;
600 foreach(SolutionNode sol in kern.Solutions)
601 {
602 CleanSolution(sol);
603 }
604 m_Kernel = null;
605 }
606
607 /// <summary>
608 /// Gets the name.
609 /// </summary>
610 /// <value>The name.</value>
611 public string Name
612 {
613 get
614 {
615 return "nant";
616 }
617 }
618
619 #endregion
620 }
621}
diff --git a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs b/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
deleted file mode 100644
index bc84b96..0000000
--- a/Prebuild/src/Core/Targets/SharpDevelop2Target.cs
+++ /dev/null
@@ -1,90 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-27 16:49:58 -0800 (Fri, 27 Jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36
37using Prebuild.Core.Attributes;
38
39namespace Prebuild.Core.Targets
40{
41 /// <summary>
42 ///
43 /// </summary>
44 [Target("sharpdev2")]
45 public class SharpDevelop2Target : VS2005Target
46 {
47 #region Private Methods
48 private void SetSharpDevelop2()
49 {
50 this.VersionName = "SharpDevelop2";
51 }
52 #endregion
53
54 #region Public Methods
55
56 /// <summary>
57 /// Writes the specified kern.
58 /// </summary>
59 /// <param name="kern">The kern.</param>
60 public override void Write(Kernel kern)
61 {
62 SetSharpDevelop2();
63 base.Write(kern);
64 }
65
66 /// <summary>
67 /// Cleans the specified kern.
68 /// </summary>
69 /// <param name="kern">The kern.</param>
70 public override void Clean(Kernel kern)
71 {
72 SetSharpDevelop2();
73 base.Clean(kern);
74 }
75
76 /// <summary>
77 /// Gets the name.
78 /// </summary>
79 /// <value>The name.</value>
80 public override string Name
81 {
82 get
83 {
84 return "sharpdev2";
85 }
86 }
87
88 #endregion
89 }
90}
diff --git a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs b/Prebuild/src/Core/Targets/SharpDevelopTarget.cs
deleted file mode 100644
index c725730..0000000
--- a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs
+++ /dev/null
@@ -1,437 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $
31 * $Revision: 205 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Collections.Specialized;
38using System.IO;
39using System.Text.RegularExpressions;
40using System.Reflection;
41
42using Prebuild.Core.Attributes;
43using Prebuild.Core.Interfaces;
44using Prebuild.Core.Nodes;
45using Prebuild.Core.Utilities;
46
47namespace Prebuild.Core.Targets
48{
49 /// <summary>
50 ///
51 /// </summary>
52 [Target("sharpdev")]
53 public class SharpDevelopTarget : ITarget
54 {
55 #region Fields
56
57 private Kernel m_Kernel;
58
59 #endregion
60
61 #region Private Methods
62
63 private static string PrependPath(string path)
64 {
65 string tmpPath = Helper.NormalizePath(path, '/');
66 Regex regex = new Regex(@"(\w):/(\w+)");
67 Match match = regex.Match(tmpPath);
68 if(match.Success || tmpPath[0] == '.' || tmpPath[0] == '/')
69 {
70 tmpPath = Helper.NormalizePath(tmpPath);
71 }
72 else
73 {
74 tmpPath = Helper.NormalizePath("./" + tmpPath);
75 }
76
77 return tmpPath;
78 }
79
80 private static string BuildReference(SolutionNode solution, ReferenceNode refr)
81 {
82 string ret = "<Reference type=\"";
83 if(solution.ProjectsTable.ContainsKey(refr.Name))
84 {
85 ret += "Project\" refto=\"" + refr.Name;
86 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
87 }
88 else
89 {
90 ProjectNode project = (ProjectNode)refr.Parent;
91 string fileRef = FindFileReference(refr.Name, project);
92
93 if(refr.Path != null || fileRef != null)
94 {
95 ret += "Assembly\" refto=\"";
96
97 string finalPath = (refr.Path != null) ? Helper.MakeFilePath(refr.Path, refr.Name, "dll") : fileRef;
98
99 ret += finalPath;
100 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
101 return ret;
102 }
103
104 ret += "Gac\" refto=\"";
105 try
106 {
107 //Assembly assem = Assembly.Load(refr.Name);
108 ret += refr.Name;// assem.FullName;
109 }
110 catch (System.NullReferenceException e)
111 {
112 e.ToString();
113 ret += refr.Name;
114 }
115 ret += "\" localcopy=\"" + refr.LocalCopy.ToString() + "\" />";
116 }
117
118 return ret;
119 }
120
121 private static string FindFileReference(string refName, ProjectNode project)
122 {
123 foreach(ReferencePathNode refPath in project.ReferencePaths)
124 {
125 string fullPath = Helper.MakeFilePath(refPath.Path, refName, "dll");
126
127 if(File.Exists(fullPath))
128 {
129 return fullPath;
130 }
131 }
132
133 return null;
134 }
135
136 /// <summary>
137 /// Gets the XML doc file.
138 /// </summary>
139 /// <param name="project">The project.</param>
140 /// <param name="conf">The conf.</param>
141 /// <returns></returns>
142 public static string GenerateXmlDocFile(ProjectNode project, ConfigurationNode conf)
143 {
144 if( conf == null )
145 {
146 throw new ArgumentNullException("conf");
147 }
148 if( project == null )
149 {
150 throw new ArgumentNullException("project");
151 }
152 string docFile = (string)conf.Options["XmlDocFile"];
153 if(docFile != null && docFile.Length == 0)//default to assembly name if not specified
154 {
155 return "False";
156 }
157 return "True";
158 }
159
160 private void WriteProject(SolutionNode solution, ProjectNode project)
161 {
162 string csComp = "Csc";
163 string netRuntime = "MsNet";
164 if(project.Runtime == ClrRuntime.Mono)
165 {
166 csComp = "Mcs";
167 netRuntime = "Mono";
168 }
169
170 string projFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx");
171 StreamWriter ss = new StreamWriter(projFile);
172
173 m_Kernel.CurrentWorkingDirectory.Push();
174 Helper.SetCurrentDir(Path.GetDirectoryName(projFile));
175
176 using(ss)
177 {
178 ss.WriteLine(
179 "<Project name=\"{0}\" standardNamespace=\"{1}\" description=\"\" newfilesearch=\"None\" enableviewstate=\"True\" version=\"1.1\" projecttype=\"C#\">",
180 project.Name,
181 project.RootNamespace
182 );
183
184 ss.WriteLine(" <Contents>");
185 foreach(string file in project.Files)
186 {
187 string buildAction = "Compile";
188 switch(project.Files.GetBuildAction(file))
189 {
190 case BuildAction.None:
191 buildAction = "Nothing";
192 break;
193
194 case BuildAction.Content:
195 buildAction = "Exclude";
196 break;
197
198 case BuildAction.EmbeddedResource:
199 buildAction = "EmbedAsResource";
200 break;
201
202 default:
203 buildAction = "Compile";
204 break;
205 }
206
207 // Sort of a hack, we try and resolve the path and make it relative, if we can.
208 string filePath = PrependPath(file);
209 ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction);
210 }
211 ss.WriteLine(" </Contents>");
212
213 ss.WriteLine(" <References>");
214 foreach(ReferenceNode refr in project.References)
215 {
216 ss.WriteLine(" {0}", BuildReference(solution, refr));
217 }
218 ss.WriteLine(" </References>");
219
220 ss.Write(" <DeploymentInformation");
221 ss.Write(" target=\"\"");
222 ss.Write(" script=\"\"");
223 ss.Write(" strategy=\"File\"");
224 ss.WriteLine(" />");
225
226 int count = 0;
227
228 ss.WriteLine(" <Configurations active=\"{0}\">", solution.ActiveConfig);
229
230 foreach(ConfigurationNode conf in project.Configurations)
231 {
232 ss.Write(" <Configuration");
233 ss.Write(" runwithwarnings=\"True\"");
234 ss.Write(" name=\"{0}\"", conf.Name);
235 ss.WriteLine(">");
236 ss.Write(" <CodeGeneration");
237 ss.Write(" runtime=\"{0}\"", netRuntime);
238 ss.Write(" compiler=\"{0}\"", csComp);
239 ss.Write(" compilerversion=\"\"");
240 ss.Write(" warninglevel=\"{0}\"", conf.Options["WarningLevel"]);
241 ss.Write(" nowarn=\"{0}\"", conf.Options["SuppressWarnings"]);
242 ss.Write(" includedebuginformation=\"{0}\"", conf.Options["DebugInformation"]);
243 ss.Write(" optimize=\"{0}\"", conf.Options["OptimizeCode"]);
244 ss.Write(" unsafecodeallowed=\"{0}\"", conf.Options["AllowUnsafe"]);
245 ss.Write(" generateoverflowchecks=\"{0}\"", conf.Options["CheckUnderflowOverflow"]);
246 ss.Write(" mainclass=\"{0}\"", project.StartupObject);
247 ss.Write(" target=\"{0}\"", project.Type);
248 ss.Write(" definesymbols=\"{0}\"", conf.Options["CompilerDefines"]);
249 ss.Write(" generatexmldocumentation=\"{0}\"", GenerateXmlDocFile(project, conf));
250 ss.Write(" win32Icon=\"{0}\"", Helper.NormalizePath(".\\" + project.AppIcon));
251 ss.Write(" noconfig=\"{0}\"", "False");
252 ss.Write(" nostdlib=\"{0}\"", conf.Options["NoStdLib"]);
253 ss.WriteLine(" />");
254
255 ss.Write(" <Execution");
256 ss.Write(" commandlineparameters=\"\"");
257 ss.Write(" consolepause=\"True\"");
258 ss.WriteLine(" />");
259
260 ss.Write(" <Output");
261 ss.Write(" directory=\".\\{0}\"", Helper.NormalizePath(conf.Options["OutputPath"].ToString()));
262 ss.Write(" assembly=\"{0}\"", project.AssemblyName);
263 ss.Write(" executeScript=\"{0}\"", conf.Options["RunScript"]);
264 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
265 {
266 ss.Write(" executeBeforeBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
267 }
268 else
269 {
270 ss.Write(" executeBeforeBuild=\"{0}\"", conf.Options["PreBuildEvent"]);
271 }
272 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
273 {
274 ss.Write(" executeAfterBuild=\"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
275 }
276 else
277 {
278 ss.Write(" executeAfterBuild=\"{0}\"", conf.Options["PostBuildEvent"]);
279 }
280 ss.Write(" executeBeforeBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
281 ss.Write(" executeAfterBuildArguments=\"{0}\"", conf.Options["PreBuildEventArgs"]);
282 ss.WriteLine(" />");
283 ss.WriteLine(" </Configuration>");
284
285 count++;
286 }
287 ss.WriteLine(" </Configurations>");
288 ss.WriteLine("</Project>");
289 }
290
291 m_Kernel.CurrentWorkingDirectory.Pop();
292 }
293
294 private void WriteCombine(SolutionNode solution)
295 {
296 m_Kernel.Log.Write("Creating SharpDevelop combine and project files");
297 foreach(ProjectNode project in solution.Projects)
298 {
299 if(m_Kernel.AllowProject(project.FilterGroups))
300 {
301 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
302 WriteProject(solution, project);
303 }
304 }
305
306 m_Kernel.Log.Write("");
307 string combFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx");
308 StreamWriter ss = new StreamWriter(combFile);
309
310 m_Kernel.CurrentWorkingDirectory.Push();
311 Helper.SetCurrentDir(Path.GetDirectoryName(combFile));
312
313 using(ss)
314 {
315 ss.WriteLine("<Combine fileversion=\"1.0\" name=\"{0}\" description=\"\">", solution.Name);
316
317 int count = 0;
318 foreach(ProjectNode project in solution.Projects)
319 {
320 if(count == 0)
321 ss.WriteLine(" <StartMode startupentry=\"{0}\" single=\"True\">", project.Name);
322
323 ss.WriteLine(" <Execute entry=\"{0}\" type=\"None\" />", project.Name);
324 count++;
325 }
326 ss.WriteLine(" </StartMode>");
327
328 ss.WriteLine(" <Entries>");
329 foreach(ProjectNode project in solution.Projects)
330 {
331 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
332 ss.WriteLine(" <Entry filename=\"{0}\" />",
333 Helper.MakeFilePath(path, project.Name, "prjx"));
334 }
335 ss.WriteLine(" </Entries>");
336
337 count = 0;
338 foreach(ConfigurationNode conf in solution.Configurations)
339 {
340 if(count == 0)
341 {
342 ss.WriteLine(" <Configurations active=\"{0}\">", conf.Name);
343 }
344
345 ss.WriteLine(" <Configuration name=\"{0}\">", conf.Name);
346 foreach(ProjectNode project in solution.Projects)
347 {
348 ss.WriteLine(" <Entry name=\"{0}\" configurationname=\"{1}\" build=\"True\" />", project.Name, conf.Name);
349 }
350 ss.WriteLine(" </Configuration>");
351
352 count++;
353 }
354 ss.WriteLine(" </Configurations>");
355 ss.WriteLine("</Combine>");
356 }
357
358 m_Kernel.CurrentWorkingDirectory.Pop();
359 }
360
361 private void CleanProject(ProjectNode project)
362 {
363 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
364 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "prjx");
365 Helper.DeleteIfExists(projectFile);
366 }
367
368 private void CleanSolution(SolutionNode solution)
369 {
370 m_Kernel.Log.Write("Cleaning SharpDevelop combine and project files for", solution.Name);
371
372 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "cmbx");
373 Helper.DeleteIfExists(slnFile);
374
375 foreach(ProjectNode project in solution.Projects)
376 {
377 CleanProject(project);
378 }
379
380 m_Kernel.Log.Write("");
381 }
382
383 #endregion
384
385 #region ITarget Members
386
387 /// <summary>
388 /// Writes the specified kern.
389 /// </summary>
390 /// <param name="kern">The kern.</param>
391 public void Write(Kernel kern)
392 {
393 if( kern == null )
394 {
395 throw new ArgumentNullException("kern");
396 }
397 m_Kernel = kern;
398 foreach(SolutionNode solution in kern.Solutions)
399 {
400 WriteCombine(solution);
401 }
402 m_Kernel = null;
403 }
404
405 /// <summary>
406 /// Cleans the specified kern.
407 /// </summary>
408 /// <param name="kern">The kern.</param>
409 public virtual void Clean(Kernel kern)
410 {
411 if( kern == null )
412 {
413 throw new ArgumentNullException("kern");
414 }
415 m_Kernel = kern;
416 foreach(SolutionNode sol in kern.Solutions)
417 {
418 CleanSolution(sol);
419 }
420 m_Kernel = null;
421 }
422
423 /// <summary>
424 /// Gets the name.
425 /// </summary>
426 /// <value>The name.</value>
427 public string Name
428 {
429 get
430 {
431 return "sharpdev";
432 }
433 }
434
435 #endregion
436 }
437}
diff --git a/Prebuild/src/Core/Targets/VS2002Target.cs b/Prebuild/src/Core/Targets/VS2002Target.cs
deleted file mode 100644
index 66216dc..0000000
--- a/Prebuild/src/Core/Targets/VS2002Target.cs
+++ /dev/null
@@ -1,96 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36
37using Prebuild.Core.Attributes;
38
39namespace Prebuild.Core.Targets
40{
41 /// <summary>
42 ///
43 /// </summary>
44 [Target("vs2002")]
45 public class VS2002Target : VS2003Target
46 {
47 #region Private Methods
48
49 private void SetVS2002()
50 {
51 this.SolutionVersion = "7.00";
52 this.ProductVersion = "7.0.9254";
53 this.SchemaVersion = "1.0";
54 this.VersionName = "2002";
55 this.Version = VSVersion.VS70;
56 }
57
58 #endregion
59
60 #region Public Methods
61
62 /// <summary>
63 /// Writes the specified kern.
64 /// </summary>
65 /// <param name="kern">The kern.</param>
66 public override void Write(Kernel kern)
67 {
68 SetVS2002();
69 base.Write(kern);
70 }
71
72 /// <summary>
73 /// Cleans the specified kern.
74 /// </summary>
75 /// <param name="kern">The kern.</param>
76 public override void Clean(Kernel kern)
77 {
78 SetVS2002();
79 base.Clean(kern);
80 }
81
82 /// <summary>
83 /// Gets the name.
84 /// </summary>
85 /// <value>The name.</value>
86 public override string Name
87 {
88 get
89 {
90 return "vs2002";
91 }
92 }
93
94 #endregion
95 }
96}
diff --git a/Prebuild/src/Core/Targets/VS2003Target.cs b/Prebuild/src/Core/Targets/VS2003Target.cs
deleted file mode 100644
index b3236a8..0000000
--- a/Prebuild/src/Core/Targets/VS2003Target.cs
+++ /dev/null
@@ -1,633 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-09-29 21:11:40 +0200 (fr, 29 sep 2006) $
31 * $Revision: 177 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Collections.Specialized;
38using System.IO;
39
40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Nodes;
43using Prebuild.Core.Utilities;
44
45namespace Prebuild.Core.Targets
46{
47 /// <summary>
48 ///
49 /// </summary>
50 public enum VSVersion
51 {
52 /// <summary>
53 ///
54 /// </summary>
55 VS70,
56 /// <summary>
57 ///
58 /// </summary>
59 VS71,
60 /// <summary>
61 ///
62 /// </summary>
63 VS80
64 }
65
66 /// <summary>
67 ///
68 /// </summary>
69 [Target("vs2003")]
70 public class VS2003Target : ITarget
71 {
72
73 #region Fields
74
75 string solutionVersion = "8.00";
76 string productVersion = "7.10.3077";
77 string schemaVersion = "2.0";
78 string versionName = "2003";
79 VSVersion version = VSVersion.VS71;
80
81 Hashtable m_Tools;
82 Kernel m_Kernel;
83
84 /// <summary>
85 /// Gets or sets the solution version.
86 /// </summary>
87 /// <value>The solution version.</value>
88 protected string SolutionVersion
89 {
90 get
91 {
92 return this.solutionVersion;
93 }
94 set
95 {
96 this.solutionVersion = value;
97 }
98 }
99 /// <summary>
100 /// Gets or sets the product version.
101 /// </summary>
102 /// <value>The product version.</value>
103 protected string ProductVersion
104 {
105 get
106 {
107 return this.productVersion;
108 }
109 set
110 {
111 this.productVersion = value;
112 }
113 }
114 /// <summary>
115 /// Gets or sets the schema version.
116 /// </summary>
117 /// <value>The schema version.</value>
118 protected string SchemaVersion
119 {
120 get
121 {
122 return this.schemaVersion;
123 }
124 set
125 {
126 this.schemaVersion = value;
127 }
128 }
129 /// <summary>
130 /// Gets or sets the name of the version.
131 /// </summary>
132 /// <value>The name of the version.</value>
133 protected string VersionName
134 {
135 get
136 {
137 return this.versionName;
138 }
139 set
140 {
141 this.versionName = value;
142 }
143 }
144 /// <summary>
145 /// Gets or sets the version.
146 /// </summary>
147 /// <value>The version.</value>
148 protected VSVersion Version
149 {
150 get
151 {
152 return this.version;
153 }
154 set
155 {
156 this.version = value;
157 }
158 }
159
160 #endregion
161
162 #region Constructors
163
164 /// <summary>
165 /// Initializes a new instance of the <see cref="VS2003Target"/> class.
166 /// </summary>
167 public VS2003Target()
168 {
169 m_Tools = new Hashtable();
170
171 m_Tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP");
172 m_Tools["VB.NET"] = new ToolInfo("VB.NET", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic");
173 }
174
175 #endregion
176
177 #region Private Methods
178
179 private string MakeRefPath(ProjectNode project)
180 {
181 string ret = "";
182 foreach(ReferencePathNode node in project.ReferencePaths)
183 {
184 try
185 {
186 string fullPath = Helper.ResolvePath(node.Path);
187 if(ret.Length < 1)
188 {
189 ret = fullPath;
190 }
191 else
192 {
193 ret += ";" + fullPath;
194 }
195 }
196 catch(ArgumentException)
197 {
198 m_Kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path);
199 }
200 }
201
202 return ret;
203 }
204
205 private void WriteProject(SolutionNode solution, ProjectNode project)
206 {
207 if(!m_Tools.ContainsKey(project.Language))
208 {
209 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
210 }
211
212 ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language];
213 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
214 StreamWriter ps = new StreamWriter(projectFile);
215
216 m_Kernel.CurrentWorkingDirectory.Push();
217 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
218
219 IEnumerator enumerator;
220 //ConfigurationNode scripts;
221
222 using(ps)
223 {
224 ps.WriteLine("<VisualStudioProject>");
225 ps.WriteLine(" <{0}", toolInfo.XmlTag);
226 ps.WriteLine("\t\t\t\tProjectType = \"Local\"");
227 ps.WriteLine("\t\t\t\tProductVersion = \"{0}\"", this.ProductVersion);
228 ps.WriteLine("\t\t\t\tSchemaVersion = \"{0}\"", this.SchemaVersion);
229 ps.WriteLine("\t\t\t\tProjectGuid = \"{{{0}}}\"", project.Guid.ToString().ToUpper());
230 ps.WriteLine("\t\t>");
231
232 ps.WriteLine("\t\t\t\t<Build>");
233 ps.WriteLine(" <Settings");
234 ps.WriteLine("\t\t\t\t ApplicationIcon = \"{0}\"",project.AppIcon);
235 ps.WriteLine("\t\t\t\t AssemblyKeyContainerName = \"\"");
236 ps.WriteLine("\t\t\t\t AssemblyName = \"{0}\"", project.AssemblyName);
237 ps.WriteLine("\t\t\t\t AssemblyOriginatorKeyFile = \"\"");
238 ps.WriteLine("\t\t\t\t DefaultClientScript = \"JScript\"");
239 ps.WriteLine("\t\t\t\t DefaultHTMLPageLayout = \"Grid\"");
240 ps.WriteLine("\t\t\t\t DefaultTargetSchema = \"IE50\"");
241 ps.WriteLine("\t\t\t\t DelaySign = \"false\"");
242
243 if(this.Version == VSVersion.VS70)
244 {
245 ps.WriteLine("\t\t\t\t NoStandardLibraries = \"false\"");
246 }
247
248 ps.WriteLine("\t\t\t\t OutputType = \"{0}\"", project.Type.ToString());
249
250 enumerator = project.Configurations.GetEnumerator();
251 enumerator.Reset();
252 enumerator.MoveNext();
253 foreach(ConfigurationNode conf in project.Configurations)
254 {
255 if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0)
256 {
257 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PreBuildEvent"].ToString()));
258 }
259 else
260 {
261 ps.WriteLine("\t\t\t\t PreBuildEvent = \"{0}\"", conf.Options["PreBuildEvent"]);
262 }
263 if (conf.Options["PostBuildEvent"] != null && conf.Options["PostBuildEvent"].ToString().Length != 0)
264 {
265 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", Helper.NormalizePath(conf.Options["PostBuildEvent"].ToString()));
266 }
267 else
268 {
269 ps.WriteLine("\t\t\t\t PostBuildEvent = \"{0}\"", conf.Options["PostBuildEvent"]);
270 }
271 if (conf.Options["RunPostBuildEvent"] == null)
272 {
273 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", "OnBuildSuccess");
274 }
275 else
276 {
277 ps.WriteLine("\t\t\t\t RunPostBuildEvent = \"{0}\"", conf.Options["RunPostBuildEvent"]);
278 }
279 break;
280 }
281
282 ps.WriteLine("\t\t\t\t RootNamespace = \"{0}\"", project.RootNamespace);
283 ps.WriteLine("\t\t\t\t StartupObject = \"{0}\"", project.StartupObject);
284 ps.WriteLine("\t\t >");
285
286 foreach(ConfigurationNode conf in project.Configurations)
287 {
288 ps.WriteLine("\t\t\t\t <Config");
289 ps.WriteLine("\t\t\t\t Name = \"{0}\"", conf.Name);
290 ps.WriteLine("\t\t\t\t AllowUnsafeBlocks = \"{0}\"", conf.Options["AllowUnsafe"].ToString().ToLower());
291 ps.WriteLine("\t\t\t\t BaseAddress = \"{0}\"", conf.Options["BaseAddress"]);
292 ps.WriteLine("\t\t\t\t CheckForOverflowUnderflow = \"{0}\"", conf.Options["CheckUnderflowOverflow"].ToString().ToLower());
293 ps.WriteLine("\t\t\t\t ConfigurationOverrideFile = \"\"");
294 ps.WriteLine("\t\t\t\t DefineConstants = \"{0}\"", conf.Options["CompilerDefines"]);
295 ps.WriteLine("\t\t\t\t DocumentationFile = \"{0}\"", GetXmlDocFile(project, conf));//default to the assembly name
296 ps.WriteLine("\t\t\t\t DebugSymbols = \"{0}\"", conf.Options["DebugInformation"].ToString().ToLower());
297 ps.WriteLine("\t\t\t\t FileAlignment = \"{0}\"", conf.Options["FileAlignment"]);
298 ps.WriteLine("\t\t\t\t IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"].ToString().ToLower());
299
300 if(this.Version == VSVersion.VS71)
301 {
302 ps.WriteLine("\t\t\t\t NoStdLib = \"{0}\"", conf.Options["NoStdLib"].ToString().ToLower());
303 ps.WriteLine("\t\t\t\t NoWarn = \"{0}\"", conf.Options["SuppressWarnings"].ToString().ToLower());
304 }
305
306 ps.WriteLine("\t\t\t\t Optimize = \"{0}\"", conf.Options["OptimizeCode"].ToString().ToLower());
307 ps.WriteLine(" OutputPath = \"{0}\"",
308 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString())));
309 ps.WriteLine(" RegisterForComInterop = \"{0}\"", conf.Options["RegisterComInterop"].ToString().ToLower());
310 ps.WriteLine(" RemoveIntegerChecks = \"{0}\"", conf.Options["RemoveIntegerChecks"].ToString().ToLower());
311 ps.WriteLine(" TreatWarningsAsErrors = \"{0}\"", conf.Options["WarningsAsErrors"].ToString().ToLower());
312 ps.WriteLine(" WarningLevel = \"{0}\"", conf.Options["WarningLevel"]);
313 ps.WriteLine(" />");
314 }
315
316 ps.WriteLine(" </Settings>");
317
318 ps.WriteLine(" <References>");
319 foreach(ReferenceNode refr in project.References)
320 {
321 ps.WriteLine(" <Reference");
322 ps.WriteLine(" Name = \"{0}\"", refr.Name);
323 ps.WriteLine(" AssemblyName = \"{0}\"", refr.Name);
324
325 if(solution.ProjectsTable.ContainsKey(refr.Name))
326 {
327 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name];
328 ps.WriteLine(" Project = \"{{{0}}}\"", refProject.Guid.ToString().ToUpper());
329 ps.WriteLine(" Package = \"{0}\"", toolInfo.Guid.ToString().ToUpper());
330 }
331 else
332 {
333 if(refr.Path != null)
334 {
335 ps.WriteLine(" HintPath = \"{0}\"", Helper.MakeFilePath(refr.Path, refr.Name, "dll"));
336 }
337
338 }
339
340 if(refr.LocalCopySpecified)
341 {
342 ps.WriteLine(" Private = \"{0}\"",refr.LocalCopy);
343 }
344
345 ps.WriteLine(" />");
346 }
347 ps.WriteLine(" </References>");
348
349 ps.WriteLine(" </Build>");
350 ps.WriteLine(" <Files>");
351
352 ps.WriteLine(" <Include>");
353
354 foreach(string file in project.Files)
355 {
356 string fileName = file.Replace(".\\", "");
357 ps.WriteLine(" <File");
358 ps.WriteLine(" RelPath = \"{0}\"", fileName);
359 ps.WriteLine(" SubType = \"{0}\"", project.Files.GetSubType(file));
360 ps.WriteLine(" BuildAction = \"{0}\"", project.Files.GetBuildAction(file));
361 ps.WriteLine(" />");
362
363 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings)
364 {
365 ps.WriteLine(" <File");
366 ps.WriteLine(" RelPath = \"{0}\"", fileName.Substring(0, fileName.LastIndexOf('.')) + ".resx");
367 int slash = fileName.LastIndexOf('\\');
368 if (slash == -1)
369 {
370 ps.WriteLine(" DependentUpon = \"{0}\"", fileName);
371 }
372 else
373 {
374 ps.WriteLine(" DependentUpon = \"{0}\"", fileName.Substring(slash + 1, fileName.Length - slash - 1));
375 }
376 ps.WriteLine(" BuildAction = \"{0}\"", "EmbeddedResource");
377 ps.WriteLine(" />");
378
379 }
380 }
381 ps.WriteLine(" </Include>");
382
383 ps.WriteLine(" </Files>");
384 ps.WriteLine(" </{0}>", toolInfo.XmlTag);
385 ps.WriteLine("</VisualStudioProject>");
386 }
387
388 ps = new StreamWriter(projectFile + ".user");
389 using(ps)
390 {
391 ps.WriteLine("<VisualStudioProject>");
392 ps.WriteLine(" <{0}>", toolInfo.XmlTag);
393 ps.WriteLine(" <Build>");
394
395 ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
396 foreach(ConfigurationNode conf in project.Configurations)
397 {
398 ps.WriteLine(" <Config");
399 ps.WriteLine(" Name = \"{0}\"", conf.Name);
400 ps.WriteLine(" />");
401 }
402 ps.WriteLine(" </Settings>");
403
404 ps.WriteLine(" </Build>");
405 ps.WriteLine(" </{0}>", toolInfo.XmlTag);
406 ps.WriteLine("</VisualStudioProject>");
407 }
408
409 m_Kernel.CurrentWorkingDirectory.Pop();
410 }
411
412 /// <summary>
413 /// Gets the XML doc file.
414 /// </summary>
415 /// <param name="project">The project.</param>
416 /// <param name="conf">The conf.</param>
417 /// <returns></returns>
418 public static string GetXmlDocFile(ProjectNode project, ConfigurationNode conf)
419 {
420 if( conf == null )
421 {
422 throw new ArgumentNullException("conf");
423 }
424 if( project == null )
425 {
426 throw new ArgumentNullException("project");
427 }
428 // if(!(bool)conf.Options["GenerateXmlDocFile"]) //default to none, if the generate option is false
429 // {
430 // return string.Empty;
431 // }
432
433 //default to "AssemblyName.xml"
434 //string defaultValue = Path.GetFileNameWithoutExtension(project.AssemblyName) + ".xml";
435 //return (string)conf.Options["XmlDocFile", defaultValue];
436
437 //default to no XmlDocFile file
438 return (string)conf.Options["XmlDocFile", ""];
439 }
440
441 private void WriteSolution(SolutionNode solution)
442 {
443 m_Kernel.Log.Write("Creating Visual Studio {0} solution and project files", this.VersionName);
444
445 foreach(ProjectNode project in solution.Projects)
446 {
447 if(m_Kernel.AllowProject(project.FilterGroups))
448 {
449 m_Kernel.Log.Write("...Creating project: {0}", project.Name);
450 WriteProject(solution, project);
451 }
452 }
453
454 m_Kernel.Log.Write("");
455 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
456 StreamWriter ss = new StreamWriter(solutionFile);
457
458 m_Kernel.CurrentWorkingDirectory.Push();
459 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile));
460
461 using(ss)
462 {
463 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion);
464 foreach(ProjectNode project in solution.Projects)
465 {
466 if(!m_Tools.ContainsKey(project.Language))
467 {
468 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
469 }
470
471 ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language];
472
473 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
474 ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"",
475 toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name,
476 toolInfo.FileExtension), project.Guid.ToString().ToUpper());
477
478 ss.WriteLine("\tProjectSection(ProjectDependencies) = postProject");
479 ss.WriteLine("\tEndProjectSection");
480
481 ss.WriteLine("EndProject");
482 }
483
484 ss.WriteLine("Global");
485
486 ss.WriteLine("\tGlobalSection(SolutionConfiguration) = preSolution");
487 foreach(ConfigurationNode conf in solution.Configurations)
488 {
489 ss.WriteLine("\t\t{0} = {0}", conf.Name);
490 }
491 ss.WriteLine("\tEndGlobalSection");
492
493 ss.WriteLine("\tGlobalSection(ProjectDependencies) = postSolution");
494 foreach(ProjectNode project in solution.Projects)
495 {
496 for(int i = 0; i < project.References.Count; i++)
497 {
498 ReferenceNode refr = (ReferenceNode)project.References[i];
499 if(solution.ProjectsTable.ContainsKey(refr.Name))
500 {
501 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name];
502 ss.WriteLine("\t\t({{{0}}}).{1} = ({{{2}}})",
503 project.Guid.ToString().ToUpper()
504 , i,
505 refProject.Guid.ToString().ToUpper()
506 );
507 }
508 }
509 }
510 ss.WriteLine("\tEndGlobalSection");
511
512 ss.WriteLine("\tGlobalSection(ProjectConfiguration) = postSolution");
513 foreach(ProjectNode project in solution.Projects)
514 {
515 foreach(ConfigurationNode conf in solution.Configurations)
516 {
517 ss.WriteLine("\t\t{{{0}}}.{1}.ActiveCfg = {1}|.NET",
518 project.Guid.ToString().ToUpper(),
519 conf.Name);
520
521 ss.WriteLine("\t\t{{{0}}}.{1}.Build.0 = {1}|.NET",
522 project.Guid.ToString().ToUpper(),
523 conf.Name);
524 }
525 }
526 ss.WriteLine("\tEndGlobalSection");
527
528 if(solution.Files != null)
529 {
530 ss.WriteLine("\tGlobalSection(SolutionItems) = postSolution");
531 foreach(string file in solution.Files)
532 {
533 ss.WriteLine("\t\t{0} = {0}", file);
534 }
535 ss.WriteLine("\tEndGlobalSection");
536 }
537
538 ss.WriteLine("\tGlobalSection(ExtensibilityGlobals) = postSolution");
539 ss.WriteLine("\tEndGlobalSection");
540 ss.WriteLine("\tGlobalSection(ExtensibilityAddIns) = postSolution");
541 ss.WriteLine("\tEndGlobalSection");
542
543 ss.WriteLine("EndGlobal");
544 }
545
546 m_Kernel.CurrentWorkingDirectory.Pop();
547 }
548
549 private void CleanProject(ProjectNode project)
550 {
551 m_Kernel.Log.Write("...Cleaning project: {0}", project.Name);
552
553 ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language];
554 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
555 string userFile = projectFile + ".user";
556
557 Helper.DeleteIfExists(projectFile);
558 Helper.DeleteIfExists(userFile);
559 }
560
561 private void CleanSolution(SolutionNode solution)
562 {
563 m_Kernel.Log.Write("Cleaning Visual Studio {0} solution and project files", this.VersionName, solution.Name);
564
565 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
566 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo");
567
568 Helper.DeleteIfExists(slnFile);
569 Helper.DeleteIfExists(suoFile);
570
571 foreach(ProjectNode project in solution.Projects)
572 {
573 CleanProject(project);
574 }
575
576 m_Kernel.Log.Write("");
577 }
578
579 #endregion
580
581 #region ITarget Members
582
583 /// <summary>
584 /// Writes the specified kern.
585 /// </summary>
586 /// <param name="kern">The kern.</param>
587 public virtual void Write(Kernel kern)
588 {
589 if( kern == null )
590 {
591 throw new ArgumentNullException("kern");
592 }
593 m_Kernel = kern;
594 foreach(SolutionNode sol in m_Kernel.Solutions)
595 {
596 WriteSolution(sol);
597 }
598 m_Kernel = null;
599 }
600
601 /// <summary>
602 /// Cleans the specified kern.
603 /// </summary>
604 /// <param name="kern">The kern.</param>
605 public virtual void Clean(Kernel kern)
606 {
607 if( kern == null )
608 {
609 throw new ArgumentNullException("kern");
610 }
611 m_Kernel = kern;
612 foreach(SolutionNode sol in m_Kernel.Solutions)
613 {
614 CleanSolution(sol);
615 }
616 m_Kernel = null;
617 }
618
619 /// <summary>
620 /// Gets the name.
621 /// </summary>
622 /// <value>The name.</value>
623 public virtual string Name
624 {
625 get
626 {
627 return "vs2003";
628 }
629 }
630
631 #endregion
632 }
633}
diff --git a/Prebuild/src/Core/Targets/VS2005Target.cs b/Prebuild/src/Core/Targets/VS2005Target.cs
deleted file mode 100644
index 23b6116..0000000
--- a/Prebuild/src/Core/Targets/VS2005Target.cs
+++ /dev/null
@@ -1,883 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004 Matthew Holmes (matthew@wildfiregames.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: robloach $
30 * $Date: 2007-02-27 19:52:34 +0100 (ti, 27 feb 2007) $
31 * $Revision: 207 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Collections.Specialized;
38using System.IO;
39
40using Prebuild.Core.Attributes;
41using Prebuild.Core.Interfaces;
42using Prebuild.Core.Nodes;
43using Prebuild.Core.Utilities;
44
45namespace Prebuild.Core.Targets
46{
47 /// <summary>
48 ///
49 /// </summary>
50 public struct ToolInfo
51 {
52 string name;
53 string guid;
54 string fileExtension;
55 string xmlTag;
56 string importProject;
57
58 /// <summary>
59 /// Gets or sets the name.
60 /// </summary>
61 /// <value>The name.</value>
62 public string Name
63 {
64 get
65 {
66 return name;
67 }
68 set
69 {
70 name = value;
71 }
72 }
73
74 /// <summary>
75 /// Gets or sets the GUID.
76 /// </summary>
77 /// <value>The GUID.</value>
78 public string Guid
79 {
80 get
81 {
82 return guid;
83 }
84 set
85 {
86 guid = value;
87 }
88 }
89
90 /// <summary>
91 /// Gets or sets the file extension.
92 /// </summary>
93 /// <value>The file extension.</value>
94 public string FileExtension
95 {
96 get
97 {
98 return fileExtension;
99 }
100 set
101 {
102 fileExtension = value;
103 }
104 }
105 /// <summary>
106 /// Gets or sets the XML tag.
107 /// </summary>
108 /// <value>The XML tag.</value>
109 public string XmlTag
110 {
111 get
112 {
113 return xmlTag;
114 }
115 set
116 {
117 xmlTag = value;
118 }
119 }
120
121 /// <summary>
122 /// Gets or sets the import project property.
123 /// </summary>
124 /// <value>The ImportProject tag.</value>
125 public string ImportProject
126 {
127 get
128 {
129 return importProject;
130 }
131 set
132 {
133 importProject = value;
134 }
135 }
136
137 /// <summary>
138 /// Initializes a new instance of the <see cref="ToolInfo"/> class.
139 /// </summary>
140 /// <param name="name">The name.</param>
141 /// <param name="guid">The GUID.</param>
142 /// <param name="fileExtension">The file extension.</param>
143 /// <param name="xml">The XML.</param>
144 /// <param name="importProject">The import project.</param>
145 public ToolInfo(string name, string guid, string fileExtension, string xml, string importProject)
146 {
147 this.name = name;
148 this.guid = guid;
149 this.fileExtension = fileExtension;
150 this.xmlTag = xml;
151 this.importProject = importProject;
152 }
153
154 /// <summary>
155 /// Initializes a new instance of the <see cref="ToolInfo"/> class.
156 /// </summary>
157 /// <param name="name">The name.</param>
158 /// <param name="guid">The GUID.</param>
159 /// <param name="fileExtension">The file extension.</param>
160 /// <param name="xml">The XML.</param>
161 public ToolInfo(string name, string guid, string fileExtension, string xml)
162 {
163 this.name = name;
164 this.guid = guid;
165 this.fileExtension = fileExtension;
166 this.xmlTag = xml;
167 this.importProject = "$(MSBuildBinPath)\\Microsoft." + xml + ".Targets";
168 }
169
170 /// <summary>
171 /// Equals operator
172 /// </summary>
173 /// <param name="obj">ToolInfo to compare</param>
174 /// <returns>true if toolInfos are equal</returns>
175 public override bool Equals(object obj)
176 {
177 if (obj == null)
178 {
179 throw new ArgumentNullException("obj");
180 }
181 if (obj.GetType() != typeof(ToolInfo))
182 return false;
183
184 ToolInfo c = (ToolInfo)obj;
185 return ((this.name == c.name) && (this.guid == c.guid) && (this.fileExtension == c.fileExtension) && (this.importProject == c.importProject));
186 }
187
188 /// <summary>
189 /// Equals operator
190 /// </summary>
191 /// <param name="c1">ToolInfo to compare</param>
192 /// <param name="c2">ToolInfo to compare</param>
193 /// <returns>True if toolInfos are equal</returns>
194 public static bool operator ==(ToolInfo c1, ToolInfo c2)
195 {
196 return ((c1.name == c2.name) && (c1.guid == c2.guid) && (c1.fileExtension == c2.fileExtension) && (c1.importProject == c2.importProject) && (c1.xmlTag == c2.xmlTag));
197 }
198
199 /// <summary>
200 /// Not equals operator
201 /// </summary>
202 /// <param name="c1">ToolInfo to compare</param>
203 /// <param name="c2">ToolInfo to compare</param>
204 /// <returns>True if toolInfos are not equal</returns>
205 public static bool operator !=(ToolInfo c1, ToolInfo c2)
206 {
207 return !(c1 == c2);
208 }
209
210 /// <summary>
211 /// Hash Code
212 /// </summary>
213 /// <returns>Hash code</returns>
214 public override int GetHashCode()
215 {
216 return name.GetHashCode() ^ guid.GetHashCode() ^ this.fileExtension.GetHashCode() ^ this.importProject.GetHashCode() ^ this.xmlTag.GetHashCode();
217
218 }
219 }
220
221 /// <summary>
222 ///
223 /// </summary>
224 [Target("vs2005")]
225 public class VS2005Target : ITarget
226 {
227 #region Inner Classes
228
229 #endregion
230
231 #region Fields
232
233 string solutionVersion = "9.00";
234 string productVersion = "8.0.50727";
235 string schemaVersion = "2.0";
236 string versionName = "Visual C# 2005";
237 VSVersion version = VSVersion.VS80;
238
239 Hashtable tools;
240 Kernel kernel;
241
242 /// <summary>
243 /// Gets or sets the solution version.
244 /// </summary>
245 /// <value>The solution version.</value>
246 protected string SolutionVersion
247 {
248 get
249 {
250 return this.solutionVersion;
251 }
252 set
253 {
254 this.solutionVersion = value;
255 }
256 }
257 /// <summary>
258 /// Gets or sets the product version.
259 /// </summary>
260 /// <value>The product version.</value>
261 protected string ProductVersion
262 {
263 get
264 {
265 return this.productVersion;
266 }
267 set
268 {
269 this.productVersion = value;
270 }
271 }
272 /// <summary>
273 /// Gets or sets the schema version.
274 /// </summary>
275 /// <value>The schema version.</value>
276 protected string SchemaVersion
277 {
278 get
279 {
280 return this.schemaVersion;
281 }
282 set
283 {
284 this.schemaVersion = value;
285 }
286 }
287 /// <summary>
288 /// Gets or sets the name of the version.
289 /// </summary>
290 /// <value>The name of the version.</value>
291 protected string VersionName
292 {
293 get
294 {
295 return this.versionName;
296 }
297 set
298 {
299 this.versionName = value;
300 }
301 }
302 /// <summary>
303 /// Gets or sets the version.
304 /// </summary>
305 /// <value>The version.</value>
306 protected VSVersion Version
307 {
308 get
309 {
310 return this.version;
311 }
312 set
313 {
314 this.version = value;
315 }
316 }
317
318 #endregion
319
320 #region Constructors
321
322 /// <summary>
323 /// Initializes a new instance of the <see cref="VS2005Target"/> class.
324 /// </summary>
325 public VS2005Target()
326 {
327 this.tools = new Hashtable();
328
329 this.tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP", "$(MSBuildBinPath)\\Microsoft.CSHARP.Targets");
330 this.tools["Boo"] = new ToolInfo("Boo", "{45CEA7DC-C2ED-48A6-ACE0-E16144C02365}", "booproj", "Boo", "$(BooBinPath)\\Boo.Microsoft.Build.targets");
331 this.tools["VisualBasic"] = new ToolInfo("VisualBasic", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic", "$(MSBuildBinPath)\\Microsoft.VisualBasic.Targets");
332 }
333
334 #endregion
335
336 #region Private Methods
337
338 private string MakeRefPath(ProjectNode project)
339 {
340 string ret = "";
341 foreach (ReferencePathNode node in project.ReferencePaths)
342 {
343 try
344 {
345 string fullPath = Helper.ResolvePath(node.Path);
346 if (ret.Length < 1)
347 {
348 ret = fullPath;
349 }
350 else
351 {
352 ret += ";" + fullPath;
353 }
354 }
355 catch (ArgumentException)
356 {
357 this.kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path);
358 }
359 }
360
361 return ret;
362 }
363
364 private void WriteProject(SolutionNode solution, ProjectNode project)
365 {
366 if (!tools.ContainsKey(project.Language))
367 {
368 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
369 }
370
371 ToolInfo toolInfo = (ToolInfo)tools[project.Language];
372 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
373 StreamWriter ps = new StreamWriter(projectFile);
374
375 kernel.CurrentWorkingDirectory.Push();
376 Helper.SetCurrentDir(Path.GetDirectoryName(projectFile));
377
378 #region Project File
379 using (ps)
380 {
381 ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
382 //ps.WriteLine(" <{0}", toolInfo.XMLTag);
383 ps.WriteLine(" <PropertyGroup>");
384 ps.WriteLine(" <ProjectType>Local</ProjectType>");
385 ps.WriteLine(" <ProductVersion>{0}</ProductVersion>", this.ProductVersion);
386 ps.WriteLine(" <SchemaVersion>{0}</SchemaVersion>", this.SchemaVersion);
387 ps.WriteLine(" <ProjectGuid>{{{0}}}</ProjectGuid>", project.Guid.ToString().ToUpper());
388
389 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
390 ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
391 //ps.WriteLine(" <Build>");
392
393 //ps.WriteLine(" <Settings");
394 ps.WriteLine(" <ApplicationIcon>{0}</ApplicationIcon>", project.AppIcon);
395 ps.WriteLine(" <AssemblyKeyContainerName>");
396 ps.WriteLine(" </AssemblyKeyContainerName>");
397 ps.WriteLine(" <AssemblyName>{0}</AssemblyName>", project.AssemblyName);
398 foreach (ConfigurationNode conf in project.Configurations)
399 {
400 if (conf.Options.KeyFile != "")
401 {
402 ps.WriteLine(" <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>", conf.Options.KeyFile);
403 ps.WriteLine(" <SignAssembly>true</SignAssembly>");
404 break;
405 }
406 }
407 ps.WriteLine(" <DefaultClientScript>JScript</DefaultClientScript>");
408 ps.WriteLine(" <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>");
409 ps.WriteLine(" <DefaultTargetSchema>IE50</DefaultTargetSchema>");
410 ps.WriteLine(" <DelaySign>false</DelaySign>");
411
412 //if(m_Version == VSVersion.VS70)
413 // ps.WriteLine(" NoStandardLibraries = \"false\"");
414
415 ps.WriteLine(" <OutputType>{0}</OutputType>", project.Type.ToString());
416 ps.WriteLine(" <AppDesignerFolder>{0}</AppDesignerFolder>", project.DesignerFolder);
417 ps.WriteLine(" <RootNamespace>{0}</RootNamespace>", project.RootNamespace);
418 ps.WriteLine(" <StartupObject>{0}</StartupObject>", project.StartupObject);
419 //ps.WriteLine(" >");
420 ps.WriteLine(" <FileUpgradeFlags>");
421 ps.WriteLine(" </FileUpgradeFlags>");
422
423 ps.WriteLine(" </PropertyGroup>");
424
425 foreach (ConfigurationNode conf in project.Configurations)
426 {
427 ps.Write(" <PropertyGroup ");
428 ps.WriteLine("Condition=\" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \">", conf.Name);
429 ps.WriteLine(" <AllowUnsafeBlocks>{0}</AllowUnsafeBlocks>", conf.Options["AllowUnsafe"]);
430 ps.WriteLine(" <BaseAddress>{0}</BaseAddress>", conf.Options["BaseAddress"]);
431 ps.WriteLine(" <CheckForOverflowUnderflow>{0}</CheckForOverflowUnderflow>", conf.Options["CheckUnderflowOverflow"]);
432 ps.WriteLine(" <ConfigurationOverrideFile>");
433 ps.WriteLine(" </ConfigurationOverrideFile>");
434 ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]);
435 ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", conf.Options["XmlDocFile"]);
436 ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]);
437 ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]);
438 // ps.WriteLine(" <IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"]);
439
440 // if(m_Version == VSVersion.VS71)
441 // {
442 // ps.WriteLine(" NoStdLib = \"{0}\"", conf.Options["NoStdLib"]);
443 // ps.WriteLine(" NoWarn = \"{0}\"", conf.Options["SuppressWarnings"]);
444 // }
445
446 ps.WriteLine(" <Optimize>{0}</Optimize>", conf.Options["OptimizeCode"]);
447 ps.WriteLine(" <OutputPath>{0}</OutputPath>",
448 Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString())));
449 ps.WriteLine(" <RegisterForComInterop>{0}</RegisterForComInterop>", conf.Options["RegisterComInterop"]);
450 ps.WriteLine(" <RemoveIntegerChecks>{0}</RemoveIntegerChecks>", conf.Options["RemoveIntegerChecks"]);
451 ps.WriteLine(" <TreatWarningsAsErrors>{0}</TreatWarningsAsErrors>", conf.Options["WarningsAsErrors"]);
452 ps.WriteLine(" <WarningLevel>{0}</WarningLevel>", conf.Options["WarningLevel"]);
453 ps.WriteLine(" <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]);
454 ps.WriteLine(" </PropertyGroup>");
455 }
456
457 //ps.WriteLine(" </Settings>");
458
459 // Assembly References
460 ps.WriteLine(" <ItemGroup>");
461 string refPath = ((ReferencePathNode) project.ReferencePaths[0]).Path;
462
463 foreach (ReferenceNode refr in project.References)
464 {
465 if (!solution.ProjectsTable.ContainsKey(refr.Name))
466 {
467 ps.Write(" <Reference");
468 ps.Write(" Include=\"");
469 ps.Write(refr.Name);
470
471 ps.WriteLine("\" >");
472
473 string path;
474
475 if( refr.Name.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase ))
476 {
477 path = Helper.NormalizePath(Path.Combine( refPath, refr.Name), '\\');
478 }
479 else
480 {
481 path = refr.Name + ".dll";
482 }
483
484 // TODO: Allow reference to *.exe files
485 ps.WriteLine(" <HintPath>{0}</HintPath>", path );
486 ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy);
487 ps.WriteLine(" </Reference>");
488 }
489 }
490 ps.WriteLine(" </ItemGroup>");
491
492 //Project References
493 ps.WriteLine(" <ItemGroup>");
494 foreach (ReferenceNode refr in project.References)
495 {
496 if (solution.ProjectsTable.ContainsKey(refr.Name))
497 {
498 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name];
499 // TODO: Allow reference to visual basic projects
500 string path =
501 Helper.MakePathRelativeTo(project.FullPath,
502 Helper.MakeFilePath(refProject.FullPath, refProject.Name, "csproj"));
503 ps.WriteLine(" <ProjectReference Include=\"{0}\">", path );
504 //<ProjectReference Include="..\..\RealmForge\Utility\RealmForge.Utility.csproj">
505 ps.WriteLine(" <Name>{0}</Name>", refProject.Name);
506 // <Name>RealmForge.Utility</Name>
507 ps.WriteLine(" <Project>{{{0}}}</Project>", refProject.Guid.ToString().ToUpper());
508 // <Project>{6880D1D3-69EE-461B-B841-5319845B20D3}</Project>
509 ps.WriteLine(" <Package>{0}</Package>", toolInfo.Guid.ToString().ToUpper());
510 // <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
511 ps.WriteLine("\t\t\t<Private>{0}</Private>", refr.LocalCopy);
512 ps.WriteLine(" </ProjectReference>");
513 //</ProjectReference>
514 }
515 else
516 {
517 }
518 }
519 ps.WriteLine(" </ItemGroup>");
520
521 // ps.WriteLine(" </Build>");
522 ps.WriteLine(" <ItemGroup>");
523
524 // ps.WriteLine(" <Include>");
525 ArrayList list = new ArrayList();
526 foreach (string file in project.Files)
527 {
528 // if (file == "Properties\\Bind.Designer.cs")
529 // {
530 // Console.WriteLine("Wait a minute!");
531 // Console.WriteLine(project.Files.GetSubType(file).ToString());
532 // }
533
534 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings && project.Files.GetSubType(file) != SubType.Designer)
535 {
536 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
537
538 int slash = file.LastIndexOf('\\');
539 if (slash == -1)
540 {
541 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file);
542 }
543 else
544 {
545 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file.Substring(slash + 1, file.Length - slash - 1));
546 }
547 ps.WriteLine(" <SubType>Designer</SubType>");
548 ps.WriteLine(" </EmbeddedResource>");
549 //
550 }
551
552 if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) == SubType.Designer)
553 {
554 ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
555 ps.WriteLine(" <SubType>" + project.Files.GetSubType(file) + "</SubType>");
556 ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>");
557 ps.WriteLine(" <LastGenOutput>Resources.Designer.cs</LastGenOutput>");
558 ps.WriteLine(" </EmbeddedResource>");
559 ps.WriteLine(" <Compile Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs");
560 ps.WriteLine(" <AutoGen>True</AutoGen>");
561 ps.WriteLine(" <DesignTime>True</DesignTime>");
562 ps.WriteLine(" <DependentUpon>Resources.resx</DependentUpon>");
563 ps.WriteLine(" </Compile>");
564 list.Add(file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs");
565 }
566 if (project.Files.GetSubType(file).ToString() == "Settings")
567 {
568 //Console.WriteLine("File: " + file);
569 //Console.WriteLine("Last index: " + file.LastIndexOf('.'));
570 //Console.WriteLine("Length: " + file.Length);
571 ps.Write(" <{0} ", project.Files.GetBuildAction(file));
572 ps.WriteLine("Include=\"{0}\">", file);
573 int slash = file.LastIndexOf('\\');
574 string fileName = file.Substring(slash + 1, file.Length - slash - 1);
575 if (project.Files.GetBuildAction(file) == BuildAction.None)
576 {
577 ps.WriteLine(" <Generator>SettingsSingleFileGenerator</Generator>");
578
579 //Console.WriteLine("FileName: " + fileName);
580 //Console.WriteLine("FileNameMain: " + fileName.Substring(0, fileName.LastIndexOf('.')));
581 //Console.WriteLine("FileNameExt: " + fileName.Substring(fileName.LastIndexOf('.'), fileName.Length - fileName.LastIndexOf('.')));
582 if (slash == -1)
583 {
584 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs");
585 }
586 else
587 {
588 ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs");
589 }
590 }
591 else
592 {
593 ps.WriteLine(" <SubType>Code</SubType>");
594 ps.WriteLine(" <AutoGen>True</AutoGen>");
595 ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>");
596 string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.'));
597 string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.'));
598 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", fileNameShorter + ".settings");
599 }
600 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file));
601 }
602 else if (project.Files.GetSubType(file) != SubType.Designer)
603 {
604 if (!list.Contains(file))
605 {
606 ps.Write(" <{0} ", project.Files.GetBuildAction(file));
607 ps.WriteLine("Include=\"{0}\">", file);
608
609
610 if (file.Contains("Designer.cs"))
611 {
612 ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", file.Substring(0, file.IndexOf(".Designer.cs")) + ".cs");
613 }
614
615 if (project.Files.GetIsLink(file))
616 {
617 ps.WriteLine(" <Link>{0}</Link>", Path.GetFileName(file));
618 }
619 else if (project.Files.GetBuildAction(file) != BuildAction.None)
620 {
621 if (project.Files.GetBuildAction(file) != BuildAction.EmbeddedResource)
622 {
623 ps.WriteLine(" <SubType>{0}</SubType>", project.Files.GetSubType(file));
624 }
625 }
626 if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never)
627 {
628 ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(file));
629 }
630
631 ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file));
632 }
633 }
634 }
635 // ps.WriteLine(" </Include>");
636
637 ps.WriteLine(" </ItemGroup>");
638 ps.WriteLine(" <Import Project=\"" + toolInfo.ImportProject + "\" />");
639 ps.WriteLine(" <PropertyGroup>");
640 ps.WriteLine(" <PreBuildEvent>");
641 ps.WriteLine(" </PreBuildEvent>");
642 ps.WriteLine(" <PostBuildEvent>");
643 ps.WriteLine(" </PostBuildEvent>");
644 ps.WriteLine(" </PropertyGroup>");
645 // ps.WriteLine(" </{0}>", toolInfo.XMLTag);
646 ps.WriteLine("</Project>");
647 }
648 #endregion
649
650 #region User File
651
652 ps = new StreamWriter(projectFile + ".user");
653 using (ps)
654 {
655 ps.WriteLine("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">");
656 //ps.WriteLine( "<VisualStudioProject>" );
657 //ps.WriteLine(" <{0}>", toolInfo.XMLTag);
658 //ps.WriteLine(" <Build>");
659 ps.WriteLine(" <PropertyGroup>");
660 //ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project));
661
662
663 ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>");
664 ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>");
665
666 if (projectFile.Contains( "OpenSim.csproj" ))
667 {
668 ps.WriteLine(" <StartArguments>-loginserver -sandbox -accounts</StartArguments>");
669 }
670
671 ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project));
672 ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", this.ProductVersion);
673 ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>");
674 ps.WriteLine(" <ProjectTrust>0</ProjectTrust>");
675 ps.WriteLine(" </PropertyGroup>");
676 foreach (ConfigurationNode conf in project.Configurations)
677 {
678 ps.Write(" <PropertyGroup");
679 ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \"", conf.Name);
680 ps.WriteLine(" />");
681 }
682
683 ps.WriteLine("</Project>");
684 }
685 #endregion
686
687 kernel.CurrentWorkingDirectory.Pop();
688 }
689
690 private void WriteSolution(SolutionNode solution)
691 {
692 kernel.Log.Write("Creating {0} solution and project files", this.VersionName);
693
694 foreach (ProjectNode project in solution.Projects)
695 {
696 kernel.Log.Write("...Creating project: {0}", project.Name);
697 WriteProject(solution, project);
698 }
699
700 kernel.Log.Write("");
701 string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
702 StreamWriter ss = new StreamWriter(solutionFile);
703
704 kernel.CurrentWorkingDirectory.Push();
705 Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile));
706
707 using (ss)
708 {
709 ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion);
710 ss.WriteLine("# Visual Studio 2005");
711 foreach (ProjectNode project in solution.Projects)
712 {
713 if (!tools.ContainsKey(project.Language))
714 {
715 throw new UnknownLanguageException("Unknown .NET language: " + project.Language);
716 }
717
718 ToolInfo toolInfo = (ToolInfo)tools[project.Language];
719
720 string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath);
721 ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"",
722 toolInfo.Guid, project.Name, Helper.MakeFilePath(path, project.Name,
723 toolInfo.FileExtension), project.Guid.ToString().ToUpper());
724
725 //ss.WriteLine(" ProjectSection(ProjectDependencies) = postProject");
726 //ss.WriteLine(" EndProjectSection");
727
728 ss.WriteLine("EndProject");
729 }
730
731 if (solution.Files != null)
732 {
733 ss.WriteLine("Project(\"{0}\") = \"Solution Items\", \"Solution Items\", \"{1}\"", "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", "{468F1D07-AD17-4CC3-ABD0-2CA268E4E1A6}");
734 ss.WriteLine("\tProjectSection(SolutionItems) = preProject");
735 foreach (string file in solution.Files)
736 ss.WriteLine("\t\t{0} = {0}", file);
737 ss.WriteLine("\tEndProjectSection");
738 ss.WriteLine("EndProject");
739 }
740
741 ss.WriteLine("Global");
742
743 ss.WriteLine(" GlobalSection(SolutionConfigurationPlatforms) = preSolution");
744 foreach (ConfigurationNode conf in solution.Configurations)
745 {
746 ss.WriteLine(" {0}|Any CPU = {0}|Any CPU", conf.Name);
747 }
748 ss.WriteLine(" EndGlobalSection");
749
750 if (solution.Projects.Count > 1)
751 {
752 ss.WriteLine(" GlobalSection(ProjectDependencies) = postSolution");
753 }
754 foreach (ProjectNode project in solution.Projects)
755 {
756 for (int i = 0; i < project.References.Count; i++)
757 {
758 ReferenceNode refr = (ReferenceNode)project.References[i];
759 if (solution.ProjectsTable.ContainsKey(refr.Name))
760 {
761 ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name];
762 ss.WriteLine(" ({{{0}}}).{1} = ({{{2}}})",
763 project.Guid.ToString().ToUpper()
764 , i,
765 refProject.Guid.ToString().ToUpper()
766 );
767 }
768 }
769 }
770 if (solution.Projects.Count > 1)
771 {
772 ss.WriteLine(" EndGlobalSection");
773 }
774 ss.WriteLine(" GlobalSection(ProjectConfigurationPlatforms) = postSolution");
775 foreach (ProjectNode project in solution.Projects)
776 {
777 foreach (ConfigurationNode conf in solution.Configurations)
778 {
779 ss.WriteLine(" {{{0}}}.{1}|Any CPU.ActiveCfg = {1}|Any CPU",
780 project.Guid.ToString().ToUpper(),
781 conf.Name);
782
783 ss.WriteLine(" {{{0}}}.{1}|Any CPU.Build.0 = {1}|Any CPU",
784 project.Guid.ToString().ToUpper(),
785 conf.Name);
786 }
787 }
788 ss.WriteLine(" EndGlobalSection");
789 ss.WriteLine(" GlobalSection(SolutionProperties) = preSolution");
790 ss.WriteLine(" HideSolutionNode = FALSE");
791 ss.WriteLine(" EndGlobalSection");
792
793 ss.WriteLine("EndGlobal");
794 }
795
796 kernel.CurrentWorkingDirectory.Pop();
797 }
798
799 private void CleanProject(ProjectNode project)
800 {
801 kernel.Log.Write("...Cleaning project: {0}", project.Name);
802
803 ToolInfo toolInfo = (ToolInfo)tools[project.Language];
804 string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension);
805 string userFile = projectFile + ".user";
806
807 Helper.DeleteIfExists(projectFile);
808 Helper.DeleteIfExists(userFile);
809 }
810
811 private void CleanSolution(SolutionNode solution)
812 {
813 kernel.Log.Write("Cleaning {0} solution and project files", this.VersionName, solution.Name);
814
815 string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln");
816 string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo");
817
818 Helper.DeleteIfExists(slnFile);
819 Helper.DeleteIfExists(suoFile);
820
821 foreach (ProjectNode project in solution.Projects)
822 {
823 CleanProject(project);
824 }
825
826 kernel.Log.Write("");
827 }
828
829 #endregion
830
831 #region ITarget Members
832
833 /// <summary>
834 /// Writes the specified kern.
835 /// </summary>
836 /// <param name="kern">The kern.</param>
837 public virtual void Write(Kernel kern)
838 {
839 if (kern == null)
840 {
841 throw new ArgumentNullException("kern");
842 }
843 kernel = kern;
844 foreach (SolutionNode sol in kernel.Solutions)
845 {
846 WriteSolution(sol);
847 }
848 kernel = null;
849 }
850
851 /// <summary>
852 /// Cleans the specified kern.
853 /// </summary>
854 /// <param name="kern">The kern.</param>
855 public virtual void Clean(Kernel kern)
856 {
857 if (kern == null)
858 {
859 throw new ArgumentNullException("kern");
860 }
861 kernel = kern;
862 foreach (SolutionNode sol in kernel.Solutions)
863 {
864 CleanSolution(sol);
865 }
866 kernel = null;
867 }
868
869 /// <summary>
870 /// Gets the name.
871 /// </summary>
872 /// <value>The name.</value>
873 public virtual string Name
874 {
875 get
876 {
877 return "vs2005";
878 }
879 }
880
881 #endregion
882 }
883}
diff --git a/Prebuild/src/Core/UnknownLanguageException.cs b/Prebuild/src/Core/UnknownLanguageException.cs
deleted file mode 100644
index cbd1dc1..0000000
--- a/Prebuild/src/Core/UnknownLanguageException.cs
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * $RCSfile$
3 * Copyright (C) 2004, 2005 David Hudson (jendave@yahoo.com)
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20using System;
21using System.Runtime.Serialization;
22
23namespace Prebuild.Core
24{
25 /// <summary>
26 /// </summary>
27 [Serializable()]
28 public class UnknownLanguageException : Exception
29 {
30 /// <summary>
31 /// Basic exception.
32 /// </summary>
33 public UnknownLanguageException()
34 {
35 }
36
37 /// <summary>
38 /// Exception with specified string
39 /// </summary>
40 /// <param name="message">Exception message</param>
41 public UnknownLanguageException(string message): base(message)
42 {
43 }
44
45 /// <summary>
46 ///
47 /// </summary>
48 /// <param name="message"></param>
49 /// <param name="exception"></param>
50 public UnknownLanguageException(string message, Exception exception) : base(message, exception)
51 {
52 }
53
54 /// <summary>
55 ///
56 /// </summary>
57 /// <param name="info"></param>
58 /// <param name="context"></param>
59 protected UnknownLanguageException(SerializationInfo info, StreamingContext context) : base( info, context )
60 {
61 }
62 }
63}
diff --git a/Prebuild/src/Core/Utilities/CommandLineCollection.cs b/Prebuild/src/Core/Utilities/CommandLineCollection.cs
deleted file mode 100644
index 496731f..0000000
--- a/Prebuild/src/Core/Utilities/CommandLineCollection.cs
+++ /dev/null
@@ -1,162 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: robloach $
30 * $Date: 2006-09-26 00:30:53 +0200 (ti, 26 sep 2006) $
31 * $Revision: 165 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Collections.Specialized;
38using System.Diagnostics;
39
40namespace Prebuild.Core.Utilities
41{
42 /// <summary>
43 /// The CommandLine class parses and interprets the command-line arguments passed to
44 /// prebuild.
45 /// </summary>
46 public class CommandLineCollection
47 {
48 #region Fields
49
50 // The raw OS arguments
51 private string[] m_RawArgs;
52
53 // Command-line argument storage
54 private Hashtable m_Arguments;
55
56 #endregion
57
58 #region Constructors
59
60 /// <summary>
61 /// Create a new CommandLine instance and set some internal variables.
62 /// </summary>
63 public CommandLineCollection(string[] args)
64 {
65 m_RawArgs = args;
66 m_Arguments = new Hashtable();
67
68 Parse();
69 }
70
71 #endregion
72
73 #region Private Methods
74
75 private void Parse()
76 {
77 if(m_RawArgs.Length < 1)
78 return;
79
80 int idx = 0;
81 string arg = null, lastArg = null;
82
83 while(idx <m_RawArgs.Length)
84 {
85 arg = m_RawArgs[idx];
86
87 if(arg.Length > 2 && arg[0] == '/')
88 {
89 arg = arg.Substring(1);
90 lastArg = arg;
91 m_Arguments[arg] = "";
92 }
93 else
94 {
95 if(lastArg != null)
96 {
97 m_Arguments[lastArg] = arg;
98 lastArg = null;
99 }
100 }
101
102 idx++;
103 }
104 }
105
106 #endregion
107
108 #region Public Methods
109
110 /// <summary>
111 /// Wases the passed.
112 /// </summary>
113 /// <param name="arg">The arg.</param>
114 /// <returns></returns>
115 public bool WasPassed(string arg)
116 {
117 return (m_Arguments.ContainsKey(arg));
118 }
119
120 #endregion
121
122 #region Properties
123
124 /// <summary>
125 /// Gets the parameter associated with the command line option
126 /// </summary>
127 /// <remarks>Returns null if option was not specified,
128 /// null string if no parameter was specified, and the value if a parameter was specified</remarks>
129 public string this[string index]
130 {
131 get
132 {
133 if(m_Arguments.ContainsKey(index))
134 {
135 return (string)(m_Arguments[index]);
136 }
137 else
138 {
139 return null;
140 }
141 }
142 }
143
144 #endregion
145
146 #region IEnumerable Members
147
148 /// <summary>
149 /// Returns an enumerator that can iterate through a collection.
150 /// </summary>
151 /// <returns>
152 /// An <see cref="T:System.Collections.IDictionaryEnumerator"/>
153 /// that can be used to iterate through the collection.
154 /// </returns>
155 public IDictionaryEnumerator GetEnumerator()
156 {
157 return m_Arguments.GetEnumerator();
158 }
159
160 #endregion
161 }
162}
diff --git a/Prebuild/src/Core/Utilities/CurrentDirectory.cs b/Prebuild/src/Core/Utilities/CurrentDirectory.cs
deleted file mode 100644
index a76d844..0000000
--- a/Prebuild/src/Core/Utilities/CurrentDirectory.cs
+++ /dev/null
@@ -1,89 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37
38namespace Prebuild.Core.Utilities
39{
40 /// <summary>
41 ///
42 /// </summary>
43 public class CurrentDirectory
44 {
45 #region Fields
46
47 private Stack m_Stack;
48
49 #endregion
50
51 #region Constructors
52
53 /// <summary>
54 /// Initializes a new instance of the <see cref="CurrentDirectory"/> class.
55 /// </summary>
56 public CurrentDirectory()
57 {
58 m_Stack = new Stack();
59 }
60
61 #endregion
62
63 #region Public Methods
64
65 /// <summary>
66 /// Pushes this instance.
67 /// </summary>
68 public void Push()
69 {
70 m_Stack.Push(Environment.CurrentDirectory);
71 }
72
73 /// <summary>
74 /// Pops this instance.
75 /// </summary>
76 public void Pop()
77 {
78 if(m_Stack.Count < 1)
79 {
80 return;
81 }
82
83 string cwd = (string)m_Stack.Pop();
84 Helper.SetCurrentDir(cwd);
85 }
86
87 #endregion
88 }
89}
diff --git a/Prebuild/src/Core/Utilities/Helper.cs b/Prebuild/src/Core/Utilities/Helper.cs
deleted file mode 100644
index 33c9618..0000000
--- a/Prebuild/src/Core/Utilities/Helper.cs
+++ /dev/null
@@ -1,661 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2007-02-13 21:58:03 +0100 (ti, 13 feb 2007) $
31 * $Revision: 205 $
32 */
33#endregion
34
35using System;
36using System.Collections;
37using System.Diagnostics;
38using System.IO;
39using System.Runtime.InteropServices;
40using System.Text.RegularExpressions;
41using System.Collections.Specialized;
42using System.Xml;
43using Prebuild.Core.Nodes;
44
45namespace Prebuild.Core.Utilities
46{
47 /// <summary>
48 ///
49 /// </summary>
50 public class Helper
51 {
52 #region Fields
53
54 private static Stack dirStack;
55 private static Regex varRegex;
56 static bool checkForOSVariables;
57
58 /// <summary>
59 ///
60 /// </summary>
61 public static bool CheckForOSVariables
62 {
63 get
64 {
65 return checkForOSVariables;
66 }
67 set
68 {
69 checkForOSVariables = value;
70 }
71 }
72
73 #endregion
74
75 #region Constructors
76
77 /// <summary>
78 /// Initializes the <see cref="Helper"/> class.
79 /// </summary>
80 static Helper()
81 {
82 dirStack = new Stack();
83 //m_VarRegex = new Regex(@"\${(?<var>[\w|_]+)}");
84 }
85
86 #endregion
87
88 #region Properties
89
90 /// <summary>
91 ///
92 /// </summary>
93 public static Stack DirStack
94 {
95 get
96 {
97 return dirStack;
98 }
99 }
100
101 /// <summary>
102 ///
103 /// </summary>
104 public static Regex VarRegex
105 {
106 get
107 {
108 return varRegex;
109 }
110 set
111 {
112 varRegex = value;
113 }
114 }
115
116 #endregion
117
118 #region Public Methods
119
120 #region String Parsing
121 #region Inner Classes and Delegates
122 /// <summary>
123 ///
124 /// </summary>
125 public delegate string StringLookup(string key);
126
127 #endregion
128
129 /// <summary>
130 /// Gets a collection of StringLocationPair objects that represent the matches
131 /// </summary>
132 /// <param name="target">The target.</param>
133 /// <param name="beforeGroup">The before group.</param>
134 /// <param name="afterGroup">The after group.</param>
135 /// <param name="includeDelimitersInSubstrings">if set to <c>true</c> [include delimiters in substrings].</param>
136 /// <returns></returns>
137 public static StringCollection FindGroups(string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings)
138 {
139 if( beforeGroup == null )
140 {
141 throw new ArgumentNullException("beforeGroup");
142 }
143 if( afterGroup == null )
144 {
145 throw new ArgumentNullException("afterGroup");
146 }
147 StringCollection results = new StringCollection();
148 if(target == null || target.Length == 0)
149 {
150 return results;
151 }
152
153 int beforeMod = 0;
154 int afterMod = 0;
155 if(includeDelimitersInSubstrings)
156 {
157 //be sure to not exlude the delims
158 beforeMod = beforeGroup.Length;
159 afterMod = afterGroup.Length;
160 }
161 int startIndex = 0;
162 while((startIndex = target.IndexOf(beforeGroup,startIndex)) != -1) {
163 int endIndex = target.IndexOf(afterGroup,startIndex);//the index of the char after it
164 if(endIndex == -1)
165 {
166 break;
167 }
168 int length = endIndex - startIndex - beforeGroup.Length;//move to the first char in the string
169 string substring = substring = target.Substring(startIndex + beforeGroup.Length - beforeMod,
170 length - afterMod);
171
172 results.Add(substring);
173 //results.Add(new StringLocationPair(substring,startIndex));
174 startIndex = endIndex + 1;
175 //the Interpolate*() methods will not work if expressions are expandded inside expression due to an optimization
176 //so start after endIndex
177
178 }
179 return results;
180 }
181
182 /// <summary>
183 /// Replaces the groups.
184 /// </summary>
185 /// <param name="target">The target.</param>
186 /// <param name="beforeGroup">The before group.</param>
187 /// <param name="afterGroup">The after group.</param>
188 /// <param name="lookup">The lookup.</param>
189 /// <returns></returns>
190 public static string ReplaceGroups(string target, string beforeGroup, string afterGroup, StringLookup lookup) {
191 if( target == null )
192 {
193 throw new ArgumentNullException("target");
194 }
195 //int targetLength = target.Length;
196 StringCollection strings = FindGroups(target,beforeGroup,afterGroup,false);
197 if( lookup == null )
198 {
199 throw new ArgumentNullException("lookup");
200 }
201 foreach(string substring in strings)
202 {
203 target = target.Replace(beforeGroup + substring + afterGroup, lookup(substring) );
204 }
205 return target;
206 }
207
208 /// <summary>
209 /// Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate
210 /// </summary>
211 /// <param name="target">The target.</param>
212 /// <param name="lookup">The lookup.</param>
213 /// <returns></returns>
214 public static string InterpolateForVariables(string target, StringLookup lookup)
215 {
216 return ReplaceGroups(target, "${" , "}" , lookup);
217 }
218
219 /// <summary>
220 /// Replaces ${var} statements in a string with the corresonding environment variable with name var
221 /// </summary>
222 /// <param name="target"></param>
223 /// <returns></returns>
224 public static string InterpolateForEnvironmentVariables(string target)
225 {
226 return InterpolateForVariables(target, new StringLookup(Environment.GetEnvironmentVariable));
227 }
228
229 #endregion
230
231 /// <summary>
232 /// Translates the value.
233 /// </summary>
234 /// <param name="translateType">Type of the translate.</param>
235 /// <param name="translationItem">The translation item.</param>
236 /// <returns></returns>
237 public static object TranslateValue(Type translateType, string translationItem)
238 {
239 if(translationItem == null)
240 {
241 return null;
242 }
243
244 try
245 {
246 string lowerVal = translationItem.ToLower();
247 if(translateType == typeof(bool))
248 {
249 return (lowerVal == "true" || lowerVal == "1" || lowerVal == "y" || lowerVal == "yes" || lowerVal == "on");
250 }
251 else if(translateType == typeof(int))
252 {
253 return (Int32.Parse(translationItem));
254 }
255 else
256 {
257 return translationItem;
258 }
259 }
260 catch(FormatException)
261 {
262 return null;
263 }
264 }
265
266 /// <summary>
267 /// Deletes if exists.
268 /// </summary>
269 /// <param name="file">The file.</param>
270 /// <returns></returns>
271 public static bool DeleteIfExists(string file)
272 {
273 string resFile = null;
274 try
275 {
276 resFile = ResolvePath(file);
277 }
278 catch(ArgumentException)
279 {
280 return false;
281 }
282
283 if(!File.Exists(resFile))
284 {
285 return false;
286 }
287
288 File.Delete(resFile);
289 return true;
290 }
291
292 // This little gem was taken from the NeL source, thanks guys!
293 /// <summary>
294 /// Makes a relative path
295 /// </summary>
296 /// <param name="startPath">Path to start from</param>
297 /// <param name="endPath">Path to end at</param>
298 /// <returns>Path that will get from startPath to endPath</returns>
299 public static string MakePathRelativeTo(string startPath, string endPath)
300 {
301 string tmp = NormalizePath(startPath, '/');
302 string src = NormalizePath(endPath, '/');
303 string prefix = "";
304
305 while(true)
306 {
307 if((String.Compare(tmp, 0, src, 0, tmp.Length) == 0))
308 {
309 string ret;
310 int size = tmp.Length;
311 if(size == src.Length)
312 {
313 return "./";
314 }
315 if ((src.Length > tmp.Length) && src[tmp.Length-1] != '/' && src[tmp.Length-1] != '\\')
316 {
317 }
318 else
319 {
320 ret = prefix + endPath.Substring(size, endPath.Length - size);
321 ret = ret.Trim();
322 if(ret[0] == '/' || ret[0] == '\\')
323 {
324 ret = "." + ret;
325 }
326
327 return NormalizePath(ret);
328 }
329
330 }
331
332 if(tmp.Length < 2)
333 {
334 break;
335 }
336
337 int lastPos = tmp.LastIndexOf('/', tmp.Length - 2);
338 int prevPos = tmp.IndexOf('/');
339
340 if((lastPos == prevPos) || (lastPos == -1))
341 {
342 break;
343 }
344
345 tmp = tmp.Substring(0, lastPos + 1);
346 prefix += "../";
347 }
348
349 return endPath;
350 }
351
352 /// <summary>
353 /// Resolves the path.
354 /// </summary>
355 /// <param name="path">The path.</param>
356 /// <returns></returns>
357 public static string ResolvePath(string path)
358 {
359 string tmpPath = NormalizePath(path);
360 if(tmpPath.Length < 1)
361 {
362 tmpPath = ".";
363 }
364
365 tmpPath = Path.GetFullPath(tmpPath);
366 if(!File.Exists(tmpPath) && !Directory.Exists(tmpPath))
367 {
368 throw new ArgumentException("Path could not be resolved: " + tmpPath);
369 }
370
371 return tmpPath;
372 }
373
374 /// <summary>
375 /// Normalizes the path.
376 /// </summary>
377 /// <param name="path">The path.</param>
378 /// <param name="separatorCharacter">The separator character.</param>
379 /// <returns></returns>
380 public static string NormalizePath(string path, char separatorCharacter)
381 {
382 if(path == null || path == "" || path.Length < 1)
383 {
384 return "";
385 }
386
387 string tmpPath = path.Replace('\\', '/');
388 tmpPath = tmpPath.Replace('/', separatorCharacter);
389 return tmpPath;
390 }
391
392 /// <summary>
393 /// Normalizes the path.
394 /// </summary>
395 /// <param name="path">The path.</param>
396 /// <returns></returns>
397 public static string NormalizePath(string path)
398 {
399 return NormalizePath(path, Path.DirectorySeparatorChar);
400 }
401
402 /// <summary>
403 /// Ends the path.
404 /// </summary>
405 /// <param name="path">The path.</param>
406 /// <param name="separatorCharacter">The separator character.</param>
407 /// <returns></returns>
408 public static string EndPath(string path, char separatorCharacter)
409 {
410 if(path == null || path == "" || path.Length < 1)
411 {
412 return "";
413 }
414
415 if(!path.EndsWith(separatorCharacter.ToString()))
416 {
417 return (path + separatorCharacter);
418 }
419
420 return path;
421 }
422
423 /// <summary>
424 /// Ends the path.
425 /// </summary>
426 /// <param name="path">The path.</param>
427 /// <returns></returns>
428 public static string EndPath(string path)
429 {
430 return EndPath(path, Path.DirectorySeparatorChar);
431 }
432
433 /// <summary>
434 /// Makes the file path.
435 /// </summary>
436 /// <param name="path">The path.</param>
437 /// <param name="name">The name.</param>
438 /// <param name="ext">The ext.</param>
439 /// <returns></returns>
440 public static string MakeFilePath(string path, string name, string ext)
441 {
442 string ret = EndPath(NormalizePath(path));
443
444 if( name == null )
445 {
446 throw new ArgumentNullException("name");
447 }
448
449 ret += name;
450 if(!name.EndsWith("." + ext))
451 {
452 ret += "." + ext;
453 }
454
455 //foreach(char c in Path.GetInvalidPathChars())
456 //{
457 // ret = ret.Replace(c, '_');
458 //}
459
460 return ret;
461 }
462
463 /// <summary>
464 /// Makes the file path.
465 /// </summary>
466 /// <param name="path">The path.</param>
467 /// <param name="name">The name.</param>
468 /// <returns></returns>
469 public static string MakeFilePath(string path, string name)
470 {
471 string ret = EndPath(NormalizePath(path));
472
473 if( name == null )
474 {
475 throw new ArgumentNullException("name");
476 }
477
478 ret += name;
479
480 //foreach (char c in Path.GetInvalidPathChars())
481 //{
482 // ret = ret.Replace(c, '_');
483 //}
484
485 return ret;
486 }
487
488 /// <summary>
489 ///
490 /// </summary>
491 /// <param name="path"></param>
492 /// <returns></returns>
493 public static string MakeReferencePath(string path)
494 {
495 string ret = EndPath(NormalizePath(path));
496
497 //foreach (char c in Path.GetInvalidPathChars())
498 //{
499 // ret = ret.Replace(c, '_');
500 //}
501
502 return ret;
503 }
504
505 /// <summary>
506 /// Sets the current dir.
507 /// </summary>
508 /// <param name="path">The path.</param>
509 public static void SetCurrentDir(string path)
510 {
511 if( path == null )
512 {
513 throw new ArgumentNullException("path");
514 }
515 if(path.Length < 1)
516 {
517 return;
518 }
519
520 Environment.CurrentDirectory = path;
521 }
522
523 /// <summary>
524 /// Checks the type.
525 /// </summary>
526 /// <param name="typeToCheck">The type to check.</param>
527 /// <param name="attr">The attr.</param>
528 /// <param name="inter">The inter.</param>
529 /// <returns></returns>
530 public static object CheckType(Type typeToCheck, Type attr, Type inter)
531 {
532 if(typeToCheck == null || attr == null)
533 {
534 return null;
535 }
536
537 object[] attrs = typeToCheck.GetCustomAttributes(attr, false);
538 if(attrs == null || attrs.Length < 1)
539 {
540 return null;
541 }
542 if( inter == null )
543 {
544 throw new ArgumentNullException("inter");
545 }
546
547 if(typeToCheck.GetInterface(inter.FullName) == null)
548 {
549 return null;
550 }
551
552 return attrs[0];
553 }
554
555 /* A bit of overhead for simple group parsing, there are problems with Regex in Mono
556 public static string ParseValue(string val)
557 {
558 if(val == null || val.Length < 1 || !CheckForOSVariables)
559 return val;
560
561 string tmp = val;
562 Match m = m_VarRegex.Match(val);
563 while(m.Success)
564 {
565 if(m.Groups["var"] == null)
566 continue;
567
568 Capture c = m.Groups["var"].Captures[0];
569 if(c == null)
570 continue;
571
572 string var = c.Value;
573 string envVal = Environment.GetEnvironmentVariable(var);
574 if(envVal == null)
575 envVal = "";
576
577 tmp = tmp.Replace("${" + var + "}", envVal);
578 m = m.NextMatch();
579 }
580
581 return tmp;
582 }*/
583
584 /// <summary>
585 /// Attributes the value.
586 /// </summary>
587 /// <param name="node">The node.</param>
588 /// <param name="attr">The attr.</param>
589 /// <param name="def">The def.</param>
590 /// <returns></returns>
591 public static string AttributeValue(XmlNode node, string attr, string def)
592 {
593 if( node == null )
594 {
595 throw new ArgumentNullException("node");
596 }
597 if(node.Attributes[attr] == null)
598 {
599 return def;
600 }
601 string val = node.Attributes[attr].Value;
602 if(!CheckForOSVariables)
603 {
604 return val;
605 }
606
607 return InterpolateForEnvironmentVariables(val);
608 }
609
610 /// <summary>
611 /// Parses the boolean.
612 /// </summary>
613 /// <param name="node">The node.</param>
614 /// <param name="attr">The attr.</param>
615 /// <param name="defaultValue">if set to <c>true</c> [default value].</param>
616 /// <returns></returns>
617 public static bool ParseBoolean(XmlNode node, string attr, bool defaultValue)
618 {
619 if( node == null )
620 {
621 throw new ArgumentNullException("node");
622 }
623 if(node.Attributes[attr] == null)
624 {
625 return defaultValue;
626 }
627 return bool.Parse(node.Attributes[attr].Value);
628 }
629
630 /// <summary>
631 /// Enums the attribute value.
632 /// </summary>
633 /// <param name="node">The node.</param>
634 /// <param name="attr">The attr.</param>
635 /// <param name="enumType">Type of the enum.</param>
636 /// <param name="def">The def.</param>
637 /// <returns></returns>
638 public static object EnumAttributeValue(XmlNode node, string attr, Type enumType, object def)
639 {
640 if( def == null )
641 {
642 throw new ArgumentNullException("def");
643 }
644 string val = AttributeValue(node, attr, def.ToString());
645 return Enum.Parse(enumType, val, true);
646 }
647
648 /// <summary>
649 ///
650 /// </summary>
651 /// <param name="assemblyName"></param>
652 /// <param name="projectType"></param>
653 /// <returns></returns>
654 public static string AssemblyFullName(string assemblyName, ProjectType projectType)
655 {
656 return assemblyName + (projectType == ProjectType.Library ? ".dll" : ".exe");
657 }
658
659 #endregion
660 }
661}
diff --git a/Prebuild/src/Core/Utilities/Log.cs b/Prebuild/src/Core/Utilities/Log.cs
deleted file mode 100644
index da2cc96..0000000
--- a/Prebuild/src/Core/Utilities/Log.cs
+++ /dev/null
@@ -1,279 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.IO;
37
38namespace Prebuild.Core.Utilities
39{
40 /// <summary>
41 ///
42 /// </summary>
43 public enum LogType
44 {
45 /// <summary>
46 ///
47 /// </summary>
48 None,
49 /// <summary>
50 ///
51 /// </summary>
52 Info,
53 /// <summary>
54 ///
55 /// </summary>
56 Warning,
57 /// <summary>
58 ///
59 /// </summary>
60 Error
61 }
62
63 /// <summary>
64 ///
65 /// </summary>
66 [Flags]
67 public enum LogTargets
68 {
69 /// <summary>
70 ///
71 /// </summary>
72 None = 0,
73 /// <summary>
74 ///
75 /// </summary>
76 Null = 1,
77 /// <summary>
78 ///
79 /// </summary>
80 File = 2,
81 /// <summary>
82 ///
83 /// </summary>
84 Console = 4
85 }
86
87 /// <summary>
88 /// Summary description for Log.
89 /// </summary>
90 public class Log : IDisposable
91 {
92 #region Fields
93
94 private StreamWriter m_Writer;
95 private LogTargets m_Target = LogTargets.Null;
96 bool disposed;
97
98 #endregion
99
100 #region Constructors
101
102 /// <summary>
103 /// Initializes a new instance of the <see cref="Log"/> class.
104 /// </summary>
105 /// <param name="target">The target.</param>
106 /// <param name="fileName">Name of the file.</param>
107 public Log(LogTargets target, string fileName)
108 {
109 m_Target = target;
110
111 if((m_Target & LogTargets.File) != 0)
112 {
113 m_Writer = new StreamWriter(fileName, false);
114 }
115 }
116
117 #endregion
118
119 #region Public Methods
120
121 /// <summary>
122 /// Writes this instance.
123 /// </summary>
124 public void Write()
125 {
126 Write(string.Empty);
127 }
128
129 /// <summary>
130 /// Writes the specified MSG.
131 /// </summary>
132 /// <param name="msg">The MSG.</param>
133 public void Write(string msg)
134 {
135 if((m_Target & LogTargets.Null) != 0)
136 {
137 return;
138 }
139
140 if((m_Target & LogTargets.Console) != 0)
141 {
142 Console.WriteLine(msg);
143 }
144 if((m_Target & LogTargets.File) != 0 && m_Writer != null)
145 {
146 m_Writer.WriteLine(msg);
147 }
148 }
149
150 /// <summary>
151 /// Writes the specified format.
152 /// </summary>
153 /// <param name="format">The format.</param>
154 /// <param name="args">The args.</param>
155 public void Write(string format, params object[] args)
156 {
157 Write(string.Format(format,args));
158 }
159
160 /// <summary>
161 /// Writes the specified type.
162 /// </summary>
163 /// <param name="type">The type.</param>
164 /// <param name="format">The format.</param>
165 /// <param name="args">The args.</param>
166 public void Write(LogType type, string format, params object[] args)
167 {
168 if((m_Target & LogTargets.Null) != 0)
169 {
170 return;
171 }
172
173 string str = "";
174 switch(type)
175 {
176 case LogType.Info:
177 str = "[I] ";
178 break;
179 case LogType.Warning:
180 str = "[!] ";
181 break;
182 case LogType.Error:
183 str = "[X] ";
184 break;
185 }
186
187 Write(str + format,args);
188 }
189
190 /// <summary>
191 /// Writes the exception.
192 /// </summary>
193 /// <param name="type">The type.</param>
194 /// <param name="ex">The ex.</param>
195 public void WriteException(LogType type, Exception ex)
196 {
197 if(ex != null)
198 {
199 Write(type, ex.Message);
200 //#if DEBUG
201 m_Writer.WriteLine("Exception @{0} stack trace [[", ex.TargetSite.Name);
202 m_Writer.WriteLine(ex.StackTrace);
203 m_Writer.WriteLine("]]");
204 //#endif
205 }
206 }
207
208 /// <summary>
209 /// Flushes this instance.
210 /// </summary>
211 public void Flush()
212 {
213 if(m_Writer != null)
214 {
215 m_Writer.Flush();
216 }
217 }
218
219 #endregion
220
221 #region IDisposable Members
222
223 /// <summary>
224 /// Performs application-defined tasks associated with freeing, releasing, or
225 /// resetting unmanaged resources.
226 /// </summary>
227 public void Dispose()
228 {
229 Dispose(true);
230 GC.SuppressFinalize(this);
231 }
232
233 /// <summary>
234 /// Dispose objects
235 /// </summary>
236 /// <param name="disposing">
237 /// If true, it will dispose close the handle
238 /// </param>
239 /// <remarks>
240 /// Will dispose managed and unmanaged resources.
241 /// </remarks>
242 protected virtual void Dispose(bool disposing)
243 {
244 if (!this.disposed)
245 {
246 if (disposing)
247 {
248 if (m_Writer != null)
249 {
250 m_Writer.Close();
251 m_Writer = null;
252 }
253 }
254 }
255 this.disposed = true;
256 }
257
258 /// <summary>
259 ///
260 /// </summary>
261 ~Log()
262 {
263 this.Dispose(false);
264 }
265
266 /// <summary>
267 /// Closes and destroys this object
268 /// </summary>
269 /// <remarks>
270 /// Same as Dispose(true)
271 /// </remarks>
272 public void Close()
273 {
274 Dispose();
275 }
276
277 #endregion
278 }
279}
diff --git a/Prebuild/src/Core/WarningException.cs b/Prebuild/src/Core/WarningException.cs
deleted file mode 100644
index a200bdc..0000000
--- a/Prebuild/src/Core/WarningException.cs
+++ /dev/null
@@ -1,93 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-01-28 01:49:58 +0100 (lö, 28 jan 2006) $
31 * $Revision: 71 $
32 */
33#endregion
34
35using System;
36using System.Runtime.Serialization;
37
38namespace Prebuild.Core
39{
40 /// <summary>
41 ///
42 /// </summary>
43 [Serializable()]
44 public class WarningException : Exception
45 {
46 #region Constructors
47
48 /// <summary>
49 ///
50 /// </summary>
51 public WarningException()
52 {
53 }
54
55 /// <summary>
56 ///
57 /// </summary>
58 /// <param name="format"></param>
59 /// <param name="args"></param>
60 public WarningException(string format, params object[] args)
61 : base(String.Format(format, args))
62 {
63 }
64
65 /// <summary>
66 /// Exception with specified string
67 /// </summary>
68 /// <param name="message">Exception message</param>
69 public WarningException(string message): base(message)
70 {
71 }
72
73 /// <summary>
74 ///
75 /// </summary>
76 /// <param name="message"></param>
77 /// <param name="exception"></param>
78 public WarningException(string message, Exception exception) : base(message, exception)
79 {
80 }
81
82 /// <summary>
83 ///
84 /// </summary>
85 /// <param name="info"></param>
86 /// <param name="context"></param>
87 protected WarningException(SerializationInfo info, StreamingContext context) : base( info, context )
88 {
89 }
90
91 #endregion
92 }
93}
diff --git a/Prebuild/src/Prebuild.cs b/Prebuild/src/Prebuild.cs
deleted file mode 100644
index 597db68..0000000
--- a/Prebuild/src/Prebuild.cs
+++ /dev/null
@@ -1,165 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2006-09-26 23:43:35 +0200 (ti, 26 sep 2006) $
31 * $Revision: 168 $
32 */
33#endregion
34
35using System;
36using System.Collections.Specialized;
37using System.IO;
38using System.Reflection;
39using System.Runtime.InteropServices;
40using System.EnterpriseServices.Internal;
41
42using Prebuild.Core;
43using Prebuild.Core.Utilities;
44
45namespace Prebuild
46{
47 /// <summary>
48 ///
49 /// </summary>
50 class Prebuild
51 {
52 #region Main
53
54 [STAThread]
55 static void Main(string[] args)
56 {
57 Kernel kernel = null;
58 try
59 {
60 kernel = Kernel.Instance;
61 kernel.Initialize(LogTargets.File | LogTargets.Console, args);
62 bool exit = false;
63
64 if(kernel.CommandLine.WasPassed("usage"))
65 {
66 exit = true;
67 OutputUsage();
68 }
69 if(kernel.CommandLine.WasPassed("showtargets"))
70 {
71 exit = true;
72 OutputTargets(kernel);
73 }
74 if(kernel.CommandLine.WasPassed("install"))
75 {
76 exit = true;
77 InstallAssembly(kernel);
78 }
79 if(kernel.CommandLine.WasPassed("remove"))
80 {
81 exit = true;
82 RemoveAssembly(kernel);
83 }
84
85 if(!exit)
86 {
87 kernel.Process();
88 }
89 }
90 catch(Exception ex)
91 {
92 Console.WriteLine("Unhandled error: {0}", ex.Message);
93 //#if DEBUG
94 Console.WriteLine("{0}", ex.StackTrace);
95 //#endif
96 }
97 finally
98 {
99 if(kernel.PauseAfterFinish)
100 {
101 Console.WriteLine("\nPress enter to continue...");
102 Console.ReadLine();
103 }
104 }
105 }
106
107 #endregion
108
109 #region Private Methods
110
111 private static void InstallAssembly(Kernel kernel)
112 {
113 Publish publish = new Publish();
114 string file = kernel.CommandLine["install"];
115 //Console.WriteLine(".."+file+"..");
116 publish.GacInstall(file);
117 }
118
119 private static void RemoveAssembly(Kernel kernel)
120 {
121 Publish publish = new Publish();
122 string file = kernel.CommandLine["remove"];
123 publish.GacRemove(file);
124 }
125
126 private static void OutputUsage()
127 {
128 Console.WriteLine("Usage: prebuild /target <target> [options]");
129 Console.WriteLine("Available command-line switches:");
130 Console.WriteLine();
131 Console.WriteLine("/target Target for Prebuild");
132 Console.WriteLine("/clean Clean the build files for the given target");
133 Console.WriteLine("/file XML file to process");
134 Console.WriteLine("/log Log file to write to");
135 Console.WriteLine("/ppo Pre-process the file, but perform no other processing");
136 Console.WriteLine("/pause Pauses the application after execution to view the output");
137 Console.WriteLine("/yes Default to yes to any questions asked");
138 Console.WriteLine("/install Install assembly into the GAC");
139 Console.WriteLine("/remove Remove assembly from the GAC");
140 Console.WriteLine();
141 Console.WriteLine("See 'prebuild /showtargets for a list of available targets");
142 Console.WriteLine("See readme.txt or check out http://dnpb.sourceforge.net for more information");
143 Console.WriteLine();
144 }
145
146 private static void OutputTargets(Kernel kern)
147 {
148 Console.WriteLine("Targets available in Prebuild:");
149 Console.WriteLine("");
150 if(kern.Targets.Keys.Count > 0)
151 {
152 string[] targs = new string[kern.Targets.Keys.Count];
153 kern.Targets.Keys.CopyTo(targs, 0);
154 Array.Sort(targs);
155 foreach(string target in targs)
156 {
157 Console.WriteLine(target);
158 }
159 }
160 Console.WriteLine("");
161 }
162
163 #endregion
164 }
165}
diff --git a/Prebuild/src/Prebuild.csproj b/Prebuild/src/Prebuild.csproj
deleted file mode 100644
index c8b859c..0000000
--- a/Prebuild/src/Prebuild.csproj
+++ /dev/null
@@ -1,205 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{92E80C1C-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon>App.ico</ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>Prebuild</AssemblyName>
13 <AssemblyOriginatorKeyFile>Prebuild.snk</AssemblyOriginatorKeyFile>
14 <SignAssembly>true</SignAssembly>
15 <DefaultClientScript>JScript</DefaultClientScript>
16 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
17 <DefaultTargetSchema>IE50</DefaultTargetSchema>
18 <DelaySign>false</DelaySign>
19 <OutputType>Exe</OutputType>
20 <AppDesignerFolder></AppDesignerFolder>
21 <RootNamespace>Prebuild</RootNamespace>
22 <StartupObject>Prebuild.Prebuild</StartupObject>
23 <FileUpgradeFlags>
24 </FileUpgradeFlags>
25 </PropertyGroup>
26 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
27 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
28 <BaseAddress>285212672</BaseAddress>
29 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
30 <ConfigurationOverrideFile>
31 </ConfigurationOverrideFile>
32 <DefineConstants>DEBUG;TRACE</DefineConstants>
33 <DocumentationFile></DocumentationFile>
34 <DebugSymbols>True</DebugSymbols>
35 <FileAlignment>4096</FileAlignment>
36 <Optimize>False</Optimize>
37 <OutputPath>..\..\bin\</OutputPath>
38 <RegisterForComInterop>False</RegisterForComInterop>
39 <RemoveIntegerChecks>False</RemoveIntegerChecks>
40 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
41 <WarningLevel>4</WarningLevel>
42 <NoWarn>1595</NoWarn>
43 </PropertyGroup>
44 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
45 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
46 <BaseAddress>285212672</BaseAddress>
47 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
48 <ConfigurationOverrideFile>
49 </ConfigurationOverrideFile>
50 <DefineConstants>TRACE</DefineConstants>
51 <DocumentationFile></DocumentationFile>
52 <DebugSymbols>False</DebugSymbols>
53 <FileAlignment>4096</FileAlignment>
54 <Optimize>True</Optimize>
55 <OutputPath>..\..\bin\</OutputPath>
56 <RegisterForComInterop>False</RegisterForComInterop>
57 <RemoveIntegerChecks>False</RemoveIntegerChecks>
58 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
59 <WarningLevel>4</WarningLevel>
60 <NoWarn>1595</NoWarn>
61 </PropertyGroup>
62 <ItemGroup>
63 <Reference Include="System" >
64 <HintPath>System.dll</HintPath>
65 <Private>False</Private>
66 </Reference>
67 <Reference Include="System.EnterpriseServices" >
68 <HintPath>System.EnterpriseServices.dll</HintPath>
69 <Private>False</Private>
70 </Reference>
71 <Reference Include="System.Xml" >
72 <HintPath>System.Xml.dll</HintPath>
73 <Private>False</Private>
74 </Reference>
75 </ItemGroup>
76 <ItemGroup>
77 </ItemGroup>
78 <ItemGroup>
79 <EmbeddedResource Include="App.ico">
80 </EmbeddedResource>
81 <EmbeddedResource Include="data\prebuild-1.7.xsd">
82 </EmbeddedResource>
83 <Compile Include="Prebuild.cs">
84 <SubType>Code</SubType>
85 </Compile>
86 <Compile Include="Core\FatalException.cs">
87 <SubType>Code</SubType>
88 </Compile>
89 <Compile Include="Core\Kernel.cs">
90 <SubType>Code</SubType>
91 </Compile>
92 <Compile Include="Core\UnknownLanguageException.cs">
93 <SubType>Code</SubType>
94 </Compile>
95 <Compile Include="Core\WarningException.cs">
96 <SubType>Code</SubType>
97 </Compile>
98 <Compile Include="Core\Attributes\DataNodeAttribute.cs">
99 <SubType>Code</SubType>
100 </Compile>
101 <Compile Include="Core\Attributes\OptionNodeAttribute.cs">
102 <SubType>Code</SubType>
103 </Compile>
104 <Compile Include="Core\Attributes\TargetAttribute.cs">
105 <SubType>Code</SubType>
106 </Compile>
107 <Compile Include="Core\Interfaces\IDataNode.cs">
108 <SubType>Code</SubType>
109 </Compile>
110 <Compile Include="Core\Interfaces\ITarget.cs">
111 <SubType>Code</SubType>
112 </Compile>
113 <Compile Include="Core\Nodes\ConfigurationNode.cs">
114 <SubType>Code</SubType>
115 </Compile>
116 <Compile Include="Core\Nodes\DataNode.cs">
117 <SubType>Code</SubType>
118 </Compile>
119 <Compile Include="Core\Nodes\ExcludeNode.cs">
120 <SubType>Code</SubType>
121 </Compile>
122 <Compile Include="Core\Nodes\FileNode.cs">
123 <SubType>Code</SubType>
124 </Compile>
125 <Compile Include="Core\Nodes\FilesNode.cs">
126 <SubType>Code</SubType>
127 </Compile>
128 <Compile Include="Core\Nodes\MatchNode.cs">
129 <SubType>Code</SubType>
130 </Compile>
131 <Compile Include="Core\Nodes\OptionsNode.cs">
132 <SubType>Code</SubType>
133 </Compile>
134 <Compile Include="Core\Nodes\ProcessNode.cs">
135 <SubType>Code</SubType>
136 </Compile>
137 <Compile Include="Core\Nodes\ProjectNode.cs">
138 <SubType>Code</SubType>
139 </Compile>
140 <Compile Include="Core\Nodes\ReferenceNode.cs">
141 <SubType>Code</SubType>
142 </Compile>
143 <Compile Include="Core\Nodes\ReferencePathNode.cs">
144 <SubType>Code</SubType>
145 </Compile>
146 <Compile Include="Core\Nodes\SolutionNode.cs">
147 <SubType>Code</SubType>
148 </Compile>
149 <Compile Include="Core\Parse\IfContext.cs">
150 <SubType>Code</SubType>
151 </Compile>
152 <Compile Include="Core\Parse\Preprocessor.cs">
153 <SubType>Code</SubType>
154 </Compile>
155 <Compile Include="Core\Targets\AutotoolsTarget.cs">
156 <SubType>Code</SubType>
157 </Compile>
158 <Compile Include="Core\Targets\DebugTarget.cs">
159 <SubType>Code</SubType>
160 </Compile>
161 <Compile Include="Core\Targets\MonoDevelopTarget.cs">
162 <SubType>Code</SubType>
163 </Compile>
164 <Compile Include="Core\Targets\NAntTarget.cs">
165 <SubType>Code</SubType>
166 </Compile>
167 <Compile Include="Core\Targets\SharpDevelop2Target.cs">
168 <SubType>Code</SubType>
169 </Compile>
170 <Compile Include="Core\Targets\SharpDevelopTarget.cs">
171 <SubType>Code</SubType>
172 </Compile>
173 <Compile Include="Core\Targets\VS2002Target.cs">
174 <SubType>Code</SubType>
175 </Compile>
176 <Compile Include="Core\Targets\VS2003Target.cs">
177 <SubType>Code</SubType>
178 </Compile>
179 <Compile Include="Core\Targets\VS2005Target.cs">
180 <SubType>Code</SubType>
181 </Compile>
182 <Compile Include="Core\Utilities\CommandLineCollection.cs">
183 <SubType>Code</SubType>
184 </Compile>
185 <Compile Include="Core\Utilities\CurrentDirectory.cs">
186 <SubType>Code</SubType>
187 </Compile>
188 <Compile Include="Core\Utilities\Helper.cs">
189 <SubType>Code</SubType>
190 </Compile>
191 <Compile Include="Core\Utilities\Log.cs">
192 <SubType>Code</SubType>
193 </Compile>
194 <Compile Include="Properties\AssemblyInfo.cs">
195 <SubType>Code</SubType>
196 </Compile>
197 </ItemGroup>
198 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
199 <PropertyGroup>
200 <PreBuildEvent>
201 </PreBuildEvent>
202 <PostBuildEvent>
203 </PostBuildEvent>
204 </PropertyGroup>
205</Project>
diff --git a/Prebuild/src/Prebuild.exe.build b/Prebuild/src/Prebuild.exe.build
deleted file mode 100644
index 2851125..0000000
--- a/Prebuild/src/Prebuild.exe.build
+++ /dev/null
@@ -1,80 +0,0 @@
1<?xml version="1.0" ?>
2<project name="Prebuild" 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}" keyfile="Prebuild.snk" unsafe="False" define="DEBUG;TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe" win32icon="App.ico">
11 <resources prefix="Prebuild" dynamicprefix="true" >
12 <include name="App.ico" />
13 <include name="data/prebuild-1.7.xsd" />
14 </resources>
15 <sources failonempty="true">
16 <include name="Prebuild.cs" />
17 <include name="Core/FatalException.cs" />
18 <include name="Core/Kernel.cs" />
19 <include name="Core/UnknownLanguageException.cs" />
20 <include name="Core/WarningException.cs" />
21 <include name="Core/Attributes/DataNodeAttribute.cs" />
22 <include name="Core/Attributes/OptionNodeAttribute.cs" />
23 <include name="Core/Attributes/TargetAttribute.cs" />
24 <include name="Core/Interfaces/IDataNode.cs" />
25 <include name="Core/Interfaces/ITarget.cs" />
26 <include name="Core/Nodes/ConfigurationNode.cs" />
27 <include name="Core/Nodes/DataNode.cs" />
28 <include name="Core/Nodes/ExcludeNode.cs" />
29 <include name="Core/Nodes/FileNode.cs" />
30 <include name="Core/Nodes/FilesNode.cs" />
31 <include name="Core/Nodes/MatchNode.cs" />
32 <include name="Core/Nodes/OptionsNode.cs" />
33 <include name="Core/Nodes/ProcessNode.cs" />
34 <include name="Core/Nodes/ProjectNode.cs" />
35 <include name="Core/Nodes/ReferenceNode.cs" />
36 <include name="Core/Nodes/ReferencePathNode.cs" />
37 <include name="Core/Nodes/SolutionNode.cs" />
38 <include name="Core/Parse/IfContext.cs" />
39 <include name="Core/Parse/Preprocessor.cs" />
40 <include name="Core/Targets/AutotoolsTarget.cs" />
41 <include name="Core/Targets/DebugTarget.cs" />
42 <include name="Core/Targets/MonoDevelopTarget.cs" />
43 <include name="Core/Targets/NAntTarget.cs" />
44 <include name="Core/Targets/SharpDevelop2Target.cs" />
45 <include name="Core/Targets/SharpDevelopTarget.cs" />
46 <include name="Core/Targets/VS2002Target.cs" />
47 <include name="Core/Targets/VS2003Target.cs" />
48 <include name="Core/Targets/VS2005Target.cs" />
49 <include name="Core/Utilities/CommandLineCollection.cs" />
50 <include name="Core/Utilities/CurrentDirectory.cs" />
51 <include name="Core/Utilities/Helper.cs" />
52 <include name="Core/Utilities/Log.cs" />
53 <include name="Properties/AssemblyInfo.cs" />
54 </sources>
55 <references basedir="${project::get-base-directory()}">
56 <lib>
57 <include name="${project::get-base-directory()}" />
58 <include name="${project::get-base-directory()}/${build.dir}" />
59 </lib>
60 <include name="System.dll" />
61 <include name="System.EnterpriseServices.dll" />
62 <include name="System.Xml.dll" />
63 </references>
64 </csc>
65 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
66 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
67 <copy todir="${project::get-base-directory()}/../../bin/">
68 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
69 <include name="*.dll"/>
70 <include name="*.exe"/>
71 </fileset>
72 </copy>
73 </target>
74 <target name="clean">
75 <delete dir="${bin.dir}" failonerror="false" />
76 <delete dir="${obj.dir}" failonerror="false" />
77 </target>
78 <target name="doc" description="Creates documentation.">
79 </target>
80</project>
diff --git a/Prebuild/src/Prebuild.snk b/Prebuild/src/Prebuild.snk
deleted file mode 100644
index f9dce05..0000000
--- a/Prebuild/src/Prebuild.snk
+++ /dev/null
Binary files differ
diff --git a/Prebuild/src/Properties/AssemblyInfo.cs b/Prebuild/src/Properties/AssemblyInfo.cs
deleted file mode 100644
index bfa9829..0000000
--- a/Prebuild/src/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,101 +0,0 @@
1#region BSD License
2/*
3Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com)
4
5Redistribution and use in source and binary forms, with or without modification, are permitted
6provided that the following conditions are met:
7
8* Redistributions of source code must retain the above copyright notice, this list of conditions
9 and the following disclaimer.
10* Redistributions in binary form must reproduce the above copyright notice, this list of conditions
11 and the following disclaimer in the documentation and/or other materials provided with the
12 distribution.
13* The name of the author may not be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
17BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
22IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23*/
24#endregion
25
26#region CVS Information
27/*
28 * $Source$
29 * $Author: jendave $
30 * $Date: 2007-01-26 19:31:34 +0100 (fr, 26 jan 2007) $
31 * $Revision: 203 $
32 */
33#endregion
34
35using System;
36using System.Reflection;
37using System.Runtime.CompilerServices;
38using System.Runtime.InteropServices;
39using System.Security.Permissions;
40using System.Resources;
41
42
43// FxCop recommended attributes
44[assembly: ComVisible(false)]
45[assembly: FileIOPermission(SecurityAction.RequestMinimum, Unrestricted=true)]
46[assembly: CLSCompliant(true)]
47
48//
49// General Information about an assembly is controlled through the following
50// set of attributes. Change these attribute values to modify the information
51// associated with an assembly.
52//
53[assembly: AssemblyTitle(".NET Prebuild")]
54[assembly: AssemblyDescription("A .NET project file build tool")]
55[assembly: AssemblyConfiguration(".NET CLR")]
56[assembly: AssemblyCompany("The Prebuild Project")]
57[assembly: AssemblyProduct("")]
58[assembly: AssemblyCopyright("Copyright 2004-2006 Matthew Holmes, Dan Moorehead and David Hudson")]
59[assembly: AssemblyTrademark("")]
60[assembly: AssemblyCulture("")]
61[assembly: NeutralResourcesLanguageAttribute("en-US")]
62[assembly: AssemblyVersion("2.0.0.*")]
63
64//
65// Version information for an assembly consists of the following four values:
66//
67// Major Version
68// Minor Version
69// Build Number
70// Revision
71//
72// You can specify all the values or you can default the Revision and Build Numbers
73// by using the '*' as shown below:
74
75//
76// In order to sign your assembly you must specify a key to use. Refer to the
77// Microsoft .NET Framework documentation for more information on assembly signing.
78//
79// Use the attributes below to control which key is used for signing.
80//
81// Notes:
82// (*) If no key is specified, the assembly is not signed.
83// (*) KeyName refers to a key that has been installed in the Crypto Service
84// Provider (CSP) on your machine. KeyFile refers to a file which contains
85// a key.
86// (*) If the KeyFile and the KeyName values are both specified, the
87// following processing occurs:
88// (1) If the KeyName can be found in the CSP, that key is used.
89// (2) If the KeyName does not exist and the KeyFile does exist, the key
90// in the KeyFile is installed into the CSP and used.
91// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
92// When specifying the KeyFile, the location of the KeyFile should be
93// relative to the project output directory which is
94// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
95// located in the project directory, you would specify the AssemblyKeyFile
96// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
97// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
98// documentation for more information on this.
99//
100[assembly: AssemblyDelaySign(false)]
101[assembly: AssemblyKeyName("")]
diff --git a/Prebuild/src/data/dnpb-1.0.xsd b/Prebuild/src/data/dnpb-1.0.xsd
deleted file mode 100644
index 45cab86..0000000
--- a/Prebuild/src/data/dnpb-1.0.xsd
+++ /dev/null
@@ -1,183 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.0.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.0.xsd"
6>
7 <xs:annotation>
8 <xs:documentation>
9 Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.com)
10
11 Redistribution and use in source and binary forms, with or without modification, are permitted
12 provided that the following conditions are met:
13
14 * Redistributions of source code must retain the above copyright notice, this list of conditions
15 and the following disclaimer.
16 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
17 and the following disclaimer in the documentation and/or other materials provided with the
18 distribution.
19 * The name of the author may not be used to endorse or promote products derived from this software
20 without specific prior written permission.
21
22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
23 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 </xs:documentation>
30 </xs:annotation>
31
32 <xs:element name="DNPreBuild">
33 <xs:complexType>
34 <xs:sequence>
35 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
36 <xs:element ref="Solution" minOccurs="1" maxOccurs="unbounded" />
37 </xs:sequence>
38
39 <xs:attribute name="version" use="required" />
40 </xs:complexType>
41 </xs:element>
42
43 <xs:element name="Process" type="xs:string" />
44
45 <xs:element name="Solution">
46 <xs:complexType>
47 <xs:sequence>
48 <xs:element ref="Options" minOccurs="0" />
49 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
50 <xs:element ref="Files" minOccurs="0" />
51 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
52 </xs:sequence>
53
54 <xs:attribute name="name" type="xs:string" use="required" />
55 <xs:attribute name="path" type="xs:string" default="" />
56 </xs:complexType>
57 </xs:element>
58
59 <xs:element name="Project">
60 <xs:complexType>
61 <xs:sequence>
62 <xs:element name="Reference" maxOccurs="unbounded">
63 <xs:complexType>
64 <xs:attribute name="name" type="xs:string" use="required" />
65 <xs:attribute name="path" type="xs:string" />
66 <xs:attribute name="localCopy" type="xs:boolean" />
67 <xs:attribute name="version" type="xs:string" />
68 </xs:complexType>
69 </xs:element>
70
71 <xs:element ref="Files" />
72 </xs:sequence>
73
74 <xs:attribute name="name" type="xs:string" use="required" />
75 <xs:attribute name="path" type="xs:string" default="" />
76
77 <xs:attribute name="language" default="C#">
78 <xs:simpleType>
79 <xs:restriction base="xs:string">
80 <xs:enumeration value="C#" />
81 <xs:enumeration value="VB.NET" />
82 </xs:restriction>
83 </xs:simpleType>
84 </xs:attribute>
85
86 <xs:attribute name="type" default="Exe">
87 <xs:simpleType>
88 <xs:restriction base="xs:string">
89 <xs:enumeration value="Exe" />
90 <xs:enumeration value="WinExe" />
91 <xs:enumeration value="Library" />
92 </xs:restriction>
93 </xs:simpleType>
94 </xs:attribute>
95
96 <xs:attribute name="runtime" default="Microsoft">
97 <xs:simpleType>
98 <xs:restriction base="xs:string">
99 <xs:enumeration value="Microsoft" />
100 <xs:enumeration value="Mono" />
101 </xs:restriction>
102 </xs:simpleType>
103 </xs:attribute>
104
105 <xs:attribute name="startupObject" type="xs:string" default="" />
106 </xs:complexType>
107 </xs:element>
108
109 <xs:element name="Configuration">
110 <xs:complexType>
111 <xs:all>
112 <xs:element ref="Options" minOccurs="0" />
113 </xs:all>
114
115 <xs:attribute name="name" type="xs:string" use="required" />
116 </xs:complexType>
117 </xs:element>
118
119 <xs:element name="Options">
120 <xs:complexType>
121 <xs:sequence>
122 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
123 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
124 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
125 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
126 <xs:element name="WarningLevel" minOccurs="0">
127 <xs:simpleType>
128 <xs:restriction base="xs:integer">
129 <xs:minInclusive value="0" />
130 <xs:maxInclusive value="4"/>
131 </xs:restriction>
132 </xs:simpleType>
133 </xs:element>
134 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
135 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
136 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
137 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
138 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
139 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
140 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
141 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
142 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
143 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
144 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
145 </xs:sequence>
146 </xs:complexType>
147 </xs:element>
148
149 <xs:element name="Files">
150 <xs:complexType>
151 <xs:sequence>
152 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
153 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
154 </xs:sequence>
155 </xs:complexType>
156 </xs:element>
157
158 <xs:element name="File">
159 <xs:complexType>
160 <xs:simpleContent>
161 <xs:extension base="xs:string">
162 <xs:attribute name="buildAction" default="Compile">
163 <xs:simpleType>
164 <xs:restriction base="xs:string">
165 <xs:enumeration value="Compile" />
166 <xs:enumeration value="Content" />
167 <xs:enumeration value="EmbeddedResource" />
168 </xs:restriction>
169 </xs:simpleType>
170 </xs:attribute>
171 </xs:extension>
172 </xs:simpleContent>
173 </xs:complexType>
174 </xs:element>
175
176 <xs:element name="Match">
177 <xs:complexType>
178 <xs:attribute name="path" type="xs:string" use="required" />
179 <xs:attribute name="pattern" type="xs:string" use="required" />
180 <xs:attribute name="recurse" type="xs:boolean" default="false" />
181 </xs:complexType>
182 </xs:element>
183</xs:schema> \ No newline at end of file
diff --git a/Prebuild/src/data/dnpb-1.1.xsd b/Prebuild/src/data/dnpb-1.1.xsd
deleted file mode 100644
index c402ceb..0000000
--- a/Prebuild/src/data/dnpb-1.1.xsd
+++ /dev/null
@@ -1,184 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.1.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.1.xsd"
6>
7 <xs:annotation>
8 <xs:documentation>
9 Copyright (c) 2004 Matthew Holmes (kerion@houston.rr.com)
10
11 Redistribution and use in source and binary forms, with or without modification, are permitted
12 provided that the following conditions are met:
13
14 * Redistributions of source code must retain the above copyright notice, this list of conditions
15 and the following disclaimer.
16 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
17 and the following disclaimer in the documentation and/or other materials provided with the
18 distribution.
19 * The name of the author may not be used to endorse or promote products derived from this software
20 without specific prior written permission.
21
22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
23 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 </xs:documentation>
30 </xs:annotation>
31
32 <xs:element name="DNPreBuild">
33 <xs:complexType>
34 <xs:sequence>
35 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
36 <xs:element ref="Solution" minOccurs="1" maxOccurs="unbounded" />
37 </xs:sequence>
38
39 <xs:attribute name="version" use="required" />
40 </xs:complexType>
41 </xs:element>
42
43 <xs:element name="Process" type="xs:string" />
44
45 <xs:element name="Solution">
46 <xs:complexType>
47 <xs:sequence>
48 <xs:element ref="Options" minOccurs="0" />
49 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
50 <xs:element ref="Files" minOccurs="0" />
51 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
52 </xs:sequence>
53
54 <xs:attribute name="name" type="xs:string" use="required" />
55 <xs:attribute name="path" type="xs:string" default="" />
56 </xs:complexType>
57 </xs:element>
58
59 <xs:element name="Project">
60 <xs:complexType>
61 <xs:sequence>
62 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
63
64 <xs:element name="Reference" maxOccurs="unbounded">
65 <xs:complexType>
66 <xs:attribute name="name" type="xs:string" use="required" />
67 <xs:attribute name="path" type="xs:string" />
68 <xs:attribute name="localCopy" type="xs:boolean" />
69 <xs:attribute name="version" type="xs:string" />
70 </xs:complexType>
71 </xs:element>
72
73 <xs:element ref="Files" />
74 </xs:sequence>
75
76 <xs:attribute name="name" type="xs:string" use="required" />
77 <xs:attribute name="path" type="xs:string" default="" />
78
79 <xs:attribute name="language" default="C#">
80 <xs:simpleType>
81 <xs:restriction base="xs:string">
82 <xs:enumeration value="C#" />
83 <xs:enumeration value="VB.NET" />
84 </xs:restriction>
85 </xs:simpleType>
86 </xs:attribute>
87
88 <xs:attribute name="type" default="Exe">
89 <xs:simpleType>
90 <xs:restriction base="xs:string">
91 <xs:enumeration value="Exe" />
92 <xs:enumeration value="WinExe" />
93 <xs:enumeration value="Library" />
94 </xs:restriction>
95 </xs:simpleType>
96 </xs:attribute>
97
98 <xs:attribute name="runtime" default="Microsoft">
99 <xs:simpleType>
100 <xs:restriction base="xs:string">
101 <xs:enumeration value="Microsoft" />
102 <xs:enumeration value="Mono" />
103 </xs:restriction>
104 </xs:simpleType>
105 </xs:attribute>
106
107 <xs:attribute name="startupObject" type="xs:string" default="" />
108 </xs:complexType>
109 </xs:element>
110
111 <xs:element name="Configuration">
112 <xs:complexType>
113 <xs:all>
114 <xs:element ref="Options" minOccurs="0" />
115 </xs:all>
116
117 <xs:attribute name="name" type="xs:string" use="required" />
118 </xs:complexType>
119 </xs:element>
120
121 <xs:element name="Options">
122 <xs:complexType>
123 <xs:sequence>
124 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
125 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
126 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
127 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
128 <xs:element name="WarningLevel" minOccurs="0">
129 <xs:simpleType>
130 <xs:restriction base="xs:integer">
131 <xs:minInclusive value="0" />
132 <xs:maxInclusive value="4"/>
133 </xs:restriction>
134 </xs:simpleType>
135 </xs:element>
136 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
137 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
138 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
139 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
140 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
141 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
142 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
143 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
144 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
145 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
146 </xs:sequence>
147 </xs:complexType>
148 </xs:element>
149
150 <xs:element name="Files">
151 <xs:complexType>
152 <xs:sequence>
153 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
154 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
155 </xs:sequence>
156 </xs:complexType>
157 </xs:element>
158
159 <xs:element name="File">
160 <xs:complexType>
161 <xs:simpleContent>
162 <xs:extension base="xs:string">
163 <xs:attribute name="buildAction" default="Compile">
164 <xs:simpleType>
165 <xs:restriction base="xs:string">
166 <xs:enumeration value="Compile" />
167 <xs:enumeration value="Content" />
168 <xs:enumeration value="EmbeddedResource" />
169 </xs:restriction>
170 </xs:simpleType>
171 </xs:attribute>
172 </xs:extension>
173 </xs:simpleContent>
174 </xs:complexType>
175 </xs:element>
176
177 <xs:element name="Match">
178 <xs:complexType>
179 <xs:attribute name="path" type="xs:string" use="required" />
180 <xs:attribute name="pattern" type="xs:string" use="required" />
181 <xs:attribute name="recurse" type="xs:boolean" default="false" />
182 </xs:complexType>
183 </xs:element>
184</xs:schema> \ No newline at end of file
diff --git a/Prebuild/src/data/dnpb-1.2.xsd b/Prebuild/src/data/dnpb-1.2.xsd
deleted file mode 100644
index 8004af7..0000000
--- a/Prebuild/src/data/dnpb-1.2.xsd
+++ /dev/null
@@ -1,198 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.2.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.2.xsd"
6>
7 <xs:annotation>
8 <xs:documentation>
9 Copyright (c) 2004 Matthew Holmes (calefaction _at_ houston _._ rr _._ com)
10
11 Redistribution and use in source and binary forms, with or without modification, are permitted
12 provided that the following conditions are met:
13
14 * Redistributions of source code must retain the above copyright notice, this list of conditions
15 and the following disclaimer.
16 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
17 and the following disclaimer in the documentation and/or other materials provided with the
18 distribution.
19 * The name of the author may not be used to endorse or promote products derived from this software
20 without specific prior written permission.
21
22 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
23 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 </xs:documentation>
30 </xs:annotation>
31
32 <xs:element name="DNPreBuild">
33 <xs:complexType>
34 <xs:sequence>
35 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
36 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
37 </xs:sequence>
38
39 <xs:attribute name="version" use="required" />
40 </xs:complexType>
41 </xs:element>
42
43 <xs:element name="Process" type="xs:string" />
44
45 <xs:element name="Solution">
46 <xs:complexType>
47 <xs:sequence>
48 <xs:element ref="Options" minOccurs="0" />
49 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
50 <xs:element ref="Files" minOccurs="0" />
51 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
52 </xs:sequence>
53
54 <xs:attribute name="name" type="xs:string" use="required" />
55 <xs:attribute name="path" type="xs:string" default="" />
56 </xs:complexType>
57 </xs:element>
58
59 <xs:element name="Project">
60 <xs:complexType>
61 <xs:sequence>
62 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
63
64 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
65
66 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
67 <xs:complexType>
68 <xs:attribute name="name" type="xs:string" use="required" />
69 <xs:attribute name="path" type="xs:string" />
70 <xs:attribute name="localCopy" type="xs:boolean" />
71 <xs:attribute name="version" type="xs:string" />
72 </xs:complexType>
73 </xs:element>
74
75 <xs:element ref="Files" />
76 </xs:sequence>
77
78 <xs:attribute name="name" type="xs:string" use="required" />
79 <xs:attribute name="path" type="xs:string" default="" />
80
81 <xs:attribute name="language" default="C#">
82 <xs:simpleType>
83 <xs:restriction base="xs:string">
84 <xs:enumeration value="C#" />
85 <xs:enumeration value="VB.NET" />
86 </xs:restriction>
87 </xs:simpleType>
88 </xs:attribute>
89
90 <xs:attribute name="type" default="Exe">
91 <xs:simpleType>
92 <xs:restriction base="xs:string">
93 <xs:enumeration value="Exe" />
94 <xs:enumeration value="WinExe" />
95 <xs:enumeration value="Library" />
96 </xs:restriction>
97 </xs:simpleType>
98 </xs:attribute>
99
100 <xs:attribute name="runtime" default="Microsoft">
101 <xs:simpleType>
102 <xs:restriction base="xs:string">
103 <xs:enumeration value="Microsoft" />
104 <xs:enumeration value="Mono" />
105 </xs:restriction>
106 </xs:simpleType>
107 </xs:attribute>
108
109 <xs:attribute name="startupObject" type="xs:string" default="" />
110 <xs:attribute name="rootNamespace" type="xs:string" />
111 <xs:attribute name="assemblyName" type="xs:string" />
112 </xs:complexType>
113 </xs:element>
114
115 <xs:element name="Configuration">
116 <xs:complexType>
117 <xs:all>
118 <xs:element ref="Options" minOccurs="0" />
119 </xs:all>
120
121 <xs:attribute name="name" type="xs:string" use="required" />
122 </xs:complexType>
123 </xs:element>
124
125 <xs:element name="Options">
126 <xs:complexType>
127 <xs:all>
128 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
129 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
130 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
131 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
132 <xs:element name="WarningLevel" minOccurs="0">
133 <xs:simpleType>
134 <xs:restriction base="xs:integer">
135 <xs:minInclusive value="0" />
136 <xs:maxInclusive value="4"/>
137 </xs:restriction>
138 </xs:simpleType>
139 </xs:element>
140 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
141 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
142 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
143 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
144 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
145 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
146 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
147 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
148 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
149 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
150 </xs:all>
151 </xs:complexType>
152 </xs:element>
153
154 <xs:element name="Files">
155 <xs:complexType>
156 <xs:sequence>
157 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
158 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
159 </xs:sequence>
160 </xs:complexType>
161 </xs:element>
162
163 <xs:element name="File">
164 <xs:complexType>
165 <xs:simpleContent>
166 <xs:extension base="xs:string">
167 <xs:attribute name="buildAction" default="Compile">
168 <xs:simpleType>
169 <xs:restriction base="xs:string">
170 <xs:enumeration value="Compile" />
171 <xs:enumeration value="Content" />
172 <xs:enumeration value="EmbeddedResource" />
173 </xs:restriction>
174 </xs:simpleType>
175 </xs:attribute>
176 </xs:extension>
177 </xs:simpleContent>
178 </xs:complexType>
179 </xs:element>
180
181 <xs:element name="Match">
182 <xs:complexType>
183 <xs:attribute name="path" type="xs:string" use="required" />
184 <xs:attribute name="pattern" type="xs:string" use="required" />
185 <xs:attribute name="recurse" type="xs:boolean" default="false" />
186 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
187 <xs:attribute name="buildAction" default="Compile">
188 <xs:simpleType>
189 <xs:restriction base="xs:string">
190 <xs:enumeration value="Compile" />
191 <xs:enumeration value="Content" />
192 <xs:enumeration value="EmbeddedResource" />
193 </xs:restriction>
194 </xs:simpleType>
195 </xs:attribute>
196 </xs:complexType>
197 </xs:element>
198</xs:schema> \ No newline at end of file
diff --git a/Prebuild/src/data/dnpb-1.3.xsd b/Prebuild/src/data/dnpb-1.3.xsd
deleted file mode 100644
index 5f8ada1..0000000
--- a/Prebuild/src/data/dnpb-1.3.xsd
+++ /dev/null
@@ -1,206 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.3.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.3.xsd"
6>
7 <xs:annotation>
8 <xs:documentation>
9 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com)
10
11 .NET Pre-Build is an XML-driven pre-build tool allowing developers to
12 easily generate project or make files for major IDE's and .NET
13 development tools including: Visual Studio 2003, Visual Studio 2002,
14 SharpDevelop, MonoDevelop, and NAnt.
15
16 BSD License:
17
18 Redistribution and use in source and binary forms, with or without modification, are permitted
19 provided that the following conditions are met:
20
21 * Redistributions of source code must retain the above copyright notice, this list of conditions
22 and the following disclaimer.
23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
24 and the following disclaimer in the documentation and/or other materials provided with the
25 distribution.
26 * The name of the author may not be used to endorse or promote products derived from this software
27 without specific prior written permission.
28
29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 </xs:documentation>
37 </xs:annotation>
38
39 <xs:element name="DNPreBuild">
40 <xs:complexType>
41 <xs:sequence>
42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
43 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
44 </xs:sequence>
45
46 <xs:attribute name="version" use="required" />
47 </xs:complexType>
48 </xs:element>
49
50 <xs:element name="Process" type="xs:string" />
51
52 <xs:element name="Solution">
53 <xs:complexType>
54 <xs:sequence>
55 <xs:element ref="Options" minOccurs="0" />
56 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
57 <xs:element ref="Files" minOccurs="0" />
58 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
59 </xs:sequence>
60
61 <xs:attribute name="name" type="xs:string" use="required" />
62 <xs:attribute name="path" type="xs:string" default="" />
63 </xs:complexType>
64 </xs:element>
65
66 <xs:element name="Project">
67 <xs:complexType>
68 <xs:sequence>
69 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
70
71 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
72
73 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
74 <xs:complexType>
75 <xs:attribute name="name" type="xs:string" use="required" />
76 <xs:attribute name="path" type="xs:string" />
77 <xs:attribute name="localCopy" type="xs:boolean" />
78 <xs:attribute name="version" type="xs:string" />
79 </xs:complexType>
80 </xs:element>
81
82 <xs:element ref="Files" />
83 </xs:sequence>
84
85 <xs:attribute name="name" type="xs:string" use="required" />
86 <xs:attribute name="path" type="xs:string" default="" />
87 <xs:attribute name="icon" type="xs:string" default="" />
88
89 <xs:attribute name="language" default="C#">
90 <xs:simpleType>
91 <xs:restriction base="xs:string">
92 <xs:enumeration value="C#" />
93 <xs:enumeration value="VB.NET" />
94 </xs:restriction>
95 </xs:simpleType>
96 </xs:attribute>
97
98 <xs:attribute name="type" default="Exe">
99 <xs:simpleType>
100 <xs:restriction base="xs:string">
101 <xs:enumeration value="Exe" />
102 <xs:enumeration value="WinExe" />
103 <xs:enumeration value="Library" />
104 </xs:restriction>
105 </xs:simpleType>
106 </xs:attribute>
107
108 <xs:attribute name="runtime" default="Microsoft">
109 <xs:simpleType>
110 <xs:restriction base="xs:string">
111 <xs:enumeration value="Microsoft" />
112 <xs:enumeration value="Mono" />
113 </xs:restriction>
114 </xs:simpleType>
115 </xs:attribute>
116
117 <xs:attribute name="startupObject" type="xs:string" default="" />
118 <xs:attribute name="rootNamespace" type="xs:string" />
119 <xs:attribute name="assemblyName" type="xs:string" />
120 </xs:complexType>
121 </xs:element>
122
123 <xs:element name="Configuration">
124 <xs:complexType>
125 <xs:all>
126 <xs:element ref="Options" minOccurs="0" />
127 </xs:all>
128
129 <xs:attribute name="name" type="xs:string" use="required" />
130 </xs:complexType>
131 </xs:element>
132
133 <xs:element name="Options">
134 <xs:complexType>
135 <xs:all>
136 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
137 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
138 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
139 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
140 <xs:element name="WarningLevel" minOccurs="0">
141 <xs:simpleType>
142 <xs:restriction base="xs:integer">
143 <xs:minInclusive value="0" />
144 <xs:maxInclusive value="4"/>
145 </xs:restriction>
146 </xs:simpleType>
147 </xs:element>
148 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
149 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
150 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
151 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
152 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
153 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
154 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
155 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
156 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
157 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
158 </xs:all>
159 </xs:complexType>
160 </xs:element>
161
162 <xs:element name="Files">
163 <xs:complexType>
164 <xs:sequence>
165 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
166 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
167 </xs:sequence>
168 </xs:complexType>
169 </xs:element>
170
171 <xs:element name="File">
172 <xs:complexType>
173 <xs:simpleContent>
174 <xs:extension base="xs:string">
175 <xs:attribute name="buildAction" default="Compile">
176 <xs:simpleType>
177 <xs:restriction base="xs:string">
178 <xs:enumeration value="Compile" />
179 <xs:enumeration value="Content" />
180 <xs:enumeration value="EmbeddedResource" />
181 </xs:restriction>
182 </xs:simpleType>
183 </xs:attribute>
184 </xs:extension>
185 </xs:simpleContent>
186 </xs:complexType>
187 </xs:element>
188
189 <xs:element name="Match">
190 <xs:complexType>
191 <xs:attribute name="path" type="xs:string" />
192 <xs:attribute name="pattern" type="xs:string" use="required" />
193 <xs:attribute name="recurse" type="xs:boolean" default="false" />
194 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
195 <xs:attribute name="buildAction" default="Compile">
196 <xs:simpleType>
197 <xs:restriction base="xs:string">
198 <xs:enumeration value="Compile" />
199 <xs:enumeration value="Content" />
200 <xs:enumeration value="EmbeddedResource" />
201 </xs:restriction>
202 </xs:simpleType>
203 </xs:attribute>
204 </xs:complexType>
205 </xs:element>
206</xs:schema> \ No newline at end of file
diff --git a/Prebuild/src/data/dnpb-1.4.xsd b/Prebuild/src/data/dnpb-1.4.xsd
deleted file mode 100644
index 54f9ac0..0000000
--- a/Prebuild/src/data/dnpb-1.4.xsd
+++ /dev/null
@@ -1,212 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.4.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.4.xsd"
6>
7 <xs:annotation>
8 <xs:documentation>
9 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com)
10
11 .NET Prebuild is a cross-platform XML-driven pre-build tool which
12 allows developers to easily generate project or make files for major
13 IDE's and .NET development tools including: Visual Studio .NET 2002 and
14 2003, SharpDevelop, MonoDevelop, and NAnt.
15
16 BSD License:
17
18 Redistribution and use in source and binary forms, with or without modification, are permitted
19 provided that the following conditions are met:
20
21 * Redistributions of source code must retain the above copyright notice, this list of conditions
22 and the following disclaimer.
23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
24 and the following disclaimer in the documentation and/or other materials provided with the
25 distribution.
26 * The name of the author may not be used to endorse or promote products derived from this software
27 without specific prior written permission.
28
29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 </xs:documentation>
37 </xs:annotation>
38
39 <xs:element name="DNPreBuild">
40 <xs:complexType>
41 <xs:sequence>
42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
43 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
44 </xs:sequence>
45
46 <xs:attribute name="version" />
47 <xs:attribute name="checkOsVars" />
48 </xs:complexType>
49 </xs:element>
50
51 <xs:element name="Process" type="xs:string" />
52
53 <xs:element name="Solution">
54 <xs:complexType>
55 <xs:sequence>
56 <xs:element ref="Options" minOccurs="0" />
57 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
58 <xs:element ref="Files" minOccurs="0" />
59 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
60 </xs:sequence>
61
62 <xs:attribute name="name" type="xs:string" use="required" />
63 <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
64 <xs:attribute name="path" type="xs:string" default="" />
65 </xs:complexType>
66 </xs:element>
67
68 <xs:element name="Project">
69 <xs:complexType>
70 <xs:sequence>
71 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
72
73 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
74
75 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
76 <xs:complexType>
77 <xs:attribute name="name" type="xs:string" use="required" />
78 <xs:attribute name="path" type="xs:string" />
79 <xs:attribute name="localCopy" type="xs:boolean" />
80 <xs:attribute name="version" type="xs:string" />
81 </xs:complexType>
82 </xs:element>
83
84 <xs:element ref="Files" />
85 </xs:sequence>
86
87 <xs:attribute name="name" type="xs:string" use="required" />
88 <xs:attribute name="path" type="xs:string" default="" />
89 <xs:attribute name="icon" type="xs:string" default="" />
90
91 <xs:attribute name="language" default="C#">
92 <xs:simpleType>
93 <xs:restriction base="xs:string">
94 <xs:enumeration value="C#" />
95 <xs:enumeration value="VB.NET" />
96 </xs:restriction>
97 </xs:simpleType>
98 </xs:attribute>
99
100 <xs:attribute name="type" default="Exe">
101 <xs:simpleType>
102 <xs:restriction base="xs:string">
103 <xs:enumeration value="Exe" />
104 <xs:enumeration value="WinExe" />
105 <xs:enumeration value="Library" />
106 </xs:restriction>
107 </xs:simpleType>
108 </xs:attribute>
109
110 <xs:attribute name="runtime" default="Microsoft">
111 <xs:simpleType>
112 <xs:restriction base="xs:string">
113 <xs:enumeration value="Microsoft" />
114 <xs:enumeration value="Mono" />
115 </xs:restriction>
116 </xs:simpleType>
117 </xs:attribute>
118
119 <xs:attribute name="startupObject" type="xs:string" default="" />
120 <xs:attribute name="rootNamespace" type="xs:string" />
121 <xs:attribute name="assemblyName" type="xs:string" />
122 </xs:complexType>
123 </xs:element>
124
125 <xs:element name="Configuration">
126 <xs:complexType>
127 <xs:sequence>
128 <xs:element ref="Options" minOccurs="0" />
129 </xs:sequence>
130
131 <xs:attribute name="name" type="xs:string" use="required" />
132 </xs:complexType>
133 </xs:element>
134
135 <xs:element name="Options">
136 <xs:complexType>
137 <xs:all>
138 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
139 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
140 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
141 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
142 <xs:element name="WarningLevel" minOccurs="0">
143 <xs:simpleType>
144 <xs:restriction base="xs:integer">
145 <xs:minInclusive value="0" />
146 <xs:maxInclusive value="4"/>
147 </xs:restriction>
148 </xs:simpleType>
149 </xs:element>
150 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
151 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
152 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
153 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
154 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
155 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
156 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
157 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
158 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
159 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
160 </xs:all>
161 </xs:complexType>
162 </xs:element>
163
164 <xs:element name="Files">
165 <xs:complexType>
166 <xs:sequence>
167 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
168 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
169 </xs:sequence>
170 </xs:complexType>
171 </xs:element>
172
173 <xs:element name="File">
174 <xs:complexType>
175 <xs:simpleContent>
176 <xs:extension base="xs:string">
177 <xs:attribute name="buildAction" default="Compile">
178 <xs:simpleType>
179 <xs:restriction base="xs:string">
180 <xs:enumeration value="None" />
181 <xs:enumeration value="Compile" />
182 <xs:enumeration value="Content" />
183 <xs:enumeration value="EmbeddedResource" />
184 </xs:restriction>
185 </xs:simpleType>
186 </xs:attribute>
187 </xs:extension>
188 </xs:simpleContent>
189 </xs:complexType>
190 </xs:element>
191
192 <xs:element name="Match">
193 <xs:complexType>
194 <xs:attribute name="path" type="xs:string" />
195 <xs:attribute name="pattern" type="xs:string" use="required" />
196 <xs:attribute name="recurse" type="xs:boolean" default="false" />
197 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
198 <xs:attribute name="buildAction" default="Compile">
199 <xs:simpleType>
200 <xs:restriction base="xs:string">
201 <xs:enumeration value="None" />
202 <xs:enumeration value="Compile" />
203 <xs:enumeration value="Content" />
204 <xs:enumeration value="EmbeddedResource" />
205 </xs:restriction>
206 </xs:simpleType>
207 </xs:attribute>
208 </xs:complexType>
209 </xs:element>
210</xs:schema>
211
212
diff --git a/Prebuild/src/data/dnpb-1.5.xsd b/Prebuild/src/data/dnpb-1.5.xsd
deleted file mode 100644
index 2270e83..0000000
--- a/Prebuild/src/data/dnpb-1.5.xsd
+++ /dev/null
@@ -1,215 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified"
3 xmlns:xs="http://www.w3.org/2001/XMLSchema"
4 targetNamespace="http://dnpb.sourceforge.net/schemas/dnpb-1.5.xsd"
5 xmlns="http://dnpb.sourceforge.net/schemas/dnpb-1.5.xsd"
6>
7 <xs:annotation>
8 <xs:documentation>
9 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com)
10
11 .NET Prebuild is a cross-platform XML-driven pre-build tool which
12 allows developers to easily generate project or make files for major
13 IDE's and .NET development tools including: Visual Studio .NET 2002 and
14 2003, SharpDevelop, MonoDevelop, and NAnt.
15
16 BSD License:
17
18 Redistribution and use in source and binary forms, with or without modification, are permitted
19 provided that the following conditions are met:
20
21 * Redistributions of source code must retain the above copyright notice, this list of conditions
22 and the following disclaimer.
23 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
24 and the following disclaimer in the documentation and/or other materials provided with the
25 distribution.
26 * The name of the author may not be used to endorse or promote products derived from this software
27 without specific prior written permission.
28
29 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
30 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
34 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
35 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 </xs:documentation>
37 </xs:annotation>
38
39 <xs:element name="DNPreBuild">
40 <xs:complexType>
41 <xs:sequence>
42 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
43 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
44 </xs:sequence>
45
46 <xs:attribute name="version" />
47 <xs:attribute name="checkOsVars" />
48 </xs:complexType>
49 </xs:element>
50
51 <xs:element name="Process" type="xs:string" />
52
53 <xs:element name="Solution">
54 <xs:complexType>
55 <xs:sequence>
56 <xs:element ref="Options" minOccurs="0" />
57 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
58 <xs:element ref="Files" minOccurs="0" />
59 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
60 </xs:sequence>
61
62 <xs:attribute name="name" type="xs:string" use="required" />
63 <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
64 <xs:attribute name="path" type="xs:string" default="" />
65 </xs:complexType>
66 </xs:element>
67
68 <xs:element name="Project">
69 <xs:complexType>
70 <xs:sequence>
71 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
72
73 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
74
75 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
76 <xs:complexType>
77 <xs:attribute name="name" type="xs:string" use="required" />
78 <xs:attribute name="path" type="xs:string" />
79 <xs:attribute name="localCopy" type="xs:boolean" />
80 <xs:attribute name="version" type="xs:string" />
81 </xs:complexType>
82 </xs:element>
83
84 <xs:element ref="Files" />
85 </xs:sequence>
86
87 <xs:attribute name="name" type="xs:string" use="required" />
88 <xs:attribute name="filterGroups" type="xs:string" default="" />
89 <xs:attribute name="path" type="xs:string" default="" />
90 <xs:attribute name="icon" type="xs:string" default="" />
91
92 <xs:attribute name="language" default="C#">
93 <xs:simpleType>
94 <xs:restriction base="xs:string">
95 <xs:enumeration value="C#" />
96 <xs:enumeration value="VB.NET" />
97 </xs:restriction>
98 </xs:simpleType>
99 </xs:attribute>
100
101 <xs:attribute name="type" default="Exe">
102 <xs:simpleType>
103 <xs:restriction base="xs:string">
104 <xs:enumeration value="Exe" />
105 <xs:enumeration value="WinExe" />
106 <xs:enumeration value="Library" />
107 </xs:restriction>
108 </xs:simpleType>
109 </xs:attribute>
110
111 <xs:attribute name="runtime" default="Microsoft">
112 <xs:simpleType>
113 <xs:restriction base="xs:string">
114 <xs:enumeration value="Microsoft" />
115 <xs:enumeration value="Mono" />
116 </xs:restriction>
117 </xs:simpleType>
118 </xs:attribute>
119
120 <xs:attribute name="startupObject" type="xs:string" default="" />
121 <xs:attribute name="rootNamespace" type="xs:string" />
122 <xs:attribute name="assemblyName" type="xs:string" />
123 </xs:complexType>
124 </xs:element>
125
126 <xs:element name="Configuration">
127 <xs:complexType>
128 <xs:sequence>
129 <xs:element ref="Options" minOccurs="0" />
130 </xs:sequence>
131
132 <xs:attribute name="name" type="xs:string" use="required" />
133 </xs:complexType>
134 </xs:element>
135
136 <xs:element name="Options">
137 <xs:complexType>
138 <xs:all>
139 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
140 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
141 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
142 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
143 <xs:element name="WarningLevel" minOccurs="0">
144 <xs:simpleType>
145 <xs:restriction base="xs:integer">
146 <xs:minInclusive value="0" />
147 <xs:maxInclusive value="4"/>
148 </xs:restriction>
149 </xs:simpleType>
150 </xs:element>
151 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
152 <xs:element name="SupressWarnings" type="xs:string" minOccurs="0" />
153 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
154 <xs:element name="GenerateXmlDocFile" type="xs:boolean" minOccurs="0" />
155 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
156 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
157 <xs:element name="RegisterCOMInterop" type="xs:boolean" minOccurs="0" />
158 <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" />
159 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
160 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
161 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
162 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
163 </xs:all>
164 </xs:complexType>
165 </xs:element>
166
167 <xs:element name="Files">
168 <xs:complexType>
169 <xs:sequence>
170 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
171 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
172 </xs:sequence>
173 </xs:complexType>
174 </xs:element>
175
176 <xs:element name="File">
177 <xs:complexType>
178 <xs:simpleContent>
179 <xs:extension base="xs:string">
180 <xs:attribute name="buildAction" default="Compile">
181 <xs:simpleType>
182 <xs:restriction base="xs:string">
183 <xs:enumeration value="None" />
184 <xs:enumeration value="Compile" />
185 <xs:enumeration value="Content" />
186 <xs:enumeration value="EmbeddedResource" />
187 </xs:restriction>
188 </xs:simpleType>
189 </xs:attribute>
190 </xs:extension>
191 </xs:simpleContent>
192 </xs:complexType>
193 </xs:element>
194
195 <xs:element name="Match">
196 <xs:complexType>
197 <xs:attribute name="path" type="xs:string" />
198 <xs:attribute name="pattern" type="xs:string" use="required" />
199 <xs:attribute name="recurse" type="xs:boolean" default="false" />
200 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
201 <xs:attribute name="buildAction" default="Compile">
202 <xs:simpleType>
203 <xs:restriction base="xs:string">
204 <xs:enumeration value="None" />
205 <xs:enumeration value="Compile" />
206 <xs:enumeration value="Content" />
207 <xs:enumeration value="EmbeddedResource" />
208 </xs:restriction>
209 </xs:simpleType>
210 </xs:attribute>
211 </xs:complexType>
212 </xs:element>
213</xs:schema>
214
215
diff --git a/Prebuild/src/data/prebuild-1.6.xsd b/Prebuild/src/data/prebuild-1.6.xsd
deleted file mode 100644
index f944faf..0000000
--- a/Prebuild/src/data/prebuild-1.6.xsd
+++ /dev/null
@@ -1,231 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"
3 xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd">
4 <xs:annotation>
5 <xs:documentation>
6 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com)
7
8 .NET Prebuild is a cross-platform XML-driven pre-build tool which
9 allows developers to easily generate project or make files for major
10 IDE's and .NET development tools including: Visual Studio .NET 2002 and
11 2003, SharpDevelop, MonoDevelop, and NAnt.
12
13 BSD License:
14
15 Redistribution and use in source and binary forms, with or without modification, are permitted
16 provided that the following conditions are met:
17
18 * Redistributions of source code must retain the above copyright notice, this list of conditions
19 and the following disclaimer.
20 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
21 and the following disclaimer in the documentation and/or other materials provided with the
22 distribution.
23 * The name of the author may not be used to endorse or promote products derived from this software
24 without specific prior written permission.
25
26 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
27 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
31 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
32 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 </xs:documentation>
34 </xs:annotation>
35 <xs:element name="Prebuild">
36 <xs:complexType>
37 <xs:sequence>
38 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
39 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
40 </xs:sequence>
41 <xs:attribute name="version" />
42 <xs:attribute name="checkOsVars" />
43 </xs:complexType>
44 </xs:element>
45 <xs:element name="Process" type="xs:string" />
46 <xs:element name="Solution">
47 <xs:complexType>
48 <xs:sequence>
49 <xs:element ref="Options" minOccurs="0" />
50 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
51 <xs:element ref="Files" minOccurs="0" />
52 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
53 </xs:sequence>
54 <xs:attribute name="name" type="xs:string" use="required" />
55 <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
56 <xs:attribute name="path" type="xs:string" default="" />
57 </xs:complexType>
58 </xs:element>
59 <xs:element name="Project">
60 <xs:complexType>
61 <xs:sequence>
62 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
63 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
64 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
65 <xs:complexType>
66 <xs:attribute name="name" type="xs:string" use="required" />
67 <xs:attribute name="path" type="xs:string" />
68 <xs:attribute name="localCopy" type="xs:boolean" />
69 <xs:attribute name="version" type="xs:string" />
70 </xs:complexType>
71 </xs:element>
72 <xs:element ref="Files" />
73 </xs:sequence>
74 <xs:attribute name="name" type="xs:string" use="required" />
75 <xs:attribute name="filterGroups" type="xs:string" default="" />
76 <xs:attribute name="path" type="xs:string" default="" />
77 <xs:attribute name="icon" type="xs:string" default="" />
78 <xs:attribute name="language" default="C#">
79 <xs:simpleType>
80 <xs:restriction base="xs:string">
81 <xs:enumeration value="C#" />
82 <xs:enumeration value="VB.NET" />
83 </xs:restriction>
84 </xs:simpleType>
85 </xs:attribute>
86 <xs:attribute name="type" default="Exe">
87 <xs:simpleType>
88 <xs:restriction base="xs:string">
89 <xs:enumeration value="Exe" />
90 <xs:enumeration value="WinExe" />
91 <xs:enumeration value="Library" />
92 </xs:restriction>
93 </xs:simpleType>
94 </xs:attribute>
95 <xs:attribute name="runtime" default="Microsoft">
96 <xs:simpleType>
97 <xs:restriction base="xs:string">
98 <xs:enumeration value="Microsoft" />
99 <xs:enumeration value="Mono" />
100 </xs:restriction>
101 </xs:simpleType>
102 </xs:attribute>
103 <xs:attribute name="startupObject" type="xs:string" default="" />
104 <xs:attribute name="rootNamespace" type="xs:string" />
105 <xs:attribute name="assemblyName" type="xs:string" />
106 </xs:complexType>
107 </xs:element>
108 <xs:element name="Configuration">
109 <xs:complexType>
110 <xs:sequence>
111 <xs:element ref="Options" minOccurs="0" />
112 </xs:sequence>
113 <xs:attribute name="name" type="xs:string" use="required" />
114 </xs:complexType>
115 </xs:element>
116 <xs:element name="Options">
117 <xs:complexType>
118 <xs:all>
119 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
120 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
121 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
122 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
123 <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" />
124 <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" />
125 <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess">
126 <xs:simpleType>
127 <xs:restriction base="xs:string">
128 <xs:enumeration value="OnBuildSuccess" />
129 <xs:enumeration value="Always" />
130 <xs:enumeration value="OnOutputUpdated" />
131 </xs:restriction>
132 </xs:simpleType>
133 </xs:element>
134 <xs:element name="RunScript" type="xs:string" minOccurs="0" />
135 <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" />
136 <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" />
137 <xs:element name="WarningLevel" minOccurs="0">
138 <xs:simpleType>
139 <xs:restriction base="xs:integer">
140 <xs:minInclusive value="0" />
141 <xs:maxInclusive value="4" />
142 </xs:restriction>
143 </xs:simpleType>
144 </xs:element>
145 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
146 <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" />
147 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
148 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
149 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
150 <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" />
151 <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" />
152 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
153 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
154 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
155 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
156 </xs:all>
157 </xs:complexType>
158 </xs:element>
159 <xs:element name="Files">
160 <xs:complexType>
161 <xs:sequence>
162 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
163 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
164 </xs:sequence>
165 </xs:complexType>
166 </xs:element>
167 <xs:element name="File">
168 <xs:complexType>
169 <xs:simpleContent>
170 <xs:extension base="xs:string">
171 <xs:attribute name="buildAction" default="Compile">
172 <xs:simpleType>
173 <xs:restriction base="xs:string">
174 <xs:enumeration value="None" />
175 <xs:enumeration value="Compile" />
176 <xs:enumeration value="Content" />
177 <xs:enumeration value="EmbeddedResource" />
178 </xs:restriction>
179 </xs:simpleType>
180 </xs:attribute>
181 <xs:attribute name="subType" default="Code">
182 <xs:simpleType>
183 <xs:restriction base="xs:string">
184 <xs:enumeration value="Code" />
185 <xs:enumeration value="Component" />
186 <xs:enumeration value="Form" />
187 <xs:enumeration value="UserControl" />
188 </xs:restriction>
189 </xs:simpleType>
190 </xs:attribute>
191 </xs:extension>
192 </xs:simpleContent>
193 </xs:complexType>
194 </xs:element>
195 <xs:element name="Match">
196 <xs:complexType>
197 <xs:sequence>
198 <xs:element ref="Exclude" minOccurs="0" />
199 </xs:sequence>
200 <xs:attribute name="path" type="xs:string" />
201 <xs:attribute name="pattern" type="xs:string" use="required" />
202 <xs:attribute name="recurse" type="xs:boolean" default="false" />
203 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
204 <xs:attribute name="buildAction" default="Compile">
205 <xs:simpleType>
206 <xs:restriction base="xs:string">
207 <xs:enumeration value="None" />
208 <xs:enumeration value="Compile" />
209 <xs:enumeration value="Content" />
210 <xs:enumeration value="EmbeddedResource" />
211 </xs:restriction>
212 </xs:simpleType>
213 </xs:attribute>
214 <xs:attribute name="subType" default="Code">
215 <xs:simpleType>
216 <xs:restriction base="xs:string">
217 <xs:enumeration value="Code" />
218 <xs:enumeration value="Component" />
219 <xs:enumeration value="Form" />
220 <xs:enumeration value="UserControl" />
221 </xs:restriction>
222 </xs:simpleType>
223 </xs:attribute>
224 </xs:complexType>
225 </xs:element>
226 <xs:element name="Exclude">
227 <xs:complexType>
228 <xs:attribute name="name" type="xs:string" use="required" />
229 </xs:complexType>
230 </xs:element>
231</xs:schema>
diff --git a/Prebuild/src/data/prebuild-1.7.xsd b/Prebuild/src/data/prebuild-1.7.xsd
deleted file mode 100644
index 9d63ce6..0000000
--- a/Prebuild/src/data/prebuild-1.7.xsd
+++ /dev/null
@@ -1,261 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"
3 xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd">
4 <xs:annotation>
5 <xs:documentation>
6 Copyright (c) 2004-2005 Matthew Holmes (calefaction at houston . rr . com), Dan Moorehead (dan05a at gmail . com), David Hudson (jendave at yahoo dot com)
7
8 .NET Prebuild is a cross-platform XML-driven pre-build tool which
9 allows developers to easily generate project or make files for major
10 IDE's and .NET development tools including: Visual Studio .NET 2002 and
11 2003, SharpDevelop, MonoDevelop, and NAnt.
12
13 BSD License:
14
15 Redistribution and use in source and binary forms, with or without modification, are permitted
16 provided that the following conditions are met:
17
18 * Redistributions of source code must retain the above copyright notice, this list of conditions
19 and the following disclaimer.
20 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
21 and the following disclaimer in the documentation and/or other materials provided with the
22 distribution.
23 * The name of the author may not be used to endorse or promote products derived from this software
24 without specific prior written permission.
25
26 THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
27 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
31 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
32 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 </xs:documentation>
34 </xs:annotation>
35 <xs:element name="Prebuild">
36 <xs:complexType>
37 <xs:sequence>
38 <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" />
39 <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" />
40 </xs:sequence>
41 <xs:attribute name="version" />
42 <xs:attribute name="checkOsVars" />
43 </xs:complexType>
44 </xs:element>
45 <xs:element name="Process" type="xs:string" />
46 <xs:element name="Solution">
47 <xs:complexType>
48 <xs:sequence>
49 <xs:element ref="Options" minOccurs="0" />
50 <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" />
51 <xs:element ref="Files" minOccurs="0" />
52 <xs:element ref="Project" minOccurs="1" maxOccurs="unbounded" />
53 </xs:sequence>
54 <xs:attribute name="name" type="xs:string" use="required" />
55 <xs:attribute name="activeConfig" type="xs:string" default="Debug" />
56 <xs:attribute name="path" type="xs:string" default="" />
57 <xs:attribute name="version" type="xs:string" default="1.0.0" />
58 </xs:complexType>
59 </xs:element>
60 <xs:element name="Project">
61 <xs:complexType>
62 <xs:sequence>
63 <xs:element ref="Configuration" minOccurs="0" maxOccurs="unbounded" />
64 <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
65 <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded">
66 <xs:complexType>
67 <xs:attribute name="name" type="xs:string" use="required" />
68 <xs:attribute name="path" type="xs:string" />
69 <xs:attribute name="localCopy" type="xs:boolean" />
70 <xs:attribute name="version" type="xs:string" default="1.0.0"/>
71 </xs:complexType>
72 </xs:element>
73 <xs:element ref="Files" />
74 </xs:sequence>
75 <xs:attribute name="name" type="xs:string" use="required" />
76 <xs:attribute name="designerFolder" type="xs:string" default="" />
77 <xs:attribute name="filterGroups" type="xs:string" default="" />
78 <xs:attribute name="path" type="xs:string" default="" />
79 <xs:attribute name="icon" type="xs:string" default="" />
80 <xs:attribute name="language" default="C#">
81 <xs:simpleType>
82 <xs:restriction base="xs:string">
83 <xs:enumeration value="C#" />
84 <xs:enumeration value="VB.NET" />
85 </xs:restriction>
86 </xs:simpleType>
87 </xs:attribute>
88 <xs:attribute name="type" default="Exe">
89 <xs:simpleType>
90 <xs:restriction base="xs:string">
91 <xs:enumeration value="Exe" />
92 <xs:enumeration value="WinExe" />
93 <xs:enumeration value="Library" />
94 </xs:restriction>
95 </xs:simpleType>
96 </xs:attribute>
97 <xs:attribute name="runtime" default="Microsoft">
98 <xs:simpleType>
99 <xs:restriction base="xs:string">
100 <xs:enumeration value="Microsoft" />
101 <xs:enumeration value="Mono" />
102 </xs:restriction>
103 </xs:simpleType>
104 </xs:attribute>
105 <xs:attribute name="startupObject" type="xs:string" default="" />
106 <xs:attribute name="rootNamespace" type="xs:string" />
107 <xs:attribute name="assemblyName" type="xs:string" />
108 <xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false"/>
109 </xs:complexType>
110 </xs:element>
111 <xs:element name="Configuration">
112 <xs:complexType>
113 <xs:sequence>
114 <xs:element ref="Options" minOccurs="0" />
115 </xs:sequence>
116 <xs:attribute name="name" type="xs:string" use="required" />
117 </xs:complexType>
118 </xs:element>
119 <xs:element name="Options">
120 <xs:complexType>
121 <xs:all>
122 <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" />
123 <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" />
124 <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" />
125 <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" />
126 <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" />
127 <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" />
128 <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess">
129 <xs:simpleType>
130 <xs:restriction base="xs:string">
131 <xs:enumeration value="OnBuildSuccess" />
132 <xs:enumeration value="Always" />
133 <xs:enumeration value="OnOutputUpdated" />
134 </xs:restriction>
135 </xs:simpleType>
136 </xs:element>
137 <xs:element name="RunScript" type="xs:string" minOccurs="0" />
138 <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" />
139 <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" />
140 <xs:element name="WarningLevel" minOccurs="0">
141 <xs:simpleType>
142 <xs:restriction base="xs:integer">
143 <xs:minInclusive value="0" />
144 <xs:maxInclusive value="4" />
145 </xs:restriction>
146 </xs:simpleType>
147 </xs:element>
148 <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" />
149 <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" />
150 <xs:element name="OutputPath" type="xs:string" minOccurs="0" />
151 <xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" />
152 <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" />
153 <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" />
154 <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" />
155 <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" />
156 <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" />
157 <xs:element name="BaseAddress" type="xs:string" minOccurs="0" />
158 <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" />
159 <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" />
160 <xs:element name="KeyFile" type="xs:string" minOccurs="0" />
161 </xs:all>
162 </xs:complexType>
163 </xs:element>
164 <xs:element name="Files">
165 <xs:complexType>
166 <xs:sequence>
167 <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" />
168 <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" />
169 </xs:sequence>
170 </xs:complexType>
171 </xs:element>
172 <xs:element name="File">
173 <xs:complexType>
174 <xs:simpleContent>
175 <xs:extension base="xs:string">
176 <xs:attribute name="resourceName" type="xs:string" default="" />
177 <xs:attribute name="buildAction" default="Compile">
178 <xs:simpleType>
179 <xs:restriction base="xs:string">
180 <xs:enumeration value="None" />
181 <xs:enumeration value="Compile" />
182 <xs:enumeration value="Content" />
183 <xs:enumeration value="EmbeddedResource" />
184 </xs:restriction>
185 </xs:simpleType>
186 </xs:attribute>
187 <xs:attribute name="subType" default="Code">
188 <xs:simpleType>
189 <xs:restriction base="xs:string">
190 <xs:enumeration value="Code" />
191 <xs:enumeration value="Component" />
192 <xs:enumeration value="Form" />
193 <xs:enumeration value="Settings" />
194 <xs:enumeration value="UserControl" />
195 </xs:restriction>
196 </xs:simpleType>
197 </xs:attribute>
198 <xs:attribute name="link" type="xs:boolean" />
199 <xs:attribute name="copyToOutput" default="Never">
200 <xs:simpleType>
201 <xs:restriction base="xs:string">
202 <xs:enumeration value="Never" />
203 <xs:enumeration value="Always" />
204 <xs:enumeration value="PreserveNewest" />
205 </xs:restriction>
206 </xs:simpleType>
207 </xs:attribute>
208 </xs:extension>
209 </xs:simpleContent>
210 </xs:complexType>
211 </xs:element>
212 <xs:element name="Match">
213 <xs:complexType>
214 <xs:sequence>
215 <xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" />
216 </xs:sequence>
217 <xs:attribute name="path" type="xs:string" />
218 <xs:attribute name="pattern" type="xs:string" use="required" />
219 <xs:attribute name="recurse" type="xs:boolean" default="false" />
220 <xs:attribute name="useRegex" type="xs:boolean" default="false" />
221 <xs:attribute name="buildAction" default="Compile">
222 <xs:simpleType>
223 <xs:restriction base="xs:string">
224 <xs:enumeration value="None" />
225 <xs:enumeration value="Compile" />
226 <xs:enumeration value="Content" />
227 <xs:enumeration value="EmbeddedResource" />
228 </xs:restriction>
229 </xs:simpleType>
230 </xs:attribute>
231 <xs:attribute name="resourceName" type="xs:string" default="" />
232 <xs:attribute name="subType" default="Code">
233 <xs:simpleType>
234 <xs:restriction base="xs:string">
235 <xs:enumeration value="Code" />
236 <xs:enumeration value="Component" />
237 <xs:enumeration value="Designer" />
238 <xs:enumeration value="Form" />
239 <xs:enumeration value="Settings" />
240 <xs:enumeration value="UserControl" />
241 </xs:restriction>
242 </xs:simpleType>
243 </xs:attribute>
244 <xs:attribute name="link" type="xs:boolean" />
245 <xs:attribute name="copyToOutput" default="Never">
246 <xs:simpleType>
247 <xs:restriction base="xs:string">
248 <xs:enumeration value="Never" />
249 <xs:enumeration value="Always" />
250 <xs:enumeration value="PreserveNewest" />
251 </xs:restriction>
252 </xs:simpleType>
253 </xs:attribute>
254 </xs:complexType>
255 </xs:element>
256 <xs:element name="Exclude">
257 <xs:complexType>
258 <xs:attribute name="name" type="xs:string" use="required" />
259 </xs:complexType>
260 </xs:element>
261</xs:schema>
diff --git a/bin/Axiom.MathLib.dll b/bin/Axiom.MathLib.dll
deleted file mode 100644
index 21ce3a8..0000000
--- a/bin/Axiom.MathLib.dll
+++ /dev/null
Binary files differ
diff --git a/bin/Db4objects.Db4o.dll b/bin/Db4objects.Db4o.dll
deleted file mode 100644
index be976a1..0000000
--- a/bin/Db4objects.Db4o.dll
+++ /dev/null
Binary files differ
diff --git a/bin/Kds.Serialization.dll b/bin/Kds.Serialization.dll
deleted file mode 100644
index 7f03277..0000000
--- a/bin/Kds.Serialization.dll
+++ /dev/null
Binary files differ
diff --git a/bin/MySql.Data.dll b/bin/MySql.Data.dll
deleted file mode 100644
index 0467dd6..0000000
--- a/bin/MySql.Data.dll
+++ /dev/null
Binary files differ
diff --git a/bin/Ode.NET.dll b/bin/Ode.NET.dll
deleted file mode 100644
index 40f15a5..0000000
--- a/bin/Ode.NET.dll
+++ /dev/null
Binary files differ
diff --git a/bin/OpenSimAPI.java b/bin/OpenSimAPI.java
deleted file mode 100644
index 472b947..0000000
--- a/bin/OpenSimAPI.java
+++ /dev/null
@@ -1,36 +0,0 @@
1
2
3public class OpenSimAPI {
4
5 public static int GetEntityID()
6 {
7 return 0;
8 }
9
10 public static int GetRandomAvatarID()
11 {
12 return 0;
13 }
14
15 public static float GetEntityPositionX(int id)
16 {
17 return 0.0f;
18 }
19
20 public static float GetEntityPositionY(int id)
21 {
22 return 0.0f;
23 }
24
25 public static float GetEntityPositionZ(int id)
26 {
27 return 0.0f;
28 }
29
30 public static void SetEntityPosition(int id, float x, float y, float z)
31 {
32
33 }
34
35
36} \ No newline at end of file
diff --git a/bin/PhysX-wrapper.dll b/bin/PhysX-wrapper.dll
deleted file mode 100644
index 5259ffc..0000000
--- a/bin/PhysX-wrapper.dll
+++ /dev/null
Binary files differ
diff --git a/bin/PhysX_Wrapper_Dotnet.dll b/bin/PhysX_Wrapper_Dotnet.dll
deleted file mode 100644
index c66bf3a..0000000
--- a/bin/PhysX_Wrapper_Dotnet.dll
+++ /dev/null
Binary files differ
diff --git a/bin/Prebuild.exe b/bin/Prebuild.exe
deleted file mode 100644
index 34d9bce..0000000
--- a/bin/Prebuild.exe
+++ /dev/null
Binary files differ
diff --git a/bin/System.Data.SQLite.dll b/bin/System.Data.SQLite.dll
deleted file mode 100644
index 70d84e7..0000000
--- a/bin/System.Data.SQLite.dll
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/HOWTO.txt b/bin/TerrainDatafiles/Alien/HOWTO.txt
deleted file mode 100644
index 00a65d7..0000000
--- a/bin/TerrainDatafiles/Alien/HOWTO.txt
+++ /dev/null
@@ -1,19 +0,0 @@
1Use the "terrain load" command to import these datafiles.
2They are stored as Float-32 arrays, use the F32 import type.
3
4These files are formatted on a scale of 0 to 1, they are designed for a range of 0..58.81
5use the 'multiply' command to multiply them by 58.81 to achieve correct height values.
6
7Example ------------------
8Region# : terrain load f32 c:\opensim\datafiles\output_x0_y0.r32
9Region# : terrain multiply 58.81
10
11
12
13 <AdamZaius> 0,0 - 1,0 - 2,0
14 <AdamZaius> 0,1 - 1,1 - 2,1
15 <AdamZaius> 0,2 - 1,2, 2,2
16
17
18for a 3x3 area on the grid
19
diff --git a/bin/TerrainDatafiles/Alien/alienworld.bmp b/bin/TerrainDatafiles/Alien/alienworld.bmp
deleted file mode 100644
index 0e2405e..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_0_0.bmp b/bin/TerrainDatafiles/Alien/alienworld_0_0.bmp
deleted file mode 100644
index 0a3afc0..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_0_0.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_0_0.r32 b/bin/TerrainDatafiles/Alien/alienworld_0_0.r32
deleted file mode 100644
index 299dc8c..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_0_0.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_0_1.bmp b/bin/TerrainDatafiles/Alien/alienworld_0_1.bmp
deleted file mode 100644
index ec3b5d2..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_0_1.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_0_1.r32 b/bin/TerrainDatafiles/Alien/alienworld_0_1.r32
deleted file mode 100644
index 0dd41fc..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_0_1.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_0_2.bmp b/bin/TerrainDatafiles/Alien/alienworld_0_2.bmp
deleted file mode 100644
index ce341e5..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_0_2.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_0_2.r32 b/bin/TerrainDatafiles/Alien/alienworld_0_2.r32
deleted file mode 100644
index 28df00a..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_0_2.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_1_0.bmp b/bin/TerrainDatafiles/Alien/alienworld_1_0.bmp
deleted file mode 100644
index 7fb3d96..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_1_0.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_1_0.r32 b/bin/TerrainDatafiles/Alien/alienworld_1_0.r32
deleted file mode 100644
index 99d5072..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_1_0.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_1_1.bmp b/bin/TerrainDatafiles/Alien/alienworld_1_1.bmp
deleted file mode 100644
index bd5d31a..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_1_1.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_1_1.r32 b/bin/TerrainDatafiles/Alien/alienworld_1_1.r32
deleted file mode 100644
index fdb3acf..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_1_1.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_1_2.bmp b/bin/TerrainDatafiles/Alien/alienworld_1_2.bmp
deleted file mode 100644
index a5a719d..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_1_2.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_1_2.r32 b/bin/TerrainDatafiles/Alien/alienworld_1_2.r32
deleted file mode 100644
index 4e0155b..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_1_2.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_2_0.bmp b/bin/TerrainDatafiles/Alien/alienworld_2_0.bmp
deleted file mode 100644
index a5c6792..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_2_0.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_2_0.r32 b/bin/TerrainDatafiles/Alien/alienworld_2_0.r32
deleted file mode 100644
index 0c12470..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_2_0.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_2_1.bmp b/bin/TerrainDatafiles/Alien/alienworld_2_1.bmp
deleted file mode 100644
index e1f6376..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_2_1.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_2_1.r32 b/bin/TerrainDatafiles/Alien/alienworld_2_1.r32
deleted file mode 100644
index 96534b8..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_2_1.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_2_2.bmp b/bin/TerrainDatafiles/Alien/alienworld_2_2.bmp
deleted file mode 100644
index eabdd93..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_2_2.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_2_2.r32 b/bin/TerrainDatafiles/Alien/alienworld_2_2.r32
deleted file mode 100644
index 20724c3..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_2_2.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Alien/alienworld_gray.bmp b/bin/TerrainDatafiles/Alien/alienworld_gray.bmp
deleted file mode 100644
index 9cc3699..0000000
--- a/bin/TerrainDatafiles/Alien/alienworld_gray.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Coastal/HOWTO.txt b/bin/TerrainDatafiles/Coastal/HOWTO.txt
deleted file mode 100644
index bbc40cf..0000000
--- a/bin/TerrainDatafiles/Coastal/HOWTO.txt
+++ /dev/null
@@ -1,9 +0,0 @@
1Use the "terrain load" command to import these datafiles.
2They are stored as Float-32 arrays, use the F32 import type.
3
4These files are formatted on a scale of 0 to 1, they are designed for a range of 0..77.14
5use the 'multiply' command to multiply them by 77.14 to achieve correct height values.
6
7Example ------------------
8Region# : terrain load f32 c:\opensim\datafiles\output_x0_y0.r32
9Region# : terrain multiply 77.14 \ No newline at end of file
diff --git a/bin/TerrainDatafiles/Coastal/output.bmp b/bin/TerrainDatafiles/Coastal/output.bmp
deleted file mode 100644
index 15b53e3..0000000
--- a/bin/TerrainDatafiles/Coastal/output.bmp
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Coastal/output_x0_y0.r32 b/bin/TerrainDatafiles/Coastal/output_x0_y0.r32
deleted file mode 100644
index bbe2b1f..0000000
--- a/bin/TerrainDatafiles/Coastal/output_x0_y0.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Coastal/output_x0_y1.r32 b/bin/TerrainDatafiles/Coastal/output_x0_y1.r32
deleted file mode 100644
index 8f9568a..0000000
--- a/bin/TerrainDatafiles/Coastal/output_x0_y1.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Coastal/output_x1_y0.r32 b/bin/TerrainDatafiles/Coastal/output_x1_y0.r32
deleted file mode 100644
index a366176..0000000
--- a/bin/TerrainDatafiles/Coastal/output_x1_y0.r32
+++ /dev/null
Binary files differ
diff --git a/bin/TerrainDatafiles/Coastal/output_x1_y1.r32 b/bin/TerrainDatafiles/Coastal/output_x1_y1.r32
deleted file mode 100644
index c0fd227..0000000
--- a/bin/TerrainDatafiles/Coastal/output_x1_y1.r32
+++ /dev/null
Binary files differ
diff --git a/bin/assets/base_shape.dat b/bin/assets/base_shape.dat
deleted file mode 100644
index 920c775..0000000
--- a/bin/assets/base_shape.dat
+++ /dev/null
@@ -1,105 +0,0 @@
1LLWearable version 22
2Female Shape and Outfit 3 Shape
3Created by system from avatar's appearance.
4 permissions 0
5 {
6 base_mask 00082000
7 owner_mask 00082000
8 group_mask 00082000
9 everyone_mask 00082000
10 next_owner_mask 00082000
11 creator_id 3d924400-038e-6ad9-920b-cfbb9b40585c
12 owner_id 542ffb8e-8932-49b9-8664-58f53e442797
13 last_owner_id 3d924400-038e-6ad9-920b-cfbb9b40585c
14 group_id 00000000-0000-0000-0000-000000000000
15 }
16 sale_info 0
17 {
18 sale_type not
19 sale_price 0
20 }
21type 0
22parameters 82
231 .21
242 -.5
254 -.11
265 -.1
276 -.3
287 -.4
298 -.5
3010 .7
3111 .34
3212 -.5
3313 0
3414 .04
3515 .58
3617 .56
3718 -.26
3819 -.73
3920 -.34
4021 -.01
4122 1
4223 -.5
4324 -.63
4425 .44
4527 .05
4633 -.24
4734 -.7
4835 -.16
4936 -.2
5037 -.98
5138 -.5
5280 0
53105 .07
54155 -.22
55157 0
56185 -1
57193 .86
58196 -.74
59505 .65
60506 .12
61507 -1.5
62515 0
63517 .16
64518 .8
65629 0
66637 0
67646 .4
68647 1
69649 .36
70650 .85
71652 .49
72653 -1
73656 0
74659 .65
75662 .5
76663 0
77664 0
78665 0
79675 -.15
80676 .26
81678 .28
82682 .27
83683 -.19
84684 -.09
85685 0
86690 .45
87692 .4
88693 -0
89753 -.5
90756 -.08
91758 .24
92759 .6
93760 .11
94764 -.38
95765 -.3
96769 .42
97773 .51
98795 .16
99796 .11
100799 .36
101841 0
102842 -.82
103879 0
104880 0
105textures 0
diff --git a/bin/assets/bricks.jp2 b/bin/assets/bricks.jp2
deleted file mode 100644
index 09c65ab..0000000
--- a/bin/assets/bricks.jp2
+++ /dev/null
Binary files differ
diff --git a/bin/assets/granite.jp2 b/bin/assets/granite.jp2
deleted file mode 100644
index b842eb8..0000000
--- a/bin/assets/granite.jp2
+++ /dev/null
Binary files differ
diff --git a/bin/assets/hardwood.jp2 b/bin/assets/hardwood.jp2
deleted file mode 100644
index 8ae695e..0000000
--- a/bin/assets/hardwood.jp2
+++ /dev/null
Binary files differ
diff --git a/bin/assets/map1.jp2 b/bin/assets/map1.jp2
deleted file mode 100644
index cd2fd94..0000000
--- a/bin/assets/map1.jp2
+++ /dev/null
Binary files differ
diff --git a/bin/assets/map_base.jp2 b/bin/assets/map_base.jp2
deleted file mode 100644
index 5ad1fd0..0000000
--- a/bin/assets/map_base.jp2
+++ /dev/null
Binary files differ
diff --git a/bin/assets/plywood.jp2 b/bin/assets/plywood.jp2
deleted file mode 100644
index 1643ff1..0000000
--- a/bin/assets/plywood.jp2
+++ /dev/null
Binary files differ
diff --git a/bin/assets/rocks.jp2 b/bin/assets/rocks.jp2
deleted file mode 100644
index f0bbd89..0000000
--- a/bin/assets/rocks.jp2
+++ /dev/null
Binary files differ
diff --git a/bin/assets/testpic2.jp2 b/bin/assets/testpic2.jp2
deleted file mode 100644
index e6840e2..0000000
--- a/bin/assets/testpic2.jp2
+++ /dev/null
Binary files differ
diff --git a/bin/avatar-texture.dat b/bin/avatar-texture.dat
deleted file mode 100644
index 6548a8a..0000000
--- a/bin/avatar-texture.dat
+++ /dev/null
Binary files differ
diff --git a/bin/data/LICENSE-README-IMPORTANT.txt b/bin/data/LICENSE-README-IMPORTANT.txt
deleted file mode 100644
index 3229102..0000000
--- a/bin/data/LICENSE-README-IMPORTANT.txt
+++ /dev/null
@@ -1,5 +0,0 @@
1Not all of the files in this directory are licensed under the BSD license. Some of these files come with the Second Life viewer and are considered licensed under a Creative Commons License.
2
3These files are:
4
5- avataranimations.xml (Derivative work of viewerart.ini, Creative Commons Attribution+Share-Alike v2.5 License) \ No newline at end of file
diff --git a/bin/data/avataranimations.xml b/bin/data/avataranimations.xml
deleted file mode 100644
index 461613f..0000000
--- a/bin/data/avataranimations.xml
+++ /dev/null
@@ -1,10 +0,0 @@
1<?xml version="1.0" encoding="iso-8859-1"?>
2<!-- Copyright(C) 2002-2007 Linden Lab, OpenSim Developers -->
3<!-- Based on viewerart.ini packaged with the viewer. -->
4<!-- This file is a derivative work of the above while it contains default animation UUIDs -->
5<!-- Licensed under a creative commons license (By-SA) http://creativecommons.org/licenses/by-sa/2.5/ -->
6<animations>
7 <animation name="STAND">2408fe9e-df1d-1d7d-f4ff-1384fa7b350f</animation>
8 <animation name="WALK">6ed24bd8-91aa-4b12-ccc7-c97c857ab4e0</animation>
9 <animation name="FLY">aec4610c-757f-bc4e-c092-c6e9caf18daf</animation>
10</animations> \ No newline at end of file
diff --git a/bin/defaultstripe.png b/bin/defaultstripe.png
deleted file mode 100644
index 9db19c8..0000000
--- a/bin/defaultstripe.png
+++ /dev/null
Binary files differ
diff --git a/bin/libTerrain-BSD.dll b/bin/libTerrain-BSD.dll
deleted file mode 100644
index d9b95fc..0000000
--- a/bin/libTerrain-BSD.dll
+++ /dev/null
Binary files differ
diff --git a/bin/libdb_dotNET43.dll b/bin/libdb_dotNET43.dll
deleted file mode 100644
index 16a1cfc..0000000
--- a/bin/libdb_dotNET43.dll
+++ /dev/null
Binary files differ
diff --git a/bin/libode.a b/bin/libode.a
deleted file mode 100644
index 4df0ad1..0000000
--- a/bin/libode.a
+++ /dev/null
Binary files differ
diff --git a/bin/libode.so b/bin/libode.so
deleted file mode 100755
index 1c8565f..0000000
--- a/bin/libode.so
+++ /dev/null
Binary files differ
diff --git a/bin/libsecondlife.dll b/bin/libsecondlife.dll
deleted file mode 100644
index 364d8fb..0000000
--- a/bin/libsecondlife.dll
+++ /dev/null
Binary files differ
diff --git a/bin/log4net.dll b/bin/log4net.dll
deleted file mode 100644
index ffc57e1..0000000
--- a/bin/log4net.dll
+++ /dev/null
Binary files differ
diff --git a/bin/login.htm b/bin/login.htm
deleted file mode 100644
index 683af10..0000000
--- a/bin/login.htm
+++ /dev/null
@@ -1,5 +0,0 @@
1<form action="javascript:setpass();" name="logon" id="logon">
2<p> Admin Password: <input type="password" id="Adminpss" size="17" maxlength="34"> </P>
3<input type="button" name="button" value="Login"
4 onclick="javascript:setpass(this.parentNode);">
5</form> \ No newline at end of file
diff --git a/bin/mysql_connection.ini b/bin/mysql_connection.ini
deleted file mode 100644
index 58c6284..0000000
--- a/bin/mysql_connection.ini
+++ /dev/null
@@ -1,7 +0,0 @@
1[mysqlconnection]
2hostname=localhost
3database=database
4username=username
5password=password
6pooling=false
7port=3306 \ No newline at end of file
diff --git a/bin/newaccountform.htm b/bin/newaccountform.htm
deleted file mode 100644
index d21b983..0000000
--- a/bin/newaccountform.htm
+++ /dev/null
@@ -1,9 +0,0 @@
1<form action="javascript:get(document.getElementById('myform'));" name="myform" id="myform">
2<p> First Name: <input type="text" id="FirstName" size="17" maxlength="44"> </P>
3<p> Last Name:
4<input type="text" id="LastName" size="17" maxlength="44"> </p>
5<p> PassWord:
6<input type="password" id="PassWord" size="17" maxlength="44"> </p>
7<br>
8<input type="button" name="button" value="Create" onclick="javascript:get(this.parentNode);">
9</form> \ No newline at end of file
diff --git a/bin/ode.dll b/bin/ode.dll
deleted file mode 100644
index b226096..0000000
--- a/bin/ode.dll
+++ /dev/null
Binary files differ
diff --git a/bin/openjpegnet.dll b/bin/openjpegnet.dll
deleted file mode 100755
index 1812fa9..0000000
--- a/bin/openjpegnet.dll
+++ /dev/null
Binary files differ
diff --git a/bin/script1.txt b/bin/script1.txt
deleted file mode 100644
index 63780c2..0000000
--- a/bin/script1.txt
+++ /dev/null
@@ -1,34 +0,0 @@
1<Script><ScriptEngine:OpenSimJVM,Test1>public class Test1 {
2
3 public static void OnFrame()
4 {
5 int own = 0;
6 own = OpenSimAPI.GetEntityID();
7 int avid = OpenSimAPI.GetRandomAvatarID();
8 float x = OpenSimAPI.GetEntityPositionX(own);
9 float avx = OpenSimAPI.GetEntityPositionX(avid);
10 float y = OpenSimAPI.GetEntityPositionY(own);
11 float avy = OpenSimAPI.GetEntityPositionY(avid);
12
13 if(x> avx)
14 {
15 x = x -1f;
16 }
17 else
18 {
19 x = x+ 1f;
20 }
21
22 if(y > avy)
23 {
24 y= y -1f;
25 }
26 else
27 {
28 y = y +1f;
29 }
30
31 OpenSimAPI.SetEntityPosition(own, x, y, 0);
32 }
33
34}</Script> \ No newline at end of file
diff --git a/bin/testadmin.htm b/bin/testadmin.htm
deleted file mode 100644
index 62a860d..0000000
--- a/bin/testadmin.htm
+++ /dev/null
@@ -1,125 +0,0 @@
1<html>
2<head>
3<script type="text/javascript">
4var http_request
5var adminpadd
6function loadXMLDoc(url)
7{
8http_request=null
9// code for Mozilla, etc.
10if (window.XMLHttpRequest)
11 {
12 http_request=new XMLHttpRequest()
13 }
14// code for IE
15else if (window.ActiveXObject)
16 {
17 http_request=new ActiveXObject("Microsoft.XMLHTTP")
18 }
19if (http_request!=null)
20 {
21 http_request.onreadystatechange=state_Change
22 http_request.open("GET",url,true)
23 http_request.send(null)
24 }
25else
26 {
27 alert("Your browser does not support XMLHTTP.")
28 }
29}
30
31function state_Change()
32{
33// if xmlhttp shows "loaded"
34if (http_request.readyState==4)
35 {
36 // if "OK"
37 if (http_request.status==200)
38 {
39 document.getElementById('T1').innerHTML=http_request.responseText
40 }
41 else
42 {
43 alert("Problem retrieving data:" + http_request.statusText)
44 }
45 }
46}
47
48
49 //var http_request = false;
50 function makePOSTRequest(url, parameters) {
51 http_request = false;
52 if (window.XMLHttpRequest) { // Mozilla, Safari,...
53 http_request = new XMLHttpRequest();
54 if (http_request.overrideMimeType) {
55 // set type accordingly to anticipated content type
56 //http_request.overrideMimeType('text/xml');
57 http_request.overrideMimeType('text/html');
58 }
59 } else if (window.ActiveXObject) { // IE
60 try {
61 http_request = new ActiveXObject("Msxml2.XMLHTTP");
62 } catch (e) {
63 try {
64 http_request = new ActiveXObject("Microsoft.XMLHTTP");
65 } catch (e) {}
66 }
67 }
68 if (!http_request) {
69 alert('Cannot create XMLHTTP instance');
70 return false;
71 }
72
73 http_request.onreadystatechange =state_Change
74 http_request.open('POST', url, true);
75 http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
76 http_request.setRequestHeader("Content-length", parameters.length);
77 http_request.setRequestHeader("Connection", "close");
78 http_request.send(parameters);
79 }
80
81 function alertContents() {
82 if (http_request.readyState == 4) {
83 if (http_request.status == 200) {
84 //alert(http_request.responseText);
85 result = http_request.responseText;
86 document.getElementById('T1').innerHTML = result;
87 } else {
88 alert('There was a problem with the request.');
89 }
90 }
91 }
92
93
94 function get(obj) {
95 var poststr = "FirstName=" + encodeURI( document.getElementById("FirstName").value ) +
96 "&LastName=" + encodeURI( document.getElementById("LastName").value )
97 + "&PassWord=" + encodeURI( document.getElementById("PassWord").value )
98 + "&AdminPass=" + adminpass;
99 makePOSTRequest('Admin/NewAccount', poststr);
100 }
101
102 function setpass(obj)
103 {
104 adminpass = encodeURI( document.getElementById("Adminpss").value );
105 makePOSTRequest('Admin/Login', adminpass);
106
107 }
108
109</script>
110</head>
111
112<body onload="loadXMLDoc('Admin/Welcome')">
113<div id="T1" style="border:1px solid black;height:500;width:800">
114<br>
115</div><br />
116<button onclick="loadXMLDoc('Admin/Clients')">Clients</button>
117<button onclick="loadXMLDoc('Admin/Accounts')">Accounts</button>
118<button onclick="loadXMLDoc('Admin/Entities')">Entities</button>
119
120</body>
121
122</html>
123
124
125
diff --git a/libraries/libLSL/Properties/AssemblyInfo.cs b/libraries/libLSL/Properties/AssemblyInfo.cs
deleted file mode 100644
index 205dd95..0000000
--- a/libraries/libLSL/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("libLSL")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("libLSL")]
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("65895724-efca-49f8-8efc-211594b4c716")]
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/libraries/libLSL/libLSL.csproj b/libraries/libLSL/libLSL.csproj
deleted file mode 100644
index fe8822b..0000000
--- a/libraries/libLSL/libLSL.csproj
+++ /dev/null
@@ -1,49 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{E213BD9C-85C9-4739-B613-E1B58543370C}</ProjectGuid>
8 <OutputType>Library</OutputType>
9 <AppDesignerFolder>Properties</AppDesignerFolder>
10 <RootNamespace>libLSL</RootNamespace>
11 <AssemblyName>libLSL</AssemblyName>
12 </PropertyGroup>
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14 <DebugSymbols>true</DebugSymbols>
15 <DebugType>full</DebugType>
16 <Optimize>false</Optimize>
17 <OutputPath>bin\Debug\</OutputPath>
18 <DefineConstants>DEBUG;TRACE</DefineConstants>
19 <ErrorReport>prompt</ErrorReport>
20 <WarningLevel>4</WarningLevel>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
23 <DebugType>pdbonly</DebugType>
24 <Optimize>true</Optimize>
25 <OutputPath>bin\Release\</OutputPath>
26 <DefineConstants>TRACE</DefineConstants>
27 <ErrorReport>prompt</ErrorReport>
28 <WarningLevel>4</WarningLevel>
29 </PropertyGroup>
30 <ItemGroup>
31 <Reference Include="System" />
32 <Reference Include="System.Data" />
33 <Reference Include="System.Xml" />
34 </ItemGroup>
35 <ItemGroup>
36 <Compile Include="lsl.cs" />
37 <Compile Include="lslByteCode.cs" />
38 <Compile Include="lslscript.cs" />
39 <Compile Include="Properties\AssemblyInfo.cs" />
40 </ItemGroup>
41 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
42 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
43 Other similar extension points exist, see Microsoft.Common.targets.
44 <Target Name="BeforeBuild">
45 </Target>
46 <Target Name="AfterBuild">
47 </Target>
48 -->
49</Project> \ No newline at end of file
diff --git a/libraries/libLSL/lsl.cs b/libraries/libLSL/lsl.cs
deleted file mode 100644
index 37a6429..0000000
--- a/libraries/libLSL/lsl.cs
+++ /dev/null
@@ -1,329 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace libLSL
6{
7
8
9 enum lslVarType : byte
10 {
11 VARTYPE_VOID = 0,
12 VARTYPE_INTEGER = 1,
13 VARTYPE_FLOAT = 2,
14 VARTYPE_STRING = 3,
15 VARTYPE_KEY = 4,
16 VARTYPE_VECTOR = 5,
17 VARTYPE_ROTATION = 6,
18 VARTYPE_LIST = 7
19 }
20
21 enum lslEventType : byte
22 {
23 EVENT_STATE_ENTRY = 0,
24 EVENT_STATE_EXIT = 1,
25 EVENT_TOUCH_START = 2,
26 EVENT_TOUCH = 3,
27 EVENT_TOUCH_END = 4,
28 EVENT_COLLISION_START = 5,
29 EVENT_COLLISION = 6,
30 EVENT_COLLISION_END = 7,
31 EVENT_LAND_COLLISION_START = 8,
32 EVENT_LAND_COLLISION = 9,
33 EVENT_LAND_COLLISION_END = 10,
34 EVENT_TIMER = 11,
35 EVENT_LISTEN = 12,
36 EVENT_ON_REZ = 13,
37 EVENT_SENSOR = 14,
38 EVENT_NO_SENSOR = 15,
39 EVENT_CONTROL = 16,
40 EVENT_MONEY = 17,
41 EVENT_EMAIL = 18,
42 EVENT_AT_TARGET = 19,
43 EVENT_NOT_AT_TARGET = 20,
44 EVENT_AT_ROT_TARGET = 21,
45 EVENT_NOT_AT_ROT_TARGET = 22,
46 EVENT_RUN_TIME_PERMISSIONS = 23,
47 EVENT_CHANGED = 24,
48 EVENT_ATTACH = 25,
49 EVENT_DATASERVER = 26,
50 EVENT_LINK_MESSAGE = 27,
51 EVENT_MOVING_START = 28,
52 EVENT_MOVING_END = 29,
53 EVENT_OBJECT_REZ = 30,
54 EVENT_REMOTE_DATA = 31,
55 EVENT_HTTP_RESPONSE = 32
56 }
57
58 enum lslOpcodes : byte
59 {
60 // No Operation
61 OP_NOOP = 0x00,
62
63 // Pops
64 OP_POP = 0x01,
65 OP_POPS = 0x02,
66 OP_POPL = 0x03,
67 OP_POPV = 0x04,
68 OP_POPQ = 0x05,
69 OP_POPARG = 0x06,
70 OP_POPIP = 0x07,
71 OP_POPBP = 0x08,
72 OP_POPSP = 0x09,
73 OP_POPSLR = 0x0A,
74
75 // Dupes
76 OP_DUP = 0x20,
77 OP_DUPS = 0x21,
78 OP_DUPL = 0x22,
79 OP_DUPV = 0x23,
80 OP_DUPQ = 0x24,
81
82 // Stores
83 OP_STORE = 0x30,
84 OP_STORES = 0x31,
85 OP_STOREL = 0x32,
86 OP_STOREV = 0x33,
87 OP_STOREQ = 0x34,
88 OP_STOREG = 0x35,
89 OP_STOREGS = 0x36,
90 OP_STOREGL = 0x37,
91 OP_STOREGV = 0x38,
92 OP_STOREGQ = 0x39,
93
94 // Loads
95 OP_LOADP = 0x3A,
96 OP_LOADSP = 0x3B,
97 OP_LOADLP = 0x3C,
98 OP_LOADVP = 0x3D,
99 OP_LOADQP = 0x3E,
100 OP_LOADGP = 0x3F,
101 OP_LOADGSP = 0x40,
102 OP_LOADGLP = 0x41,
103 OP_LOADGVP = 0x42,
104 OP_LOADGQP = 0x43,
105
106 // Pushes
107 OP_PUSH = 0x50,
108 OP_PUSHS = 0x51,
109 OP_PUSHL = 0x52,
110 OP_PUSHV = 0x53,
111 OP_PUSHQ = 0x54,
112 OP_PUSHG = 0x55,
113 OP_PUSHGS = 0x56,
114 OP_PUSHGL = 0x57,
115 OP_PUSHGV = 0x58,
116 OP_PUSHGQ = 0x59,
117 OP_PUSHIP = 0x5A,
118 OP_PUSHBP = 0x5B,
119 OP_PUSHSP = 0x5C,
120 OP_PUSHARGB = 0x5D,
121 OP_PUSHARGI = 0x5E,
122 OP_PUSHARGF = 0x5F,
123 OP_PUSHARGS = 0x60,
124 OP_PUSHARGV = 0x61,
125 OP_PUSHARGQ = 0x62,
126 OP_PUSHE = 0x63,
127 OP_PUSHEV = 0x64,
128 OP_PUSHEQ = 0x65,
129 OP_PUSHARGE = 0x66,
130
131 // Numerics
132 OP_ADD = 0x70,
133 OP_SUB = 0x71,
134 OP_MUL = 0x72,
135 OP_DIV = 0x73,
136 OP_MOD = 0x74,
137 OP_EQ = 0x75,
138 OP_NEQ = 0x76,
139 OP_LEQ = 0x77,
140 OP_GEQ = 0x78,
141 OP_LESS = 0x79,
142 OP_GREATER = 0x7A,
143 OP_BITAND = 0x7B,
144 OP_BITOR = 0x7C,
145 OP_BITXOR = 0x7D,
146 OP_BOOLAND = 0x7E,
147 OP_BOOLOR = 0x7F,
148 OP_NEG = 0x80,
149 OP_BITNOT = 0x81,
150 OP_BOOLNOT = 0x82,
151
152 // Sequence
153 OP_JUMP = 0x90,
154 OP_JUMPIF = 0x91,
155 OP_JUMPNIF = 0x92,
156 OP_STATE = 0x93,
157 OP_CALL = 0x94,
158 OP_RETURN = 0x95,
159
160 // Cast
161 OP_CAST = 0xA0,
162
163 // Stack
164 OP_STACKTOS = 0xB0,
165 OP_STACKTOL = 0xB1,
166
167 // Debug
168 OP_PRINT = 0xC0,
169
170 // Library
171 OP_CALLLIB = 0xD0,
172 OP_CALLLIB_TWO_BYTE = 0xD1,
173
174 // More Numerics
175 OP_SHL = 0xE0,
176 OP_SHR = 0xE1
177 }
178
179 class lslHeader
180 {
181 int TM; // Top of memory
182 int IP; // Instruction pointer
183 int VN; // Version Number (0x00000200)
184 int BP; // Base Pointer
185 int SP; // Stack Pointer
186 int HR; // Heap Register
187 int HP; // Heap Pointer
188 int CS; // Current State
189 int NS; // Next State
190 int CE; // Current Events (Which events need running still?)
191 int IE; // In Event
192 int ER; // Event Register
193 int FR; // Fault Register
194 int SLR; // Sleep Register
195 int GVR; // Global Variable Register (Pointer)
196 int GFR; // Global Function Register (Pointer)
197 int PR; // Parameter Register - OnRez Int?
198 int ESR; // Energy Supply Register
199 int SR; // State Register
200 long NCE; // Extended Current Events
201 long NIE; // Extended In Event
202 long NER; // Extended Event Register
203
204 public void readFromBytes(byte[] data)
205 {
206
207 }
208 }
209
210 class lslStaticBlock
211 {
212 int length; // Length (bytes)
213 lslVarType varType;// Variable Type
214 byte unknown; // Unknown
215 Object varObject; // Variable Object
216
217 public void readFromBytes(byte[] data)
218 {
219
220 }
221
222 }
223
224 class lslHeapBlock
225 {
226 int length;
227 lslVarType varType;
228 short referenceCount;
229 Object varObject;
230
231 public void readFromBytes(byte[] data)
232 {
233
234 }
235 }
236
237 class lslStatePointer
238 {
239 int location;
240 long eventMask;
241
242 public void readFromBytes(byte[] data)
243 {
244
245 }
246 }
247
248 class lslStateFrameBlock
249 {
250 int number;
251 lslStatePointer[] pointers;
252
253 public void readFromBytes(byte[] data)
254 {
255
256 }
257 }
258
259 class lslStateBlockElement
260 {
261 int pointerToCode;
262 int callFrameSize;
263
264 public void readFromBytes(byte[] data)
265 {
266
267 }
268 }
269
270 class lslStateBlock
271 {
272 int length;
273 byte unknown;
274
275 lslStateBlockElement[] handlers; // ?
276
277 public void readFromBytes(byte[] data)
278 {
279
280 }
281 }
282
283 class lslFunctioBlock
284 {
285 int number;
286 int[] pointers; // Relative to this -> codechunk
287
288 public void readFromBytes(byte[] data)
289 {
290
291 }
292 }
293
294 class lslCodeArgument
295 {
296 lslVarType type;
297 byte empty;
298
299 public void readFromBytes(byte[] data)
300 {
301
302 }
303 }
304
305 class lslCodeChunkHeader
306 {
307 int length;
308 string comment;
309 lslVarType returnType;
310 lslCodeArgument[] arguments;
311 byte empty;
312
313 public void readFromBytes(byte[] data)
314 {
315
316 }
317 }
318
319 class lslCodeChunk
320 {
321 lslCodeChunkHeader header;
322 lslByteCode bytecode;
323
324 public void readFromBytes(byte[] data)
325 {
326
327 }
328 }
329}
diff --git a/libraries/libLSL/lslByteCode.cs b/libraries/libLSL/lslByteCode.cs
deleted file mode 100644
index 4dffe22..0000000
--- a/libraries/libLSL/lslByteCode.cs
+++ /dev/null
@@ -1,133 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace libLSL
6{
7 class lslByteCode
8 {
9 byte[] bytecode;
10
11 public void executeStep()
12 {
13 byte ins = nextInstruction();
14 lslOpcodes code = (lslOpcodes)ins;
15
16 Object arg1 = (Object)32;
17 Object arg2 = (Object)32;
18
19 switch (code)
20 {
21 case lslOpcodes.OP_NOOP:
22 break;
23
24 case lslOpcodes.OP_POP:
25 popBytes(4);
26 break;
27
28 case lslOpcodes.OP_POPS:
29 case lslOpcodes.OP_POPL:
30 // Do Stuff
31 break;
32
33 case lslOpcodes.OP_POPV:
34 popBytes(12);
35 break;
36 case lslOpcodes.OP_POPQ:
37 popBytes(16);
38 break;
39
40 case lslOpcodes.OP_POPARG:
41 popBytes((Int32)arg1);
42 break;
43
44 case lslOpcodes.OP_POPIP:
45 // Do Stuff
46 break;
47
48 case lslOpcodes.OP_POPBP:
49 // Do Stuff
50 break;
51
52 case lslOpcodes.OP_POPSP:
53 // Do Stuff
54 break;
55
56 case lslOpcodes.OP_POPSLR:
57 // Do Stuff
58 break;
59
60 case lslOpcodes.OP_DUP:
61 pushBytes(getBytes(4));
62 break;
63
64 case lslOpcodes.OP_DUPS:
65 case lslOpcodes.OP_DUPL:
66 // Do Stuff
67 break;
68
69 case lslOpcodes.OP_DUPV:
70 pushBytes(getBytes(12));
71 break;
72
73 case lslOpcodes.OP_DUPQ:
74 pushBytes(getBytes(16));
75 break;
76
77 case lslOpcodes.OP_STORE:
78 // Somefin.
79 break;
80
81 default:
82 break;
83 }
84 }
85
86 /// <summary>
87 /// Advance the instruction pointer, pull the current instruction
88 /// </summary>
89 /// <returns></returns>
90 byte nextInstruction()
91 {
92 return 0;
93 }
94
95 /// <summary>
96 /// Removes bytes from the stack
97 /// </summary>
98 /// <param name="num">Number of bytes</param>
99 void popBytes(int num)
100 {
101
102 }
103
104 /// <summary>
105 /// Pushes Bytes to the stack
106 /// </summary>
107 /// <param name="bytes">Ze bytes!</param>
108 void pushBytes(byte[] bytes)
109 {
110
111 }
112
113 /// <summary>
114 /// Get Bytes from the stack
115 /// </summary>
116 /// <param name="num">Number of bytes</param>
117 /// <returns>Ze bytes!</returns>
118 byte[] getBytes(int num)
119 {
120 return new byte[1];
121 }
122
123 /// <summary>
124 /// Saves bytes to the local frame
125 /// </summary>
126 /// <param name="bytes">Ze bytes!</param>
127 /// <param name="index">Index in local frame</param>
128 void storeBytes(byte[] bytes, int index)
129 {
130
131 }
132 }
133}
diff --git a/libraries/libLSL/lslscript.cs b/libraries/libLSL/lslscript.cs
deleted file mode 100644
index d9d57bd..0000000
--- a/libraries/libLSL/lslscript.cs
+++ /dev/null
@@ -1,10 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5namespace libLSL
6{
7 public class LSLScript
8 {
9 }
10}
diff --git a/prebuild.xml b/prebuild.xml
deleted file mode 100644
index d08daab..0000000
--- a/prebuild.xml
+++ /dev/null
@@ -1,916 +0,0 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7">
3 <Solution name="OpenSim" activeConfig="Debug" path="./">
4 <Configuration name="Debug">
5 <Options>
6 <CompilerDefines>TRACE;DEBUG</CompilerDefines>
7 <OptimizeCode>false</OptimizeCode>
8 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
9 <AllowUnsafe>false</AllowUnsafe>
10 <WarningLevel>4</WarningLevel>
11 <WarningsAsErrors>false</WarningsAsErrors>
12 <SuppressWarnings></SuppressWarnings>
13 <OutputPath>bin</OutputPath>
14 <DebugInformation>true</DebugInformation>
15 <IncrementalBuild>true</IncrementalBuild>
16 <NoStdLib>false</NoStdLib>
17 </Options>
18 </Configuration>
19 <Configuration name="Release">
20 <Options>
21 <CompilerDefines>TRACE</CompilerDefines>
22 <OptimizeCode>true</OptimizeCode>
23 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
24 <AllowUnsafe>false</AllowUnsafe>
25 <WarningLevel>4</WarningLevel>
26 <WarningsAsErrors>false</WarningsAsErrors>
27 <SuppressWarnings></SuppressWarnings>
28 <OutputPath>bin</OutputPath>
29 <DebugInformation>false</DebugInformation>
30 <IncrementalBuild>true</IncrementalBuild>
31 <NoStdLib>false</NoStdLib>
32 </Options>
33 </Configuration>
34
35 <!-- XML-RPC -->
36 <Project name="XMLRPC" path="Common/XmlRpcCS" type="Library">
37 <Configuration name="Debug">
38 <Options>
39 <OutputPath>../../bin/</OutputPath>
40 </Options>
41 </Configuration>
42 <Configuration name="Release">
43 <Options>
44 <OutputPath>../../bin/</OutputPath>
45 </Options>
46 </Configuration>
47
48 <ReferencePath>../../bin/</ReferencePath>
49 <Reference name="System"/>
50 <Reference name="System.Xml"/>
51
52 <Files>
53 <Match pattern="*.cs" recurse="true"/>
54 </Files>
55 </Project>
56
57 <!-- Core OpenSim Projects -->
58
59 <Project name="OpenSim.Framework" path="Common/OpenSim.Framework" type="Library">
60 <Configuration name="Debug">
61 <Options>
62 <OutputPath>../../bin/</OutputPath>
63 </Options>
64 </Configuration>
65 <Configuration name="Release">
66 <Options>
67 <OutputPath>../../bin/</OutputPath>
68 </Options>
69 </Configuration>
70
71 <ReferencePath>../../bin/</ReferencePath>
72 <Reference name="System"/>
73 <Reference name="System.Xml"/>
74 <Reference name="libsecondlife.dll"/>
75 <Reference name="Db4objects.Db4o.dll"/>
76 <Reference name="XMLRPC"/>
77 <Files>
78 <Match pattern="*.cs" recurse="true"/>
79 </Files>
80 </Project>
81
82 <Project name="OpenSim.Framework.Console" path="Common/OpenSim.Framework.Console" type="Library">
83 <Configuration name="Debug">
84 <Options>
85 <OutputPath>../../bin/</OutputPath>
86 </Options>
87 </Configuration>
88 <Configuration name="Release">
89 <Options>
90 <OutputPath>../../bin/</OutputPath>
91 </Options>
92 </Configuration>
93
94 <ReferencePath>../../bin/</ReferencePath>
95 <Reference name="System" localCopy="false"/>
96 <Files>
97 <Match pattern="*.cs" recurse="true"/>
98 </Files>
99 </Project>
100
101 <Project name="OpenSim.Servers" path="Common/OpenSim.Servers" type="Library">
102 <Configuration name="Debug">
103 <Options>
104 <OutputPath>../../bin/</OutputPath>
105 </Options>
106 </Configuration>
107 <Configuration name="Release">
108 <Options>
109 <OutputPath>../../bin/</OutputPath>
110 </Options>
111 </Configuration>
112
113 <ReferencePath>../../bin/</ReferencePath>
114 <Reference name="System"/>
115 <Reference name="System.Xml"/>
116 <Reference name="OpenSim.Framework"/>
117 <Reference name="OpenSim.Framework.Console"/>
118 <Reference name="libsecondlife.dll"/>
119 <Reference name="XMLRPC"/>
120
121 <Files>
122 <Match pattern="*.cs" recurse="true"/>
123 </Files>
124 </Project>
125
126 <!-- Storage Plug-ins -->
127 <Project name="OpenSim.Storage.LocalStorageDb4o" path="OpenSim/OpenSim.Storage/LocalStorageDb4o" type="Library">
128 <Configuration name="Debug">
129 <Options>
130 <OutputPath>../../../bin/</OutputPath>
131 </Options>
132 </Configuration>
133 <Configuration name="Release">
134 <Options>
135 <OutputPath>../../../bin/</OutputPath>
136 </Options>
137 </Configuration>
138
139 <ReferencePath>../../../bin/</ReferencePath>
140 <Reference name="System" localCopy="false"/>
141 <Reference name="System.Xml"/>
142 <Reference name="Db4objects.Db4o.dll"/>
143 <Reference name="libsecondlife.dll"/>
144 <Reference name="OpenSim.Framework"/>
145 <Reference name="OpenSim.Framework.Console"/>
146 <Files>
147 <Match pattern="*.cs" recurse="true"/>
148 </Files>
149 </Project>
150
151 <Project name="OpenSim.Storage.LocalStorageSQLite" path="OpenSim/OpenSim.Storage/LocalStorageSQLite" type="Library">
152 <Configuration name="Debug">
153 <Options>
154 <OutputPath>../../../bin/</OutputPath>
155 </Options>
156 </Configuration>
157 <Configuration name="Release">
158 <Options>
159 <OutputPath>../../../bin/</OutputPath>
160 </Options>
161 </Configuration>
162
163 <ReferencePath>../../../bin/</ReferencePath>
164 <Reference name="System" localCopy="false"/>
165 <Reference name="System.Xml"/>
166 <Reference name="System.Data"/>
167 <Reference name="System.Data.SQLite.dll"/>
168 <Reference name="libsecondlife.dll"/>
169 <Reference name="OpenSim.Framework"/>
170 <Reference name="OpenSim.Framework.Console"/>
171 <Files>
172 <Match pattern="*.cs" recurse="true"/>
173 </Files>
174 </Project>
175
176 <Project name="OpenSim.Storage.LocalStorageBerkeleyDB" path="OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB" type="Library">
177 <Configuration name="Debug">
178 <Options>
179 <OutputPath>../../../bin/</OutputPath>
180 </Options>
181 </Configuration>
182 <Configuration name="Release">
183 <Options>
184 <OutputPath>../../../bin/</OutputPath>
185 </Options>
186 </Configuration>
187
188 <ReferencePath>../../../bin/</ReferencePath>
189 <Reference name="System" localCopy="false"/>
190 <Reference name="System.Xml"/>
191 <Reference name="System.Data"/>
192 <Reference name="Kds.Serialization.dll"/>
193 <Reference name="libdb_dotNET43.dll"/>
194 <Reference name="libsecondlife.dll"/>
195 <Reference name="OpenSim.Framework"/>
196 <Reference name="OpenSim.Framework.Console"/>
197 <Files>
198 <Match pattern="*.cs" recurse="true"/>
199 </Files>
200 </Project>
201
202 <!-- Grid Server Plug-ins -->
203 <Project name="OpenSim.GridInterfaces.Local" path="OpenSim/OpenSim.GridInterfaces/Local" type="Library">
204 <Configuration name="Debug">
205 <Options>
206 <OutputPath>../../../bin/</OutputPath>
207 </Options>
208 </Configuration>
209 <Configuration name="Release">
210 <Options>
211 <OutputPath>../../../bin/</OutputPath>
212 </Options>
213 </Configuration>
214
215 <ReferencePath>../../../bin/</ReferencePath>
216 <Reference name="System" localCopy="false"/>
217 <Reference name="System.Xml"/>
218 <Reference name="Db4objects.Db4o.dll"/>
219 <Reference name="libsecondlife.dll"/>
220 <Reference name="OpenSim.Framework"/>
221 <Reference name="OpenSim.Framework.Console"/>
222 <Files>
223 <Match pattern="*.cs" recurse="true"/>
224 </Files>
225 </Project>
226
227 <Project name="OpenSim.GridInterfaces.Remote" path="OpenSim/OpenSim.GridInterfaces/Remote" type="Library">
228 <Configuration name="Debug">
229 <Options>
230 <OutputPath>../../../bin/</OutputPath>
231 </Options>
232 </Configuration>
233 <Configuration name="Release">
234 <Options>
235 <OutputPath>../../../bin/</OutputPath>
236 </Options>
237 </Configuration>
238
239 <ReferencePath>../../../bin/</ReferencePath>
240 <Reference name="System" localCopy="false"/>
241 <Reference name="System.Xml"/>
242 <Reference name="libsecondlife.dll"/>
243 <Reference name="OpenSim.Framework"/>
244 <Reference name="OpenSim.Framework.Console"/>
245 <Reference name="XMLRPC"/>
246 <Files>
247 <Match pattern="*.cs" recurse="true"/>
248 </Files>
249 </Project>
250
251
252 <Project name="OpenSim.Physics.Manager" path="OpenSim/OpenSim.Physics/Manager" type="Library">
253 <Configuration name="Debug">
254 <Options>
255 <OutputPath>../../../bin/</OutputPath>
256 </Options>
257 </Configuration>
258 <Configuration name="Release">
259 <Options>
260 <OutputPath>../../../bin/</OutputPath>
261 </Options>
262 </Configuration>
263
264 <ReferencePath>../../../bin/</ReferencePath>
265 <Reference name="System" localCopy="false"/>
266 <Reference name="System.Xml" localCopy="false" />
267 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
268 <Reference name="OpenSim.Framework" localCopy="false"/>
269 <Reference name="OpenSim.Framework.Console" localCopy="false"/>
270 <Files>
271 <Match pattern="*.cs" recurse="false"/>
272 </Files>
273 </Project>
274
275
276 <!-- Physics Plug-ins -->
277 <Project name="OpenSim.Physics.BasicPhysicsPlugin" path="OpenSim/OpenSim.Physics/BasicPhysicsPlugin" type="Library">
278 <Configuration name="Debug">
279 <Options>
280 <OutputPath>../../../bin/Physics/</OutputPath>
281 </Options>
282 </Configuration>
283 <Configuration name="Release">
284 <Options>
285 <OutputPath>../../../bin/Physics/</OutputPath>
286 </Options>
287 </Configuration>
288
289 <ReferencePath>../../../bin/</ReferencePath>
290 <Reference name="System" localCopy="false"/>
291 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
292 <Reference name="OpenSim.Physics.Manager" localCopy="false"/>
293 <Files>
294 <Match pattern="*.cs" recurse="true"/>
295 </Files>
296 </Project>
297
298 <Project name="OpenSim.Physics.PhysXPlugin" path="OpenSim/OpenSim.Physics/PhysXPlugin" type="Library">
299 <Configuration name="Debug">
300 <Options>
301 <OutputPath>../../../bin/Physics/</OutputPath>
302 </Options>
303 </Configuration>
304 <Configuration name="Release">
305 <Options>
306 <OutputPath>../../../bin/Physics/</OutputPath>
307 </Options>
308 </Configuration>
309
310 <ReferencePath>../../../bin/</ReferencePath>
311 <Reference name="System" localCopy="false"/>
312 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
313 <Reference name="PhysX_Wrapper_Dotnet.dll" localCopy="false"/>
314 <Reference name="OpenSim.Physics.Manager" localCopy="false"/>
315 <Files>
316 <Match pattern="*.cs" recurse="true"/>
317 </Files>
318 </Project>
319
320 <Project name="OpenSim.Physics.OdePlugin" path="OpenSim/OpenSim.Physics/OdePlugin" type="Library">
321 <Configuration name="Debug">
322 <Options>
323 <OutputPath>../../../bin/Physics/</OutputPath>
324 </Options>
325 </Configuration>
326 <Configuration name="Release">
327 <Options>
328 <OutputPath>../../../bin/Physics/</OutputPath>
329 </Options>
330 </Configuration>
331
332 <ReferencePath>../../../bin/</ReferencePath>
333 <Reference name="System" localCopy="false"/>
334 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
335 <Reference name="OpenSim.Physics.Manager" localCopy="false"/>
336 <Reference name="Ode.NET.dll" localCopy="false" />
337
338 <Files>
339 <Match pattern="*.cs" recurse="true"/>
340 </Files>
341 </Project>
342
343 <!-- Xml Config Dll -->
344 <Project name="OpenSim.GenericConfig.Xml" path="Common/OpenSim.GenericConfig/Xml" type="Library">
345 <Configuration name="Debug">
346 <Options>
347 <OutputPath>../../../bin/</OutputPath>
348 </Options>
349 </Configuration>
350 <Configuration name="Release">
351 <Options>
352 <OutputPath>../../../bin/</OutputPath>
353 </Options>
354 </Configuration>
355
356 <ReferencePath>../../../bin/</ReferencePath>
357 <Reference name="System"/>
358 <Reference name="System.Xml"/>
359 <Reference name="OpenSim.Framework"/>
360
361 <Files>
362 <Match pattern="*.cs" recurse="true"/>
363 </Files>
364 </Project>
365
366 <!-- Basic embedded JVM -->
367 <Project name="OpenSim.Scripting.EmbeddedJVM" path="OpenSim/OpenSim.Scripting/EmbeddedJVM" type="Library">
368 <Configuration name="Debug">
369 <Options>
370 <OutputPath>../../../bin/ScriptEngines/</OutputPath>
371 </Options>
372 </Configuration>
373 <Configuration name="Release">
374 <Options>
375 <OutputPath>../../../bin/ScriptEngines/</OutputPath>
376 </Options>
377 </Configuration>
378
379 <ReferencePath>../../../bin/</ReferencePath>
380 <Reference name="System"/>
381 <Reference name="System.Xml"/>
382 <Reference name="OpenSim.Framework"/>
383
384 <Files>
385 <Match pattern="*.cs" recurse="true"/>
386 </Files>
387 </Project>
388
389
390 <!-- Terrain engine -->
391 <Project name="OpenSim.Terrain.BasicTerrain" path="OpenSim/OpenSim.Terrain.BasicTerrain" type="Library">
392 <Configuration name="Debug">
393 <Options>
394 <OutputPath>../../bin/</OutputPath>
395 </Options>
396 </Configuration>
397 <Configuration name="Release">
398 <Options>
399 <OutputPath>../../bin/</OutputPath>
400 </Options>
401 </Configuration>
402
403 <ReferencePath>../../bin/</ReferencePath>
404 <Reference name="System"/>
405 <Reference name="System.Drawing"/>
406 <Reference name="System.Data"/>
407 <Reference name="System.Xml"/>
408 <Reference name="libTerrain-BSD.dll"/>
409
410 <Files>
411 <Match pattern="*.cs" recurse="true"/>
412 </Files>
413 </Project>
414
415 <Project name="OpenSim.RegionServer" path="OpenSim/OpenSim.RegionServer" type="Library">
416 <Configuration name="Debug">
417 <Options>
418 <OutputPath>../../bin/</OutputPath>
419 </Options>
420 </Configuration>
421 <Configuration name="Release">
422 <Options>
423 <OutputPath>../../bin/</OutputPath>
424 </Options>
425 </Configuration>
426
427 <ReferencePath>../../bin/</ReferencePath>
428 <Reference name="System" localCopy="false"/>
429 <Reference name="System.Xml"/>
430 <Reference name="libsecondlife.dll"/>
431 <Reference name="Axiom.MathLib.dll"/>
432 <Reference name="Db4objects.Db4o.dll"/>
433 <Reference name="OpenSim.Terrain.BasicTerrain"/>
434 <Reference name="OpenSim.Framework"/>
435 <Reference name="OpenSim.Framework.Console"/>
436 <Reference name="OpenSim.GenericConfig.Xml"/>
437 <Reference name="OpenSim.Physics.Manager"/>
438 <Reference name="OpenSim.Servers"/>
439 <Reference name="XMLRPC"/>
440
441 <Files>
442 <Match pattern="*.cs" recurse="true"/>
443 </Files>
444 </Project>
445
446 <!-- OpenSim app -->
447 <Project name="OpenSim" path="OpenSim/OpenSim" type="Exe">
448 <Configuration name="Debug">
449 <Options>
450 <OutputPath>../../bin/</OutputPath>
451 </Options>
452 </Configuration>
453 <Configuration name="Release">
454 <Options>
455 <OutputPath>../../bin/</OutputPath>
456 </Options>
457 </Configuration>
458
459 <ReferencePath>../../bin/</ReferencePath>
460 <Reference name="System" localCopy="false"/>
461 <Reference name="System.Xml"/>
462 <Reference name="libsecondlife.dll"/>
463 <Reference name="Axiom.MathLib.dll"/>
464 <Reference name="Db4objects.Db4o.dll"/>
465 <Reference name="OpenSim.Terrain.BasicTerrain"/>
466 <Reference name="OpenSim.Framework"/>
467 <Reference name="OpenSim.Framework.Console"/>
468 <Reference name="OpenSim.Physics.Manager"/>
469 <Reference name="OpenSim.Servers"/>
470 <Reference name="OpenSim.RegionServer"/>
471 <Reference name="OpenSim.GenericConfig.Xml"/>
472 <Reference name="XMLRPC"/>
473
474 <Files>
475 <Match pattern="*.cs" recurse="true"/>
476 </Files>
477 </Project>
478
479</Solution>
480
481
482<Solution name="OpenGridServices" activeConfig="Debug" path="./">
483 <Configuration name="Debug">
484 <Options>
485 <CompilerDefines>TRACE;DEBUG</CompilerDefines>
486 <OptimizeCode>false</OptimizeCode>
487 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
488 <AllowUnsafe>false</AllowUnsafe>
489 <WarningLevel>4</WarningLevel>
490 <WarningsAsErrors>false</WarningsAsErrors>
491 <SuppressWarnings></SuppressWarnings>
492 <OutputPath>bin</OutputPath>
493 <DebugInformation>true</DebugInformation>
494 <IncrementalBuild>true</IncrementalBuild>
495 <NoStdLib>false</NoStdLib>
496 </Options>
497 </Configuration>
498 <Configuration name="Release">
499 <Options>
500 <CompilerDefines>TRACE</CompilerDefines>
501 <OptimizeCode>true</OptimizeCode>
502 <CheckUnderflowOverflow>false</CheckUnderflowOverflow>
503 <AllowUnsafe>false</AllowUnsafe>
504 <WarningLevel>4</WarningLevel>
505 <WarningsAsErrors>false</WarningsAsErrors>
506 <SuppressWarnings></SuppressWarnings>
507 <OutputPath>bin</OutputPath>
508 <DebugInformation>false</DebugInformation>
509 <IncrementalBuild>true</IncrementalBuild>
510 <NoStdLib>false</NoStdLib>
511 </Options>
512 </Configuration>
513
514
515 <!-- OpenGrid Data Services -->
516 <Project name="OpenGrid.Framework.Data" path="OpenGridServices/OpenGrid.Framework.Data" type="Library">
517 <Configuration name="Debug">
518 <Options>
519 <OutputPath>../../bin/</OutputPath>
520 </Options>
521 </Configuration>
522 <Configuration name="Release">
523 <Options>
524 <OutputPath>../../bin/</OutputPath>
525 </Options>
526 </Configuration>
527
528 <ReferencePath>../../bin/</ReferencePath>
529 <Reference name="System" localCopy="false"/>
530 <Reference name="System.Xml"/>
531 <Reference name="System.Data"/>
532 <Reference name="libsecondlife.dll"/>
533 <Files>
534 <Match pattern="*.cs" recurse="true"/>
535 </Files>
536 </Project>
537
538 <Project name="OpenGrid.Framework.Data.MySQL" path="OpenGridServices/OpenGrid.Framework.Data.MySQL" type="Library">
539 <Configuration name="Debug">
540 <Options>
541 <OutputPath>../../bin/</OutputPath>
542 </Options>
543 </Configuration>
544 <Configuration name="Release">
545 <Options>
546 <OutputPath>../../bin/</OutputPath>
547 </Options>
548 </Configuration>
549
550 <ReferencePath>../../bin/</ReferencePath>
551 <Reference name="System" localCopy="false"/>
552 <Reference name="System.Xml"/>
553 <Reference name="System.Data"/>
554 <Reference name="OpenGrid.Framework.Data"/>
555 <Reference name="libsecondlife.dll"/>
556 <Reference name="MySql.Data.dll"/>
557 <Files>
558 <Match pattern="*.cs" recurse="true"/>
559 </Files>
560 </Project>
561
562 <Project name="OpenGrid.Framework.Data.DB4o" path="OpenGridServices/OpenGrid.Framework.Data.DB4o" type="Library">
563 <Configuration name="Debug">
564 <Options>
565 <OutputPath>../../bin/</OutputPath>
566 </Options>
567 </Configuration>
568 <Configuration name="Release">
569 <Options>
570 <OutputPath>../../bin/</OutputPath>
571 </Options>
572 </Configuration>
573
574 <ReferencePath>../../bin/</ReferencePath>
575 <Reference name="System" localCopy="false"/>
576 <Reference name="System.Xml"/>
577 <Reference name="System.Data"/>
578 <Reference name="OpenGrid.Framework.Data"/>
579 <Reference name="libsecondlife.dll"/>
580 <Reference name="Db4objects.Db4o.dll"/>
581 <Files>
582 <Match pattern="*.cs" recurse="true"/>
583 </Files>
584 </Project>
585
586 <Project name="OpenGrid.Framework.Data.MSSQL" path="OpenGridServices/OpenGrid.Framework.Data.MSSQL" type="Library">
587 <Configuration name="Debug">
588 <Options>
589 <OutputPath>../../bin/</OutputPath>
590 </Options>
591 </Configuration>
592 <Configuration name="Release">
593 <Options>
594 <OutputPath>../../bin/</OutputPath>
595 </Options>
596 </Configuration>
597
598 <ReferencePath>../../bin/</ReferencePath>
599 <Reference name="System" localCopy="false"/>
600 <Reference name="System.Xml"/>
601 <Reference name="System.Data"/>
602 <Reference name="OpenGrid.Framework.Data"/>
603 <Reference name="libsecondlife.dll"/>
604 <Files>
605 <Match pattern="*.cs" recurse="true"/>
606 </Files>
607 </Project>
608
609 <Project name="OpenGrid.Framework.Data.SQLite" path="OpenGridServices/OpenGrid.Framework.Data.SQLite" type="Library">
610 <Configuration name="Debug">
611 <Options>
612 <OutputPath>../../bin/</OutputPath>
613 </Options>
614 </Configuration>
615 <Configuration name="Release">
616 <Options>
617 <OutputPath>../../bin/</OutputPath>
618 </Options>
619 </Configuration>
620
621 <ReferencePath>../../bin/</ReferencePath>
622 <Reference name="System" localCopy="false"/>
623 <Reference name="System.Xml"/>
624 <Reference name="System.Data"/>
625 <Reference name="System.Data.SQLite.dll"/>
626 <Reference name="OpenGrid.Framework.Data"/>
627 <Reference name="libsecondlife.dll"/>
628 <Files>
629 <Match pattern="*.cs" recurse="true"/>
630 </Files>
631 </Project>
632
633 <!-- OGS projects -->
634
635 <Project name="OpenGrid.Framework.Manager" path="OpenGridServices/OpenGrid.Framework.Manager" type="Library">
636 <Configuration name="Debug">
637 <Options>
638 <OutputPath>../../bin/</OutputPath>
639 </Options>
640 </Configuration>
641 <Configuration name="Release">
642 <Options>
643 <OutputPath>../../bin/</OutputPath>
644 </Options>
645 </Configuration>
646
647 <ReferencePath>../../bin/</ReferencePath>
648 <Reference name="System" localCopy="false"/>
649 <Reference name="OpenSim.Framework.dll"/>
650 <Reference name="OpenSim.Servers.dll"/>
651 <Reference name="libsecondlife.dll"/>
652 <Reference name="XMLRPC"/>
653
654
655 <Files>
656 <Match pattern="*.cs" recurse="true"/>
657 </Files>
658 </Project>
659
660
661 <Project name="ServiceManager" path="OpenGridServices/ServiceManager" type="Exe">
662 <Configuration name="Debug">
663 <Options>
664 <OutputPath>../../bin/</OutputPath>
665 </Options>
666 </Configuration>
667 <Configuration name="Release">
668 <Options>
669 <OutputPath>../../bin/</OutputPath>
670 </Options>
671 </Configuration>
672
673 <ReferencePath>../../bin/</ReferencePath>
674 <Reference name="System" localCopy="false"/>
675 <Reference name="System.ServiceProcess" localCopy="false"/>
676 <Reference name="System.Xml" localCopy="false"/>
677 <Reference name="libsecondlife.dll"/>
678 <Reference name="OpenSim.GenericConfig.Xml"/>
679 <Reference name="OpenSim.Framework.dll"/>
680
681 <Files>
682 <Match pattern="*.cs" recurse="true"/>
683 </Files>
684 </Project>
685
686
687 <Project name="OpenGridServices.GridServer" path="OpenGridServices/OpenGridServices.GridServer" type="Exe">
688 <Configuration name="Debug">
689 <Options>
690 <OutputPath>../../bin/</OutputPath>
691 </Options>
692 </Configuration>
693 <Configuration name="Release">
694 <Options>
695 <OutputPath>../../bin/</OutputPath>
696 </Options>
697 </Configuration>
698
699 <ReferencePath>../../bin/</ReferencePath>
700 <Reference name="System" localCopy="false"/>
701 <Reference name="System.Data" localCopy="false"/>
702 <Reference name="System.Xml" localCopy="false"/>
703 <Reference name="OpenSim.Framework"/>
704 <Reference name="OpenSim.Framework.Console"/>
705 <Reference name="OpenSim.Servers"/>
706 <Reference name="OpenGrid.Framework.Data"/>
707 <Reference name="OpenGrid.Framework.Manager"/>
708 <Reference name="OpenSim.GenericConfig.Xml"/>
709 <Reference name="libsecondlife.dll"/>
710 <Reference name="Db4objects.Db4o.dll"/>
711 <Reference name="XMLRPC"/>
712
713 <Files>
714 <Match pattern="*.cs" recurse="true"/>
715 </Files>
716 </Project>
717
718 <Project name="OpenGridServices.AssetServer" path="OpenGridServices/OpenGridServices.AssetServer" type="Exe">
719 <Configuration name="Debug">
720 <Options>
721 <OutputPath>../../bin/</OutputPath>
722 </Options>
723 </Configuration>
724 <Configuration name="Release">
725 <Options>
726 <OutputPath>../../bin/</OutputPath>
727 </Options>
728 </Configuration>
729
730 <ReferencePath>../../bin/</ReferencePath>
731 <Reference name="System" localCopy="false"/>
732 <Reference name="System.Data" localCopy="false"/>
733 <Reference name="System.Xml" localCopy="false"/>
734 <Reference name="OpenSim.Framework"/>
735 <Reference name="OpenSim.Framework.Console"/>
736 <Reference name="OpenSim.GridInterfaces.Local"/>
737 <Reference name="OpenSim.Servers"/>
738 <Reference name="libsecondlife.dll"/>
739 <Reference name="Db4objects.Db4o.dll"/>
740 <Reference name="XMLRPC"/>
741
742 <Files>
743 <Match pattern="*.cs" recurse="true"/>
744 </Files>
745 </Project>
746
747 <Project name="OpenGridServices.InventoryServer" path="OpenGridServices/OpenGridServices.InventoryServer" type="Exe">
748 <Configuration name="Debug">
749 <Options>
750 <OutputPath>../../bin/</OutputPath>
751 </Options>
752 </Configuration>
753 <Configuration name="Release">
754 <Options>
755 <OutputPath>../../bin/</OutputPath>
756 </Options>
757 </Configuration>
758
759 <ReferencePath>../../bin/</ReferencePath>
760 <Reference name="System" localCopy="false"/>
761 <Reference name="System.Data" localCopy="false"/>
762 <Reference name="System.Xml" localCopy="false"/>
763 <Reference name="OpenSim.Framework"/>
764 <Reference name="OpenSim.Framework.Console"/>
765 <Reference name="OpenSim.GridInterfaces.Local"/>
766 <Reference name="OpenGrid.Framework.Data"/>
767 <Reference name="OpenSim.Servers"/>
768 <Reference name="libsecondlife.dll"/>
769 <Reference name="Db4objects.Db4o.dll"/>
770 <Reference name="XMLRPC"/>
771
772 <Files>
773 <Match pattern="*.cs" recurse="true"/>
774 </Files>
775 </Project>
776
777 <Project name="OpenGridServices.UserServer" path="OpenGridServices/OpenGridServices.UserServer" type="Exe">
778 <Configuration name="Debug">
779 <Options>
780 <OutputPath>../../bin/</OutputPath>
781 </Options>
782 </Configuration>
783 <Configuration name="Release">
784 <Options>
785 <OutputPath>../../bin/</OutputPath>
786 </Options>
787 </Configuration>
788
789 <ReferencePath>../../bin/</ReferencePath>
790 <Reference name="System" localCopy="false"/>
791 <Reference name="System.Data" localCopy="false"/>
792 <Reference name="System.Xml" localCopy="false"/>
793 <Reference name="OpenSim.Framework"/>
794 <Reference name="OpenSim.Framework.Console"/>
795 <Reference name="OpenGrid.Framework.Data"/>
796 <Reference name="OpenSim.GenericConfig.Xml"/>
797 <Reference name="OpenSim.Servers"/>
798 <Reference name="libsecondlife.dll"/>
799 <Reference name="Db4objects.Db4o.dll"/>
800 <Reference name="XMLRPC"/>
801
802 <Files>
803 <Match pattern="*.cs" recurse="true"/>
804 </Files>
805 </Project>
806
807
808
809 <Project name="OpenGrid.Config.GridConfigDb4o" path="OpenGridServices/OpenGrid.Config/GridConfigDb4o" type="Library">
810 <Configuration name="Debug">
811 <Options>
812 <OutputPath>../../../bin/</OutputPath>
813 </Options>
814 </Configuration>
815 <Configuration name="Release">
816 <Options>
817 <OutputPath>../../../bin/</OutputPath>
818 </Options>
819 </Configuration>
820
821 <ReferencePath>../../../bin/</ReferencePath>
822 <Reference name="System" localCopy="false"/>
823 <Reference name="System.Data.dll"/>
824 <Reference name="System.Xml"/>
825 <Reference name="libsecondlife.dll"/>
826 <Reference name="Db4objects.Db4o.dll"/>
827 <Reference name="OpenSim.Framework"/>
828 <Reference name="OpenSim.Framework.Console"/>
829 <Files>
830 <Match pattern="*.cs" recurse="true"/>
831 </Files>
832 </Project>
833
834 <Project name="OpenUser.Config.UserConfigDb4o" path="OpenGridServices/OpenUser.Config/UserConfigDb4o" type="Library">
835 <Configuration name="Debug">
836 <Options>
837 <OutputPath>../../../bin/</OutputPath>
838 </Options>
839 </Configuration>
840 <Configuration name="Release">
841 <Options>
842 <OutputPath>../../../bin/</OutputPath>
843 </Options>
844 </Configuration>
845
846 <ReferencePath>../../../bin/</ReferencePath>
847 <Reference name="System" localCopy="false"/>
848 <Reference name="System.Data.dll"/>
849 <Reference name="System.Xml"/>
850 <Reference name="libsecondlife.dll"/>
851 <Reference name="Db4objects.Db4o.dll"/>
852 <Reference name="OpenSim.Framework"/>
853 <Reference name="OpenSim.Framework.Console"/>
854 <Files>
855 <Match pattern="*.cs" recurse="true"/>
856 </Files>
857 </Project>
858
859</Solution>
860
861
862 <!-- Prebuild tool -->
863 <Solution name="Prebuild" path="Prebuild/" >
864 <Configuration name="Debug">
865 <Options>
866 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
867 <OptimizeCode>false</OptimizeCode>
868 <OutputPath>bin/Debug</OutputPath>
869 <DebugInformation>true</DebugInformation>
870 <SuppressWarnings>1595</SuppressWarnings>
871 </Options>
872 </Configuration>
873 <Configuration name="Release">
874 <Options>
875 <CompilerDefines>TRACE</CompilerDefines>
876 <OutputPath>bin/Release</OutputPath>
877 <OptimizeCode>true</OptimizeCode>
878 <DebugInformation>false</DebugInformation>
879 <SuppressWarnings>1595</SuppressWarnings>
880 </Options>
881 </Configuration>
882 <Project name="Prebuild" path="src/" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild">
883 <Configuration name="Debug">
884 <Options>
885 <CompilerDefines>DEBUG;TRACE</CompilerDefines>
886 <OptimizeCode>false</OptimizeCode>
887 <OutputPath>..\..\bin\</OutputPath>
888 <DebugInformation>true</DebugInformation>
889 <KeyFile>Prebuild.snk</KeyFile>
890 <SuppressWarnings>1595</SuppressWarnings>
891 </Options>
892 </Configuration>
893 <Configuration name="Release">
894 <Options>
895 <CompilerDefines>TRACE</CompilerDefines>
896 <OutputPath>..\..\bin\</OutputPath>
897 <OptimizeCode>true</OptimizeCode>
898 <DebugInformation>false</DebugInformation>
899 <KeyFile>Prebuild.snk</KeyFile>
900 <SuppressWarnings>1595</SuppressWarnings>
901 </Options>
902 </Configuration>
903 <ReferencePath>../../bin/</ReferencePath>
904 <Reference name="System.EnterpriseServices" />
905 <Reference name="System.Xml" />
906 <Reference name="System" />
907 <Files>
908 <Match pattern="App.ico" buildAction="EmbeddedResource"/>
909 <Match path="data" pattern="prebuild-1.7.xsd" buildAction="EmbeddedResource"/>
910 <Match pattern="*.cs" recurse="true"/>
911 </Files>
912 </Project>
913 </Solution>
914</Prebuild>
915
916
diff --git a/releng/CAUTION b/releng/CAUTION
deleted file mode 100644
index 6418046..0000000
--- a/releng/CAUTION
+++ /dev/null
@@ -1,4 +0,0 @@
1!!!!!!!!!!!!! DANGER DANGER !!!!!!!!!!!!!!!!!!!!!!!!!!!
2DO NOT RUN ANY OF THE SCRIPTS IN THIS DIRECTORY WITHOUT
3READING THEM!!!!!!!!!!!!!
4!!!!!!!!!!!!! DANGER DANGER !!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/releng/README b/releng/README
deleted file mode 100644
index e73f395..0000000
--- a/releng/README
+++ /dev/null
@@ -1,3 +0,0 @@
1This directory contains scripts etc for creating a tarball/package out of the SVN tree.
2Use makerel.sh to generate a tarball, do not use other scripts
3It is designed to be run before releases or by developers/users before a local install from source.
diff --git a/releng/createreldir.sh b/releng/createreldir.sh
deleted file mode 100755
index eb470b0..0000000
--- a/releng/createreldir.sh
+++ /dev/null
@@ -1,9 +0,0 @@
1#!/bin/sh
2
3# this script creates a new opensim-major.minor directory and copies all the relevant files into it
4# not designed for direct invocation from the command line
5
6mkdir opensim-$OPENSIMMAJOR.$OPENSIMMINOR
7
8cp -R dist/* opensim-$OPENSIMMAJOR.$OPENSIMMINOR
9cp -R build/bin/* opensim-$OPENSIMMAJOR.$OPENSIMMINOR/bin
diff --git a/releng/dist/INSTALL b/releng/dist/INSTALL
deleted file mode 100644
index f67fe43..0000000
--- a/releng/dist/INSTALL
+++ /dev/null
@@ -1,33 +0,0 @@
1INSTALLING FROM SOURCE WITH WINDOWS
2
31 - Ensure you have visual studio express (the C# edition)
4
52 - Check you have a clean source tree with the latest VS2005 solution, if unsure run prebuild (See README file)
6
73 - Open the solution in visual studio and build it
8
94 - Look in bin/ for the output
10
115 - ???
12
136 - Profit
14
15INSTALLING FROM SOURCE WITH LINUX/BSD/*NIX
16
171 - Ensure you have a clean source tree with latest nant build files, if not, get one or run prebuild (See README file)
18
192 - Go to a shell prompt and change to the correct directory
20
213 - Type the following:
22
23nant
24
254 - Look in bin/ for the output
26
275 - ???
28
296 - Profit
30
31INSTALLING BINARY RELEASE
32
33Simply extract the tarball into a good location and run straight out of bin/. You may also wish to put all the binaries into /opt/opensim on *nix systems and adjust your path accordingly. At time of writing there is no official way yet to do this. Watch this space.
diff --git a/releng/dist/README b/releng/dist/README
deleted file mode 100644
index 125d5da..0000000
--- a/releng/dist/README
+++ /dev/null
@@ -1,70 +0,0 @@
1For installation notes, please read INSTALL
2
3RUNNING SANDBOX MODE (the standard way)
4
5To get up and running in sandbox mode, please start up opensim like this from the command line:
6
7(first ensure you are in the right directory)
8
9OpenSim.exe -sandbox (windows)
10
11mono OpenSim.exe -sandbox (linux/BSD/MacOS X)
12
13Then startup your second life viewer with the following parameters:
14
15-loginuri http://yourserver:9000/
16
17The method to do this is dependent upon your OS. "yourserver" will be 127.0.0.1 if you accept the defaults when starting opensim.
18
19
20RUNNING SANDBOX WITH USER ACCOUNTS
21
22* open cmd window, go to /bin and launch
23OpenSim.exe -sandbox -loginserver -useraccounts
24
25* launch web browser, go to
26http://localhost:9000/Admin
27enter password 'Admin'
28
29* Select 'Accounts', enter credentials, press 'Create'
30
31* Now, log on thru your viewer (see above) with your newly created credentials.
32
33* Have Fun!
34
35
36PREBUILD
37
38We use Prebuild to generate vs2005 solutions and nant build scripts.
39
40=== Building Prebuild ===
41
42At the moment, the Prebuild exe is shipped as /bin/Prebuild.exe so you shouldn't really have to build it.
43
44But here's the instructions anyway :
45
46The Prebuild master project is /prebuild.xml
47
48To build it with vs2005 :
49
50* build the solution /Prebuild/Prebuild.sln
51
52To build it with nant :
53
54* cd to /Prebuild/
55* type 'nant'
56
57After you've built it, it will land in the root /bin/ directory,
58
59=== Modyfying the OpenSim solution ===
60
61When adding or changing projects, modify the prebuild.xml and then execute
62
63bin/Prebuild.exe /target {target}
64
65where target is either
66vs2005 - to generate new vs2005 solutions and projects
67nant - to generate new nant build scripts
68
69Remember to run prebuild whenever you've added or removed files as well.
70
diff --git a/releng/dist/SQL/mysql-agents.sql b/releng/dist/SQL/mysql-agents.sql
deleted file mode 100644
index 8194ca9..0000000
--- a/releng/dist/SQL/mysql-agents.sql
+++ /dev/null
@@ -1,24 +0,0 @@
1SET FOREIGN_KEY_CHECKS=0;
2-- ----------------------------
3-- Table structure for agents
4-- ----------------------------
5CREATE TABLE `agents` (
6 `UUID` varchar(36) NOT NULL,
7 `sessionID` varchar(36) NOT NULL,
8 `secureSessionID` varchar(36) NOT NULL,
9 `agentIP` varchar(16) NOT NULL,
10 `agentPort` int(11) NOT NULL,
11 `agentOnline` tinyint(4) NOT NULL,
12 `loginTime` int(11) NOT NULL,
13 `logoutTime` int(11) NOT NULL,
14 `currentRegion` varchar(36) NOT NULL,
15 `currentHandle` bigint(20) unsigned NOT NULL,
16 `currentPos` varchar(64) NOT NULL,
17 PRIMARY KEY (`UUID`),
18 UNIQUE KEY `session` (`sessionID`),
19 UNIQUE KEY `ssession` (`secureSessionID`)
20) ENGINE=MyISAM DEFAULT CHARSET=utf8;
21
22-- ----------------------------
23-- Records
24-- ----------------------------
diff --git a/releng/dist/SQL/mysql-inventoryfolders.sql b/releng/dist/SQL/mysql-inventoryfolders.sql
deleted file mode 100644
index c30239e..0000000
--- a/releng/dist/SQL/mysql-inventoryfolders.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1CREATE TABLE `inventoryfolders` (
2 `folderID` varchar(36) NOT NULL default '',
3 `agentID` varchar(36) default NULL,
4 `parentFolderID` varchar(36) default NULL,
5 `folderName` varchar(64) default NULL,
6 PRIMARY KEY (`folderID`),
7 KEY `owner` (`agentID`),
8 KEY `parent` (`parentFolderID`)
9) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/releng/dist/SQL/mysql-inventoryitems.sql b/releng/dist/SQL/mysql-inventoryitems.sql
deleted file mode 100644
index 6e90005..0000000
--- a/releng/dist/SQL/mysql-inventoryitems.sql
+++ /dev/null
@@ -1,14 +0,0 @@
1CREATE TABLE `inventoryitems` (
2 `inventoryID` varchar(36) NOT NULL default '',
3 `assetID` varchar(36) default NULL,
4 `type` int(11) default NULL,
5 `parentFolderID` varchar(36) default NULL,
6 `avatarID` varchar(36) default NULL,
7 `inventoryName` varchar(64) default NULL,
8 `inventoryDescription` varchar(64) default NULL,
9 `inventoryNextPermissions` int(10) unsigned default NULL,
10 `inventoryCurrentPermissions` int(10) unsigned default NULL,
11 PRIMARY KEY (`inventoryID`),
12 KEY `owner` (`avatarID`),
13 KEY `folder` (`parentFolderID`)
14) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/releng/dist/SQL/mysql-logs.sql b/releng/dist/SQL/mysql-logs.sql
deleted file mode 100644
index 05c19e8..0000000
--- a/releng/dist/SQL/mysql-logs.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1CREATE TABLE `logs` (
2 `logID` int(10) unsigned NOT NULL auto_increment,
3 `target` varchar(36) default NULL,
4 `server` varchar(64) default NULL,
5 `method` varchar(64) default NULL,
6 `arguments` varchar(255) default NULL,
7 `priority` int(11) default NULL,
8 `message` text,
9 PRIMARY KEY (`logID`)
10) ENGINE=InnoDB DEFAULT CHARSET=utf8 \ No newline at end of file
diff --git a/releng/dist/SQL/mysql-regions.sql b/releng/dist/SQL/mysql-regions.sql
deleted file mode 100644
index 4f98826..0000000
--- a/releng/dist/SQL/mysql-regions.sql
+++ /dev/null
@@ -1,29 +0,0 @@
1CREATE TABLE `regions` (
2 `uuid` varchar(36) NOT NULL,
3 `regionHandle` bigint(20) unsigned NOT NULL,
4 `regionName` varchar(32) default NULL,
5 `regionRecvKey` varchar(128) default NULL,
6 `regionSendKey` varchar(128) default NULL,
7 `regionSecret` varchar(128) default NULL,
8 `regionDataURI` varchar(255) default NULL,
9 `serverIP` varchar(16) default NULL,
10 `serverPort` int(10) unsigned default NULL,
11 `serverURI` varchar(255) default NULL,
12 `locX` int(10) unsigned default NULL,
13 `locY` int(10) unsigned default NULL,
14 `locZ` int(10) unsigned default NULL,
15 `eastOverrideHandle` bigint(20) unsigned default NULL,
16 `westOverrideHandle` bigint(20) unsigned default NULL,
17 `southOverrideHandle` bigint(20) unsigned default NULL,
18 `northOverrideHandle` bigint(20) unsigned default NULL,
19 `regionAssetURI` varchar(255) default NULL,
20 `regionAssetRecvKey` varchar(128) default NULL,
21 `regionAssetSendKey` varchar(128) default NULL,
22 `regionUserURI` varchar(255) default NULL,
23 `regionUserRecvKey` varchar(128) default NULL,
24 `regionUserSendKey` varchar(128) default NULL, `regionMapTexture` varchar(36) default NULL,
25 PRIMARY KEY (`uuid`),
26 KEY `regionName` (`regionName`),
27 KEY `regionHandle` (`regionHandle`),
28 KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`)
29) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED \ No newline at end of file
diff --git a/releng/dist/SQL/mysql-users.sql b/releng/dist/SQL/mysql-users.sql
deleted file mode 100644
index 5ce4d1c..0000000
--- a/releng/dist/SQL/mysql-users.sql
+++ /dev/null
@@ -1,34 +0,0 @@
1SET FOREIGN_KEY_CHECKS=0;
2-- ----------------------------
3-- Table structure for users
4-- ----------------------------
5CREATE TABLE `users` (
6 `UUID` varchar(36) NOT NULL default '',
7 `username` varchar(32) NOT NULL,
8 `lastname` varchar(32) NOT NULL,
9 `passwordHash` varchar(32) NOT NULL,
10 `passwordSalt` varchar(32) NOT NULL,
11 `homeRegion` bigint(20) unsigned default NULL,
12 `homeLocationX` float default NULL,
13 `homeLocationY` float default NULL,
14 `homeLocationZ` float default NULL,
15 `homeLookAtX` float default NULL,
16 `homeLookAtY` float default NULL,
17 `homeLookAtZ` float default NULL,
18 `created` int(11) NOT NULL,
19 `lastLogin` int(11) NOT NULL,
20 `userInventoryURI` varchar(255) default NULL,
21 `userAssetURI` varchar(255) default NULL,
22 `profileCanDoMask` int(10) unsigned default NULL,
23 `profileWantDoMask` int(10) unsigned default NULL,
24 `profileAboutText` text,
25 `profileFirstText` text,
26 `profileImage` varchar(36) default NULL,
27 `profileFirstImage` varchar(36) default NULL,
28 PRIMARY KEY (`UUID`),
29 UNIQUE KEY `usernames` (`username`,`lastname`)
30) ENGINE=MyISAM DEFAULT CHARSET=utf8;
31
32-- ----------------------------
33-- Records
34-- ----------------------------
diff --git a/releng/dist/bin/OpenSim b/releng/dist/bin/OpenSim
deleted file mode 100755
index 9b46075..0000000
--- a/releng/dist/bin/OpenSim
+++ /dev/null
@@ -1,3 +0,0 @@
1#!/bin/sh
2
3mono OpenSim.exe $*
diff --git a/releng/dobuild.sh b/releng/dobuild.sh
deleted file mode 100755
index dd324d8..0000000
--- a/releng/dobuild.sh
+++ /dev/null
@@ -1,22 +0,0 @@
1#!/bin/sh
2
3# this script does a guaranteed clean build from SVN using a URL specified on the command line
4
5rm -rf build/
6mkdir build
7
8printf "Getting fresh source tree from SVN..."
9svn checkout $1 build
10
11printf "Updating templates..."
12./parsetmpl.sh templates/VersionInfo.cs.tmpl >build/OpenSim/OpenSim.RegionServer/VersionInfo.cs
13
14printf "Running prebuild..."
15cd build
16mono bin/Prebuild.exe /target nant
17
18printf "Doing the build..."
19nant -buildfile:OpenSim.build
20mono bin/Prebuild.exe /target nant
21nant -buildfile:OpenGridServices.build
22
diff --git a/releng/makerel.sh b/releng/makerel.sh
deleted file mode 100755
index b7bc568..0000000
--- a/releng/makerel.sh
+++ /dev/null
@@ -1,30 +0,0 @@
1#!/bin/sh
2
3# This is the one!
4
5export OPENSIMMAJOR=0
6export OPENSIMMINOR=2
7export BUILD=`date +%s`
8export BRANCH=DEVEL
9export SVNURL=svn://openmetaverse.org/opensim/trunk
10
11
12
13
14
15# shouldn't have to change anything below here
16
17script dobuild.log -c "./dobuild.sh $SVNURL"
18if [ ! $? -eq 0 ]
19then
20 echo "Build failed!"
21else
22 script createrel.log -c ./createreldir.sh
23 rm -rf build
24 tar cvf opensim-$OPENSIMMAJOR.$OPENSIMMINOR-$BUILD-$BRANCH.tar opensim-$OPENSIMMAJOR.$OPENSIMMINOR/*
25 gzip opensim-$OPENSIMMAJOR.$OPENSIMMINOR-$BUILD-$BRANCH.tar
26fi
27
28rm -rf opensim-$OPENSIMMAJOR.$OPENSIMMINOR
29echo "Produced binary tarball ready for distribution."
30
diff --git a/releng/parsetmpl.sh b/releng/parsetmpl.sh
deleted file mode 100755
index 0ce6d24..0000000
--- a/releng/parsetmpl.sh
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/sh
2
3# this script parses a template to replace @@ tokens
4
5cat $1 | sed s/@@VERSION/$OPENSIMMAJOR.$OPENSIMMINOR/g | sed s/@@BUILD/$BUILD/g | sed s/@@SVNREV/`svnversion`/g
diff --git a/releng/templates/VersionInfo.cs.tmpl b/releng/templates/VersionInfo.cs.tmpl
deleted file mode 100644
index 29159e2..0000000
--- a/releng/templates/VersionInfo.cs.tmpl
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2Copyright (c) OpenSim project, http://osgrid.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*/
26
27using System;
28
29namespace OpenSim
30{
31 /// <summary>
32 /// </summary>
33 public class VersionInfo
34 {
35 public static string Version = "@@VERSION, Build @@BUILD, Revision @@SVNREV";
36 }
37}
diff --git a/runprebuild.bat b/runprebuild.bat
deleted file mode 100644
index c1e5d0e..0000000
--- a/runprebuild.bat
+++ /dev/null
@@ -1,2 +0,0 @@
1bin\Prebuild.exe /target nant
2bin\Prebuild.exe /target vs2005 \ No newline at end of file
diff --git a/share/php/generateUserFunction.php b/share/php/generateUserFunction.php
deleted file mode 100644
index 52ebc9f..0000000
--- a/share/php/generateUserFunction.php
+++ /dev/null
@@ -1,46 +0,0 @@
1<?php
2 // GenerateUser (v1.0)
3 // Creates a new user account, and returns it into an associative array.
4 // --
5 // $firstname - The users firstname
6 // $lastname - The users lastname
7 // $password - the users password
8 // $home - the regionhandle of the users home location
9 // --
10 function generateUser($firstname,$lastname,$password,$home) {
11 $user = array();
12 $user['UUID'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
13 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
14 mt_rand( 0, 0x0fff ) | 0x4000,
15 mt_rand( 0, 0x3fff ) | 0x8000,
16 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );
17 $user['username'] = $firstname;
18 $user['lastname'] = $lastname;
19
20 $user['passwordSalt'] = md5(microtime() . mt_rand(0,0xffff));
21 $user['passwordHash'] = md5(md5($password) . ":" . $user['passwordSalt']);
22
23 $user['homeRegion'] = $home;
24 $user['homeLocationX'] = 128;
25 $user['homeLocationY'] = 128;
26 $user['homeLocationZ'] = 128;
27 $user['homeLookAtX'] = 15;
28 $user['homeLookAtY'] = 15;
29 $user['homeLookAtZ'] = 15;
30
31 $user['created'] = time();
32 $user['lastLogin'] = 0;
33
34 $user['userInventoryURI'] = "http://inventory.server.tld:8004/";
35 $user['userAssetURI'] = "http://asset.server.tld:8003/";
36
37 $user['profileCanDoMask'] = 0;
38 $user['profileWantDoMask'] = 0;
39 $user['profileAboutText'] = "I am a user.";
40 $user['profileFirstText'] = "Stuff.";
41 $user['profileImage'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 0, 0, 0, 0, 0, 0, 0, 0 );
42 $user['profileFirstImage'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 0, 0, 0, 0, 0, 0, 0, 0 );
43
44 return $user;
45 }
46?> \ No newline at end of file
diff --git a/share/sql/mysql-agents.sql b/share/sql/mysql-agents.sql
deleted file mode 100644
index 8194ca9..0000000
--- a/share/sql/mysql-agents.sql
+++ /dev/null
@@ -1,24 +0,0 @@
1SET FOREIGN_KEY_CHECKS=0;
2-- ----------------------------
3-- Table structure for agents
4-- ----------------------------
5CREATE TABLE `agents` (
6 `UUID` varchar(36) NOT NULL,
7 `sessionID` varchar(36) NOT NULL,
8 `secureSessionID` varchar(36) NOT NULL,
9 `agentIP` varchar(16) NOT NULL,
10 `agentPort` int(11) NOT NULL,
11 `agentOnline` tinyint(4) NOT NULL,
12 `loginTime` int(11) NOT NULL,
13 `logoutTime` int(11) NOT NULL,
14 `currentRegion` varchar(36) NOT NULL,
15 `currentHandle` bigint(20) unsigned NOT NULL,
16 `currentPos` varchar(64) NOT NULL,
17 PRIMARY KEY (`UUID`),
18 UNIQUE KEY `session` (`sessionID`),
19 UNIQUE KEY `ssession` (`secureSessionID`)
20) ENGINE=MyISAM DEFAULT CHARSET=utf8;
21
22-- ----------------------------
23-- Records
24-- ----------------------------
diff --git a/share/sql/mysql-inventoryfolders.sql b/share/sql/mysql-inventoryfolders.sql
deleted file mode 100644
index c30239e..0000000
--- a/share/sql/mysql-inventoryfolders.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1CREATE TABLE `inventoryfolders` (
2 `folderID` varchar(36) NOT NULL default '',
3 `agentID` varchar(36) default NULL,
4 `parentFolderID` varchar(36) default NULL,
5 `folderName` varchar(64) default NULL,
6 PRIMARY KEY (`folderID`),
7 KEY `owner` (`agentID`),
8 KEY `parent` (`parentFolderID`)
9) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/share/sql/mysql-inventoryitems.sql b/share/sql/mysql-inventoryitems.sql
deleted file mode 100644
index 6e90005..0000000
--- a/share/sql/mysql-inventoryitems.sql
+++ /dev/null
@@ -1,14 +0,0 @@
1CREATE TABLE `inventoryitems` (
2 `inventoryID` varchar(36) NOT NULL default '',
3 `assetID` varchar(36) default NULL,
4 `type` int(11) default NULL,
5 `parentFolderID` varchar(36) default NULL,
6 `avatarID` varchar(36) default NULL,
7 `inventoryName` varchar(64) default NULL,
8 `inventoryDescription` varchar(64) default NULL,
9 `inventoryNextPermissions` int(10) unsigned default NULL,
10 `inventoryCurrentPermissions` int(10) unsigned default NULL,
11 PRIMARY KEY (`inventoryID`),
12 KEY `owner` (`avatarID`),
13 KEY `folder` (`parentFolderID`)
14) ENGINE=InnoDB DEFAULT CHARSET=utf8;
diff --git a/share/sql/mysql-logs.sql b/share/sql/mysql-logs.sql
deleted file mode 100644
index 05c19e8..0000000
--- a/share/sql/mysql-logs.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1CREATE TABLE `logs` (
2 `logID` int(10) unsigned NOT NULL auto_increment,
3 `target` varchar(36) default NULL,
4 `server` varchar(64) default NULL,
5 `method` varchar(64) default NULL,
6 `arguments` varchar(255) default NULL,
7 `priority` int(11) default NULL,
8 `message` text,
9 PRIMARY KEY (`logID`)
10) ENGINE=InnoDB DEFAULT CHARSET=utf8 \ No newline at end of file
diff --git a/share/sql/mysql-regions.sql b/share/sql/mysql-regions.sql
deleted file mode 100644
index 4f98826..0000000
--- a/share/sql/mysql-regions.sql
+++ /dev/null
@@ -1,29 +0,0 @@
1CREATE TABLE `regions` (
2 `uuid` varchar(36) NOT NULL,
3 `regionHandle` bigint(20) unsigned NOT NULL,
4 `regionName` varchar(32) default NULL,
5 `regionRecvKey` varchar(128) default NULL,
6 `regionSendKey` varchar(128) default NULL,
7 `regionSecret` varchar(128) default NULL,
8 `regionDataURI` varchar(255) default NULL,
9 `serverIP` varchar(16) default NULL,
10 `serverPort` int(10) unsigned default NULL,
11 `serverURI` varchar(255) default NULL,
12 `locX` int(10) unsigned default NULL,
13 `locY` int(10) unsigned default NULL,
14 `locZ` int(10) unsigned default NULL,
15 `eastOverrideHandle` bigint(20) unsigned default NULL,
16 `westOverrideHandle` bigint(20) unsigned default NULL,
17 `southOverrideHandle` bigint(20) unsigned default NULL,
18 `northOverrideHandle` bigint(20) unsigned default NULL,
19 `regionAssetURI` varchar(255) default NULL,
20 `regionAssetRecvKey` varchar(128) default NULL,
21 `regionAssetSendKey` varchar(128) default NULL,
22 `regionUserURI` varchar(255) default NULL,
23 `regionUserRecvKey` varchar(128) default NULL,
24 `regionUserSendKey` varchar(128) default NULL, `regionMapTexture` varchar(36) default NULL,
25 PRIMARY KEY (`uuid`),
26 KEY `regionName` (`regionName`),
27 KEY `regionHandle` (`regionHandle`),
28 KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`)
29) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED \ No newline at end of file
diff --git a/share/sql/mysql-users.sql b/share/sql/mysql-users.sql
deleted file mode 100644
index 5ce4d1c..0000000
--- a/share/sql/mysql-users.sql
+++ /dev/null
@@ -1,34 +0,0 @@
1SET FOREIGN_KEY_CHECKS=0;
2-- ----------------------------
3-- Table structure for users
4-- ----------------------------
5CREATE TABLE `users` (
6 `UUID` varchar(36) NOT NULL default '',
7 `username` varchar(32) NOT NULL,
8 `lastname` varchar(32) NOT NULL,
9 `passwordHash` varchar(32) NOT NULL,
10 `passwordSalt` varchar(32) NOT NULL,
11 `homeRegion` bigint(20) unsigned default NULL,
12 `homeLocationX` float default NULL,
13 `homeLocationY` float default NULL,
14 `homeLocationZ` float default NULL,
15 `homeLookAtX` float default NULL,
16 `homeLookAtY` float default NULL,
17 `homeLookAtZ` float default NULL,
18 `created` int(11) NOT NULL,
19 `lastLogin` int(11) NOT NULL,
20 `userInventoryURI` varchar(255) default NULL,
21 `userAssetURI` varchar(255) default NULL,
22 `profileCanDoMask` int(10) unsigned default NULL,
23 `profileWantDoMask` int(10) unsigned default NULL,
24 `profileAboutText` text,
25 `profileFirstText` text,
26 `profileImage` varchar(36) default NULL,
27 `profileFirstImage` varchar(36) default NULL,
28 PRIMARY KEY (`UUID`),
29 UNIQUE KEY `usernames` (`username`,`lastname`)
30) ENGINE=MyISAM DEFAULT CHARSET=utf8;
31
32-- ----------------------------
33-- Records
34-- ----------------------------