Merge branch 'master' into danmerge

Conflicts:
	.nant/local.include
	OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
	OpenSim/Framework/AvatarAppearance.cs
	OpenSim/Framework/IClientAPI.cs
	OpenSim/Region/Application/OpenSim.cs
	OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
	OpenSim/Region/Framework/Scenes/EventManager.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/Framework/Scenes/SceneGraph.cs
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
	OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
	OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
	bin/config-include/SimianGrid.ini
	prebuild.xml
dsg
Dan Lake 2010-11-30 17:36:36 -08:00
commit 681190f682
592 changed files with 49217 additions and 66976 deletions

351
.nant/local.include Normal file
View File

@ -0,0 +1,351 @@
<!-- -*- xml -*- -->
<!-- please leave the top comment for us emacs folks -->
<property name="nunitcmd" value="nunit-console" />
<!-- For safety/laziness sake, we're going to take the approach of deleting known extraneous files here rather than
trying to copy across only the essential ones -->
<property name="distbindir" value="distbin" />
<target name="distbin">
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
<copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/>
<delete dir="${distbindir}"/>
<copy todir="${distbindir}">
<fileset>
<include name="**"/>
</fileset>
</copy>
<delete dir="${distbindir}/OpenSim"/>
<delete dir="${distbindir}/Prebuild"/>
<delete dir="${distbindir}/%temp%"/>
<delete dir="${distbindir}/.nant"/>
<delete>
<fileset basedir="${distbindir}">
<include name="compile.bat"/>
<include name="BUILDING.txt"/>
<include name="Makefile"/>
<include name="nant-color"/>
<include name="OpenSim.*"/>
<include name="prebuild.xml"/>
<include name="runprebuild*"/>
<include name="TESTING.txt"/>
<include name="TestResult.xml"/>
<include name="bin/OpenSim.Server.ini"/>
<include name="bin/Regions/Regions.ini"/>
<include name="bin/*.db"/>
<include name="**/.git/**"/>
<include name=".gitignore"/>
<include name=".hgignore"/>
</fileset>
</delete>
</target>
<!-- I don't think these targets are being actively used. But just in case, we'll just comment them out for now - justincc -->
<!--
<property name="projectdir" value="opensim-0.6.9" />
<target name="dist" depends="distdir">
<zip zipfile="${projectdir}.zip">
<fileset basedir=".">
<include name="${projectdir}/**" />
</fileset>
</zip>
<tar destfile="${projectdir}.tar.gz" compression="GZip">
<fileset basedir=".">
<include name="${projectdir}/**" />
</fileset>
</tar>
</target>
<target name="distdir">
<delete dir="${projectdir}" />
<copy todir="${projectdir}">
<fileset basedir=".">
<include name="ThirdPartyLicenses/**" />
<include name="CONTRIBUTORS.txt" />
<include name="README" />
<include name="OpenSim/**/*.cs" />
<include name="**/*.build" />
<include name="**/*.csproj" />
<include name="**/*.csproj.user" />
<include name="**/*.sln" />
<include name="bin/*.dll" />
<include name="bin/*.so" />
<include name="bin/*.config" />
<include name="bin/assets/**" />
<include name="bin/data/**" />
<include name="bin/OpenSim*xml" />
<include name="bin/OpenSim.ini" />
<include name="bin/defaultstripe.png" />
<exclude name="bin/OpenSim.*dll" />
</fileset>
</copy>
<touch file="${projectdir}/bin/startup_commands.txt" />
</target>
-->
<target name="test" depends="build, find-nunit">
<setenv name="MONO_THREADS_PER_CPU" value="100" />
<!-- Unit Test Assembly -->
<!-- if you want to add more unit tests it's important that you add
the assembly here as an exec, and you add the fail clause later.
This lets all the unit tests run and tells you if they fail at the
end, instead of stopping short -->
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.tests">
<arg value="./bin/OpenSim.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests)==0}" />
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.framework.tests">
<arg value="./bin/OpenSim.Framework.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.tests)==0}" />
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.framework.servers.tests">
<arg value="./bin/OpenSim.Framework.Servers.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.servers.tests)==0}" />
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.framework.serialization.tests">
<arg value="./bin/OpenSim.Framework.Serialization.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.serialization.tests)==0}" />
<!--
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests">
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" />
-->
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.scriptengine.tests">
<arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" />
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.coremodules.tests">
<arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.region.framework.tests">
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" />
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.data.tests">
<arg value="./bin/OpenSim.Data.Tests.dll" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
<delete dir="%temp%"/>
</target>
<target name="test-cov" depends="build">
<!-- Code Coverage Test. Prototype, only works with mono 1.2. Instructions in http://opensimulator.org/wiki/Automated_Testing -->
<mkdir dir="cov" failonerror="false" />
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Framework.Servers.cov,+[OpenSim.Framework.Servers]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Framework.Servers.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Framework.Servers" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Framework.Servers ./cov/OpenSim.Framework.Servers.cov" />
</exec>
<!--
<exec program="mono">
<arg value="&#45;&#45;debug" />
<arg value="&#45;&#45;profile=monocov:outfile=./cov/OpenSim.Region.ClientStack.LindenUDP.cov,+[OpenSim.Region.ClientStack.LindenUDP]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.ClientStack.LindenUDP" />
<exec program="monocov">
<arg value="&#45;&#45;export-html=./cov/OpenSim.Region.ClientStack.LindenUDP ./cov/OpenSim.Region.ClientStack.LindenUDP.cov" />
</exec>
-->
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.cov,+[OpenSim.Region.ScriptEngine.Shared]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.ScriptEngine.Shared.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.ScriptEngine.Shared" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared ./cov/OpenSim.Region.ScriptEngine.Shared.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov,+[OpenSim.Region.ScriptEngine.Shared.CodeTools]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools ./cov/OpenSim.Region.ScriptEngine.Shared.CodeTools.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.CoreModules.cov,+[OpenSim.Region.CoreModules]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.CoreModules" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Region.CoreModules ./cov/OpenSim.Region.CoreModules.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Region.Framework.cov,+[OpenSim.Region.Framework]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Region.Framework" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Region.Framework ./cov/OpenSim.Region.Framework.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Data.SQLite.cov,+[OpenSim.Data.SQLite]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Data.SQLite.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Data.SQLite" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Data.SQLite ./cov/OpenSim.Data.SQLite.cov" />
</exec>
<exec program="mono">
<arg value="--debug" />
<arg value="--profile=monocov:outfile=./cov/OpenSim.Data.MySQL.cov,+[OpenSim.Data.MySQL.Tests]" />
<arg value="/usr/lib/nunit/nunit-console.exe" />
<arg value="./bin/OpenSim.Data.MySQL.Tests.dll" />
</exec>
<delete dir="./cov/OpenSim.Data.MySQL" />
<exec program="monocov">
<arg value="--export-html=./cov/OpenSim.Data.MySQL ./cov/OpenSim.Data.MySQL.cov" />
</exec>
<delete file="C:\NUnitPrimaryTrace.txt" failonerror="false" />
<delete file="TestResult.xml" failonerror="false" />
</target>
<target name="find-nunit">
<exec program="which" failonerror="false"
resultproperty="hasnunit2">
<arg value="nunit-console2" />
</exec>
<property name="nunitcmd" value="nunit-console2"
if="${int::parse(hasnunit2)==0}" />
<property name="nunitcmd" value="nunit-console"
if="${int::parse(hasnunit2)==1}" />
</target>
<!-- this is used for panda test execution -->
<!-- work in progress -->
<target name="test-xml" depends="build, find-nunit">
<mkdir dir="test-results" failonerror="false" />
<!-- Unit Test Assembly -->
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.tests">
<arg value="./bin/OpenSim.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Tests.dll-Results.xml" />
</exec>
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.tests">
<arg value="./bin/OpenSim.Framework.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Framework.Tests.dll-Results.xml" />
</exec>
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.serialization.tests">
<arg value="./bin/OpenSim.Framework.Serialization.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Framework.Serialization.Tests.dll-Results.xml" />
</exec>
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.framework.servers.tests">
<arg value="./bin/OpenSim.Framework.Servers.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Framework.Servers.Tests.dll-Results.xml" />
</exec>
<!--
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.clientstack.lindenudp.tests">
<arg value="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Region.ClientStack.LindenUDP.Tests.dll-Results.xml" />
</exec>
-->
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.scriptengine.tests">
<arg value="./bin/OpenSim.Region.ScriptEngine.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Region.ScriptEngine.Tests.dll-Results.xml" />
</exec>
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.coremodules.tests">
<arg value="./bin/OpenSim.Region.CoreModules.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Region.CoreModules.Tests.dll-Results.xml" />
</exec>
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.region.framework.tests">
<arg value="./bin/OpenSim.Region.Framework.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Region.Framework.Tests.dll-Results.xml" />
</exec>
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.tests">
<arg value="./bin/OpenSim.Data.Tests.dll" />
<arg value="-xml=test-results/OpenSim.Data.Tests.dll-Results.xml" />
</exec>
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.servers.tests)==0}" />
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.clientstack.lindenudp.tests)==0}" /> -->
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" />
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
</target>
<!-- <exec program="nunit-console.exe" failonerror="false" resultproperty="testresult.acceptancetestassembly"> -->
<!-- <arg value="AcceptanceTestAssembly.dll" /> -->
<!-- <arg value="/xml=AcceptanceTestAssembly-Results.xml" /> -->
<!-- </exec> -->
<!-- <fail message="Failures reported in unit tests." unless="${int::parse(testresult.unittestassembly)==0}" /> -->
<!-- <fail message="Failures reported in acceptance tests." unless="${int::parse(testresult.acceptancetestassembly)==0}" /> -->
<!-- </target> -->
<!-- <nunit2 failonerror="true" verbose="true"> -->
<!-- <formatter type="Xml" usefile="true" extension=".xml" outputdir="./test-results" /> -->
<!-- <test> -->
<!-- <assemblies> -->
<!-- <include name="./bin/OpenSim.Framework.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Framework.Servers.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Region.ClientStack.LindenUDP.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Region.ScriptEngine.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Region.CoreModules.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Region.Framework.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Data.SQLite.Tests.dll" /> -->
<!-- <include name="./bin/OpenSim.Data.MySQL.Tests.dll" /> -->
<!-- </assemblies> -->
<!-- </test> -->
<!-- </nunit2> -->
<!-- </target> -->
<target name="doxygen">
<exec program="doxygen" workingdir="doc" commandline="doxygen.conf" />
</target>

View File

@ -1,4 +1,4 @@
=== Building OpenSim ===
==== Building OpenSim ====
=== Building on Windows ===

View File

@ -167,6 +167,7 @@ This software uses components from the following developers:
* GlynnTucker.Cache (http://gtcache.sourceforge.net/)
* NDesk.Options 0.2.1 (http://www.ndesk.org/Options)
* Json.NET 3.5 Release 6. The binary used is actually Newtonsoft.Json.Net20.dll for Mono 2.4 compatability (http://james.newtonking.com/projects/json-net.aspx)
* zlib.net for C# 1.0.4 (http://www.componentace.com/zlib_.NET.htm)
Some plugins are based on Cable Beach
Cable Beach is Copyright (c) 2008 Intel Corporation

View File

@ -122,7 +122,9 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
m_log.Debug("[LOADREGIONS]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " +
Thread.CurrentThread.ManagedThreadId.ToString() +
")");
m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]);
m_openSim.CreateRegion(regionsToLoad[i], true, out scene);
regionsToLoad[i].EstateSettings.Save();
if (scene != null)
{
m_newRegionCreatedHandler = OnNewRegionCreated;

View File

@ -27,6 +27,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
using OpenMetaverse;
using OpenSim.Framework;
@ -498,6 +499,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
indata = true;
}
break;
/*
case "Body" :
if (xml.MoveToAttribute("Item"))
{
@ -654,6 +656,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
indata = true;
}
break;
*/
case "Attachment" :
{
@ -748,6 +751,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.writer.WriteAttributeString("Owner", rdata.userAppearance.Owner.ToString());
rdata.writer.WriteAttributeString("Serial", rdata.userAppearance.Serial.ToString());
/*
FormatPart(rdata, "Body", rdata.userAppearance.BodyItem, rdata.userAppearance.BodyAsset);
FormatPart(rdata, "Skin", rdata.userAppearance.SkinItem, rdata.userAppearance.SkinAsset);
FormatPart(rdata, "Hair", rdata.userAppearance.HairItem, rdata.userAppearance.HairAsset);
@ -764,26 +768,20 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
FormatPart(rdata, "UnderShirt", rdata.userAppearance.UnderShirtItem, rdata.userAppearance.UnderShirtAsset);
FormatPart(rdata, "UnderPants", rdata.userAppearance.UnderPantsItem, rdata.userAppearance.UnderPantsAsset);
*/
Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId);
Hashtable attachments = rdata.userAppearance.GetAttachments();
if (attachments != null)
rdata.writer.WriteStartElement("Attachments");
List<AvatarAttachment> attachments = rdata.userAppearance.GetAttachments();
foreach (AvatarAttachment attach in attachments)
{
Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId);
rdata.writer.WriteStartElement("Attachments");
for (int i = 0; i < attachments.Count; i++)
{
Hashtable attachment = attachments[i] as Hashtable;
rdata.writer.WriteStartElement("Attachment");
rdata.writer.WriteAttributeString("AtPoint", i.ToString());
rdata.writer.WriteAttributeString("Item", (string) attachment["item"]);
rdata.writer.WriteAttributeString("Asset", (string) attachment["asset"]);
rdata.writer.WriteEndElement();
}
rdata.writer.WriteStartElement("Attachment");
rdata.writer.WriteAttributeString("AtPoint", attach.AttachPoint.ToString());
rdata.writer.WriteAttributeString("Item", attach.ItemID.ToString());
rdata.writer.WriteAttributeString("Asset", attach.AssetID.ToString());
rdata.writer.WriteEndElement();
}
rdata.writer.WriteEndElement();
Primitive.TextureEntry texture = rdata.userAppearance.Texture;

View File

@ -1295,6 +1295,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
rdata.writer.WriteAttributeString("folder", String.Empty, i.Folder.ToString());
rdata.writer.WriteAttributeString("owner", String.Empty, i.Owner.ToString());
rdata.writer.WriteAttributeString("creator", String.Empty, i.CreatorId);
rdata.writer.WriteAttributeString("creatordata", String.Empty, i.CreatorData);
rdata.writer.WriteAttributeString("creationdate", String.Empty, i.CreationDate.ToString());
rdata.writer.WriteAttributeString("invtype", String.Empty, i.InvType.ToString());
rdata.writer.WriteAttributeString("assettype", String.Empty, i.AssetType.ToString());

View File

@ -305,94 +305,94 @@ namespace OpenSim.Client.MXP.ClientStack
#region MXP Outgoing Message Processing
private void MXPSendPrimitive(uint localID, UUID ownerID, Vector3 acc, Vector3 rvel, PrimitiveBaseShape primShape, Vector3 pos, UUID objectID, Vector3 vel, Quaternion rotation, uint flags, string text, byte[] textColor, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim)
{
String typeName = ToOmType(primShape.PCode);
m_log.Info("[MXP ClientStack] Transmitting Primitive" + typeName);
PerceptionEventMessage pe = new PerceptionEventMessage();
pe.ObjectFragment.ObjectId = objectID.Guid;
pe.ObjectFragment.ParentObjectId = Guid.Empty;
// Resolving parent UUID.
OpenSim.Region.Framework.Scenes.Scene scene = (OpenSim.Region.Framework.Scenes.Scene)Scene;
if (scene.Entities.ContainsKey(parentID))
{
pe.ObjectFragment.ParentObjectId = scene.Entities[parentID].UUID.Guid;
}
pe.ObjectFragment.ObjectIndex = localID;
pe.ObjectFragment.ObjectName = typeName + " Object";
pe.ObjectFragment.OwnerId = ownerID.Guid;
pe.ObjectFragment.TypeId = Guid.Empty;
pe.ObjectFragment.TypeName = typeName;
pe.ObjectFragment.Acceleration = ToOmVector(acc);
pe.ObjectFragment.AngularAcceleration=new MsdQuaternion4f();
pe.ObjectFragment.AngularVelocity = ToOmQuaternion(rvel);
pe.ObjectFragment.BoundingSphereRadius = primShape.Scale.Length();
pe.ObjectFragment.Location = ToOmVector(pos);
pe.ObjectFragment.Mass = 1.0f;
pe.ObjectFragment.Orientation = ToOmQuaternion(rotation);
pe.ObjectFragment.Velocity =ToOmVector(vel);
OmSlPrimitiveExt ext = new OmSlPrimitiveExt();
if (!((primShape.PCode == (byte)PCode.NewTree) || (primShape.PCode == (byte)PCode.Tree) || (primShape.PCode == (byte)PCode.Grass)))
{
ext.PathBegin = primShape.PathBegin;
ext.PathEnd = primShape.PathEnd;
ext.PathScaleX = primShape.PathScaleX;
ext.PathScaleY = primShape.PathScaleY;
ext.PathShearX = primShape.PathShearX;
ext.PathShearY = primShape.PathShearY;
ext.PathSkew = primShape.PathSkew;
ext.ProfileBegin = primShape.ProfileBegin;
ext.ProfileEnd = primShape.ProfileEnd;
ext.PathCurve = primShape.PathCurve;
ext.ProfileCurve = primShape.ProfileCurve;
ext.ProfileHollow = primShape.ProfileHollow;
ext.PathRadiusOffset = primShape.PathRadiusOffset;
ext.PathRevolutions = primShape.PathRevolutions;
ext.PathTaperX = primShape.PathTaperX;
ext.PathTaperY = primShape.PathTaperY;
ext.PathTwist = primShape.PathTwist;
ext.PathTwistBegin = primShape.PathTwistBegin;
}
ext.UpdateFlags = flags;
ext.ExtraParams = primShape.ExtraParams;
ext.State = primShape.State;
ext.TextureEntry = primShape.TextureEntry;
ext.TextureAnim = textureanim;
ext.Scale = ToOmVector(primShape.Scale);
ext.Text = text;
ext.TextColor = ToOmColor(textColor);
ext.PSBlock = particleSystem;
ext.ClickAction = clickAction;
ext.Material = material;
pe.SetExtension<OmSlPrimitiveExt>(ext);
Session.Send(pe);
if (m_objectsSynchronized != -1)
{
m_objectsSynchronized++;
if (m_objectsToSynchronize >= m_objectsSynchronized)
{
SynchronizationEndEventMessage synchronizationEndEventMessage = new SynchronizationEndEventMessage();
Session.Send(synchronizationEndEventMessage);
m_objectsSynchronized = -1;
}
}
}
// private void MXPSendPrimitive(uint localID, UUID ownerID, Vector3 acc, Vector3 rvel, PrimitiveBaseShape primShape, Vector3 pos, UUID objectID, Vector3 vel, Quaternion rotation, uint flags, string text, byte[] textColor, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim)
// {
// String typeName = ToOmType(primShape.PCode);
// m_log.Info("[MXP ClientStack] Transmitting Primitive" + typeName);
//
// PerceptionEventMessage pe = new PerceptionEventMessage();
// pe.ObjectFragment.ObjectId = objectID.Guid;
//
// pe.ObjectFragment.ParentObjectId = Guid.Empty;
//
// // Resolving parent UUID.
// OpenSim.Region.Framework.Scenes.Scene scene = (OpenSim.Region.Framework.Scenes.Scene)Scene;
// if (scene.Entities.ContainsKey(parentID))
// {
// pe.ObjectFragment.ParentObjectId = scene.Entities[parentID].UUID.Guid;
// }
//
// pe.ObjectFragment.ObjectIndex = localID;
// pe.ObjectFragment.ObjectName = typeName + " Object";
// pe.ObjectFragment.OwnerId = ownerID.Guid;
// pe.ObjectFragment.TypeId = Guid.Empty;
// pe.ObjectFragment.TypeName = typeName;
// pe.ObjectFragment.Acceleration = ToOmVector(acc);
// pe.ObjectFragment.AngularAcceleration=new MsdQuaternion4f();
// pe.ObjectFragment.AngularVelocity = ToOmQuaternion(rvel);
// pe.ObjectFragment.BoundingSphereRadius = primShape.Scale.Length();
//
// pe.ObjectFragment.Location = ToOmVector(pos);
//
// pe.ObjectFragment.Mass = 1.0f;
// pe.ObjectFragment.Orientation = ToOmQuaternion(rotation);
// pe.ObjectFragment.Velocity =ToOmVector(vel);
//
// OmSlPrimitiveExt ext = new OmSlPrimitiveExt();
//
// if (!((primShape.PCode == (byte)PCode.NewTree) || (primShape.PCode == (byte)PCode.Tree) || (primShape.PCode == (byte)PCode.Grass)))
// {
//
// ext.PathBegin = primShape.PathBegin;
// ext.PathEnd = primShape.PathEnd;
// ext.PathScaleX = primShape.PathScaleX;
// ext.PathScaleY = primShape.PathScaleY;
// ext.PathShearX = primShape.PathShearX;
// ext.PathShearY = primShape.PathShearY;
// ext.PathSkew = primShape.PathSkew;
// ext.ProfileBegin = primShape.ProfileBegin;
// ext.ProfileEnd = primShape.ProfileEnd;
// ext.PathCurve = primShape.PathCurve;
// ext.ProfileCurve = primShape.ProfileCurve;
// ext.ProfileHollow = primShape.ProfileHollow;
// ext.PathRadiusOffset = primShape.PathRadiusOffset;
// ext.PathRevolutions = primShape.PathRevolutions;
// ext.PathTaperX = primShape.PathTaperX;
// ext.PathTaperY = primShape.PathTaperY;
// ext.PathTwist = primShape.PathTwist;
// ext.PathTwistBegin = primShape.PathTwistBegin;
//
//
// }
//
// ext.UpdateFlags = flags;
// ext.ExtraParams = primShape.ExtraParams;
// ext.State = primShape.State;
// ext.TextureEntry = primShape.TextureEntry;
// ext.TextureAnim = textureanim;
// ext.Scale = ToOmVector(primShape.Scale);
// ext.Text = text;
// ext.TextColor = ToOmColor(textColor);
// ext.PSBlock = particleSystem;
// ext.ClickAction = clickAction;
// ext.Material = material;
//
// pe.SetExtension<OmSlPrimitiveExt>(ext);
//
// Session.Send(pe);
//
// if (m_objectsSynchronized != -1)
// {
// m_objectsSynchronized++;
//
// if (m_objectsToSynchronize >= m_objectsSynchronized)
// {
// SynchronizationEndEventMessage synchronizationEndEventMessage = new SynchronizationEndEventMessage();
// Session.Send(synchronizationEndEventMessage);
// m_objectsSynchronized = -1;
// }
// }
// }
public void MXPSendAvatarData(string participantName, UUID ownerID, UUID parentId, UUID avatarID, uint avatarLocalID, Vector3 position, Quaternion rotation)
{
@ -598,7 +598,7 @@ namespace OpenSim.Client.MXP.ClientStack
public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
public event DeRezObject OnDeRezObject;
public event Action<IClientAPI> OnRegionHandShakeReply;
public event GenericCall2 OnRequestWearables;
public event GenericCall1 OnRequestWearables;
public event GenericCall1 OnCompleteMovementToRegion;
public event UpdateAgent OnPreAgentUpdate;
public event UpdateAgent OnAgentUpdate;
@ -869,7 +869,7 @@ namespace OpenSim.Client.MXP.ClientStack
OpenSim.Region.Framework.Scenes.Scene scene=(OpenSim.Region.Framework.Scenes.Scene)Scene;
AvatarAppearance appearance;
scene.GetAvatarAppearance(this,out appearance);
OnSetAppearance(appearance.Texture, (byte[])appearance.VisualParams.Clone());
OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone());
}
public void Stop()
@ -1023,11 +1023,15 @@ namespace OpenSim.Client.MXP.ClientStack
// Need to translate to MXP somehow
}
public void SendTeleportLocationStart()
public void SendTeleportStart(uint flags)
{
// Need to translate to MXP somehow
}
public void SendTeleportProgress(uint flags, string message)
{
}
public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
{
// Need to translate to MXP somehow

View File

@ -63,7 +63,7 @@ namespace OpenSim.Client.MXP.PacketHandler
private readonly IList<MXPClientView> m_sessionsToRemove = new List<MXPClientView>();
private readonly int m_port;
private readonly bool m_accountsAuthenticate;
// private readonly bool m_accountsAuthenticate;
private readonly String m_programName;
private readonly byte m_programMajorVersion;
@ -76,7 +76,7 @@ namespace OpenSim.Client.MXP.PacketHandler
public MXPPacketServer(int port, Dictionary<UUID, Scene> scenes, bool accountsAuthenticate)
{
m_port = port;
m_accountsAuthenticate = accountsAuthenticate;
// m_accountsAuthenticate = accountsAuthenticate;
m_scenes = scenes;
@ -491,7 +491,6 @@ namespace OpenSim.Client.MXP.PacketHandler
public bool AuthoriseUser(string participantName, string password, UUID sceneId, out UserAccount account)
{
UUID userId = UUID.Zero;
string firstName = "";
string lastName = "";
account = null;
@ -534,9 +533,7 @@ namespace OpenSim.Client.MXP.PacketHandler
agent.InventoryFolder = UUID.Zero;
agent.startpos = new Vector3(0, 0, 0); // TODO Fill in region start position
agent.CapsPath = "http://localhost/";
AvatarData avatar = scene.AvatarService.GetAvatar(account.PrincipalID);
if (avatar != null)
agent.Appearance = avatar.ToAvatarAppearance(account.PrincipalID); //userService.GetUserAppearance(userProfile.ID);
agent.Appearance = scene.AvatarService.GetAppearance(account.PrincipalID);
if (agent.Appearance == null)
{

File diff suppressed because it is too large Load Diff

View File

@ -1,630 +0,0 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
namespace Sirikata.Protocol._PBJ_Internal {
public static partial class MessageHeader {
#region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
}
#endregion
#region Static variables
internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_Header__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Protocol._PBJ_Internal.Header, global::Sirikata.Protocol._PBJ_Internal.Header.Builder> internal__static_Sirikata_Protocol__PBJ_Internal_Header__FieldAccessorTable;
#endregion
#region Descriptor
public static pbd::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbd::FileDescriptor descriptor;
static MessageHeader() {
byte[] descriptorData = global::System.Convert.FromBase64String(
"ChNNZXNzYWdlSGVhZGVyLnByb3RvEh9TaXJpa2F0YS5Qcm90b2NvbC5fUEJK" +
"X0ludGVybmFsIooDCgZIZWFkZXISFQoNc291cmNlX29iamVjdBgBIAEoDBIT" +
"Cgtzb3VyY2VfcG9ydBgDIAEoDRIVCgxzb3VyY2Vfc3BhY2UYgAwgASgMEhoK" +
"EmRlc3RpbmF0aW9uX29iamVjdBgCIAEoDBIYChBkZXN0aW5hdGlvbl9wb3J0" +
"GAQgASgNEhoKEWRlc3RpbmF0aW9uX3NwYWNlGIEMIAEoDBIKCgJpZBgHIAEo" +
"AxIQCghyZXBseV9pZBgIIAEoAxJMCg1yZXR1cm5fc3RhdHVzGIAOIAEoDjI0" +
"LlNpcmlrYXRhLlByb3RvY29sLl9QQkpfSW50ZXJuYWwuSGVhZGVyLlJldHVy" +
"blN0YXR1cyJ/CgxSZXR1cm5TdGF0dXMSCwoHU1VDQ0VTUxAAEhMKD05FVFdP" +
"UktfRkFJTFVSRRABEhMKD1RJTUVPVVRfRkFJTFVSRRADEhIKDlBST1RPQ09M" +
"X0VSUk9SEAQSEAoMUE9SVF9GQUlMVVJFEAUSEgoOVU5LTk9XTl9PQkpFQ1QQ" +
"Bg==");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root;
internal__static_Sirikata_Protocol__PBJ_Internal_Header__Descriptor = Descriptor.MessageTypes[0];
internal__static_Sirikata_Protocol__PBJ_Internal_Header__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Protocol._PBJ_Internal.Header, global::Sirikata.Protocol._PBJ_Internal.Header.Builder>(internal__static_Sirikata_Protocol__PBJ_Internal_Header__Descriptor,
new string[] { "SourceObject", "SourcePort", "SourceSpace", "DestinationObject", "DestinationPort", "DestinationSpace", "Id", "ReplyId", "ReturnStatus", });
return null;
};
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] {
}, assigner);
}
#endregion
}
#region Messages
public sealed partial class Header : pb::GeneratedMessage<Header, Header.Builder> {
private static readonly Header defaultInstance = new Builder().BuildPartial();
public static Header DefaultInstance {
get { return defaultInstance; }
}
public override Header DefaultInstanceForType {
get { return defaultInstance; }
}
protected override Header ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::Sirikata.Protocol._PBJ_Internal.MessageHeader.internal__static_Sirikata_Protocol__PBJ_Internal_Header__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<Header, Header.Builder> InternalFieldAccessors {
get { return global::Sirikata.Protocol._PBJ_Internal.MessageHeader.internal__static_Sirikata_Protocol__PBJ_Internal_Header__FieldAccessorTable; }
}
#region Nested types
public static class Types {
public enum ReturnStatus {
SUCCESS = 0,
NETWORK_FAILURE = 1,
TIMEOUT_FAILURE = 3,
PROTOCOL_ERROR = 4,
PORT_FAILURE = 5,
UNKNOWN_OBJECT = 6,
}
}
#endregion
public const int SourceObjectFieldNumber = 1;
private bool hasSourceObject;
private pb::ByteString sourceObject_ = pb::ByteString.Empty;
public bool HasSourceObject {
get { return hasSourceObject; }
}
public pb::ByteString SourceObject {
get { return sourceObject_; }
}
public const int SourcePortFieldNumber = 3;
private bool hasSourcePort;
private uint sourcePort_ = 0;
public bool HasSourcePort {
get { return hasSourcePort; }
}
[global::System.CLSCompliant(false)]
public uint SourcePort {
get { return sourcePort_; }
}
public const int SourceSpaceFieldNumber = 1536;
private bool hasSourceSpace;
private pb::ByteString sourceSpace_ = pb::ByteString.Empty;
public bool HasSourceSpace {
get { return hasSourceSpace; }
}
public pb::ByteString SourceSpace {
get { return sourceSpace_; }
}
public const int DestinationObjectFieldNumber = 2;
private bool hasDestinationObject;
private pb::ByteString destinationObject_ = pb::ByteString.Empty;
public bool HasDestinationObject {
get { return hasDestinationObject; }
}
public pb::ByteString DestinationObject {
get { return destinationObject_; }
}
public const int DestinationPortFieldNumber = 4;
private bool hasDestinationPort;
private uint destinationPort_ = 0;
public bool HasDestinationPort {
get { return hasDestinationPort; }
}
[global::System.CLSCompliant(false)]
public uint DestinationPort {
get { return destinationPort_; }
}
public const int DestinationSpaceFieldNumber = 1537;
private bool hasDestinationSpace;
private pb::ByteString destinationSpace_ = pb::ByteString.Empty;
public bool HasDestinationSpace {
get { return hasDestinationSpace; }
}
public pb::ByteString DestinationSpace {
get { return destinationSpace_; }
}
public const int IdFieldNumber = 7;
private bool hasId;
private long id_ = 0L;
public bool HasId {
get { return hasId; }
}
public long Id {
get { return id_; }
}
public const int ReplyIdFieldNumber = 8;
private bool hasReplyId;
private long replyId_ = 0L;
public bool HasReplyId {
get { return hasReplyId; }
}
public long ReplyId {
get { return replyId_; }
}
public const int ReturnStatusFieldNumber = 1792;
private bool hasReturnStatus;
private global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus returnStatus_ = global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus.SUCCESS;
public bool HasReturnStatus {
get { return hasReturnStatus; }
}
public global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus ReturnStatus {
get { return returnStatus_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasSourceObject) {
output.WriteBytes(1, SourceObject);
}
if (HasDestinationObject) {
output.WriteBytes(2, DestinationObject);
}
if (HasSourcePort) {
output.WriteUInt32(3, SourcePort);
}
if (HasDestinationPort) {
output.WriteUInt32(4, DestinationPort);
}
if (HasId) {
output.WriteInt64(7, Id);
}
if (HasReplyId) {
output.WriteInt64(8, ReplyId);
}
if (HasSourceSpace) {
output.WriteBytes(1536, SourceSpace);
}
if (HasDestinationSpace) {
output.WriteBytes(1537, DestinationSpace);
}
if (HasReturnStatus) {
output.WriteEnum(1792, (int) ReturnStatus);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasSourceObject) {
size += pb::CodedOutputStream.ComputeBytesSize(1, SourceObject);
}
if (HasSourcePort) {
size += pb::CodedOutputStream.ComputeUInt32Size(3, SourcePort);
}
if (HasSourceSpace) {
size += pb::CodedOutputStream.ComputeBytesSize(1536, SourceSpace);
}
if (HasDestinationObject) {
size += pb::CodedOutputStream.ComputeBytesSize(2, DestinationObject);
}
if (HasDestinationPort) {
size += pb::CodedOutputStream.ComputeUInt32Size(4, DestinationPort);
}
if (HasDestinationSpace) {
size += pb::CodedOutputStream.ComputeBytesSize(1537, DestinationSpace);
}
if (HasId) {
size += pb::CodedOutputStream.ComputeInt64Size(7, Id);
}
if (HasReplyId) {
size += pb::CodedOutputStream.ComputeInt64Size(8, ReplyId);
}
if (HasReturnStatus) {
size += pb::CodedOutputStream.ComputeEnumSize(1792, (int) ReturnStatus);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static Header ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static Header ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static Header ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static Header ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static Header ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static Header ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Header ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static Header ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static Header ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static Header ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(Header prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<Header, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {}
Header result = new Header();
protected override Header MessageBeingBuilt {
get { return result; }
}
public override Builder Clear() {
result = new Header();
return this;
}
public override Builder Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::Sirikata.Protocol._PBJ_Internal.Header.Descriptor; }
}
public override Header DefaultInstanceForType {
get { return global::Sirikata.Protocol._PBJ_Internal.Header.DefaultInstance; }
}
public override Header BuildPartial() {
if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder");
}
Header returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is Header) {
return MergeFrom((Header) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(Header other) {
if (other == global::Sirikata.Protocol._PBJ_Internal.Header.DefaultInstance) return this;
if (other.HasSourceObject) {
SourceObject = other.SourceObject;
}
if (other.HasSourcePort) {
SourcePort = other.SourcePort;
}
if (other.HasSourceSpace) {
SourceSpace = other.SourceSpace;
}
if (other.HasDestinationObject) {
DestinationObject = other.DestinationObject;
}
if (other.HasDestinationPort) {
DestinationPort = other.DestinationPort;
}
if (other.HasDestinationSpace) {
DestinationSpace = other.DestinationSpace;
}
if (other.HasId) {
Id = other.Id;
}
if (other.HasReplyId) {
ReplyId = other.ReplyId;
}
if (other.HasReturnStatus) {
ReturnStatus = other.ReturnStatus;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0: {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break;
}
case 10: {
SourceObject = input.ReadBytes();
break;
}
case 18: {
DestinationObject = input.ReadBytes();
break;
}
case 24: {
SourcePort = input.ReadUInt32();
break;
}
case 32: {
DestinationPort = input.ReadUInt32();
break;
}
case 56: {
Id = input.ReadInt64();
break;
}
case 64: {
ReplyId = input.ReadInt64();
break;
}
case 12290: {
SourceSpace = input.ReadBytes();
break;
}
case 12298: {
DestinationSpace = input.ReadBytes();
break;
}
case 14336: {
int rawValue = input.ReadEnum();
if (!global::System.Enum.IsDefined(typeof(global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus), rawValue)) {
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
unknownFields.MergeVarintField(1792, (ulong) rawValue);
} else {
ReturnStatus = (global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus) rawValue;
}
break;
}
}
}
}
public bool HasSourceObject {
get { return result.HasSourceObject; }
}
public pb::ByteString SourceObject {
get { return result.SourceObject; }
set { SetSourceObject(value); }
}
public Builder SetSourceObject(pb::ByteString value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasSourceObject = true;
result.sourceObject_ = value;
return this;
}
public Builder ClearSourceObject() {
result.hasSourceObject = false;
result.sourceObject_ = pb::ByteString.Empty;
return this;
}
public bool HasSourcePort {
get { return result.HasSourcePort; }
}
[global::System.CLSCompliant(false)]
public uint SourcePort {
get { return result.SourcePort; }
set { SetSourcePort(value); }
}
[global::System.CLSCompliant(false)]
public Builder SetSourcePort(uint value) {
result.hasSourcePort = true;
result.sourcePort_ = value;
return this;
}
public Builder ClearSourcePort() {
result.hasSourcePort = false;
result.sourcePort_ = 0;
return this;
}
public bool HasSourceSpace {
get { return result.HasSourceSpace; }
}
public pb::ByteString SourceSpace {
get { return result.SourceSpace; }
set { SetSourceSpace(value); }
}
public Builder SetSourceSpace(pb::ByteString value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasSourceSpace = true;
result.sourceSpace_ = value;
return this;
}
public Builder ClearSourceSpace() {
result.hasSourceSpace = false;
result.sourceSpace_ = pb::ByteString.Empty;
return this;
}
public bool HasDestinationObject {
get { return result.HasDestinationObject; }
}
public pb::ByteString DestinationObject {
get { return result.DestinationObject; }
set { SetDestinationObject(value); }
}
public Builder SetDestinationObject(pb::ByteString value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasDestinationObject = true;
result.destinationObject_ = value;
return this;
}
public Builder ClearDestinationObject() {
result.hasDestinationObject = false;
result.destinationObject_ = pb::ByteString.Empty;
return this;
}
public bool HasDestinationPort {
get { return result.HasDestinationPort; }
}
[global::System.CLSCompliant(false)]
public uint DestinationPort {
get { return result.DestinationPort; }
set { SetDestinationPort(value); }
}
[global::System.CLSCompliant(false)]
public Builder SetDestinationPort(uint value) {
result.hasDestinationPort = true;
result.destinationPort_ = value;
return this;
}
public Builder ClearDestinationPort() {
result.hasDestinationPort = false;
result.destinationPort_ = 0;
return this;
}
public bool HasDestinationSpace {
get { return result.HasDestinationSpace; }
}
public pb::ByteString DestinationSpace {
get { return result.DestinationSpace; }
set { SetDestinationSpace(value); }
}
public Builder SetDestinationSpace(pb::ByteString value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasDestinationSpace = true;
result.destinationSpace_ = value;
return this;
}
public Builder ClearDestinationSpace() {
result.hasDestinationSpace = false;
result.destinationSpace_ = pb::ByteString.Empty;
return this;
}
public bool HasId {
get { return result.HasId; }
}
public long Id {
get { return result.Id; }
set { SetId(value); }
}
public Builder SetId(long value) {
result.hasId = true;
result.id_ = value;
return this;
}
public Builder ClearId() {
result.hasId = false;
result.id_ = 0L;
return this;
}
public bool HasReplyId {
get { return result.HasReplyId; }
}
public long ReplyId {
get { return result.ReplyId; }
set { SetReplyId(value); }
}
public Builder SetReplyId(long value) {
result.hasReplyId = true;
result.replyId_ = value;
return this;
}
public Builder ClearReplyId() {
result.hasReplyId = false;
result.replyId_ = 0L;
return this;
}
public bool HasReturnStatus {
get { return result.HasReturnStatus; }
}
public global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus ReturnStatus {
get { return result.ReturnStatus; }
set { SetReturnStatus(value); }
}
public Builder SetReturnStatus(global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus value) {
result.hasReturnStatus = true;
result.returnStatus_ = value;
return this;
}
public Builder ClearReturnStatus() {
result.hasReturnStatus = false;
result.returnStatus_ = global::Sirikata.Protocol._PBJ_Internal.Header.Types.ReturnStatus.SUCCESS;
return this;
}
}
static Header() {
object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.MessageHeader.Descriptor, null);
}
}
#endregion
}

View File

@ -1,339 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using pbd = global::Google.ProtocolBuffers.Descriptors;
using pb = global::Google.ProtocolBuffers;
namespace Sirikata.Protocol {
public class Header : PBJ.IMessage {
protected _PBJ_Internal.Header super;
public _PBJ_Internal.Header _PBJSuper{ get { return super;} }
public Header() {
super=new _PBJ_Internal.Header();
}
public Header(_PBJ_Internal.Header reference) {
super=reference;
}
public static Header defaultInstance= new Header (_PBJ_Internal.Header.DefaultInstance);
public static Header DefaultInstance{
get {return defaultInstance;}
}
public static pbd.MessageDescriptor Descriptor {
get { return _PBJ_Internal.Header.Descriptor; } }
public static class Types {
public enum ReturnStatus {
SUCCESS=_PBJ_Internal.Header.Types.ReturnStatus.SUCCESS,
NETWORK_FAILURE=_PBJ_Internal.Header.Types.ReturnStatus.NETWORK_FAILURE,
TIMEOUT_FAILURE=_PBJ_Internal.Header.Types.ReturnStatus.TIMEOUT_FAILURE,
PROTOCOL_ERROR=_PBJ_Internal.Header.Types.ReturnStatus.PROTOCOL_ERROR,
PORT_FAILURE=_PBJ_Internal.Header.Types.ReturnStatus.PORT_FAILURE,
UNKNOWN_OBJECT=_PBJ_Internal.Header.Types.ReturnStatus.UNKNOWN_OBJECT
};
}
public static bool WithinReservedFieldTagRange(int field_tag) {
return false||(field_tag>=1&&field_tag<=8)||(field_tag>=1536&&field_tag<=2560)||(field_tag>=229376&&field_tag<=294912);
}
public static bool WithinExtensionFieldTagRange(int field_tag) {
return false;
}
public const int SourceObjectFieldTag=1;
public bool HasSourceObject{ get {return super.HasSourceObject&&PBJ._PBJ.ValidateUuid(super.SourceObject);} }
public PBJ.UUID SourceObject{ get {
if (HasSourceObject) {
return PBJ._PBJ.CastUuid(super.SourceObject);
} else {
return PBJ._PBJ.CastUuid();
}
}
}
public const int SourcePortFieldTag=3;
public bool HasSourcePort{ get {return super.HasSourcePort&&PBJ._PBJ.ValidateUint32(super.SourcePort);} }
public uint SourcePort{ get {
if (HasSourcePort) {
return PBJ._PBJ.CastUint32(super.SourcePort);
} else {
return PBJ._PBJ.CastUint32();
}
}
}
public const int SourceSpaceFieldTag=1536;
public bool HasSourceSpace{ get {return super.HasSourceSpace&&PBJ._PBJ.ValidateUuid(super.SourceSpace);} }
public PBJ.UUID SourceSpace{ get {
if (HasSourceSpace) {
return PBJ._PBJ.CastUuid(super.SourceSpace);
} else {
return PBJ._PBJ.CastUuid();
}
}
}
public const int DestinationObjectFieldTag=2;
public bool HasDestinationObject{ get {return super.HasDestinationObject&&PBJ._PBJ.ValidateUuid(super.DestinationObject);} }
public PBJ.UUID DestinationObject{ get {
if (HasDestinationObject) {
return PBJ._PBJ.CastUuid(super.DestinationObject);
} else {
return PBJ._PBJ.CastUuid();
}
}
}
public const int DestinationPortFieldTag=4;
public bool HasDestinationPort{ get {return super.HasDestinationPort&&PBJ._PBJ.ValidateUint32(super.DestinationPort);} }
public uint DestinationPort{ get {
if (HasDestinationPort) {
return PBJ._PBJ.CastUint32(super.DestinationPort);
} else {
return PBJ._PBJ.CastUint32();
}
}
}
public const int DestinationSpaceFieldTag=1537;
public bool HasDestinationSpace{ get {return super.HasDestinationSpace&&PBJ._PBJ.ValidateUuid(super.DestinationSpace);} }
public PBJ.UUID DestinationSpace{ get {
if (HasDestinationSpace) {
return PBJ._PBJ.CastUuid(super.DestinationSpace);
} else {
return PBJ._PBJ.CastUuid();
}
}
}
public const int IdFieldTag=7;
public bool HasId{ get {return super.HasId&&PBJ._PBJ.ValidateInt64(super.Id);} }
public long Id{ get {
if (HasId) {
return PBJ._PBJ.CastInt64(super.Id);
} else {
return PBJ._PBJ.CastInt64();
}
}
}
public const int ReplyIdFieldTag=8;
public bool HasReplyId{ get {return super.HasReplyId&&PBJ._PBJ.ValidateInt64(super.ReplyId);} }
public long ReplyId{ get {
if (HasReplyId) {
return PBJ._PBJ.CastInt64(super.ReplyId);
} else {
return PBJ._PBJ.CastInt64();
}
}
}
public const int ReturnStatusFieldTag=1792;
public bool HasReturnStatus{ get {return super.HasReturnStatus;} }
public Types.ReturnStatus ReturnStatus{ get {
if (HasReturnStatus) {
return (Types.ReturnStatus)super.ReturnStatus;
} else {
return new Types.ReturnStatus();
}
}
}
public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder() { return new Builder(); }
public static Builder CreateBuilder(Header prototype) {
return (Builder)new Builder().MergeFrom(prototype);
}
public static Header ParseFrom(pb::ByteString data) {
return new Header(_PBJ_Internal.Header.ParseFrom(data));
}
public static Header ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
return new Header(_PBJ_Internal.Header.ParseFrom(data,er));
}
public static Header ParseFrom(byte[] data) {
return new Header(_PBJ_Internal.Header.ParseFrom(data));
}
public static Header ParseFrom(byte[] data, pb::ExtensionRegistry er) {
return new Header(_PBJ_Internal.Header.ParseFrom(data,er));
}
public static Header ParseFrom(global::System.IO.Stream data) {
return new Header(_PBJ_Internal.Header.ParseFrom(data));
}
public static Header ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
return new Header(_PBJ_Internal.Header.ParseFrom(data,er));
}
public static Header ParseFrom(pb::CodedInputStream data) {
return new Header(_PBJ_Internal.Header.ParseFrom(data));
}
public static Header ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
return new Header(_PBJ_Internal.Header.ParseFrom(data,er));
}
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
public class Builder : global::PBJ.IMessage.IBuilder{
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
protected _PBJ_Internal.Header.Builder super;
public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
public _PBJ_Internal.Header.Builder _PBJSuper{ get { return super;} }
public Builder() {super = new _PBJ_Internal.Header.Builder();}
public Builder(_PBJ_Internal.Header.Builder other) {
super=other;
}
public Builder Clone() {return new Builder(super.Clone());}
public Builder MergeFrom(Header prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
public Builder Clear() {super.Clear();return this;}
public Header BuildPartial() {return new Header(super.BuildPartial());}
public Header Build() {if (_HasAllPBJFields) return new Header(super.Build());return null;}
public pbd::MessageDescriptor DescriptorForType {
get { return Header.Descriptor; } }
public Builder ClearSourceObject() { super.ClearSourceObject();return this;}
public const int SourceObjectFieldTag=1;
public bool HasSourceObject{ get {return super.HasSourceObject&&PBJ._PBJ.ValidateUuid(super.SourceObject);} }
public PBJ.UUID SourceObject{ get {
if (HasSourceObject) {
return PBJ._PBJ.CastUuid(super.SourceObject);
} else {
return PBJ._PBJ.CastUuid();
}
}
set {
super.SourceObject=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearSourcePort() { super.ClearSourcePort();return this;}
public const int SourcePortFieldTag=3;
public bool HasSourcePort{ get {return super.HasSourcePort&&PBJ._PBJ.ValidateUint32(super.SourcePort);} }
public uint SourcePort{ get {
if (HasSourcePort) {
return PBJ._PBJ.CastUint32(super.SourcePort);
} else {
return PBJ._PBJ.CastUint32();
}
}
set {
super.SourcePort=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearSourceSpace() { super.ClearSourceSpace();return this;}
public const int SourceSpaceFieldTag=1536;
public bool HasSourceSpace{ get {return super.HasSourceSpace&&PBJ._PBJ.ValidateUuid(super.SourceSpace);} }
public PBJ.UUID SourceSpace{ get {
if (HasSourceSpace) {
return PBJ._PBJ.CastUuid(super.SourceSpace);
} else {
return PBJ._PBJ.CastUuid();
}
}
set {
super.SourceSpace=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearDestinationObject() { super.ClearDestinationObject();return this;}
public const int DestinationObjectFieldTag=2;
public bool HasDestinationObject{ get {return super.HasDestinationObject&&PBJ._PBJ.ValidateUuid(super.DestinationObject);} }
public PBJ.UUID DestinationObject{ get {
if (HasDestinationObject) {
return PBJ._PBJ.CastUuid(super.DestinationObject);
} else {
return PBJ._PBJ.CastUuid();
}
}
set {
super.DestinationObject=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearDestinationPort() { super.ClearDestinationPort();return this;}
public const int DestinationPortFieldTag=4;
public bool HasDestinationPort{ get {return super.HasDestinationPort&&PBJ._PBJ.ValidateUint32(super.DestinationPort);} }
public uint DestinationPort{ get {
if (HasDestinationPort) {
return PBJ._PBJ.CastUint32(super.DestinationPort);
} else {
return PBJ._PBJ.CastUint32();
}
}
set {
super.DestinationPort=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearDestinationSpace() { super.ClearDestinationSpace();return this;}
public const int DestinationSpaceFieldTag=1537;
public bool HasDestinationSpace{ get {return super.HasDestinationSpace&&PBJ._PBJ.ValidateUuid(super.DestinationSpace);} }
public PBJ.UUID DestinationSpace{ get {
if (HasDestinationSpace) {
return PBJ._PBJ.CastUuid(super.DestinationSpace);
} else {
return PBJ._PBJ.CastUuid();
}
}
set {
super.DestinationSpace=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearId() { super.ClearId();return this;}
public const int IdFieldTag=7;
public bool HasId{ get {return super.HasId&&PBJ._PBJ.ValidateInt64(super.Id);} }
public long Id{ get {
if (HasId) {
return PBJ._PBJ.CastInt64(super.Id);
} else {
return PBJ._PBJ.CastInt64();
}
}
set {
super.Id=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearReplyId() { super.ClearReplyId();return this;}
public const int ReplyIdFieldTag=8;
public bool HasReplyId{ get {return super.HasReplyId&&PBJ._PBJ.ValidateInt64(super.ReplyId);} }
public long ReplyId{ get {
if (HasReplyId) {
return PBJ._PBJ.CastInt64(super.ReplyId);
} else {
return PBJ._PBJ.CastInt64();
}
}
set {
super.ReplyId=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearReturnStatus() { super.ClearReturnStatus();return this;}
public const int ReturnStatusFieldTag=1792;
public bool HasReturnStatus{ get {return super.HasReturnStatus;} }
public Types.ReturnStatus ReturnStatus{ get {
if (HasReturnStatus) {
return (Types.ReturnStatus)super.ReturnStatus;
} else {
return new Types.ReturnStatus();
}
}
set {
super.ReturnStatus=((_PBJ_Internal.Header.Types.ReturnStatus)value);
}
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,840 +0,0 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
namespace Sirikata.Physics.Protocol._PBJ_Internal {
public static partial class Physics {
#region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
}
#endregion
#region Static variables
internal static pbd::MessageDescriptor internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin, global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.Builder> internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd, global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.Builder> internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__FieldAccessorTable;
#endregion
#region Descriptor
public static pbd::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbd::FileDescriptor descriptor;
static Physics() {
byte[] descriptorData = global::System.Convert.FromBase64String(
"Cg1QaHlzaWNzLnByb3RvEidTaXJpa2F0YS5QaHlzaWNzLlByb3RvY29sLl9Q" +
"QkpfSW50ZXJuYWwiqAEKDkNvbGxpc2lvbkJlZ2luEhEKCXRpbWVzdGFtcBgC" +
"IAEoBhIZCg10aGlzX3Bvc2l0aW9uGAMgAygBQgIQARIaCg5vdGhlcl9wb3Np" +
"dGlvbhgEIAMoAUICEAESFwoLdGhpc19ub3JtYWwYBSADKAJCAhABEhMKB2lt" +
"cHVsc2UYBiADKAJCAhABEh4KFm90aGVyX29iamVjdF9yZWZlcmVuY2UYByAB" +
"KAwiQQoMQ29sbGlzaW9uRW5kEhEKCXRpbWVzdGFtcBgCIAEoBhIeChZvdGhl" +
"cl9vYmplY3RfcmVmZXJlbmNlGAYgASgM");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root;
internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__Descriptor = Descriptor.MessageTypes[0];
internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin, global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.Builder>(internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__Descriptor,
new string[] { "Timestamp", "ThisPosition", "OtherPosition", "ThisNormal", "Impulse", "OtherObjectReference", });
internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__Descriptor = Descriptor.MessageTypes[1];
internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd, global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.Builder>(internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__Descriptor,
new string[] { "Timestamp", "OtherObjectReference", });
return null;
};
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] {
}, assigner);
}
#endregion
}
#region Messages
public sealed partial class CollisionBegin : pb::GeneratedMessage<CollisionBegin, CollisionBegin.Builder> {
private static readonly CollisionBegin defaultInstance = new Builder().BuildPartial();
public static CollisionBegin DefaultInstance {
get { return defaultInstance; }
}
public override CollisionBegin DefaultInstanceForType {
get { return defaultInstance; }
}
protected override CollisionBegin ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<CollisionBegin, CollisionBegin.Builder> InternalFieldAccessors {
get { return global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionBegin__FieldAccessorTable; }
}
public const int TimestampFieldNumber = 2;
private bool hasTimestamp;
private ulong timestamp_ = 0;
public bool HasTimestamp {
get { return hasTimestamp; }
}
[global::System.CLSCompliant(false)]
public ulong Timestamp {
get { return timestamp_; }
}
public const int ThisPositionFieldNumber = 3;
private int thisPositionMemoizedSerializedSize;
private pbc::PopsicleList<double> thisPosition_ = new pbc::PopsicleList<double>();
public scg::IList<double> ThisPositionList {
get { return pbc::Lists.AsReadOnly(thisPosition_); }
}
public int ThisPositionCount {
get { return thisPosition_.Count; }
}
public double GetThisPosition(int index) {
return thisPosition_[index];
}
public const int OtherPositionFieldNumber = 4;
private int otherPositionMemoizedSerializedSize;
private pbc::PopsicleList<double> otherPosition_ = new pbc::PopsicleList<double>();
public scg::IList<double> OtherPositionList {
get { return pbc::Lists.AsReadOnly(otherPosition_); }
}
public int OtherPositionCount {
get { return otherPosition_.Count; }
}
public double GetOtherPosition(int index) {
return otherPosition_[index];
}
public const int ThisNormalFieldNumber = 5;
private int thisNormalMemoizedSerializedSize;
private pbc::PopsicleList<float> thisNormal_ = new pbc::PopsicleList<float>();
public scg::IList<float> ThisNormalList {
get { return pbc::Lists.AsReadOnly(thisNormal_); }
}
public int ThisNormalCount {
get { return thisNormal_.Count; }
}
public float GetThisNormal(int index) {
return thisNormal_[index];
}
public const int ImpulseFieldNumber = 6;
private int impulseMemoizedSerializedSize;
private pbc::PopsicleList<float> impulse_ = new pbc::PopsicleList<float>();
public scg::IList<float> ImpulseList {
get { return pbc::Lists.AsReadOnly(impulse_); }
}
public int ImpulseCount {
get { return impulse_.Count; }
}
public float GetImpulse(int index) {
return impulse_[index];
}
public const int OtherObjectReferenceFieldNumber = 7;
private bool hasOtherObjectReference;
private pb::ByteString otherObjectReference_ = pb::ByteString.Empty;
public bool HasOtherObjectReference {
get { return hasOtherObjectReference; }
}
public pb::ByteString OtherObjectReference {
get { return otherObjectReference_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasTimestamp) {
output.WriteFixed64(2, Timestamp);
}
if (thisPosition_.Count > 0) {
output.WriteRawVarint32(26);
output.WriteRawVarint32((uint) thisPositionMemoizedSerializedSize);
foreach (double element in thisPosition_) {
output.WriteDoubleNoTag(element);
}
}
if (otherPosition_.Count > 0) {
output.WriteRawVarint32(34);
output.WriteRawVarint32((uint) otherPositionMemoizedSerializedSize);
foreach (double element in otherPosition_) {
output.WriteDoubleNoTag(element);
}
}
if (thisNormal_.Count > 0) {
output.WriteRawVarint32(42);
output.WriteRawVarint32((uint) thisNormalMemoizedSerializedSize);
foreach (float element in thisNormal_) {
output.WriteFloatNoTag(element);
}
}
if (impulse_.Count > 0) {
output.WriteRawVarint32(50);
output.WriteRawVarint32((uint) impulseMemoizedSerializedSize);
foreach (float element in impulse_) {
output.WriteFloatNoTag(element);
}
}
if (HasOtherObjectReference) {
output.WriteBytes(7, OtherObjectReference);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasTimestamp) {
size += pb::CodedOutputStream.ComputeFixed64Size(2, Timestamp);
}
{
int dataSize = 0;
dataSize = 8 * thisPosition_.Count;
size += dataSize;
if (thisPosition_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
thisPositionMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 8 * otherPosition_.Count;
size += dataSize;
if (otherPosition_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
otherPositionMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 4 * thisNormal_.Count;
size += dataSize;
if (thisNormal_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
thisNormalMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
dataSize = 4 * impulse_.Count;
size += dataSize;
if (impulse_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize);
impulseMemoizedSerializedSize = dataSize;
}
if (HasOtherObjectReference) {
size += pb::CodedOutputStream.ComputeBytesSize(7, OtherObjectReference);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static CollisionBegin ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static CollisionBegin ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static CollisionBegin ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static CollisionBegin ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static CollisionBegin ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static CollisionBegin ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static CollisionBegin ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static CollisionBegin ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static CollisionBegin ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static CollisionBegin ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(CollisionBegin prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<CollisionBegin, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {}
CollisionBegin result = new CollisionBegin();
protected override CollisionBegin MessageBeingBuilt {
get { return result; }
}
public override Builder Clear() {
result = new CollisionBegin();
return this;
}
public override Builder Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.Descriptor; }
}
public override CollisionBegin DefaultInstanceForType {
get { return global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.DefaultInstance; }
}
public override CollisionBegin BuildPartial() {
if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder");
}
result.thisPosition_.MakeReadOnly();
result.otherPosition_.MakeReadOnly();
result.thisNormal_.MakeReadOnly();
result.impulse_.MakeReadOnly();
CollisionBegin returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is CollisionBegin) {
return MergeFrom((CollisionBegin) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(CollisionBegin other) {
if (other == global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionBegin.DefaultInstance) return this;
if (other.HasTimestamp) {
Timestamp = other.Timestamp;
}
if (other.thisPosition_.Count != 0) {
base.AddRange(other.thisPosition_, result.thisPosition_);
}
if (other.otherPosition_.Count != 0) {
base.AddRange(other.otherPosition_, result.otherPosition_);
}
if (other.thisNormal_.Count != 0) {
base.AddRange(other.thisNormal_, result.thisNormal_);
}
if (other.impulse_.Count != 0) {
base.AddRange(other.impulse_, result.impulse_);
}
if (other.HasOtherObjectReference) {
OtherObjectReference = other.OtherObjectReference;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0: {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break;
}
case 17: {
Timestamp = input.ReadFixed64();
break;
}
case 26: {
int length = input.ReadInt32();
int limit = input.PushLimit(length);
while (!input.ReachedLimit) {
AddThisPosition(input.ReadDouble());
}
input.PopLimit(limit);
break;
}
case 34: {
int length = input.ReadInt32();
int limit = input.PushLimit(length);
while (!input.ReachedLimit) {
AddOtherPosition(input.ReadDouble());
}
input.PopLimit(limit);
break;
}
case 42: {
int length = input.ReadInt32();
int limit = input.PushLimit(length);
while (!input.ReachedLimit) {
AddThisNormal(input.ReadFloat());
}
input.PopLimit(limit);
break;
}
case 50: {
int length = input.ReadInt32();
int limit = input.PushLimit(length);
while (!input.ReachedLimit) {
AddImpulse(input.ReadFloat());
}
input.PopLimit(limit);
break;
}
case 58: {
OtherObjectReference = input.ReadBytes();
break;
}
}
}
}
public bool HasTimestamp {
get { return result.HasTimestamp; }
}
[global::System.CLSCompliant(false)]
public ulong Timestamp {
get { return result.Timestamp; }
set { SetTimestamp(value); }
}
[global::System.CLSCompliant(false)]
public Builder SetTimestamp(ulong value) {
result.hasTimestamp = true;
result.timestamp_ = value;
return this;
}
public Builder ClearTimestamp() {
result.hasTimestamp = false;
result.timestamp_ = 0;
return this;
}
public pbc::IPopsicleList<double> ThisPositionList {
get { return result.thisPosition_; }
}
public int ThisPositionCount {
get { return result.ThisPositionCount; }
}
public double GetThisPosition(int index) {
return result.GetThisPosition(index);
}
public Builder SetThisPosition(int index, double value) {
result.thisPosition_[index] = value;
return this;
}
public Builder AddThisPosition(double value) {
result.thisPosition_.Add(value);
return this;
}
public Builder AddRangeThisPosition(scg::IEnumerable<double> values) {
base.AddRange(values, result.thisPosition_);
return this;
}
public Builder ClearThisPosition() {
result.thisPosition_.Clear();
return this;
}
public pbc::IPopsicleList<double> OtherPositionList {
get { return result.otherPosition_; }
}
public int OtherPositionCount {
get { return result.OtherPositionCount; }
}
public double GetOtherPosition(int index) {
return result.GetOtherPosition(index);
}
public Builder SetOtherPosition(int index, double value) {
result.otherPosition_[index] = value;
return this;
}
public Builder AddOtherPosition(double value) {
result.otherPosition_.Add(value);
return this;
}
public Builder AddRangeOtherPosition(scg::IEnumerable<double> values) {
base.AddRange(values, result.otherPosition_);
return this;
}
public Builder ClearOtherPosition() {
result.otherPosition_.Clear();
return this;
}
public pbc::IPopsicleList<float> ThisNormalList {
get { return result.thisNormal_; }
}
public int ThisNormalCount {
get { return result.ThisNormalCount; }
}
public float GetThisNormal(int index) {
return result.GetThisNormal(index);
}
public Builder SetThisNormal(int index, float value) {
result.thisNormal_[index] = value;
return this;
}
public Builder AddThisNormal(float value) {
result.thisNormal_.Add(value);
return this;
}
public Builder AddRangeThisNormal(scg::IEnumerable<float> values) {
base.AddRange(values, result.thisNormal_);
return this;
}
public Builder ClearThisNormal() {
result.thisNormal_.Clear();
return this;
}
public pbc::IPopsicleList<float> ImpulseList {
get { return result.impulse_; }
}
public int ImpulseCount {
get { return result.ImpulseCount; }
}
public float GetImpulse(int index) {
return result.GetImpulse(index);
}
public Builder SetImpulse(int index, float value) {
result.impulse_[index] = value;
return this;
}
public Builder AddImpulse(float value) {
result.impulse_.Add(value);
return this;
}
public Builder AddRangeImpulse(scg::IEnumerable<float> values) {
base.AddRange(values, result.impulse_);
return this;
}
public Builder ClearImpulse() {
result.impulse_.Clear();
return this;
}
public bool HasOtherObjectReference {
get { return result.HasOtherObjectReference; }
}
public pb::ByteString OtherObjectReference {
get { return result.OtherObjectReference; }
set { SetOtherObjectReference(value); }
}
public Builder SetOtherObjectReference(pb::ByteString value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasOtherObjectReference = true;
result.otherObjectReference_ = value;
return this;
}
public Builder ClearOtherObjectReference() {
result.hasOtherObjectReference = false;
result.otherObjectReference_ = pb::ByteString.Empty;
return this;
}
}
static CollisionBegin() {
object.ReferenceEquals(global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.Descriptor, null);
}
}
public sealed partial class CollisionEnd : pb::GeneratedMessage<CollisionEnd, CollisionEnd.Builder> {
private static readonly CollisionEnd defaultInstance = new Builder().BuildPartial();
public static CollisionEnd DefaultInstance {
get { return defaultInstance; }
}
public override CollisionEnd DefaultInstanceForType {
get { return defaultInstance; }
}
protected override CollisionEnd ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<CollisionEnd, CollisionEnd.Builder> InternalFieldAccessors {
get { return global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.internal__static_Sirikata_Physics_Protocol__PBJ_Internal_CollisionEnd__FieldAccessorTable; }
}
public const int TimestampFieldNumber = 2;
private bool hasTimestamp;
private ulong timestamp_ = 0;
public bool HasTimestamp {
get { return hasTimestamp; }
}
[global::System.CLSCompliant(false)]
public ulong Timestamp {
get { return timestamp_; }
}
public const int OtherObjectReferenceFieldNumber = 6;
private bool hasOtherObjectReference;
private pb::ByteString otherObjectReference_ = pb::ByteString.Empty;
public bool HasOtherObjectReference {
get { return hasOtherObjectReference; }
}
public pb::ByteString OtherObjectReference {
get { return otherObjectReference_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasTimestamp) {
output.WriteFixed64(2, Timestamp);
}
if (HasOtherObjectReference) {
output.WriteBytes(6, OtherObjectReference);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasTimestamp) {
size += pb::CodedOutputStream.ComputeFixed64Size(2, Timestamp);
}
if (HasOtherObjectReference) {
size += pb::CodedOutputStream.ComputeBytesSize(6, OtherObjectReference);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static CollisionEnd ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static CollisionEnd ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static CollisionEnd ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static CollisionEnd ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static CollisionEnd ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static CollisionEnd ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static CollisionEnd ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static CollisionEnd ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static CollisionEnd ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static CollisionEnd ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(CollisionEnd prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<CollisionEnd, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {}
CollisionEnd result = new CollisionEnd();
protected override CollisionEnd MessageBeingBuilt {
get { return result; }
}
public override Builder Clear() {
result = new CollisionEnd();
return this;
}
public override Builder Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.Descriptor; }
}
public override CollisionEnd DefaultInstanceForType {
get { return global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.DefaultInstance; }
}
public override CollisionEnd BuildPartial() {
if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder");
}
CollisionEnd returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is CollisionEnd) {
return MergeFrom((CollisionEnd) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(CollisionEnd other) {
if (other == global::Sirikata.Physics.Protocol._PBJ_Internal.CollisionEnd.DefaultInstance) return this;
if (other.HasTimestamp) {
Timestamp = other.Timestamp;
}
if (other.HasOtherObjectReference) {
OtherObjectReference = other.OtherObjectReference;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0: {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break;
}
case 17: {
Timestamp = input.ReadFixed64();
break;
}
case 50: {
OtherObjectReference = input.ReadBytes();
break;
}
}
}
}
public bool HasTimestamp {
get { return result.HasTimestamp; }
}
[global::System.CLSCompliant(false)]
public ulong Timestamp {
get { return result.Timestamp; }
set { SetTimestamp(value); }
}
[global::System.CLSCompliant(false)]
public Builder SetTimestamp(ulong value) {
result.hasTimestamp = true;
result.timestamp_ = value;
return this;
}
public Builder ClearTimestamp() {
result.hasTimestamp = false;
result.timestamp_ = 0;
return this;
}
public bool HasOtherObjectReference {
get { return result.HasOtherObjectReference; }
}
public pb::ByteString OtherObjectReference {
get { return result.OtherObjectReference; }
set { SetOtherObjectReference(value); }
}
public Builder SetOtherObjectReference(pb::ByteString value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasOtherObjectReference = true;
result.otherObjectReference_ = value;
return this;
}
public Builder ClearOtherObjectReference() {
result.hasOtherObjectReference = false;
result.otherObjectReference_ = pb::ByteString.Empty;
return this;
}
}
static CollisionEnd() {
object.ReferenceEquals(global::Sirikata.Physics.Protocol._PBJ_Internal.Physics.Descriptor, null);
}
}
#endregion
}

View File

@ -1,421 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using pbd = global::Google.ProtocolBuffers.Descriptors;
using pb = global::Google.ProtocolBuffers;
namespace Sirikata.Physics.Protocol {
public class CollisionBegin : PBJ.IMessage {
protected _PBJ_Internal.CollisionBegin super;
public _PBJ_Internal.CollisionBegin _PBJSuper{ get { return super;} }
public CollisionBegin() {
super=new _PBJ_Internal.CollisionBegin();
}
public CollisionBegin(_PBJ_Internal.CollisionBegin reference) {
super=reference;
}
public static CollisionBegin defaultInstance= new CollisionBegin (_PBJ_Internal.CollisionBegin.DefaultInstance);
public static CollisionBegin DefaultInstance{
get {return defaultInstance;}
}
public static pbd.MessageDescriptor Descriptor {
get { return _PBJ_Internal.CollisionBegin.Descriptor; } }
public static class Types {
}
public static bool WithinReservedFieldTagRange(int field_tag) {
return false;
}
public static bool WithinExtensionFieldTagRange(int field_tag) {
return false;
}
public const int TimestampFieldTag=2;
public bool HasTimestamp{ get {return super.HasTimestamp&&PBJ._PBJ.ValidateTime(super.Timestamp);} }
public PBJ.Time Timestamp{ get {
if (HasTimestamp) {
return PBJ._PBJ.CastTime(super.Timestamp);
} else {
return PBJ._PBJ.CastTime();
}
}
}
public const int ThisPositionFieldTag=3;
public int ThisPositionCount { get { return super.ThisPositionCount/3;} }
public bool HasThisPosition(int index) { return true; }
public PBJ.Vector3d GetThisPosition(int index) {
if (HasThisPosition(index)) {
return PBJ._PBJ.CastVector3d(super.GetThisPosition(index*3+0),super.GetThisPosition(index*3+1),super.GetThisPosition(index*3+2));
} else {
return PBJ._PBJ.CastVector3d();
}
}
public const int OtherPositionFieldTag=4;
public int OtherPositionCount { get { return super.OtherPositionCount/3;} }
public bool HasOtherPosition(int index) { return true; }
public PBJ.Vector3d GetOtherPosition(int index) {
if (HasOtherPosition(index)) {
return PBJ._PBJ.CastVector3d(super.GetOtherPosition(index*3+0),super.GetOtherPosition(index*3+1),super.GetOtherPosition(index*3+2));
} else {
return PBJ._PBJ.CastVector3d();
}
}
public const int ThisNormalFieldTag=5;
public int ThisNormalCount { get { return super.ThisNormalCount/2;} }
public bool HasThisNormal(int index) { return true; }
public PBJ.Vector3f GetThisNormal(int index) {
if (HasThisNormal(index)) {
return PBJ._PBJ.CastNormal(super.GetThisNormal(index*2+0),super.GetThisNormal(index*2+1));
} else {
return PBJ._PBJ.CastNormal();
}
}
public const int ImpulseFieldTag=6;
public int ImpulseCount { get { return super.ImpulseCount;} }
public bool HasImpulse(int index) {return PBJ._PBJ.ValidateFloat(super.GetImpulse(index));}
public float Impulse(int index) {
return (float)PBJ._PBJ.CastFloat(super.GetImpulse(index));
}
public const int OtherObjectReferenceFieldTag=7;
public bool HasOtherObjectReference{ get {return super.HasOtherObjectReference&&PBJ._PBJ.ValidateUuid(super.OtherObjectReference);} }
public PBJ.UUID OtherObjectReference{ get {
if (HasOtherObjectReference) {
return PBJ._PBJ.CastUuid(super.OtherObjectReference);
} else {
return PBJ._PBJ.CastUuid();
}
}
}
public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder() { return new Builder(); }
public static Builder CreateBuilder(CollisionBegin prototype) {
return (Builder)new Builder().MergeFrom(prototype);
}
public static CollisionBegin ParseFrom(pb::ByteString data) {
return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data));
}
public static CollisionBegin ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data,er));
}
public static CollisionBegin ParseFrom(byte[] data) {
return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data));
}
public static CollisionBegin ParseFrom(byte[] data, pb::ExtensionRegistry er) {
return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data,er));
}
public static CollisionBegin ParseFrom(global::System.IO.Stream data) {
return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data));
}
public static CollisionBegin ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data,er));
}
public static CollisionBegin ParseFrom(pb::CodedInputStream data) {
return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data));
}
public static CollisionBegin ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
return new CollisionBegin(_PBJ_Internal.CollisionBegin.ParseFrom(data,er));
}
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
public class Builder : global::PBJ.IMessage.IBuilder{
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
protected _PBJ_Internal.CollisionBegin.Builder super;
public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
public _PBJ_Internal.CollisionBegin.Builder _PBJSuper{ get { return super;} }
public Builder() {super = new _PBJ_Internal.CollisionBegin.Builder();}
public Builder(_PBJ_Internal.CollisionBegin.Builder other) {
super=other;
}
public Builder Clone() {return new Builder(super.Clone());}
public Builder MergeFrom(CollisionBegin prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
public Builder Clear() {super.Clear();return this;}
public CollisionBegin BuildPartial() {return new CollisionBegin(super.BuildPartial());}
public CollisionBegin Build() {if (_HasAllPBJFields) return new CollisionBegin(super.Build());return null;}
public pbd::MessageDescriptor DescriptorForType {
get { return CollisionBegin.Descriptor; } }
public Builder ClearTimestamp() { super.ClearTimestamp();return this;}
public const int TimestampFieldTag=2;
public bool HasTimestamp{ get {return super.HasTimestamp&&PBJ._PBJ.ValidateTime(super.Timestamp);} }
public PBJ.Time Timestamp{ get {
if (HasTimestamp) {
return PBJ._PBJ.CastTime(super.Timestamp);
} else {
return PBJ._PBJ.CastTime();
}
}
set {
super.Timestamp=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearThisPosition() { super.ClearThisPosition();return this;}
public const int ThisPositionFieldTag=3;
public int ThisPositionCount { get { return super.ThisPositionCount/3;} }
public bool HasThisPosition(int index) { return true; }
public PBJ.Vector3d GetThisPosition(int index) {
if (HasThisPosition(index)) {
return PBJ._PBJ.CastVector3d(super.GetThisPosition(index*3+0),super.GetThisPosition(index*3+1),super.GetThisPosition(index*3+2));
} else {
return PBJ._PBJ.CastVector3d();
}
}
public Builder AddThisPosition(PBJ.Vector3d value) {
double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value);
super.AddThisPosition(_PBJtempArray[0]);
super.AddThisPosition(_PBJtempArray[1]);
super.AddThisPosition(_PBJtempArray[2]);
return this;
}
public Builder SetThisPosition(int index,PBJ.Vector3d value) {
double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value);
super.SetThisPosition(index*3+0,_PBJtempArray[0]);
super.SetThisPosition(index*3+1,_PBJtempArray[1]);
super.SetThisPosition(index*3+2,_PBJtempArray[2]);
return this;
}
public Builder ClearOtherPosition() { super.ClearOtherPosition();return this;}
public const int OtherPositionFieldTag=4;
public int OtherPositionCount { get { return super.OtherPositionCount/3;} }
public bool HasOtherPosition(int index) { return true; }
public PBJ.Vector3d GetOtherPosition(int index) {
if (HasOtherPosition(index)) {
return PBJ._PBJ.CastVector3d(super.GetOtherPosition(index*3+0),super.GetOtherPosition(index*3+1),super.GetOtherPosition(index*3+2));
} else {
return PBJ._PBJ.CastVector3d();
}
}
public Builder AddOtherPosition(PBJ.Vector3d value) {
double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value);
super.AddOtherPosition(_PBJtempArray[0]);
super.AddOtherPosition(_PBJtempArray[1]);
super.AddOtherPosition(_PBJtempArray[2]);
return this;
}
public Builder SetOtherPosition(int index,PBJ.Vector3d value) {
double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value);
super.SetOtherPosition(index*3+0,_PBJtempArray[0]);
super.SetOtherPosition(index*3+1,_PBJtempArray[1]);
super.SetOtherPosition(index*3+2,_PBJtempArray[2]);
return this;
}
public Builder ClearThisNormal() { super.ClearThisNormal();return this;}
public const int ThisNormalFieldTag=5;
public int ThisNormalCount { get { return super.ThisNormalCount/2;} }
public bool HasThisNormal(int index) { return true; }
public PBJ.Vector3f GetThisNormal(int index) {
if (HasThisNormal(index)) {
return PBJ._PBJ.CastNormal(super.GetThisNormal(index*2+0),super.GetThisNormal(index*2+1));
} else {
return PBJ._PBJ.CastNormal();
}
}
public Builder AddThisNormal(PBJ.Vector3f value) {
float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value);
super.AddThisNormal(_PBJtempArray[0]);
super.AddThisNormal(_PBJtempArray[1]);
return this;
}
public Builder SetThisNormal(int index,PBJ.Vector3f value) {
float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value);
super.SetThisNormal(index*2+0,_PBJtempArray[0]);
super.SetThisNormal(index*2+1,_PBJtempArray[1]);
return this;
}
public Builder ClearImpulse() { super.ClearImpulse();return this;}
public Builder SetImpulse(int index, float value) {
super.SetImpulse(index,PBJ._PBJ.Construct(value));
return this;
}
public const int ImpulseFieldTag=6;
public int ImpulseCount { get { return super.ImpulseCount;} }
public bool HasImpulse(int index) {return PBJ._PBJ.ValidateFloat(super.GetImpulse(index));}
public float Impulse(int index) {
return (float)PBJ._PBJ.CastFloat(super.GetImpulse(index));
}
public Builder AddImpulse(float value) {
super.AddImpulse(PBJ._PBJ.Construct(value));
return this;
}
public Builder ClearOtherObjectReference() { super.ClearOtherObjectReference();return this;}
public const int OtherObjectReferenceFieldTag=7;
public bool HasOtherObjectReference{ get {return super.HasOtherObjectReference&&PBJ._PBJ.ValidateUuid(super.OtherObjectReference);} }
public PBJ.UUID OtherObjectReference{ get {
if (HasOtherObjectReference) {
return PBJ._PBJ.CastUuid(super.OtherObjectReference);
} else {
return PBJ._PBJ.CastUuid();
}
}
set {
super.OtherObjectReference=(PBJ._PBJ.Construct(value));
}
}
}
}
}
namespace Sirikata.Physics.Protocol {
public class CollisionEnd : PBJ.IMessage {
protected _PBJ_Internal.CollisionEnd super;
public _PBJ_Internal.CollisionEnd _PBJSuper{ get { return super;} }
public CollisionEnd() {
super=new _PBJ_Internal.CollisionEnd();
}
public CollisionEnd(_PBJ_Internal.CollisionEnd reference) {
super=reference;
}
public static CollisionEnd defaultInstance= new CollisionEnd (_PBJ_Internal.CollisionEnd.DefaultInstance);
public static CollisionEnd DefaultInstance{
get {return defaultInstance;}
}
public static pbd.MessageDescriptor Descriptor {
get { return _PBJ_Internal.CollisionEnd.Descriptor; } }
public static class Types {
}
public static bool WithinReservedFieldTagRange(int field_tag) {
return false;
}
public static bool WithinExtensionFieldTagRange(int field_tag) {
return false;
}
public const int TimestampFieldTag=2;
public bool HasTimestamp{ get {return super.HasTimestamp&&PBJ._PBJ.ValidateTime(super.Timestamp);} }
public PBJ.Time Timestamp{ get {
if (HasTimestamp) {
return PBJ._PBJ.CastTime(super.Timestamp);
} else {
return PBJ._PBJ.CastTime();
}
}
}
public const int OtherObjectReferenceFieldTag=6;
public bool HasOtherObjectReference{ get {return super.HasOtherObjectReference&&PBJ._PBJ.ValidateUuid(super.OtherObjectReference);} }
public PBJ.UUID OtherObjectReference{ get {
if (HasOtherObjectReference) {
return PBJ._PBJ.CastUuid(super.OtherObjectReference);
} else {
return PBJ._PBJ.CastUuid();
}
}
}
public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder() { return new Builder(); }
public static Builder CreateBuilder(CollisionEnd prototype) {
return (Builder)new Builder().MergeFrom(prototype);
}
public static CollisionEnd ParseFrom(pb::ByteString data) {
return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data));
}
public static CollisionEnd ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data,er));
}
public static CollisionEnd ParseFrom(byte[] data) {
return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data));
}
public static CollisionEnd ParseFrom(byte[] data, pb::ExtensionRegistry er) {
return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data,er));
}
public static CollisionEnd ParseFrom(global::System.IO.Stream data) {
return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data));
}
public static CollisionEnd ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data,er));
}
public static CollisionEnd ParseFrom(pb::CodedInputStream data) {
return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data));
}
public static CollisionEnd ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
return new CollisionEnd(_PBJ_Internal.CollisionEnd.ParseFrom(data,er));
}
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
public class Builder : global::PBJ.IMessage.IBuilder{
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
protected _PBJ_Internal.CollisionEnd.Builder super;
public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
public _PBJ_Internal.CollisionEnd.Builder _PBJSuper{ get { return super;} }
public Builder() {super = new _PBJ_Internal.CollisionEnd.Builder();}
public Builder(_PBJ_Internal.CollisionEnd.Builder other) {
super=other;
}
public Builder Clone() {return new Builder(super.Clone());}
public Builder MergeFrom(CollisionEnd prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
public Builder Clear() {super.Clear();return this;}
public CollisionEnd BuildPartial() {return new CollisionEnd(super.BuildPartial());}
public CollisionEnd Build() {if (_HasAllPBJFields) return new CollisionEnd(super.Build());return null;}
public pbd::MessageDescriptor DescriptorForType {
get { return CollisionEnd.Descriptor; } }
public Builder ClearTimestamp() { super.ClearTimestamp();return this;}
public const int TimestampFieldTag=2;
public bool HasTimestamp{ get {return super.HasTimestamp&&PBJ._PBJ.ValidateTime(super.Timestamp);} }
public PBJ.Time Timestamp{ get {
if (HasTimestamp) {
return PBJ._PBJ.CastTime(super.Timestamp);
} else {
return PBJ._PBJ.CastTime();
}
}
set {
super.Timestamp=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearOtherObjectReference() { super.ClearOtherObjectReference();return this;}
public const int OtherObjectReferenceFieldTag=6;
public bool HasOtherObjectReference{ get {return super.HasOtherObjectReference&&PBJ._PBJ.ValidateUuid(super.OtherObjectReference);} }
public PBJ.UUID OtherObjectReference{ get {
if (HasOtherObjectReference) {
return PBJ._PBJ.CastUuid(super.OtherObjectReference);
} else {
return PBJ._PBJ.CastUuid();
}
}
set {
super.OtherObjectReference=(PBJ._PBJ.Construct(value));
}
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,856 +0,0 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
namespace Sirikata.Subscription.Protocol._PBJ_Internal {
public static partial class Subscription {
#region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
}
#endregion
#region Static variables
internal static pbd::MessageDescriptor internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Address, global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Builder> internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe, global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.Builder> internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__FieldAccessorTable;
internal static pbd::MessageDescriptor internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast, global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.Builder> internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__FieldAccessorTable;
#endregion
#region Descriptor
public static pbd::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbd::FileDescriptor descriptor;
static Subscription() {
byte[] descriptorData = global::System.Convert.FromBase64String(
"ChJTdWJzY3JpcHRpb24ucHJvdG8SLFNpcmlrYXRhLlN1YnNjcmlwdGlvbi5Q" +
"cm90b2NvbC5fUEJKX0ludGVybmFsIiwKB0FkZHJlc3MSEAoIaG9zdG5hbWUY" +
"ASABKAkSDwoHc2VydmljZRgCIAEoCSKMAQoJU3Vic2NyaWJlElAKEWJyb2Fk" +
"Y2FzdF9hZGRyZXNzGAcgASgLMjUuU2lyaWthdGEuU3Vic2NyaXB0aW9uLlBy" +
"b3RvY29sLl9QQkpfSW50ZXJuYWwuQWRkcmVzcxIWCg5icm9hZGNhc3RfbmFt" +
"ZRgIIAEoDBIVCg11cGRhdGVfcGVyaW9kGAkgASgQIiMKCUJyb2FkY2FzdBIW" +
"Cg5icm9hZGNhc3RfbmFtZRgHIAEoDA==");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root;
internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__Descriptor = Descriptor.MessageTypes[0];
internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Address, global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Builder>(internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__Descriptor,
new string[] { "Hostname", "Service", });
internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__Descriptor = Descriptor.MessageTypes[1];
internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe, global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.Builder>(internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__Descriptor,
new string[] { "BroadcastAddress", "BroadcastName", "UpdatePeriod", });
internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__Descriptor = Descriptor.MessageTypes[2];
internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast, global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.Builder>(internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__Descriptor,
new string[] { "BroadcastName", });
return null;
};
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] {
}, assigner);
}
#endregion
}
#region Messages
public sealed partial class Address : pb::GeneratedMessage<Address, Address.Builder> {
private static readonly Address defaultInstance = new Builder().BuildPartial();
public static Address DefaultInstance {
get { return defaultInstance; }
}
public override Address DefaultInstanceForType {
get { return defaultInstance; }
}
protected override Address ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<Address, Address.Builder> InternalFieldAccessors {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Address__FieldAccessorTable; }
}
public const int HostnameFieldNumber = 1;
private bool hasHostname;
private string hostname_ = "";
public bool HasHostname {
get { return hasHostname; }
}
public string Hostname {
get { return hostname_; }
}
public const int ServiceFieldNumber = 2;
private bool hasService;
private string service_ = "";
public bool HasService {
get { return hasService; }
}
public string Service {
get { return service_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasHostname) {
output.WriteString(1, Hostname);
}
if (HasService) {
output.WriteString(2, Service);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasHostname) {
size += pb::CodedOutputStream.ComputeStringSize(1, Hostname);
}
if (HasService) {
size += pb::CodedOutputStream.ComputeStringSize(2, Service);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static Address ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static Address ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static Address ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static Address ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static Address ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static Address ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Address ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static Address ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static Address ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static Address ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(Address prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<Address, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {}
Address result = new Address();
protected override Address MessageBeingBuilt {
get { return result; }
}
public override Builder Clear() {
result = new Address();
return this;
}
public override Builder Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Descriptor; }
}
public override Address DefaultInstanceForType {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance; }
}
public override Address BuildPartial() {
if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder");
}
Address returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is Address) {
return MergeFrom((Address) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(Address other) {
if (other == global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance) return this;
if (other.HasHostname) {
Hostname = other.Hostname;
}
if (other.HasService) {
Service = other.Service;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0: {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break;
}
case 10: {
Hostname = input.ReadString();
break;
}
case 18: {
Service = input.ReadString();
break;
}
}
}
}
public bool HasHostname {
get { return result.HasHostname; }
}
public string Hostname {
get { return result.Hostname; }
set { SetHostname(value); }
}
public Builder SetHostname(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasHostname = true;
result.hostname_ = value;
return this;
}
public Builder ClearHostname() {
result.hasHostname = false;
result.hostname_ = "";
return this;
}
public bool HasService {
get { return result.HasService; }
}
public string Service {
get { return result.Service; }
set { SetService(value); }
}
public Builder SetService(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasService = true;
result.service_ = value;
return this;
}
public Builder ClearService() {
result.hasService = false;
result.service_ = "";
return this;
}
}
static Address() {
object.ReferenceEquals(global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.Descriptor, null);
}
}
public sealed partial class Subscribe : pb::GeneratedMessage<Subscribe, Subscribe.Builder> {
private static readonly Subscribe defaultInstance = new Builder().BuildPartial();
public static Subscribe DefaultInstance {
get { return defaultInstance; }
}
public override Subscribe DefaultInstanceForType {
get { return defaultInstance; }
}
protected override Subscribe ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<Subscribe, Subscribe.Builder> InternalFieldAccessors {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Subscribe__FieldAccessorTable; }
}
public const int BroadcastAddressFieldNumber = 7;
private bool hasBroadcastAddress;
private global::Sirikata.Subscription.Protocol._PBJ_Internal.Address broadcastAddress_ = global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance;
public bool HasBroadcastAddress {
get { return hasBroadcastAddress; }
}
public global::Sirikata.Subscription.Protocol._PBJ_Internal.Address BroadcastAddress {
get { return broadcastAddress_; }
}
public const int BroadcastNameFieldNumber = 8;
private bool hasBroadcastName;
private pb::ByteString broadcastName_ = pb::ByteString.Empty;
public bool HasBroadcastName {
get { return hasBroadcastName; }
}
public pb::ByteString BroadcastName {
get { return broadcastName_; }
}
public const int UpdatePeriodFieldNumber = 9;
private bool hasUpdatePeriod;
private long updatePeriod_ = 0;
public bool HasUpdatePeriod {
get { return hasUpdatePeriod; }
}
public long UpdatePeriod {
get { return updatePeriod_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasBroadcastAddress) {
output.WriteMessage(7, BroadcastAddress);
}
if (HasBroadcastName) {
output.WriteBytes(8, BroadcastName);
}
if (HasUpdatePeriod) {
output.WriteSFixed64(9, UpdatePeriod);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasBroadcastAddress) {
size += pb::CodedOutputStream.ComputeMessageSize(7, BroadcastAddress);
}
if (HasBroadcastName) {
size += pb::CodedOutputStream.ComputeBytesSize(8, BroadcastName);
}
if (HasUpdatePeriod) {
size += pb::CodedOutputStream.ComputeSFixed64Size(9, UpdatePeriod);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static Subscribe ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static Subscribe ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static Subscribe ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static Subscribe ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static Subscribe ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static Subscribe ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Subscribe ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static Subscribe ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static Subscribe ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static Subscribe ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(Subscribe prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<Subscribe, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {}
Subscribe result = new Subscribe();
protected override Subscribe MessageBeingBuilt {
get { return result; }
}
public override Builder Clear() {
result = new Subscribe();
return this;
}
public override Builder Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.Descriptor; }
}
public override Subscribe DefaultInstanceForType {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.DefaultInstance; }
}
public override Subscribe BuildPartial() {
if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder");
}
Subscribe returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is Subscribe) {
return MergeFrom((Subscribe) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(Subscribe other) {
if (other == global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscribe.DefaultInstance) return this;
if (other.HasBroadcastAddress) {
MergeBroadcastAddress(other.BroadcastAddress);
}
if (other.HasBroadcastName) {
BroadcastName = other.BroadcastName;
}
if (other.HasUpdatePeriod) {
UpdatePeriod = other.UpdatePeriod;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0: {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break;
}
case 58: {
global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Builder subBuilder = global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.CreateBuilder();
if (HasBroadcastAddress) {
subBuilder.MergeFrom(BroadcastAddress);
}
input.ReadMessage(subBuilder, extensionRegistry);
BroadcastAddress = subBuilder.BuildPartial();
break;
}
case 66: {
BroadcastName = input.ReadBytes();
break;
}
case 73: {
UpdatePeriod = input.ReadSFixed64();
break;
}
}
}
}
public bool HasBroadcastAddress {
get { return result.HasBroadcastAddress; }
}
public global::Sirikata.Subscription.Protocol._PBJ_Internal.Address BroadcastAddress {
get { return result.BroadcastAddress; }
set { SetBroadcastAddress(value); }
}
public Builder SetBroadcastAddress(global::Sirikata.Subscription.Protocol._PBJ_Internal.Address value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasBroadcastAddress = true;
result.broadcastAddress_ = value;
return this;
}
public Builder SetBroadcastAddress(global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
result.hasBroadcastAddress = true;
result.broadcastAddress_ = builderForValue.Build();
return this;
}
public Builder MergeBroadcastAddress(global::Sirikata.Subscription.Protocol._PBJ_Internal.Address value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
if (result.HasBroadcastAddress &&
result.broadcastAddress_ != global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance) {
result.broadcastAddress_ = global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.CreateBuilder(result.broadcastAddress_).MergeFrom(value).BuildPartial();
} else {
result.broadcastAddress_ = value;
}
result.hasBroadcastAddress = true;
return this;
}
public Builder ClearBroadcastAddress() {
result.hasBroadcastAddress = false;
result.broadcastAddress_ = global::Sirikata.Subscription.Protocol._PBJ_Internal.Address.DefaultInstance;
return this;
}
public bool HasBroadcastName {
get { return result.HasBroadcastName; }
}
public pb::ByteString BroadcastName {
get { return result.BroadcastName; }
set { SetBroadcastName(value); }
}
public Builder SetBroadcastName(pb::ByteString value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasBroadcastName = true;
result.broadcastName_ = value;
return this;
}
public Builder ClearBroadcastName() {
result.hasBroadcastName = false;
result.broadcastName_ = pb::ByteString.Empty;
return this;
}
public bool HasUpdatePeriod {
get { return result.HasUpdatePeriod; }
}
public long UpdatePeriod {
get { return result.UpdatePeriod; }
set { SetUpdatePeriod(value); }
}
public Builder SetUpdatePeriod(long value) {
result.hasUpdatePeriod = true;
result.updatePeriod_ = value;
return this;
}
public Builder ClearUpdatePeriod() {
result.hasUpdatePeriod = false;
result.updatePeriod_ = 0;
return this;
}
}
static Subscribe() {
object.ReferenceEquals(global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.Descriptor, null);
}
}
public sealed partial class Broadcast : pb::GeneratedMessage<Broadcast, Broadcast.Builder> {
private static readonly Broadcast defaultInstance = new Builder().BuildPartial();
public static Broadcast DefaultInstance {
get { return defaultInstance; }
}
public override Broadcast DefaultInstanceForType {
get { return defaultInstance; }
}
protected override Broadcast ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<Broadcast, Broadcast.Builder> InternalFieldAccessors {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.internal__static_Sirikata_Subscription_Protocol__PBJ_Internal_Broadcast__FieldAccessorTable; }
}
public const int BroadcastNameFieldNumber = 7;
private bool hasBroadcastName;
private pb::ByteString broadcastName_ = pb::ByteString.Empty;
public bool HasBroadcastName {
get { return hasBroadcastName; }
}
public pb::ByteString BroadcastName {
get { return broadcastName_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasBroadcastName) {
output.WriteBytes(7, BroadcastName);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasBroadcastName) {
size += pb::CodedOutputStream.ComputeBytesSize(7, BroadcastName);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static Broadcast ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static Broadcast ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static Broadcast ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static Broadcast ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static Broadcast ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static Broadcast ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Broadcast ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static Broadcast ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static Broadcast ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static Broadcast ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(Broadcast prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<Broadcast, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {}
Broadcast result = new Broadcast();
protected override Broadcast MessageBeingBuilt {
get { return result; }
}
public override Builder Clear() {
result = new Broadcast();
return this;
}
public override Builder Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.Descriptor; }
}
public override Broadcast DefaultInstanceForType {
get { return global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.DefaultInstance; }
}
public override Broadcast BuildPartial() {
if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder");
}
Broadcast returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is Broadcast) {
return MergeFrom((Broadcast) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(Broadcast other) {
if (other == global::Sirikata.Subscription.Protocol._PBJ_Internal.Broadcast.DefaultInstance) return this;
if (other.HasBroadcastName) {
BroadcastName = other.BroadcastName;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0: {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break;
}
case 58: {
BroadcastName = input.ReadBytes();
break;
}
}
}
}
public bool HasBroadcastName {
get { return result.HasBroadcastName; }
}
public pb::ByteString BroadcastName {
get { return result.BroadcastName; }
set { SetBroadcastName(value); }
}
public Builder SetBroadcastName(pb::ByteString value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasBroadcastName = true;
result.broadcastName_ = value;
return this;
}
public Builder ClearBroadcastName() {
result.hasBroadcastName = false;
result.broadcastName_ = pb::ByteString.Empty;
return this;
}
}
static Broadcast() {
object.ReferenceEquals(global::Sirikata.Subscription.Protocol._PBJ_Internal.Subscription.Descriptor, null);
}
}
#endregion
}

View File

@ -1,431 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using pbd = global::Google.ProtocolBuffers.Descriptors;
using pb = global::Google.ProtocolBuffers;
namespace Sirikata.Subscription.Protocol {
public class Address : PBJ.IMessage {
protected _PBJ_Internal.Address super;
public _PBJ_Internal.Address _PBJSuper{ get { return super;} }
public Address() {
super=new _PBJ_Internal.Address();
}
public Address(_PBJ_Internal.Address reference) {
super=reference;
}
public static Address defaultInstance= new Address (_PBJ_Internal.Address.DefaultInstance);
public static Address DefaultInstance{
get {return defaultInstance;}
}
public static pbd.MessageDescriptor Descriptor {
get { return _PBJ_Internal.Address.Descriptor; } }
public static class Types {
}
public static bool WithinReservedFieldTagRange(int field_tag) {
return false;
}
public static bool WithinExtensionFieldTagRange(int field_tag) {
return false;
}
public const int HostnameFieldTag=1;
public bool HasHostname{ get {return super.HasHostname&&PBJ._PBJ.ValidateString(super.Hostname);} }
public string Hostname{ get {
if (HasHostname) {
return PBJ._PBJ.CastString(super.Hostname);
} else {
return PBJ._PBJ.CastString();
}
}
}
public const int ServiceFieldTag=2;
public bool HasService{ get {return super.HasService&&PBJ._PBJ.ValidateString(super.Service);} }
public string Service{ get {
if (HasService) {
return PBJ._PBJ.CastString(super.Service);
} else {
return PBJ._PBJ.CastString();
}
}
}
public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder() { return new Builder(); }
public static Builder CreateBuilder(Address prototype) {
return (Builder)new Builder().MergeFrom(prototype);
}
public static Address ParseFrom(pb::ByteString data) {
return new Address(_PBJ_Internal.Address.ParseFrom(data));
}
public static Address ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
return new Address(_PBJ_Internal.Address.ParseFrom(data,er));
}
public static Address ParseFrom(byte[] data) {
return new Address(_PBJ_Internal.Address.ParseFrom(data));
}
public static Address ParseFrom(byte[] data, pb::ExtensionRegistry er) {
return new Address(_PBJ_Internal.Address.ParseFrom(data,er));
}
public static Address ParseFrom(global::System.IO.Stream data) {
return new Address(_PBJ_Internal.Address.ParseFrom(data));
}
public static Address ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
return new Address(_PBJ_Internal.Address.ParseFrom(data,er));
}
public static Address ParseFrom(pb::CodedInputStream data) {
return new Address(_PBJ_Internal.Address.ParseFrom(data));
}
public static Address ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
return new Address(_PBJ_Internal.Address.ParseFrom(data,er));
}
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
public class Builder : global::PBJ.IMessage.IBuilder{
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
protected _PBJ_Internal.Address.Builder super;
public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
public _PBJ_Internal.Address.Builder _PBJSuper{ get { return super;} }
public Builder() {super = new _PBJ_Internal.Address.Builder();}
public Builder(_PBJ_Internal.Address.Builder other) {
super=other;
}
public Builder Clone() {return new Builder(super.Clone());}
public Builder MergeFrom(Address prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
public Builder Clear() {super.Clear();return this;}
public Address BuildPartial() {return new Address(super.BuildPartial());}
public Address Build() {if (_HasAllPBJFields) return new Address(super.Build());return null;}
public pbd::MessageDescriptor DescriptorForType {
get { return Address.Descriptor; } }
public Builder ClearHostname() { super.ClearHostname();return this;}
public const int HostnameFieldTag=1;
public bool HasHostname{ get {return super.HasHostname&&PBJ._PBJ.ValidateString(super.Hostname);} }
public string Hostname{ get {
if (HasHostname) {
return PBJ._PBJ.CastString(super.Hostname);
} else {
return PBJ._PBJ.CastString();
}
}
set {
super.Hostname=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearService() { super.ClearService();return this;}
public const int ServiceFieldTag=2;
public bool HasService{ get {return super.HasService&&PBJ._PBJ.ValidateString(super.Service);} }
public string Service{ get {
if (HasService) {
return PBJ._PBJ.CastString(super.Service);
} else {
return PBJ._PBJ.CastString();
}
}
set {
super.Service=(PBJ._PBJ.Construct(value));
}
}
}
}
}
namespace Sirikata.Subscription.Protocol {
public class Subscribe : PBJ.IMessage {
protected _PBJ_Internal.Subscribe super;
public _PBJ_Internal.Subscribe _PBJSuper{ get { return super;} }
public Subscribe() {
super=new _PBJ_Internal.Subscribe();
}
public Subscribe(_PBJ_Internal.Subscribe reference) {
super=reference;
}
public static Subscribe defaultInstance= new Subscribe (_PBJ_Internal.Subscribe.DefaultInstance);
public static Subscribe DefaultInstance{
get {return defaultInstance;}
}
public static pbd.MessageDescriptor Descriptor {
get { return _PBJ_Internal.Subscribe.Descriptor; } }
public static class Types {
}
public static bool WithinReservedFieldTagRange(int field_tag) {
return false||(field_tag>=1&&field_tag<=6)||(field_tag>=1536&&field_tag<=2560)||(field_tag>=229376&&field_tag<=294912);
}
public static bool WithinExtensionFieldTagRange(int field_tag) {
return false;
}
public const int BroadcastAddressFieldTag=7;
public bool HasBroadcastAddress{ get {return super.HasBroadcastAddress;} }
public Address BroadcastAddress{ get {
if (HasBroadcastAddress) {
return new Address(super.BroadcastAddress);
} else {
return new Address();
}
}
}
public const int BroadcastNameFieldTag=8;
public bool HasBroadcastName{ get {return super.HasBroadcastName&&PBJ._PBJ.ValidateUuid(super.BroadcastName);} }
public PBJ.UUID BroadcastName{ get {
if (HasBroadcastName) {
return PBJ._PBJ.CastUuid(super.BroadcastName);
} else {
return PBJ._PBJ.CastUuid();
}
}
}
public const int UpdatePeriodFieldTag=9;
public bool HasUpdatePeriod{ get {return super.HasUpdatePeriod&&PBJ._PBJ.ValidateDuration(super.UpdatePeriod);} }
public PBJ.Duration UpdatePeriod{ get {
if (HasUpdatePeriod) {
return PBJ._PBJ.CastDuration(super.UpdatePeriod);
} else {
return PBJ._PBJ.CastDuration();
}
}
}
public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder() { return new Builder(); }
public static Builder CreateBuilder(Subscribe prototype) {
return (Builder)new Builder().MergeFrom(prototype);
}
public static Subscribe ParseFrom(pb::ByteString data) {
return new Subscribe(_PBJ_Internal.Subscribe.ParseFrom(data));
}
public static Subscribe ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
return new Subscribe(_PBJ_Internal.Subscribe.ParseFrom(data,er));
}
public static Subscribe ParseFrom(byte[] data) {
return new Subscribe(_PBJ_Internal.Subscribe.ParseFrom(data));
}
public static Subscribe ParseFrom(byte[] data, pb::ExtensionRegistry er) {
return new Subscribe(_PBJ_Internal.Subscribe.ParseFrom(data,er));
}
public static Subscribe ParseFrom(global::System.IO.Stream data) {
return new Subscribe(_PBJ_Internal.Subscribe.ParseFrom(data));
}
public static Subscribe ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
return new Subscribe(_PBJ_Internal.Subscribe.ParseFrom(data,er));
}
public static Subscribe ParseFrom(pb::CodedInputStream data) {
return new Subscribe(_PBJ_Internal.Subscribe.ParseFrom(data));
}
public static Subscribe ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
return new Subscribe(_PBJ_Internal.Subscribe.ParseFrom(data,er));
}
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
public class Builder : global::PBJ.IMessage.IBuilder{
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
protected _PBJ_Internal.Subscribe.Builder super;
public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
public _PBJ_Internal.Subscribe.Builder _PBJSuper{ get { return super;} }
public Builder() {super = new _PBJ_Internal.Subscribe.Builder();}
public Builder(_PBJ_Internal.Subscribe.Builder other) {
super=other;
}
public Builder Clone() {return new Builder(super.Clone());}
public Builder MergeFrom(Subscribe prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
public Builder Clear() {super.Clear();return this;}
public Subscribe BuildPartial() {return new Subscribe(super.BuildPartial());}
public Subscribe Build() {if (_HasAllPBJFields) return new Subscribe(super.Build());return null;}
public pbd::MessageDescriptor DescriptorForType {
get { return Subscribe.Descriptor; } }
public Builder ClearBroadcastAddress() { super.ClearBroadcastAddress();return this;}
public const int BroadcastAddressFieldTag=7;
public bool HasBroadcastAddress{ get {return super.HasBroadcastAddress;} }
public Address BroadcastAddress{ get {
if (HasBroadcastAddress) {
return new Address(super.BroadcastAddress);
} else {
return new Address();
}
}
set {
super.BroadcastAddress=value._PBJSuper;
}
}
public Builder ClearBroadcastName() { super.ClearBroadcastName();return this;}
public const int BroadcastNameFieldTag=8;
public bool HasBroadcastName{ get {return super.HasBroadcastName&&PBJ._PBJ.ValidateUuid(super.BroadcastName);} }
public PBJ.UUID BroadcastName{ get {
if (HasBroadcastName) {
return PBJ._PBJ.CastUuid(super.BroadcastName);
} else {
return PBJ._PBJ.CastUuid();
}
}
set {
super.BroadcastName=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearUpdatePeriod() { super.ClearUpdatePeriod();return this;}
public const int UpdatePeriodFieldTag=9;
public bool HasUpdatePeriod{ get {return super.HasUpdatePeriod&&PBJ._PBJ.ValidateDuration(super.UpdatePeriod);} }
public PBJ.Duration UpdatePeriod{ get {
if (HasUpdatePeriod) {
return PBJ._PBJ.CastDuration(super.UpdatePeriod);
} else {
return PBJ._PBJ.CastDuration();
}
}
set {
super.UpdatePeriod=(PBJ._PBJ.Construct(value));
}
}
}
}
}
namespace Sirikata.Subscription.Protocol {
public class Broadcast : PBJ.IMessage {
protected _PBJ_Internal.Broadcast super;
public _PBJ_Internal.Broadcast _PBJSuper{ get { return super;} }
public Broadcast() {
super=new _PBJ_Internal.Broadcast();
}
public Broadcast(_PBJ_Internal.Broadcast reference) {
super=reference;
}
public static Broadcast defaultInstance= new Broadcast (_PBJ_Internal.Broadcast.DefaultInstance);
public static Broadcast DefaultInstance{
get {return defaultInstance;}
}
public static pbd.MessageDescriptor Descriptor {
get { return _PBJ_Internal.Broadcast.Descriptor; } }
public static class Types {
}
public static bool WithinReservedFieldTagRange(int field_tag) {
return false||(field_tag>=1&&field_tag<=6)||(field_tag>=1536&&field_tag<=2560)||(field_tag>=229376&&field_tag<=294912);
}
public static bool WithinExtensionFieldTagRange(int field_tag) {
return false;
}
public const int BroadcastNameFieldTag=7;
public bool HasBroadcastName{ get {return super.HasBroadcastName&&PBJ._PBJ.ValidateUuid(super.BroadcastName);} }
public PBJ.UUID BroadcastName{ get {
if (HasBroadcastName) {
return PBJ._PBJ.CastUuid(super.BroadcastName);
} else {
return PBJ._PBJ.CastUuid();
}
}
}
public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder() { return new Builder(); }
public static Builder CreateBuilder(Broadcast prototype) {
return (Builder)new Builder().MergeFrom(prototype);
}
public static Broadcast ParseFrom(pb::ByteString data) {
return new Broadcast(_PBJ_Internal.Broadcast.ParseFrom(data));
}
public static Broadcast ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
return new Broadcast(_PBJ_Internal.Broadcast.ParseFrom(data,er));
}
public static Broadcast ParseFrom(byte[] data) {
return new Broadcast(_PBJ_Internal.Broadcast.ParseFrom(data));
}
public static Broadcast ParseFrom(byte[] data, pb::ExtensionRegistry er) {
return new Broadcast(_PBJ_Internal.Broadcast.ParseFrom(data,er));
}
public static Broadcast ParseFrom(global::System.IO.Stream data) {
return new Broadcast(_PBJ_Internal.Broadcast.ParseFrom(data));
}
public static Broadcast ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
return new Broadcast(_PBJ_Internal.Broadcast.ParseFrom(data,er));
}
public static Broadcast ParseFrom(pb::CodedInputStream data) {
return new Broadcast(_PBJ_Internal.Broadcast.ParseFrom(data));
}
public static Broadcast ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
return new Broadcast(_PBJ_Internal.Broadcast.ParseFrom(data,er));
}
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
public class Builder : global::PBJ.IMessage.IBuilder{
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
protected _PBJ_Internal.Broadcast.Builder super;
public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
public _PBJ_Internal.Broadcast.Builder _PBJSuper{ get { return super;} }
public Builder() {super = new _PBJ_Internal.Broadcast.Builder();}
public Builder(_PBJ_Internal.Broadcast.Builder other) {
super=other;
}
public Builder Clone() {return new Builder(super.Clone());}
public Builder MergeFrom(Broadcast prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
public Builder Clear() {super.Clear();return this;}
public Broadcast BuildPartial() {return new Broadcast(super.BuildPartial());}
public Broadcast Build() {if (_HasAllPBJFields) return new Broadcast(super.Build());return null;}
public pbd::MessageDescriptor DescriptorForType {
get { return Broadcast.Descriptor; } }
public Builder ClearBroadcastName() { super.ClearBroadcastName();return this;}
public const int BroadcastNameFieldTag=7;
public bool HasBroadcastName{ get {return super.HasBroadcastName&&PBJ._PBJ.ValidateUuid(super.BroadcastName);} }
public PBJ.UUID BroadcastName{ get {
if (HasBroadcastName) {
return PBJ._PBJ.CastUuid(super.BroadcastName);
} else {
return PBJ._PBJ.CastUuid();
}
}
set {
super.BroadcastName=(PBJ._PBJ.Construct(value));
}
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,454 +0,0 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
namespace Sirikata.Network.Protocol._PBJ_Internal {
public static partial class Time {
#region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
}
#endregion
#region Static variables
internal static pbd::MessageDescriptor internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync, global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.Builder> internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__FieldAccessorTable;
#endregion
#region Descriptor
public static pbd::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbd::FileDescriptor descriptor;
static Time() {
byte[] descriptorData = global::System.Convert.FromBase64String(
"CgpUaW1lLnByb3RvEidTaXJpa2F0YS5OZXR3b3JrLlByb3RvY29sLl9QQkpf" +
"SW50ZXJuYWwirQEKCFRpbWVTeW5jEhMKC2NsaWVudF90aW1lGAkgASgGEhMK" +
"C3NlcnZlcl90aW1lGAogASgGEhIKCnN5bmNfcm91bmQYCyABKAQSFgoOcmV0" +
"dXJuX29wdGlvbnMYDiABKA0SEwoKcm91bmRfdHJpcBiBFCABKAYiNgoNUmV0" +
"dXJuT3B0aW9ucxISCg5SRVBMWV9SRUxJQUJMRRABEhEKDVJFUExZX09SREVS" +
"RUQQAg==");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root;
internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__Descriptor = Descriptor.MessageTypes[0];
internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync, global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.Builder>(internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__Descriptor,
new string[] { "ClientTime", "ServerTime", "SyncRound", "ReturnOptions", "RoundTrip", });
return null;
};
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] {
}, assigner);
}
#endregion
}
#region Messages
public sealed partial class TimeSync : pb::GeneratedMessage<TimeSync, TimeSync.Builder> {
private static readonly TimeSync defaultInstance = new Builder().BuildPartial();
public static TimeSync DefaultInstance {
get { return defaultInstance; }
}
public override TimeSync DefaultInstanceForType {
get { return defaultInstance; }
}
protected override TimeSync ThisMessage {
get { return this; }
}
public static pbd::MessageDescriptor Descriptor {
get { return global::Sirikata.Network.Protocol._PBJ_Internal.Time.internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable<TimeSync, TimeSync.Builder> InternalFieldAccessors {
get { return global::Sirikata.Network.Protocol._PBJ_Internal.Time.internal__static_Sirikata_Network_Protocol__PBJ_Internal_TimeSync__FieldAccessorTable; }
}
#region Nested types
public static class Types {
public enum ReturnOptions {
REPLY_RELIABLE = 1,
REPLY_ORDERED = 2,
}
}
#endregion
public const int ClientTimeFieldNumber = 9;
private bool hasClientTime;
private ulong clientTime_ = 0;
public bool HasClientTime {
get { return hasClientTime; }
}
[global::System.CLSCompliant(false)]
public ulong ClientTime {
get { return clientTime_; }
}
public const int ServerTimeFieldNumber = 10;
private bool hasServerTime;
private ulong serverTime_ = 0;
public bool HasServerTime {
get { return hasServerTime; }
}
[global::System.CLSCompliant(false)]
public ulong ServerTime {
get { return serverTime_; }
}
public const int SyncRoundFieldNumber = 11;
private bool hasSyncRound;
private ulong syncRound_ = 0UL;
public bool HasSyncRound {
get { return hasSyncRound; }
}
[global::System.CLSCompliant(false)]
public ulong SyncRound {
get { return syncRound_; }
}
public const int ReturnOptionsFieldNumber = 14;
private bool hasReturnOptions;
private uint returnOptions_ = 0;
public bool HasReturnOptions {
get { return hasReturnOptions; }
}
[global::System.CLSCompliant(false)]
public uint ReturnOptions {
get { return returnOptions_; }
}
public const int RoundTripFieldNumber = 2561;
private bool hasRoundTrip;
private ulong roundTrip_ = 0;
public bool HasRoundTrip {
get { return hasRoundTrip; }
}
[global::System.CLSCompliant(false)]
public ulong RoundTrip {
get { return roundTrip_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasClientTime) {
output.WriteFixed64(9, ClientTime);
}
if (HasServerTime) {
output.WriteFixed64(10, ServerTime);
}
if (HasSyncRound) {
output.WriteUInt64(11, SyncRound);
}
if (HasReturnOptions) {
output.WriteUInt32(14, ReturnOptions);
}
if (HasRoundTrip) {
output.WriteFixed64(2561, RoundTrip);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasClientTime) {
size += pb::CodedOutputStream.ComputeFixed64Size(9, ClientTime);
}
if (HasServerTime) {
size += pb::CodedOutputStream.ComputeFixed64Size(10, ServerTime);
}
if (HasSyncRound) {
size += pb::CodedOutputStream.ComputeUInt64Size(11, SyncRound);
}
if (HasReturnOptions) {
size += pb::CodedOutputStream.ComputeUInt32Size(14, ReturnOptions);
}
if (HasRoundTrip) {
size += pb::CodedOutputStream.ComputeFixed64Size(2561, RoundTrip);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static TimeSync ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static TimeSync ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static TimeSync ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static TimeSync ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
}
public static TimeSync ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static TimeSync ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static TimeSync ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
}
public static TimeSync ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
}
public static TimeSync ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static TimeSync ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(TimeSync prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<TimeSync, Builder> {
protected override Builder ThisBuilder {
get { return this; }
}
public Builder() {}
TimeSync result = new TimeSync();
protected override TimeSync MessageBeingBuilt {
get { return result; }
}
public override Builder Clear() {
result = new TimeSync();
return this;
}
public override Builder Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.Descriptor; }
}
public override TimeSync DefaultInstanceForType {
get { return global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.DefaultInstance; }
}
public override TimeSync BuildPartial() {
if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder");
}
TimeSync returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is TimeSync) {
return MergeFrom((TimeSync) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(TimeSync other) {
if (other == global::Sirikata.Network.Protocol._PBJ_Internal.TimeSync.DefaultInstance) return this;
if (other.HasClientTime) {
ClientTime = other.ClientTime;
}
if (other.HasServerTime) {
ServerTime = other.ServerTime;
}
if (other.HasSyncRound) {
SyncRound = other.SyncRound;
}
if (other.HasReturnOptions) {
ReturnOptions = other.ReturnOptions;
}
if (other.HasRoundTrip) {
RoundTrip = other.RoundTrip;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0: {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) {
this.UnknownFields = unknownFields.Build();
}
return this;
}
if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
}
ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break;
}
case 73: {
ClientTime = input.ReadFixed64();
break;
}
case 81: {
ServerTime = input.ReadFixed64();
break;
}
case 88: {
SyncRound = input.ReadUInt64();
break;
}
case 112: {
ReturnOptions = input.ReadUInt32();
break;
}
case 20489: {
RoundTrip = input.ReadFixed64();
break;
}
}
}
}
public bool HasClientTime {
get { return result.HasClientTime; }
}
[global::System.CLSCompliant(false)]
public ulong ClientTime {
get { return result.ClientTime; }
set { SetClientTime(value); }
}
[global::System.CLSCompliant(false)]
public Builder SetClientTime(ulong value) {
result.hasClientTime = true;
result.clientTime_ = value;
return this;
}
public Builder ClearClientTime() {
result.hasClientTime = false;
result.clientTime_ = 0;
return this;
}
public bool HasServerTime {
get { return result.HasServerTime; }
}
[global::System.CLSCompliant(false)]
public ulong ServerTime {
get { return result.ServerTime; }
set { SetServerTime(value); }
}
[global::System.CLSCompliant(false)]
public Builder SetServerTime(ulong value) {
result.hasServerTime = true;
result.serverTime_ = value;
return this;
}
public Builder ClearServerTime() {
result.hasServerTime = false;
result.serverTime_ = 0;
return this;
}
public bool HasSyncRound {
get { return result.HasSyncRound; }
}
[global::System.CLSCompliant(false)]
public ulong SyncRound {
get { return result.SyncRound; }
set { SetSyncRound(value); }
}
[global::System.CLSCompliant(false)]
public Builder SetSyncRound(ulong value) {
result.hasSyncRound = true;
result.syncRound_ = value;
return this;
}
public Builder ClearSyncRound() {
result.hasSyncRound = false;
result.syncRound_ = 0UL;
return this;
}
public bool HasReturnOptions {
get { return result.HasReturnOptions; }
}
[global::System.CLSCompliant(false)]
public uint ReturnOptions {
get { return result.ReturnOptions; }
set { SetReturnOptions(value); }
}
[global::System.CLSCompliant(false)]
public Builder SetReturnOptions(uint value) {
result.hasReturnOptions = true;
result.returnOptions_ = value;
return this;
}
public Builder ClearReturnOptions() {
result.hasReturnOptions = false;
result.returnOptions_ = 0;
return this;
}
public bool HasRoundTrip {
get { return result.HasRoundTrip; }
}
[global::System.CLSCompliant(false)]
public ulong RoundTrip {
get { return result.RoundTrip; }
set { SetRoundTrip(value); }
}
[global::System.CLSCompliant(false)]
public Builder SetRoundTrip(ulong value) {
result.hasRoundTrip = true;
result.roundTrip_ = value;
return this;
}
public Builder ClearRoundTrip() {
result.hasRoundTrip = false;
result.roundTrip_ = 0;
return this;
}
}
static TimeSync() {
object.ReferenceEquals(global::Sirikata.Network.Protocol._PBJ_Internal.Time.Descriptor, null);
}
}
#endregion
}

View File

@ -1,245 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using pbd = global::Google.ProtocolBuffers.Descriptors;
using pb = global::Google.ProtocolBuffers;
namespace Sirikata.Network.Protocol {
public class TimeSync : PBJ.IMessage {
protected _PBJ_Internal.TimeSync super;
public _PBJ_Internal.TimeSync _PBJSuper{ get { return super;} }
public TimeSync() {
super=new _PBJ_Internal.TimeSync();
}
public TimeSync(_PBJ_Internal.TimeSync reference) {
super=reference;
}
public static TimeSync defaultInstance= new TimeSync (_PBJ_Internal.TimeSync.DefaultInstance);
public static TimeSync DefaultInstance{
get {return defaultInstance;}
}
public static pbd.MessageDescriptor Descriptor {
get { return _PBJ_Internal.TimeSync.Descriptor; } }
public static class Types {
public enum ReturnOptions {
REPLY_RELIABLE=_PBJ_Internal.TimeSync.Types.ReturnOptions.REPLY_RELIABLE,
REPLY_ORDERED=_PBJ_Internal.TimeSync.Types.ReturnOptions.REPLY_ORDERED
};
}
public static bool WithinReservedFieldTagRange(int field_tag) {
return false||(field_tag>=1&&field_tag<=8)||(field_tag>=1536&&field_tag<=2560)||(field_tag>=229376&&field_tag<=294912);
}
public static bool WithinExtensionFieldTagRange(int field_tag) {
return false;
}
public const int ClientTimeFieldTag=9;
public bool HasClientTime{ get {return super.HasClientTime&&PBJ._PBJ.ValidateTime(super.ClientTime);} }
public PBJ.Time ClientTime{ get {
if (HasClientTime) {
return PBJ._PBJ.CastTime(super.ClientTime);
} else {
return PBJ._PBJ.CastTime();
}
}
}
public const int ServerTimeFieldTag=10;
public bool HasServerTime{ get {return super.HasServerTime&&PBJ._PBJ.ValidateTime(super.ServerTime);} }
public PBJ.Time ServerTime{ get {
if (HasServerTime) {
return PBJ._PBJ.CastTime(super.ServerTime);
} else {
return PBJ._PBJ.CastTime();
}
}
}
public const int SyncRoundFieldTag=11;
public bool HasSyncRound{ get {return super.HasSyncRound&&PBJ._PBJ.ValidateUint64(super.SyncRound);} }
public ulong SyncRound{ get {
if (HasSyncRound) {
return PBJ._PBJ.CastUint64(super.SyncRound);
} else {
return PBJ._PBJ.CastUint64();
}
}
}
public const int ReturnOptionsFieldTag=14;
public bool HasReturnOptions { get {
if (!super.HasReturnOptions) return false;
return PBJ._PBJ.ValidateFlags(super.ReturnOptions,(ulong)Types.ReturnOptions.REPLY_RELIABLE|(ulong)Types.ReturnOptions.REPLY_ORDERED);
} }
public uint ReturnOptions{ get {
if (HasReturnOptions) {
return (uint)PBJ._PBJ.CastFlags(super.ReturnOptions,(ulong)Types.ReturnOptions.REPLY_RELIABLE|(ulong)Types.ReturnOptions.REPLY_ORDERED);
} else {
return (uint)PBJ._PBJ.CastFlags((ulong)Types.ReturnOptions.REPLY_RELIABLE|(ulong)Types.ReturnOptions.REPLY_ORDERED);
}
}
}
public const int RoundTripFieldTag=2561;
public bool HasRoundTrip{ get {return super.HasRoundTrip&&PBJ._PBJ.ValidateTime(super.RoundTrip);} }
public PBJ.Time RoundTrip{ get {
if (HasRoundTrip) {
return PBJ._PBJ.CastTime(super.RoundTrip);
} else {
return PBJ._PBJ.CastTime();
}
}
}
public override Google.ProtocolBuffers.IMessage _PBJISuper { get { return super; } }
public override PBJ.IMessage.IBuilder WeakCreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder() { return new Builder(); }
public static Builder CreateBuilder(TimeSync prototype) {
return (Builder)new Builder().MergeFrom(prototype);
}
public static TimeSync ParseFrom(pb::ByteString data) {
return new TimeSync(_PBJ_Internal.TimeSync.ParseFrom(data));
}
public static TimeSync ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) {
return new TimeSync(_PBJ_Internal.TimeSync.ParseFrom(data,er));
}
public static TimeSync ParseFrom(byte[] data) {
return new TimeSync(_PBJ_Internal.TimeSync.ParseFrom(data));
}
public static TimeSync ParseFrom(byte[] data, pb::ExtensionRegistry er) {
return new TimeSync(_PBJ_Internal.TimeSync.ParseFrom(data,er));
}
public static TimeSync ParseFrom(global::System.IO.Stream data) {
return new TimeSync(_PBJ_Internal.TimeSync.ParseFrom(data));
}
public static TimeSync ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) {
return new TimeSync(_PBJ_Internal.TimeSync.ParseFrom(data,er));
}
public static TimeSync ParseFrom(pb::CodedInputStream data) {
return new TimeSync(_PBJ_Internal.TimeSync.ParseFrom(data));
}
public static TimeSync ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) {
return new TimeSync(_PBJ_Internal.TimeSync.ParseFrom(data,er));
}
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
public class Builder : global::PBJ.IMessage.IBuilder{
protected override bool _HasAllPBJFields{ get {
return true
;
} }
public bool IsInitialized { get {
return super.IsInitialized&&_HasAllPBJFields;
} }
protected _PBJ_Internal.TimeSync.Builder super;
public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } }
public _PBJ_Internal.TimeSync.Builder _PBJSuper{ get { return super;} }
public Builder() {super = new _PBJ_Internal.TimeSync.Builder();}
public Builder(_PBJ_Internal.TimeSync.Builder other) {
super=other;
}
public Builder Clone() {return new Builder(super.Clone());}
public Builder MergeFrom(TimeSync prototype) { super.MergeFrom(prototype._PBJSuper);return this;}
public Builder Clear() {super.Clear();return this;}
public TimeSync BuildPartial() {return new TimeSync(super.BuildPartial());}
public TimeSync Build() {if (_HasAllPBJFields) return new TimeSync(super.Build());return null;}
public pbd::MessageDescriptor DescriptorForType {
get { return TimeSync.Descriptor; } }
public Builder ClearClientTime() { super.ClearClientTime();return this;}
public const int ClientTimeFieldTag=9;
public bool HasClientTime{ get {return super.HasClientTime&&PBJ._PBJ.ValidateTime(super.ClientTime);} }
public PBJ.Time ClientTime{ get {
if (HasClientTime) {
return PBJ._PBJ.CastTime(super.ClientTime);
} else {
return PBJ._PBJ.CastTime();
}
}
set {
super.ClientTime=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearServerTime() { super.ClearServerTime();return this;}
public const int ServerTimeFieldTag=10;
public bool HasServerTime{ get {return super.HasServerTime&&PBJ._PBJ.ValidateTime(super.ServerTime);} }
public PBJ.Time ServerTime{ get {
if (HasServerTime) {
return PBJ._PBJ.CastTime(super.ServerTime);
} else {
return PBJ._PBJ.CastTime();
}
}
set {
super.ServerTime=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearSyncRound() { super.ClearSyncRound();return this;}
public const int SyncRoundFieldTag=11;
public bool HasSyncRound{ get {return super.HasSyncRound&&PBJ._PBJ.ValidateUint64(super.SyncRound);} }
public ulong SyncRound{ get {
if (HasSyncRound) {
return PBJ._PBJ.CastUint64(super.SyncRound);
} else {
return PBJ._PBJ.CastUint64();
}
}
set {
super.SyncRound=(PBJ._PBJ.Construct(value));
}
}
public Builder ClearReturnOptions() { super.ClearReturnOptions();return this;}
public const int ReturnOptionsFieldTag=14;
public bool HasReturnOptions { get {
if (!super.HasReturnOptions) return false;
return PBJ._PBJ.ValidateFlags(super.ReturnOptions,(ulong)Types.ReturnOptions.REPLY_RELIABLE|(ulong)Types.ReturnOptions.REPLY_ORDERED);
} }
public uint ReturnOptions{ get {
if (HasReturnOptions) {
return (uint)PBJ._PBJ.CastFlags(super.ReturnOptions,(ulong)Types.ReturnOptions.REPLY_RELIABLE|(ulong)Types.ReturnOptions.REPLY_ORDERED);
} else {
return (uint)PBJ._PBJ.CastFlags((ulong)Types.ReturnOptions.REPLY_RELIABLE|(ulong)Types.ReturnOptions.REPLY_ORDERED);
}
}
set {
super.ReturnOptions=((value));
}
}
public Builder ClearRoundTrip() { super.ClearRoundTrip();return this;}
public const int RoundTripFieldTag=2561;
public bool HasRoundTrip{ get {return super.HasRoundTrip&&PBJ._PBJ.ValidateTime(super.RoundTrip);} }
public PBJ.Time RoundTrip{ get {
if (HasRoundTrip) {
return PBJ._PBJ.CastTime(super.RoundTrip);
} else {
return PBJ._PBJ.CastTime();
}
}
set {
super.RoundTrip=(PBJ._PBJ.Construct(value));
}
}
}
}
}

View File

@ -1,139 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// THIS MODULE USES CODE FROM SIRIKATA, THE SIRIKATA LICENSE IS BELOW
/*
Sirikata is Licensed using the revised BSD license.
If you have any questions, contact Patrick Horn at <patrick.horn@gmail.com>
Copyright (c) 2008, the Sirikata developers (see AUTHORS file for credit).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Sirikata nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Client.Sirikata.ClientStack;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Client.Sirikata
{
class SirikataModule : IRegionModule
{
private bool m_enabled = false;
private TcpListener m_listener;
private bool m_running = true;
private List<Scene> m_scenes = new List<Scene>();
private Dictionary<UUID,SirikataClientView> m_clients = new Dictionary<UUID, SirikataClientView>();
#region Implementation of IRegionModule
public void Initialise(Scene scene, IConfigSource source)
{
lock (m_scenes)
m_scenes.Add(scene);
}
public void PostInitialise()
{
if (!m_enabled)
return;
m_listener = new TcpListener(IPAddress.Any, 5943);
}
private void ListenLoop()
{
while (m_running)
{
m_listener.BeginAcceptTcpClient(AcceptSocket, m_listener);
}
}
private void AcceptSocket(IAsyncResult ar)
{
TcpListener listener = (TcpListener) ar.AsyncState;
TcpClient client = listener.EndAcceptTcpClient(ar);
SirikataClientView clientView = new SirikataClientView(client);
lock (m_clients)
m_clients.Add(clientView.SessionId, clientView);
}
public void Close()
{
}
public string Name
{
get { return "Sirikata ClientStack Module"; }
}
public bool IsSharedModule
{
get { return true; }
}
#endregion
}
}

View File

@ -252,7 +252,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
public event TeleportLandmarkRequest OnTeleportLandmarkRequest = delegate { };
public event DeRezObject OnDeRezObject = delegate { };
public event Action<IClientAPI> OnRegionHandShakeReply = delegate { };
public event GenericCall2 OnRequestWearables = delegate { };
public event GenericCall1 OnRequestWearables = delegate { };
public event GenericCall1 OnCompleteMovementToRegion = delegate { };
public event UpdateAgent OnPreAgentUpdate;
public event UpdateAgent OnAgentUpdate = delegate { };
@ -587,7 +587,12 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
throw new System.NotImplementedException();
}
public void SendTeleportLocationStart()
public void SendTeleportStart(uint flags)
{
throw new System.NotImplementedException();
}
public void SendTeleportProgress(uint flags, string message)
{
throw new System.NotImplementedException();
}

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
@ -17,7 +44,7 @@ namespace OpenSim.Data
/// <returns></returns>
public static UUID FromDB(object id)
{
if( (id == null) || (id == DBNull.Value))
if ((id == null) || (id == DBNull.Value))
return UUID.Zero;
if (id.GetType() == typeof(Guid))

View File

@ -40,15 +40,4 @@ namespace OpenSim.Data
void Initialise(string connect);
bool Delete(string id);
}
public class AssetDataInitialiser : PluginInitialiserBase
{
private string connect;
public AssetDataInitialiser (string s) { connect = s; }
public override void Initialise (IPlugin plugin)
{
IAssetDataPlugin p = plugin as IAssetDataPlugin;
p.Initialise (connect);
}
}
}

View File

@ -155,15 +155,4 @@ namespace OpenSim.Data
/// </returns>
List<InventoryItemBase> fetchActiveGestures(UUID avatarID);
}
public class InventoryDataInitialiser : PluginInitialiserBase
{
private string connect;
public InventoryDataInitialiser (string s) { connect = s; }
public override void Initialise (IPlugin plugin)
{
IInventoryDataPlugin p = plugin as IInventoryDataPlugin;
p.Initialise (connect);
}
}
}

View File

@ -62,6 +62,7 @@ namespace OpenSim.Data
List<RegionData> GetDefaultRegions(UUID scopeID);
List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y);
List<RegionData> GetHyperlinks(UUID scopeID);
}
[Flags]
@ -78,4 +79,26 @@ namespace OpenSim.Data
Authenticate = 256, // Require authentication
Hyperlink = 512 // Record represents a HG link
}
public class RegionDataDistanceCompare : IComparer<RegionData>
{
private Vector2 m_origin;
public RegionDataDistanceCompare(int x, int y)
{
m_origin = new Vector2(x, y);
}
public int Compare(RegionData regionA, RegionData regionB)
{
Vector2 vectorA = new Vector2(regionA.posX, regionA.posY);
Vector2 vectorB = new Vector2(regionB.posX, regionB.posY);
return Math.Sign(VectorDistance(m_origin, vectorA) - VectorDistance(m_origin, vectorB));
}
private float VectorDistance(Vector2 x, Vector2 y)
{
return (x - y).Length();
}
}
}

View File

@ -50,6 +50,15 @@ namespace OpenSim.Data.MSSQL
#region Public methods
public MSSQLEstateStore()
{
}
public MSSQLEstateStore(string connectionString)
{
Initialise(connectionString);
}
/// <summary>
/// Initialises the estatedata class.
/// </summary>

View File

@ -310,23 +310,26 @@ namespace OpenSim.Data.MSSQL
public List<RegionData> GetDefaultRegions(UUID scopeID)
{
string sql = "SELECT * FROM [" + m_Realm + "] WHERE (flags & 1) <> 0";
if (scopeID != UUID.Zero)
sql += " AND ScopeID = @scopeID";
using (SqlConnection conn = new SqlConnection(m_ConnectionString))
using (SqlCommand cmd = new SqlCommand(sql, conn))
{
cmd.Parameters.Add(m_database.CreateParameter("@scopeID", scopeID));
conn.Open();
return RunCommand(cmd);
}
return Get((int)RegionFlags.DefaultRegion, scopeID);
}
public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
{
string sql = "SELECT * FROM [" + m_Realm + "] WHERE (flags & 2) <> 0";
List<RegionData> regions = Get((int)RegionFlags.FallbackRegion, scopeID);
RegionDataDistanceCompare distanceComparer = new RegionDataDistanceCompare(x, y);
regions.Sort(distanceComparer);
return regions;
}
public List<RegionData> GetHyperlinks(UUID scopeID)
{
return Get((int)RegionFlags.Hyperlink, scopeID);
}
private List<RegionData> Get(int regionFlags, UUID scopeID)
{
string sql = "SELECT * FROM [" + m_Realm + "] WHERE (flags & " + regionFlags.ToString() + ") <> 0";
if (scopeID != UUID.Zero)
sql += " AND ScopeID = @scopeID";
@ -335,7 +338,6 @@ namespace OpenSim.Data.MSSQL
{
cmd.Parameters.Add(m_database.CreateParameter("@scopeID", scopeID));
conn.Open();
// TODO: distance-sort results
return RunCommand(cmd);
}
}

View File

@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL
/// <summary>
/// A MSSQL Interface for the Region Server.
/// </summary>
public class MSSQLRegionDataStore : IRegionDataStore
public class MSSQLSimulationData : ISimulationDataStore
{
private const string _migrationStore = "RegionStore";
@ -55,6 +55,16 @@ namespace OpenSim.Data.MSSQL
/// </summary>
private MSSQLManager _Database;
private string m_connectionString;
public MSSQLSimulationData()
{
}
public MSSQLSimulationData(string connectionString)
{
Initialise(connectionString);
}
/// <summary>
/// Initialises the region datastore
/// </summary>
@ -89,7 +99,6 @@ namespace OpenSim.Data.MSSQL
Dictionary<UUID, SceneObjectGroup> objects = new Dictionary<UUID, SceneObjectGroup>();
SceneObjectGroup grp = null;
string sql = "SELECT *, " +
"sort = CASE WHEN prims.UUID = prims.SceneGroupID THEN 0 ELSE 1 END " +
"FROM prims " +
@ -232,7 +241,7 @@ namespace OpenSim.Data.MSSQL
/// <param name="regionUUID"></param>
public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
{
_Log.InfoFormat("[MSSQL]: Adding/Changing SceneObjectGroup: {0} to region: {1}, object has {2} prims.", obj.UUID, regionUUID, obj.Children.Count);
_Log.DebugFormat("[MSSQL]: Adding/Changing SceneObjectGroup: {0} to region: {1}, object has {2} prims.", obj.UUID, regionUUID, obj.Parts.Length);
using (SqlConnection conn = new SqlConnection(m_connectionString))
{
@ -241,7 +250,7 @@ namespace OpenSim.Data.MSSQL
try
{
foreach (SceneObjectPart sceneObjectPart in obj.Children.Values)
foreach (SceneObjectPart sceneObjectPart in obj.Parts)
{
//Update prim
using (SqlCommand sqlCommand = conn.CreateCommand())
@ -291,7 +300,6 @@ namespace OpenSim.Data.MSSQL
}
}
}
}
/// <summary>
@ -327,7 +335,7 @@ IF EXISTS (SELECT UUID FROM prims WHERE UUID = @UUID)
ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice,
SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem,
ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches,
LinkNumber = @LinkNumber
LinkNumber = @LinkNumber, MediaURL = @MediaURL
WHERE UUID = @UUID
END
ELSE
@ -342,7 +350,7 @@ ELSE
PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX,
OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ,
ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA,
ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber
ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL
) VALUES (
@UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask,
@EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX,
@ -352,7 +360,7 @@ ELSE
@PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX,
@OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ,
@ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA,
@ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber
@ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL
)
END";
@ -385,7 +393,7 @@ IF EXISTS (SELECT UUID FROM primshapes WHERE UUID = @UUID)
PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions,
PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin,
ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow,
Texture = @Texture, ExtraParams = @ExtraParams, State = @State
Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media
WHERE UUID = @UUID
END
ELSE
@ -394,11 +402,11 @@ ELSE
primshapes (
UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY,
PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin,
ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State
ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media
) VALUES (
@UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY,
@PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin,
@ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State
@ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media
)
END";
@ -640,9 +648,9 @@ ELSE
//Insert new values
string sql = @"INSERT INTO [land]
([UUID],[RegionUUID],[LocalLandID],[Bitmap],[Name],[Description],[OwnerUUID],[IsGroupOwned],[Area],[AuctionID],[Category],[ClaimDate],[ClaimPrice],[GroupUUID],[SalePrice],[LandStatus],[LandFlags],[LandingType],[MediaAutoScale],[MediaTextureUUID],[MediaURL],[MusicURL],[PassHours],[PassPrice],[SnapshotUUID],[UserLocationX],[UserLocationY],[UserLocationZ],[UserLookAtX],[UserLookAtY],[UserLookAtZ],[AuthbuyerID],[OtherCleanTime],[Dwell])
([UUID],[RegionUUID],[LocalLandID],[Bitmap],[Name],[Description],[OwnerUUID],[IsGroupOwned],[Area],[AuctionID],[Category],[ClaimDate],[ClaimPrice],[GroupUUID],[SalePrice],[LandStatus],[LandFlags],[LandingType],[MediaAutoScale],[MediaTextureUUID],[MediaURL],[MusicURL],[PassHours],[PassPrice],[SnapshotUUID],[UserLocationX],[UserLocationY],[UserLocationZ],[UserLookAtX],[UserLookAtY],[UserLookAtZ],[AuthbuyerID],[OtherCleanTime])
VALUES
(@UUID,@RegionUUID,@LocalLandID,@Bitmap,@Name,@Description,@OwnerUUID,@IsGroupOwned,@Area,@AuctionID,@Category,@ClaimDate,@ClaimPrice,@GroupUUID,@SalePrice,@LandStatus,@LandFlags,@LandingType,@MediaAutoScale,@MediaTextureUUID,@MediaURL,@MusicURL,@PassHours,@PassPrice,@SnapshotUUID,@UserLocationX,@UserLocationY,@UserLocationZ,@UserLookAtX,@UserLookAtY,@UserLookAtZ,@AuthbuyerID,@OtherCleanTime,@Dwell)";
(@UUID,@RegionUUID,@LocalLandID,@Bitmap,@Name,@Description,@OwnerUUID,@IsGroupOwned,@Area,@AuctionID,@Category,@ClaimDate,@ClaimPrice,@GroupUUID,@SalePrice,@LandStatus,@LandFlags,@LandingType,@MediaAutoScale,@MediaTextureUUID,@MediaURL,@MusicURL,@PassHours,@PassPrice,@SnapshotUUID,@UserLocationX,@UserLocationY,@UserLocationZ,@UserLookAtX,@UserLookAtY,@UserLookAtZ,@AuthbuyerID,@OtherCleanTime)";
using (SqlConnection conn = new SqlConnection(m_connectionString))
using (SqlCommand cmd = new SqlCommand(sql, conn))
@ -697,6 +705,9 @@ VALUES
//Return default LL windlight settings
return new RegionLightShareData();
}
public void RemoveRegionWindlightSettings(UUID regionID)
{
}
public void StoreRegionWindlightSettings(RegionLightShareData wl)
{
//This connector doesn't support the windlight module yet
@ -956,7 +967,6 @@ VALUES
newData.SnapshotID = new UUID((Guid)row["SnapshotUUID"]);
newData.OtherCleanTime = Convert.ToInt32(row["OtherCleanTime"]);
newData.Dwell = Convert.ToInt32(row["Dwell"]);
try
{
@ -1017,7 +1027,7 @@ VALUES
prim.SitName = (string)primRow["SitName"];
prim.TouchName = (string)primRow["TouchName"];
// permissions
prim.ObjectFlags = Convert.ToUInt32(primRow["ObjectFlags"]);
prim.Flags = (PrimFlags)Convert.ToUInt32(primRow["ObjectFlags"]);
prim.CreatorID = new UUID((Guid)primRow["CreatorID"]);
prim.OwnerID = new UUID((Guid)primRow["OwnerID"]);
prim.GroupID = new UUID((Guid)primRow["GroupID"]);
@ -1128,6 +1138,9 @@ VALUES
prim.PassTouches = true;
prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]);
if (!(primRow["MediaURL"] is System.DBNull))
prim.MediaUrl = (string)primRow["MediaURL"];
return prim;
}
@ -1180,6 +1193,9 @@ VALUES
{
}
if (!(shapeRow["Media"] is System.DBNull))
baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]);
return baseShape;
}
@ -1353,7 +1369,6 @@ VALUES
parameters.Add(_Database.CreateParameter("UserLookAtZ", land.UserLookAt.Z));
parameters.Add(_Database.CreateParameter("AuthBuyerID", land.AuthBuyerID));
parameters.Add(_Database.CreateParameter("OtherCleanTime", land.OtherCleanTime));
parameters.Add(_Database.CreateParameter("Dwell", land.Dwell));
return parameters.ToArray();
}
@ -1402,7 +1417,7 @@ VALUES
parameters.Add(_Database.CreateParameter("SitName", prim.SitName));
parameters.Add(_Database.CreateParameter("TouchName", prim.TouchName));
// permissions
parameters.Add(_Database.CreateParameter("ObjectFlags", prim.ObjectFlags));
parameters.Add(_Database.CreateParameter("ObjectFlags", (uint)prim.Flags));
parameters.Add(_Database.CreateParameter("CreatorID", prim.CreatorID));
parameters.Add(_Database.CreateParameter("OwnerID", prim.OwnerID));
parameters.Add(_Database.CreateParameter("GroupID", prim.GroupID));
@ -1510,6 +1525,7 @@ VALUES
else
parameters.Add(_Database.CreateParameter("PassTouches", 0));
parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
return parameters.ToArray();
}
@ -1557,6 +1573,7 @@ VALUES
parameters.Add(_Database.CreateParameter("Texture", s.TextureEntry));
parameters.Add(_Database.CreateParameter("ExtraParams", s.ExtraParams));
parameters.Add(_Database.CreateParameter("State", s.State));
parameters.Add(_Database.CreateParameter("Media", null == s.Media ? null : s.Media.ToXml()));
return parameters.ToArray();
}

View File

@ -1,4 +1,4 @@

:VERSION 1
CREATE TABLE [dbo].[prims](
@ -925,5 +925,12 @@ ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0
COMMIT
:VERSION 24
-- Added post 0.7
BEGIN TRANSACTION
ALTER TABLE prims ADD COLUMN MediaURL varchar(255)
ALTER TABLE primshapes ADD COLUMN Media TEXT
COMMIT

View File

@ -122,7 +122,7 @@ namespace OpenSim.Data
int ver = FindVersion(_conn, "migrations");
if (ver <= 0) // -1 = no table, 0 = no version record
{
if( ver < 0 )
if (ver < 0)
ExecuteScript("create table migrations(name varchar(100), version int)");
InsertVersion("migrations", 1);
}
@ -204,7 +204,7 @@ namespace OpenSim.Data
catch (Exception e)
{
m_log.DebugFormat("[MIGRATIONS]: Cmd was {0}", e.Message.Replace("\n", " "));
m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.");
m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. If you're running OpenSim for the first time then you can probably safely ignore this, since certain migration commands attempt to fetch data out of old tables. However, if you're using an existing database and you see database related errors while running OpenSim then you will need to fix these problems manually. Continuing.");
ExecuteScript("ROLLBACK;");
}
@ -288,7 +288,7 @@ namespace OpenSim.Data
SortedList<int, string[]> migrations = new SortedList<int, string[]>();
string[] names = _assem.GetManifestResourceNames();
if( names.Length == 0 ) // should never happen
if (names.Length == 0) // should never happen
return migrations;
Array.Sort(names); // we want all the migrations ordered
@ -297,7 +297,7 @@ namespace OpenSim.Data
Match m = null;
string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase
if( (m != null) && !String.IsNullOrEmpty(sFile) )
if ((m != null) && !String.IsNullOrEmpty(sFile))
{
/* The filename should be '<StoreName>.migrations[.NNN]' where NNN
* is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip
@ -312,7 +312,7 @@ namespace OpenSim.Data
if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound))
{
if( nLastVerFound <= after )
if (nLastVerFound <= after)
goto scan_old_style;
}
@ -329,7 +329,7 @@ namespace OpenSim.Data
sb.Length = 0;
}
if ( (nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list
if ((nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list
{
migrations[nVersion] = script.ToArray();
}
@ -345,7 +345,7 @@ namespace OpenSim.Data
string sLine = resourceReader.ReadLine();
nLineNo++;
if( String.IsNullOrEmpty(sLine) || sLine.StartsWith("#") ) // ignore a comment or empty line
if (String.IsNullOrEmpty(sLine) || sLine.StartsWith("#")) // ignore a comment or empty line
continue;
if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase))
@ -392,7 +392,7 @@ scan_old_style:
if (m.Success)
{
int version = int.Parse(m.Groups[1].ToString());
if ( (version > after) && !migrations.ContainsKey(version) )
if ((version > after) && !migrations.ContainsKey(version))
{
using (Stream resource = _assem.GetManifestResourceStream(s))
{
@ -407,9 +407,8 @@ scan_old_style:
}
if (migrations.Count < 1)
{
m_log.InfoFormat("[MIGRATIONS]: {0} up to date, no migrations to apply", _type);
}
m_log.DebugFormat("[MIGRATIONS]: {0} data tables already up to date at revision {1}", _type, after);
return migrations;
}
}

View File

@ -214,9 +214,6 @@ namespace OpenSim.Data.MySQL
private void UpdateAccessTime(AssetBase asset)
{
// Writing to the database every time Get() is called on an asset is killing us. Seriously. -jph
return;
lock (m_dbLock)
{
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))

View File

@ -54,6 +54,15 @@ namespace OpenSim.Data.MySQL
private Dictionary<string, FieldInfo> m_FieldMap =
new Dictionary<string, FieldInfo>();
public MySQLEstateStore()
{
}
public MySQLEstateStore(string connectionString)
{
Initialise(connectionString);
}
public void Initialise(string connectionString)
{
m_connectionString = connectionString;

View File

@ -148,6 +148,10 @@ namespace OpenSim.Data.MySQL
foreach (string name in m_Fields.Keys)
{
if (reader[name] is DBNull)
{
continue;
}
if (m_Fields[name].FieldType == typeof(bool))
{
int v = Convert.ToInt32(reader[name]);

View File

@ -286,7 +286,7 @@ namespace OpenSim.Data.MySQL
InventoryItemBase item = new InventoryItemBase();
// TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these.
// ( DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero )
// (DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero)
item.CreatorId = reader["creatorID"].ToString();
// Be a bit safer in parsing these because the

View File

@ -78,9 +78,12 @@ namespace OpenSim.Data.MySQL
if (pd.Length == 0)
return false;
if (regionID == UUID.Zero)
return false;
MySqlCommand cmd = new MySqlCommand();
cmd.CommandText = String.Format("update {0} set RegionID=?RegionID where `SessionID`=?SessionID", m_Realm);
cmd.CommandText = String.Format("update {0} set RegionID=?RegionID, LastSeen=NOW() where `SessionID`=?SessionID", m_Realm);
cmd.Parameters.AddWithValue("?SessionID", sessionID.ToString());
cmd.Parameters.AddWithValue("?RegionID", regionID.ToString());
@ -90,6 +93,5 @@ namespace OpenSim.Data.MySQL
return true;
}
}
}

View File

@ -62,6 +62,8 @@ namespace OpenSim.Data.MySQL
if (scopeID != UUID.Zero)
command += " and ScopeID = ?scopeID";
command += " order by regionName";
using (MySqlCommand cmd = new MySqlCommand(command))
{
cmd.Parameters.AddWithValue("?regionName", regionName);
@ -210,6 +212,9 @@ namespace OpenSim.Data.MySQL
if (data.Data.ContainsKey("locY"))
data.Data.Remove("locY");
if (data.RegionName.Length > 32)
data.RegionName = data.RegionName.Substring(0, 32);
string[] fields = new List<string>(data.Data.Keys).ToArray();
using (MySqlCommand cmd = new MySqlCommand())
@ -281,22 +286,28 @@ namespace OpenSim.Data.MySQL
return false;
}
public List<RegionData> GetDefaultRegions(UUID scopeID)
{
string command = "select * from `"+m_Realm+"` where (flags & 1) <> 0";
if (scopeID != UUID.Zero)
command += " and ScopeID = ?scopeID";
MySqlCommand cmd = new MySqlCommand(command);
cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
return RunCommand(cmd);
return Get((int)RegionFlags.DefaultRegion, scopeID);
}
public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
{
string command = "select * from `"+m_Realm+"` where (flags & 2) <> 0";
List<RegionData> regions = Get((int)RegionFlags.FallbackRegion, scopeID);
RegionDataDistanceCompare distanceComparer = new RegionDataDistanceCompare(x, y);
regions.Sort(distanceComparer);
return regions;
}
public List<RegionData> GetHyperlinks(UUID scopeID)
{
return Get((int)RegionFlags.Hyperlink, scopeID);
}
private List<RegionData> Get(int regionFlags, UUID scopeID)
{
string command = "select * from `" + m_Realm + "` where (flags & " + regionFlags.ToString() + ") <> 0";
if (scopeID != UUID.Zero)
command += " and ScopeID = ?scopeID";
@ -304,7 +315,6 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
// TODO: distance-sort results
return RunCommand(cmd);
}
}

View File

@ -45,13 +45,22 @@ namespace OpenSim.Data.MySQL
/// <summary>
/// A MySQL Interface for the Region Server
/// </summary>
public class MySQLDataStore : IRegionDataStore
public class MySQLSimulationData : ISimulationDataStore
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private string m_connectionString;
private object m_dbLock = new object();
public MySQLSimulationData()
{
}
public MySQLSimulationData(string connectionString)
{
Initialise(connectionString);
}
public void Initialise(string connectionString)
{
m_connectionString = connectionString;
@ -135,7 +144,7 @@ namespace OpenSim.Data.MySQL
dbcon.Open();
MySqlCommand cmd = dbcon.CreateCommand();
foreach (SceneObjectPart prim in obj.Children.Values)
foreach (SceneObjectPart prim in obj.Parts)
{
cmd.Parameters.Clear();
@ -174,7 +183,7 @@ namespace OpenSim.Data.MySQL
"ParticleSystem, ClickAction, Material, " +
"CollisionSound, CollisionSoundVolume, " +
"PassTouches, " +
"LinkNumber) values (" + "?UUID, " +
"LinkNumber, MediaURL) values (" + "?UUID, " +
"?CreationDate, ?Name, ?Text, " +
"?Description, ?SitName, ?TouchName, " +
"?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " +
@ -205,7 +214,7 @@ namespace OpenSim.Data.MySQL
"?SaleType, ?ColorR, ?ColorG, " +
"?ColorB, ?ColorA, ?ParticleSystem, " +
"?ClickAction, ?Material, ?CollisionSound, " +
"?CollisionSoundVolume, ?PassTouches, ?LinkNumber)";
"?CollisionSoundVolume, ?PassTouches, ?LinkNumber, ?MediaURL)";
FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
@ -222,7 +231,7 @@ namespace OpenSim.Data.MySQL
"PathTaperX, PathTaperY, PathTwist, " +
"PathTwistBegin, ProfileBegin, ProfileEnd, " +
"ProfileCurve, ProfileHollow, Texture, " +
"ExtraParams, State) values (?UUID, " +
"ExtraParams, State, Media) values (?UUID, " +
"?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " +
"?PCode, ?PathBegin, ?PathEnd, " +
"?PathScaleX, ?PathScaleY, " +
@ -233,12 +242,13 @@ namespace OpenSim.Data.MySQL
"?PathTwistBegin, ?ProfileBegin, " +
"?ProfileEnd, ?ProfileCurve, " +
"?ProfileHollow, ?Texture, ?ExtraParams, " +
"?State)";
"?State, ?Media)";
FillShapeCommand(cmd, prim);
ExecuteNonQuery(cmd);
}
cmd.Dispose();
}
}
@ -246,6 +256,8 @@ namespace OpenSim.Data.MySQL
public void RemoveObject(UUID obj, UUID regionUUID)
{
// m_log.DebugFormat("[REGION DB]: Deleting scene object {0} from {1} in database", obj, regionUUID);
List<UUID> uuids = new List<UUID>();
// Formerly, this used to check the region UUID.
@ -412,6 +424,7 @@ namespace OpenSim.Data.MySQL
cmd.CommandText =
"SELECT * FROM prims LEFT JOIN primshapes ON prims.UUID = primshapes.UUID WHERE RegionUUID = ?RegionUUID";
cmd.Parameters.AddWithValue("RegionUUID", regionID.ToString());
cmd.CommandTimeout = 3600;
using (IDataReader reader = ExecuteReader(cmd))
{
@ -818,7 +831,8 @@ namespace OpenSim.Data.MySQL
"MusicURL, PassHours, PassPrice, SnapshotUUID, " +
"UserLocationX, UserLocationY, UserLocationZ, " +
"UserLookAtX, UserLookAtY, UserLookAtZ, " +
"AuthbuyerID, OtherCleanTime, Dwell) values (" +
"AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " +
"MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" +
"?UUID, ?RegionUUID, " +
"?LocalLandID, ?Bitmap, ?Name, ?Description, " +
"?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " +
@ -828,7 +842,8 @@ namespace OpenSim.Data.MySQL
"?MusicURL, ?PassHours, ?PassPrice, ?SnapshotUUID, " +
"?UserLocationX, ?UserLocationY, ?UserLocationZ, " +
"?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " +
"?AuthbuyerID, ?OtherCleanTime, ?Dwell)";
"?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+
"CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)";
FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID);
@ -865,7 +880,7 @@ namespace OpenSim.Data.MySQL
string command = "select * from `regionwindlight` where region_id = ?regionID";
using(MySqlCommand cmd = new MySqlCommand(command))
using (MySqlCommand cmd = new MySqlCommand(command))
{
cmd.Connection = dbcon;
@ -944,6 +959,7 @@ namespace OpenSim.Data.MySQL
nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]);
nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]);
nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]);
nWP.valid = true;
}
}
}
@ -1091,6 +1107,21 @@ namespace OpenSim.Data.MySQL
}
}
public void RemoveRegionWindlightSettings(UUID regionID)
{
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
using (MySqlCommand cmd = dbcon.CreateCommand())
{
cmd.CommandText = "delete from `regionwindlight` where `region_id`=?regionID";
cmd.Parameters.AddWithValue("?regionID", regionID.ToString());
ExecuteNonQuery(cmd);
}
}
}
public void StoreRegionSettings(RegionSettings rs)
{
lock (m_dbLock)
@ -1201,7 +1232,7 @@ namespace OpenSim.Data.MySQL
// depending on the MySQL connector version, CHAR(36) may be already converted to Guid!
prim.UUID = DBGuid.FromDB(row["UUID"]);
prim.CreatorID = DBGuid.FromDB(row["CreatorID"]);
prim.CreatorIdentification = (string)row["CreatorID"];
prim.OwnerID = DBGuid.FromDB(row["OwnerID"]);
prim.GroupID = DBGuid.FromDB(row["GroupID"]);
prim.LastOwnerID = DBGuid.FromDB(row["LastOwnerID"]);
@ -1223,7 +1254,7 @@ namespace OpenSim.Data.MySQL
prim.SitName = (string)row["SitName"];
prim.TouchName = (string)row["TouchName"];
// Permissions
prim.ObjectFlags = (uint)(int)row["ObjectFlags"];
prim.Flags = (PrimFlags)(int)row["ObjectFlags"];
prim.OwnerMask = (uint)(int)row["OwnerMask"];
prim.NextOwnerMask = (uint)(int)row["NextOwnerMask"];
prim.GroupMask = (uint)(int)row["GroupMask"];
@ -1327,6 +1358,9 @@ namespace OpenSim.Data.MySQL
prim.PassTouches = ((sbyte)row["PassTouches"] != 0);
prim.LinkNum = (int)row["LinkNumber"];
if (!(row["MediaURL"] is System.DBNull))
prim.MediaUrl = (string)row["MediaURL"];
return prim;
}
@ -1351,7 +1385,7 @@ namespace OpenSim.Data.MySQL
taskItem.Name = (String)row["name"];
taskItem.Description = (String)row["description"];
taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
taskItem.CreatorID = DBGuid.FromDB(row["creatorID"]);
taskItem.CreatorIdentification = (String)row["creatorID"];
taskItem.OwnerID = DBGuid.FromDB(row["ownerID"]);
taskItem.LastOwnerID = DBGuid.FromDB(row["lastOwnerID"]);
taskItem.GroupID = DBGuid.FromDB(row["groupID"]);
@ -1465,7 +1499,6 @@ namespace OpenSim.Data.MySQL
UUID.TryParse((string)row["AuthBuyerID"], out authedbuyer);
UUID.TryParse((string)row["SnapshotUUID"], out snapshotID);
newData.OtherCleanTime = Convert.ToInt32(row["OtherCleanTime"]);
newData.Dwell = Convert.ToInt32(row["Dwell"]);
newData.AuthBuyerID = authedbuyer;
newData.SnapshotID = snapshotID;
@ -1485,6 +1518,14 @@ namespace OpenSim.Data.MySQL
m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
}
newData.MediaDescription = (string) row["MediaDescription"];
newData.MediaType = (string) row["MediaType"];
newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]);
newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]);
newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
return newData;
@ -1553,8 +1594,8 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("SitName", prim.SitName);
cmd.Parameters.AddWithValue("TouchName", prim.TouchName);
// permissions
cmd.Parameters.AddWithValue("ObjectFlags", prim.ObjectFlags);
cmd.Parameters.AddWithValue("CreatorID", prim.CreatorID.ToString());
cmd.Parameters.AddWithValue("ObjectFlags", (uint)prim.Flags);
cmd.Parameters.AddWithValue("CreatorID", prim.CreatorIdentification.ToString());
cmd.Parameters.AddWithValue("OwnerID", prim.OwnerID.ToString());
cmd.Parameters.AddWithValue("GroupID", prim.GroupID.ToString());
cmd.Parameters.AddWithValue("LastOwnerID", prim.LastOwnerID.ToString());
@ -1663,6 +1704,7 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("PassTouches", 0);
cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl);
}
/// <summary>
@ -1683,7 +1725,7 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("name", taskItem.Name);
cmd.Parameters.AddWithValue("description", taskItem.Description);
cmd.Parameters.AddWithValue("creationDate", taskItem.CreationDate);
cmd.Parameters.AddWithValue("creatorID", taskItem.CreatorID);
cmd.Parameters.AddWithValue("creatorID", taskItem.CreatorIdentification);
cmd.Parameters.AddWithValue("ownerID", taskItem.OwnerID);
cmd.Parameters.AddWithValue("lastOwnerID", taskItem.LastOwnerID);
cmd.Parameters.AddWithValue("groupID", taskItem.GroupID);
@ -1787,7 +1829,14 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("UserLookAtZ", land.UserLookAt.Z);
cmd.Parameters.AddWithValue("AuthBuyerID", land.AuthBuyerID);
cmd.Parameters.AddWithValue("OtherCleanTime", land.OtherCleanTime);
cmd.Parameters.AddWithValue("Dwell", land.Dwell);
cmd.Parameters.AddWithValue("MediaDescription", land.MediaDescription);
cmd.Parameters.AddWithValue("MediaType", land.MediaType);
cmd.Parameters.AddWithValue("MediaWidth", land.MediaWidth);
cmd.Parameters.AddWithValue("MediaHeight", land.MediaHeight);
cmd.Parameters.AddWithValue("MediaLoop", land.MediaLoop);
cmd.Parameters.AddWithValue("ObscureMusic", land.ObscureMusic);
cmd.Parameters.AddWithValue("ObscureMedia", land.ObscureMedia);
}
/// <summary>
@ -1843,6 +1892,9 @@ namespace OpenSim.Data.MySQL
s.State = (byte)(int)row["State"];
if (!(row["Media"] is System.DBNull))
s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
return s;
}
@ -1885,6 +1937,7 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("Texture", s.TextureEntry);
cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams);
cmd.Parameters.AddWithValue("State", s.State);
cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml());
}
public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)

View File

@ -10,3 +10,11 @@ CREATE TABLE Avatars (
KEY(PrincipalID));
COMMIT;
:VERSION 2
BEGIN;
alter table Avatars change column Value Value text;
COMMIT;

View File

@ -99,3 +99,11 @@ BEGIN;
alter table inventoryitems modify column creatorID varchar(128) not NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 6 # ------------
BEGIN;
alter table inventoryitems modify column creatorID varchar(255) not NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;

View File

@ -13,3 +13,11 @@ CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
CREATE INDEX UserID ON Presence(UserID);
COMMIT;
:VERSION 2 # --------------------------
BEGIN;
ALTER TABLE `Presence` ADD COLUMN LastSeen timestamp;
COMMIT;

View File

@ -1,4 +1,4 @@

:VERSION 1 #---------------------
BEGIN;
@ -800,3 +800,29 @@ BEGIN;
ALTER TABLE `regionwindlight` CHANGE COLUMN `cloud_scroll_x` `cloud_scroll_x` FLOAT(4,2) NOT NULL DEFAULT '0.20' AFTER `cloud_detail_density`, CHANGE COLUMN `cloud_scroll_y` `cloud_scroll_y` FLOAT(4,2) NOT NULL DEFAULT '0.01' AFTER `cloud_scroll_x_lock`;
COMMIT;
:VERSION 35 #---------------------
BEGIN;
ALTER TABLE prims ADD COLUMN MediaURL varchar(255);
ALTER TABLE primshapes ADD COLUMN Media TEXT;
COMMIT;
:VERSION 36 #---------------------
BEGIN;
ALTER TABLE `land` ADD COLUMN `MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none' ;
ALTER TABLE `land` ADD COLUMN `MediaDescription` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0';
ALTER TABLE `land` ADD COLUMN `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE;
COMMIT;
:VERSION 37 #---------------------
BEGIN;
ALTER TABLE `prims` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `primitems` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
COMMIT;

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using OpenMetaverse;

View File

@ -164,30 +164,32 @@ namespace OpenSim.Data.Null
public List<RegionData> GetDefaultRegions(UUID scopeID)
{
if (Instance != this)
return Instance.GetDefaultRegions(scopeID);
List<RegionData> ret = new List<RegionData>();
foreach (RegionData r in m_regionData.Values)
{
if ((Convert.ToInt32(r.Data["flags"]) & 1) != 0)
ret.Add(r);
}
return ret;
return Get((int)RegionFlags.DefaultRegion, scopeID);
}
public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
{
List<RegionData> regions = Get((int)RegionFlags.FallbackRegion, scopeID);
RegionDataDistanceCompare distanceComparer = new RegionDataDistanceCompare(x, y);
regions.Sort(distanceComparer);
return regions;
}
public List<RegionData> GetHyperlinks(UUID scopeID)
{
return Get((int)RegionFlags.Hyperlink, scopeID);
}
private List<RegionData> Get(int regionFlags, UUID scopeID)
{
if (Instance != this)
return Instance.GetFallbackRegions(scopeID, x, y);
return Instance.Get(regionFlags, scopeID);
List<RegionData> ret = new List<RegionData>();
foreach (RegionData r in m_regionData.Values)
{
if ((Convert.ToInt32(r.Data["flags"]) & 2) != 0)
if ((Convert.ToInt32(r.Data["flags"]) & regionFlags) != 0)
ret.Add(r);
}

View File

@ -36,7 +36,7 @@ namespace OpenSim.Data.Null
/// <summary>
/// NULL DataStore, do not store anything
/// </summary>
public class NullDataStore : IRegionDataStore
public class NullSimulationData : ISimulationDataStore
{
public void Initialise(string dbfile)
{
@ -56,6 +56,9 @@ namespace OpenSim.Data.Null
//Return default LL windlight settings
return new RegionLightShareData();
}
public void RemoveRegionWindlightSettings(UUID regionID)
{
}
public void StoreRegionWindlightSettings(RegionLightShareData wl)
{
//This connector doesn't support the windlight module yet
@ -73,7 +76,6 @@ namespace OpenSim.Data.Null
{
}
// see IRegionDatastore
public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
{
}

View File

@ -1,5 +0,0 @@
BEGIN;
ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;

View File

@ -446,3 +446,24 @@ update land
where AuthbuyerID not like '%-%';
COMMIT;
:VERSION 19
BEGIN;
ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 20
BEGIN;
ALTER TABLE prims ADD COLUMN MediaURL varchar(255);
ALTER TABLE primshapes ADD COLUMN Media TEXT;
COMMIT;
:VERSION 21
BEGIN;
ALTER TABLE `land` ADD COLUMN `MediaType` VARCHAR(32) NOT NULL DEFAULT 'none/none';
ALTER TABLE `land` ADD COLUMN `MediaDescription` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `land` ADD COLUMN `MediaSize` VARCHAR(16) NOT NULL DEFAULT '0,0';
ALTER TABLE `land` ADD COLUMN `MediaLoop` BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE `land` ADD COLUMN `ObscureMusic` BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE `land` ADD COLUMN `ObscureMedia` BOOLEAN NOT NULL DEFAULT FALSE;
COMMIT;

View File

@ -30,7 +30,12 @@ using System.Data;
using System.Reflection;
using System.Collections.Generic;
using log4net;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
using OpenMetaverse;
using OpenSim.Framework;

View File

@ -33,7 +33,12 @@ using System.Reflection;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using Mono.Data.Sqlite;
using log4net;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
namespace OpenSim.Data.SQLite
{

View File

@ -33,7 +33,11 @@ using System.Threading;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
namespace OpenSim.Data.SQLite
{

View File

@ -30,7 +30,11 @@ using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
@ -49,6 +53,15 @@ namespace OpenSim.Data.SQLite
private Dictionary<string, FieldInfo> m_FieldMap =
new Dictionary<string, FieldInfo>();
public SQLiteEstateStore()
{
}
public SQLiteEstateStore(string connectionString)
{
Initialise(connectionString);
}
public void Initialise(string connectionString)
{
m_connectionString = connectionString;
@ -96,10 +109,17 @@ namespace OpenSim.Data.SQLite
{
EstateSettings es = new EstateSettings();
es.OnSave += StoreEstateSettings;
IDataReader r = null;
try
{
r = cmd.ExecuteReader();
}
catch (SqliteException)
{
m_log.Error("[SQLITE]: There was an issue loading the estate settings. This can happen the first time running OpenSimulator with CSharpSqlite the first time. OpenSimulator will probably crash, restart it and it should be good to go.");
}
IDataReader r = cmd.ExecuteReader();
if (r.Read())
if (r != null && r.Read())
{
foreach (string name in FieldList)
{

View File

@ -31,7 +31,11 @@ using System.Collections.Generic;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
namespace OpenSim.Data.SQLite
{

View File

@ -31,7 +31,11 @@ using System.Collections.Generic;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
namespace OpenSim.Data.SQLite
{

View File

@ -30,7 +30,11 @@ using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;

View File

@ -30,7 +30,11 @@ using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
using OpenMetaverse;
using OpenSim.Framework;
@ -152,7 +156,7 @@ namespace OpenSim.Data.SQLite
item.InvType = Convert.ToInt32(row["invType"]);
item.Folder = new UUID((string) row["parentFolderID"]);
item.Owner = new UUID((string) row["avatarID"]);
item.CreatorId = (string)row["creatorsID"];
item.CreatorIdentification = (string)row["creatorsID"];
item.Name = (string) row["inventoryName"];
item.Description = (string) row["inventoryDescription"];
@ -197,7 +201,7 @@ namespace OpenSim.Data.SQLite
row["invType"] = item.InvType;
row["parentFolderID"] = item.Folder.ToString();
row["avatarID"] = item.Owner.ToString();
row["creatorsID"] = item.CreatorId.ToString();
row["creatorsID"] = item.CreatorIdentification.ToString();
row["inventoryName"] = item.Name;
row["inventoryDescription"] = item.Description;

View File

@ -32,8 +32,13 @@ using System.Drawing;
using System.IO;
using System.Reflection;
using log4net;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
@ -43,7 +48,7 @@ namespace OpenSim.Data.SQLite
/// <summary>
/// A RegionData Interface to the SQLite database
/// </summary>
public class SQLiteRegionData : IRegionDataStore
public class SQLiteSimulationData : ISimulationDataStore
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -69,6 +74,15 @@ namespace OpenSim.Data.SQLite
private String m_connectionString;
public SQLiteSimulationData()
{
}
public SQLiteSimulationData(string connectionString)
{
Initialise(connectionString);
}
// Temporary attribute while this is experimental
/***********************************************************************
@ -78,7 +92,6 @@ namespace OpenSim.Data.SQLite
**********************************************************************/
/// <summary>
/// See IRegionDataStore
/// <list type="bullet">
/// <item>Initialises RegionData Interface</item>
/// <item>Loads and initialises a new SQLite connection and maintains it.</item>
@ -310,6 +323,9 @@ namespace OpenSim.Data.SQLite
//Return default LL windlight settings
return new RegionLightShareData();
}
public void RemoveRegionWindlightSettings(UUID regionID)
{
}
public void StoreRegionWindlightSettings(RegionLightShareData wl)
{
//This connector doesn't support the windlight module yet
@ -359,7 +375,7 @@ namespace OpenSim.Data.SQLite
lock (ds)
{
foreach (SceneObjectPart prim in obj.Children.Values)
foreach (SceneObjectPart prim in obj.Parts)
{
// m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID);
@ -535,15 +551,15 @@ namespace OpenSim.Data.SQLite
/// <param name="prim">the prim</param>
private void LoadItems(SceneObjectPart prim)
{
// m_log.DebugFormat("[SQLITE REGION DB]: Loading inventory for {0} {1}", prim.Name, prim.UUID);
// m_log.DebugFormat("[SQLITE REGION DB]: Loading inventory for {0} {1}", prim.Name, prim.UUID);
DataTable dbItems = ds.Tables["primitems"];
String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
DataRow[] dbItemRows = dbItems.Select(sql);
IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
// m_log.DebugFormat(
// "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID);
// m_log.DebugFormat(
// "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID);
foreach (DataRow row in dbItemRows)
{
@ -681,6 +697,7 @@ namespace OpenSim.Data.SQLite
DataRow landRow = land.Rows.Find(globalID.ToString());
if (landRow != null)
{
landRow.Delete();
land.Rows.Remove(landRow);
}
List<DataRow> rowsToDelete = new List<DataRow>();
@ -691,10 +708,9 @@ namespace OpenSim.Data.SQLite
}
for (int iter = 0; iter < rowsToDelete.Count; iter++)
{
rowsToDelete[iter].Delete();
landaccesslist.Rows.Remove(rowsToDelete[iter]);
}
}
Commit();
}
@ -741,6 +757,7 @@ namespace OpenSim.Data.SQLite
}
for (int iter = 0; iter < rowsToDelete.Count; iter++)
{
rowsToDelete[iter].Delete();
landaccesslist.Rows.Remove(rowsToDelete[iter]);
}
rowsToDelete.Clear();
@ -975,6 +992,8 @@ namespace OpenSim.Data.SQLite
createCol(prims, "VolumeDetect", typeof(Int16));
createCol(prims, "MediaURL", typeof(String));
// Add in contraints
prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]};
@ -1021,6 +1040,7 @@ namespace OpenSim.Data.SQLite
// way to specify this as a blob atm
createCol(shapes, "Texture", typeof (Byte[]));
createCol(shapes, "ExtraParams", typeof (Byte[]));
createCol(shapes, "Media", typeof(String));
shapes.PrimaryKey = new DataColumn[] {shapes.Columns["UUID"]};
@ -1107,7 +1127,6 @@ namespace OpenSim.Data.SQLite
createCol(land, "UserLookAtZ", typeof (Double));
createCol(land, "AuthbuyerID", typeof(String));
createCol(land, "OtherCleanTime", typeof(Int32));
createCol(land, "Dwell", typeof(Int32));
land.PrimaryKey = new DataColumn[] {land.Columns["UUID"]};
@ -1227,7 +1246,7 @@ namespace OpenSim.Data.SQLite
prim.TouchName = (String) row["TouchName"];
// permissions
prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
prim.CreatorID = new UUID((String) row["CreatorID"]);
prim.CreatorIdentification = (String) row["CreatorID"];
prim.OwnerID = new UUID((String) row["OwnerID"]);
prim.GroupID = new UUID((String) row["GroupID"]);
prim.LastOwnerID = new UUID((String) row["LastOwnerID"]);
@ -1340,6 +1359,12 @@ namespace OpenSim.Data.SQLite
if (Convert.ToInt16(row["VolumeDetect"]) != 0)
prim.VolumeDetectActive = true;
if (!(row["MediaURL"] is System.DBNull))
{
//m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType());
prim.MediaUrl = (string)row["MediaURL"];
}
return prim;
}
@ -1363,7 +1388,7 @@ namespace OpenSim.Data.SQLite
taskItem.Name = (String)row["name"];
taskItem.Description = (String)row["description"];
taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
taskItem.CreatorID = new UUID((String)row["creatorID"]);
taskItem.CreatorIdentification = (String)row["creatorID"];
taskItem.OwnerID = new UUID((String)row["ownerID"]);
taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
taskItem.GroupID = new UUID((String)row["groupID"]);
@ -1439,7 +1464,6 @@ namespace OpenSim.Data.SQLite
UUID.TryParse((string)row["AuthbuyerID"], out authBuyerID);
newData.OtherCleanTime = Convert.ToInt32(row["OtherCleanTime"]);
newData.Dwell = Convert.ToInt32(row["Dwell"]);
return newData;
}
@ -1562,7 +1586,7 @@ namespace OpenSim.Data.SQLite
row["TouchName"] = prim.TouchName;
// permissions
row["ObjectFlags"] = prim.ObjectFlags;
row["CreatorID"] = prim.CreatorID.ToString();
row["CreatorID"] = prim.CreatorIdentification.ToString();
row["OwnerID"] = prim.OwnerID.ToString();
row["GroupID"] = prim.GroupID.ToString();
row["LastOwnerID"] = prim.LastOwnerID.ToString();
@ -1614,7 +1638,6 @@ namespace OpenSim.Data.SQLite
row["PayButton3"] = prim.PayPrice[3];
row["PayButton4"] = prim.PayPrice[4];
row["TextureAnimation"] = Convert.ToBase64String(prim.TextureAnimation);
row["ParticleSystem"] = Convert.ToBase64String(prim.ParticleSystem);
@ -1675,6 +1698,7 @@ namespace OpenSim.Data.SQLite
else
row["VolumeDetect"] = 0;
row["MediaURL"] = prim.MediaUrl;
}
/// <summary>
@ -1695,7 +1719,7 @@ namespace OpenSim.Data.SQLite
row["name"] = taskItem.Name;
row["description"] = taskItem.Description;
row["creationDate"] = taskItem.CreationDate;
row["creatorID"] = taskItem.CreatorID.ToString();
row["creatorID"] = taskItem.CreatorIdentification.ToString();
row["ownerID"] = taskItem.OwnerID.ToString();
row["lastOwnerID"] = taskItem.LastOwnerID.ToString();
row["groupID"] = taskItem.GroupID.ToString();
@ -1751,7 +1775,12 @@ namespace OpenSim.Data.SQLite
row["UserLookAtZ"] = land.UserLookAt.Z;
row["AuthbuyerID"] = land.AuthBuyerID.ToString();
row["OtherCleanTime"] = land.OtherCleanTime;
row["Dwell"] = land.Dwell;
row["MediaType"] = land.MediaType;
row["MediaDescription"] = land.MediaDescription;
row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString();
row["MediaLoop"] = land.MediaLoop.ToString();
row["ObscureMusic"] = land.ObscureMusic.ToString();
row["ObscureMedia"] = land.ObscureMedia.ToString();
}
/// <summary>
@ -1849,6 +1878,10 @@ namespace OpenSim.Data.SQLite
s.TextureEntry = textureEntry;
s.ExtraParams = (byte[]) row["ExtraParams"];
if (!(row["Media"] is System.DBNull))
s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
return s;
}
@ -1892,17 +1925,19 @@ namespace OpenSim.Data.SQLite
row["Texture"] = s.TextureEntry;
row["ExtraParams"] = s.ExtraParams;
if (s.Media != null)
row["Media"] = s.Media.ToXml();
}
/// <summary>
///
/// Persistently store a prim.
/// </summary>
/// <param name="prim"></param>
/// <param name="sceneGroupID"></param>
/// <param name="regionUUID"></param>
private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
{
DataTable prims = ds.Tables["prims"];
DataTable shapes = ds.Tables["primshapes"];
@ -1932,7 +1967,6 @@ namespace OpenSim.Data.SQLite
}
/// <summary>
/// see IRegionDatastore
/// </summary>
/// <param name="primID"></param>
/// <param name="items"></param>
@ -2229,7 +2263,6 @@ namespace OpenSim.Data.SQLite
delete.Parameters.Add(createSqliteParameter("AccessUUID", typeof(String)));
da.DeleteCommand = delete;
da.DeleteCommand.Connection = conn;
}
private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn)

View File

@ -31,7 +31,11 @@ using System.Collections.Generic;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
namespace OpenSim.Data.SQLite
{
@ -66,7 +70,7 @@ namespace OpenSim.Data.SQLite
if (words.Length == 1)
{
cmd.CommandText = String.Format("select * from {0} where ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{2}%')",
cmd.CommandText = String.Format("select * from {0} where (ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{2}%')",
m_Realm, scopeID.ToString(), words[0]);
}
else

View File

@ -27,7 +27,11 @@
using System;
using System.Data;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
namespace OpenSim.Data.SQLite
{

View File

@ -29,7 +29,11 @@ using System;
using System.Data;
using System.Reflection;
using System.Collections.Generic;
using Mono.Data.Sqlite;
#if CSharpSqlite
using Community.CsharpSqlite.Sqlite;
#else
using Mono.Data.Sqlite;
#endif
using log4net;
using OpenMetaverse;
using OpenSim.Framework;

View File

@ -49,6 +49,15 @@ namespace OpenSim.Data.SQLiteLegacy
private Dictionary<string, FieldInfo> m_FieldMap =
new Dictionary<string, FieldInfo>();
public SQLiteEstateStore()
{
}
public SQLiteEstateStore(string connectionString)
{
Initialise(connectionString);
}
public void Initialise(string connectionString)
{
m_connectionString = connectionString;

View File

@ -150,7 +150,7 @@ namespace OpenSim.Data.SQLiteLegacy
item.InvType = Convert.ToInt32(row["invType"]);
item.Folder = new UUID((string) row["parentFolderID"]);
item.Owner = new UUID((string) row["avatarID"]);
item.CreatorId = (string)row["creatorsID"];
item.CreatorIdentification = (string)row["creatorsID"];
item.Name = (string) row["inventoryName"];
item.Description = (string) row["inventoryDescription"];
@ -195,7 +195,7 @@ namespace OpenSim.Data.SQLiteLegacy
row["invType"] = item.InvType;
row["parentFolderID"] = item.Folder.ToString();
row["avatarID"] = item.Owner.ToString();
row["creatorsID"] = item.CreatorId.ToString();
row["creatorsID"] = item.CreatorIdentification.ToString();
row["inventoryName"] = item.Name;
row["inventoryDescription"] = item.Description;

View File

@ -43,7 +43,7 @@ namespace OpenSim.Data.SQLiteLegacy
/// <summary>
/// A RegionData Interface to the SQLite database
/// </summary>
public class SQLiteRegionData : IRegionDataStore
public class SQLiteSimulationData : ISimulationDataStore
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -69,6 +69,15 @@ namespace OpenSim.Data.SQLiteLegacy
private String m_connectionString;
public SQLiteSimulationData()
{
}
public SQLiteSimulationData(string connectionString)
{
Initialise(connectionString);
}
// Temporary attribute while this is experimental
/***********************************************************************
@ -78,7 +87,6 @@ namespace OpenSim.Data.SQLiteLegacy
**********************************************************************/
/// <summary>
/// See IRegionDataStore
/// <list type="bullet">
/// <item>Initialises RegionData Interface</item>
/// <item>Loads and initialises a new SQLite connection and maintains it.</item>
@ -278,6 +286,9 @@ namespace OpenSim.Data.SQLiteLegacy
//Return default LL windlight settings
return new RegionLightShareData();
}
public void RemoveRegionWindlightSettings(UUID regionID)
{
}
public void StoreRegionWindlightSettings(RegionLightShareData wl)
{
//This connector doesn't support the windlight module yet
@ -327,7 +338,7 @@ namespace OpenSim.Data.SQLiteLegacy
lock (ds)
{
foreach (SceneObjectPart prim in obj.Children.Values)
foreach (SceneObjectPart prim in obj.Parts)
{
// m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
addPrim(prim, obj.UUID, regionUUID);
@ -646,6 +657,7 @@ namespace OpenSim.Data.SQLiteLegacy
DataRow landRow = land.Rows.Find(globalID.ToString());
if (landRow != null)
{
landRow.Delete();
land.Rows.Remove(landRow);
}
List<DataRow> rowsToDelete = new List<DataRow>();
@ -656,6 +668,7 @@ namespace OpenSim.Data.SQLiteLegacy
}
for (int iter = 0; iter < rowsToDelete.Count; iter++)
{
rowsToDelete[iter].Delete();
landaccesslist.Rows.Remove(rowsToDelete[iter]);
}
@ -706,6 +719,7 @@ namespace OpenSim.Data.SQLiteLegacy
}
for (int iter = 0; iter < rowsToDelete.Count; iter++)
{
rowsToDelete[iter].Delete();
landaccesslist.Rows.Remove(rowsToDelete[iter]);
}
rowsToDelete.Clear();
@ -1069,7 +1083,6 @@ namespace OpenSim.Data.SQLiteLegacy
createCol(land, "UserLookAtZ", typeof (Double));
createCol(land, "AuthbuyerID", typeof(String));
createCol(land, "OtherCleanTime", typeof(Int32));
createCol(land, "Dwell", typeof(Int32));
land.PrimaryKey = new DataColumn[] {land.Columns["UUID"]};
@ -1187,8 +1200,8 @@ namespace OpenSim.Data.SQLiteLegacy
prim.SitName = (String) row["SitName"];
prim.TouchName = (String) row["TouchName"];
// permissions
prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
prim.CreatorID = new UUID((String) row["CreatorID"]);
prim.Flags = (PrimFlags)Convert.ToUInt32(row["ObjectFlags"]);
prim.CreatorIdentification = (String) row["CreatorID"];
prim.OwnerID = new UUID((String) row["OwnerID"]);
prim.GroupID = new UUID((String) row["GroupID"]);
prim.LastOwnerID = new UUID((String) row["LastOwnerID"]);
@ -1324,7 +1337,7 @@ namespace OpenSim.Data.SQLiteLegacy
taskItem.Name = (String)row["name"];
taskItem.Description = (String)row["description"];
taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
taskItem.CreatorID = new UUID((String)row["creatorID"]);
taskItem.CreatorIdentification = (String)row["creatorID"];
taskItem.OwnerID = new UUID((String)row["ownerID"]);
taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
taskItem.GroupID = new UUID((String)row["groupID"]);
@ -1400,7 +1413,6 @@ namespace OpenSim.Data.SQLiteLegacy
UUID.TryParse((string)row["AuthbuyerID"], out authBuyerID);
newData.OtherCleanTime = Convert.ToInt32(row["OtherCleanTime"]);
newData.Dwell = Convert.ToInt32(row["Dwell"]);
return newData;
}
@ -1521,8 +1533,8 @@ namespace OpenSim.Data.SQLiteLegacy
row["SitName"] = prim.SitName;
row["TouchName"] = prim.TouchName;
// permissions
row["ObjectFlags"] = prim.ObjectFlags;
row["CreatorID"] = prim.CreatorID.ToString();
row["ObjectFlags"] = (uint)prim.Flags;
row["CreatorID"] = prim.CreatorIdentification.ToString();
row["OwnerID"] = prim.OwnerID.ToString();
row["GroupID"] = prim.GroupID.ToString();
row["LastOwnerID"] = prim.LastOwnerID.ToString();
@ -1655,7 +1667,7 @@ namespace OpenSim.Data.SQLiteLegacy
row["name"] = taskItem.Name;
row["description"] = taskItem.Description;
row["creationDate"] = taskItem.CreationDate;
row["creatorID"] = taskItem.CreatorID.ToString();
row["creatorID"] = taskItem.CreatorIdentification.ToString();
row["ownerID"] = taskItem.OwnerID.ToString();
row["lastOwnerID"] = taskItem.LastOwnerID.ToString();
row["groupID"] = taskItem.GroupID.ToString();
@ -1711,7 +1723,6 @@ namespace OpenSim.Data.SQLiteLegacy
row["UserLookAtZ"] = land.UserLookAt.Z;
row["AuthbuyerID"] = land.AuthBuyerID.ToString();
row["OtherCleanTime"] = land.OtherCleanTime;
row["Dwell"] = land.Dwell;
}
/// <summary>
@ -1891,7 +1902,6 @@ namespace OpenSim.Data.SQLiteLegacy
}
/// <summary>
/// see IRegionDatastore
/// </summary>
/// <param name="primID"></param>
/// <param name="items"></param>

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.IO;
using System.Collections.Generic;
using log4net.Config;
@ -118,12 +145,12 @@ namespace OpenSim.Data.Tests
{
if (m_service != null)
{
if( m_service is IDisposable)
if (m_service is IDisposable)
((IDisposable)m_service).Dispose();
m_service = null;
}
if( !String.IsNullOrEmpty(m_file) && File.Exists(m_file) )
if (!String.IsNullOrEmpty(m_file) && File.Exists(m_file))
File.Delete(m_file);
}

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

View File

@ -37,11 +37,6 @@ using log4net;
using System.Reflection;
using System.Data.Common;
#if !NUNIT25
using NUnit.Framework.SyntaxHelpers;
#endif
// DBMS-specific:
using MySql.Data.MySqlClient;
using OpenSim.Data.MySQL;
@ -52,7 +47,6 @@ using OpenSim.Data.MSSQL;
using Mono.Data.Sqlite;
using OpenSim.Data.SQLite;
namespace OpenSim.Data.Tests
{

View File

@ -37,10 +37,6 @@ using log4net;
using System.Reflection;
using System.Data.Common;
#if !NUNIT25
using NUnit.Framework.SyntaxHelpers;
#endif
// DBMS-specific:
using MySql.Data.MySqlClient;
using OpenSim.Data.MySQL;
@ -327,7 +323,8 @@ namespace OpenSim.Data.Tests
.IgnoreProperty(x => x.InvType)
.IgnoreProperty(x => x.CreatorIdAsUuid)
.IgnoreProperty(x => x.Description)
.IgnoreProperty(x => x.CreatorId));
.IgnoreProperty(x => x.CreatorId)
.IgnoreProperty(x => x.CreatorData));
inventoryScrambler.Scramble(expected);
db.updateInventoryItem(expected);
@ -337,7 +334,8 @@ namespace OpenSim.Data.Tests
.IgnoreProperty(x => x.InvType)
.IgnoreProperty(x => x.CreatorIdAsUuid)
.IgnoreProperty(x => x.Description)
.IgnoreProperty(x => x.CreatorId));
.IgnoreProperty(x => x.CreatorId)
.IgnoreProperty(x => x.CreatorData));
}
[Test]

View File

@ -40,10 +40,6 @@ using log4net;
using System.Reflection;
using System.Data.Common;
#if !NUNIT25
using NUnit.Framework.SyntaxHelpers;
#endif
// DBMS-specific:
using MySql.Data.MySqlClient;
using OpenSim.Data.MySQL;
@ -65,17 +61,17 @@ namespace OpenSim.Data.Tests
#else
[TestFixture(Description = "Region store tests (SQLite)")]
public class SQLiteRegionTests : RegionTests<SqliteConnection, SQLiteRegionData>
public class SQLiteRegionTests : RegionTests<SqliteConnection, SQLiteSimulationData>
{
}
[TestFixture(Description = "Region store tests (MySQL)")]
public class MySqlRegionTests : RegionTests<MySqlConnection, MySQLDataStore>
public class MySqlRegionTests : RegionTests<MySqlConnection, MySQLSimulationData>
{
}
[TestFixture(Description = "Region store tests (MS SQL Server)")]
public class MSSQLRegionTests : RegionTests<SqlConnection, MSSQLRegionDataStore>
public class MSSQLRegionTests : RegionTests<SqlConnection, MSSQLSimulationData>
{
}
@ -83,11 +79,11 @@ namespace OpenSim.Data.Tests
public class RegionTests<TConn, TRegStore> : BasicDataServiceTest<TConn, TRegStore>
where TConn : DbConnection, new()
where TRegStore : class, IRegionDataStore, new()
where TRegStore : class, ISimulationDataStore, new()
{
bool m_rebuildDB;
public IRegionDataStore db;
public ISimulationDataStore db;
public UUID zero = UUID.Zero;
public UUID region1 = UUID.Random();
public UUID region2 = UUID.Random();
@ -126,7 +122,7 @@ namespace OpenSim.Data.Tests
protected override void InitService(object service)
{
ClearDB();
db = (IRegionDataStore)service;
db = (ISimulationDataStore)service;
db.Initialise(m_connStr);
}
@ -236,7 +232,7 @@ namespace OpenSim.Data.Tests
sog.AddPart(p2);
sog.AddPart(p3);
SceneObjectPart[] parts = sog.GetParts();
SceneObjectPart[] parts = sog.Parts;
Assert.That(parts.Length,Is.EqualTo(4), "Assert.That(parts.Length,Is.EqualTo(4))");
db.StoreObject(sog, newregion);
@ -244,7 +240,7 @@ namespace OpenSim.Data.Tests
Assert.That(sogs.Count,Is.EqualTo(1), "Assert.That(sogs.Count,Is.EqualTo(1))");
SceneObjectGroup newsog = sogs[0];
SceneObjectPart[] newparts = newsog.GetParts();
SceneObjectPart[] newparts = newsog.Parts;
Assert.That(newparts.Length,Is.EqualTo(4), "Assert.That(newparts.Length,Is.EqualTo(4))");
Assert.That(newsog.HasChildPrim(tmp0), "Assert.That(newsog.HasChildPrim(tmp0))");
@ -317,7 +313,7 @@ namespace OpenSim.Data.Tests
sop.CreatorID = creator;
sop.InventorySerial = iserial;
sop.TaskInventory = dic;
sop.ObjectFlags = objf;
sop.Flags = (PrimFlags)objf;
sop.Name = name;
sop.Material = material;
sop.ScriptAccessPin = pin;
@ -350,7 +346,7 @@ namespace OpenSim.Data.Tests
// Modified in-class
// Assert.That(iserial,Is.EqualTo(sop.InventorySerial), "Assert.That(iserial,Is.EqualTo(sop.InventorySerial))");
Assert.That(dic,Is.EqualTo(sop.TaskInventory), "Assert.That(dic,Is.EqualTo(sop.TaskInventory))");
Assert.That(objf,Is.EqualTo(sop.ObjectFlags), "Assert.That(objf,Is.EqualTo(sop.ObjectFlags))");
Assert.That(objf, Is.EqualTo((uint)sop.Flags), "Assert.That(objf,Is.EqualTo(sop.Flags))");
Assert.That(name,Is.EqualTo(sop.Name), "Assert.That(name,Is.EqualTo(sop.Name))");
Assert.That(material,Is.EqualTo(sop.Material), "Assert.That(material,Is.EqualTo(sop.Material))");
Assert.That(pin,Is.EqualTo(sop.ScriptAccessPin), "Assert.That(pin,Is.EqualTo(sop.ScriptAccessPin))");
@ -373,7 +369,7 @@ namespace OpenSim.Data.Tests
Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))");
// This is necessary or object will not be inserted in DB
sop.ObjectFlags = 0;
sop.Flags = PrimFlags.None;
SceneObjectGroup sog = new SceneObjectGroup(sop);
@ -398,7 +394,7 @@ namespace OpenSim.Data.Tests
Assert.That(creator,Is.EqualTo(p.CreatorID), "Assert.That(creator,Is.EqualTo(p.CreatorID))");
//Assert.That(iserial,Is.EqualTo(p.InventorySerial), "Assert.That(iserial,Is.EqualTo(p.InventorySerial))");
Assert.That(dic,Is.EqualTo(p.TaskInventory), "Assert.That(dic,Is.EqualTo(p.TaskInventory))");
//Assert.That(objf,Is.EqualTo(p.ObjectFlags), "Assert.That(objf,Is.EqualTo(p.ObjectFlags))");
//Assert.That(objf, Is.EqualTo((uint)p.Flags), "Assert.That(objf,Is.EqualTo(p.Flags))");
Assert.That(name,Is.EqualTo(p.Name), "Assert.That(name,Is.EqualTo(p.Name))");
Assert.That(material,Is.EqualTo(p.Material), "Assert.That(material,Is.EqualTo(p.Material))");
Assert.That(pin,Is.EqualTo(p.ScriptAccessPin), "Assert.That(pin,Is.EqualTo(p.ScriptAccessPin))");
@ -564,7 +560,7 @@ namespace OpenSim.Data.Tests
}
SceneObjectGroup retsog = FindSOG("Test SOG", region4);
SceneObjectPart[] parts = retsog.GetParts();
SceneObjectPart[] parts = retsog.Parts;
for (int i=0;i<30;i++)
{
SceneObjectPart cursop = mydic[parts[i].UUID];
@ -611,7 +607,7 @@ namespace OpenSim.Data.Tests
sog.AddPart(p2);
sog.AddPart(p3);
SceneObjectPart[] parts = sog.GetParts();
SceneObjectPart[] parts = sog.Parts;
Assert.That(parts.Length, Is.EqualTo(4), "Assert.That(parts.Length,Is.EqualTo(4))");
db.StoreObject(sog, newregion);
@ -619,7 +615,7 @@ namespace OpenSim.Data.Tests
Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count,Is.EqualTo(1))");
SceneObjectGroup newsog = sogs[0];
SceneObjectPart[] newparts = newsog.GetParts();
SceneObjectPart[] newparts = newsog.Parts;
Assert.That(newparts.Length, Is.EqualTo(4), "Assert.That(newparts.Length,Is.EqualTo(4))");
Assert.That(newsog, Constraints.PropertyCompareConstraint(sog)
@ -629,7 +625,7 @@ namespace OpenSim.Data.Tests
.IgnoreProperty(x=>x.RegionHandle)
.IgnoreProperty(x=>x.RegionUUID)
.IgnoreProperty(x=>x.Scene)
.IgnoreProperty(x=>x.Children)
.IgnoreProperty(x=>x.Parts)
.IgnoreProperty(x=>x.PassCollision)
.IgnoreProperty(x=>x.RootPart));
}

View File

@ -1,252 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
namespace OpenSim.Framework
{
// ACL Class
// Modelled after the structure of the Zend ACL Framework Library
// with one key difference - the tree will search for all matching
// permissions rather than just the first. Deny permissions will
// override all others.
#region ACL Core Class
/// <summary>
/// Access Control List Engine
/// </summary>
public class ACL
{
private Dictionary<string, Resource> Resources = new Dictionary<string, Resource>();
private Dictionary<string, Role> Roles = new Dictionary<string, Role>();
/// <summary>
/// Adds a new role
/// </summary>
/// <param name="role"></param>
/// <returns></returns>
public ACL AddRole(Role role)
{
if (Roles.ContainsKey(role.Name))
throw new AlreadyContainsRoleException(role);
Roles.Add(role.Name, role);
return this;
}
/// <summary>
/// Adds a new resource
/// </summary>
/// <param name="resource"></param>
/// <returns></returns>
public ACL AddResource(Resource resource)
{
Resources.Add(resource.Name, resource);
return this;
}
/// <summary>
/// Permision for user/roll on a resource
/// </summary>
/// <param name="role"></param>
/// <param name="resource"></param>
/// <returns></returns>
public Permission HasPermission(string role, string resource)
{
if (!Roles.ContainsKey(role))
throw new KeyNotFoundException();
if (!Resources.ContainsKey(resource))
throw new KeyNotFoundException();
return Roles[role].RequestPermission(resource);
}
public ACL GrantPermission(string role, string resource)
{
if (!Roles.ContainsKey(role))
throw new KeyNotFoundException();
if (!Resources.ContainsKey(resource))
throw new KeyNotFoundException();
Roles[role].GivePermission(resource, Permission.Allow);
return this;
}
public ACL DenyPermission(string role, string resource)
{
if (!Roles.ContainsKey(role))
throw new KeyNotFoundException();
if (!Resources.ContainsKey(resource))
throw new KeyNotFoundException();
Roles[role].GivePermission(resource, Permission.Deny);
return this;
}
public ACL ResetPermission(string role, string resource)
{
if (!Roles.ContainsKey(role))
throw new KeyNotFoundException();
if (!Resources.ContainsKey(resource))
throw new KeyNotFoundException();
Roles[role].GivePermission(resource, Permission.None);
return this;
}
}
#endregion
#region Exceptions
/// <summary>
/// Thrown when an ACL attempts to add a duplicate role.
/// </summary>
public class AlreadyContainsRoleException : Exception
{
protected Role m_role;
public AlreadyContainsRoleException(Role role)
{
m_role = role;
}
public Role ErrorRole
{
get { return m_role; }
}
public override string ToString()
{
return "This ACL already contains a role called '" + m_role.Name + "'.";
}
}
#endregion
#region Roles and Resources
/// <summary>
/// Does this Role have permission to access a specified Resource?
/// </summary>
public enum Permission
{
Deny,
None,
Allow
} ;
/// <summary>
/// A role class, for use with Users or Groups
/// </summary>
public class Role
{
private string m_name;
private Role[] m_parents;
private Dictionary<string, Permission> m_resources = new Dictionary<string, Permission>();
public Role(string name)
{
m_name = name;
m_parents = null;
}
public Role(string name, Role[] parents)
{
m_name = name;
m_parents = parents;
}
public string Name
{
get { return m_name; }
}
public Permission RequestPermission(string resource)
{
return RequestPermission(resource, Permission.None);
}
public Permission RequestPermission(string resource, Permission current)
{
// Deny permissions always override any others
if (current == Permission.Deny)
return current;
Permission temp = Permission.None;
// Pickup non-None permissions
if (m_resources.ContainsKey(resource) && m_resources[resource] != Permission.None)
temp = m_resources[resource];
if (m_parents != null)
{
foreach (Role parent in m_parents)
{
temp = parent.RequestPermission(resource, temp);
}
}
return temp;
}
public void GivePermission(string resource, Permission perm)
{
m_resources[resource] = perm;
}
}
public class Resource
{
private string m_name;
public Resource(string name)
{
m_name = name;
}
public string Name
{
get { return m_name; }
}
}
#endregion
}

View File

@ -26,7 +26,9 @@
*/
using System;
using System.Reflection;
using System.Collections.Generic;
using log4net;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
@ -38,6 +40,12 @@ namespace OpenSim.Framework
/// </summary>
public class AgentCircuitData
{
// DEBUG ON
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
// DEBUG OFF
/// <summary>
/// Avatar Unique Agent Identifier
/// </summary>
@ -108,10 +116,30 @@ namespace OpenSim.Framework
public string ServiceSessionID = string.Empty;
/// <summary>
/// Viewer's version string
/// The client's IP address, as captured by the login service
/// </summary>
public string IPAddress;
/// <summary>
/// Viewer's version string as reported by the viewer at login
/// </summary>
public string Viewer;
/// <summary>
/// The channel strinf sent by the viewer at login
/// </summary>
public string Channel;
/// <summary>
/// The Mac address as reported by the viewer at login
/// </summary>
public string Mac;
/// <summary>
/// The id0 as reported by the viewer at login
/// </summary>
public string Id0;
/// <summary>
/// Position the Agent's Avatar starts in the region
/// </summary>
@ -178,37 +206,18 @@ namespace OpenSim.Framework
args["service_session_id"] = OSD.FromString(ServiceSessionID);
args["start_pos"] = OSD.FromString(startpos.ToString());
args["appearance_serial"] = OSD.FromInteger(Appearance.Serial);
args["client_ip"] = OSD.FromString(IPAddress);
args["viewer"] = OSD.FromString(Viewer);
args["channel"] = OSD.FromString(Channel);
args["mac"] = OSD.FromString(Mac);
args["id0"] = OSD.FromString(Id0);
if (Appearance != null)
{
//System.Console.WriteLine("XXX Before packing Wearables");
if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
{
OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2);
foreach (AvatarWearable awear in Appearance.Wearables)
{
wears.Add(OSD.FromUUID(awear.ItemID));
wears.Add(OSD.FromUUID(awear.AssetID));
//System.Console.WriteLine("XXX ItemID=" + awear.ItemID + " assetID=" + awear.AssetID);
}
args["wearables"] = wears;
}
args["appearance_serial"] = OSD.FromInteger(Appearance.Serial);
//System.Console.WriteLine("XXX Before packing Attachments");
Dictionary<int, UUID[]> attachments = Appearance.GetAttachmentDictionary();
if ((attachments != null) && (attachments.Count > 0))
{
OSDArray attachs = new OSDArray(attachments.Count);
foreach (KeyValuePair<int, UUID[]> kvp in attachments)
{
AttachmentData adata = new AttachmentData(kvp.Key, kvp.Value[0], kvp.Value[1]);
attachs.Add(adata.PackUpdateMessage());
//System.Console.WriteLine("XXX att.pt=" + kvp.Key + "; itemID=" + kvp.Value[0] + "; assetID=" + kvp.Value[1]);
}
args["attachments"] = attachs;
}
OSDMap appmap = Appearance.Pack();
args["packed_appearance"] = appmap;
}
if (ServiceURLs != null && ServiceURLs.Count > 0)
@ -279,38 +288,47 @@ namespace OpenSim.Framework
SessionID = args["session_id"].AsUUID();
if (args["service_session_id"] != null)
ServiceSessionID = args["service_session_id"].AsString();
if (args["client_ip"] != null)
IPAddress = args["client_ip"].AsString();
if (args["viewer"] != null)
Viewer = args["viewer"].AsString();
if (args["channel"] != null)
Channel = args["channel"].AsString();
if (args["mac"] != null)
Mac = args["mac"].AsString();
if (args["id0"] != null)
Id0 = args["id0"].AsString();
if (args["start_pos"] != null)
Vector3.TryParse(args["start_pos"].AsString(), out startpos);
// DEBUG ON
m_log.WarnFormat("[AGENTCIRCUITDATA] agentid={0}, child={1}, startpos={2}",AgentID,child,startpos.ToString());
// DEBUG OFF
try {
// Unpack various appearance elements
Appearance = new AvatarAppearance(AgentID);
// Eventually this code should be deprecated, use full appearance
// packing in packed_appearance
if (args["appearance_serial"] != null)
Appearance.Serial = args["appearance_serial"].AsInteger();
if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
{
OSDArray wears = (OSDArray)(args["wearables"]);
for (int i = 0; i < wears.Count / 2; i++)
{
Appearance.Wearables[i].ItemID = wears[i*2].AsUUID();
Appearance.Wearables[i].AssetID = wears[(i*2)+1].AsUUID();
}
}
if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array)
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
{
OSDArray attachs = (OSDArray)(args["attachments"]);
AttachmentData[] attachments = new AttachmentData[attachs.Count];
int i = 0;
foreach (OSD o in attachs)
{
if (o.Type == OSDType.Map)
{
attachments[i++] = new AttachmentData((OSDMap)o);
}
}
Appearance.SetAttachments(attachments);
Appearance.Unpack((OSDMap)args["packed_appearance"]);
// DEBUG ON
m_log.WarnFormat("[AGENTCIRCUITDATA] unpacked appearance");
// DEBUG OFF
}
// DEBUG ON
else
m_log.Warn("[AGENTCIRCUITDATA] failed to find a valid packed_appearance");
// DEBUG OFF
} catch (Exception e)
{
m_log.ErrorFormat("[AGENTCIRCUITDATA] failed to unpack appearance; {0}",e.Message);
}
ServiceURLs = new Dictionary<string, object>();
@ -349,6 +367,9 @@ namespace OpenSim.Framework
public float startposy;
public float startposz;
public string Viewer;
public string Channel;
public string Mac;
public string Id0;
public sAgentCircuitData()
{

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/*
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@ -24,42 +24,55 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.ServiceProcess;
using System.Text;
using OpenSim.GridLaunch.GUI;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.GridLaunch
namespace OpenSim.Framework
{
internal class Service: ServiceBase, IGUI
public class AvatarAttachment
{
private ServiceBase[] ServicesToRun;
public Service()
public int AttachPoint;
public UUID ItemID;
public UUID AssetID;
public AvatarAttachment(AvatarAttachment attach)
{
ServicesToRun = new ServiceBase[] {this};
AttachPoint = attach.AttachPoint;
ItemID = attach.ItemID;
AssetID = attach.AssetID;
}
public void StartGUI()
public AvatarAttachment(int point, UUID item, UUID asset)
{
ServiceBase.Run(ServicesToRun);
AttachPoint = point;
ItemID = item;
AssetID = asset;
}
public void StopGUI()
public AvatarAttachment(OSDMap args)
{
// Nothing
Unpack(args);
}
protected override void OnStart(string[] args)
public OSDMap Pack()
{
// Command line arguments override settings
Program.Settings.ParseCommandArguments(args);
OSDMap attachdata = new OSDMap();
attachdata["point"] = OSD.FromInteger(AttachPoint);
attachdata["item"] = OSD.FromUUID(ItemID);
attachdata["asset"] = OSD.FromUUID(AssetID);
return attachdata;
}
protected override void OnStop()
{
Program.Shutdown();
}
public void Unpack(OSDMap args)
{
if (args["point"] != null)
AttachPoint = args["point"].AsInteger();
ItemID = (args["item"] != null) ? args["item"].AsUUID() : UUID.Zero;
AssetID = (args["asset"] != null) ? args["asset"].AsUUID() : UUID.Zero;
}
}
}

View File

@ -26,56 +26,227 @@
*/
using System;
using System.Runtime.Serialization;
using System.Security.Permissions;
using System.Collections.Generic;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework
{
public struct WearableItem
{
public UUID ItemID;
public UUID AssetID;
public WearableItem(UUID itemID, UUID assetID)
{
ItemID = itemID;
AssetID = assetID;
}
}
public class AvatarWearable
{
public UUID AssetID = new UUID("00000000-0000-0000-0000-000000000000");
public UUID ItemID = new UUID("00000000-0000-0000-0000-000000000000");
// these are guessed at by the list here -
// http://wiki.secondlife.com/wiki/Avatar_Appearance. We'll
// correct them over time for when were are wrong.
public static readonly int BODY = 0;
public static readonly int SKIN = 1;
public static readonly int HAIR = 2;
public static readonly int EYES = 3;
public static readonly int SHIRT = 4;
public static readonly int PANTS = 5;
public static readonly int SHOES = 6;
public static readonly int SOCKS = 7;
public static readonly int JACKET = 8;
public static readonly int GLOVES = 9;
public static readonly int UNDERSHIRT = 10;
public static readonly int UNDERPANTS = 11;
public static readonly int SKIRT = 12;
public static readonly int ALPHA = 13;
public static readonly int TATTOO = 14;
public static readonly int MAX_WEARABLES = 15;
public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
public static readonly UUID DEFAULT_HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66");
public static readonly UUID DEFAULT_HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66");
public static readonly UUID DEFAULT_SKIN_ITEM = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
public static readonly UUID DEFAULT_SKIN_ASSET = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb");
public static readonly UUID DEFAULT_SHIRT_ITEM = new UUID("77c41e39-38f9-f75a-0000-585989bf0000");
public static readonly UUID DEFAULT_SHIRT_ASSET = new UUID("00000000-38f9-1111-024e-222222111110");
public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
// public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8");
// public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594");
// public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
// public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
private static AvatarWearable[] defaultWearables = null;
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
protected List<UUID> m_ids = new List<UUID>();
public AvatarWearable()
{
}
public AvatarWearable(UUID itemId, UUID assetId)
public AvatarWearable(UUID itemID, UUID assetID)
{
AssetID = assetId;
ItemID = itemId;
Wear(itemID, assetID);
}
public AvatarWearable(OSDArray args)
{
Unpack(args);
}
public OSD Pack()
{
OSDArray wearlist = new OSDArray();
foreach (UUID id in m_ids)
{
OSDMap weardata = new OSDMap();
weardata["item"] = OSD.FromUUID(id);
weardata["asset"] = OSD.FromUUID(m_items[id]);
wearlist.Add(weardata);
}
return wearlist;
}
public void Unpack(OSDArray args)
{
Clear();
foreach (OSDMap weardata in args)
{
Add(weardata["item"].AsUUID(), weardata["asset"].AsUUID());
}
}
public int Count
{
get { return m_ids.Count; }
}
public void Add(UUID itemID, UUID assetID)
{
if (itemID == UUID.Zero)
return;
if (m_items.ContainsKey(itemID))
{
m_items[itemID] = assetID;
return;
}
if (m_ids.Count >= 5)
return;
m_ids.Add(itemID);
m_items[itemID] = assetID;
}
public void Wear(WearableItem item)
{
Wear(item.ItemID, item.AssetID);
}
public void Wear(UUID itemID, UUID assetID)
{
Clear();
Add(itemID, assetID);
}
public void Clear()
{
m_ids.Clear();
m_items.Clear();
}
public void RemoveItem(UUID itemID)
{
if (m_items.ContainsKey(itemID))
{
m_ids.Remove(itemID);
m_items.Remove(itemID);
}
}
public void RemoveAsset(UUID assetID)
{
UUID itemID = UUID.Zero;
foreach (KeyValuePair<UUID, UUID> kvp in m_items)
{
if (kvp.Value == assetID)
{
itemID = kvp.Key;
break;
}
}
if (itemID != UUID.Zero)
{
m_ids.Remove(itemID);
m_items.Remove(itemID);
}
}
public WearableItem this [int idx]
{
get
{
if (idx >= m_ids.Count || idx < 0)
return new WearableItem(UUID.Zero, UUID.Zero);
return new WearableItem(m_ids[idx], m_items[m_ids[idx]]);
}
}
public UUID GetAsset(UUID itemID)
{
if (!m_items.ContainsKey(itemID))
return UUID.Zero;
return m_items[itemID];
}
public static AvatarWearable[] DefaultWearables
{
get
{
AvatarWearable[] defaultWearables = new AvatarWearable[13]; //should be 13 of these
for (int i = 0; i < 13; i++)
defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
for (int i = 0; i < MAX_WEARABLES; i++)
{
defaultWearables[i] = new AvatarWearable();
}
// Body
defaultWearables[0].ItemID = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
defaultWearables[BODY].Add(DEFAULT_BODY_ITEM, DEFAULT_BODY_ASSET);
// Hair
defaultWearables[2].ItemID = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66");
defaultWearables[2].AssetID = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66");
defaultWearables[HAIR].Add(DEFAULT_HAIR_ITEM, DEFAULT_HAIR_ASSET);
// Skin
defaultWearables[1].ItemID = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
defaultWearables[1].AssetID = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb");
defaultWearables[SKIN].Add(DEFAULT_SKIN_ITEM, DEFAULT_SKIN_ASSET);
// Shirt
defaultWearables[4].ItemID = new UUID("77c41e39-38f9-f75a-0000-585989bf0000");
defaultWearables[4].AssetID = new UUID("00000000-38f9-1111-024e-222222111110");
defaultWearables[SHIRT].Add(DEFAULT_SHIRT_ITEM, DEFAULT_SHIRT_ASSET);
// Pants
defaultWearables[5].ItemID = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
defaultWearables[5].AssetID = new UUID("00000000-38f9-1111-024e-222222111120");
defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET);
// // Alpha
// defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET);
// // Tattoo
// defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET);
return defaultWearables;
}

View File

@ -31,6 +31,7 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
using log4net;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
@ -44,6 +45,8 @@ namespace OpenSim.Framework.Capabilities
string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder,
byte[] data, string inventoryType, string assetType);
public delegate void UploadedBakedTexture(UUID assetID, byte[] data);
public delegate UUID UpdateItem(UUID itemID, byte[] data);
public delegate void UpdateTaskScript(UUID itemID, UUID primID, bool isScriptRunning, byte[] data, ref ArrayList errors);
@ -97,6 +100,7 @@ namespace OpenSim.Framework.Capabilities
// private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module.
// private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule.
private static readonly string m_uploadBakedTexturePath = "0010/";// This is in the LandManagementModule.
//private string eventQueue = "0100/";
private IScene m_Scene;
@ -109,6 +113,8 @@ namespace OpenSim.Framework.Capabilities
private string m_regionName;
private object m_fetchLock = new Object();
private bool m_persistBakedTextures = false;
public bool SSLCaps
{
get { return m_httpListener.UseSSL; }
@ -142,7 +148,16 @@ namespace OpenSim.Framework.Capabilities
m_httpListenPort = httpPort;
if (httpServer.UseSSL)
m_persistBakedTextures = false;
IConfigSource config = m_Scene.Config;
if (config != null)
{
IConfig sconfig = config.Configs["Startup"];
if (sconfig != null)
m_persistBakedTextures = sconfig.GetBoolean("PersistBakedTextures",m_persistBakedTextures);
}
if (httpServer != null && httpServer.UseSSL)
{
m_httpListenPort = httpServer.SSLPort;
httpListen = httpServer.SSLCommonName;
@ -151,7 +166,7 @@ namespace OpenSim.Framework.Capabilities
m_agentID = agent;
m_dumpAssetsToFile = dumpAssetsToFile;
m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, httpServer.UseSSL);
m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, (httpServer == null) ? false : httpServer.UseSSL);
m_regionName = regionName;
}
@ -185,6 +200,8 @@ namespace OpenSim.Framework.Capabilities
m_capsHandlers["UpdateScriptTaskInventory"] =
new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
m_capsHandlers["UpdateScriptTask"] = m_capsHandlers["UpdateScriptTaskInventory"];
m_capsHandlers["UploadBakedTexture"] =
new RestStreamHandler("POST", capsBase + m_uploadBakedTexturePath, UploadBakedTexture);
}
catch (Exception e)
@ -742,6 +759,50 @@ namespace OpenSim.Framework.Capabilities
return null;
}
public string UploadBakedTexture(string request, string path,
string param, OSHttpRequest httpRequest,
OSHttpResponse httpResponse)
{
try
{
m_log.Debug("[CAPS]: UploadBakedTexture Request in region: " +
m_regionName);
string capsBase = "/CAPS/" + m_capsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
BakedTextureUploader uploader =
new BakedTextureUploader(capsBase + uploaderPath,
m_httpListener);
uploader.OnUpLoad += BakedTextureUploaded;
m_httpListener.AddStreamHandler(
new BinaryStreamHandler("POST", capsBase + uploaderPath,
uploader.uploaderCaps));
string protocol = "http://";
if (m_httpListener.UseSSL)
protocol = "https://";
string uploaderURL = protocol + m_httpListenerHostName + ":" +
m_httpListenPort.ToString() + capsBase + uploaderPath;
LLSDAssetUploadResponse uploadResponse =
new LLSDAssetUploadResponse();
uploadResponse.uploader = uploaderURL;
uploadResponse.state = "upload";
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
}
catch (Exception e)
{
m_log.Error("[CAPS]: " + e.ToString());
}
return null;
}
/// <summary>
/// Called by the notecard update handler. Provides a URL to which the client can upload a new asset.
/// </summary>
@ -906,6 +967,7 @@ namespace OpenSim.Framework.Capabilities
InventoryItemBase item = new InventoryItemBase();
item.Owner = m_agentID;
item.CreatorId = m_agentID.ToString();
item.CreatorData = String.Empty;
item.ID = inventoryItem;
item.AssetID = asset.FullID;
item.Description = assetDescription;
@ -913,10 +975,10 @@ namespace OpenSim.Framework.Capabilities
item.AssetType = assType;
item.InvType = inType;
item.Folder = parentFolder;
item.CurrentPermissions = 2147483647;
item.BasePermissions = 2147483647;
item.CurrentPermissions = (uint)PermissionMask.All;
item.BasePermissions = (uint)PermissionMask.All;
item.EveryOnePermissions = 0;
item.NextPermissions = 2147483647;
item.NextPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer);
item.CreationDate = Util.UnixTimeSinceEpoch();
if (AddNewInventoryItem != null)
@ -925,6 +987,17 @@ namespace OpenSim.Framework.Capabilities
}
}
public void BakedTextureUploaded(UUID assetID, byte[] data)
{
// m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString());
AssetBase asset;
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString());
asset.Data = data;
asset.Temporary = true;
asset.Local = ! m_persistBakedTextures; // Local assets aren't persisted, non-local are
m_assetCache.Store(asset);
}
/// <summary>
/// Called when new asset data for an agent inventory item update has been uploaded.
/// </summary>
@ -1243,5 +1316,50 @@ namespace OpenSim.Framework.Capabilities
fs.Close();
}
}
public class BakedTextureUploader
{
public event UploadedBakedTexture OnUpLoad;
private UploadedBakedTexture handlerUpLoad = null;
private string uploaderPath = String.Empty;
private UUID newAssetID;
private IHttpServer httpListener;
public BakedTextureUploader(string path, IHttpServer httpServer)
{
newAssetID = UUID.Random();
uploaderPath = path;
httpListener = httpServer;
}
/// <summary>
///
/// </summary>
/// <param name="data"></param>
/// <param name="path"></param>
/// <param name="param"></param>
/// <returns></returns>
public string uploaderCaps(byte[] data, string path, string param)
{
string res = String.Empty;
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
uploadComplete.new_asset = newAssetID.ToString();
uploadComplete.new_inventory_item = UUID.Zero;
uploadComplete.state = "complete";
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
httpListener.RemoveStreamHandler("POST", uploaderPath);
handlerUpLoad = OnUpLoad;
if (handlerUpLoad != null)
{
handlerUpLoad(newAssetID, data);
}
return res;
}
}
}
}

View File

@ -74,7 +74,7 @@ namespace OpenSim.Framework.Capabilities
m_httpListenerHostName = httpListenerHostname;
m_httpListenerPort = httpListenerPort;
m_useSSL = https;
if (m_useSSL)
if (httpListener != null && m_useSSL)
{
m_httpListenerHostName = httpListener.SSLCommonName;
m_httpListenerPort = httpListener.SSLPort;

View File

@ -39,4 +39,18 @@ namespace OpenSim.Framework.Capabilities
{
}
}
[OSDMap]
public class LLSDNewFileAngentInventoryVariablePriceReplyResponse
{
public int resource_cost;
public string state;
public int upload_price;
public string rsvp;
public LLSDNewFileAngentInventoryVariablePriceReplyResponse()
{
state = "confirm_upload";
}
}
}

View File

@ -28,6 +28,8 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using log4net;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
@ -150,10 +152,10 @@ namespace OpenSim.Framework
Vector3.TryParse(args["at_axis"].AsString(), out AtAxis);
if (args["left_axis"] != null)
Vector3.TryParse(args["left_axis"].AsString(), out AtAxis);
Vector3.TryParse(args["left_axis"].AsString(), out LeftAxis);
if (args["up_axis"] != null)
Vector3.TryParse(args["up_axis"].AsString(), out AtAxis);
Vector3.TryParse(args["up_axis"].AsString(), out UpAxis);
if (args["changed_grid"] != null)
ChangedGrid = args["changed_grid"].AsBoolean();
@ -225,46 +227,6 @@ namespace OpenSim.Framework
}
}
public class AttachmentData
{
public int AttachPoint;
public UUID ItemID;
public UUID AssetID;
public AttachmentData(int point, UUID item, UUID asset)
{
AttachPoint = point;
ItemID = item;
AssetID = asset;
}
public AttachmentData(OSDMap args)
{
UnpackUpdateMessage(args);
}
public OSDMap PackUpdateMessage()
{
OSDMap attachdata = new OSDMap();
attachdata["point"] = OSD.FromInteger(AttachPoint);
attachdata["item"] = OSD.FromUUID(ItemID);
attachdata["asset"] = OSD.FromUUID(AssetID);
return attachdata;
}
public void UnpackUpdateMessage(OSDMap args)
{
if (args["point"] != null)
AttachPoint = args["point"].AsInteger();
if (args["item"] != null)
ItemID = args["item"].AsUUID();
if (args["asset"] != null)
AssetID = args["asset"].AsUUID();
}
}
public class ControllerData
{
public UUID ItemID;
@ -348,11 +310,20 @@ namespace OpenSim.Framework
public UUID GranterID;
// Appearance
public AvatarAppearance Appearance;
// DEBUG ON
private static readonly ILog m_log =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
// DEBUG OFF
/*
public byte[] AgentTextures;
public byte[] VisualParams;
public UUID[] Wearables;
public AttachmentData[] Attachments;
public AvatarAttachment[] Attachments;
*/
// Scripted
public ControllerData[] Controllers;
@ -360,6 +331,10 @@ namespace OpenSim.Framework
public virtual OSDMap Pack()
{
// DEBUG ON
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Pack data");
// DEBUG OFF
OSDMap args = new OSDMap();
args["message_type"] = OSD.FromString("AgentData");
@ -413,6 +388,9 @@ namespace OpenSim.Framework
args["animations"] = anims;
}
if (Appearance != null)
args["packed_appearance"] = Appearance.Pack();
//if ((AgentTextures != null) && (AgentTextures.Length > 0))
//{
// OSDArray textures = new OSDArray(AgentTextures.Length);
@ -421,30 +399,37 @@ namespace OpenSim.Framework
// args["agent_textures"] = textures;
//}
// The code to pack textures, visuals, wearables and attachments
// should be removed; packed appearance contains the full appearance
// This is retained for backward compatibility only
if (Appearance.Texture != null)
{
byte[] rawtextures = Appearance.Texture.GetBytes();
args["texture_entry"] = OSD.FromBinary(rawtextures);
}
if ((AgentTextures != null) && (AgentTextures.Length > 0))
args["texture_entry"] = OSD.FromBinary(AgentTextures);
if ((VisualParams != null) && (VisualParams.Length > 0))
args["visual_params"] = OSD.FromBinary(VisualParams);
if ((Appearance.VisualParams != null) && (Appearance.VisualParams.Length > 0))
args["visual_params"] = OSD.FromBinary(Appearance.VisualParams);
// We might not pass this in all cases...
if ((Wearables != null) && (Wearables.Length > 0))
if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
{
OSDArray wears = new OSDArray(Wearables.Length);
foreach (UUID uuid in Wearables)
wears.Add(OSD.FromUUID(uuid));
OSDArray wears = new OSDArray(Appearance.Wearables.Length);
foreach (AvatarWearable awear in Appearance.Wearables)
wears.Add(awear.Pack());
args["wearables"] = wears;
}
if ((Attachments != null) && (Attachments.Length > 0))
List<AvatarAttachment> attachments = Appearance.GetAttachments();
if ((attachments != null) && (attachments.Count > 0))
{
OSDArray attachs = new OSDArray(Attachments.Length);
foreach (AttachmentData att in Attachments)
attachs.Add(att.PackUpdateMessage());
OSDArray attachs = new OSDArray(attachments.Count);
foreach (AvatarAttachment att in attachments)
attachs.Add(att.Pack());
args["attachments"] = attachs;
}
// End of code to remove
if ((Controllers != null) && (Controllers.Length > 0))
{
@ -469,6 +454,10 @@ namespace OpenSim.Framework
/// <param name="hash"></param>
public virtual void Unpack(OSDMap args)
{
// DEBUG ON
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Unpack data");
// DEBUG OFF
if (args.ContainsKey("region_id"))
UUID.TryParse(args["region_id"].AsString(), out RegionID);
@ -581,34 +570,53 @@ namespace OpenSim.Framework
// AgentTextures[i++] = o.AsUUID();
//}
Appearance = new AvatarAppearance(AgentID);
// The code to unpack textures, visuals, wearables and attachments
// should be removed; packed appearance contains the full appearance
// This is retained for backward compatibility only
if (args["texture_entry"] != null)
AgentTextures = args["texture_entry"].AsBinary();
{
byte[] rawtextures = args["texture_entry"].AsBinary();
Primitive.TextureEntry textures = new Primitive.TextureEntry(rawtextures,0,rawtextures.Length);
Appearance.SetTextureEntries(textures);
}
if (args["visual_params"] != null)
VisualParams = args["visual_params"].AsBinary();
Appearance.SetVisualParams(args["visual_params"].AsBinary());
if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
{
OSDArray wears = (OSDArray)(args["wearables"]);
Wearables = new UUID[wears.Count];
int i = 0;
foreach (OSD o in wears)
Wearables[i++] = o.AsUUID();
for (int i = 0; i < wears.Count / 2; i++)
{
AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]);
Appearance.SetWearable(i,awear);
}
}
if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array)
{
OSDArray attachs = (OSDArray)(args["attachments"]);
Attachments = new AttachmentData[attachs.Count];
int i = 0;
foreach (OSD o in attachs)
{
if (o.Type == OSDType.Map)
{
Attachments[i++] = new AttachmentData((OSDMap)o);
// We know all of these must end up as attachments so we
// append rather than replace to ensure multiple attachments
// per point continues to work
Appearance.AppendAttachment(new AvatarAttachment((OSDMap)o));
}
}
}
// end of code to remove
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"]).Type == OSDType.Map)
Appearance = new AvatarAppearance(AgentID,(OSDMap)args["packed_appearance"]);
// DEBUG ON
else
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance");
// DEBUG OFF
if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array)
{

View File

@ -124,22 +124,6 @@ namespace OpenSim.Framework
set { m_standaloneUserSource = value; }
}
protected string m_storageConnectionString;
public string StorageConnectionString
{
get { return m_storageConnectionString; }
set { m_storageConnectionString = value; }
}
protected string m_estateConnectionString;
public string EstateConnectionString
{
get { return m_estateConnectionString; }
set { m_estateConnectionString = value; }
}
protected string m_librariesXMLFile;
public string LibrariesXMLFile
{

View File

@ -90,6 +90,57 @@ namespace OpenSim.Framework.Console
return ret;
}
public string CmdPrompt(string p, List<char> excludedCharacters)
{
bool itisdone = false;
string ret = String.Empty;
while (!itisdone)
{
itisdone = true;
ret = CmdPrompt(p);
foreach (char c in excludedCharacters)
{
if (ret.Contains(c.ToString()))
{
System.Console.WriteLine("The character \"" + c.ToString() + "\" is not permitted.");
itisdone = false;
}
}
}
return ret;
}
public string CmdPrompt(string p, string def, List<char> excludedCharacters)
{
bool itisdone = false;
string ret = String.Empty;
while (!itisdone)
{
itisdone = true;
ret = CmdPrompt(p, def);
if (ret == String.Empty)
{
ret = def;
}
else
{
foreach (char c in excludedCharacters)
{
if (ret.Contains(c.ToString()))
{
System.Console.WriteLine("The character \"" + c.ToString() + "\" is not permitted.");
itisdone = false;
}
}
}
}
return ret;
}
// Displays a command prompt and returns a default value, user may only enter 1 of 2 options
public string CmdPrompt(string prompt, string defaultresponse, List<string> options)
{
@ -118,7 +169,7 @@ namespace OpenSim.Framework.Console
// (Done with no echo and suitable for passwords)
public string PasswdPrompt(string p)
{
return ReadLine(p, false, false);
return ReadLine(String.Format("{0}: ", p), false, false);
}
public virtual string ReadLine(string p, bool isCommand, bool e)

View File

@ -44,6 +44,7 @@ namespace OpenSim.Framework.Console
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private readonly object m_syncRoot = new object();
private const string LOGLEVEL_NONE = "(none)";
private int y = -1;
private int cp = 0;
@ -278,22 +279,25 @@ namespace OpenSim.Framework.Console
private void WriteLocalText(string text, string level)
{
string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
Regex RE = new Regex(regex, RegexOptions.Multiline);
MatchCollection matches = RE.Matches(text);
string outText = text;
if (matches.Count == 1)
if (level != LOGLEVEL_NONE)
{
outText = matches[0].Groups["End"].Value;
System.Console.Write(matches[0].Groups["Front"].Value);
string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
System.Console.Write("[");
WriteColorText(DeriveColor(matches[0].Groups["Category"].Value),
matches[0].Groups["Category"].Value);
System.Console.Write("]:");
Regex RE = new Regex(regex, RegexOptions.Multiline);
MatchCollection matches = RE.Matches(text);
if (matches.Count == 1)
{
outText = matches[0].Groups["End"].Value;
System.Console.Write(matches[0].Groups["Front"].Value);
System.Console.Write("[");
WriteColorText(DeriveColor(matches[0].Groups["Category"].Value),
matches[0].Groups["Category"].Value);
System.Console.Write("]:");
}
}
if (level == "error")
@ -308,7 +312,7 @@ namespace OpenSim.Framework.Console
public override void Output(string text)
{
Output(text, "normal");
Output(text, LOGLEVEL_NONE);
}
public override void Output(string text, string level)
@ -461,16 +465,19 @@ namespace OpenSim.Framework.Console
SetCursorLeft(0);
y = SetCursorTop(y);
System.Console.WriteLine("{0}{1}", prompt, cmdline);
System.Console.WriteLine();
//Show();
lock (cmdline)
{
y = -1;
}
string commandLine = cmdline.ToString();
if (isCommand)
{
string[] cmd = Commands.Resolve(Parser.Parse(cmdline.ToString()));
string[] cmd = Commands.Resolve(Parser.Parse(commandLine));
if (cmd.Length != 0)
{
@ -486,8 +493,11 @@ namespace OpenSim.Framework.Console
}
}
AddToHistory(cmdline.ToString());
return cmdline.ToString();
// If we're not echoing to screen (e.g. a password) then we probably don't want it in history
if (echo && commandLine != "")
AddToHistory(commandLine);
return commandLine;
default:
break;
}

View File

@ -1,4 +1,31 @@
using System;
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Threading;
using System.Collections.Generic;
using System.Text;

View File

@ -32,6 +32,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using OpenMetaverse;
using Nini.Config;
@ -62,6 +63,7 @@ namespace OpenSim.Framework.Console
new Dictionary<UUID, ConsoleConnection>();
private string m_UserName = String.Empty;
private string m_Password = String.Empty;
private string m_AllowedOrigin = String.Empty;
public RemoteConsole(string defaultPrompt) : base(defaultPrompt)
{
@ -77,6 +79,7 @@ namespace OpenSim.Framework.Console
m_UserName = netConfig.GetString("ConsoleUser", String.Empty);
m_Password = netConfig.GetString("ConsolePass", String.Empty);
m_AllowedOrigin = netConfig.GetString("ConsoleAllowedOrigin", String.Empty);
}
public void SetServer(IHttpServer server)
@ -150,6 +153,29 @@ namespace OpenSim.Framework.Console
return cmdinput;
}
private Hashtable CheckOrigin(Hashtable result)
{
if (!string.IsNullOrEmpty(m_AllowedOrigin))
result["access_control_allow_origin"] = m_AllowedOrigin;
return result;
}
/* TODO: Figure out how PollServiceHTTPHandler can access the request headers
* in order to use m_AllowedOrigin as a regular expression
private Hashtable CheckOrigin(Hashtable headers, Hashtable result)
{
if (!string.IsNullOrEmpty(m_AllowedOrigin))
{
if (headers.ContainsKey("origin"))
{
string origin = headers["origin"].ToString();
if (Regex.IsMatch(origin, m_AllowedOrigin))
result["access_control_allow_origin"] = origin;
}
}
return result;
}
*/
private void DoExpire()
{
List<UUID> expired = new List<UUID>();
@ -235,6 +261,7 @@ namespace OpenSim.Framework.Console
reply["str_response_string"] = xmldoc.InnerXml;
reply["int_response_code"] = 200;
reply["content_type"] = "text/xml";
reply = CheckOrigin(reply);
return reply;
}
@ -288,7 +315,8 @@ namespace OpenSim.Framework.Console
reply["str_response_string"] = xmldoc.InnerXml;
reply["int_response_code"] = 200;
reply["content_type"] = "text/plain";
reply["content_type"] = "text/xml";
reply = CheckOrigin(reply);
return reply;
}
@ -343,7 +371,8 @@ namespace OpenSim.Framework.Console
reply["str_response_string"] = xmldoc.InnerXml;
reply["int_response_code"] = 200;
reply["content_type"] = "text/plain";
reply["content_type"] = "text/xml";
reply = CheckOrigin(reply);
return reply;
}
@ -457,6 +486,7 @@ namespace OpenSim.Framework.Console
result["content_type"] = "application/xml";
result["keepalive"] = false;
result["reusecontext"] = false;
result = CheckOrigin(result);
return result;
}
@ -480,6 +510,7 @@ namespace OpenSim.Framework.Console
result["content_type"] = "text/xml";
result["keepalive"] = false;
result["reusecontext"] = false;
result = CheckOrigin(result);
return result;
}

View File

@ -83,7 +83,9 @@ namespace OpenSim.Framework
/// <summary>Finished, Sim Changed</summary>
FinishedViaNewSim = 1 << 28,
/// <summary>Finished, Same Sim</summary>
FinishedViaSameSim = 1 << 29
FinishedViaSameSim = 1 << 29,
/// <summary>Agent coming into the grid from another grid</summary>
ViaHGLogin = 1 << 30
}
}

View File

@ -1,162 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
namespace OpenSim.Framework
{
public class GridConfig:ConfigBase
{
public string AllowForcefulBanlines = "TRUE";
public bool AllowRegionRegistration = true;
public string AssetRecvKey = String.Empty;
public string AssetSendKey = String.Empty;
public string DatabaseProvider = String.Empty;
public string DatabaseConnect = String.Empty;
public string DefaultAssetServer = String.Empty;
public string DefaultUserServer = String.Empty;
public uint HttpPort = ConfigSettings.DefaultGridServerHttpPort;
public string SimRecvKey = String.Empty;
public string SimSendKey = String.Empty;
public string UserRecvKey = String.Empty;
public string UserSendKey = String.Empty;
public string ConsoleUser = String.Empty;
public string ConsolePass = String.Empty;
public GridConfig(string description, string filename)
{
m_configMember =
new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true);
m_configMember.performConfigurationRetrieve();
}
public void loadConfigurationOptions()
{
m_configMember.addConfigurationOption("default_asset_server",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Default Asset Server URI",
"http://127.0.0.1:" + ConfigSettings.DefaultAssetServerHttpPort.ToString() + "/",
false);
m_configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to send to asset server", "null", false);
m_configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to expect from asset server", "null", false);
m_configMember.addConfigurationOption("default_user_server",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Default User Server URI",
"http://127.0.0.1:" + ConfigSettings.DefaultUserServerHttpPort.ToString() + "/", false);
m_configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to send to user server", "null", false);
m_configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to expect from user server", "null", false);
m_configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to send to a simulator", "null", false);
m_configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to expect from a simulator", "null", false);
m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"DLL for database provider", "OpenSim.Data.MySQL.dll", false);
m_configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Database connect string", "", false);
m_configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
"Http Listener port", ConfigSettings.DefaultGridServerHttpPort.ToString(), false);
m_configMember.addConfigurationOption("allow_forceful_banlines",
ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Allow Forceful Banlines", "TRUE", true);
m_configMember.addConfigurationOption("allow_region_registration",
ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
"Allow regions to register immediately upon grid server startup? true/false",
"True",
false);
m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Remote console access user name [Default: disabled]", "", false);
m_configMember.addConfigurationOption("console_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Remote console access password [Default: disabled]", "", false);
}
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
{
switch (configuration_key)
{
case "default_asset_server":
DefaultAssetServer = (string) configuration_result;
break;
case "asset_send_key":
AssetSendKey = (string) configuration_result;
break;
case "asset_recv_key":
AssetRecvKey = (string) configuration_result;
break;
case "default_user_server":
DefaultUserServer = (string) configuration_result;
break;
case "user_send_key":
UserSendKey = (string) configuration_result;
break;
case "user_recv_key":
UserRecvKey = (string) configuration_result;
break;
case "sim_send_key":
SimSendKey = (string) configuration_result;
break;
case "sim_recv_key":
SimRecvKey = (string) configuration_result;
break;
case "database_provider":
DatabaseProvider = (string) configuration_result;
break;
case "database_connect":
DatabaseConnect = (string) configuration_result;
break;
case "http_port":
HttpPort = (uint) configuration_result;
break;
case "allow_forceful_banlines":
AllowForcefulBanlines = (string) configuration_result;
break;
case "allow_region_registration":
AllowRegionRegistration = (bool)configuration_result;
break;
case "console_user":
ConsoleUser = (string)configuration_result;
break;
case "console_pass":
ConsolePass = (string)configuration_result;
break;
}
return true;
}
}
}

View File

@ -1,107 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.Net;
namespace OpenSim.Framework
{
public class HGNetworkServersInfo
{
public readonly string LocalAssetServerURI, LocalInventoryServerURI, LocalUserServerURI;
private static HGNetworkServersInfo m_singleton;
public static HGNetworkServersInfo Singleton
{
get { return m_singleton; }
}
public static void Init(string assetserver, string inventoryserver, string userserver)
{
m_singleton = new HGNetworkServersInfo(assetserver, inventoryserver, userserver);
}
private HGNetworkServersInfo(string a, string i, string u)
{
LocalAssetServerURI = ServerURI(a);
LocalInventoryServerURI = ServerURI(i);
LocalUserServerURI = ServerURI(u);
}
public bool IsLocalUser(string userserver)
{
string userServerURI = ServerURI(userserver);
bool ret = (((userServerURI == null) || (userServerURI == "") || (userServerURI == LocalUserServerURI)));
//m_log.Debug("-------------> HGNetworkServersInfo.IsLocalUser? " + ret + "(userServer=" + userServerURI + "; localuserserver=" + LocalUserServerURI + ")");
return ret;
}
public bool IsLocalUser(UserProfileData userData)
{
if (userData != null)
{
if (userData is ForeignUserProfileData)
return IsLocalUser(((ForeignUserProfileData)userData).UserServerURI);
else
return true;
}
else
// Something fishy; ignore it
return true;
}
public static string ServerURI(string uri)
{
// Get rid of eventual slashes at the end
try
{
if (uri.EndsWith("/"))
uri = uri.Substring(0, uri.Length - 1);
}
catch { }
IPAddress ipaddr1 = null;
string port1 = "";
try
{
ipaddr1 = Util.GetHostFromURL(uri);
}
catch { }
try
{
port1 = uri.Split(new char[] { ':' })[2];
}
catch { }
// We tried our best to convert the domain names to IP addresses
return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri;
}
}
}

View File

@ -44,7 +44,7 @@ namespace OpenSim.Framework
public delegate void TextureRequest(Object sender, TextureRequestArgs e);
public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e);
public delegate void AvatarNowWearing(IClientAPI sender, AvatarWearingArgs e);
public delegate void ImprovedInstantMessage(IClientAPI remoteclient, GridInstantMessage im);
@ -66,7 +66,7 @@ namespace OpenSim.Framework
public delegate void NetworkStats(int inPackets, int outPackets, int unAckedBytes);
public delegate void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams);
public delegate void SetAppearance(IClientAPI remoteClient, Primitive.TextureEntry textureEntry, byte[] visualParams);
public delegate void SetAppearanceRaw(IClientAPI sender, UUID agentID, byte[] vp, Primitive.TextureEntry te);
public delegate void StartAnim(IClientAPI remoteClient, UUID animID);
@ -718,7 +718,7 @@ namespace OpenSim.Framework
event TeleportLandmarkRequest OnTeleportLandmarkRequest;
event DeRezObject OnDeRezObject;
event Action<IClientAPI> OnRegionHandShakeReply;
event GenericCall2 OnRequestWearables;
event GenericCall1 OnRequestWearables;
event GenericCall1 OnCompleteMovementToRegion;
event UpdateAgent OnPreAgentUpdate;
event UpdateAgent OnAgentUpdate;
@ -1019,7 +1019,9 @@ namespace OpenSim.Framework
uint flags, string capsURL);
void SendTeleportFailed(string reason);
void SendTeleportLocationStart();
void SendTeleportStart(uint flags);
void SendTeleportProgress(uint flags, string message);
void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
void SendPayPrice(UUID objectID, int[] payPrice);

View File

@ -39,5 +39,6 @@ namespace OpenSim.Framework
void ExtraFromXmlString(string xmlstr);
string GetStateSnapshot();
void SetState(string xmlstr, IScene s);
bool HasGroupChanged { get; set; }
}
}

View File

@ -117,6 +117,56 @@ namespace OpenSim.Framework
}
protected UUID m_creatorIdAsUuid = UUID.Zero;
protected string m_creatorData = string.Empty;
public string CreatorData // = <profile url>;<name>
{
get { return m_creatorData; }
set { m_creatorData = value; }
}
/// <summary>
/// Used by the DB layer to retrieve / store the entire user identification.
/// The identification can either be a simple UUID or a string of the form
/// uuid[;profile_url[;name]]
/// </summary>
public string CreatorIdentification
{
get
{
if (m_creatorData != null && m_creatorData != string.Empty)
return m_creatorId + ';' + m_creatorData;
else
return m_creatorId;
}
set
{
if ((value == null) || (value != null && value == string.Empty))
{
m_creatorData = string.Empty;
return;
}
if (!value.Contains(";")) // plain UUID
{
m_creatorId = value;
}
else // <uuid>[;<endpoint>[;name]]
{
string name = "Unknown User";
string[] parts = value.Split(';');
if (parts.Length >= 1)
m_creatorId = parts[0];
if (parts.Length >= 2)
m_creatorData = parts[1];
if (parts.Length >= 3)
name = parts[2];
m_creatorData += ';' + name;
}
}
}
/// <value>
/// The description of the inventory item (must be less than 64 characters)
/// </value>

View File

@ -88,8 +88,79 @@ namespace OpenSim.Framework
private UUID _snapshotID = UUID.Zero;
private Vector3 _userLocation = new Vector3();
private Vector3 _userLookAt = new Vector3();
private int _dwell = 0;
private int _otherCleanTime = 0;
private string _mediaType = "none/none";
private string _mediaDescription = "";
private int _mediaHeight = 0;
private int _mediaWidth = 0;
private bool _mediaLoop = false;
private bool _obscureMusic = false;
private bool _obscureMedia = false;
/// <summary>
/// Whether to obscure parcel media URL
/// </summary>
[XmlIgnore]
public bool ObscureMedia {
get {
return _obscureMedia;
}
set {
_obscureMedia = value;
}
}
/// <summary>
/// Whether to obscure parcel music URL
/// </summary>
[XmlIgnore]
public bool ObscureMusic {
get {
return _obscureMusic;
}
set {
_obscureMusic = value;
}
}
/// <summary>
/// Whether to loop parcel media
/// </summary>
[XmlIgnore]
public bool MediaLoop {
get {
return _mediaLoop;
}
set {
_mediaLoop = value;
}
}
/// <summary>
/// Height of parcel media render
/// </summary>
[XmlIgnore]
public int MediaHeight {
get {
return _mediaHeight;
}
set {
_mediaHeight = value;
}
}
/// <summary>
/// Width of parcel media render
/// </summary>
[XmlIgnore]
public int MediaWidth {
get {
return _mediaWidth;
}
set {
_mediaWidth = value;
}
}
/// <summary>
/// Upper corner of the AABB for the parcel
@ -358,20 +429,6 @@ namespace OpenSim.Framework
}
}
private int[] _mediaSize = new int[2];
public int[] MediaSize
{
get
{
return _mediaSize;
}
set
{
_mediaSize = value;
}
}
private string _mediaType = "";
public string MediaType
{
get
@ -561,18 +618,6 @@ namespace OpenSim.Framework
}
}
/// <summary>
/// Deprecated idea. Number of visitors ~= free money
/// </summary>
public int Dwell {
get {
return _dwell;
}
set {
_dwell = value;
}
}
/// <summary>
/// Number of minutes to return SceneObjectGroup that are owned by someone who doesn't own
/// the parcel and isn't set to the same 'group' as the parcel.
@ -586,6 +631,17 @@ namespace OpenSim.Framework
}
}
/// <summary>
/// parcel media description
/// </summary>
public string MediaDescription {
get {
return _mediaDescription;
}
set {
_mediaDescription = value;
}
}
public LandData()
{
@ -634,7 +690,13 @@ namespace OpenSim.Framework
landData._userLocation = _userLocation;
landData._userLookAt = _userLookAt;
landData._otherCleanTime = _otherCleanTime;
landData._dwell = _dwell;
landData._mediaType = _mediaType;
landData._mediaDescription = _mediaDescription;
landData._mediaWidth = _mediaWidth;
landData._mediaHeight = _mediaHeight;
landData._mediaLoop = _mediaLoop;
landData._obscureMusic = _obscureMusic;
landData._obscureMedia = _obscureMedia;
landData._parcelAccessList.Clear();
foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList)

View File

@ -49,5 +49,12 @@ namespace OpenSim.Framework
public UUID SnapshotID;
public Vector3 UserLocation;
public Vector3 UserLookAt;
public string MediaType;
public string MediaDescription;
public int MediaHeight;
public int MediaWidth;
public bool MediaLoop;
public bool ObscureMusic;
public bool ObscureMedia;
}
}

View File

@ -1,4 +1,4 @@
//
//
// Lazy.cs
//
// Authors:

View File

@ -27,6 +27,7 @@
using System.Collections.Generic;
using System.Reflection;
using System.Net;
using log4net;
using OpenSim.Framework.Servers.HttpServer;
@ -47,6 +48,11 @@ namespace OpenSim.Framework
}
public static IHttpServer GetHttpServer(uint port)
{
return GetHttpServer(port,null);
}
public static IHttpServer GetHttpServer(uint port, IPAddress ipaddr)
{
if (port == 0)
return Instance;
@ -58,6 +64,9 @@ namespace OpenSim.Framework
m_Servers[port] = new BaseHttpServer(port);
if (ipaddr != null)
m_Servers[port].ListenIPAddress = ipaddr;
m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port);
m_Servers[port].Start();

View File

@ -0,0 +1,189 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
namespace OpenSim.Framework
{
/// <summary>
/// Stores two synchronized collections: a mutable dictionary and an
/// immutable array. Slower inserts/removes than a normal dictionary,
/// but provides safe iteration while maintaining fast hash lookups
/// </summary>
/// <typeparam name="TKey">Key type to use for hash lookups</typeparam>
/// <typeparam name="TValue">Value type to store</typeparam>
public sealed class MapAndArray<TKey, TValue>
{
private Dictionary<TKey, TValue> m_dict;
private TValue[] m_array;
private object m_syncRoot = new object();
/// <summary>Number of values currently stored in the collection</summary>
public int Count { get { return m_array.Length; } }
/// <summary>NOTE: This collection is thread safe. You do not need to
/// acquire a lock to add, remove, or enumerate entries. This
/// synchronization object should only be locked for larger
/// transactions</summary>
public object SyncRoot { get { return m_syncRoot; } }
/// <summary>
/// Constructor
/// </summary>
public MapAndArray()
{
m_dict = new Dictionary<TKey, TValue>();
m_array = new TValue[0];
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="capacity">Initial capacity of the dictionary</param>
public MapAndArray(int capacity)
{
m_dict = new Dictionary<TKey, TValue>(capacity);
m_array = new TValue[0];
}
/// <summary>
/// Adds a key/value pair to the collection, or updates an existing key
/// with a new value
/// </summary>
/// <param name="key">Key to add or update</param>
/// <param name="value">Value to add</param>
/// <returns>True if a new key was added, false if an existing key was
/// updated</returns>
public bool AddOrReplace(TKey key, TValue value)
{
lock (m_syncRoot)
{
bool containedKey = m_dict.ContainsKey(key);
m_dict[key] = value;
CreateArray();
return !containedKey;
}
}
/// <summary>
/// Adds a key/value pair to the collection. This will throw an
/// exception if the key is already present in the collection
/// </summary>
/// <param name="key">Key to add or update</param>
/// <param name="value">Value to add</param>
/// <returns>Index of the inserted item</returns>
public int Add(TKey key, TValue value)
{
lock (m_syncRoot)
{
m_dict.Add(key, value);
CreateArray();
return m_array.Length;
}
}
/// <summary>
/// Removes a key/value pair from the collection
/// </summary>
/// <param name="key">Key to remove</param>
/// <returns>True if the key was found and removed, otherwise false</returns>
public bool Remove(TKey key)
{
lock (m_syncRoot)
{
bool removed = m_dict.Remove(key);
CreateArray();
return removed;
}
}
/// <summary>
/// Determines whether the collections contains a specified key
/// </summary>
/// <param name="key">Key to search for</param>
/// <returns>True if the key was found, otherwise false</returns>
public bool ContainsKey(TKey key)
{
lock (m_syncRoot)
return m_dict.ContainsKey(key);
}
/// <summary>
/// Gets the value associated with the specified key
/// </summary>
/// <param name="key">Key of the value to get</param>
/// <param name="value">Will contain the value associated with the
/// given key if the key is found. If the key is not found it will
/// contain the default value for the type of the value parameter</param>
/// <returns>True if the key was found and a value was retrieved,
/// otherwise false</returns>
public bool TryGetValue(TKey key, out TValue value)
{
lock (m_syncRoot)
return m_dict.TryGetValue(key, out value);
}
/// <summary>
/// Clears all key/value pairs from the collection
/// </summary>
public void Clear()
{
lock (m_syncRoot)
{
m_dict = new Dictionary<TKey, TValue>();
m_array = new TValue[0];
}
}
/// <summary>
/// Gets a reference to the immutable array of values stored in this
/// collection. This array is thread safe for iteration
/// </summary>
/// <returns>A thread safe reference ton an array of all of the stored
/// values</returns>
public TValue[] GetArray()
{
return m_array;
}
private void CreateArray()
{
// Rebuild the array from the dictionary. This method must be
// called from inside a lock
TValue[] array = new TValue[m_dict.Count];
int i = 0;
foreach (TValue value in m_dict.Values)
array[i++] = value;
m_array = array;
}
}
}

View File

@ -1,152 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
namespace OpenSim.Framework
{
/// <summary>
/// Message Server Config - Configuration of the Message Server
/// </summary>
public class MessageServerConfig:ConfigBase
{
public string DatabaseProvider = String.Empty;
public string DatabaseConnect = String.Empty;
public string GridCommsProvider = String.Empty;
public string GridRecvKey = String.Empty;
public string GridSendKey = String.Empty;
public string GridServerURL = String.Empty;
public uint HttpPort = ConfigSettings.DefaultMessageServerHttpPort;
public bool HttpSSL = ConfigSettings.DefaultMessageServerHttpSSL;
public string MessageServerIP = String.Empty;
public string UserRecvKey = String.Empty;
public string UserSendKey = String.Empty;
public string UserServerURL = String.Empty;
public string ConsoleUser = String.Empty;
public string ConsolePass = String.Empty;
public MessageServerConfig(string description, string filename)
{
m_configMember =
new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true);
m_configMember.performConfigurationRetrieve();
}
public void loadConfigurationOptions()
{
m_configMember.addConfigurationOption("default_user_server",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Default User Server URI",
"http://127.0.0.1:" + ConfigSettings.DefaultUserServerHttpPort.ToString() + "/", false);
m_configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to send to user server", "null", false);
m_configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to expect from user server", "null", false);
m_configMember.addConfigurationOption("default_grid_server",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Default Grid Server URI",
"http://127.0.0.1:" + ConfigSettings.DefaultGridServerHttpPort.ToString() + "/", false);
m_configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to send to grid server", "null", false);
m_configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Key to expect from grid server", "null", false);
m_configMember.addConfigurationOption("database_connect", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Connection String for Database", "", false);
m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"DLL for database provider", "OpenSim.Data.MySQL.dll", false);
m_configMember.addConfigurationOption("region_comms_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"DLL for comms provider", "OpenSim.Region.Communications.OGS1.dll", false);
m_configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
"Http Listener port", ConfigSettings.DefaultMessageServerHttpPort.ToString(), false);
m_configMember.addConfigurationOption("http_ssl", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
"Use SSL? true/false", ConfigSettings.DefaultMessageServerHttpSSL.ToString(), false);
m_configMember.addConfigurationOption("published_ip", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"My Published IP Address", "127.0.0.1", false);
m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Remote console access user name [Default: disabled]", "", false);
m_configMember.addConfigurationOption("console_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Remote console access password [Default: disabled]", "", false);
}
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
{
switch (configuration_key)
{
case "default_user_server":
UserServerURL = (string) configuration_result;
break;
case "user_send_key":
UserSendKey = (string) configuration_result;
break;
case "user_recv_key":
UserRecvKey = (string) configuration_result;
break;
case "default_grid_server":
GridServerURL = (string) configuration_result;
break;
case "grid_send_key":
GridSendKey = (string) configuration_result;
break;
case "grid_recv_key":
GridRecvKey = (string) configuration_result;
break;
case "database_provider":
DatabaseProvider = (string) configuration_result;
break;
case "database_connect":
DatabaseConnect = (string)configuration_result;
break;
case "http_port":
HttpPort = (uint) configuration_result;
break;
case "http_ssl":
HttpSSL = (bool) configuration_result;
break;
case "region_comms_provider":
GridCommsProvider = (string) configuration_result;
break;
case "published_ip":
MessageServerIP = (string) configuration_result;
break;
case "console_user":
ConsoleUser = (string)configuration_result;
break;
case "console_pass":
ConsolePass = (string)configuration_result;
break;
}
return true;
}
}
}

View File

@ -31,6 +31,7 @@ using System.Net.Sockets;
using System.Net;
using System.Net.NetworkInformation;
using System.Reflection;
using System.Text;
using log4net;
namespace OpenSim.Framework
@ -244,5 +245,6 @@ namespace OpenSim.Framework
}
return defaultHostname;
}
}
}

View File

@ -26,12 +26,17 @@
*/
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Reflection;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using log4net;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework
{
@ -131,6 +136,13 @@ namespace OpenSim.Framework
[XmlIgnore] private bool _lightEntry;
[XmlIgnore] private bool _sculptEntry;
// Light Projection Filter
[XmlIgnore] private bool _projectionEntry;
[XmlIgnore] private UUID _projectionTextureID;
[XmlIgnore] private float _projectionFOV;
[XmlIgnore] private float _projectionFocus;
[XmlIgnore] private float _projectionAmb;
public byte ProfileCurve
{
get { return (byte)((byte)HollowShape | (byte)ProfileShape); }
@ -171,6 +183,13 @@ namespace OpenSim.Framework
}
}
/// <summary>
/// Entries to store media textures on each face
/// </summary>
/// Do not change this value directly - always do it through an IMoapModule.
/// Lock before manipulating.
public MediaList Media { get; set; }
public PrimitiveBaseShape()
{
PCode = (byte) PCodeEnum.Primitive;
@ -783,11 +802,57 @@ namespace OpenSim.Framework
}
}
public bool ProjectionEntry {
get {
return _projectionEntry;
}
set {
_projectionEntry = value;
}
}
public UUID ProjectionTextureUUID {
get {
return _projectionTextureID;
}
set {
_projectionTextureID = value;
}
}
public float ProjectionFOV {
get {
return _projectionFOV;
}
set {
_projectionFOV = value;
}
}
public float ProjectionFocus {
get {
return _projectionFocus;
}
set {
_projectionFocus = value;
}
}
public float ProjectionAmbiance {
get {
return _projectionAmb;
}
set {
_projectionAmb = value;
}
}
public byte[] ExtraParamsToBytes()
{
ushort FlexiEP = 0x10;
ushort LightEP = 0x20;
ushort SculptEP = 0x30;
ushort ProjectionEP = 0x40;
int i = 0;
uint TotalBytesLength = 1; // ExtraParamsNum
@ -811,6 +876,12 @@ namespace OpenSim.Framework
TotalBytesLength += 17;// data
TotalBytesLength += 2 + 4; // type
}
if (_projectionEntry)
{
ExtraParamsNum++;
TotalBytesLength += 28;// data
TotalBytesLength += 2 + 4;// type
}
byte[] returnbytes = new byte[TotalBytesLength];
@ -862,8 +933,20 @@ namespace OpenSim.Framework
Array.Copy(SculptData, 0, returnbytes, i, SculptData.Length);
i += SculptData.Length;
}
if (_projectionEntry)
{
byte[] ProjectionData = GetProjectionBytes();
if (!_flexiEntry && !_lightEntry && !_sculptEntry)
returnbytes[i++] = (byte)(ProjectionEP % 256);
returnbytes[i++] = (byte)((ProjectionEP >> 8) % 256);
returnbytes[i++] = (byte)((ProjectionData.Length) % 256);
returnbytes[i++] = (byte)((ProjectionData.Length >> 16) % 256);
returnbytes[i++] = (byte)((ProjectionData.Length >> 20) % 256);
returnbytes[i++] = (byte)((ProjectionData.Length >> 24) % 256);
Array.Copy(ProjectionData, 0, returnbytes, i, ProjectionData.Length);
i += ProjectionData.Length;
}
if (!_flexiEntry && !_lightEntry && !_sculptEntry && !_projectionEntry)
{
byte[] returnbyte = new byte[1];
returnbyte[0] = 0;
@ -881,6 +964,7 @@ namespace OpenSim.Framework
const ushort FlexiEP = 0x10;
const ushort LightEP = 0x20;
const ushort SculptEP = 0x30;
const ushort ProjectionEP = 0x40;
switch (type)
{
@ -910,6 +994,14 @@ namespace OpenSim.Framework
}
ReadSculptData(data, 0);
break;
case ProjectionEP:
if (!inUse)
{
_projectionEntry = false;
return;
}
ReadProjectionData(data, 0);
break;
}
}
@ -921,10 +1013,12 @@ namespace OpenSim.Framework
const ushort FlexiEP = 0x10;
const ushort LightEP = 0x20;
const ushort SculptEP = 0x30;
const ushort ProjectionEP = 0x40;
bool lGotFlexi = false;
bool lGotLight = false;
bool lGotSculpt = false;
bool lGotFilter = false;
int i = 0;
byte extraParamCount = 0;
@ -961,6 +1055,11 @@ namespace OpenSim.Framework
i += 17;
lGotSculpt = true;
break;
case ProjectionEP:
ReadProjectionData(data, i);
i += 28;
lGotFilter = true;
break;
}
}
@ -970,6 +1069,8 @@ namespace OpenSim.Framework
_lightEntry = false;
if (!lGotSculpt)
_sculptEntry = false;
if (!lGotFilter)
_projectionEntry = false;
}
@ -1109,6 +1210,42 @@ namespace OpenSim.Framework
return data;
}
public void ReadProjectionData(byte[] data, int pos)
{
byte[] ProjectionTextureUUID = new byte[16];
if (data.Length - pos >= 28)
{
_projectionEntry = true;
Array.Copy(data, pos, ProjectionTextureUUID,0, 16);
_projectionTextureID = new UUID(ProjectionTextureUUID, 0);
_projectionFOV = Utils.BytesToFloat(data, pos + 16);
_projectionFocus = Utils.BytesToFloat(data, pos + 20);
_projectionAmb = Utils.BytesToFloat(data, pos + 24);
}
else
{
_projectionEntry = false;
_projectionTextureID = UUID.Zero;
_projectionFOV = 0f;
_projectionFocus = 0f;
_projectionAmb = 0f;
}
}
public byte[] GetProjectionBytes()
{
byte[] data = new byte[28];
_projectionTextureID.GetBytes().CopyTo(data, 0);
Utils.FloatToBytes(_projectionFOV).CopyTo(data, 16);
Utils.FloatToBytes(_projectionFocus).CopyTo(data, 20);
Utils.FloatToBytes(_projectionAmb).CopyTo(data, 24);
return data;
}
/// <summary>
/// Creates a OpenMetaverse.Primitive and populates it with converted PrimitiveBaseShape values
@ -1207,5 +1344,104 @@ namespace OpenSim.Framework
return prim;
}
/// <summary>
/// Encapsulates a list of media entries.
/// </summary>
/// This class is necessary because we want to replace auto-serialization of MediaEntry with something more
/// OSD like and less vulnerable to change.
public class MediaList : List<MediaEntry>, IXmlSerializable
{
public const string MEDIA_TEXTURE_TYPE = "sl";
public MediaList() : base() {}
public MediaList(IEnumerable<MediaEntry> collection) : base(collection) {}
public MediaList(int capacity) : base(capacity) {}
public XmlSchema GetSchema()
{
return null;
}
public string ToXml()
{
lock (this)
{
using (StringWriter sw = new StringWriter())
{
using (XmlTextWriter xtw = new XmlTextWriter(sw))
{
xtw.WriteStartElement("OSMedia");
xtw.WriteAttributeString("type", MEDIA_TEXTURE_TYPE);
xtw.WriteAttributeString("version", "0.1");
OSDArray meArray = new OSDArray();
foreach (MediaEntry me in this)
{
OSD osd = (null == me ? new OSD() : me.GetOSD());
meArray.Add(osd);
}
xtw.WriteStartElement("OSData");
xtw.WriteRaw(OSDParser.SerializeLLSDXmlString(meArray));
xtw.WriteEndElement();
xtw.WriteEndElement();
xtw.Flush();
return sw.ToString();
}
}
}
}
public void WriteXml(XmlWriter writer)
{
writer.WriteRaw(ToXml());
}
public static MediaList FromXml(string rawXml)
{
MediaList ml = new MediaList();
ml.ReadXml(rawXml);
return ml;
}
public void ReadXml(string rawXml)
{
using (StringReader sr = new StringReader(rawXml))
{
using (XmlTextReader xtr = new XmlTextReader(sr))
{
xtr.MoveToContent();
string type = xtr.GetAttribute("type");
//m_log.DebugFormat("[MOAP]: Loaded media texture entry with type {0}", type);
if (type != MEDIA_TEXTURE_TYPE)
return;
xtr.ReadStartElement("OSMedia");
OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml());
foreach (OSD osdMe in osdMeArray)
{
MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry());
Add(me);
}
xtr.ReadEndElement();
}
}
}
public void ReadXml(XmlReader reader)
{
if (reader.IsEmptyElement)
return;
ReadXml(reader.ReadInnerXml());
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More