aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ConvertToPlugins/src/GridInterfaces
diff options
context:
space:
mode:
authorgareth2007-03-07 18:49:20 +0000
committergareth2007-03-07 18:49:20 +0000
commit16476f06b867adf01fa0d17c6761f4a862fc17ad (patch)
treec3a1147578ae33d269812adfe8de5ece8c62d586 /ConvertToPlugins/src/GridInterfaces
parentDeleted old trunk code (diff)
downloadopensim-SC-16476f06b867adf01fa0d17c6761f4a862fc17ad.zip
opensim-SC-16476f06b867adf01fa0d17c6761f4a862fc17ad.tar.gz
opensim-SC-16476f06b867adf01fa0d17c6761f4a862fc17ad.tar.bz2
opensim-SC-16476f06b867adf01fa0d17c6761f4a862fc17ad.tar.xz
Imported branch
Diffstat (limited to 'ConvertToPlugins/src/GridInterfaces')
-rw-r--r--ConvertToPlugins/src/GridInterfaces/AssemblyInfo.cs31
-rw-r--r--ConvertToPlugins/src/GridInterfaces/GridInterfaces.csproj40
-rw-r--r--ConvertToPlugins/src/GridInterfaces/GridInterfaces.sln17
-rw-r--r--ConvertToPlugins/src/GridInterfaces/IAssetServer.cs82
-rw-r--r--ConvertToPlugins/src/GridInterfaces/IGridServer.cs94
-rw-r--r--ConvertToPlugins/src/GridInterfaces/default.build49
6 files changed, 313 insertions, 0 deletions
diff --git a/ConvertToPlugins/src/GridInterfaces/AssemblyInfo.cs b/ConvertToPlugins/src/GridInterfaces/AssemblyInfo.cs
new file mode 100644
index 0000000..89731a1
--- /dev/null
+++ b/ConvertToPlugins/src/GridInterfaces/AssemblyInfo.cs
@@ -0,0 +1,31 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// Information about this assembly is defined by the following
6// attributes.
7//
8// change them to the information which is associated with the assembly
9// you compile.
10
11[assembly: AssemblyTitle("GridInterfaces")]
12[assembly: AssemblyDescription("")]
13[assembly: AssemblyConfiguration("")]
14[assembly: AssemblyCompany("")]
15[assembly: AssemblyProduct("GridInterfaces")]
16[assembly: AssemblyCopyright("")]
17[assembly: AssemblyTrademark("")]
18[assembly: AssemblyCulture("")]
19
20// This sets the default COM visibility of types in the assembly to invisible.
21// If you need to expose a type to COM, use [ComVisible(true)] on that type.
22[assembly: ComVisible(false)]
23
24// The assembly version has following format :
25//
26// Major.Minor.Build.Revision
27//
28// You can specify all values by your own or you can build default build and revision
29// numbers with the '*' character (the default):
30
31[assembly: AssemblyVersion("1.0.*")]
diff --git a/ConvertToPlugins/src/GridInterfaces/GridInterfaces.csproj b/ConvertToPlugins/src/GridInterfaces/GridInterfaces.csproj
new file mode 100644
index 0000000..3284e7f
--- /dev/null
+++ b/ConvertToPlugins/src/GridInterfaces/GridInterfaces.csproj
@@ -0,0 +1,40 @@
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>..\..\..\..\..\..\Libsecond-dailys\libsl07-03\trunk\libsecondlife-cs\obj\Debug\libsecondlife.dll</HintPath>
31 <SpecificVersion>False</SpecificVersion>
32 </Reference>
33 </ItemGroup>
34 <ItemGroup>
35 <Compile Include="IAssetServer.cs" />
36 <Compile Include="AssemblyInfo.cs" />
37 <Compile Include="IGridServer.cs" />
38 </ItemGroup>
39 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
40</Project> \ No newline at end of file
diff --git a/ConvertToPlugins/src/GridInterfaces/GridInterfaces.sln b/ConvertToPlugins/src/GridInterfaces/GridInterfaces.sln
new file mode 100644
index 0000000..5ac2b6d
--- /dev/null
+++ b/ConvertToPlugins/src/GridInterfaces/GridInterfaces.sln
@@ -0,0 +1,17 @@
1
2Microsoft Visual Studio Solution File, Format Version 9.00
3# SharpDevelop 2.1.0.2017
4Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GridInterfaces", "GridInterfaces.csproj", "{5DA3174D-42F9-416D-9F0B-AF41FA2BE2F9}"
5EndProject
6Global
7 GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 Debug|Any CPU = Debug|Any CPU
9 Release|Any CPU = Release|Any CPU
10 EndGlobalSection
11 GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 {5DA3174D-42F9-416D-9F0B-AF41FA2BE2F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
13 {5DA3174D-42F9-416D-9F0B-AF41FA2BE2F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14 {5DA3174D-42F9-416D-9F0B-AF41FA2BE2F9}.Release|Any CPU.Build.0 = Release|Any CPU
15 {5DA3174D-42F9-416D-9F0B-AF41FA2BE2F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
16 EndGlobalSection
17EndGlobal
diff --git a/ConvertToPlugins/src/GridInterfaces/IAssetServer.cs b/ConvertToPlugins/src/GridInterfaces/IAssetServer.cs
new file mode 100644
index 0000000..6050a6c
--- /dev/null
+++ b/ConvertToPlugins/src/GridInterfaces/IAssetServer.cs
@@ -0,0 +1,82 @@
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;
33
34
35namespace OpenSim.GridServers
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 }
49
50 // could change to delegate?
51 public interface IAssetReceiver
52 {
53 void AssetReceived(AssetBase asset, bool IsTexture);
54 void AssetNotFound(AssetBase asset);
55 }
56
57 public struct ARequest
58 {
59 public LLUUID AssetID;
60 public bool IsTexture;
61 }
62
63 public class AssetBase
64 {
65 public byte[] Data;
66 public LLUUID FullID;
67 public sbyte Type;
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}
diff --git a/ConvertToPlugins/src/GridInterfaces/IGridServer.cs b/ConvertToPlugins/src/GridInterfaces/IGridServer.cs
new file mode 100644
index 0000000..fef4c3e
--- /dev/null
+++ b/ConvertToPlugins/src/GridInterfaces/IGridServer.cs
@@ -0,0 +1,94 @@
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.Generic;
31using System.Net;
32using System.Net.Sockets;
33using System.IO;
34using libsecondlife;
35
36namespace OpenSim.GridServers
37{
38 /// <summary>
39 /// Handles connection to Grid Servers.
40 /// also Sim to Sim connections?
41 /// </summary>
42
43
44
45
46 public interface IGridServer
47 {
48 bool RequestConnection();
49 UUIDBlock RequestUUIDBlock();
50 void RequestNeighbours(); //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 void SetServerInfo(string ServerUrl, string ServerKey);
54 void AddNewSession(Login session); // only used by local version of grid server
55 // and didn't use to be part of this interface until we put this in a dll
56 }
57
58 public struct UUIDBlock
59 {
60 public LLUUID BlockStart;
61 public LLUUID BlockEnd;
62 }
63
64 public class AuthenticateResponse
65 {
66 public bool Authorised;
67 public Login LoginInfo;
68
69 public AuthenticateResponse()
70 {
71
72 }
73
74 }
75
76 public class Login
77 {
78 public string First = "Test";
79 public string Last = "User";
80 public LLUUID Agent;
81 public LLUUID Session;
82 public LLUUID InventoryFolder;
83 public LLUUID BaseFolder;
84 public Login()
85 {
86
87 }
88 }
89
90 public interface IGridPlugin
91 {
92 IGridServer GetGridServer();
93 }
94}
diff --git a/ConvertToPlugins/src/GridInterfaces/default.build b/ConvertToPlugins/src/GridInterfaces/default.build
new file mode 100644
index 0000000..f29f108
--- /dev/null
+++ b/ConvertToPlugins/src/GridInterfaces/default.build
@@ -0,0 +1,49 @@
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" />
41 <include name="System.Xml" />
42 <include name="libsecondlife.dll" />
43 </references>
44 <sources basedir="./">
45 <include name="*.cs" />
46 </sources>
47 </csc>
48 </target>
49</project>