diff options
Diffstat (limited to 'OpenSim/Framework/Data')
-rw-r--r-- | OpenSim/Framework/Data/OpenSim.Framework.Data.csproj | 46 | ||||
-rw-r--r-- | OpenSim/Framework/Data/OpenSim.Framework.Data.dll.build | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Data/SimProfileData.cs | 70 |
3 files changed, 99 insertions, 21 deletions
diff --git a/OpenSim/Framework/Data/OpenSim.Framework.Data.csproj b/OpenSim/Framework/Data/OpenSim.Framework.Data.csproj index dcafbcd..6077266 100644 --- a/OpenSim/Framework/Data/OpenSim.Framework.Data.csproj +++ b/OpenSim/Framework/Data/OpenSim.Framework.Data.csproj | |||
@@ -1,4 +1,4 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
2 | <PropertyGroup> | 2 | <PropertyGroup> |
3 | <ProjectType>Local</ProjectType> | 3 | <ProjectType>Local</ProjectType> |
4 | <ProductVersion>8.0.50727</ProductVersion> | 4 | <ProductVersion>8.0.50727</ProductVersion> |
@@ -6,7 +6,8 @@ | |||
6 | <ProjectGuid>{36B72A9B-0000-0000-0000-000000000000}</ProjectGuid> | 6 | <ProjectGuid>{36B72A9B-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> |
10 | </ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | 11 | <AssemblyKeyContainerName> |
11 | </AssemblyKeyContainerName> | 12 | </AssemblyKeyContainerName> |
12 | <AssemblyName>OpenSim.Framework.Data</AssemblyName> | 13 | <AssemblyName>OpenSim.Framework.Data</AssemblyName> |
@@ -15,9 +16,11 @@ | |||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | 16 | <DefaultTargetSchema>IE50</DefaultTargetSchema> |
16 | <DelaySign>false</DelaySign> | 17 | <DelaySign>false</DelaySign> |
17 | <OutputType>Library</OutputType> | 18 | <OutputType>Library</OutputType> |
18 | <AppDesignerFolder></AppDesignerFolder> | 19 | <AppDesignerFolder> |
20 | </AppDesignerFolder> | ||
19 | <RootNamespace>OpenSim.Framework.Data</RootNamespace> | 21 | <RootNamespace>OpenSim.Framework.Data</RootNamespace> |
20 | <StartupObject></StartupObject> | 22 | <StartupObject> |
23 | </StartupObject> | ||
21 | <FileUpgradeFlags> | 24 | <FileUpgradeFlags> |
22 | </FileUpgradeFlags> | 25 | </FileUpgradeFlags> |
23 | </PropertyGroup> | 26 | </PropertyGroup> |
@@ -28,7 +31,8 @@ | |||
28 | <ConfigurationOverrideFile> | 31 | <ConfigurationOverrideFile> |
29 | </ConfigurationOverrideFile> | 32 | </ConfigurationOverrideFile> |
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | 33 | <DefineConstants>TRACE;DEBUG</DefineConstants> |
31 | <DocumentationFile></DocumentationFile> | 34 | <DocumentationFile> |
35 | </DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | 36 | <DebugSymbols>True</DebugSymbols> |
33 | <FileAlignment>4096</FileAlignment> | 37 | <FileAlignment>4096</FileAlignment> |
34 | <Optimize>False</Optimize> | 38 | <Optimize>False</Optimize> |
@@ -37,7 +41,8 @@ | |||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 41 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 42 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
39 | <WarningLevel>4</WarningLevel> | 43 | <WarningLevel>4</WarningLevel> |
40 | <NoWarn></NoWarn> | 44 | <NoWarn> |
45 | </NoWarn> | ||
41 | </PropertyGroup> | 46 | </PropertyGroup> |
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | 47 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | 48 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
@@ -46,7 +51,8 @@ | |||
46 | <ConfigurationOverrideFile> | 51 | <ConfigurationOverrideFile> |
47 | </ConfigurationOverrideFile> | 52 | </ConfigurationOverrideFile> |
48 | <DefineConstants>TRACE</DefineConstants> | 53 | <DefineConstants>TRACE</DefineConstants> |
49 | <DocumentationFile></DocumentationFile> | 54 | <DocumentationFile> |
55 | </DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | 56 | <DebugSymbols>False</DebugSymbols> |
51 | <FileAlignment>4096</FileAlignment> | 57 | <FileAlignment>4096</FileAlignment> |
52 | <Optimize>True</Optimize> | 58 | <Optimize>True</Optimize> |
@@ -55,29 +61,34 @@ | |||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 61 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 62 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
57 | <WarningLevel>4</WarningLevel> | 63 | <WarningLevel>4</WarningLevel> |
58 | <NoWarn></NoWarn> | 64 | <NoWarn> |
65 | </NoWarn> | ||
59 | </PropertyGroup> | 66 | </PropertyGroup> |
60 | <ItemGroup> | 67 | <ItemGroup> |
61 | <Reference Include="libsecondlife.dll" > | 68 | <Reference Include="libsecondlife.dll"> |
62 | <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> | 69 | <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> |
63 | <Private>False</Private> | 70 | <Private>False</Private> |
64 | </Reference> | 71 | </Reference> |
65 | <Reference Include="System" > | 72 | <Reference Include="System"> |
66 | <HintPath>System.dll</HintPath> | 73 | <HintPath>System.dll</HintPath> |
67 | <Private>False</Private> | 74 | <Private>False</Private> |
68 | </Reference> | 75 | </Reference> |
69 | <Reference Include="System.Data" > | 76 | <Reference Include="System.Data"> |
70 | <HintPath>System.Data.dll</HintPath> | 77 | <HintPath>System.Data.dll</HintPath> |
71 | <Private>False</Private> | 78 | <Private>False</Private> |
72 | </Reference> | 79 | </Reference> |
73 | <Reference Include="System.Xml" > | 80 | <Reference Include="System.Xml"> |
74 | <HintPath>System.Xml.dll</HintPath> | 81 | <HintPath>System.Xml.dll</HintPath> |
75 | <Private>False</Private> | 82 | <Private>False</Private> |
76 | </Reference> | 83 | </Reference> |
84 | <Reference Include="XMLRPC, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> | ||
77 | </ItemGroup> | 85 | </ItemGroup> |
78 | <ItemGroup> | 86 | <ItemGroup> |
79 | </ItemGroup> | 87 | </ItemGroup> |
80 | <ItemGroup> | 88 | <ItemGroup> |
89 | <Compile Include="ReservationData.cs"> | ||
90 | <SubType>Code</SubType> | ||
91 | </Compile> | ||
81 | <Compile Include="GridData.cs"> | 92 | <Compile Include="GridData.cs"> |
82 | <SubType>Code</SubType> | 93 | <SubType>Code</SubType> |
83 | </Compile> | 94 | </Compile> |
@@ -90,18 +101,15 @@ | |||
90 | <Compile Include="InventoryData.cs"> | 101 | <Compile Include="InventoryData.cs"> |
91 | <SubType>Code</SubType> | 102 | <SubType>Code</SubType> |
92 | </Compile> | 103 | </Compile> |
93 | <Compile Include="ReservationData.cs"> | ||
94 | <SubType>Code</SubType> | ||
95 | </Compile> | ||
96 | <Compile Include="SimProfileData.cs"> | ||
97 | <SubType>Code</SubType> | ||
98 | </Compile> | ||
99 | <Compile Include="UserData.cs"> | 104 | <Compile Include="UserData.cs"> |
100 | <SubType>Code</SubType> | 105 | <SubType>Code</SubType> |
101 | </Compile> | 106 | </Compile> |
102 | <Compile Include="UserProfileData.cs"> | 107 | <Compile Include="UserProfileData.cs"> |
103 | <SubType>Code</SubType> | 108 | <SubType>Code</SubType> |
104 | </Compile> | 109 | </Compile> |
110 | <Compile Include="SimProfileData.cs"> | ||
111 | <SubType>Code</SubType> | ||
112 | </Compile> | ||
105 | <Compile Include="Properties\AssemblyInfo.cs"> | 113 | <Compile Include="Properties\AssemblyInfo.cs"> |
106 | <SubType>Code</SubType> | 114 | <SubType>Code</SubType> |
107 | </Compile> | 115 | </Compile> |
@@ -113,4 +121,4 @@ | |||
113 | <PostBuildEvent> | 121 | <PostBuildEvent> |
114 | </PostBuildEvent> | 122 | </PostBuildEvent> |
115 | </PropertyGroup> | 123 | </PropertyGroup> |
116 | </Project> | 124 | </Project> \ No newline at end of file |
diff --git a/OpenSim/Framework/Data/OpenSim.Framework.Data.dll.build b/OpenSim/Framework/Data/OpenSim.Framework.Data.dll.build index aefb02b..6b489f2 100644 --- a/OpenSim/Framework/Data/OpenSim.Framework.Data.dll.build +++ b/OpenSim/Framework/Data/OpenSim.Framework.Data.dll.build | |||
@@ -11,14 +11,14 @@ | |||
11 | <resources prefix="OpenSim.Framework.Data" dynamicprefix="true" > | 11 | <resources prefix="OpenSim.Framework.Data" dynamicprefix="true" > |
12 | </resources> | 12 | </resources> |
13 | <sources failonempty="true"> | 13 | <sources failonempty="true"> |
14 | <include name="ReservationData.cs" /> | ||
14 | <include name="GridData.cs" /> | 15 | <include name="GridData.cs" /> |
15 | <include name="ILogData.cs" /> | 16 | <include name="ILogData.cs" /> |
16 | <include name="IniConfig.cs" /> | 17 | <include name="IniConfig.cs" /> |
17 | <include name="InventoryData.cs" /> | 18 | <include name="InventoryData.cs" /> |
18 | <include name="ReservationData.cs" /> | ||
19 | <include name="SimProfileData.cs" /> | ||
20 | <include name="UserData.cs" /> | 19 | <include name="UserData.cs" /> |
21 | <include name="UserProfileData.cs" /> | 20 | <include name="UserProfileData.cs" /> |
21 | <include name="SimProfileData.cs" /> | ||
22 | <include name="Properties/AssemblyInfo.cs" /> | 22 | <include name="Properties/AssemblyInfo.cs" /> |
23 | </sources> | 23 | </sources> |
24 | <references basedir="${project::get-base-directory()}"> | 24 | <references basedir="${project::get-base-directory()}"> |
diff --git a/OpenSim/Framework/Data/SimProfileData.cs b/OpenSim/Framework/Data/SimProfileData.cs index 3dddfb4..9db8574 100644 --- a/OpenSim/Framework/Data/SimProfileData.cs +++ b/OpenSim/Framework/Data/SimProfileData.cs | |||
@@ -26,6 +26,10 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | using Nwc.XmlRpc; | ||
30 | |||
31 | using System; | ||
32 | using System.Collections; | ||
29 | 33 | ||
30 | namespace OpenSim.Framework.Data | 34 | namespace OpenSim.Framework.Data |
31 | { | 35 | { |
@@ -108,5 +112,71 @@ namespace OpenSim.Framework.Data | |||
108 | /// Region Map Texture Asset | 112 | /// Region Map Texture Asset |
109 | /// </summary> | 113 | /// </summary> |
110 | public LLUUID regionMapTextureID = new LLUUID("00000000-0000-0000-9999-000000000006"); | 114 | public LLUUID regionMapTextureID = new LLUUID("00000000-0000-0000-9999-000000000006"); |
115 | |||
116 | /// <summary> | ||
117 | /// Get Sim profile data from grid server when in grid mode | ||
118 | /// </summary> | ||
119 | /// <param name="region_uuid"></param> | ||
120 | /// <param name="gridserver_url"></param> | ||
121 | /// <param name="?"></param> | ||
122 | /// <returns></returns> | ||
123 | public SimProfileData RequestSimProfileData(LLUUID region_uuid, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey) | ||
124 | { | ||
125 | Hashtable requestData = new Hashtable(); | ||
126 | requestData["region_uuid"] = region_uuid.UUID.ToString(); | ||
127 | requestData["authkey"] = gridserver_sendkey; | ||
128 | ArrayList SendParams = new ArrayList(); | ||
129 | SendParams.Add(requestData); | ||
130 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); | ||
131 | XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000); | ||
132 | |||
133 | Hashtable responseData = (Hashtable)GridResp.Value; | ||
134 | |||
135 | if (responseData.ContainsKey("error")) | ||
136 | { | ||
137 | return null; | ||
138 | } | ||
139 | |||
140 | SimProfileData simData = new SimProfileData(); | ||
141 | simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]); | ||
142 | simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]); | ||
143 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); | ||
144 | simData.serverIP = (string)responseData["sim_ip"]; | ||
145 | simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); | ||
146 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; | ||
147 | simData.UUID = new LLUUID((string)responseData["region_UUID"]); | ||
148 | simData.regionName = (string)responseData["region_name"]; | ||
149 | |||
150 | return simData; | ||
151 | } | ||
152 | public SimProfileData RequestSimProfileData(ulong region_handle, string gridserver_url, string gridserver_sendkey, string gridserver_recvkey) | ||
153 | { | ||
154 | Hashtable requestData = new Hashtable(); | ||
155 | requestData["region_handle"] = region_handle.ToString(); | ||
156 | requestData["authkey"] = gridserver_sendkey; | ||
157 | ArrayList SendParams = new ArrayList(); | ||
158 | SendParams.Add(requestData); | ||
159 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); | ||
160 | XmlRpcResponse GridResp = GridReq.Send(gridserver_url, 3000); | ||
161 | |||
162 | Hashtable responseData = (Hashtable)GridResp.Value; | ||
163 | |||
164 | if (responseData.ContainsKey("error")) | ||
165 | { | ||
166 | return null; | ||
167 | } | ||
168 | |||
169 | SimProfileData simData = new SimProfileData(); | ||
170 | simData.regionLocX = Convert.ToUInt32((string)responseData["region_locx"]); | ||
171 | simData.regionLocY = Convert.ToUInt32((string)responseData["region_locy"]); | ||
172 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); | ||
173 | simData.serverIP = (string)responseData["sim_ip"]; | ||
174 | simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); | ||
175 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; | ||
176 | simData.UUID = new LLUUID((string)responseData["region_UUID"]); | ||
177 | simData.regionName = (string)responseData["region_name"]; | ||
178 | |||
179 | return simData; | ||
180 | } | ||
111 | } | 181 | } |
112 | } | 182 | } |