diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim.Framework/IAssetServer.cs (renamed from src/GridInterfaces/IAssetServer.cs) | 80 | ||||
-rw-r--r-- | OpenSim.Framework/IGridServer.cs (renamed from src/GridInterfaces/ILocalStorage.cs) | 100 | ||||
-rw-r--r-- | src/GridInterfaces/AssemblyInfo.cs | 21 | ||||
-rw-r--r-- | src/GridInterfaces/GridInterfaces.csproj | 40 | ||||
-rw-r--r-- | src/GridInterfaces/IGridServer.cs | 145 | ||||
-rw-r--r-- | src/GridInterfaces/default.build | 50 |
6 files changed, 79 insertions, 357 deletions
diff --git a/src/GridInterfaces/IAssetServer.cs b/OpenSim.Framework/IAssetServer.cs index 6050a6c..a0de548 100644 --- a/src/GridInterfaces/IAssetServer.cs +++ b/OpenSim.Framework/IAssetServer.cs | |||
@@ -30,53 +30,39 @@ using System.Net.Sockets; | |||
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Threading; | 31 | using System.Threading; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using OpenSim.Framework.Assets; | ||
33 | 34 | ||
34 | 35 | namespace OpenSim.Framework.Interfaces | |
35 | namespace OpenSim.GridServers | ||
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Description of IAssetServer. | 38 | /// Description of IAssetServer. |
39 | /// </summary> | 39 | /// </summary> |
40 | 40 | ||
41 | public interface IAssetServer | 41 | public interface IAssetServer |
42 | { | 42 | { |
43 | void SetReceiver(IAssetReceiver receiver); | 43 | void SetReceiver(IAssetReceiver receiver); |
44 | void RequestAsset(LLUUID assetID, bool isTexture); | 44 | void RequestAsset(LLUUID assetID, bool isTexture); |
45 | void UpdateAsset(AssetBase asset); | 45 | void UpdateAsset(AssetBase asset); |
46 | void UploadNewAsset(AssetBase asset); | 46 | void UploadNewAsset(AssetBase asset); |
47 | void SetServerInfo(string ServerUrl, string ServerKey); | 47 | void SetServerInfo(string ServerUrl, string ServerKey); |
48 | } | 48 | void Close(); |
49 | 49 | } | |
50 | // could change to delegate? | 50 | |
51 | public interface IAssetReceiver | 51 | // could change to delegate? |
52 | { | 52 | public interface IAssetReceiver |
53 | void AssetReceived(AssetBase asset, bool IsTexture); | 53 | { |
54 | void AssetNotFound(AssetBase asset); | 54 | void AssetReceived(AssetBase asset, bool IsTexture); |
55 | } | 55 | void AssetNotFound(AssetBase asset); |
56 | 56 | } | |
57 | public struct ARequest | 57 | |
58 | { | 58 | public interface IAssetPlugin |
59 | public LLUUID AssetID; | 59 | { |
60 | public bool IsTexture; | 60 | IAssetServer GetAssetServer(); |
61 | } | 61 | } |
62 | 62 | ||
63 | public class AssetBase | 63 | public struct ARequest |
64 | { | 64 | { |
65 | public byte[] Data; | 65 | public LLUUID AssetID; |
66 | public LLUUID FullID; | 66 | public bool IsTexture; |
67 | public sbyte Type; | 67 | } |
68 | public sbyte InvType; | ||
69 | public string Name; | ||
70 | public string Description; | ||
71 | |||
72 | public AssetBase() | ||
73 | { | ||
74 | |||
75 | } | ||
76 | } | ||
77 | |||
78 | public interface IAssetPlugin | ||
79 | { | ||
80 | IAssetServer GetAssetServer(); | ||
81 | } | ||
82 | } | 68 | } |
diff --git a/src/GridInterfaces/ILocalStorage.cs b/OpenSim.Framework/IGridServer.cs index 6b7ded6..026dfab 100644 --- a/src/GridInterfaces/ILocalStorage.cs +++ b/OpenSim.Framework/IGridServer.cs | |||
@@ -25,62 +25,54 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | |||
28 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | ||
31 | using System.Net; | ||
32 | using System.Net.Sockets; | ||
33 | using System.IO; | ||
29 | using libsecondlife; | 34 | using libsecondlife; |
35 | using OpenSim; | ||
30 | 36 | ||
31 | namespace GridInterfaces | 37 | namespace OpenSim.Framework.Interfaces |
32 | { | 38 | { |
33 | /// <summary> | 39 | /// <summary> |
34 | /// ILocalStorage. Really hacked together right now needs cleaning up | 40 | /// Handles connection to Grid Servers. |
35 | /// </summary> | 41 | /// also Sim to Sim connections? |
36 | public interface ILocalStorage | 42 | /// </summary> |
37 | { | 43 | |
38 | void StorePrim(PrimData prim); | 44 | public interface IGridServer |
39 | void RemovePrim(LLUUID primID); | 45 | { |
40 | void LoadPrimitives(ILocalStorageReceiver receiver); | 46 | UUIDBlock RequestUUIDBlock(); |
41 | void ShutDown(); | 47 | NeighbourInfo[] RequestNeighbours(); //should return a array of neighbouring regions |
42 | } | 48 | AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); |
43 | 49 | bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); | |
44 | public interface ILocalStorageReceiver | 50 | string GetName(); |
45 | { | 51 | bool RequestConnection(); |
46 | void PrimFromStorage(PrimData prim); | 52 | void SetServerInfo(string ServerUrl, string SendKey, string RecvKey); |
47 | } | 53 | void Close(); |
48 | 54 | } | |
49 | 55 | ||
50 | public class PrimData | 56 | public struct UUIDBlock |
51 | { | 57 | { |
52 | public LLUUID OwnerID; | 58 | public LLUUID BlockStart; |
53 | public byte PCode; | 59 | public LLUUID BlockEnd; |
54 | public byte PathBegin; | 60 | } |
55 | public byte PathEnd; | 61 | |
56 | public byte PathScaleX; | 62 | public class AuthenticateResponse |
57 | public byte PathScaleY; | 63 | { |
58 | public byte PathShearX; | 64 | public bool Authorised; |
59 | public byte PathShearY; | 65 | public Login LoginInfo; |
60 | public sbyte PathSkew; | 66 | |
61 | public byte ProfileBegin; | 67 | public AuthenticateResponse() |
62 | public byte ProfileEnd; | 68 | { |
63 | public LLVector3 Scale; | 69 | |
64 | public byte PathCurve; | 70 | } |
65 | public byte ProfileCurve; | 71 | |
66 | public uint ParentID=0; | 72 | } |
67 | public byte ProfileHollow; | 73 | |
68 | public sbyte PathRadiusOffset; | 74 | public interface IGridPlugin |
69 | public byte PathRevolutions; | 75 | { |
70 | public sbyte PathTaperX; | 76 | IGridServer GetGridServer(); |
71 | public sbyte PathTaperY; | 77 | } |
72 | public sbyte PathTwist; | ||
73 | public sbyte PathTwistBegin; | ||
74 | |||
75 | //following only used during prim storage | ||
76 | public LLVector3 Position; | ||
77 | public LLQuaternion Rotation; | ||
78 | public uint LocalID; | ||
79 | public LLUUID FullID; | ||
80 | |||
81 | public PrimData() | ||
82 | { | ||
83 | |||
84 | } | ||
85 | } | ||
86 | } | 78 | } |
diff --git a/src/GridInterfaces/AssemblyInfo.cs b/src/GridInterfaces/AssemblyInfo.cs deleted file mode 100644 index 32f1380..0000000 --- a/src/GridInterfaces/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Reflection; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // ------------------------------------------------------------------------------ | ||
6 | // <autogenerated> | ||
7 | // This code was generated by a tool. | ||
8 | // Mono Runtime Version: 2.0.50727.42 | ||
9 | // | ||
10 | // Changes to this file may cause incorrect behavior and will be lost if | ||
11 | // the code is regenerated. | ||
12 | // </autogenerated> | ||
13 | // ------------------------------------------------------------------------------ | ||
14 | |||
15 | [assembly: ComVisibleAttribute(false)] | ||
16 | [assembly: CLSCompliantAttribute(false)] | ||
17 | [assembly: AssemblyVersionAttribute("0.1.0.240")] | ||
18 | [assembly: AssemblyTitleAttribute("opensim-gridinterfaces")] | ||
19 | [assembly: AssemblyDescriptionAttribute("Definitions for OGS interface")] | ||
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | ||
21 | |||
diff --git a/src/GridInterfaces/GridInterfaces.csproj b/src/GridInterfaces/GridInterfaces.csproj deleted file mode 100644 index 197994f..0000000 --- a/src/GridInterfaces/GridInterfaces.csproj +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <OutputType>Library</OutputType> | ||
4 | <RootNamespace>GridInterfaces</RootNamespace> | ||
5 | <AssemblyName>GridInterfaces</AssemblyName> | ||
6 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
7 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
8 | <ProjectGuid>{5DA3174D-42F9-416D-9F0B-AF41FA2BE2F9}</ProjectGuid> | ||
9 | </PropertyGroup> | ||
10 | <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
11 | <OutputPath>bin\Debug\</OutputPath> | ||
12 | <Optimize>False</Optimize> | ||
13 | <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
14 | <DebugSymbols>True</DebugSymbols> | ||
15 | <DebugType>Full</DebugType> | ||
16 | <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> | ||
17 | </PropertyGroup> | ||
18 | <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
19 | <OutputPath>bin\Release\</OutputPath> | ||
20 | <Optimize>True</Optimize> | ||
21 | <DefineConstants>TRACE</DefineConstants> | ||
22 | <DebugSymbols>False</DebugSymbols> | ||
23 | <DebugType>None</DebugType> | ||
24 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
25 | </PropertyGroup> | ||
26 | <ItemGroup> | ||
27 | <Reference Include="System" /> | ||
28 | <Reference Include="System.Xml" /> | ||
29 | <Reference Include="libsecondlife"> | ||
30 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
31 | <SpecificVersion>False</SpecificVersion> | ||
32 | </Reference> | ||
33 | </ItemGroup> | ||
34 | <ItemGroup> | ||
35 | <Compile Include="IAssetServer.cs" /> | ||
36 | <Compile Include="IGridServer.cs" /> | ||
37 | <Compile Include="ILocalStorage.cs" /> | ||
38 | </ItemGroup> | ||
39 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> | ||
40 | </Project> \ No newline at end of file | ||
diff --git a/src/GridInterfaces/IGridServer.cs b/src/GridInterfaces/IGridServer.cs deleted file mode 100644 index dcb8ef2..0000000 --- a/src/GridInterfaces/IGridServer.cs +++ /dev/null | |||
@@ -1,145 +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 | |||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Net; | ||
32 | using System.Net.Sockets; | ||
33 | using System.IO; | ||
34 | using libsecondlife; | ||
35 | using OpenSim; | ||
36 | |||
37 | namespace OpenSim.GridServers | ||
38 | { | ||
39 | /// <summary> | ||
40 | /// Handles connection to Grid Servers. | ||
41 | /// also Sim to Sim connections? | ||
42 | /// </summary> | ||
43 | |||
44 | |||
45 | |||
46 | |||
47 | public interface IGridServer | ||
48 | { | ||
49 | UUIDBlock RequestUUIDBlock(); | ||
50 | neighbourinfo[] RequestNeighbours(ulong regionhandle); //should return a array of neighbouring regions | ||
51 | AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); | ||
52 | bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); | ||
53 | string GetName(); | ||
54 | bool RequestConnection(); | ||
55 | void SetServerInfo(string GridServerUrl, string GridSendKey, string GridRecvKey, string UserServerUrl, string UserSendKey, string UserRecvKey); | ||
56 | } | ||
57 | |||
58 | public abstract class RemoteGridBase : IGridServer | ||
59 | { | ||
60 | public abstract Dictionary<uint, agentcircuitdata> agentcircuits { | ||
61 | get; | ||
62 | set; | ||
63 | } | ||
64 | |||
65 | public abstract UUIDBlock RequestUUIDBlock(); | ||
66 | public abstract neighbourinfo[] RequestNeighbours(ulong regionhandle); | ||
67 | public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); | ||
68 | public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); | ||
69 | public abstract string GetName(); | ||
70 | public abstract bool RequestConnection(); | ||
71 | public abstract void SetServerInfo(string GridServerUrl, string GridSendKey, string GridRecvKey, string UserServerUrl, string UserSendKey, string UserRecvKey); | ||
72 | } | ||
73 | |||
74 | public abstract class LocalGridBase : IGridServer | ||
75 | { | ||
76 | public abstract UUIDBlock RequestUUIDBlock(); | ||
77 | public abstract neighbourinfo[] RequestNeighbours(ulong regionhandle); | ||
78 | public abstract AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); | ||
79 | public abstract bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode); | ||
80 | public abstract string GetName(); | ||
81 | public abstract bool RequestConnection(); | ||
82 | public abstract void SetServerInfo(string GridServerUrl, string GridSendKey, string GridRecvKey, string UserServerUrl, string UserSendKey, string UserRecvKey); | ||
83 | public abstract void AddNewSession(Login session); | ||
84 | } | ||
85 | |||
86 | public struct UUIDBlock | ||
87 | { | ||
88 | public LLUUID BlockStart; | ||
89 | public LLUUID BlockEnd; | ||
90 | } | ||
91 | |||
92 | public class AuthenticateResponse | ||
93 | { | ||
94 | public bool Authorised; | ||
95 | public Login LoginInfo; | ||
96 | |||
97 | public AuthenticateResponse() | ||
98 | { | ||
99 | |||
100 | } | ||
101 | |||
102 | } | ||
103 | |||
104 | public class Login | ||
105 | { | ||
106 | public string First = "Test"; | ||
107 | public string Last = "User"; | ||
108 | public LLUUID Agent; | ||
109 | public LLUUID Session; | ||
110 | public LLUUID InventoryFolder; | ||
111 | public LLUUID BaseFolder; | ||
112 | public Login() | ||
113 | { | ||
114 | |||
115 | } | ||
116 | } | ||
117 | |||
118 | public interface IGridPlugin | ||
119 | { | ||
120 | IGridServer GetGridServer(); | ||
121 | } | ||
122 | |||
123 | public class agentcircuitdata | ||
124 | { | ||
125 | public agentcircuitdata() { } | ||
126 | public LLUUID AgentID; | ||
127 | public LLUUID SessionID; | ||
128 | public LLUUID SecureSessionID; | ||
129 | public string firstname; | ||
130 | public string lastname; | ||
131 | public uint circuitcode; | ||
132 | public bool child_agent; | ||
133 | } | ||
134 | |||
135 | public class neighbourinfo | ||
136 | { | ||
137 | public neighbourinfo() { } | ||
138 | public ulong regionhandle; | ||
139 | public uint RegionLocX; | ||
140 | public uint RegionLocY; | ||
141 | public string sim_ip; | ||
142 | public uint sim_port; | ||
143 | } | ||
144 | |||
145 | } | ||
diff --git a/src/GridInterfaces/default.build b/src/GridInterfaces/default.build deleted file mode 100644 index dd02448..0000000 --- a/src/GridInterfaces/default.build +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <project name="OpenSim" default="build" basedir="."> | ||
3 | <description>nant buildfile for OpenSim</description> | ||
4 | <property name="debug" value="true" overwrite="false" /> | ||
5 | <target name="clean" description="remove all generated files"> | ||
6 | <delete file="../../bin/GridInterfaces.dll" failonerror="false" /> | ||
7 | </target> | ||
8 | |||
9 | <target name="svnupdate" description="updates to latest SVN"> | ||
10 | <exec program="svn"> | ||
11 | <arg value="update" /> | ||
12 | </exec> | ||
13 | </target> | ||
14 | |||
15 | <target name="upgrade" description="updates from SVN and then builds" depends="clean,svnupdate,build"> | ||
16 | |||
17 | </target> | ||
18 | |||
19 | <target name="build" description="compiles the source code"> | ||
20 | |||
21 | <loadfile file="../../VERSION" property="svnver"/> | ||
22 | <asminfo output="AssemblyInfo.cs" language="CSharp"> | ||
23 | <imports> | ||
24 | <import namespace="System" /> | ||
25 | <import namespace="System.Reflection" /> | ||
26 | <import namespace="System.Runtime.InteropServices" /> | ||
27 | </imports> | ||
28 | <attributes> | ||
29 | <attribute type="ComVisibleAttribute" value="false" /> | ||
30 | <attribute type="CLSCompliantAttribute" value="false" /> | ||
31 | <attribute type="AssemblyVersionAttribute" value="${svnver}" /> | ||
32 | <attribute type="AssemblyTitleAttribute" value="opensim-gridinterfaces" /> | ||
33 | <attribute type="AssemblyDescriptionAttribute" value="Definitions for OGS interface" /> | ||
34 | <attribute type="AssemblyCopyrightAttribute" value="Copyright © OGS development team 2007"/> | ||
35 | </attributes> | ||
36 | </asminfo> | ||
37 | |||
38 | <csc target="library" output="../../bin/GridInterfaces.dll" debug="${debug}" verbose="true" warninglevel="4"> | ||
39 | <references basedir="../../bin" failonempty="true"> | ||
40 | <include name="System.dll" /> | ||
41 | <include name="System.Xml.dll" /> | ||
42 | <include name="OpenSim.Framework.dll" /> | ||
43 | <include name="libsecondlife.dll" /> | ||
44 | </references> | ||
45 | <sources basedir="./"> | ||
46 | <include name="*.cs" /> | ||
47 | </sources> | ||
48 | </csc> | ||
49 | </target> | ||
50 | </project> | ||