aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs18
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs (renamed from Common/OpenGrid.Framework.Communications.OGS1/OGS1GridServices.cs)6
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs (renamed from Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs)4
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs109
-rw-r--r--OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj (renamed from Common/OpenGrid.Framework.Communications.OGS1/OpenGrid.Framework.Communications.OGS1.csproj)54
-rw-r--r--OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build53
-rw-r--r--OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs (renamed from Common/OpenGrid.Framework.Communications.OGS1/Properties/AssemblyInfo.cs)0
7 files changed, 211 insertions, 33 deletions
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
new file mode 100644
index 0000000..870f577
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
@@ -0,0 +1,18 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Types;
5using OpenSim.Framework.Communications;
6namespace OpenSim.Region.Communications.OGS1
7{
8 public class CommunicationsOGS1 : CommunicationsManager
9 {
10 private OGS1GridServices gridInterComms = new OGS1GridServices();
11 public CommunicationsOGS1(NetworkServersInfo serversInfo) :base(serversInfo)
12 {
13 GridServer = gridInterComms;
14 InterRegion = gridInterComms;
15 UserServer = new OGS1UserServices(this);
16 }
17 }
18}
diff --git a/Common/OpenGrid.Framework.Communications.OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index db64f0c..5f0c80c 100644
--- a/Common/OpenGrid.Framework.Communications.OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -6,15 +6,15 @@ using System.Runtime.Remoting;
6using System.Runtime.Remoting.Channels; 6using System.Runtime.Remoting.Channels;
7using System.Runtime.Remoting.Channels.Tcp; 7using System.Runtime.Remoting.Channels.Tcp;
8 8
9using OpenSim.Servers; 9using OpenSim.Framework.Servers;
10using OpenSim.Framework; 10using OpenSim.Framework;
11using OpenSim.Framework.Types; 11using OpenSim.Framework.Types;
12using OpenGrid.Framework.Communications; 12using OpenSim.Framework.Communications;
13 13
14using Nwc.XmlRpc; 14using Nwc.XmlRpc;
15using libsecondlife; 15using libsecondlife;
16 16
17namespace OpenGrid.Framework.Communications.OGS1 17namespace OpenSim.Region.Communications.OGS1
18{ 18{
19 public class OGS1GridServices : IGridServices, IInterRegionCommunications 19 public class OGS1GridServices : IGridServices, IInterRegionCommunications
20 { 20 {
diff --git a/Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
index 3d74e2f..51b33e9 100644
--- a/Common/OpenGrid.Framework.Communications.OGS1/OGSInterSimComms.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
@@ -2,8 +2,8 @@ using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Types; 4using OpenSim.Framework.Types;
5using OpenGrid.Framework.Communications; 5using OpenSim.Framework.Communications;
6namespace OpenGrid.Framework.Communications.OGS1 6namespace OpenSim.Region.Communications.OGS1
7{ 7{
8 public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData); 8 public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData);
9 public delegate bool ExpectArrival(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position); 9 public delegate bool ExpectArrival(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position);
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
new file mode 100644
index 0000000..856c447
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -0,0 +1,109 @@
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.Text;
5using OpenSim.Framework.Types;
6using OpenSim.Framework.Communications;
7using OpenSim.Framework.Data;
8using libsecondlife;
9
10using Nwc.XmlRpc;
11
12namespace OpenSim.Region.Communications.OGS1
13{
14 public class OGS1UserServices :IUserServices
15 {
16 CommunicationsOGS1 m_parent;
17 public OGS1UserServices(CommunicationsOGS1 parent)
18 {
19 m_parent = parent;
20 }
21
22 public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data)
23 {
24 if (data.Contains("error_type"))
25 {
26 Console.WriteLine("Error sent by user server when trying to get user profile: (" + data["error_type"] + "): " + data["error_desc"]);
27 return null;
28 }
29
30 UserProfileData userData = new UserProfileData();
31 userData.username = (string)data["firstname"];
32 userData.surname = (string)data["lastname"];
33 userData.UUID = new LLUUID((string)data["uuid"]);
34 userData.userInventoryURI = (string)data["server_inventory"];
35 userData.userAssetURI = (string)data["server_asset"];
36 userData.profileFirstText = (string)data["profile_firstlife_about"];
37 userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]);
38 userData.profileCanDoMask = (uint)data["profile_can_do"];
39 userData.profileWantDoMask = (uint)data["profile_want_do"];
40 userData.profileImage = new LLUUID((string)data["profile_image"]);
41 userData.lastLogin = (int)data["profile_lastlogin"];
42 userData.homeLocation = new LLVector3();
43 userData.homeLookAt = new LLVector3();
44
45 return userData;
46 }
47 public UserProfileData GetUserProfile(string firstName, string lastName)
48 {
49 return GetUserProfile(firstName + " " + lastName);
50 }
51 public UserProfileData GetUserProfile(string name)
52 {
53
54 try
55 {
56 Hashtable param = new Hashtable();
57 param["avatar_name"] = name;
58 IList parameters = new ArrayList();
59 parameters.Add(param);
60 XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters);
61 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
62 Hashtable respData = (Hashtable)resp.Value;
63
64 return ConvertXMLRPCDataToUserProfile(respData);
65 }
66 catch (Exception e)
67 {
68 Console.WriteLine("Error when trying to fetch profile data by name from remote user server: " + e.Message);
69 }
70 return null;
71 }
72 public UserProfileData GetUserProfile(LLUUID avatarID)
73 {
74 try
75 {
76
77 Hashtable param = new Hashtable();
78 param["avatar_uuid"] = avatarID.ToString();
79 IList parameters = new ArrayList();
80 parameters.Add(param);
81 XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters);
82 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
83 Hashtable respData = (Hashtable)resp.Value;
84
85 return ConvertXMLRPCDataToUserProfile(respData);
86 }
87 catch (Exception e)
88 {
89 Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " + e.Message);
90 }
91 return null;
92 }
93
94 public UserProfileData SetupMasterUser(string firstName, string lastName)
95 {
96 return SetupMasterUser(firstName, lastName, "");
97 }
98
99 public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
100 {
101 UserProfileData profile = GetUserProfile(firstName, lastName);
102 if (profile == null)
103 {
104 Console.WriteLine("Unknown Master User. Grid Mode: No clue what I should do. Probably would choose the grid owner UUID when that is implemented");
105 }
106 return null;
107 }
108 }
109}
diff --git a/Common/OpenGrid.Framework.Communications.OGS1/OpenGrid.Framework.Communications.OGS1.csproj b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
index 804ddba..d6abd13 100644
--- a/Common/OpenGrid.Framework.Communications.OGS1/OpenGrid.Framework.Communications.OGS1.csproj
+++ b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
@@ -3,20 +3,20 @@
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion> 5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{17442AF1-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{4806E378-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenGrid.Framework.Communications.OGS1</AssemblyName> 12 <AssemblyName>OpenSim.Region.Communications.OGS1</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript> 13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> 14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 17 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenGrid.Framework.Communications.OGS1</RootNamespace> 19 <RootNamespace>OpenSim.Region.Communications.OGS1</RootNamespace>
20 <StartupObject></StartupObject> 20 <StartupObject></StartupObject>
21 <FileUpgradeFlags> 21 <FileUpgradeFlags>
22 </FileUpgradeFlags> 22 </FileUpgradeFlags>
@@ -32,7 +32,7 @@
32 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
35 <OutputPath>..\..\bin\</OutputPath> 35 <OutputPath>..\..\..\..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop> 36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -50,7 +50,7 @@
50 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
53 <OutputPath>..\..\bin\</OutputPath> 53 <OutputPath>..\..\..\..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop> 54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
@@ -59,7 +59,7 @@
59 </PropertyGroup> 59 </PropertyGroup>
60 <ItemGroup> 60 <ItemGroup>
61 <Reference Include="libsecondlife.dll" > 61 <Reference Include="libsecondlife.dll" >
62 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 62 <HintPath>..\..\..\..\bin\libsecondlife.dll</HintPath>
63 <Private>False</Private> 63 <Private>False</Private>
64 </Reference> 64 </Reference>
65 <Reference Include="System" > 65 <Reference Include="System" >
@@ -78,56 +78,54 @@
78 <HintPath>System.Xml.dll</HintPath> 78 <HintPath>System.Xml.dll</HintPath>
79 <Private>False</Private> 79 <Private>False</Private>
80 </Reference> 80 </Reference>
81 <Reference Include="XMLRPC.dll" >
82 <HintPath>..\..\..\..\bin\XMLRPC.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
81 </ItemGroup> 85 </ItemGroup>
82 <ItemGroup> 86 <ItemGroup>
83 <ProjectReference Include="..\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj"> 87 <ProjectReference Include="..\..\..\Framework\General\OpenSim.Framework.csproj">
84 <Name>OpenGrid.Framework.Communications</Name> 88 <Name>OpenSim.Framework</Name>
85 <Project>{683344D5-0000-0000-0000-000000000000}</Project> 89 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private>
88 </ProjectReference>
89 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
90 <Name>OpenGrid.Framework.Data</Name>
91 <Project>{62CDF671-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 90 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private> 91 <Private>False</Private>
94 </ProjectReference> 92 </ProjectReference>
95 <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj"> 93 <ProjectReference Include="..\..\..\Framework\Communications\OpenSim.Framework.Communications.csproj">
96 <Name>OpenSim.Framework</Name> 94 <Name>OpenSim.Framework.Communications</Name>
97 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 95 <Project>{CB52B7E7-0000-0000-0000-000000000000}</Project>
98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 96 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
99 <Private>False</Private> 97 <Private>False</Private>
100 </ProjectReference> 98 </ProjectReference>
101 <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 99 <ProjectReference Include="..\..\..\Framework\Console\OpenSim.Framework.Console.csproj">
102 <Name>OpenSim.Framework.Console</Name> 100 <Name>OpenSim.Framework.Console</Name>
103 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 101 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 102 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
105 <Private>False</Private> 103 <Private>False</Private>
106 </ProjectReference> 104 </ProjectReference>
107 <ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj"> 105 <ProjectReference Include="..\..\..\Framework\Data\OpenSim.Framework.Data.csproj">
108 <Name>OpenSim.Servers</Name> 106 <Name>OpenSim.Framework.Data</Name>
109 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> 107 <Project>{36B72A9B-0000-0000-0000-000000000000}</Project>
110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 108 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
111 <Private>False</Private> 109 <Private>False</Private>
112 </ProjectReference> 110 </ProjectReference>
113 <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj"> 111 <ProjectReference Include="..\..\..\Framework\Servers\OpenSim.Framework.Servers.csproj">
114 <Name>XMLRPC</Name> 112 <Name>OpenSim.Framework.Servers</Name>
115 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> 113 <Project>{2CC71860-0000-0000-0000-000000000000}</Project>
116 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 114 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
117 <Private>False</Private> 115 <Private>False</Private>
118 </ProjectReference> 116 </ProjectReference>
119 </ItemGroup> 117 </ItemGroup>
120 <ItemGroup> 118 <ItemGroup>
121 <Compile Include="GridCommsManager.cs"> 119 <Compile Include="CommunicationsOGS1.cs">
122 <SubType>Code</SubType> 120 <SubType>Code</SubType>
123 </Compile> 121 </Compile>
124 <Compile Include="OGS1GridServices.cs"> 122 <Compile Include="OGS1GridServices.cs">
125 <SubType>Code</SubType> 123 <SubType>Code</SubType>
126 </Compile> 124 </Compile>
127 <Compile Include="OGSInterSimComms.cs"> 125 <Compile Include="OGS1InterSimComms.cs">
128 <SubType>Code</SubType> 126 <SubType>Code</SubType>
129 </Compile> 127 </Compile>
130 <Compile Include="OGSUserServices.cs"> 128 <Compile Include="OGS1UserServices.cs">
131 <SubType>Code</SubType> 129 <SubType>Code</SubType>
132 </Compile> 130 </Compile>
133 <Compile Include="Properties\AssemblyInfo.cs"> 131 <Compile Include="Properties\AssemblyInfo.cs">
diff --git a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build
new file mode 100644
index 0000000..04d61b9
--- /dev/null
+++ b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build
@@ -0,0 +1,53 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Region.Communications.OGS1" default="build">
3 <target name="build">
4 <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
5 <mkdir dir="${project::get-base-directory()}/${build.dir}" />
6 <copy todir="${project::get-base-directory()}/${build.dir}">
7 <fileset basedir="${project::get-base-directory()}">
8 </fileset>
9 </copy>
10 <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
11 <resources prefix="OpenSim.Region.Communications.OGS1" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="CommunicationsOGS1.cs" />
15 <include name="OGS1GridServices.cs" />
16 <include name="OGS1InterSimComms.cs" />
17 <include name="OGS1UserServices.cs" />
18 <include name="Properties/AssemblyInfo.cs" />
19 </sources>
20 <references basedir="${project::get-base-directory()}">
21 <lib>
22 <include name="${project::get-base-directory()}" />
23 <include name="${project::get-base-directory()}/${build.dir}" />
24 </lib>
25 <include name="../../../../bin/libsecondlife.dll" />
26 <include name="../../../../bin/OpenSim.Framework.dll" />
27 <include name="../../../../bin/OpenSim.Framework.Communications.dll" />
28 <include name="../../../../bin/OpenSim.Framework.Console.dll" />
29 <include name="../../../../bin/OpenSim.Framework.Data.dll" />
30 <include name="../../../../bin/OpenSim.Framework.Servers.dll" />
31 <include name="System.dll" />
32 <include name="System.Data.dll" />
33 <include name="System.Runtime.Remoting.dll" />
34 <include name="System.Xml.dll" />
35 <include name="../../../../bin/XMLRPC.dll" />
36 </references>
37 </csc>
38 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../../bin/" />
39 <mkdir dir="${project::get-base-directory()}/../../../../bin/"/>
40 <copy todir="${project::get-base-directory()}/../../../../bin/">
41 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
42 <include name="*.dll"/>
43 <include name="*.exe"/>
44 </fileset>
45 </copy>
46 </target>
47 <target name="clean">
48 <delete dir="${bin.dir}" failonerror="false" />
49 <delete dir="${obj.dir}" failonerror="false" />
50 </target>
51 <target name="doc" description="Creates documentation.">
52 </target>
53</project>
diff --git a/Common/OpenGrid.Framework.Communications.OGS1/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs
index 0c6f965..0c6f965 100644
--- a/Common/OpenGrid.Framework.Communications.OGS1/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs