aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications
diff options
context:
space:
mode:
authormingchen2007-06-28 16:17:20 +0000
committermingchen2007-06-28 16:17:20 +0000
commit108d89f89436556c8f4662197903c374db943f7d (patch)
tree4a089c43c54bdef28c0883fd9aaef464c840c3ac /OpenSim/Region/Communications
parentApplied ScenePresence movement patch from Darok. (diff)
downloadopensim-SC-108d89f89436556c8f4662197903c374db943f7d.zip
opensim-SC-108d89f89436556c8f4662197903c374db943f7d.tar.gz
opensim-SC-108d89f89436556c8f4662197903c374db943f7d.tar.bz2
opensim-SC-108d89f89436556c8f4662197903c374db943f7d.tar.xz
*Master User is now set up
*Added support for getting user profile information from remote grid server (untested) *Updated prebuild.xml
Diffstat (limited to 'OpenSim/Region/Communications')
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs2
-rw-r--r--OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj6
-rw-r--r--OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build2
-rw-r--r--OpenSim/Region/Communications/OGS1/GridCommsManager.cs2
-rw-r--r--OpenSim/Region/Communications/OGS1/OGSUserServices.cs63
-rw-r--r--OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj4
-rw-r--r--OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build4
7 files changed, 73 insertions, 10 deletions
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index f5aa8ae..bacaa3e 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Communications.Local
45 public CommunicationsLocal(NetworkServersInfo serversInfo) 45 public CommunicationsLocal(NetworkServersInfo serversInfo)
46 : base(serversInfo) 46 : base(serversInfo)
47 { 47 {
48 UserServices = new LocalUserServices(this , serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY); 48 UserServices = new LocalUserServices(this,this.ServersInfo.DefaultHomeLocX,this.ServersInfo.DefaultHomeLocY);
49 UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); 49 UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");
50 UserServer = UserServices; 50 UserServer = UserServices;
51 GridServer = SandBoxServices; 51 GridServer = SandBoxServices;
diff --git a/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj
index 0a15a49..200fa3a 100644
--- a/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj
+++ b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.csproj
@@ -98,15 +98,15 @@
98 </ProjectReference> 98 </ProjectReference>
99 </ItemGroup> 99 </ItemGroup>
100 <ItemGroup> 100 <ItemGroup>
101 <Compile Include="CommunicationsLocal.cs">
102 <SubType>Code</SubType>
103 </Compile>
104 <Compile Include="LocalBackEndServices.cs"> 101 <Compile Include="LocalBackEndServices.cs">
105 <SubType>Code</SubType> 102 <SubType>Code</SubType>
106 </Compile> 103 </Compile>
107 <Compile Include="LocalUserServices.cs"> 104 <Compile Include="LocalUserServices.cs">
108 <SubType>Code</SubType> 105 <SubType>Code</SubType>
109 </Compile> 106 </Compile>
107 <Compile Include="CommunicationsLocal.cs">
108 <SubType>Code</SubType>
109 </Compile>
110 <Compile Include="Properties\AssemblyInfo.cs"> 110 <Compile Include="Properties\AssemblyInfo.cs">
111 <SubType>Code</SubType> 111 <SubType>Code</SubType>
112 </Compile> 112 </Compile>
diff --git a/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build
index 3cac9d3..60a90bd 100644
--- a/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build
+++ b/OpenSim/Region/Communications/Local/OpenSim.Region.Communications.Local.dll.build
@@ -11,9 +11,9 @@
11 <resources prefix="OpenSim.Region.Communications.Local" dynamicprefix="true" > 11 <resources prefix="OpenSim.Region.Communications.Local" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="CommunicationsLocal.cs" />
15 <include name="LocalBackEndServices.cs" /> 14 <include name="LocalBackEndServices.cs" />
16 <include name="LocalUserServices.cs" /> 15 <include name="LocalUserServices.cs" />
16 <include name="CommunicationsLocal.cs" />
17 <include name="Properties/AssemblyInfo.cs" /> 17 <include name="Properties/AssemblyInfo.cs" />
18 </sources> 18 </sources>
19 <references basedir="${project::get-base-directory()}"> 19 <references basedir="${project::get-base-directory()}">
diff --git a/OpenSim/Region/Communications/OGS1/GridCommsManager.cs b/OpenSim/Region/Communications/OGS1/GridCommsManager.cs
index 77848fa..2bf9536 100644
--- a/OpenSim/Region/Communications/OGS1/GridCommsManager.cs
+++ b/OpenSim/Region/Communications/OGS1/GridCommsManager.cs
@@ -12,7 +12,7 @@ namespace OpenSim.Region.Communications.OGS1
12 { 12 {
13 GridServer = gridInterComms; 13 GridServer = gridInterComms;
14 InterRegion = gridInterComms; 14 InterRegion = gridInterComms;
15 UserServer = new OGSUserServices(); 15 UserServer = new OGSUserServices(this);
16 } 16 }
17 } 17 }
18} 18}
diff --git a/OpenSim/Region/Communications/OGS1/OGSUserServices.cs b/OpenSim/Region/Communications/OGS1/OGSUserServices.cs
index 48d3018..d41bdaf 100644
--- a/OpenSim/Region/Communications/OGS1/OGSUserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGSUserServices.cs
@@ -1,24 +1,87 @@
1using System; 1using System;
2using System.Collections;
2using System.Collections.Generic; 3using System.Collections.Generic;
3using System.Text; 4using System.Text;
5using OpenSim.Framework.Types;
4using OpenSim.Framework.Communications; 6using OpenSim.Framework.Communications;
5using OpenSim.Framework.Data; 7using OpenSim.Framework.Data;
6using libsecondlife; 8using libsecondlife;
7 9
10using Nwc.XmlRpc;
11
8namespace OpenSim.Region.Communications.OGS1 12namespace OpenSim.Region.Communications.OGS1
9{ 13{
10 public class OGSUserServices :IUserServices 14 public class OGSUserServices :IUserServices
11 { 15 {
16 GridCommsManager m_parent;
17 public OGSUserServices(GridCommsManager parent)
18 {
19 m_parent = parent;
20 }
21
22 public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data)
23 {
24 UserProfileData userData = new UserProfileData();
25 userData.username = (string)data["firstname"];
26 userData.surname = (string)data["lastname"];
27 userData.UUID = new LLUUID((string)data["uuid"]);
28 userData.userInventoryURI = (string)data["server_inventory"];
29 userData.userAssetURI = (string)data["server_asset"];
30 userData.profileFirstText = (string)data["profile_firstlife_about"];
31 userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]);
32 userData.profileCanDoMask = (uint)data["profile_can_do"];
33 userData.profileWantDoMask = (uint)data["profile_want_do"];
34 userData.profileImage = new LLUUID((string)data["profile_image"]);
35 userData.lastLogin = (int)data["profile_lastlogin"];
36 userData.homeLocation = new LLVector3();
37 userData.homeLookAt = new LLVector3();
38
39 return userData;
40 }
12 public UserProfileData GetUserProfile(string firstName, string lastName) 41 public UserProfileData GetUserProfile(string firstName, string lastName)
13 { 42 {
14 return GetUserProfile(firstName + " " + lastName); 43 return GetUserProfile(firstName + " " + lastName);
15 } 44 }
16 public UserProfileData GetUserProfile(string name) 45 public UserProfileData GetUserProfile(string name)
17 { 46 {
47
48 try
49 {
50 Hashtable param = new Hashtable();
51 param["avatar_name"] = name;
52 IList parameters = new ArrayList();
53 parameters.Add(param);
54 XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters);
55 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
56 Hashtable respData = (Hashtable)resp.Value;
57
58 return ConvertXMLRPCDataToUserProfile(respData);
59 }
60 catch (Exception e)
61 {
62 Console.WriteLine("Error when trying to fetch profile data by name from remote user server: " + e.Message);
63 }
18 return null; 64 return null;
19 } 65 }
20 public UserProfileData GetUserProfile(LLUUID avatarID) 66 public UserProfileData GetUserProfile(LLUUID avatarID)
21 { 67 {
68 try
69 {
70
71 Hashtable param = new Hashtable();
72 param["avatar_uuid"] = avatarID.ToString();
73 IList parameters = new ArrayList();
74 parameters.Add(param);
75 XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters);
76 XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000);
77 Hashtable respData = (Hashtable)resp.Value;
78
79 return ConvertXMLRPCDataToUserProfile(respData);
80 }
81 catch (Exception e)
82 {
83 Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " + e.Message);
84 }
22 return null; 85 return null;
23 } 86 }
24 87
diff --git a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
index 8cc5641..2124bd9 100644
--- a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
+++ b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.csproj
@@ -116,13 +116,13 @@
116 </ProjectReference> 116 </ProjectReference>
117 </ItemGroup> 117 </ItemGroup>
118 <ItemGroup> 118 <ItemGroup>
119 <Compile Include="GridCommsManager.cs"> 119 <Compile Include="OGSInterSimComms.cs">
120 <SubType>Code</SubType> 120 <SubType>Code</SubType>
121 </Compile> 121 </Compile>
122 <Compile Include="OGS1GridServices.cs"> 122 <Compile Include="OGS1GridServices.cs">
123 <SubType>Code</SubType> 123 <SubType>Code</SubType>
124 </Compile> 124 </Compile>
125 <Compile Include="OGSInterSimComms.cs"> 125 <Compile Include="GridCommsManager.cs">
126 <SubType>Code</SubType> 126 <SubType>Code</SubType>
127 </Compile> 127 </Compile>
128 <Compile Include="OGSUserServices.cs"> 128 <Compile Include="OGSUserServices.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
index 21bb15c..1a7cf69 100644
--- a/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build
+++ b/OpenSim/Region/Communications/OGS1/OpenSim.Region.Communications.OGS1.dll.build
@@ -11,9 +11,9 @@
11 <resources prefix="OpenSim.Region.Communications.OGS1" dynamicprefix="true" > 11 <resources prefix="OpenSim.Region.Communications.OGS1" dynamicprefix="true" >
12 </resources> 12 </resources>
13 <sources failonempty="true"> 13 <sources failonempty="true">
14 <include name="GridCommsManager.cs" />
15 <include name="OGS1GridServices.cs" />
16 <include name="OGSInterSimComms.cs" /> 14 <include name="OGSInterSimComms.cs" />
15 <include name="OGS1GridServices.cs" />
16 <include name="GridCommsManager.cs" />
17 <include name="OGSUserServices.cs" /> 17 <include name="OGSUserServices.cs" />
18 <include name="Properties/AssemblyInfo.cs" /> 18 <include name="Properties/AssemblyInfo.cs" />
19 </sources> 19 </sources>