diff --git a/.nant/local.include b/.nant/local.include index 0b6f9feafd..b11c1e58c8 100644 --- a/.nant/local.include +++ b/.nant/local.include @@ -20,6 +20,7 @@ + @@ -29,7 +30,7 @@ - + @@ -90,6 +91,11 @@ 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 --> + + + + + @@ -122,6 +128,11 @@ + + + + + @@ -195,6 +206,17 @@ + + + + + + + + + + + @@ -255,6 +277,11 @@ + + + + + @@ -287,6 +314,11 @@ + + + + + @@ -297,11 +329,13 @@ + + @@ -326,6 +360,7 @@ + diff --git a/BUILDING.txt b/BUILDING.txt index 972fe4696c..90a36fbded 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -1,4 +1,4 @@ -=== Building OpenSim === +==== Building OpenSim ==== === Building on Windows === diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 24432446c8..38343a4bbc 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -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 diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 1e85a22c69..7ef0f5f455 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs @@ -106,8 +106,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions m_openSim.ModuleLoader.LoadDefaultSharedModule(new LoadImageURLModule()); m_log.Info("[LOADREGIONSPLUGIN]: XMLRPCModule..."); m_openSim.ModuleLoader.LoadDefaultSharedModule(new XMLRPCModule()); - m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule..."); - m_openSim.ModuleLoader.LoadDefaultSharedModule(new AssetTransactionModule()); +// m_log.Info("[LOADREGIONSPLUGIN]: AssetTransactionModule..."); +// m_openSim.ModuleLoader.LoadDefaultSharedModule(new AssetTransactionModule()); m_log.Info("[LOADREGIONSPLUGIN]: Done."); if (!CheckRegionsForSanity(regionsToLoad)) @@ -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; diff --git a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs index 9d79b3ade8..49bd911baf 100644 --- a/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs +++ b/OpenSim/ApplicationPlugins/RegionModulesController/RegionModulesControllerPlugin.cs @@ -62,7 +62,7 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController new List(); #region IApplicationPlugin implementation - + public void Initialise (OpenSimBase openSim) { m_openSim = openSim; @@ -91,66 +91,24 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController { if (node.Type.GetInterface(typeof(ISharedRegionModule).ToString()) != null) { - // Get the config string - string moduleString = - modulesConfig.GetString("Setup_" + node.Id, String.Empty); - - // We have a selector - if (moduleString != String.Empty) + if (CheckModuleEnabled(node, modulesConfig)) { - // Allow disabling modules even if they don't have - // support for it - if (moduleString == "disabled") - continue; - - // Split off port, if present - string[] moduleParts = moduleString.Split(new char[] { '/' }, 2); - // Format is [port/][class] - string className = moduleParts[0]; - if (moduleParts.Length > 1) - className = moduleParts[1]; - - // Match the class name if given - if (className != String.Empty && - node.Type.ToString() != className) - continue; + m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type); + m_sharedModules.Add(node); } - - m_log.DebugFormat("[REGIONMODULES]: Found shared region module {0}, class {1}", node.Id, node.Type); - m_sharedModules.Add(node); } else if (node.Type.GetInterface(typeof(INonSharedRegionModule).ToString()) != null) { - // Get the config string - string moduleString = - modulesConfig.GetString("Setup_" + node.Id, String.Empty); - - // We have a selector - if (moduleString != String.Empty) + if (CheckModuleEnabled(node, modulesConfig)) { - // Allow disabling modules even if they don't have - // support for it - if (moduleString == "disabled") - continue; - - // Split off port, if present - string[] moduleParts = moduleString.Split(new char[] { '/' }, 2); - // Format is [port/][class] - string className = moduleParts[0]; - if (moduleParts.Length > 1) - className = moduleParts[1]; - - // Match the class name if given - if (className != String.Empty && - node.Type.ToString() != className) - continue; + m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); + m_nonSharedModules.Add(node); } - - m_log.DebugFormat("[REGIONMODULES]: Found non-shared region module {0}, class {1}", node.Id, node.Type); - m_nonSharedModules.Add(node); } else + { m_log.DebugFormat("[REGIONMODULES]: Found unknown type of module {0}, class {1}", node.Id, node.Type); + } } // Load and init the module. We try a constructor with a port @@ -197,8 +155,6 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController m_sharedInstances.Add(module); module.Initialise(m_openSim.ConfigSource.Source); } - - } public void PostInitialise () @@ -210,7 +166,6 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController { module.PostInitialise(); } - } #endregion @@ -244,7 +199,6 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController #endregion - public string Version { get @@ -262,6 +216,42 @@ namespace OpenSim.ApplicationPlugins.RegionModulesController } #region IRegionModulesController implementation + + /// + /// Check that the given module is no disabled in the [Modules] section of the config files. + /// + /// + /// The config section + /// true if the module is enabled, false if it is disabled + protected bool CheckModuleEnabled(TypeExtensionNode node, IConfig modulesConfig) + { + // Get the config string + string moduleString = + modulesConfig.GetString("Setup_" + node.Id, String.Empty); + + // We have a selector + if (moduleString != String.Empty) + { + // Allow disabling modules even if they don't have + // support for it + if (moduleString == "disabled") + return false; + + // Split off port, if present + string[] moduleParts = moduleString.Split(new char[] { '/' }, 2); + // Format is [port/][class] + string className = moduleParts[0]; + if (moduleParts.Length > 1) + className = moduleParts[1]; + + // Match the class name if given + if (className != String.Empty && + node.Type.ToString() != className) + return false; + } + + return true; + } // The root of all evil. // This is where we handle adding the modules to scenes when they diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index e57aaa08f7..1b4d1ea9f9 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -58,12 +58,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private static bool daload = false; - private static Object rslock = new Object(); - private static Object SOLock = new Object(); + private static bool m_defaultAvatarsLoaded = false; + private static Object m_requestLock = new Object(); + private static Object m_saveOarLock = new Object(); - private OpenSimBase m_app; - private IHttpServer m_httpd; + private OpenSimBase m_application; + private IHttpServer m_httpServer; private IConfig m_config; private IConfigSource m_configSource; private string m_requiredPassword = String.Empty; @@ -115,8 +115,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController m_requiredPassword = m_config.GetString("access_password", String.Empty); int port = m_config.GetInt("port", 0); - m_app = openSim; - m_httpd = MainServer.GetHttpServer((uint)port); + m_application = openSim; + string bind_ip_address = m_config.GetString("bind_ip_address", "0.0.0.0"); + IPAddress ipaddr = IPAddress.Parse(bind_ip_address); + m_httpServer = MainServer.GetHttpServer((uint)port,ipaddr); Dictionary availableMethods = new Dictionary(); availableMethods["admin_create_region"] = XmlRpcCreateRegionMethod; @@ -160,14 +162,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController { foreach (string method in availableMethods.Keys) { - m_httpd.AddXmlRPCHandler(method, availableMethods[method], false); + m_httpServer.AddXmlRPCHandler(method, availableMethods[method], false); } } else { foreach (string enabledMethod in enabledMethods.Split('|')) { - m_httpd.AddXmlRPCHandler(enabledMethod, availableMethods[enabledMethod]); + m_httpServer.AddXmlRPCHandler(enabledMethod, availableMethods[enabledMethod]); } } } @@ -180,7 +182,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController public void PostInitialise() { - if (!createDefaultAvatars()) + if (!CreateDefaultAvatars()) { m_log.Info("[RADMIN]: Default avatars not loaded"); } @@ -196,7 +198,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController Hashtable requestData = (Hashtable) request.Params[0]; m_log.Info("[RADMIN]: Request to restart Region."); - checkStringParameters(request, new string[] {"password", "regionID"}); + CheckStringParameters(request, new string[] {"password", "regionID"}); if (m_requiredPassword != String.Empty && (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword)) @@ -206,18 +208,25 @@ namespace OpenSim.ApplicationPlugins.RemoteController UUID regionID = new UUID((string) requestData["regionID"]); - responseData["accepted"] = true; - responseData["success"] = true; - response.Value = responseData; - Scene rebootedScene; - if (!m_app.SceneManager.TryGetScene(regionID, out rebootedScene)) + responseData["success"] = false; + responseData["accepted"] = true; + if (!m_application.SceneManager.TryGetScene(regionID, out rebootedScene)) throw new Exception("region not found"); responseData["rebooting"] = true; + + IRestartModule restartModule = rebootedScene.RequestModuleInterface(); + if (restartModule != null) + { + List times = new List { 30, 15 }; + + restartModule.ScheduleRestart(UUID.Zero, "Region will restart in {0}", times.ToArray(), true); + responseData["success"] = true; + } response.Value = responseData; - rebootedScene.Restart(30); + } catch (Exception e) { @@ -245,7 +254,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController { Hashtable requestData = (Hashtable) request.Params[0]; - checkStringParameters(request, new string[] {"password", "message"}); + CheckStringParameters(request, new string[] {"password", "message"}); if (m_requiredPassword != String.Empty && (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword)) @@ -258,7 +267,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController responseData["success"] = true; response.Value = responseData; - m_app.SceneManager.ForEachScene( + m_application.SceneManager.ForEachScene( delegate(Scene scene) { IDialogModule dialogModule = scene.RequestModuleInterface(); @@ -299,7 +308,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController // k, (string)requestData[k], ((string)requestData[k]).Length); // } - checkStringParameters(request, new string[] {"password", "filename", "regionid"}); + CheckStringParameters(request, new string[] {"password", "filename", "regionid"}); if (m_requiredPassword != String.Empty && (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword)) @@ -313,7 +322,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController Scene region = null; - if (!m_app.SceneManager.TryGetScene(regionID, out region)) + if (!m_application.SceneManager.TryGetScene(regionID, out region)) throw new Exception("1: unable to get a scene with that name"); ITerrainModule terrainModule = region.RequestModuleInterface(); @@ -387,7 +396,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController message = "Region is going down now."; } - m_app.SceneManager.ForEachScene( + m_application.SceneManager.ForEachScene( delegate(Scene scene) { IDialogModule dialogModule = scene.RequestModuleInterface(); @@ -422,7 +431,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController private void shutdownTimer_Elapsed(object sender, ElapsedEventArgs e) { - m_app.Shutdown(); + m_application.Shutdown(); } /// @@ -444,12 +453,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController /// desired region X coordinate (integer) /// region_y /// desired region Y coordinate (integer) - /// region_master_first - /// firstname of region master - /// region_master_last - /// lastname of region master - /// region_master_uuid - /// explicit UUID to use for master avatar (optional) + /// estate_owner_first + /// firstname of estate owner (formerly region master) + /// (required if new estate is being created, optional otherwise) + /// estate_owner_last + /// lastname of estate owner (formerly region master) + /// (required if new estate is being created, optional otherwise) + /// estate_owner_uuid + /// explicit UUID to use for estate owner (optional) /// listen_ip /// internal IP address (dotted quad) /// listen_port @@ -465,6 +476,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController /// enable_voice /// if true, enable voice on all parcels, /// ('true' or 'false') (optional, default: false) + /// estate_name + /// the name of the estate to join (or to create if it doesn't + /// already exist) + /// region_file + /// The name of the file to persist the region specifications to. + /// If omitted, the region_file_template setting from OpenSim.ini will be used. (optional) /// /// /// XmlRpcCreateRegionMethod returns @@ -489,7 +506,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); - lock (rslock) + lock (m_requestLock) { int m_regionLimit = m_config.GetInt("region_limit", 0); bool m_enableVoiceForNewRegions = m_config.GetBoolean("create_region_enable_voice", false); @@ -499,22 +516,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController { Hashtable requestData = (Hashtable) request.Params[0]; - checkStringParameters(request, new string[] + CheckStringParameters(request, new string[] { "password", "region_name", - "region_master_first", "region_master_last", - "region_master_password", - "listen_ip", "external_address" + "listen_ip", "external_address", + "estate_name" }); - checkIntegerParams(request, new string[] {"region_x", "region_y", "listen_port"}); + CheckIntegerParams(request, new string[] {"region_x", "region_y", "listen_port"}); // check password if (!String.IsNullOrEmpty(m_requiredPassword) && (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password"); // check whether we still have space left (iff we are using limits) - if (m_regionLimit != 0 && m_app.SceneManager.Scenes.Count >= m_regionLimit) + if (m_regionLimit != 0 && m_application.SceneManager.Scenes.Count >= m_regionLimit) throw new Exception(String.Format("cannot instantiate new region, server capacity {0} already reached; delete regions first", m_regionLimit)); // extract or generate region ID now @@ -524,7 +540,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController !String.IsNullOrEmpty((string) requestData["region_id"])) { regionID = (UUID) (string) requestData["region_id"]; - if (m_app.SceneManager.TryGetScene(regionID, out scene)) + if (m_application.SceneManager.TryGetScene(regionID, out scene)) throw new Exception( String.Format("region UUID already in use by region {0}, UUID {1}, <{2},{3}>", scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, @@ -547,13 +563,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController // check for collisions: region name, region UUID, // region location - if (m_app.SceneManager.TryGetScene(region.RegionName, out scene)) + if (m_application.SceneManager.TryGetScene(region.RegionName, out scene)) throw new Exception( String.Format("region name already in use by region {0}, UUID {1}, <{2},{3}>", scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); - if (m_app.SceneManager.TryGetScene(region.RegionLocX, region.RegionLocY, out scene)) + if (m_application.SceneManager.TryGetScene(region.RegionLocX, region.RegionLocY, out scene)) throw new Exception( String.Format("region location <{0},{1}> already in use by region {2}, UUID {3}, <{4},{5}>", region.RegionLocX, region.RegionLocY, @@ -565,7 +581,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController region.InternalEndPoint.Port = Convert.ToInt32(requestData["listen_port"]); if (0 == region.InternalEndPoint.Port) throw new Exception("listen_port is 0"); - if (m_app.SceneManager.TryGetScene(region.InternalEndPoint, out scene)) + if (m_application.SceneManager.TryGetScene(region.InternalEndPoint, out scene)) throw new Exception( String.Format( "region internal IP {0} and port {1} already in use by region {2}, UUID {3}, <{4},{5}>", @@ -576,22 +592,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController region.ExternalHostName = (string) requestData["external_address"]; - string masterFirst = (string) requestData["region_master_first"]; - string masterLast = (string) requestData["region_master_last"]; - string masterPassword = (string) requestData["region_master_password"]; - - UUID userID = UUID.Zero; - if (requestData.ContainsKey("region_master_uuid")) - { - // ok, client wants us to use an explicit UUID - // regardless of what the avatar name provided - userID = new UUID((string) requestData["estate_owner_uuid"]); - } - bool persist = Convert.ToBoolean((string) requestData["persist"]); if (persist) { - // default place for region XML files is in the + // default place for region configuration files is in the // Regions directory of the config dir (aka /bin) string regionConfigPath = Path.Combine(Util.configDir(), "Regions"); try @@ -604,49 +608,112 @@ namespace OpenSim.ApplicationPlugins.RemoteController { // No INI setting recorded. } - string regionXmlPath = Path.Combine(regionConfigPath, + + string regionIniPath; + + if (requestData.Contains("region_file")) + { + // Make sure that the file to be created is in a subdirectory of the region storage directory. + string requestedFilePath = Path.Combine(regionConfigPath, (string) requestData["region_file"]); + string requestedDirectory = Path.GetDirectoryName(Path.GetFullPath(requestedFilePath)); + if (requestedDirectory.StartsWith(Path.GetFullPath(regionConfigPath))) + regionIniPath = requestedFilePath; + else + throw new Exception("Invalid location for region file."); + } + else + { + regionIniPath = Path.Combine(regionConfigPath, String.Format( m_config.GetString("region_file_template", - "{0}x{1}-{2}.xml"), + "{0}x{1}-{2}.ini"), region.RegionLocX.ToString(), region.RegionLocY.ToString(), regionID.ToString(), region.InternalEndPoint.Port.ToString(), region.RegionName.Replace(" ", "_").Replace(":", "_"). Replace("/", "_"))); + } + m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}", - region.RegionID, regionXmlPath); - region.SaveRegionToFile("dynamic region", regionXmlPath); + region.RegionID, regionIniPath); + region.SaveRegionToFile("dynamic region", regionIniPath); } else { region.Persistent = false; } + + // Set the estate + + // Check for an existing estate + List estateIDs = m_application.EstateDataService.GetEstates((string) requestData["estate_name"]); + if (estateIDs.Count < 1) + { + UUID userID = UUID.Zero; + if (requestData.ContainsKey("estate_owner_uuid")) + { + // ok, client wants us to use an explicit UUID + // regardless of what the avatar name provided + userID = new UUID((string) requestData["estate_owner_uuid"]); + } + else if (requestData.ContainsKey("estate_owner_first") & requestData.ContainsKey("estate_owner_last")) + { + // We need to look up the UUID for the avatar with the provided name. + string ownerFirst = (string) requestData["estate_owner_first"]; + string ownerLast = (string) requestData["estate_owner_last"]; + + Scene currentOrFirst = m_application.SceneManager.CurrentOrFirstScene; + IUserAccountService accountService = currentOrFirst.UserAccountService; + UserAccount user = accountService.GetUserAccount(currentOrFirst.RegionInfo.ScopeID, + ownerFirst, ownerLast); + userID = user.PrincipalID; + } + else + { + throw new Exception("Estate owner details not provided."); + } + + // Create a new estate with the name provided + region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(region.RegionID, true); + region.EstateSettings.EstateName = (string) requestData["estate_name"]; + region.EstateSettings.EstateOwner = userID; + // Persistence does not seem to effect the need to save a new estate + region.EstateSettings.Save(); + } + else + { + int estateID = estateIDs[0]; + + region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(estateID); + + if (!m_application.EstateDataService.LinkRegion(region.RegionID, estateID)) + throw new Exception("Failed to join estate."); + } + // Create the region and perform any initial initialization - IScene newscene; - m_app.CreateRegion(region, out newscene); + IScene newScene; + m_application.CreateRegion(region, out newScene); // If an access specification was provided, use it. // Otherwise accept the default. - newscene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData, "public", m_publicAccess); - newscene.RegionInfo.EstateSettings.EstateOwner = userID; - if (persist) - newscene.RegionInfo.EstateSettings.Save(); + newScene.RegionInfo.EstateSettings.PublicAccess = GetBoolean(requestData, "public", m_publicAccess); + newScene.RegionInfo.EstateSettings.Save(); // enable voice on newly created region if // requested by either the XmlRpc request or the // configuration - if (getBoolean(requestData, "enable_voice", m_enableVoiceForNewRegions)) + if (GetBoolean(requestData, "enable_voice", m_enableVoiceForNewRegions)) { - List parcels = ((Scene)newscene).LandChannel.AllParcels(); + List parcels = ((Scene)newScene).LandChannel.AllParcels(); foreach (ILandObject parcel in parcels) { parcel.LandData.Flags |= (uint) ParcelFlags.AllowVoiceChat; parcel.LandData.Flags |= (uint) ParcelFlags.UseEstateVoiceChan; - ((Scene)newscene).LandChannel.UpdateLandObject(parcel.LandData.LocalID, parcel.LandData); + ((Scene)newScene).LandChannel.UpdateLandObject(parcel.LandData.LocalID, parcel.LandData); } } @@ -704,19 +771,19 @@ namespace OpenSim.ApplicationPlugins.RemoteController XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); - lock (rslock) + lock (m_requestLock) { try { Hashtable requestData = (Hashtable) request.Params[0]; - checkStringParameters(request, new string[] {"password", "region_name"}); + CheckStringParameters(request, new string[] {"password", "region_name"}); Scene scene = null; string regionName = (string) requestData["region_name"]; - if (!m_app.SceneManager.TryGetScene(regionName, out scene)) + if (!m_application.SceneManager.TryGetScene(regionName, out scene)) throw new Exception(String.Format("region \"{0}\" does not exist", regionName)); - m_app.RemoveRegion(scene, true); + m_application.RemoveRegion(scene, true); responseData["success"] = true; responseData["region_name"] = regionName; @@ -774,22 +841,22 @@ namespace OpenSim.ApplicationPlugins.RemoteController Hashtable responseData = new Hashtable(); Scene scene = null; - lock (rslock) + lock (m_requestLock) { try { Hashtable requestData = (Hashtable) request.Params[0]; - checkStringParameters(request, new string[] {"password"}); + CheckStringParameters(request, new string[] {"password"}); if (requestData.ContainsKey("region_id") && !String.IsNullOrEmpty((string) requestData["region_id"])) { // Region specified by UUID UUID regionID = (UUID) (string) requestData["region_id"]; - if (!m_app.SceneManager.TryGetScene(regionID, out scene)) + if (!m_application.SceneManager.TryGetScene(regionID, out scene)) throw new Exception(String.Format("region \"{0}\" does not exist", regionID)); - m_app.CloseRegion(scene); + m_application.CloseRegion(scene); responseData["success"] = true; responseData["region_id"] = regionID; @@ -802,10 +869,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController // Region specified by name string regionName = (string) requestData["region_name"]; - if (!m_app.SceneManager.TryGetScene(regionName, out scene)) + if (!m_application.SceneManager.TryGetScene(regionName, out scene)) throw new Exception(String.Format("region \"{0}\" does not exist", regionName)); - m_app.CloseRegion(scene); + m_application.CloseRegion(scene); responseData["success"] = true; responseData["region_name"] = regionName; @@ -869,27 +936,27 @@ namespace OpenSim.ApplicationPlugins.RemoteController XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); - lock (rslock) + lock (m_requestLock) { try { Hashtable requestData = (Hashtable) request.Params[0]; - checkStringParameters(request, new string[] {"password", "region_name"}); + CheckStringParameters(request, new string[] {"password", "region_name"}); Scene scene = null; string regionName = (string) requestData["region_name"]; - if (!m_app.SceneManager.TryGetScene(regionName, out scene)) + if (!m_application.SceneManager.TryGetScene(regionName, out scene)) throw new Exception(String.Format("region \"{0}\" does not exist", regionName)); // Modify access scene.RegionInfo.EstateSettings.PublicAccess = - getBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); + GetBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); if (scene.RegionInfo.Persistent) scene.RegionInfo.EstateSettings.Save(); if (requestData.ContainsKey("enable_voice")) { - bool enableVoice = getBoolean(requestData, "enable_voice", true); + bool enableVoice = GetBoolean(requestData, "enable_voice", true); List parcels = ((Scene)scene).LandChannel.AllParcels(); foreach (ILandObject parcel in parcels) @@ -976,66 +1043,66 @@ namespace OpenSim.ApplicationPlugins.RemoteController XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); - lock (rslock) + lock (m_requestLock) { try { Hashtable requestData = (Hashtable) request.Params[0]; // check completeness - checkStringParameters(request, new string[] + CheckStringParameters(request, new string[] { "password", "user_firstname", "user_lastname", "user_password", }); - checkIntegerParams(request, new string[] {"start_region_x", "start_region_y"}); + CheckIntegerParams(request, new string[] {"start_region_x", "start_region_y"}); // check password if (!String.IsNullOrEmpty(m_requiredPassword) && (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password"); // do the job - string firstname = (string) requestData["user_firstname"]; - string lastname = (string) requestData["user_lastname"]; - string passwd = (string) requestData["user_password"]; + string firstName = (string) requestData["user_firstname"]; + string lastName = (string) requestData["user_lastname"]; + string password = (string) requestData["user_password"]; - uint regX = Convert.ToUInt32((Int32) requestData["start_region_x"]); - uint regY = Convert.ToUInt32((Int32) requestData["start_region_y"]); + uint regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]); + uint regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]); string email = ""; // empty string for email if (requestData.Contains("user_email")) email = (string)requestData["user_email"]; - Scene scene = m_app.SceneManager.CurrentOrFirstScene; + Scene scene = m_application.SceneManager.CurrentOrFirstScene; UUID scopeID = scene.RegionInfo.ScopeID; - UserAccount account = CreateUser(scopeID, firstname, lastname, passwd, email); + UserAccount account = CreateUser(scopeID, firstName, lastName, password, email); if (null == account) throw new Exception(String.Format("failed to create new user {0} {1}", - firstname, lastname)); + firstName, lastName)); // Set home position GridRegion home = scene.GridService.GetRegionByPosition(scopeID, - (int)(regX * Constants.RegionSize), (int)(regY * Constants.RegionSize)); + (int)(regionXLocation * Constants.RegionSize), (int)(regionYLocation * Constants.RegionSize)); if (null == home) { - m_log.WarnFormat("[RADMIN]: Unable to set home region for newly created user account {0} {1}", firstname, lastname); + m_log.WarnFormat("[RADMIN]: Unable to set home region for newly created user account {0} {1}", firstName, lastName); } else { scene.GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); - m_log.DebugFormat("[RADMIN]: Set home region {0} for updated user account {1} {2}", home.RegionID, firstname, lastname); + m_log.DebugFormat("[RADMIN]: Set home region {0} for updated user account {1} {2}", home.RegionID, firstName, lastName); } // Establish the avatar's initial appearance - updateUserAppearance(responseData, requestData, account.PrincipalID); + UpdateUserAppearance(responseData, requestData, account.PrincipalID); responseData["success"] = true; responseData["avatar_uuid"] = account.PrincipalID.ToString(); response.Value = responseData; - m_log.InfoFormat("[RADMIN]: CreateUser: User {0} {1} created, UUID {2}", firstname, lastname, account.PrincipalID); + m_log.InfoFormat("[RADMIN]: CreateUser: User {0} {1} created, UUID {2}", firstName, lastName, account.PrincipalID); } catch (Exception e) { @@ -1099,17 +1166,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController Hashtable requestData = (Hashtable) request.Params[0]; // check completeness - checkStringParameters(request, new string[] {"password", "user_firstname", "user_lastname"}); + CheckStringParameters(request, new string[] {"password", "user_firstname", "user_lastname"}); - string firstname = (string) requestData["user_firstname"]; - string lastname = (string) requestData["user_lastname"]; + string firstName = (string) requestData["user_firstname"]; + string lastName = (string) requestData["user_lastname"]; - responseData["user_firstname"] = firstname; - responseData["user_lastname"] = lastname; + responseData["user_firstname"] = firstName; + responseData["user_lastname"] = lastName; - UUID scopeID = m_app.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; + UUID scopeID = m_application.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; - UserAccount account = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.GetUserAccount(scopeID, firstname, lastname); + UserAccount account = m_application.SceneManager.CurrentOrFirstScene.UserAccountService.GetUserAccount(scopeID, firstName, lastName); if (null == account) { @@ -1118,9 +1185,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController } else { - GridUserInfo guinfo = m_app.SceneManager.CurrentOrFirstScene.GridUserService.GetGridUserInfo(account.PrincipalID.ToString()); - if (guinfo != null) - responseData["lastlogin"] = guinfo.Login; + GridUserInfo userInfo = m_application.SceneManager.CurrentOrFirstScene.GridUserService.GetGridUserInfo(account.PrincipalID.ToString()); + if (userInfo != null) + responseData["lastlogin"] = userInfo.Login; else responseData["lastlogin"] = 0; @@ -1197,14 +1264,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); - lock (rslock) + lock (m_requestLock) { try { Hashtable requestData = (Hashtable) request.Params[0]; // check completeness - checkStringParameters(request, new string[] { + CheckStringParameters(request, new string[] { "password", "user_firstname", "user_lastname"}); @@ -1213,12 +1280,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController (string) requestData["password"] != m_requiredPassword) throw new Exception("wrong password"); // do the job - string firstname = (string) requestData["user_firstname"]; - string lastname = (string) requestData["user_lastname"]; + string firstName = (string) requestData["user_firstname"]; + string lastName = (string) requestData["user_lastname"]; - string passwd = String.Empty; - uint? regX = null; - uint? regY = null; + string password = String.Empty; + uint? regionXLocation = null; + uint? regionYLocation = null; // uint? ulaX = null; // uint? ulaY = null; // uint? ulaZ = null; @@ -1228,11 +1295,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController // string aboutFirstLive = String.Empty; // string aboutAvatar = String.Empty; - if (requestData.ContainsKey("user_password")) passwd = (string) requestData["user_password"]; + if (requestData.ContainsKey("user_password")) password = (string) requestData["user_password"]; if (requestData.ContainsKey("start_region_x")) - regX = Convert.ToUInt32((Int32) requestData["start_region_x"]); + regionXLocation = Convert.ToUInt32((Int32) requestData["start_region_x"]); if (requestData.ContainsKey("start_region_y")) - regY = Convert.ToUInt32((Int32) requestData["start_region_y"]); + regionYLocation = Convert.ToUInt32((Int32) requestData["start_region_y"]); // if (requestData.ContainsKey("start_lookat_x")) // ulaX = Convert.ToUInt32((Int32) requestData["start_lookat_x"]); @@ -1252,17 +1319,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController // if (requestData.ContainsKey("about_virtual_world")) // aboutAvatar = (string)requestData["about_virtual_world"]; - Scene scene = m_app.SceneManager.CurrentOrFirstScene; + Scene scene = m_application.SceneManager.CurrentOrFirstScene; UUID scopeID = scene.RegionInfo.ScopeID; - UserAccount account = scene.UserAccountService.GetUserAccount(scopeID, firstname, lastname); + UserAccount account = scene.UserAccountService.GetUserAccount(scopeID, firstName, lastName); if (null == account) - throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname)); + throw new Exception(String.Format("avatar {0} {1} does not exist", firstName, lastName)); - if (!String.IsNullOrEmpty(passwd)) + if (!String.IsNullOrEmpty(password)) { - m_log.DebugFormat("[RADMIN]: UpdateUserAccount: updating password for avatar {0} {1}", firstname, lastname); - ChangeUserPassword(firstname, lastname, passwd); + m_log.DebugFormat("[RADMIN]: UpdateUserAccount: updating password for avatar {0} {1}", firstName, lastName); + ChangeUserPassword(firstName, lastName, password); } // if (null != usaX) userProfile.HomeLocationX = (uint) usaX; @@ -1278,21 +1345,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController // Set home position - if ((null != regX) && (null != regY)) + if ((null != regionXLocation) && (null != regionYLocation)) { GridRegion home = scene.GridService.GetRegionByPosition(scopeID, - (int)(regX * Constants.RegionSize), (int)(regY * Constants.RegionSize)); + (int)(regionXLocation * Constants.RegionSize), (int)(regionYLocation * Constants.RegionSize)); if (null == home) { - m_log.WarnFormat("[RADMIN]: Unable to set home region for updated user account {0} {1}", firstname, lastname); + m_log.WarnFormat("[RADMIN]: Unable to set home region for updated user account {0} {1}", firstName, lastName); } else { scene.GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); - m_log.DebugFormat("[RADMIN]: Set home region {0} for updated user account {1} {2}", home.RegionID, firstname, lastname); + m_log.DebugFormat("[RADMIN]: Set home region {0} for updated user account {1} {2}", home.RegionID, firstName, lastName); } } // User has been created. Now establish gender and appearance. - updateUserAppearance(responseData, requestData, account.PrincipalID); + UpdateUserAppearance(responseData, requestData, account.PrincipalID); responseData["success"] = true; responseData["avatar_uuid"] = account.PrincipalID.ToString(); @@ -1300,7 +1367,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController response.Value = responseData; m_log.InfoFormat("[RADMIN]: UpdateUserAccount: account for user {0} {1} updated, UUID {2}", - firstname, lastname, + firstName, lastName, account.PrincipalID); } catch (Exception e) @@ -1328,13 +1395,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController /// This should probably get moved into somewhere more core eventually. /// - private void updateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid) + private void UpdateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid) { m_log.DebugFormat("[RADMIN] updateUserAppearance"); - string dmale = m_config.GetString("default_male", "Default Male"); - string dfemale = m_config.GetString("default_female", "Default Female"); - string dneut = m_config.GetString("default_female", "Default Default"); + string defaultMale = m_config.GetString("default_male", "Default Male"); + string defaultFemale = m_config.GetString("default_female", "Default Female"); + string defaultNeutral = m_config.GetString("default_female", "Default Default"); string model = String.Empty; // Has a gender preference been supplied? @@ -1345,16 +1412,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController { case "m" : case "male" : - model = dmale; + model = defaultMale; break; case "f" : case "female" : - model = dfemale; + model = defaultFemale; break; case "n" : case "neutral" : default : - model = dneut; + model = defaultNeutral; break; } } @@ -1376,19 +1443,19 @@ namespace OpenSim.ApplicationPlugins.RemoteController m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model <{1}>", userid, model); - string[] nomens = model.Split(); - if (nomens.Length != 2) + string[] modelSpecifiers = model.Split(); + if (modelSpecifiers.Length != 2) { m_log.WarnFormat("[RADMIN] User appearance not set for {0}. Invalid model name : <{1}>", userid, model); - // nomens = dmodel.Split(); + // modelSpecifiers = dmodel.Split(); return; } - Scene scene = m_app.SceneManager.CurrentOrFirstScene; + Scene scene = m_application.SceneManager.CurrentOrFirstScene; UUID scopeID = scene.RegionInfo.ScopeID; - UserAccount mprof = scene.UserAccountService.GetUserAccount(scopeID, nomens[0], nomens[1]); + UserAccount modelProfile = scene.UserAccountService.GetUserAccount(scopeID, modelSpecifiers[0], modelSpecifiers[1]); - if (mprof == null) + if (modelProfile == null) { m_log.WarnFormat("[RADMIN] Requested model ({0}) not found. Appearance unchanged", model); return; @@ -1398,7 +1465,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController // actual asset ids, however to complete the magic we need to populate the inventory with the // assets in question. - establishAppearance(userid, mprof.PrincipalID); + EstablishAppearance(userid, modelProfile.PrincipalID); m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", userid, model); @@ -1410,17 +1477,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController /// is known to exist, as is the target avatar. /// - private void establishAppearance(UUID dest, UUID srca) + private void EstablishAppearance(UUID destination, UUID source) { - m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca); - Scene scene = m_app.SceneManager.CurrentOrFirstScene; - AvatarAppearance ava = null; - AvatarData avatar = scene.AvatarService.GetAvatar(srca); - if (avatar != null) - ava = avatar.ToAvatarAppearance(srca); + m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", destination, source); + Scene scene = m_application.SceneManager.CurrentOrFirstScene; // If the model has no associated appearance we're done. - if (ava == null) + AvatarAppearance avatarAppearance = scene.AvatarService.GetAppearance(source); + if (avatarAppearance == null) return; // Simple appearance copy or copy Clothing and Bodyparts folders? @@ -1431,15 +1495,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController // Simple copy of wearables and appearance update try { - copyWearablesAndAttachments(dest, srca, ava); + CopyWearablesAndAttachments(destination, source, avatarAppearance); - AvatarData adata = new AvatarData(ava); - scene.AvatarService.SetAvatar(dest, adata); + scene.AvatarService.SetAppearance(destination, avatarAppearance); } catch (Exception e) { m_log.WarnFormat("[RADMIN] Error transferring appearance for {0} : {1}", - dest, e.Message); + destination, e.Message); } return; @@ -1448,30 +1511,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController // Copy Clothing and Bodypart folders and appearance update try { - Dictionary imap = new Dictionary(); - copyInventoryFolders(dest, srca, AssetType.Clothing, imap, ava); - copyInventoryFolders(dest, srca, AssetType.Bodypart, imap, ava); + Dictionary inventoryMap = new Dictionary(); + CopyInventoryFolders(destination, source, AssetType.Clothing, inventoryMap, avatarAppearance); + CopyInventoryFolders(destination, source, AssetType.Bodypart, inventoryMap, avatarAppearance); - AvatarWearable[] wearables = ava.Wearables; + AvatarWearable[] wearables = avatarAppearance.Wearables; for (int i=0; i - private void copyWearablesAndAttachments(UUID dest, UUID srca, AvatarAppearance ava) + private void CopyWearablesAndAttachments(UUID destination, UUID source, AvatarAppearance avatarAppearance) { - IInventoryService iserv = m_app.SceneManager.CurrentOrFirstScene.InventoryService; + IInventoryService inventoryService = m_application.SceneManager.CurrentOrFirstScene.InventoryService; // Get Clothing folder of receiver - InventoryFolderBase dstf = iserv.GetFolderForType(dest, AssetType.Clothing); + InventoryFolderBase destinationFolder = inventoryService.GetFolderForType(destination, AssetType.Clothing); - if (dstf == null) + if (destinationFolder == null) throw new Exception("Cannot locate folder(s)"); // Missing destination folder? This should *never* be the case - if (dstf.Type != (short)AssetType.Clothing) + if (destinationFolder.Type != (short)AssetType.Clothing) { - dstf = new InventoryFolderBase(); - dstf.ID = UUID.Random(); - dstf.Name = "Clothing"; - dstf.Owner = dest; - dstf.Type = (short)AssetType.Clothing; - dstf.ParentID = iserv.GetRootFolder(dest).ID; - dstf.Version = 1; - iserv.AddFolder(dstf); // store base record - m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", srca); + destinationFolder = new InventoryFolderBase(); + + destinationFolder.ID = UUID.Random(); + destinationFolder.Name = "Clothing"; + destinationFolder.Owner = destination; + destinationFolder.Type = (short)AssetType.Clothing; + destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; + destinationFolder.Version = 1; + inventoryService.AddFolder(destinationFolder); // store base record + m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", source); } // Wearables - AvatarWearable[] wearables = ava.Wearables; + AvatarWearable[] wearables = avatarAppearance.Wearables; AvatarWearable wearable; for (int i=0; i attachments = ava.GetAttachmentDictionary(); + List attachments = avatarAppearance.GetAttachments(); - foreach (KeyValuePair kvp in attachments) + foreach (AvatarAttachment attachment in attachments) { - int attachpoint = kvp.Key; - UUID itemID = kvp.Value[0]; + int attachpoint = attachment.AttachPoint; + UUID itemID = attachment.ItemID; if (itemID != UUID.Zero) { // Get inventory item and copy it - InventoryItemBase item = new InventoryItemBase(itemID, srca); - item = iserv.GetItem(item); + InventoryItemBase item = new InventoryItemBase(itemID, source); + item = inventoryService.GetItem(item); if (item != null) { - InventoryItemBase dsti = new InventoryItemBase(UUID.Random(), dest); - dsti.Name = item.Name; - dsti.Description = item.Description; - dsti.InvType = item.InvType; - dsti.CreatorId = item.CreatorId; - dsti.CreatorIdAsUuid = item.CreatorIdAsUuid; - dsti.NextPermissions = item.NextPermissions; - dsti.CurrentPermissions = item.CurrentPermissions; - dsti.BasePermissions = item.BasePermissions; - dsti.EveryOnePermissions = item.EveryOnePermissions; - dsti.GroupPermissions = item.GroupPermissions; - dsti.AssetType = item.AssetType; - dsti.AssetID = item.AssetID; - dsti.GroupID = item.GroupID; - dsti.GroupOwned = item.GroupOwned; - dsti.SalePrice = item.SalePrice; - dsti.SaleType = item.SaleType; - dsti.Flags = item.Flags; - dsti.CreationDate = item.CreationDate; - dsti.Folder = dstf.ID; + InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); + destinationItem.Name = item.Name; + destinationItem.Description = item.Description; + destinationItem.InvType = item.InvType; + destinationItem.CreatorId = item.CreatorId; + destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; + destinationItem.CreatorData = item.CreatorData; + destinationItem.NextPermissions = item.NextPermissions; + destinationItem.CurrentPermissions = item.CurrentPermissions; + destinationItem.BasePermissions = item.BasePermissions; + destinationItem.EveryOnePermissions = item.EveryOnePermissions; + destinationItem.GroupPermissions = item.GroupPermissions; + destinationItem.AssetType = item.AssetType; + destinationItem.AssetID = item.AssetID; + destinationItem.GroupID = item.GroupID; + destinationItem.GroupOwned = item.GroupOwned; + destinationItem.SalePrice = item.SalePrice; + destinationItem.SaleType = item.SaleType; + destinationItem.Flags = item.Flags; + destinationItem.CreationDate = item.CreationDate; + destinationItem.Folder = destinationFolder.ID; - iserv.AddItem(dsti); - m_log.DebugFormat("[RADMIN] Added item {0} to folder {1}", dsti.ID, dstf.ID); + m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); + m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, destinationFolder.ID); // Attach item - ava.SetAttachment(attachpoint, dsti.ID, dsti.AssetID); - m_log.DebugFormat("[RADMIN] Attached {0}", dsti.ID); + avatarAppearance.SetAttachment(attachpoint, destinationItem.ID, destinationItem.AssetID); + m_log.DebugFormat("[RADMIN]: Attached {0}", destinationItem.ID); } else { - m_log.WarnFormat("[RADMIN] Error transferring {0} to folder {1}", itemID, dstf.ID); + m_log.WarnFormat("[RADMIN]: Error transferring {0} to folder {1}", itemID, destinationFolder.ID); } } } @@ -1618,101 +1682,102 @@ namespace OpenSim.ApplicationPlugins.RemoteController /// copies of Clothing and Bodyparts inventory folders and attaches worn attachments /// - private void copyInventoryFolders(UUID dest, UUID srca, AssetType assettype, Dictionary imap, - AvatarAppearance ava) + private void CopyInventoryFolders(UUID destination, UUID source, AssetType assetType, Dictionary inventoryMap, + AvatarAppearance avatarAppearance) { - IInventoryService iserv = m_app.SceneManager.CurrentOrFirstScene.InventoryService; + IInventoryService inventoryService = m_application.SceneManager.CurrentOrFirstScene.InventoryService; - InventoryFolderBase srcf = iserv.GetFolderForType(srca, assettype); - InventoryFolderBase dstf = iserv.GetFolderForType(dest, assettype); + InventoryFolderBase sourceFolder = inventoryService.GetFolderForType(source, assetType); + InventoryFolderBase destinationFolder = inventoryService.GetFolderForType(destination, assetType); - if (srcf == null || dstf == null) + if (sourceFolder == null || destinationFolder == null) throw new Exception("Cannot locate folder(s)"); // Missing source folder? This should *never* be the case - if (srcf.Type != (short)assettype) + if (sourceFolder.Type != (short)assetType) { - srcf = new InventoryFolderBase(); - srcf.ID = UUID.Random(); - if (assettype == AssetType.Clothing) { - srcf.Name = "Clothing"; + sourceFolder = new InventoryFolderBase(); + sourceFolder.ID = UUID.Random(); + if (assetType == AssetType.Clothing) { + sourceFolder.Name = "Clothing"; } else { - srcf.Name = "Body Parts"; + sourceFolder.Name = "Body Parts"; } - srcf.Owner = srca; - srcf.Type = (short)assettype; - srcf.ParentID = iserv.GetRootFolder(srca).ID; - srcf.Version = 1; - iserv.AddFolder(srcf); // store base record - m_log.ErrorFormat("[RADMIN] Created folder for source {0}", srca); + sourceFolder.Owner = source; + sourceFolder.Type = (short)assetType; + sourceFolder.ParentID = inventoryService.GetRootFolder(source).ID; + sourceFolder.Version = 1; + inventoryService.AddFolder(sourceFolder); // store base record + m_log.ErrorFormat("[RADMIN] Created folder for source {0}", source); } // Missing destination folder? This should *never* be the case - if (dstf.Type != (short)assettype) + if (destinationFolder.Type != (short)assetType) { - dstf = new InventoryFolderBase(); - dstf.ID = UUID.Random(); - dstf.Name = assettype.ToString(); - dstf.Owner = dest; - dstf.Type = (short)assettype; - dstf.ParentID = iserv.GetRootFolder(dest).ID; - dstf.Version = 1; - iserv.AddFolder(dstf); // store base record - m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", srca); + destinationFolder = new InventoryFolderBase(); + destinationFolder.ID = UUID.Random(); + destinationFolder.Name = assetType.ToString(); + destinationFolder.Owner = destination; + destinationFolder.Type = (short)assetType; + destinationFolder.ParentID = inventoryService.GetRootFolder(destination).ID; + destinationFolder.Version = 1; + inventoryService.AddFolder(destinationFolder); // store base record + m_log.ErrorFormat("[RADMIN] Created folder for destination {0}", source); } - InventoryFolderBase efolder; - List folders = iserv.GetFolderContent(srca, srcf.ID).Folders; + InventoryFolderBase extraFolder; + List folders = inventoryService.GetFolderContent(source, sourceFolder.ID).Folders; foreach (InventoryFolderBase folder in folders) { - efolder = new InventoryFolderBase(); - efolder.ID = UUID.Random(); - efolder.Name = folder.Name; - efolder.Owner = dest; - efolder.Type = folder.Type; - efolder.Version = folder.Version; - efolder.ParentID = dstf.ID; - iserv.AddFolder(efolder); + extraFolder = new InventoryFolderBase(); + extraFolder.ID = UUID.Random(); + extraFolder.Name = folder.Name; + extraFolder.Owner = destination; + extraFolder.Type = folder.Type; + extraFolder.Version = folder.Version; + extraFolder.ParentID = destinationFolder.ID; + inventoryService.AddFolder(extraFolder); - m_log.DebugFormat("[RADMIN] Added folder {0} to folder {1}", efolder.ID, srcf.ID); + m_log.DebugFormat("[RADMIN] Added folder {0} to folder {1}", extraFolder.ID, sourceFolder.ID); - List items = iserv.GetFolderContent(srca, folder.ID).Items; + List items = inventoryService.GetFolderContent(source, folder.ID).Items; foreach (InventoryItemBase item in items) { - InventoryItemBase dsti = new InventoryItemBase(UUID.Random(), dest); - dsti.Name = item.Name; - dsti.Description = item.Description; - dsti.InvType = item.InvType; - dsti.CreatorId = item.CreatorId; - dsti.CreatorIdAsUuid = item.CreatorIdAsUuid; - dsti.NextPermissions = item.NextPermissions; - dsti.CurrentPermissions = item.CurrentPermissions; - dsti.BasePermissions = item.BasePermissions; - dsti.EveryOnePermissions = item.EveryOnePermissions; - dsti.GroupPermissions = item.GroupPermissions; - dsti.AssetType = item.AssetType; - dsti.AssetID = item.AssetID; - dsti.GroupID = item.GroupID; - dsti.GroupOwned = item.GroupOwned; - dsti.SalePrice = item.SalePrice; - dsti.SaleType = item.SaleType; - dsti.Flags = item.Flags; - dsti.CreationDate = item.CreationDate; - dsti.Folder = efolder.ID; + InventoryItemBase destinationItem = new InventoryItemBase(UUID.Random(), destination); + destinationItem.Name = item.Name; + destinationItem.Description = item.Description; + destinationItem.InvType = item.InvType; + destinationItem.CreatorId = item.CreatorId; + destinationItem.CreatorIdAsUuid = item.CreatorIdAsUuid; + destinationItem.CreatorData = item.CreatorData; + destinationItem.NextPermissions = item.NextPermissions; + destinationItem.CurrentPermissions = item.CurrentPermissions; + destinationItem.BasePermissions = item.BasePermissions; + destinationItem.EveryOnePermissions = item.EveryOnePermissions; + destinationItem.GroupPermissions = item.GroupPermissions; + destinationItem.AssetType = item.AssetType; + destinationItem.AssetID = item.AssetID; + destinationItem.GroupID = item.GroupID; + destinationItem.GroupOwned = item.GroupOwned; + destinationItem.SalePrice = item.SalePrice; + destinationItem.SaleType = item.SaleType; + destinationItem.Flags = item.Flags; + destinationItem.CreationDate = item.CreationDate; + destinationItem.Folder = extraFolder.ID; - iserv.AddItem(dsti); - imap.Add(item.ID, dsti.ID); - m_log.DebugFormat("[RADMIN] Added item {0} to folder {1}", dsti.ID, efolder.ID); + m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(destinationItem); + inventoryMap.Add(item.ID, destinationItem.ID); + m_log.DebugFormat("[RADMIN]: Added item {0} to folder {1}", destinationItem.ID, extraFolder.ID); // Attach item, if original is attached - int attachpoint = ava.GetAttachpoint(item.ID); + int attachpoint = avatarAppearance.GetAttachpoint(item.ID); if (attachpoint != 0) { - ava.SetAttachment(attachpoint, dsti.ID, dsti.AssetID); - m_log.DebugFormat("[RADMIN] Attached {0}", dsti.ID); + avatarAppearance.SetAttachment(attachpoint, destinationItem.ID, destinationItem.AssetID); + m_log.DebugFormat("[RADMIN]: Attached {0}", destinationItem.ID); } } } @@ -1728,63 +1793,62 @@ namespace OpenSim.ApplicationPlugins.RemoteController /// other outfits are provided to allow "real" avatars a way to easily change their outfits. /// - private bool createDefaultAvatars() + private bool CreateDefaultAvatars() { // Only load once - - if (daload) + if (m_defaultAvatarsLoaded) { return false; } m_log.DebugFormat("[RADMIN] Creating default avatar entries"); - daload = true; + m_defaultAvatarsLoaded = true; // Load processing starts here... try { - string dafn = null; + string defaultAppearanceFileName = null; //m_config may be null if RemoteAdmin configuration secition is missing or disabled in OpenSim.ini if (m_config != null) { - dafn = m_config.GetString("default_appearance", "default_appearance.xml"); + defaultAppearanceFileName = m_config.GetString("default_appearance", "default_appearance.xml"); } - if (File.Exists(dafn)) + if (File.Exists(defaultAppearanceFileName)) { XmlDocument doc = new XmlDocument(); string name = "*unknown*"; string email = "anon@anon"; - uint regX = 1000; - uint regY = 1000; - string passwd = UUID.Random().ToString(); // No requirement to sign-in. + uint regionXLocation = 1000; + uint regionYLocation = 1000; + string password = UUID.Random().ToString(); // No requirement to sign-in. UUID ID = UUID.Zero; - AvatarAppearance mava; + AvatarAppearance avatarAppearance; XmlNodeList avatars; XmlNodeList assets; XmlNode perms = null; bool include = false; bool select = false; - Scene scene = m_app.SceneManager.CurrentOrFirstScene; - IInventoryService iserv = scene.InventoryService; - IAssetService aserv = scene.AssetService; + Scene scene = m_application.SceneManager.CurrentOrFirstScene; + IInventoryService inventoryService = scene.InventoryService; + IAssetService assetService = scene.AssetService; - doc.LoadXml(File.ReadAllText(dafn)); + doc.LoadXml(File.ReadAllText(defaultAppearanceFileName)); // Load up any included assets. Duplicates will be ignored assets = doc.GetElementsByTagName("RequiredAsset"); - foreach (XmlNode asset in assets) + foreach (XmlNode assetNode in assets) { - AssetBase rass = new AssetBase(UUID.Random(), GetStringAttribute(asset, "name", ""), SByte.Parse(GetStringAttribute(asset, "type", "")), UUID.Zero.ToString()); - rass.Description = GetStringAttribute(asset,"desc",""); - rass.Local = Boolean.Parse(GetStringAttribute(asset,"local","")); - rass.Temporary = Boolean.Parse(GetStringAttribute(asset,"temporary","")); - rass.Data = Convert.FromBase64String(asset.InnerText); - aserv.Store(rass); + AssetBase asset = new AssetBase(UUID.Random(), GetStringAttribute(assetNode, "name", ""), SByte.Parse(GetStringAttribute(assetNode, "type", "")), UUID.Zero.ToString()); + asset.Description = GetStringAttribute(assetNode,"desc",""); + asset.Local = Boolean.Parse(GetStringAttribute(assetNode,"local","")); + asset.Temporary = Boolean.Parse(GetStringAttribute(assetNode,"temporary","")); + asset.Data = Convert.FromBase64String(assetNode.InnerText); + assetService.Store(asset); } avatars = doc.GetElementsByTagName("Avatar"); @@ -1803,19 +1867,19 @@ namespace OpenSim.ApplicationPlugins.RemoteController // Only the name value is mandatory name = GetStringAttribute(avatar,"name",name); email = GetStringAttribute(avatar,"email",email); - regX = GetUnsignedAttribute(avatar,"regx",regX); - regY = GetUnsignedAttribute(avatar,"regy",regY); - passwd = GetStringAttribute(avatar,"password",passwd); + regionXLocation = GetUnsignedAttribute(avatar,"regx",regionXLocation); + regionYLocation = GetUnsignedAttribute(avatar,"regy",regionYLocation); + password = GetStringAttribute(avatar,"password",password); - string[] nomens = name.Split(); + string[] names = name.Split(); UUID scopeID = scene.RegionInfo.ScopeID; - UserAccount account = scene.UserAccountService.GetUserAccount(scopeID, nomens[0], nomens[1]); + UserAccount account = scene.UserAccountService.GetUserAccount(scopeID, names[0], names[1]); if (null == account) { - account = CreateUser(scopeID, nomens[0], nomens[1], passwd, email); + account = CreateUser(scopeID, names[0], names[1], password, email); if (null == account) { - m_log.ErrorFormat("[RADMIN] Avatar {0} {1} was not created", nomens[0], nomens[1]); + m_log.ErrorFormat("[RADMIN] Avatar {0} {1} was not created", names[0], names[1]); return false; } } @@ -1823,12 +1887,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController // Set home position GridRegion home = scene.GridService.GetRegionByPosition(scopeID, - (int)(regX * Constants.RegionSize), (int)(regY * Constants.RegionSize)); + (int)(regionXLocation * Constants.RegionSize), (int)(regionYLocation * Constants.RegionSize)); if (null == home) { - m_log.WarnFormat("[RADMIN]: Unable to set home region for newly created user account {0} {1}", nomens[0], nomens[1]); + m_log.WarnFormat("[RADMIN]: Unable to set home region for newly created user account {0} {1}", names[0], names[1]); } else { scene.GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); - m_log.DebugFormat("[RADMIN]: Set home region {0} for updated user account {1} {2}", home.RegionID, nomens[0], nomens[1]); + m_log.DebugFormat("[RADMIN]: Set home region {0} for updated user account {1} {2}", home.RegionID, names[0], names[1]); } ID = account.PrincipalID; @@ -1850,13 +1914,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (include) { // Setup for appearance processing - AvatarData adata = scene.AvatarService.GetAvatar(ID); - if (adata != null) - mava = adata.ToAvatarAppearance(ID); - else - mava = new AvatarAppearance(); + avatarAppearance = scene.AvatarService.GetAppearance(ID); + if (avatarAppearance == null) + avatarAppearance = new AvatarAppearance(); - AvatarWearable[] wearables = mava.Wearables; + AvatarWearable[] wearables = avatarAppearance.Wearables; for (int i=0; i folders = iserv.GetFolderContent(ID, cfolder.ID).Folders; - efolder = null; + List folders = inventoryService.GetFolderContent(ID, clothingFolder.ID).Folders; + extraFolder = null; foreach (InventoryFolderBase folder in folders) { - if (folder.Name == oname) + if (folder.Name == outfitName) { - efolder = folder; + extraFolder = folder; break; } } // Otherwise, we must create the folder. - if (efolder == null) + if (extraFolder == null) { - m_log.DebugFormat("[RADMIN] Creating outfit folder {0} for {1}", oname, name); - efolder = new InventoryFolderBase(); - efolder.ID = UUID.Random(); - efolder.Name = oname; - efolder.Owner = ID; - efolder.Type = (short)AssetType.Clothing; - efolder.Version = 1; - efolder.ParentID = cfolder.ID; - iserv.AddFolder(efolder); - m_log.DebugFormat("[RADMIN] Adding outfile folder {0} to folder {1}", efolder.ID, cfolder.ID); + m_log.DebugFormat("[RADMIN] Creating outfit folder {0} for {1}", outfitName, name); + extraFolder = new InventoryFolderBase(); + extraFolder.ID = UUID.Random(); + extraFolder.Name = outfitName; + extraFolder.Owner = ID; + extraFolder.Type = (short)AssetType.Clothing; + extraFolder.Version = 1; + extraFolder.ParentID = clothingFolder.ID; + inventoryService.AddFolder(extraFolder); + m_log.DebugFormat("[RADMIN] Adding outfile folder {0} to folder {1}", extraFolder.ID, clothingFolder.ID); } // Now get the pieces that make up the outfit @@ -1950,55 +2012,56 @@ namespace OpenSim.ApplicationPlugins.RemoteController } } - InventoryItemBase iitem = null; + InventoryItemBase inventoryItem = null; // Check if asset is in inventory already - iitem = null; - List iitems = iserv.GetFolderContent(ID, efolder.ID).Items; + inventoryItem = null; + List inventoryItems = inventoryService.GetFolderContent(ID, extraFolder.ID).Items; - foreach (InventoryItemBase litem in iitems) + foreach (InventoryItemBase listItem in inventoryItems) { - if (litem.AssetID == assetid) + if (listItem.AssetID == assetid) { - iitem = litem; + inventoryItem = listItem; break; } } // Create inventory item - if (iitem == null) + if (inventoryItem == null) { - iitem = new InventoryItemBase(UUID.Random(), ID); - iitem.Name = GetStringAttribute(item,"name",""); - iitem.Description = GetStringAttribute(item,"desc",""); - iitem.InvType = GetIntegerAttribute(item,"invtype",-1); - iitem.CreatorId = GetStringAttribute(item,"creatorid",""); - iitem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid",""); - iitem.NextPermissions = GetUnsignedAttribute(perms,"next",0x7fffffff); - iitem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff); - iitem.BasePermissions = GetUnsignedAttribute(perms,"base",0x7fffffff); - iitem.EveryOnePermissions = GetUnsignedAttribute(perms,"everyone",0x7fffffff); - iitem.GroupPermissions = GetUnsignedAttribute(perms,"group",0x7fffffff); - iitem.AssetType = GetIntegerAttribute(item,"assettype",-1); - iitem.AssetID = assetid; // associated asset - iitem.GroupID = (UUID)GetStringAttribute(item,"groupid",""); - iitem.GroupOwned = (GetStringAttribute(item,"groupowned","false") == "true"); - iitem.SalePrice = GetIntegerAttribute(item,"saleprice",0); - iitem.SaleType = (byte)GetIntegerAttribute(item,"saletype",0); - iitem.Flags = GetUnsignedAttribute(item,"flags",0); - iitem.CreationDate = GetIntegerAttribute(item,"creationdate",Util.UnixTimeSinceEpoch()); - iitem.Folder = efolder.ID; // Parent folder + inventoryItem = new InventoryItemBase(UUID.Random(), ID); + inventoryItem.Name = GetStringAttribute(item,"name",""); + inventoryItem.Description = GetStringAttribute(item,"desc",""); + inventoryItem.InvType = GetIntegerAttribute(item,"invtype",-1); + inventoryItem.CreatorId = GetStringAttribute(item,"creatorid",""); + inventoryItem.CreatorIdAsUuid = (UUID)GetStringAttribute(item,"creatoruuid",""); + inventoryItem.CreatorData = GetStringAttribute(item, "creatordata", ""); + inventoryItem.NextPermissions = GetUnsignedAttribute(perms, "next", 0x7fffffff); + inventoryItem.CurrentPermissions = GetUnsignedAttribute(perms,"current",0x7fffffff); + inventoryItem.BasePermissions = GetUnsignedAttribute(perms,"base",0x7fffffff); + inventoryItem.EveryOnePermissions = GetUnsignedAttribute(perms,"everyone",0x7fffffff); + inventoryItem.GroupPermissions = GetUnsignedAttribute(perms,"group",0x7fffffff); + inventoryItem.AssetType = GetIntegerAttribute(item,"assettype",-1); + inventoryItem.AssetID = assetid; // associated asset + inventoryItem.GroupID = (UUID)GetStringAttribute(item,"groupid",""); + inventoryItem.GroupOwned = (GetStringAttribute(item,"groupowned","false") == "true"); + inventoryItem.SalePrice = GetIntegerAttribute(item,"saleprice",0); + inventoryItem.SaleType = (byte)GetIntegerAttribute(item,"saletype",0); + inventoryItem.Flags = GetUnsignedAttribute(item,"flags",0); + inventoryItem.CreationDate = GetIntegerAttribute(item,"creationdate",Util.UnixTimeSinceEpoch()); + inventoryItem.Folder = extraFolder.ID; // Parent folder - iserv.AddItem(iitem); - m_log.DebugFormat("[RADMIN] Added item {0} to folder {1}", iitem.ID, efolder.ID); + m_application.SceneManager.CurrentOrFirstScene.AddInventoryItem(inventoryItem); + m_log.DebugFormat("[RADMIN] Added item {0} to folder {1}", inventoryItem.ID, extraFolder.ID); } // Attach item, if attachpoint is specified int attachpoint = GetIntegerAttribute(item,"attachpoint",0); if (attachpoint != 0) { - mava.SetAttachment(attachpoint, iitem.ID, iitem.AssetID); - m_log.DebugFormat("[RADMIN] Attached {0}", iitem.ID); + avatarAppearance.SetAttachment(attachpoint, inventoryItem.ID, inventoryItem.AssetID); + m_log.DebugFormat("[RADMIN] Attached {0}", inventoryItem.ID); } // Record whether or not the item is to be initially worn @@ -2006,20 +2069,18 @@ namespace OpenSim.ApplicationPlugins.RemoteController { if (select && (GetStringAttribute(item, "wear", "false") == "true")) { - mava.Wearables[iitem.Flags].ItemID = iitem.ID; - mava.Wearables[iitem.Flags].AssetID = iitem.AssetID; + avatarAppearance.Wearables[inventoryItem.Flags].Wear(inventoryItem.ID, inventoryItem.AssetID); } } catch (Exception e) { - m_log.WarnFormat("[RADMIN] Error wearing item {0} : {1}", iitem.ID, e.Message); + m_log.WarnFormat("[RADMIN] Error wearing item {0} : {1}", inventoryItem.ID, e.Message); } } // foreach item in outfit - m_log.DebugFormat("[RADMIN] Outfit {0} load completed", oname); + m_log.DebugFormat("[RADMIN] Outfit {0} load completed", outfitName); } // foreach outfit m_log.DebugFormat("[RADMIN] Inventory update complete for {0}", name); - AvatarData adata2 = new AvatarData(mava); - scene.AvatarService.SetAvatar(ID, adata2); + scene.AvatarService.SetAppearance(ID, avatarAppearance); } catch (Exception e) { @@ -2086,19 +2147,19 @@ namespace OpenSim.ApplicationPlugins.RemoteController XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); - lock (rslock) + lock (m_requestLock) { try { Hashtable requestData = (Hashtable) request.Params[0]; // check completeness - foreach (string p in new string[] {"password", "filename"}) + foreach (string parameter in new string[] {"password", "filename"}) { - if (!requestData.Contains(p)) - throw new Exception(String.Format("missing parameter {0}", p)); - if (String.IsNullOrEmpty((string) requestData[p])) - throw new Exception(String.Format("parameter {0} is empty")); + if (!requestData.Contains(parameter)) + throw new Exception(String.Format("missing parameter {0}", parameter)); + if (String.IsNullOrEmpty((string) requestData[parameter])) + throw new Exception(String.Format("parameter {0} is empty", parameter)); } // check password @@ -2110,13 +2171,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("region_uuid")) { UUID region_uuid = (UUID) (string) requestData["region_uuid"]; - if (!m_app.SceneManager.TryGetScene(region_uuid, out scene)) + if (!m_application.SceneManager.TryGetScene(region_uuid, out scene)) throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); } else if (requestData.Contains("region_name")) { string region_name = (string) requestData["region_name"]; - if (!m_app.SceneManager.TryGetScene(region_name, out scene)) + if (!m_application.SceneManager.TryGetScene(region_name, out scene)) throw new Exception(String.Format("failed to switch to region {0}", region_name)); } else throw new Exception("neither region_name nor region_uuid given"); @@ -2210,13 +2271,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("region_uuid")) { UUID region_uuid = (UUID) (string) requestData["region_uuid"]; - if (!m_app.SceneManager.TryGetScene(region_uuid, out scene)) + if (!m_application.SceneManager.TryGetScene(region_uuid, out scene)) throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); } else if (requestData.Contains("region_name")) { string region_name = (string) requestData["region_name"]; - if (!m_app.SceneManager.TryGetScene(region_name, out scene)) + if (!m_application.SceneManager.TryGetScene(region_name, out scene)) throw new Exception(String.Format("failed to switch to region {0}", region_name)); } else throw new Exception("neither region_name nor region_uuid given"); @@ -2226,8 +2287,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (archiver != null) { scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted; - archiver.ArchiveRegion(filename); - lock (SOLock) Monitor.Wait(SOLock,5000); + archiver.ArchiveRegion(filename, new Dictionary()); + lock (m_saveOarLock) Monitor.Wait(m_saveOarLock,5000); scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted; } else @@ -2255,7 +2316,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController private void RemoteAdminOarSaveCompleted(Guid uuid, string name) { m_log.DebugFormat("[RADMIN] File processing complete for {0}", name); - lock (SOLock) Monitor.Pulse(SOLock); + lock (m_saveOarLock) Monitor.Pulse(m_saveOarLock); } public XmlRpcResponse XmlRpcLoadXMLMethod(XmlRpcRequest request, IPEndPoint remoteClient) @@ -2267,7 +2328,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); - lock (rslock) + lock (m_requestLock) { try { @@ -2290,14 +2351,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("region_uuid")) { UUID region_uuid = (UUID) (string) requestData["region_uuid"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) + if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); } else if (requestData.Contains("region_name")) { string region_name = (string) requestData["region_name"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_name)) + if (!m_application.SceneManager.TrySetCurrentScene(region_name)) throw new Exception(String.Format("failed to switch to region {0}", region_name)); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); } @@ -2314,11 +2375,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController switch (xml_version) { case "1": - m_app.SceneManager.LoadCurrentSceneFromXml(filename, true, new Vector3(0, 0, 0)); + m_application.SceneManager.LoadCurrentSceneFromXml(filename, true, new Vector3(0, 0, 0)); break; case "2": - m_app.SceneManager.LoadCurrentSceneFromXml2(filename); + m_application.SceneManager.LoadCurrentSceneFromXml2(filename); break; default: @@ -2375,14 +2436,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("region_uuid")) { UUID region_uuid = (UUID) (string) requestData["region_uuid"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) + if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); } else if (requestData.Contains("region_name")) { string region_name = (string) requestData["region_name"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_name)) + if (!m_application.SceneManager.TrySetCurrentScene(region_name)) throw new Exception(String.Format("failed to switch to region {0}", region_name)); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); } @@ -2399,11 +2460,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController switch (xml_version) { case "1": - m_app.SceneManager.SaveCurrentSceneToXml(filename); + m_application.SceneManager.SaveCurrentSceneToXml(filename); break; case "2": - m_app.SceneManager.SaveCurrentSceneToXml2(filename); + m_application.SceneManager.SaveCurrentSceneToXml2(filename); break; default: @@ -2454,21 +2515,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("region_uuid")) { UUID region_uuid = (UUID) (string) requestData["region_uuid"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) + if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); } else if (requestData.Contains("region_name")) { string region_name = (string) requestData["region_name"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_name)) + if (!m_application.SceneManager.TrySetCurrentScene(region_name)) throw new Exception(String.Format("failed to switch to region {0}", region_name)); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); } else throw new Exception("neither region_name nor region_uuid given"); - Scene s = m_app.SceneManager.CurrentScene; - int health = s.GetHealth(); + Scene scene = m_application.SceneManager.CurrentScene; + int health = scene.GetHealth(); responseData["health"] = health; response.Value = responseData; @@ -2551,23 +2612,23 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("region_uuid")) { UUID region_uuid = (UUID) (string) requestData["region_uuid"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) + if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); } else if (requestData.Contains("region_name")) { string region_name = (string) requestData["region_name"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_name)) + if (!m_application.SceneManager.TrySetCurrentScene(region_name)) throw new Exception(String.Format("failed to switch to region {0}", region_name)); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); } else throw new Exception("neither region_name nor region_uuid given"); - Scene s = m_app.SceneManager.CurrentScene; - s.RegionInfo.EstateSettings.EstateAccess = new UUID[]{}; - if (s.RegionInfo.Persistent) - s.RegionInfo.EstateSettings.Save(); + Scene scene = m_application.SceneManager.CurrentScene; + scene.RegionInfo.EstateSettings.EstateAccess = new UUID[]{}; + if (scene.RegionInfo.Persistent) + scene.RegionInfo.EstateSettings.Save(); } catch (Exception e) { @@ -2608,26 +2669,26 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("region_uuid")) { UUID region_uuid = (UUID) (string) requestData["region_uuid"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) + if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); } else if (requestData.Contains("region_name")) { string region_name = (string) requestData["region_name"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_name)) + if (!m_application.SceneManager.TrySetCurrentScene(region_name)) throw new Exception(String.Format("failed to switch to region {0}", region_name)); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); } else throw new Exception("neither region_name nor region_uuid given"); - int addk = 0; + int addedUsers = 0; if (requestData.Contains("users")) { - UUID scopeID = m_app.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; - IUserAccountService userService = m_app.SceneManager.CurrentOrFirstScene.UserAccountService; - Scene s = m_app.SceneManager.CurrentScene; + UUID scopeID = m_application.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; + IUserAccountService userService = m_application.SceneManager.CurrentOrFirstScene.UserAccountService; + Scene scene = m_application.SceneManager.CurrentScene; Hashtable users = (Hashtable) requestData["users"]; List uuids = new List(); foreach (string name in users.Values) @@ -2637,24 +2698,24 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (account != null) { uuids.Add(account.PrincipalID); - m_log.DebugFormat("[RADMIN] adding \"{0}\" to ACL for \"{1}\"", name, s.RegionInfo.RegionName); + m_log.DebugFormat("[RADMIN] adding \"{0}\" to ACL for \"{1}\"", name, scene.RegionInfo.RegionName); } } - List acl = new List(s.RegionInfo.EstateSettings.EstateAccess); + List accessControlList = new List(scene.RegionInfo.EstateSettings.EstateAccess); foreach (UUID uuid in uuids) { - if (!acl.Contains(uuid)) + if (!accessControlList.Contains(uuid)) { - acl.Add(uuid); - addk++; + accessControlList.Add(uuid); + addedUsers++; } } - s.RegionInfo.EstateSettings.EstateAccess = acl.ToArray(); - if (s.RegionInfo.Persistent) - s.RegionInfo.EstateSettings.Save(); + scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); + if (scene.RegionInfo.Persistent) + scene.RegionInfo.EstateSettings.Save(); } - responseData["added"] = addk; + responseData["added"] = addedUsers; } catch (Exception e) { @@ -2695,27 +2756,27 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("region_uuid")) { UUID region_uuid = (UUID) (string) requestData["region_uuid"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) + if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); } else if (requestData.Contains("region_name")) { string region_name = (string) requestData["region_name"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_name)) + if (!m_application.SceneManager.TrySetCurrentScene(region_name)) throw new Exception(String.Format("failed to switch to region {0}", region_name)); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); } else throw new Exception("neither region_name nor region_uuid given"); - int remk = 0; + int removedUsers = 0; if (requestData.Contains("users")) { - UUID scopeID = m_app.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; - IUserAccountService userService = m_app.SceneManager.CurrentOrFirstScene.UserAccountService; - //UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService; - Scene s = m_app.SceneManager.CurrentScene; + UUID scopeID = m_application.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; + IUserAccountService userService = m_application.SceneManager.CurrentOrFirstScene.UserAccountService; + //UserProfileCacheService ups = m_application.CommunicationsManager.UserProfileCacheService; + Scene scene = m_application.SceneManager.CurrentScene; Hashtable users = (Hashtable) requestData["users"]; List uuids = new List(); foreach (string name in users.Values) @@ -2727,21 +2788,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController uuids.Add(account.PrincipalID); } } - List acl = new List(s.RegionInfo.EstateSettings.EstateAccess); + List accessControlList = new List(scene.RegionInfo.EstateSettings.EstateAccess); foreach (UUID uuid in uuids) { - if (acl.Contains(uuid)) + if (accessControlList.Contains(uuid)) { - acl.Remove(uuid); - remk++; + accessControlList.Remove(uuid); + removedUsers++; } } - s.RegionInfo.EstateSettings.EstateAccess = acl.ToArray(); - if (s.RegionInfo.Persistent) - s.RegionInfo.EstateSettings.Save(); + scene.RegionInfo.EstateSettings.EstateAccess = accessControlList.ToArray(); + if (scene.RegionInfo.Persistent) + scene.RegionInfo.EstateSettings.Save(); } - responseData["removed"] = remk; + responseData["removed"] = removedUsers; } catch (Exception e) { @@ -2782,27 +2843,27 @@ namespace OpenSim.ApplicationPlugins.RemoteController if (requestData.Contains("region_uuid")) { UUID region_uuid = (UUID) (string) requestData["region_uuid"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_uuid)) + if (!m_application.SceneManager.TrySetCurrentScene(region_uuid)) throw new Exception(String.Format("failed to switch to region {0}", region_uuid.ToString())); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_uuid.ToString()); } else if (requestData.Contains("region_name")) { string region_name = (string) requestData["region_name"]; - if (!m_app.SceneManager.TrySetCurrentScene(region_name)) + if (!m_application.SceneManager.TrySetCurrentScene(region_name)) throw new Exception(String.Format("failed to switch to region {0}", region_name)); m_log.InfoFormat("[RADMIN] Switched to region {0}", region_name); } else throw new Exception("neither region_name nor region_uuid given"); - Scene s = m_app.SceneManager.CurrentScene; - UUID[] acl = s.RegionInfo.EstateSettings.EstateAccess; + Scene scene = m_application.SceneManager.CurrentScene; + UUID[] accessControlList = scene.RegionInfo.EstateSettings.EstateAccess; Hashtable users = new Hashtable(); - foreach (UUID user in acl) + foreach (UUID user in accessControlList) { - UUID scopeID = m_app.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; - UserAccount account = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.GetUserAccount(scopeID, user); + UUID scopeID = m_application.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID; + UserAccount account = m_application.SceneManager.CurrentOrFirstScene.UserAccountService.GetUserAccount(scopeID, user); if (account != null) { users[user.ToString()] = account.FirstName + " " + account.LastName; @@ -2827,29 +2888,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController return response; } - private static void checkStringParameters(XmlRpcRequest request, string[] param) + private static void CheckStringParameters(XmlRpcRequest request, string[] param) { Hashtable requestData = (Hashtable) request.Params[0]; - foreach (string p in param) + foreach (string parameter in param) { - if (!requestData.Contains(p)) - throw new Exception(String.Format("missing string parameter {0}", p)); - if (String.IsNullOrEmpty((string) requestData[p])) - throw new Exception(String.Format("parameter {0} is empty", p)); + if (!requestData.Contains(parameter)) + throw new Exception(String.Format("missing string parameter {0}", parameter)); + if (String.IsNullOrEmpty((string) requestData[parameter])) + throw new Exception(String.Format("parameter {0} is empty", parameter)); } } - private static void checkIntegerParams(XmlRpcRequest request, string[] param) + private static void CheckIntegerParams(XmlRpcRequest request, string[] param) { Hashtable requestData = (Hashtable) request.Params[0]; - foreach (string p in param) + foreach (string parameter in param) { - if (!requestData.Contains(p)) - throw new Exception(String.Format("missing integer parameter {0}", p)); + if (!requestData.Contains(parameter)) + throw new Exception(String.Format("missing integer parameter {0}", parameter)); } } - private bool getBoolean(Hashtable requestData, string tag, bool defv) + private bool GetBoolean(Hashtable requestData, string tag, bool defaultValue) { // If an access value has been provided, apply it. if (requestData.Contains(tag)) @@ -2865,29 +2926,29 @@ namespace OpenSim.ApplicationPlugins.RemoteController case "0" : return false; default : - return defv; + return defaultValue; } } else - return defv; + return defaultValue; } - private int GetIntegerAttribute(XmlNode node, string attr, int dv) + private int GetIntegerAttribute(XmlNode node, string attribute, int defaultValue) { - try { return Convert.ToInt32(node.Attributes[attr].Value); } catch{} - return dv; + try { return Convert.ToInt32(node.Attributes[attribute].Value); } catch{} + return defaultValue; } - private uint GetUnsignedAttribute(XmlNode node, string attr, uint dv) + private uint GetUnsignedAttribute(XmlNode node, string attribute, uint defaultValue) { - try { return Convert.ToUInt32(node.Attributes[attr].Value); } catch{} - return dv; + try { return Convert.ToUInt32(node.Attributes[attribute].Value); } catch{} + return defaultValue; } - private string GetStringAttribute(XmlNode node, string attr, string dv) + private string GetStringAttribute(XmlNode node, string attribute, string defaultValue) { - try { return node.Attributes[attr].Value; } catch{} - return dv; + try { return node.Attributes[attribute].Value; } catch{} + return defaultValue; } public void Dispose() @@ -2904,14 +2965,14 @@ namespace OpenSim.ApplicationPlugins.RemoteController /// private UserAccount CreateUser(UUID scopeID, string firstName, string lastName, string password, string email) { - Scene scene = m_app.SceneManager.CurrentOrFirstScene; - IUserAccountService m_UserAccountService = scene.UserAccountService; - IGridService m_GridService = scene.GridService; - IAuthenticationService m_AuthenticationService = scene.AuthenticationService; - IGridUserService m_GridUserService = scene.GridUserService; - IInventoryService m_InventoryService = scene.InventoryService; + Scene scene = m_application.SceneManager.CurrentOrFirstScene; + IUserAccountService userAccountService = scene.UserAccountService; + IGridService gridService = scene.GridService; + IAuthenticationService authenticationService = scene.AuthenticationService; + IGridUserService gridUserService = scene.GridUserService; + IInventoryService inventoryService = scene.InventoryService; - UserAccount account = m_UserAccountService.GetUserAccount(scopeID, firstName, lastName); + UserAccount account = userAccountService.GetUserAccount(scopeID, firstName, lastName); if (null == account) { account = new UserAccount(scopeID, firstName, lastName, email); @@ -2924,26 +2985,26 @@ namespace OpenSim.ApplicationPlugins.RemoteController account.ServiceURLs["AssetServerURI"] = string.Empty; } - if (m_UserAccountService.StoreUserAccount(account)) + if (userAccountService.StoreUserAccount(account)) { bool success; - if (m_AuthenticationService != null) + if (authenticationService != null) { - success = m_AuthenticationService.SetPassword(account.PrincipalID, password); + success = authenticationService.SetPassword(account.PrincipalID, password); if (!success) m_log.WarnFormat("[RADMIN]: Unable to set password for account {0} {1}.", firstName, lastName); } GridRegion home = null; - if (m_GridService != null) + if (gridService != null) { - List defaultRegions = m_GridService.GetDefaultRegions(UUID.Zero); + List defaultRegions = gridService.GetDefaultRegions(UUID.Zero); if (defaultRegions != null && defaultRegions.Count >= 1) home = defaultRegions[0]; - if (m_GridUserService != null && home != null) - m_GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); + if (gridUserService != null && home != null) + gridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); else m_log.WarnFormat("[RADMIN]: Unable to set home for account {0} {1}.", firstName, lastName); @@ -2952,9 +3013,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController m_log.WarnFormat("[RADMIN]: Unable to retrieve home region for account {0} {1}.", firstName, lastName); - if (m_InventoryService != null) + if (inventoryService != null) { - success = m_InventoryService.CreateUserInventory(account.PrincipalID); + success = inventoryService.CreateUserInventory(account.PrincipalID); if (!success) m_log.WarnFormat("[RADMIN]: Unable to create inventory for account {0} {1}.", firstName, lastName); @@ -2981,16 +3042,16 @@ namespace OpenSim.ApplicationPlugins.RemoteController /// private bool ChangeUserPassword(string firstName, string lastName, string password) { - Scene scene = m_app.SceneManager.CurrentOrFirstScene; - IUserAccountService m_UserAccountService = scene.UserAccountService; - IAuthenticationService m_AuthenticationService = scene.AuthenticationService; + Scene scene = m_application.SceneManager.CurrentOrFirstScene; + IUserAccountService userAccountService = scene.UserAccountService; + IAuthenticationService authenticationService = scene.AuthenticationService; - UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, firstName, lastName); + UserAccount account = userAccountService.GetUserAccount(UUID.Zero, firstName, lastName); if (null != account) { bool success = false; - if (m_AuthenticationService != null) - success = m_AuthenticationService.SetPassword(account.PrincipalID, password); + if (authenticationService != null) + success = authenticationService.SetPassword(account.PrincipalID, password); if (!success) { m_log.WarnFormat("[RADMIN]: Unable to set password for account {0} {1}.", firstName, lastName); diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 4369216b26..019ca73dd1 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs @@ -27,6 +27,7 @@ using System; using System.Collections; +using System.Collections.Generic; using System.Xml; using OpenMetaverse; using OpenSim.Framework; @@ -384,7 +385,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory // } // // rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method)); -// +// // } /// @@ -449,7 +450,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory // rdata.userAppearance = new AvatarAppearance(); // rdata.userAppearance.Owner = old.Owner; // adata = new AvatarData(rdata.userAppearance); -// +// // Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); // // rdata.Complete(); @@ -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 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; diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index a4135dbaed..c3cf08c18d 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs @@ -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()); diff --git a/OpenSim/Client/Linden/Resources/LindenModules.addin.xml b/OpenSim/Client/Linden/Resources/LindenModules.addin.xml deleted file mode 100644 index af41e98cea..0000000000 --- a/OpenSim/Client/Linden/Resources/LindenModules.addin.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 65921a2c00..1d93382e18 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -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(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(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) { @@ -596,7 +596,7 @@ namespace OpenSim.Client.MXP.ClientStack public event TeleportLandmarkRequest OnTeleportLandmarkRequest; public event DeRezObject OnDeRezObject; public event Action OnRegionHandShakeReply; - public event GenericCall2 OnRequestWearables; + public event GenericCall1 OnRequestWearables; public event GenericCall1 OnCompleteMovementToRegion; public event UpdateAgent OnPreAgentUpdate; public event UpdateAgent OnAgentUpdate; @@ -861,7 +861,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() @@ -1015,11 +1015,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 @@ -1112,6 +1116,12 @@ namespace OpenSim.Client.MXP.ClientStack // SL Specific, Ignore. (Remove from IClient) } + public void SendAbortXferPacket(ulong xferID) + { + + } + + public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) { // SL Specific, Ignore. (Remove from IClient) @@ -1710,5 +1720,9 @@ namespace OpenSim.Client.MXP.ClientStack public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs index 2098625f72..dcecb8b384 100644 --- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs +++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs @@ -63,7 +63,7 @@ namespace OpenSim.Client.MXP.PacketHandler private readonly IList m_sessionsToRemove = new List(); 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 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) { diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs deleted file mode 100644 index b808e95073..0000000000 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ /dev/null @@ -1,1203 +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; -using System.Net; -using System.Net.Sockets; -using System.Text; -using OpenMetaverse; -using OpenMetaverse.Packets; -using OpenSim.Framework; -using OpenSim.Framework.Client; - -namespace OpenSim.Client.Sirikata.ClientStack -{ - class SirikataClientView : IClientAPI, IClientCore - { - private readonly NetworkStream stream; - - public SirikataClientView(TcpClient client) - { - stream = client.GetStream(); - - sessionId = UUID.Random(); - - - // Handshake with client - string con = "SSTTCP01" + sessionId; - byte[] handshake = Util.UTF8.GetBytes(con); - - byte[] clientHandshake = new byte[2+6+36]; - - stream.Read(clientHandshake, 0, handshake.Length); - stream.Write(handshake, 0, handshake.Length - 1); // Remove null terminator (hence the -1) - } - - - #region Implementation of IClientAPI - - private Vector3 startPos; - - private UUID sessionId; - - private UUID secureSessionId; - - private UUID activeGroupId; - - private string activeGroupName; - - private ulong activeGroupPowers; - - private string firstName; - - private string lastName; - - private IScene scene; - - private int nextAnimationSequenceNumber; - - private string name; - - private bool isActive; - - private bool sendLogoutPacketWhenClosing; - - private uint circuitCode; - - private IPEndPoint remoteEndPoint; - - public Vector3 StartPos - { - get { return startPos; } - set { startPos = value; } - } - - public bool TryGet(out T iface) - { - throw new System.NotImplementedException(); - } - - public T Get() - { - throw new System.NotImplementedException(); - } - - UUID IClientCore.AgentId - { - get { throw new NotImplementedException(); } - } - - public void Disconnect(string reason) - { - throw new System.NotImplementedException(); - } - - public void Disconnect() - { - throw new System.NotImplementedException(); - } - - UUID IClientAPI.AgentId - { - get { throw new NotImplementedException(); } - } - - public UUID SessionId - { - get { return sessionId; } - } - - public UUID SecureSessionId - { - get { return secureSessionId; } - } - - public UUID ActiveGroupId - { - get { return activeGroupId; } - } - - public string ActiveGroupName - { - get { return activeGroupName; } - } - - public ulong ActiveGroupPowers - { - get { return activeGroupPowers; } - } - - public ulong GetGroupPowers(UUID groupID) - { - throw new System.NotImplementedException(); - } - - public bool IsGroupMember(UUID GroupID) - { - throw new System.NotImplementedException(); - } - - public string FirstName - { - get { return firstName; } - } - - public string LastName - { - get { return lastName; } - } - - public IScene Scene - { - get { return scene; } - } - - public int NextAnimationSequenceNumber - { - get { return nextAnimationSequenceNumber; } - } - - public string Name - { - get { return name; } - } - - public bool IsActive - { - get { return isActive; } - set { isActive = value; } - } - public bool IsLoggingOut - { - get { return false; } - set { } - } - - public bool SendLogoutPacketWhenClosing - { - set { sendLogoutPacketWhenClosing = value; } - } - - public uint CircuitCode - { - get { return circuitCode; } - } - - public IPEndPoint RemoteEndPoint - { - get { return remoteEndPoint; } - } - - public event GenericMessage OnGenericMessage; - public event ImprovedInstantMessage OnInstantMessage; - public event ChatMessage OnChatFromClient; - public event TextureRequest OnRequestTexture; - public event RezObject OnRezObject; - public event ModifyTerrain OnModifyTerrain; - public event BakeTerrain OnBakeTerrain; - public event EstateChangeInfo OnEstateChangeInfo; - public event SetAppearance OnSetAppearance; - public event AvatarNowWearing OnAvatarNowWearing; - public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; - public event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv; - public event UUIDNameRequest OnDetachAttachmentIntoInv; - public event ObjectAttach OnObjectAttach; - public event ObjectDeselect OnObjectDetach; - public event ObjectDrop OnObjectDrop; - public event StartAnim OnStartAnim; - public event StopAnim OnStopAnim; - public event LinkObjects OnLinkObjects; - public event DelinkObjects OnDelinkObjects; - public event RequestMapBlocks OnRequestMapBlocks; - public event RequestMapName OnMapNameRequest; - public event TeleportLocationRequest OnTeleportLocationRequest; - public event DisconnectUser OnDisconnectUser; - public event RequestAvatarProperties OnRequestAvatarProperties; - public event SetAlwaysRun OnSetAlwaysRun; - public event TeleportLandmarkRequest OnTeleportLandmarkRequest; - public event DeRezObject OnDeRezObject; - public event Action OnRegionHandShakeReply; - public event GenericCall2 OnRequestWearables; - public event GenericCall1 OnCompleteMovementToRegion; - public event UpdateAgent OnPreAgentUpdate; - public event UpdateAgent OnAgentUpdate; - public event AgentRequestSit OnAgentRequestSit; - public event AgentSit OnAgentSit; - public event AvatarPickerRequest OnAvatarPickerRequest; - public event Action OnRequestAvatarsData; - public event AddNewPrim OnAddPrim; - public event FetchInventory OnAgentDataUpdateRequest; - public event TeleportLocationRequest OnSetStartLocationRequest; - public event RequestGodlikePowers OnRequestGodlikePowers; - public event GodKickUser OnGodKickUser; - public event ObjectDuplicate OnObjectDuplicate; - public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; - public event GrabObject OnGrabObject; - public event DeGrabObject OnDeGrabObject; - public event MoveObject OnGrabUpdate; - public event SpinStart OnSpinStart; - public event SpinObject OnSpinUpdate; - public event SpinStop OnSpinStop; - public event UpdateShape OnUpdatePrimShape; - public event ObjectExtraParams OnUpdateExtraParams; - public event ObjectRequest OnObjectRequest; - public event ObjectSelect OnObjectSelect; - public event ObjectDeselect OnObjectDeselect; - public event GenericCall7 OnObjectDescription; - public event GenericCall7 OnObjectName; - public event GenericCall7 OnObjectClickAction; - public event GenericCall7 OnObjectMaterial; - public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; - public event UpdatePrimFlags OnUpdatePrimFlags; - public event UpdatePrimTexture OnUpdatePrimTexture; - public event UpdateVector OnUpdatePrimGroupPosition; - public event UpdateVector OnUpdatePrimSinglePosition; - public event UpdatePrimRotation OnUpdatePrimGroupRotation; - public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; - public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition; - public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; - public event UpdateVector OnUpdatePrimScale; - public event UpdateVector OnUpdatePrimGroupScale; - public event StatusChange OnChildAgentStatus; - public event GenericCall2 OnStopMovement; - public event Action OnRemoveAvatar; - public event ObjectPermissions OnObjectPermissions; - public event CreateNewInventoryItem OnCreateNewInventoryItem; - public event LinkInventoryItem OnLinkInventoryItem; - public event CreateInventoryFolder OnCreateNewInventoryFolder; - public event UpdateInventoryFolder OnUpdateInventoryFolder; - public event MoveInventoryFolder OnMoveInventoryFolder; - public event FetchInventoryDescendents OnFetchInventoryDescendents; - public event PurgeInventoryDescendents OnPurgeInventoryDescendents; - public event FetchInventory OnFetchInventory; - public event RequestTaskInventory OnRequestTaskInventory; - public event UpdateInventoryItem OnUpdateInventoryItem; - public event CopyInventoryItem OnCopyInventoryItem; - public event MoveInventoryItem OnMoveInventoryItem; - public event RemoveInventoryFolder OnRemoveInventoryFolder; - public event RemoveInventoryItem OnRemoveInventoryItem; - public event UDPAssetUploadRequest OnAssetUploadRequest; - public event XferReceive OnXferReceive; - public event RequestXfer OnRequestXfer; - public event ConfirmXfer OnConfirmXfer; - public event AbortXfer OnAbortXfer; - public event RezScript OnRezScript; - public event UpdateTaskInventory OnUpdateTaskInventory; - public event MoveTaskInventory OnMoveTaskItem; - public event RemoveTaskInventory OnRemoveTaskItem; - public event RequestAsset OnRequestAsset; - public event UUIDNameRequest OnNameFromUUIDRequest; - public event ParcelAccessListRequest OnParcelAccessListRequest; - public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; - public event ParcelPropertiesRequest OnParcelPropertiesRequest; - public event ParcelDivideRequest OnParcelDivideRequest; - public event ParcelJoinRequest OnParcelJoinRequest; - public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; - public event ParcelSelectObjects OnParcelSelectObjects; - public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; - public event ParcelAbandonRequest OnParcelAbandonRequest; - public event ParcelGodForceOwner OnParcelGodForceOwner; - public event ParcelReclaim OnParcelReclaim; - public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; - public event ParcelDeedToGroup OnParcelDeedToGroup; - public event RegionInfoRequest OnRegionInfoRequest; - public event EstateCovenantRequest OnEstateCovenantRequest; - public event FriendActionDelegate OnApproveFriendRequest; - public event FriendActionDelegate OnDenyFriendRequest; - public event FriendshipTermination OnTerminateFriendship; - public event MoneyTransferRequest OnMoneyTransferRequest; - public event EconomyDataRequest OnEconomyDataRequest; - public event MoneyBalanceRequest OnMoneyBalanceRequest; - public event UpdateAvatarProperties OnUpdateAvatarProperties; - public event ParcelBuy OnParcelBuy; - public event RequestPayPrice OnRequestPayPrice; - public event ObjectSaleInfo OnObjectSaleInfo; - public event ObjectBuy OnObjectBuy; - public event BuyObjectInventory OnBuyObjectInventory; - public event RequestTerrain OnRequestTerrain; - public event RequestTerrain OnUploadTerrain; - public event ObjectIncludeInSearch OnObjectIncludeInSearch; - public event UUIDNameRequest OnTeleportHomeRequest; - public event ScriptAnswer OnScriptAnswer; - public event AgentSit OnUndo; - public event AgentSit OnRedo; - public event LandUndo OnLandUndo; - public event ForceReleaseControls OnForceReleaseControls; - public event GodLandStatRequest OnLandStatRequest; - public event DetailedEstateDataRequest OnDetailedEstateDataRequest; - public event SetEstateFlagsRequest OnSetEstateFlagsRequest; - public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; - public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture; - public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights; - public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest; - public event SetRegionTerrainSettings OnSetRegionTerrainSettings; - public event EstateRestartSimRequest OnEstateRestartSimRequest; - public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest; - public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest; - public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest; - public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; - public event EstateDebugRegionRequest OnEstateDebugRegionRequest; - public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; - public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; - public event UUIDNameRequest OnUUIDGroupNameRequest; - public event RegionHandleRequest OnRegionHandleRequest; - public event ParcelInfoRequest OnParcelInfoRequest; - public event RequestObjectPropertiesFamily OnObjectGroupRequest; - public event ScriptReset OnScriptReset; - public event GetScriptRunning OnGetScriptRunning; - public event SetScriptRunning OnSetScriptRunning; - public event UpdateVector OnAutoPilotGo; - public event TerrainUnacked OnUnackedTerrain; - public event ActivateGesture OnActivateGesture; - public event DeactivateGesture OnDeactivateGesture; - public event ObjectOwner OnObjectOwner; - public event DirPlacesQuery OnDirPlacesQuery; - public event DirFindQuery OnDirFindQuery; - public event DirLandQuery OnDirLandQuery; - public event DirPopularQuery OnDirPopularQuery; - public event DirClassifiedQuery OnDirClassifiedQuery; - public event EventInfoRequest OnEventInfoRequest; - public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime; - public event MapItemRequest OnMapItemRequest; - public event OfferCallingCard OnOfferCallingCard; - public event AcceptCallingCard OnAcceptCallingCard; - public event DeclineCallingCard OnDeclineCallingCard; - public event SoundTrigger OnSoundTrigger; - public event StartLure OnStartLure; - public event TeleportLureRequest OnTeleportLureRequest; - public event NetworkStats OnNetworkStatsUpdate; - public event ClassifiedInfoRequest OnClassifiedInfoRequest; - public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; - public event ClassifiedDelete OnClassifiedDelete; - public event ClassifiedDelete OnClassifiedGodDelete; - public event EventNotificationAddRequest OnEventNotificationAddRequest; - public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; - public event EventGodDelete OnEventGodDelete; - public event ParcelDwellRequest OnParcelDwellRequest; - public event UserInfoRequest OnUserInfoRequest; - public event UpdateUserInfo OnUpdateUserInfo; - public event RetrieveInstantMessages OnRetrieveInstantMessages; - public event PickDelete OnPickDelete; - public event PickGodDelete OnPickGodDelete; - public event PickInfoUpdate OnPickInfoUpdate; - public event AvatarNotesUpdate OnAvatarNotesUpdate; - public event AvatarInterestUpdate OnAvatarInterestUpdate; - public event GrantUserFriendRights OnGrantUserRights; - public event MuteListRequest OnMuteListRequest; - public event PlacesQuery OnPlacesQuery; - public event FindAgentUpdate OnFindAgent; - public event TrackAgentUpdate OnTrackAgent; - public event NewUserReport OnUserReport; - public event SaveStateHandler OnSaveState; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUser; - public event EjectUserUpdate OnParcelEjectUser; - public event ParcelBuyPass OnParcelBuyPass; - public event ParcelGodMark OnParcelGodMark; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - public event SimWideDeletesDelegate OnSimWideDeletes; - public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntry; - public event MuteListEntryRemove OnRemoveMuteListEntry; - public event GodlikeMessage onGodlikeMessage; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; - public void SetDebugPacketLevel(int newDebug) - { - throw new System.NotImplementedException(); - } - - public void InPacket(object NewPack) - { - throw new System.NotImplementedException(); - } - - public void ProcessInPacket(Packet NewPack) - { - throw new System.NotImplementedException(); - } - - public void Close() - { - throw new System.NotImplementedException(); - } - - public void Kick(string message) - { - throw new System.NotImplementedException(); - } - - public void Start() - { - throw new System.NotImplementedException(); - } - - public void Stop() - { - throw new System.NotImplementedException(); - } - - public void SendWearables(AvatarWearable[] wearables, int serial) - { - throw new System.NotImplementedException(); - } - - public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) - { - throw new System.NotImplementedException(); - } - - public void SendStartPingCheck(byte seq) - { - throw new System.NotImplementedException(); - } - - public void SendKillObject(ulong regionHandle, uint localID) - { - throw new System.NotImplementedException(); - } - - public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) - { - throw new System.NotImplementedException(); - } - - public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) - { - throw new System.NotImplementedException(); - } - - public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) - { - throw new System.NotImplementedException(); - } - - public void SendInstantMessage(GridInstantMessage im) - { - throw new System.NotImplementedException(); - } - - public void SendGenericMessage(string method, List message) - { - } - - public void SendGenericMessage(string method, List message) - { - throw new System.NotImplementedException(); - } - - public void SendLayerData(float[] map) - { - throw new System.NotImplementedException(); - } - - public void SendLayerData(int px, int py, float[] map) - { - throw new System.NotImplementedException(); - } - - public void SendWindData(Vector2[] windSpeeds) - { - throw new System.NotImplementedException(); - } - - public void SendCloudData(float[] cloudCover) - { - throw new System.NotImplementedException(); - } - - public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) - { - throw new System.NotImplementedException(); - } - - public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) - { - throw new System.NotImplementedException(); - } - - public AgentCircuitData RequestClientInfo() - { - throw new System.NotImplementedException(); - } - - public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) - { - throw new System.NotImplementedException(); - } - - public void SendMapBlock(List mapBlocks, uint flag) - { - throw new System.NotImplementedException(); - } - - public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) - { - throw new System.NotImplementedException(); - } - - public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) - { - throw new System.NotImplementedException(); - } - - public void SendTeleportFailed(string reason) - { - throw new System.NotImplementedException(); - } - - public void SendTeleportLocationStart() - { - throw new System.NotImplementedException(); - } - - public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) - { - throw new System.NotImplementedException(); - } - - public void SendPayPrice(UUID objectID, int[] payPrice) - { - throw new System.NotImplementedException(); - } - - public void SendCoarseLocationUpdate(List users, List CoarseLocations) - { - throw new System.NotImplementedException(); - } - - public void SetChildAgentThrottle(byte[] throttle) - { - throw new System.NotImplementedException(); - } - - public void SendAvatarDataImmediate(ISceneEntity avatar) - { - throw new System.NotImplementedException(); - } - - public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) - { - throw new System.NotImplementedException(); - } - - public void ReprioritizeUpdates() - { - throw new System.NotImplementedException(); - } - - public void FlushPrimUpdates() - { - throw new System.NotImplementedException(); - } - - public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, int version, bool fetchFolders, bool fetchItems) - { - throw new System.NotImplementedException(); - } - - public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) - { - throw new System.NotImplementedException(); - } - - public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) - { - throw new System.NotImplementedException(); - } - - public void SendRemoveInventoryItem(UUID itemID) - { - throw new System.NotImplementedException(); - } - - public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) - { - throw new System.NotImplementedException(); - } - - public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) - { - throw new System.NotImplementedException(); - } - - public void SendBulkUpdateInventory(InventoryNodeBase node) - { - throw new System.NotImplementedException(); - } - - public void SendXferPacket(ulong xferID, uint packet, byte[] data) - { - throw new System.NotImplementedException(); - } - - public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) - { - throw new System.NotImplementedException(); - } - - public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List Data) - { - throw new System.NotImplementedException(); - } - - public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) - { - throw new System.NotImplementedException(); - } - - public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) - { - throw new System.NotImplementedException(); - } - - public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) - { - throw new System.NotImplementedException(); - } - - public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) - { - throw new System.NotImplementedException(); - } - - public void SendAttachedSoundGainChange(UUID objectID, float gain) - { - throw new System.NotImplementedException(); - } - - public void SendNameReply(UUID profileId, string firstname, string lastname) - { - throw new System.NotImplementedException(); - } - - public void SendAlertMessage(string message) - { - throw new System.NotImplementedException(); - } - - public void SendAgentAlertMessage(string message, bool modal) - { - throw new System.NotImplementedException(); - } - - public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) - { - throw new System.NotImplementedException(); - } - - public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) - { - throw new System.NotImplementedException(); - } - - public bool AddMoney(int debit) - { - throw new System.NotImplementedException(); - } - - public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) - { - throw new System.NotImplementedException(); - } - - public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) - { - throw new System.NotImplementedException(); - } - - public void SendViewerTime(int phase) - { - throw new System.NotImplementedException(); - } - - public UUID GetDefaultAnimation(string name) - { - throw new System.NotImplementedException(); - } - - public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) - { - throw new System.NotImplementedException(); - } - - public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) - { - throw new System.NotImplementedException(); - } - - public void SendHealth(float health) - { - throw new System.NotImplementedException(); - } - - public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) - { - throw new System.NotImplementedException(); - } - - public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) - { - throw new System.NotImplementedException(); - } - - public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) - { - throw new System.NotImplementedException(); - } - - public void SendEstateCovenantInformation(UUID covenant) - { - throw new System.NotImplementedException(); - } - - public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) - { - throw new System.NotImplementedException(); - } - - public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) - { - throw new System.NotImplementedException(); - } - - public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) - { - throw new System.NotImplementedException(); - } - - public void SendForceClientSelectObjects(List objectIDs) - { - throw new System.NotImplementedException(); - } - - public void SendCameraConstraint(Vector4 ConstraintPlane) - { - throw new System.NotImplementedException(); - } - - public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) - { - throw new System.NotImplementedException(); - } - - public void SendLandParcelOverlay(byte[] data, int sequence_id) - { - throw new System.NotImplementedException(); - } - - public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) - { - throw new System.NotImplementedException(); - } - - public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) - { - throw new System.NotImplementedException(); - } - - public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) - { - throw new System.NotImplementedException(); - } - - public void SendConfirmXfer(ulong xferID, uint PacketID) - { - throw new System.NotImplementedException(); - } - - public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) - { - throw new System.NotImplementedException(); - } - - public void SendInitiateDownload(string simFileName, string clientFileName) - { - throw new System.NotImplementedException(); - } - - public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) - { - throw new System.NotImplementedException(); - } - - public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) - { - throw new System.NotImplementedException(); - } - - public void SendImageNotFound(UUID imageid) - { - throw new System.NotImplementedException(); - } - - public void SendShutdownConnectionNotice() - { - throw new System.NotImplementedException(); - } - - public void SendSimStats(SimStats stats) - { - throw new System.NotImplementedException(); - } - - public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, UUID LastOwnerID, string ObjectName, string Description) - { - throw new System.NotImplementedException(); - } - - public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask, byte saleType, int salePrice) - { - throw new System.NotImplementedException(); - } - - public void SendAgentOffline(UUID[] agentIDs) - { - throw new System.NotImplementedException(); - } - - public void SendAgentOnline(UUID[] agentIDs) - { - throw new System.NotImplementedException(); - } - - public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) - { - throw new System.NotImplementedException(); - } - - public void SendAdminResponse(UUID Token, uint AdminLevel) - { - throw new System.NotImplementedException(); - } - - public void SendGroupMembership(GroupMembershipData[] GroupMembership) - { - throw new System.NotImplementedException(); - } - - public void SendGroupNameReply(UUID groupLLUID, string GroupName) - { - throw new System.NotImplementedException(); - } - - public void SendJoinGroupReply(UUID groupID, bool success) - { - throw new System.NotImplementedException(); - } - - public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) - { - throw new System.NotImplementedException(); - } - - public void SendLeaveGroupReply(UUID groupID, bool success) - { - throw new System.NotImplementedException(); - } - - public void SendCreateGroupReply(UUID groupID, bool success, string message) - { - throw new System.NotImplementedException(); - } - - public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) - { - throw new System.NotImplementedException(); - } - - public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) - { - throw new System.NotImplementedException(); - } - - public void SendAsset(AssetRequestToClient req) - { - throw new System.NotImplementedException(); - } - - public void SendTexture(AssetBase TextureAsset) - { - throw new System.NotImplementedException(); - } - - public byte[] GetThrottlesPacked(float multiplier) - { - throw new System.NotImplementedException(); - } - - public event ViewerEffectEventHandler OnViewerEffect; - public event Action OnLogout; - public event Action OnConnectionClosed; - public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) - { - throw new System.NotImplementedException(); - } - - public void SendLogoutPacket() - { - throw new System.NotImplementedException(); - } - - public EndPoint GetClientEP() - { - throw new System.NotImplementedException(); - } - - public ClientInfo GetClientInfo() - { - throw new System.NotImplementedException(); - } - - public void SetClientInfo(ClientInfo info) - { - throw new System.NotImplementedException(); - } - - public void SetClientOption(string option, string value) - { - throw new System.NotImplementedException(); - } - - public string GetClientOption(string option) - { - throw new System.NotImplementedException(); - } - - public void SendSetFollowCamProperties(UUID objectID, SortedDictionary parameters) - { - throw new System.NotImplementedException(); - } - - public void SendClearFollowCamProperties(UUID objectID) - { - throw new System.NotImplementedException(); - } - - public void SendRegionHandle(UUID regoinID, ulong handle) - { - throw new System.NotImplementedException(); - } - - public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) - { - throw new System.NotImplementedException(); - } - - public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) - { - throw new System.NotImplementedException(); - } - - public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) - { - throw new System.NotImplementedException(); - } - - public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) - { - throw new System.NotImplementedException(); - } - - public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) - { - throw new System.NotImplementedException(); - } - - public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) - { - throw new System.NotImplementedException(); - } - - public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) - { - throw new System.NotImplementedException(); - } - - public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) - { - throw new System.NotImplementedException(); - } - - public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) - { - throw new System.NotImplementedException(); - } - - public void SendEventInfoReply(EventData info) - { - throw new System.NotImplementedException(); - } - - public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) - { - throw new System.NotImplementedException(); - } - - public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) - { - throw new System.NotImplementedException(); - } - - public void SendOfferCallingCard(UUID srcID, UUID transactionID) - { - throw new System.NotImplementedException(); - } - - public void SendAcceptCallingCard(UUID transactionID) - { - throw new System.NotImplementedException(); - } - - public void SendDeclineCallingCard(UUID transactionID) - { - throw new System.NotImplementedException(); - } - - public void SendTerminateFriend(UUID exFriendID) - { - throw new System.NotImplementedException(); - } - - public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) - { - throw new System.NotImplementedException(); - } - - public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) - { - throw new System.NotImplementedException(); - } - - public void SendAgentDropGroup(UUID groupID) - { - throw new System.NotImplementedException(); - } - - public void RefreshGroupMembership() - { - throw new System.NotImplementedException(); - } - - public void SendAvatarNotesReply(UUID targetID, string text) - { - throw new System.NotImplementedException(); - } - - public void SendAvatarPicksReply(UUID targetID, Dictionary picks) - { - throw new System.NotImplementedException(); - } - - public void SendPickInfoReply(UUID pickID, UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled) - { - throw new System.NotImplementedException(); - } - - public void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds) - { - throw new System.NotImplementedException(); - } - - public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) - { - throw new System.NotImplementedException(); - } - - public void SendUserInfoReply(bool imViaEmail, bool visible, string email) - { - throw new System.NotImplementedException(); - } - - public void SendUseCachedMuteList() - { - throw new System.NotImplementedException(); - } - - public void SendMuteListUpdate(string filename) - { - throw new System.NotImplementedException(); - } - - public void KillEndDone() - { - throw new System.NotImplementedException(); - } - - public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) - { - throw new System.NotImplementedException(); - } - - public void SendRebakeAvatarTextures(UUID textureID) - { - throw new System.NotImplementedException(); - } - - public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) - { - throw new System.NotImplementedException(); - } - - public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) - { - } - - public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) - { - } - - public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) - { - } - - public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) - { - } - - public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) - { - } - - public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) - { - } - - public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) - { - } - - public void StopFlying(ISceneEntity presence) - { - } - - #endregion - } -} diff --git a/OpenSim/Client/Sirikata/Protocol/MessageHeader.cs b/OpenSim/Client/Sirikata/Protocol/MessageHeader.cs deleted file mode 100644 index 22e10f778d..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/MessageHeader.cs +++ /dev/null @@ -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 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(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 { - 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 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 { - 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 - -} diff --git a/OpenSim/Client/Sirikata/Protocol/MessageHeader.pbj.cs b/OpenSim/Client/Sirikata/Protocol/MessageHeader.pbj.cs deleted file mode 100644 index fb4963fc93..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/MessageHeader.pbj.cs +++ /dev/null @@ -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); - } - } - } - } -} diff --git a/OpenSim/Client/Sirikata/Protocol/PBJ.cs b/OpenSim/Client/Sirikata/Protocol/PBJ.cs deleted file mode 100644 index 9b1951a6b1..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/PBJ.cs +++ /dev/null @@ -1,2104 +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 PBJ -{ - - public class IMessage - { - public virtual Google.ProtocolBuffers.IMessage _PBJISuper { get { return null; } } - protected virtual bool _HasAllPBJFields { get { return true; } } - public void WriteTo(Google.ProtocolBuffers.CodedOutputStream output) - { - _PBJISuper.WriteTo(output); - } - public override bool Equals(object other) - { - return _PBJISuper.Equals(other); - } - public int SerializedSize { get { return _PBJISuper.SerializedSize; } } - - public override int GetHashCode() { return _PBJISuper.GetHashCode(); } - - public override string ToString() - { - return _PBJISuper.ToString(); - } - public virtual IBuilder WeakCreateBuilderForType() { return null; } - public Google.ProtocolBuffers.ByteString ToByteString() - { - return _PBJISuper.ToByteString(); - } - public byte[] ToByteArray() - { - return _PBJISuper.ToByteArray(); - } - public void WriteTo(global::System.IO.Stream output) - { - _PBJISuper.WriteTo(output); - } - // Google.ProtocolBuffers.MessageDescriptor DescriptorForType { get {return _PBJISuper.DescriptorForType;} } - public Google.ProtocolBuffers.UnknownFieldSet UnknownFields { get { return _PBJISuper.UnknownFields; } } - public class IBuilder - { - public virtual Google.ProtocolBuffers.IBuilder _PBJISuper { get { return null; } } - protected virtual bool _HasAllPBJFields { get { return true; } } - } - } - - public struct Vector2f - { - - public float x; - public float y; - - - public Vector2f(float _x, float _y) - { - x = _x; y = _y; - } - - public Vector2f(Vector2f cpy) - { - x = cpy.x; y = cpy.y; - } - - - public Vector2f Negate() - { - return new Vector2f(-x, -y); - } - - public Vector2f Add(Vector2f rhs) - { - return new Vector2f(x + rhs.x, y + rhs.y); - } - - public Vector2f Subtract(Vector2f rhs) - { - return new Vector2f(x - rhs.x, y - rhs.y); - } - - public Vector2f Multiply(Vector2f rhs) - { - return new Vector2f(x * rhs.x, y * rhs.y); - } - - public Vector2f Multiply(float s) - { - return new Vector2f(x * s, y * s); - } - - public Vector2f Divide(Vector2f rhs) - { - return new Vector2f(x / rhs.x, y / rhs.y); - } - - public Vector2f Divide(float s) - { - return new Vector2f(x / s, y / s); - } - - public float Dot(Vector2f rhs) - { - return (x * rhs.x + y * rhs.y); - } - - public void Normalize() - { - float len = Length; - if (len != 0.0) - { - x /= len; y /= len; - } - } - - public Vector2f Normalized - { - get - { - Vector2f normed = new Vector2f(this); - normed.Normalize(); - return normed; - } - } - - public float SquaredLength - { - get - { - return (x * x + y * y); - } - } - public float Length - { - get - { - return (float)Math.Sqrt(SquaredLength); - } - } - - - public override string ToString() - { - return String.Format("<{0}, {1}>", x, y); - } - - - public static Vector2f operator -(Vector2f uo) - { - return uo.Negate(); - } - - public static Vector2f operator +(Vector2f lhs, Vector2f rhs) - { - return lhs.Add(rhs); - } - - public static Vector2f operator -(Vector2f lhs, Vector2f rhs) - { - return lhs.Subtract(rhs); - } - - public static Vector2f operator *(Vector2f lhs, Vector2f rhs) - { - return lhs.Multiply(rhs); - } - - public static Vector2f operator *(Vector2f lhs, float rhs) - { - return lhs.Multiply(rhs); - } - public static Vector2f operator *(float lhs, Vector2f rhs) - { - return rhs.Multiply(lhs); - } - - public static Vector2f operator /(Vector2f lhs, Vector2f rhs) - { - return lhs.Divide(rhs); - } - - public static Vector2f operator /(Vector2f lhs, float rhs) - { - return lhs.Divide(rhs); - } - - } // struct Vector2f - - public struct Vector2d - { - - public double x; - public double y; - - - public Vector2d(double _x, double _y) - { - x = _x; y = _y; - } - - public Vector2d(Vector2d cpy) - { - x = cpy.x; y = cpy.y; - } - - - public Vector2d Negate() - { - return new Vector2d(-x, -y); - } - - public Vector2d Add(Vector2d rhs) - { - return new Vector2d(x + rhs.x, y + rhs.y); - } - - public Vector2d Subtract(Vector2d rhs) - { - return new Vector2d(x - rhs.x, y - rhs.y); - } - - public Vector2d Multiply(Vector2d rhs) - { - return new Vector2d(x * rhs.x, y * rhs.y); - } - - public Vector2d Multiply(double s) - { - return new Vector2d(x * s, y * s); - } - - public Vector2d Divide(Vector2d rhs) - { - return new Vector2d(x / rhs.x, y / rhs.y); - } - - public Vector2d Divide(double s) - { - return new Vector2d(x / s, y / s); - } - - public double Dot(Vector2d rhs) - { - return (x * rhs.x + y * rhs.y); - } - - public void Normalize() - { - double len = Length; - if (len != 0.0) - { - x /= len; y /= len; - } - } - - public Vector2d Normalized - { - get - { - Vector2d normed = new Vector2d(this); - normed.Normalize(); - return normed; - } - } - - public double SquaredLength - { - get - { - return (x * x + y * y); - } - } - public double Length - { - get - { - return Math.Sqrt(SquaredLength); - } - } - - - public override string ToString() - { - return String.Format("<{0}, {1}>", x, y); - } - - - public static Vector2d operator -(Vector2d uo) - { - return uo.Negate(); - } - - public static Vector2d operator +(Vector2d lhs, Vector2d rhs) - { - return lhs.Add(rhs); - } - - public static Vector2d operator -(Vector2d lhs, Vector2d rhs) - { - return lhs.Subtract(rhs); - } - - public static Vector2d operator *(Vector2d lhs, Vector2d rhs) - { - return lhs.Multiply(rhs); - } - - public static Vector2d operator *(Vector2d lhs, double rhs) - { - return lhs.Multiply(rhs); - } - public static Vector2d operator *(double lhs, Vector2d rhs) - { - return rhs.Multiply(lhs); - } - - public static Vector2d operator /(Vector2d lhs, Vector2d rhs) - { - return lhs.Divide(rhs); - } - - public static Vector2d operator /(Vector2d lhs, double rhs) - { - return lhs.Divide(rhs); - } - - } // struct Vector2d - - public struct Vector3f - { - - public float x; - public float y; - public float z; - - - public Vector3f(float _x, float _y, float _z) - { - x = _x; y = _y; z = _z; - } - - public Vector3f(Vector3f cpy) - { - x = cpy.x; y = cpy.y; z = cpy.z; - } - - - public Vector3f Negate() - { - return new Vector3f(-x, -y, -z); - } - - public Vector3f Add(Vector3f rhs) - { - return new Vector3f(x + rhs.x, y + rhs.y, z + rhs.z); - } - - public Vector3f Subtract(Vector3f rhs) - { - return new Vector3f(x - rhs.x, y - rhs.y, z - rhs.z); - } - - public Vector3f Multiply(Vector3f rhs) - { - return new Vector3f(x * rhs.x, y * rhs.y, z * rhs.z); - } - - public Vector3f Multiply(float s) - { - return new Vector3f(x * s, y * s, z * s); - } - - public Vector3f Divide(Vector3f rhs) - { - return new Vector3f(x / rhs.x, y / rhs.y, z / rhs.z); - } - - public Vector3f Divide(float s) - { - return new Vector3f(x / s, y / s, z / s); - } - - public float Dot(Vector3f rhs) - { - return (x * rhs.x + y * rhs.y + z * rhs.z); - } - - public Vector3f Cross(Vector3f rhs) - { - return new Vector3f(y * rhs.z - z * rhs.y, z * rhs.x - x * rhs.z, x * rhs.y - y * rhs.x); - } - - public void Normalize() - { - float len = Length; - if (len != 0.0) - { - x /= len; y /= len; z /= len; - } - } - - public Vector3f Normalized - { - get - { - Vector3f normed = new Vector3f(this); - normed.Normalize(); - return normed; - } - } - - public float SquaredLength - { - get - { - return (x * x + y * y + z * z); - } - } - public float Length - { - get - { - return (float)Math.Sqrt(SquaredLength); - } - } - - - public override string ToString() - { - return String.Format("<{0}, {1}, {2}>", x, y, z); - } - - - public static Vector3f operator -(Vector3f uo) - { - return uo.Negate(); - } - - public static Vector3f operator +(Vector3f lhs, Vector3f rhs) - { - return lhs.Add(rhs); - } - - public static Vector3f operator -(Vector3f lhs, Vector3f rhs) - { - return lhs.Subtract(rhs); - } - - public static Vector3f operator *(Vector3f lhs, Vector3f rhs) - { - return lhs.Multiply(rhs); - } - - public static Vector3f operator *(Vector3f lhs, float rhs) - { - return lhs.Multiply(rhs); - } - public static Vector3f operator *(float lhs, Vector3f rhs) - { - return rhs.Multiply(lhs); - } - - public static Vector3f operator /(Vector3f lhs, Vector3f rhs) - { - return lhs.Divide(rhs); - } - - public static Vector3f operator /(Vector3f lhs, float rhs) - { - return lhs.Divide(rhs); - } - - } // struct Vector3f - - public struct Vector3d - { - - public double x; - public double y; - public double z; - - - public Vector3d(double _x, double _y, double _z) - { - x = _x; y = _y; z = _z; - } - - public Vector3d(Vector3d cpy) - { - x = cpy.x; y = cpy.y; z = cpy.z; - } - - - public Vector3d Negate() - { - return new Vector3d(-x, -y, -z); - } - - public Vector3d Add(Vector3d rhs) - { - return new Vector3d(x + rhs.x, y + rhs.y, z + rhs.z); - } - - public Vector3d Subtract(Vector3d rhs) - { - return new Vector3d(x - rhs.x, y - rhs.y, z - rhs.z); - } - - public Vector3d Multiply(Vector3d rhs) - { - return new Vector3d(x * rhs.x, y * rhs.y, z * rhs.z); - } - - public Vector3d Multiply(double s) - { - return new Vector3d(x * s, y * s, z * s); - } - - public Vector3d Divide(Vector3d rhs) - { - return new Vector3d(x / rhs.x, y / rhs.y, z / rhs.z); - } - - public Vector3d Divide(double s) - { - return new Vector3d(x / s, y / s, z / s); - } - - public double Dot(Vector3d rhs) - { - return (x * rhs.x + y * rhs.y + z * rhs.z); - } - - public Vector3d Cross(Vector3d rhs) - { - return new Vector3d(y * rhs.z - z * rhs.y, z * rhs.x - x * rhs.z, x * rhs.y - y * rhs.x); - } - - public void Normalize() - { - double len = Length; - if (len != 0.0) - { - x /= len; y /= len; z /= len; - } - } - - public Vector3d Normalized - { - get - { - Vector3d normed = new Vector3d(this); - normed.Normalize(); - return normed; - } - } - - public double SquaredLength - { - get - { - return (x * x + y * y + z * z); - } - } - public double Length - { - get - { - return Math.Sqrt(SquaredLength); - } - } - - - public override string ToString() - { - return String.Format("<{0}, {1}, {2}>", x, y, z); - } - - - public static Vector3d operator -(Vector3d uo) - { - return uo.Negate(); - } - - public static Vector3d operator +(Vector3d lhs, Vector3d rhs) - { - return lhs.Add(rhs); - } - - public static Vector3d operator -(Vector3d lhs, Vector3d rhs) - { - return lhs.Subtract(rhs); - } - - public static Vector3d operator *(Vector3d lhs, Vector3d rhs) - { - return lhs.Multiply(rhs); - } - - public static Vector3d operator *(Vector3d lhs, double rhs) - { - return lhs.Multiply(rhs); - } - public static Vector3d operator *(double lhs, Vector3d rhs) - { - return rhs.Multiply(lhs); - } - - public static Vector3d operator /(Vector3d lhs, Vector3d rhs) - { - return lhs.Divide(rhs); - } - - public static Vector3d operator /(Vector3d lhs, double rhs) - { - return lhs.Divide(rhs); - } - - } // struct Vector3d - - public struct Quaternion - { - - public float w; - public float x; - public float y; - public float z; - - - public Quaternion(float _w, float _x, float _y, float _z) - { - w = _w; x = _x; y = _y; z = _z; - } - - public Quaternion(Quaternion cpy) - { - w = cpy.w; x = cpy.x; y = cpy.y; z = cpy.z; - } - - public static readonly Quaternion Identity = new Quaternion((float)1.0, (float)0.0, (float)0.0, (float)0.0); - - public static Quaternion FromAxisAngle(Vector3f axis, float rads) - { - float halfAngle = rads * 0.5f; - float sinHalf = (float)Math.Sin(halfAngle); - float w = (float)Math.Cos(halfAngle); - float x = sinHalf * axis.x; - float y = sinHalf * axis.y; - float z = sinHalf * axis.z; - return new Quaternion(w, x, y, z); - } - - public static Quaternion FromAxisAngle(Vector3d axis, float rads) - { - float halfAngle = rads * 0.5f; - float sinHalf = (float)Math.Sin(halfAngle); - float w = (float)Math.Cos(halfAngle); - float x = (float)(sinHalf * axis.x); - float y = (float)(sinHalf * axis.y); - float z = (float)(sinHalf * axis.z); - return new Quaternion(w, x, y, z); - } - - - public Quaternion Add(Quaternion rhs) - { - return new Quaternion(w + rhs.w, x + rhs.x, y + rhs.y, z + rhs.z); - } - - public Quaternion Subtract(Quaternion rhs) - { - return new Quaternion(w - rhs.w, x - rhs.x, y - rhs.y, z - rhs.z); - } - - public Quaternion Multiply(Quaternion rhs) - { - return new Quaternion( - w * rhs.w - x * rhs.x - y * rhs.y - z * rhs.z, - w * rhs.x + x * rhs.w + y * rhs.z - z * rhs.y, - w * rhs.y + y * rhs.w + z * rhs.x - x * rhs.z, - w * rhs.z + z * rhs.w + x * rhs.y - y * rhs.x - ); - } - - public Vector3f Multiply(Vector3f rhs) - { - Vector3f qvec = new Vector3f(x, y, z); - Vector3f uv = qvec.Cross(rhs); - Vector3f uuv = qvec.Cross(uv); - uv *= 2.0f * w; - uuv *= 2.0f; - - return rhs + uv + uuv; - } - - public Vector3d Multiply(Vector3d rhs) - { - Vector3d qvec = new Vector3d(x, y, z); - Vector3d uv = qvec.Cross(rhs); - Vector3d uuv = qvec.Cross(uv); - uv *= 2.0f * w; - uuv *= 2.0f; - - return rhs + uv + uuv; - } - - public Quaternion Multiply(float rhs) - { - return new Quaternion(w * rhs, x * rhs, y * rhs, z * rhs); - } - - public Quaternion Negate() - { - return new Quaternion(-w, -x, -y, -z); - } - - public float Dot(Quaternion rhs) - { - return (w * rhs.w + x * rhs.x + y * rhs.y + z * rhs.z); - } - - public float Norm - { - get - { - return (float)Math.Sqrt(w * w + x * x + y * y + z * z); - } - } - - public float SquareNorm - { - get - { - return (w * w + x * x + y * y + z * z); - } - } - - public void Normalize() - { - float len = SquareNorm; - if (len == 0.0) return; - float factor = 1.0f / (float)Math.Sqrt(len); - this *= factor; - } - - public Quaternion Normalized - { - get - { - Quaternion q = new Quaternion(this); - q.Normalize(); - return q; - } - } - - public Quaternion Inverse - { - get - { - float norm = SquareNorm; - if (norm > 0.0) - { - double invnorm = 1.0 / norm; - return new Quaternion((float)(w * invnorm), (float)(-x * invnorm), (float)(-y * invnorm), (float)(-z * invnorm)); - } - else - return new Quaternion((float)0.0, 0.0f, 0.0f, 0.0f); - } - } - - - public override string ToString() - { - return String.Format("<{0}, {1}, {2}, {3}>", w, x, y, z); - } - - - - public static Quaternion operator -(Quaternion uo) - { - return uo.Negate(); - } - - public static Quaternion operator +(Quaternion lhs, Quaternion rhs) - { - return lhs.Add(rhs); - } - - public static Quaternion operator -(Quaternion lhs, Quaternion rhs) - { - return lhs.Subtract(rhs); - } - - public static Vector3f operator *(Quaternion lhs, Vector3f rhs) - { - return lhs.Multiply(rhs); - } - - public static Vector3d operator *(Quaternion lhs, Vector3d rhs) - { - return lhs.Multiply(rhs); - } - - public static Quaternion operator *(Quaternion lhs, Quaternion rhs) - { - return lhs.Multiply(rhs); - } - - public static Quaternion operator *(Quaternion lhs, float rhs) - { - return lhs.Multiply(rhs); - } - - public static Quaternion operator *(float lhs, Quaternion rhs) - { - return rhs.Multiply(lhs); - } - - } // struct Quaternion - - - public struct Vector4f - { - - public float x; - public float y; - public float z; - public float w; - - - public Vector4f(float _x, float _y, float _z, float _w) - { - x = _x; y = _y; z = _z; w = _w; - } - - public Vector4f(Vector4f cpy) - { - x = cpy.x; y = cpy.y; z = cpy.z; w = cpy.w; - } - - - public Vector4f Negate() - { - return new Vector4f(-x, -y, -z, -w); - } - - public Vector4f Add(Vector4f rhs) - { - return new Vector4f(x + rhs.x, y + rhs.y, z + rhs.z, w + rhs.w); - } - - public Vector4f Subtract(Vector4f rhs) - { - return new Vector4f(x - rhs.x, y - rhs.y, z - rhs.z, w - rhs.w); - } - - public Vector4f Multiply(Vector4f rhs) - { - return new Vector4f(x * rhs.x, y * rhs.y, z * rhs.z, w * rhs.w); - } - - public Vector4f Multiply(float s) - { - return new Vector4f(x * s, y * s, z * s, w * s); - } - - public Vector4f Divide(Vector4f rhs) - { - return new Vector4f(x / rhs.x, y / rhs.y, z / rhs.z, w / rhs.w); - } - - public Vector4f Divide(float s) - { - return new Vector4f(x / s, y / s, z / s, w / s); - } - - public float Dot(Vector4f rhs) - { - return (x * rhs.x + y * rhs.y + z * rhs.z + w * rhs.w); - } - - public void Normalize() - { - float len = Length; - if (len != 0.0) - { - x /= len; y /= len; z /= len; w /= len; - } - } - - public Vector4f Normalized - { - get - { - Vector4f normed = new Vector4f(this); - normed.Normalize(); - return normed; - } - } - - public float SquaredLength - { - get - { - return (x * x + y * y + z * z + w * w); - } - } - public float Length - { - get - { - return (float)Math.Sqrt(SquaredLength); - } - } - - - public override string ToString() - { - return String.Format("<{0}, {1}, {2}, {3}>", x, y, z, w); - } - - - public static Vector4f operator -(Vector4f uo) - { - return uo.Negate(); - } - - public static Vector4f operator +(Vector4f lhs, Vector4f rhs) - { - return lhs.Add(rhs); - } - - public static Vector4f operator -(Vector4f lhs, Vector4f rhs) - { - return lhs.Subtract(rhs); - } - - public static Vector4f operator *(Vector4f lhs, Vector4f rhs) - { - return lhs.Multiply(rhs); - } - - public static Vector4f operator *(Vector4f lhs, float rhs) - { - return lhs.Multiply(rhs); - } - public static Vector4f operator *(float lhs, Vector4f rhs) - { - return rhs.Multiply(lhs); - } - - public static Vector4f operator /(Vector4f lhs, Vector4f rhs) - { - return lhs.Divide(rhs); - } - - public static Vector4f operator /(Vector4f lhs, float rhs) - { - return lhs.Divide(rhs); - } - - } // struct Vector4f - - - - public struct Vector4d - { - - public double x; - public double y; - public double z; - public double w; - - - public Vector4d(double _x, double _y, double _z, double _w) - { - x = _x; y = _y; z = _z; w = _w; - } - - public Vector4d(Vector4d cpy) - { - x = cpy.x; y = cpy.y; z = cpy.z; w = cpy.w; - } - - - public Vector4d Negate() - { - return new Vector4d(-x, -y, -z, -w); - } - - public Vector4d Add(Vector4d rhs) - { - return new Vector4d(x + rhs.x, y + rhs.y, z + rhs.z, w + rhs.w); - } - - public Vector4d Subtract(Vector4d rhs) - { - return new Vector4d(x - rhs.x, y - rhs.y, z - rhs.z, w - rhs.w); - } - - public Vector4d Multiply(Vector4d rhs) - { - return new Vector4d(x * rhs.x, y * rhs.y, z * rhs.z, w * rhs.w); - } - - public Vector4d Multiply(double s) - { - return new Vector4d(x * s, y * s, z * s, w * s); - } - - public Vector4d Divide(Vector4d rhs) - { - return new Vector4d(x / rhs.x, y / rhs.y, z / rhs.z, w / rhs.w); - } - - public Vector4d Divide(double s) - { - return new Vector4d(x / s, y / s, z / s, w / s); - } - - public double Dot(Vector4d rhs) - { - return (x * rhs.x + y * rhs.y + z * rhs.z + w * rhs.w); - } - - public void Normalize() - { - double len = Length; - if (len != 0.0) - { - x /= len; y /= len; z /= len; w /= len; - } - } - - public Vector4d Normalized - { - get - { - Vector4d normed = new Vector4d(this); - normed.Normalize(); - return normed; - } - } - - public double SquaredLength - { - get - { - return (x * x + y * y + z * z + w * w); - } - } - public double Length - { - get - { - return Math.Sqrt(SquaredLength); - } - } - - - public override string ToString() - { - return String.Format("<{0}, {1}, {2}, {3}>", x, y, z, w); - } - - - public static Vector4d operator -(Vector4d uo) - { - return uo.Negate(); - } - - public static Vector4d operator +(Vector4d lhs, Vector4d rhs) - { - return lhs.Add(rhs); - } - - public static Vector4d operator -(Vector4d lhs, Vector4d rhs) - { - return lhs.Subtract(rhs); - } - - public static Vector4d operator *(Vector4d lhs, Vector4d rhs) - { - return lhs.Multiply(rhs); - } - - public static Vector4d operator *(Vector4d lhs, double rhs) - { - return lhs.Multiply(rhs); - } - public static Vector4d operator *(double lhs, Vector4d rhs) - { - return rhs.Multiply(lhs); - } - - public static Vector4d operator /(Vector4d lhs, Vector4d rhs) - { - return lhs.Divide(rhs); - } - - public static Vector4d operator /(Vector4d lhs, double rhs) - { - return lhs.Divide(rhs); - } - - } // struct Vector4d - - - - public struct BoundingBox3f3f - { - Vector3f mMin; - Vector3f mDiag; - public BoundingBox3f3f(float minx, float miny, float minz, float diagx, float diagy, float diagz) - { - mMin.x = minx; - mMin.y = miny; - mMin.z = minz; - - mDiag.x = diagx; - mDiag.y = diagy; - mDiag.z = diagz; - } - public BoundingBox3f3f(Vector3f min, Vector3f max) - { - mMin = min; - mDiag = (max - min); - } - public BoundingBox3f3f(BoundingBox3f3f cpy, Vector3f scale) - { - mMin.x = (float)(cpy.mMin.x * scale.x); - mMin.y = (float)(cpy.mMin.y * scale.y); - mMin.z = (float)(cpy.mMin.z * scale.z); - - mDiag.x = (float)(cpy.mDiag.x * scale.x); - mDiag.y = (float)(cpy.mDiag.y * scale.y); - mDiag.z = (float)(cpy.mDiag.z * scale.z); - } - public Vector3f Min - { - get - { - return new Vector3f(mMin.x, mMin.y, mMin.z); - } - } - public Vector3f Max - { - get - { - return new Vector3f(mMin.x + mDiag.x, mMin.y + mDiag.y, mMin.z + mDiag.z); - } - } - - public Vector3f Diag - { - get - { - return new Vector3f(mDiag.x, mDiag.y, mDiag.z); - } - } - - - public override string ToString() - { - return "[" + this.Min.ToString() + " - " + this.Max.ToString() + "]"; - } - public BoundingBox3f3f Merge(BoundingBox3f3f other) - { - Vector3f thisMax = Max; - Vector3f otherMax = other.Max; - bool xless = other.mMin.x > mMin.x; - bool yless = other.mMin.y > mMin.y; - bool zless = other.mMin.z > mMin.z; - - bool xmore = otherMax.x < thisMax.x; - bool ymore = otherMax.y < thisMax.y; - bool zmore = otherMax.z < thisMax.z; - return new BoundingBox3f3f(xless ? mMin.x : other.mMin.x, - yless ? mMin.y : other.mMin.y, - zless ? mMin.z : other.mMin.z, - xmore ? (xless ? mDiag.x : otherMax.x - mMin.x) : (xless ? thisMax.x - other.mMin.x : other.mDiag.x), - ymore ? (yless ? mDiag.y : otherMax.y - mMin.y) : (yless ? thisMax.y - other.mMin.y : other.mDiag.y), - zmore ? (zless ? mDiag.z : otherMax.z - mMin.z) : (zless ? thisMax.z - other.mMin.z : other.mDiag.z)); - } - - } // struct BoundingBox - - public struct BoundingBox3d3f - { - Vector3d mMin; - Vector3f mDiag; - public BoundingBox3d3f(double minx, double miny, double minz, float diagx, float diagy, float diagz) - { - mMin.x = minx; - mMin.y = miny; - mMin.z = minz; - - mDiag.x = diagx; - mDiag.y = diagy; - mDiag.z = diagz; - } - public BoundingBox3d3f(Vector3d min, Vector3f max) - { - mMin = min; - - mDiag = new Vector3f((float)(max.x - min.x), - (float)(max.y - min.y), - (float)(max.z - min.z)); - } - public BoundingBox3d3f(BoundingBox3d3f cpy, Vector3d scale) - { - mMin.x = (double)(cpy.mMin.x * scale.x); - mMin.y = (double)(cpy.mMin.y * scale.y); - mMin.z = (double)(cpy.mMin.z * scale.z); - - mDiag.x = (float)(cpy.mDiag.x * scale.x); - mDiag.y = (float)(cpy.mDiag.y * scale.y); - mDiag.z = (float)(cpy.mDiag.z * scale.z); - } - public Vector3d Min - { - get - { - return new Vector3d(mMin.x, mMin.y, mMin.z); - } - } - public Vector3d Max - { - get - { - return new Vector3d(mMin.x + mDiag.x, mMin.y + mDiag.y, mMin.z + mDiag.z); - } - } - - public Vector3d Diag - { - get - { - return new Vector3d(mDiag.x, mDiag.y, mDiag.z); - } - } - - - public override string ToString() - { - return "[" + this.Min.ToString() + " - " + this.Max.ToString() + "]"; - } - public BoundingBox3d3f Merge(BoundingBox3d3f other) - { - Vector3d thisMax = Max; - Vector3d otherMax = other.Max; - bool xless = other.mMin.x > mMin.x; - bool yless = other.mMin.y > mMin.y; - bool zless = other.mMin.z > mMin.z; - - bool xmore = otherMax.x < thisMax.x; - bool ymore = otherMax.y < thisMax.y; - bool zmore = otherMax.z < thisMax.z; - return new BoundingBox3d3f(xless ? mMin.x : other.mMin.x, - yless ? mMin.y : other.mMin.y, - zless ? mMin.z : other.mMin.z, - (float)(xmore ? (xless ? mDiag.x : otherMax.x - mMin.x) : (xless ? thisMax.x - other.mMin.x : other.mDiag.x)), - (float)(ymore ? (yless ? mDiag.y : otherMax.y - mMin.y) : (yless ? thisMax.y - other.mMin.y : other.mDiag.y)), - (float)(zmore ? (zless ? mDiag.z : otherMax.z - mMin.z) : (zless ? thisMax.z - other.mMin.z : other.mDiag.z))); - } - - } // struct BoundingBox - - - - - public struct BoundingSphere3f - { - Vector3f mCenter; - float mRadius; - public BoundingSphere3f(float x, float y, float z, float r) - { - mCenter = new Vector3f(x, y, z); - mRadius = r; - } - public BoundingSphere3f(Vector3f center, float radius) - { - mCenter = center; - mRadius = radius; - } - public BoundingSphere3f(BoundingSphere3f cpy, float scale) - { - mCenter = cpy.mCenter; - mRadius = cpy.mRadius * scale; - } - public Vector3f Center - { - get - { - return new Vector3f(mCenter.x, mCenter.y, mCenter.z); - } - } - public float Radius - { - get - { - return mRadius; - } - } - - public override string ToString() - { - return "[" + this.Center.ToString() + " : " + this.Radius.ToString() + "]"; - } - } // struct BoundingSphere3f - - - - public struct BoundingSphere3d - { - Vector3d mCenter; - float mRadius; - public BoundingSphere3d(double x, double y, double z, float r) - { - mCenter.x = x; - mCenter.y = y; - mCenter.z = z; - mRadius = r; - } - public BoundingSphere3d(Vector3d center, float radius) - { - mCenter = center; - mRadius = radius; - } - public BoundingSphere3d(BoundingSphere3d cpy, float scale) - { - mCenter = cpy.mCenter; - mRadius = cpy.mRadius * scale; - } - public Vector3d Center - { - get - { - return new Vector3d(mCenter.x, mCenter.y, mCenter.z); - } - } - public float Radius - { - get - { - return mRadius; - } - } - - public override string ToString() - { - return "[" + this.Center.ToString() + " : " + this.Radius.ToString() + "]"; - } - } // struct BoundingSphere3f - - public struct UUID - { - ulong mLowOrderBytes; - ulong mHighOrderBytes; - - - static ulong SetUUIDlow(Google.ProtocolBuffers.ByteString data, int offset) - { - ulong LowOrderBytes = 0; - int shiftVal = 0; - for (int i = 0; i < 8; ++i) - { - ulong temp = data[i]; - LowOrderBytes |= (temp << shiftVal); - shiftVal += 8; - } - return LowOrderBytes; - } - static ulong SetUUIDhigh(Google.ProtocolBuffers.ByteString data) - { - return SetUUIDlow(data, 8); - } - static ulong SetUUIDlow(byte[] data, int offset) - { - ulong LowOrderBytes = 0; - int shiftVal = 0; - for (int i = 0; i < 8; ++i) - { - ulong temp = data[i]; - LowOrderBytes |= (temp << shiftVal); - shiftVal += 8; - } - return LowOrderBytes; - } - static ulong SetUUIDhigh(byte[] data) - { - return SetUUIDlow(data, 8); - } - public bool SetUUID(byte[] data) - { - if (data.Length == 16) - { - mLowOrderBytes = 0; - mHighOrderBytes = 0; - mLowOrderBytes = SetUUIDlow(data, 0); - mHighOrderBytes = SetUUIDlow(data, 8); - return true; - } - else - { - return false; - } - } - public byte[] GetUUID() - { - byte[] data = new byte[16]; - int shiftVal = 0; - for (int i = 0; i < 8; ++i) - { - ulong temp = 0xff; - temp = (mLowOrderBytes & (temp << shiftVal)); - temp = (temp >> shiftVal); - data[i] = (byte)temp; - shiftVal += 8; - } - shiftVal = 0; - for (int i = 8; i < 16; ++i) - { - ulong temp = 0xff; - temp = (mHighOrderBytes & (temp << shiftVal)); - temp = (temp >> shiftVal); - data[i] = (byte)temp; - shiftVal += 8; - } - return data; - } - - public static UUID Empty = new UUID(new byte[16]); - public UUID(byte[] data) - { - if (data.Length != 16) - { - throw new System.ArgumentException("UUIDs must be provided 16 bytes"); - } - mLowOrderBytes = SetUUIDlow(data, 0); - mHighOrderBytes = SetUUIDhigh(data); - } - public UUID(Google.ProtocolBuffers.ByteString data) - { - if (data.Length != 16) - { - throw new System.ArgumentException("UUIDs must be provided 16 bytes"); - } - mLowOrderBytes = SetUUIDlow(data, 0); - mHighOrderBytes = SetUUIDhigh(data); - } - - } - - - public struct SHA256 - { - ulong mLowOrderBytes; - ulong mLowMediumOrderBytes; - ulong mMediumHighOrderBytes; - ulong mHighOrderBytes; - - - static ulong SetLMH(Google.ProtocolBuffers.ByteString data, int offset) - { - ulong LowOrderBytes = 0; - int shiftVal = 0; - for (int i = 0; i < 8; ++i) - { - ulong temp = data[i]; - LowOrderBytes |= (temp << shiftVal); - shiftVal += 8; - } - return LowOrderBytes; - } - static ulong SetLow(Google.ProtocolBuffers.ByteString data) - { - return SetLMH(data, 0); - } - static ulong SetLowMedium(Google.ProtocolBuffers.ByteString data) - { - return SetLMH(data, 8); - } - static ulong SetMediumHigh(Google.ProtocolBuffers.ByteString data) - { - return SetLMH(data, 16); - } - static ulong SetHigh(Google.ProtocolBuffers.ByteString data) - { - return SetLMH(data, 24); - } - static ulong SetLMH(byte[] data, int offset) - { - ulong LowOrderBytes = 0; - int shiftVal = 0; - for (int i = 0; i < 8; ++i) - { - ulong temp = data[i]; - LowOrderBytes |= (temp << shiftVal); - shiftVal += 8; - } - return LowOrderBytes; - } - static ulong SetLow(byte[] data) - { - return SetLMH(data, 0); - } - static ulong SetLowMedium(byte[] data) - { - return SetLMH(data, 8); - } - static ulong SetMediumHigh(byte[] data) - { - return SetLMH(data, 16); - } - static ulong SetHigh(byte[] data) - { - return SetLMH(data, 24); - } - public bool SetSHA256(byte[] data) - { - if (data.Length == 32) - { - mLowOrderBytes = SetLow(data); - mLowMediumOrderBytes = SetLowMedium(data); - mMediumHighOrderBytes = SetMediumHigh(data); - mHighOrderBytes = SetHigh(data); - return true; - } - else - { - return false; - } - } - public byte[] GetBinaryData() - { - byte[] data = new byte[32]; - int shiftVal = 0; - for (int i = 0; i < 8; ++i) - { - ulong temp = 0xff; - temp = (mLowOrderBytes & (temp << shiftVal)); - temp = (temp >> shiftVal); - data[i] = (byte)temp; - shiftVal += 8; - } - shiftVal = 0; - for (int i = 8; i < 16; ++i) - { - ulong temp = 0xff; - temp = (mLowMediumOrderBytes & (temp << shiftVal)); - temp = (temp >> shiftVal); - data[i] = (byte)temp; - shiftVal += 8; - } - shiftVal = 0; - for (int i = 16; i < 24; ++i) - { - ulong temp = 0xff; - temp = (mMediumHighOrderBytes & (temp << shiftVal)); - temp = (temp >> shiftVal); - data[i] = (byte)temp; - shiftVal += 8; - } - shiftVal = 0; - for (int i = 24; i < 32; ++i) - { - ulong temp = 0xff; - temp = (mHighOrderBytes & (temp << shiftVal)); - temp = (temp >> shiftVal); - data[i] = (byte)temp; - shiftVal += 8; - } - return data; - } - - public static SHA256 Empty = new SHA256(new byte[32]); - public SHA256(byte[] data) - { - if (data.Length != 32) - { - throw new System.ArgumentException("SHA256s must be provided 32 bytes"); - } - mLowOrderBytes = SetLow(data); - mLowMediumOrderBytes = SetLowMedium(data); - mMediumHighOrderBytes = SetMediumHigh(data); - mHighOrderBytes = SetHigh(data); - } - public SHA256(Google.ProtocolBuffers.ByteString data) - { - if (data.Length != 32) - { - throw new System.ArgumentException("SHA256s must be provided 32 bytes"); - } - mLowOrderBytes = SetLow(data); - mLowMediumOrderBytes = SetLowMedium(data); - mMediumHighOrderBytes = SetMediumHigh(data); - mHighOrderBytes = SetHigh(data); - } - - } - - - - - public struct Time - { - ulong usec; - public Time(ulong usec_since_epoch) - { - usec = usec_since_epoch; - } - public ulong toMicro() - { - return usec; - } - } - public class Duration - { - long usec; - public Duration(long time_since) - { - usec = time_since; - } - public long toMicro() - { - return usec; - } - } - - class _PBJ - { - - public static bool ValidateBool(bool d) - { - return true; - } - public static bool ValidateDouble(double d) - { - return true; - } - public static bool ValidateFloat(float d) - { - return true; - } - public static bool ValidateUint64(ulong d) - { - return true; - } - public static bool ValidateUint32(uint d) - { - return true; - } - public static bool ValidateUint16(ushort d) - { - return true; - } - public static bool ValidateUint8(byte d) - { - return true; - } - public static bool ValidateInt64(long d) - { - return true; - } - public static bool ValidateInt32(int d) - { - return true; - } - public static bool ValidateInt16(short d) - { - return true; - } - public static bool ValidateInt8(sbyte d) - { - return true; - } - public static bool ValidateString(S input) - { - return true; - } - public static bool ValidateBytes(B input) - { - return true; - } - public static bool ValidateUuid(Google.ProtocolBuffers.ByteString input) - { - return input.Length == 16; - } - public static bool ValidateSha256(Google.ProtocolBuffers.ByteString input) - { - return input.Length == 32; - } - public static bool ValidateAngle(float input) - { - return input >= 0 && input <= 3.1415926536 * 2.0; - } - public static bool ValidateTime(ulong input) - { - return true; - } - public static bool ValidateDuration(long input) - { - return true; - } - public static bool ValidateFlags(ulong input, ulong verification) - { - return (input & verification) == input; - } - - - - - public static bool CastBool(bool d) - { - return d; - } - public static double CastDouble(double d) - { - return d; - } - public static float CastFloat(float d) - { - return d; - } - public static ulong CastUint64(ulong d) - { - return d; - } - public static uint CastUint32(uint d) - { - return d; - } - public static ushort CastUint16(ushort d) - { - return d; - } - public static byte CastUint8(byte d) - { - return d; - } - public static long CastInt64(long d) - { - return d; - } - public static int CastInt32(int d) - { - return d; - } - public static short CastInt16(short d) - { - return d; - } - public static sbyte CastInt8(sbyte d) - { - return d; - } - public static S CastString(S input) - { - return input; - } - public static B CastBytes(B input) - { - return input; - } - - - - public static bool CastBool() - { - return false; - } - public static double CastDouble() - { - return 0; - } - public static float CastFloat() - { - return 0; - } - public static ulong CastUint64() - { - return 0; - } - public static uint CastUint32() - { - return 0; - } - public static ushort CastUint16() - { - return 0; - } - public static byte CastUint8() - { - return 0; - } - public static long CastInt64() - { - return 0; - } - public static int CastInt32() - { - return 0; - } - public static short CastInt16() - { - return 0; - } - public static sbyte CastInt8() - { - return 0; - } - public static string CastString() - { - return ""; - } - public static Google.ProtocolBuffers.ByteString CastBytes() - { - return Google.ProtocolBuffers.ByteString.Empty; - } - - - public static ulong CastFlags(ulong data, ulong allFlagsOn) - { - return allFlagsOn & data; - } - public static ulong CastFlags(ulong allFlagsOn) - { - return 0; - } - - public static Vector3f CastNormal(float x, float y) - { - float neg = (x > 1.5f || y > 1.5f) ? -1.0f : 1.0f; - if (x > 1.5) - x -= 3; - if (y > 1.5) - y -= 3; - return new Vector3f(x, y, neg - neg * (float)Math.Sqrt(x * x + y * y)); - } - public static Vector3f CastNormal() - { - return new Vector3f(0, 1, 0); - } - - - public static Vector2f CastVector2f(float x, float y) - { - return new Vector2f(x, y); - } - public static Vector2f CastVector2f() - { - return new Vector2f(0, 0); - } - - public static Vector3f CastVector3f(float x, float y, float z) - { - return new Vector3f(x, y, z); - } - public static Vector3f CastVector3f() - { - return new Vector3f(0, 0, 0); - } - - public static Vector4f CastVector4f(float x, float y, float z, float w) - { - return new Vector4f(x, y, z, w); - } - public static Vector4f CastVector4f() - { - return new Vector4f(0, 0, 0, 0); - } - public static Vector2d CastVector2d(double x, double y) - { - return new Vector2d(x, y); - } - public static Vector2d CastVector2d() - { - return new Vector2d(0, 0); - } - - public static Vector3d CastVector3d(double x, double y, double z) - { - return new Vector3d(x, y, z); - } - public static Vector3d CastVector3d() - { - return new Vector3d(0, 0, 0); - } - - public static Vector4d CastVector4d(double x, double y, double z, double w) - { - return new Vector4d(x, y, z, w); - } - public static Vector4d CastVector4d() - { - return new Vector4d(0, 0, 0, 0); - } - - public static BoundingSphere3f CastBoundingsphere3f(float x, float y, float z, float r) - { - return new BoundingSphere3f(new Vector3f(x, y, z), r); - } - public static BoundingSphere3d CastBoundingsphere3d(double x, double y, double z, double r) - { - return new BoundingSphere3d(new Vector3d(x, y, z), (float)r); - } - - public static BoundingSphere3f CastBoundingsphere3f() - { - return new BoundingSphere3f(new Vector3f(0, 0, 0), 0); - } - public static BoundingSphere3d CastBoundingsphere3d() - { - return new BoundingSphere3d(new Vector3d(0, 0, 0), (float)0); - } - - - public static BoundingBox3f3f CastBoundingbox3f3f(float x, float y, float z, float dx, float dy, float dz) - { - return new BoundingBox3f3f(x, y, z, dx, dy, dz); - } - public static BoundingBox3d3f CastBoundingbox3d3f(double x, double y, double z, double dx, double dy, double dz) - { - return new BoundingBox3d3f(x, y, z, (float)dx, (float)dy, (float)dz); - } - - public static BoundingBox3f3f CastBoundingbox3f3f() - { - return new BoundingBox3f3f(new Vector3f(0, 0, 0), new Vector3f(0, 0, 0)); - } - public static BoundingBox3d3f CastBoundingbox3d3f() - { - return new BoundingBox3d3f(0, 0, 0, 0, 0, 0); - } - - - - public static Quaternion CastQuaternion(float x, float y, float z) - { - float neg = (x > 1.5 || y > 1.5 || z > 1.5) ? -1.0f : 1.0f; - if (x > 1.5) - x -= 3.0f; - if (y > 1.5) - y -= 3.0f; - if (z > 1.5) - z -= 3.0f; - return new Quaternion(neg - neg * (float)Math.Sqrt(x * x + y * y + z * z), x, y, z); - } - public static Quaternion CastQuaternion() - { - return new Quaternion(1, 0, 0, 0); - } - - public static UUID CastUuid(Google.ProtocolBuffers.ByteString input) - { - return new UUID(input); - } - public static SHA256 CastSha256(Google.ProtocolBuffers.ByteString input) - { - return new SHA256(input); - } - public static SHA256 CastSha256() - { - return SHA256.Empty; - } - public static UUID CastUuid() - { - return UUID.Empty; - } - - public static float CastAngle(float d) - { - return d; - } - public static float CastAngle() - { - return 0; - } - - public static Time CastTime(ulong t) - { - return new Time(t); - } - public static Time CastTime() - { - return new Time(0); - } - public static Duration CastDuration(long t) - { - return new Duration(t); - } - public static Duration CastDuration() - { - return new Duration(0); - } - - public static T Construct(T retval) - { - return retval; - } - public static long Construct(Duration d) - { - return d.toMicro(); - } - public static ulong Construct(Time t) - { - return t.toMicro(); - } - public static Google.ProtocolBuffers.ByteString Construct(UUID u) - { - byte[] data = u.GetUUID(); - Google.ProtocolBuffers.ByteString retval = Google.ProtocolBuffers.ByteString.CopyFrom(data, 0, 16); - return retval; - } - public static Google.ProtocolBuffers.ByteString Construct(SHA256 u) - { - byte[] data = u.GetBinaryData(); - Google.ProtocolBuffers.ByteString retval = Google.ProtocolBuffers.ByteString.CopyFrom(data, 0, 16); - return retval; - } - public static float[] ConstructNormal(Vector3f d) - { - return new float[] { d.x + (d.z < 0 ? 3.0f : 0.0f), d.y }; - } - public static float[] ConstructQuaternion(Quaternion d) - { - return new float[] { d.x + (d.w < 0 ? 3.0f : 0.0f), d.y, d.z }; - } - - public static float[] ConstructVector2f(Vector2f d) - { - return new float[] { d.x, d.y }; - } - public static double[] ConstructVector2d(Vector2d d) - { - return new double[] { d.x, d.y }; - } - - public static float[] ConstructVector3f(Vector3f d) - { - return new float[] { d.x, d.y, d.z }; - } - public static double[] ConstructVector3d(Vector3d d) - { - return new double[] { d.x, d.y, d.z }; - } - public static float[] ConstructVector4f(Vector4f d) - { - return new float[] { d.x, d.y, d.z, d.w }; - } - public static double[] ConstructVector4d(Vector4d d) - { - return new double[] { d.x, d.y, d.z, d.w }; - } - - - public static float[] ConstructBoundingsphere3f(BoundingSphere3f d) - { - return new float[] { d.Center.x, d.Center.y, d.Center.z, d.Radius }; - } - public static double[] ConstructBoundingsphere3d(BoundingSphere3d d) - { - return new double[] { d.Center.x, d.Center.y, d.Center.z, d.Radius }; - } - - public static float[] ConstructBoundingbox3f3f(BoundingBox3f3f d) - { - return new float[] { d.Min.x, d.Min.y, d.Min.z, d.Diag.x, d.Diag.y, d.Diag.z }; - } - public static double[] ConstructBoundingbox3d3f(BoundingBox3d3f d) - { - return new double[] { d.Min.x, d.Min.y, d.Min.z, d.Diag.x, d.Diag.y, d.Diag.z }; - } - - - } - -} diff --git a/OpenSim/Client/Sirikata/Protocol/Persistence.cs b/OpenSim/Client/Sirikata/Protocol/Persistence.cs deleted file mode 100644 index d8f8d330bb..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Persistence.cs +++ /dev/null @@ -1,3299 +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.Persistence.Protocol._PBJ_Internal { - - public static partial class Persistence { - - #region Extension registration - public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { - } - #endregion - #region Static variables - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageKey__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageKey__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageValue__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageValue__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageElement__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageElement__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_CompareElement__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_CompareElement__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageSet__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageSet__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadSet__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadSet__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_WriteSet__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_WriteSet__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadWriteSet__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadWriteSet__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Minitransaction__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Minitransaction__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Response__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Response__FieldAccessorTable; - #endregion - #region Descriptor - public static pbd::FileDescriptor Descriptor { - get { return descriptor; } - } - private static pbd::FileDescriptor descriptor; - - static Persistence() { - byte[] descriptorData = global::System.Convert.FromBase64String( - "ChFQZXJzaXN0ZW5jZS5wcm90bxIrU2lyaWthdGEuUGVyc2lzdGVuY2UuUHJv" + - "dG9jb2wuX1BCSl9JbnRlcm5hbCJHCgpTdG9yYWdlS2V5EhMKC29iamVjdF91" + - "dWlkGAkgASgMEhAKCGZpZWxkX2lkGAogASgEEhIKCmZpZWxkX25hbWUYCyAB" + - "KAkiHAoMU3RvcmFnZVZhbHVlEgwKBGRhdGEYDCABKAwi/gEKDlN0b3JhZ2VF" + - "bGVtZW50EhMKC29iamVjdF91dWlkGAkgASgMEhAKCGZpZWxkX2lkGAogASgE" + - "EhIKCmZpZWxkX25hbWUYCyABKAkSDAoEZGF0YRgMIAEoDBINCgVpbmRleBgN" + - "IAEoBRJfCg1yZXR1cm5fc3RhdHVzGA8gASgOMkguU2lyaWthdGEuUGVyc2lz" + - "dGVuY2UuUHJvdG9jb2wuX1BCSl9JbnRlcm5hbC5TdG9yYWdlRWxlbWVudC5S" + - "ZXR1cm5TdGF0dXMiMwoMUmV0dXJuU3RhdHVzEg8KC0tFWV9NSVNTSU5HEAQS" + - "EgoOSU5URVJOQUxfRVJST1IQBiLaAQoOQ29tcGFyZUVsZW1lbnQSEwoLb2Jq" + - "ZWN0X3V1aWQYCSABKAwSEAoIZmllbGRfaWQYCiABKAQSEgoKZmllbGRfbmFt" + - "ZRgLIAEoCRIMCgRkYXRhGAwgASgMEloKCmNvbXBhcmF0b3IYDiABKA4yRi5T" + - "aXJpa2F0YS5QZXJzaXN0ZW5jZS5Qcm90b2NvbC5fUEJKX0ludGVybmFsLkNv" + - "bXBhcmVFbGVtZW50LkNPTVBBUkFUT1IiIwoKQ09NUEFSQVRPUhIJCgVFUVVB" + - "TBAAEgoKBk5FUVVBTBABIlgKClN0b3JhZ2VTZXQSSgoFcmVhZHMYCSADKAsy" + - "Oy5TaXJpa2F0YS5QZXJzaXN0ZW5jZS5Qcm90b2NvbC5fUEJKX0ludGVybmFs" + - "LlN0b3JhZ2VFbGVtZW50IlUKB1JlYWRTZXQSSgoFcmVhZHMYCSADKAsyOy5T" + - "aXJpa2F0YS5QZXJzaXN0ZW5jZS5Qcm90b2NvbC5fUEJKX0ludGVybmFsLlN0" + - "b3JhZ2VFbGVtZW50IlcKCFdyaXRlU2V0EksKBndyaXRlcxgKIAMoCzI7LlNp" + - "cmlrYXRhLlBlcnNpc3RlbmNlLlByb3RvY29sLl9QQkpfSW50ZXJuYWwuU3Rv" + - "cmFnZUVsZW1lbnQi5gEKDFJlYWRXcml0ZVNldBJKCgVyZWFkcxgJIAMoCzI7" + - "LlNpcmlrYXRhLlBlcnNpc3RlbmNlLlByb3RvY29sLl9QQkpfSW50ZXJuYWwu" + - "U3RvcmFnZUVsZW1lbnQSSwoGd3JpdGVzGAogAygLMjsuU2lyaWthdGEuUGVy" + - "c2lzdGVuY2UuUHJvdG9jb2wuX1BCSl9JbnRlcm5hbC5TdG9yYWdlRWxlbWVu" + - "dBIPCgdvcHRpb25zGA4gASgEIiwKE1JlYWRXcml0ZVNldE9wdGlvbnMSFQoR" + - "UkVUVVJOX1JFQURfTkFNRVMQASK3AgoPTWluaXRyYW5zYWN0aW9uEkoKBXJl" + - "YWRzGAkgAygLMjsuU2lyaWthdGEuUGVyc2lzdGVuY2UuUHJvdG9jb2wuX1BC" + - "Sl9JbnRlcm5hbC5TdG9yYWdlRWxlbWVudBJLCgZ3cml0ZXMYCiADKAsyOy5T" + - "aXJpa2F0YS5QZXJzaXN0ZW5jZS5Qcm90b2NvbC5fUEJKX0ludGVybmFsLlN0" + - "b3JhZ2VFbGVtZW50Ek0KCGNvbXBhcmVzGAsgAygLMjsuU2lyaWthdGEuUGVy" + - "c2lzdGVuY2UuUHJvdG9jb2wuX1BCSl9JbnRlcm5hbC5Db21wYXJlRWxlbWVu" + - "dBIPCgdvcHRpb25zGA4gASgEIisKElRyYW5zYWN0aW9uT3B0aW9ucxIVChFS" + - "RVRVUk5fUkVBRF9OQU1FUxABIp8CCghSZXNwb25zZRJKCgVyZWFkcxgJIAMo" + - "CzI7LlNpcmlrYXRhLlBlcnNpc3RlbmNlLlByb3RvY29sLl9QQkpfSW50ZXJu" + - "YWwuU3RvcmFnZUVsZW1lbnQSWQoNcmV0dXJuX3N0YXR1cxgPIAEoDjJCLlNp" + - "cmlrYXRhLlBlcnNpc3RlbmNlLlByb3RvY29sLl9QQkpfSW50ZXJuYWwuUmVz" + - "cG9uc2UuUmV0dXJuU3RhdHVzImwKDFJldHVyblN0YXR1cxILCgdTVUNDRVNT" + - "EAASEwoPREFUQUJBU0VfTE9DS0VEEAMSDwoLS0VZX01JU1NJTkcQBBIVChFD" + - "T01QQVJJU09OX0ZBSUxFRBAFEhIKDklOVEVSTkFMX0VSUk9SEAY="); - pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { - descriptor = root; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageKey__Descriptor = Descriptor.MessageTypes[0]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageKey__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageKey__Descriptor, - new string[] { "ObjectUuid", "FieldId", "FieldName", }); - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageValue__Descriptor = Descriptor.MessageTypes[1]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageValue__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageValue__Descriptor, - new string[] { "Data", }); - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageElement__Descriptor = Descriptor.MessageTypes[2]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageElement__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageElement__Descriptor, - new string[] { "ObjectUuid", "FieldId", "FieldName", "Data", "Index", "ReturnStatus", }); - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_CompareElement__Descriptor = Descriptor.MessageTypes[3]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_CompareElement__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_CompareElement__Descriptor, - new string[] { "ObjectUuid", "FieldId", "FieldName", "Data", "Comparator", }); - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageSet__Descriptor = Descriptor.MessageTypes[4]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageSet__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageSet__Descriptor, - new string[] { "Reads", }); - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadSet__Descriptor = Descriptor.MessageTypes[5]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadSet__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadSet__Descriptor, - new string[] { "Reads", }); - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_WriteSet__Descriptor = Descriptor.MessageTypes[6]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_WriteSet__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_WriteSet__Descriptor, - new string[] { "Writes", }); - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadWriteSet__Descriptor = Descriptor.MessageTypes[7]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadWriteSet__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadWriteSet__Descriptor, - new string[] { "Reads", "Writes", "Options", }); - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Minitransaction__Descriptor = Descriptor.MessageTypes[8]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Minitransaction__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Minitransaction__Descriptor, - new string[] { "Reads", "Writes", "Compares", "Options", }); - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Response__Descriptor = Descriptor.MessageTypes[9]; - internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Response__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Response__Descriptor, - new string[] { "Reads", "ReturnStatus", }); - return null; - }; - pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, - new pbd::FileDescriptor[] { - }, assigner); - } - #endregion - - } - #region Messages - public sealed partial class StorageKey : pb::GeneratedMessage { - private static readonly StorageKey defaultInstance = new Builder().BuildPartial(); - public static StorageKey DefaultInstance { - get { return defaultInstance; } - } - - public override StorageKey DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override StorageKey ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageKey__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageKey__FieldAccessorTable; } - } - - public const int ObjectUuidFieldNumber = 9; - private bool hasObjectUuid; - private pb::ByteString objectUuid_ = pb::ByteString.Empty; - public bool HasObjectUuid { - get { return hasObjectUuid; } - } - public pb::ByteString ObjectUuid { - get { return objectUuid_; } - } - - public const int FieldIdFieldNumber = 10; - private bool hasFieldId; - private ulong fieldId_ = 0UL; - public bool HasFieldId { - get { return hasFieldId; } - } - [global::System.CLSCompliant(false)] - public ulong FieldId { - get { return fieldId_; } - } - - public const int FieldNameFieldNumber = 11; - private bool hasFieldName; - private string fieldName_ = ""; - public bool HasFieldName { - get { return hasFieldName; } - } - public string FieldName { - get { return fieldName_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasObjectUuid) { - output.WriteBytes(9, ObjectUuid); - } - if (HasFieldId) { - output.WriteUInt64(10, FieldId); - } - if (HasFieldName) { - output.WriteString(11, FieldName); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasObjectUuid) { - size += pb::CodedOutputStream.ComputeBytesSize(9, ObjectUuid); - } - if (HasFieldId) { - size += pb::CodedOutputStream.ComputeUInt64Size(10, FieldId); - } - if (HasFieldName) { - size += pb::CodedOutputStream.ComputeStringSize(11, FieldName); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static StorageKey ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StorageKey ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StorageKey ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StorageKey ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StorageKey ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StorageKey ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static StorageKey ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static StorageKey ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static StorageKey ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StorageKey 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(StorageKey prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - StorageKey result = new StorageKey(); - - protected override StorageKey MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new StorageKey(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageKey.Descriptor; } - } - - public override StorageKey DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageKey.DefaultInstance; } - } - - public override StorageKey BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - StorageKey returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is StorageKey) { - return MergeFrom((StorageKey) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(StorageKey other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageKey.DefaultInstance) return this; - if (other.HasObjectUuid) { - ObjectUuid = other.ObjectUuid; - } - if (other.HasFieldId) { - FieldId = other.FieldId; - } - if (other.HasFieldName) { - FieldName = other.FieldName; - } - 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 74: { - ObjectUuid = input.ReadBytes(); - break; - } - case 80: { - FieldId = input.ReadUInt64(); - break; - } - case 90: { - FieldName = input.ReadString(); - break; - } - } - } - } - - - public bool HasObjectUuid { - get { return result.HasObjectUuid; } - } - public pb::ByteString ObjectUuid { - get { return result.ObjectUuid; } - set { SetObjectUuid(value); } - } - public Builder SetObjectUuid(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasObjectUuid = true; - result.objectUuid_ = value; - return this; - } - public Builder ClearObjectUuid() { - result.hasObjectUuid = false; - result.objectUuid_ = pb::ByteString.Empty; - return this; - } - - public bool HasFieldId { - get { return result.HasFieldId; } - } - [global::System.CLSCompliant(false)] - public ulong FieldId { - get { return result.FieldId; } - set { SetFieldId(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetFieldId(ulong value) { - result.hasFieldId = true; - result.fieldId_ = value; - return this; - } - public Builder ClearFieldId() { - result.hasFieldId = false; - result.fieldId_ = 0UL; - return this; - } - - public bool HasFieldName { - get { return result.HasFieldName; } - } - public string FieldName { - get { return result.FieldName; } - set { SetFieldName(value); } - } - public Builder SetFieldName(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasFieldName = true; - result.fieldName_ = value; - return this; - } - public Builder ClearFieldName() { - result.hasFieldName = false; - result.fieldName_ = ""; - return this; - } - } - static StorageKey() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - public sealed partial class StorageValue : pb::GeneratedMessage { - private static readonly StorageValue defaultInstance = new Builder().BuildPartial(); - public static StorageValue DefaultInstance { - get { return defaultInstance; } - } - - public override StorageValue DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override StorageValue ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageValue__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageValue__FieldAccessorTable; } - } - - public const int DataFieldNumber = 12; - private bool hasData; - private pb::ByteString data_ = pb::ByteString.Empty; - public bool HasData { - get { return hasData; } - } - public pb::ByteString Data { - get { return data_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasData) { - output.WriteBytes(12, Data); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasData) { - size += pb::CodedOutputStream.ComputeBytesSize(12, Data); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static StorageValue ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StorageValue ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StorageValue ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StorageValue ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StorageValue ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StorageValue ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static StorageValue ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static StorageValue ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static StorageValue ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StorageValue 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(StorageValue prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - StorageValue result = new StorageValue(); - - protected override StorageValue MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new StorageValue(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageValue.Descriptor; } - } - - public override StorageValue DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageValue.DefaultInstance; } - } - - public override StorageValue BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - StorageValue returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is StorageValue) { - return MergeFrom((StorageValue) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(StorageValue other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageValue.DefaultInstance) return this; - if (other.HasData) { - Data = other.Data; - } - 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 98: { - Data = input.ReadBytes(); - break; - } - } - } - } - - - public bool HasData { - get { return result.HasData; } - } - public pb::ByteString Data { - get { return result.Data; } - set { SetData(value); } - } - public Builder SetData(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasData = true; - result.data_ = value; - return this; - } - public Builder ClearData() { - result.hasData = false; - result.data_ = pb::ByteString.Empty; - return this; - } - } - static StorageValue() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - public sealed partial class StorageElement : pb::GeneratedMessage { - private static readonly StorageElement defaultInstance = new Builder().BuildPartial(); - public static StorageElement DefaultInstance { - get { return defaultInstance; } - } - - public override StorageElement DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override StorageElement ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageElement__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageElement__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum ReturnStatus { - KEY_MISSING = 4, - INTERNAL_ERROR = 6, - } - - } - #endregion - - public const int ObjectUuidFieldNumber = 9; - private bool hasObjectUuid; - private pb::ByteString objectUuid_ = pb::ByteString.Empty; - public bool HasObjectUuid { - get { return hasObjectUuid; } - } - public pb::ByteString ObjectUuid { - get { return objectUuid_; } - } - - public const int FieldIdFieldNumber = 10; - private bool hasFieldId; - private ulong fieldId_ = 0UL; - public bool HasFieldId { - get { return hasFieldId; } - } - [global::System.CLSCompliant(false)] - public ulong FieldId { - get { return fieldId_; } - } - - public const int FieldNameFieldNumber = 11; - private bool hasFieldName; - private string fieldName_ = ""; - public bool HasFieldName { - get { return hasFieldName; } - } - public string FieldName { - get { return fieldName_; } - } - - public const int DataFieldNumber = 12; - private bool hasData; - private pb::ByteString data_ = pb::ByteString.Empty; - public bool HasData { - get { return hasData; } - } - public pb::ByteString Data { - get { return data_; } - } - - public const int IndexFieldNumber = 13; - private bool hasIndex; - private int index_ = 0; - public bool HasIndex { - get { return hasIndex; } - } - public int Index { - get { return index_; } - } - - public const int ReturnStatusFieldNumber = 15; - private bool hasReturnStatus; - private global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Types.ReturnStatus returnStatus_ = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Types.ReturnStatus.KEY_MISSING; - public bool HasReturnStatus { - get { return hasReturnStatus; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Types.ReturnStatus ReturnStatus { - get { return returnStatus_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasObjectUuid) { - output.WriteBytes(9, ObjectUuid); - } - if (HasFieldId) { - output.WriteUInt64(10, FieldId); - } - if (HasFieldName) { - output.WriteString(11, FieldName); - } - if (HasData) { - output.WriteBytes(12, Data); - } - if (HasIndex) { - output.WriteInt32(13, Index); - } - if (HasReturnStatus) { - output.WriteEnum(15, (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 (HasObjectUuid) { - size += pb::CodedOutputStream.ComputeBytesSize(9, ObjectUuid); - } - if (HasFieldId) { - size += pb::CodedOutputStream.ComputeUInt64Size(10, FieldId); - } - if (HasFieldName) { - size += pb::CodedOutputStream.ComputeStringSize(11, FieldName); - } - if (HasData) { - size += pb::CodedOutputStream.ComputeBytesSize(12, Data); - } - if (HasIndex) { - size += pb::CodedOutputStream.ComputeInt32Size(13, Index); - } - if (HasReturnStatus) { - size += pb::CodedOutputStream.ComputeEnumSize(15, (int) ReturnStatus); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static StorageElement ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StorageElement ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StorageElement ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StorageElement ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StorageElement ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StorageElement ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static StorageElement ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static StorageElement ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static StorageElement ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StorageElement 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(StorageElement prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - StorageElement result = new StorageElement(); - - protected override StorageElement MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new StorageElement(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Descriptor; } - } - - public override StorageElement DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.DefaultInstance; } - } - - public override StorageElement BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - StorageElement returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is StorageElement) { - return MergeFrom((StorageElement) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(StorageElement other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.DefaultInstance) return this; - if (other.HasObjectUuid) { - ObjectUuid = other.ObjectUuid; - } - if (other.HasFieldId) { - FieldId = other.FieldId; - } - if (other.HasFieldName) { - FieldName = other.FieldName; - } - if (other.HasData) { - Data = other.Data; - } - if (other.HasIndex) { - Index = other.Index; - } - 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 74: { - ObjectUuid = input.ReadBytes(); - break; - } - case 80: { - FieldId = input.ReadUInt64(); - break; - } - case 90: { - FieldName = input.ReadString(); - break; - } - case 98: { - Data = input.ReadBytes(); - break; - } - case 104: { - Index = input.ReadInt32(); - break; - } - case 120: { - int rawValue = input.ReadEnum(); - if (!global::System.Enum.IsDefined(typeof(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Types.ReturnStatus), rawValue)) { - if (unknownFields == null) { - unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); - } - unknownFields.MergeVarintField(15, (ulong) rawValue); - } else { - ReturnStatus = (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Types.ReturnStatus) rawValue; - } - break; - } - } - } - } - - - public bool HasObjectUuid { - get { return result.HasObjectUuid; } - } - public pb::ByteString ObjectUuid { - get { return result.ObjectUuid; } - set { SetObjectUuid(value); } - } - public Builder SetObjectUuid(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasObjectUuid = true; - result.objectUuid_ = value; - return this; - } - public Builder ClearObjectUuid() { - result.hasObjectUuid = false; - result.objectUuid_ = pb::ByteString.Empty; - return this; - } - - public bool HasFieldId { - get { return result.HasFieldId; } - } - [global::System.CLSCompliant(false)] - public ulong FieldId { - get { return result.FieldId; } - set { SetFieldId(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetFieldId(ulong value) { - result.hasFieldId = true; - result.fieldId_ = value; - return this; - } - public Builder ClearFieldId() { - result.hasFieldId = false; - result.fieldId_ = 0UL; - return this; - } - - public bool HasFieldName { - get { return result.HasFieldName; } - } - public string FieldName { - get { return result.FieldName; } - set { SetFieldName(value); } - } - public Builder SetFieldName(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasFieldName = true; - result.fieldName_ = value; - return this; - } - public Builder ClearFieldName() { - result.hasFieldName = false; - result.fieldName_ = ""; - return this; - } - - public bool HasData { - get { return result.HasData; } - } - public pb::ByteString Data { - get { return result.Data; } - set { SetData(value); } - } - public Builder SetData(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasData = true; - result.data_ = value; - return this; - } - public Builder ClearData() { - result.hasData = false; - result.data_ = pb::ByteString.Empty; - return this; - } - - public bool HasIndex { - get { return result.HasIndex; } - } - public int Index { - get { return result.Index; } - set { SetIndex(value); } - } - public Builder SetIndex(int value) { - result.hasIndex = true; - result.index_ = value; - return this; - } - public Builder ClearIndex() { - result.hasIndex = false; - result.index_ = 0; - return this; - } - - public bool HasReturnStatus { - get { return result.HasReturnStatus; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Types.ReturnStatus ReturnStatus { - get { return result.ReturnStatus; } - set { SetReturnStatus(value); } - } - public Builder SetReturnStatus(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Types.ReturnStatus value) { - result.hasReturnStatus = true; - result.returnStatus_ = value; - return this; - } - public Builder ClearReturnStatus() { - result.hasReturnStatus = false; - result.returnStatus_ = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Types.ReturnStatus.KEY_MISSING; - return this; - } - } - static StorageElement() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - public sealed partial class CompareElement : pb::GeneratedMessage { - private static readonly CompareElement defaultInstance = new Builder().BuildPartial(); - public static CompareElement DefaultInstance { - get { return defaultInstance; } - } - - public override CompareElement DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override CompareElement ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_CompareElement__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_CompareElement__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum COMPARATOR { - EQUAL = 0, - NEQUAL = 1, - } - - } - #endregion - - public const int ObjectUuidFieldNumber = 9; - private bool hasObjectUuid; - private pb::ByteString objectUuid_ = pb::ByteString.Empty; - public bool HasObjectUuid { - get { return hasObjectUuid; } - } - public pb::ByteString ObjectUuid { - get { return objectUuid_; } - } - - public const int FieldIdFieldNumber = 10; - private bool hasFieldId; - private ulong fieldId_ = 0UL; - public bool HasFieldId { - get { return hasFieldId; } - } - [global::System.CLSCompliant(false)] - public ulong FieldId { - get { return fieldId_; } - } - - public const int FieldNameFieldNumber = 11; - private bool hasFieldName; - private string fieldName_ = ""; - public bool HasFieldName { - get { return hasFieldName; } - } - public string FieldName { - get { return fieldName_; } - } - - public const int DataFieldNumber = 12; - private bool hasData; - private pb::ByteString data_ = pb::ByteString.Empty; - public bool HasData { - get { return hasData; } - } - public pb::ByteString Data { - get { return data_; } - } - - public const int ComparatorFieldNumber = 14; - private bool hasComparator; - private global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Types.COMPARATOR comparator_ = global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Types.COMPARATOR.EQUAL; - public bool HasComparator { - get { return hasComparator; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Types.COMPARATOR Comparator { - get { return comparator_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasObjectUuid) { - output.WriteBytes(9, ObjectUuid); - } - if (HasFieldId) { - output.WriteUInt64(10, FieldId); - } - if (HasFieldName) { - output.WriteString(11, FieldName); - } - if (HasData) { - output.WriteBytes(12, Data); - } - if (HasComparator) { - output.WriteEnum(14, (int) Comparator); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasObjectUuid) { - size += pb::CodedOutputStream.ComputeBytesSize(9, ObjectUuid); - } - if (HasFieldId) { - size += pb::CodedOutputStream.ComputeUInt64Size(10, FieldId); - } - if (HasFieldName) { - size += pb::CodedOutputStream.ComputeStringSize(11, FieldName); - } - if (HasData) { - size += pb::CodedOutputStream.ComputeBytesSize(12, Data); - } - if (HasComparator) { - size += pb::CodedOutputStream.ComputeEnumSize(14, (int) Comparator); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static CompareElement ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static CompareElement ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static CompareElement ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static CompareElement ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static CompareElement ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static CompareElement ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static CompareElement ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static CompareElement ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static CompareElement ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static CompareElement 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(CompareElement prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - CompareElement result = new CompareElement(); - - protected override CompareElement MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new CompareElement(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Descriptor; } - } - - public override CompareElement DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.DefaultInstance; } - } - - public override CompareElement BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - CompareElement returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is CompareElement) { - return MergeFrom((CompareElement) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(CompareElement other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.DefaultInstance) return this; - if (other.HasObjectUuid) { - ObjectUuid = other.ObjectUuid; - } - if (other.HasFieldId) { - FieldId = other.FieldId; - } - if (other.HasFieldName) { - FieldName = other.FieldName; - } - if (other.HasData) { - Data = other.Data; - } - if (other.HasComparator) { - Comparator = other.Comparator; - } - 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 74: { - ObjectUuid = input.ReadBytes(); - break; - } - case 80: { - FieldId = input.ReadUInt64(); - break; - } - case 90: { - FieldName = input.ReadString(); - break; - } - case 98: { - Data = input.ReadBytes(); - break; - } - case 112: { - int rawValue = input.ReadEnum(); - if (!global::System.Enum.IsDefined(typeof(global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Types.COMPARATOR), rawValue)) { - if (unknownFields == null) { - unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); - } - unknownFields.MergeVarintField(14, (ulong) rawValue); - } else { - Comparator = (global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Types.COMPARATOR) rawValue; - } - break; - } - } - } - } - - - public bool HasObjectUuid { - get { return result.HasObjectUuid; } - } - public pb::ByteString ObjectUuid { - get { return result.ObjectUuid; } - set { SetObjectUuid(value); } - } - public Builder SetObjectUuid(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasObjectUuid = true; - result.objectUuid_ = value; - return this; - } - public Builder ClearObjectUuid() { - result.hasObjectUuid = false; - result.objectUuid_ = pb::ByteString.Empty; - return this; - } - - public bool HasFieldId { - get { return result.HasFieldId; } - } - [global::System.CLSCompliant(false)] - public ulong FieldId { - get { return result.FieldId; } - set { SetFieldId(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetFieldId(ulong value) { - result.hasFieldId = true; - result.fieldId_ = value; - return this; - } - public Builder ClearFieldId() { - result.hasFieldId = false; - result.fieldId_ = 0UL; - return this; - } - - public bool HasFieldName { - get { return result.HasFieldName; } - } - public string FieldName { - get { return result.FieldName; } - set { SetFieldName(value); } - } - public Builder SetFieldName(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasFieldName = true; - result.fieldName_ = value; - return this; - } - public Builder ClearFieldName() { - result.hasFieldName = false; - result.fieldName_ = ""; - return this; - } - - public bool HasData { - get { return result.HasData; } - } - public pb::ByteString Data { - get { return result.Data; } - set { SetData(value); } - } - public Builder SetData(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasData = true; - result.data_ = value; - return this; - } - public Builder ClearData() { - result.hasData = false; - result.data_ = pb::ByteString.Empty; - return this; - } - - public bool HasComparator { - get { return result.HasComparator; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Types.COMPARATOR Comparator { - get { return result.Comparator; } - set { SetComparator(value); } - } - public Builder SetComparator(global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Types.COMPARATOR value) { - result.hasComparator = true; - result.comparator_ = value; - return this; - } - public Builder ClearComparator() { - result.hasComparator = false; - result.comparator_ = global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Types.COMPARATOR.EQUAL; - return this; - } - } - static CompareElement() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - public sealed partial class StorageSet : pb::GeneratedMessage { - private static readonly StorageSet defaultInstance = new Builder().BuildPartial(); - public static StorageSet DefaultInstance { - get { return defaultInstance; } - } - - public override StorageSet DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override StorageSet ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageSet__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_StorageSet__FieldAccessorTable; } - } - - public const int ReadsFieldNumber = 9; - private pbc::PopsicleList reads_ = new pbc::PopsicleList(); - public scg::IList ReadsList { - get { return reads_; } - } - public int ReadsCount { - get { return reads_.Count; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return reads_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - output.WriteMessage(9, element); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - size += pb::CodedOutputStream.ComputeMessageSize(9, element); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static StorageSet ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StorageSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StorageSet ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StorageSet ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StorageSet ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StorageSet ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static StorageSet ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static StorageSet ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static StorageSet ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StorageSet 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(StorageSet prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - StorageSet result = new StorageSet(); - - protected override StorageSet MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new StorageSet(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageSet.Descriptor; } - } - - public override StorageSet DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageSet.DefaultInstance; } - } - - public override StorageSet BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.reads_.MakeReadOnly(); - StorageSet returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is StorageSet) { - return MergeFrom((StorageSet) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(StorageSet other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageSet.DefaultInstance) return this; - if (other.reads_.Count != 0) { - base.AddRange(other.reads_, result.reads_); - } - 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 74: { - global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder subBuilder = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddReads(subBuilder.BuildPartial()); - break; - } - } - } - } - - - public pbc::IPopsicleList ReadsList { - get { return result.reads_; } - } - public int ReadsCount { - get { return result.ReadsCount; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return result.GetReads(index); - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_[index] = value; - return this; - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_[index] = builderForValue.Build(); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_.Add(value); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeReads(scg::IEnumerable values) { - base.AddRange(values, result.reads_); - return this; - } - public Builder ClearReads() { - result.reads_.Clear(); - return this; - } - } - static StorageSet() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - public sealed partial class ReadSet : pb::GeneratedMessage { - private static readonly ReadSet defaultInstance = new Builder().BuildPartial(); - public static ReadSet DefaultInstance { - get { return defaultInstance; } - } - - public override ReadSet DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override ReadSet ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadSet__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadSet__FieldAccessorTable; } - } - - public const int ReadsFieldNumber = 9; - private pbc::PopsicleList reads_ = new pbc::PopsicleList(); - public scg::IList ReadsList { - get { return reads_; } - } - public int ReadsCount { - get { return reads_.Count; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return reads_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - output.WriteMessage(9, element); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - size += pb::CodedOutputStream.ComputeMessageSize(9, element); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static ReadSet ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ReadSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ReadSet ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ReadSet ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ReadSet ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ReadSet ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static ReadSet ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static ReadSet ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static ReadSet ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ReadSet 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(ReadSet prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - ReadSet result = new ReadSet(); - - protected override ReadSet MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new ReadSet(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.ReadSet.Descriptor; } - } - - public override ReadSet DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.ReadSet.DefaultInstance; } - } - - public override ReadSet BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.reads_.MakeReadOnly(); - ReadSet returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is ReadSet) { - return MergeFrom((ReadSet) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(ReadSet other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.ReadSet.DefaultInstance) return this; - if (other.reads_.Count != 0) { - base.AddRange(other.reads_, result.reads_); - } - 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 74: { - global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder subBuilder = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddReads(subBuilder.BuildPartial()); - break; - } - } - } - } - - - public pbc::IPopsicleList ReadsList { - get { return result.reads_; } - } - public int ReadsCount { - get { return result.ReadsCount; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return result.GetReads(index); - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_[index] = value; - return this; - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_[index] = builderForValue.Build(); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_.Add(value); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeReads(scg::IEnumerable values) { - base.AddRange(values, result.reads_); - return this; - } - public Builder ClearReads() { - result.reads_.Clear(); - return this; - } - } - static ReadSet() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - public sealed partial class WriteSet : pb::GeneratedMessage { - private static readonly WriteSet defaultInstance = new Builder().BuildPartial(); - public static WriteSet DefaultInstance { - get { return defaultInstance; } - } - - public override WriteSet DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override WriteSet ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_WriteSet__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_WriteSet__FieldAccessorTable; } - } - - public const int WritesFieldNumber = 10; - private pbc::PopsicleList writes_ = new pbc::PopsicleList(); - public scg::IList WritesList { - get { return writes_; } - } - public int WritesCount { - get { return writes_.Count; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetWrites(int index) { - return writes_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in WritesList) { - output.WriteMessage(10, element); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in WritesList) { - size += pb::CodedOutputStream.ComputeMessageSize(10, element); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static WriteSet ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static WriteSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static WriteSet ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static WriteSet ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static WriteSet ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static WriteSet ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static WriteSet ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static WriteSet ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static WriteSet ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static WriteSet 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(WriteSet prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - WriteSet result = new WriteSet(); - - protected override WriteSet MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new WriteSet(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.WriteSet.Descriptor; } - } - - public override WriteSet DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.WriteSet.DefaultInstance; } - } - - public override WriteSet BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.writes_.MakeReadOnly(); - WriteSet returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is WriteSet) { - return MergeFrom((WriteSet) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(WriteSet other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.WriteSet.DefaultInstance) return this; - if (other.writes_.Count != 0) { - base.AddRange(other.writes_, result.writes_); - } - 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 82: { - global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder subBuilder = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddWrites(subBuilder.BuildPartial()); - break; - } - } - } - } - - - public pbc::IPopsicleList WritesList { - get { return result.writes_; } - } - public int WritesCount { - get { return result.WritesCount; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetWrites(int index) { - return result.GetWrites(index); - } - public Builder SetWrites(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.writes_[index] = value; - return this; - } - public Builder SetWrites(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.writes_[index] = builderForValue.Build(); - return this; - } - public Builder AddWrites(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.writes_.Add(value); - return this; - } - public Builder AddWrites(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.writes_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeWrites(scg::IEnumerable values) { - base.AddRange(values, result.writes_); - return this; - } - public Builder ClearWrites() { - result.writes_.Clear(); - return this; - } - } - static WriteSet() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - public sealed partial class ReadWriteSet : pb::GeneratedMessage { - private static readonly ReadWriteSet defaultInstance = new Builder().BuildPartial(); - public static ReadWriteSet DefaultInstance { - get { return defaultInstance; } - } - - public override ReadWriteSet DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override ReadWriteSet ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadWriteSet__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_ReadWriteSet__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum ReadWriteSetOptions { - RETURN_READ_NAMES = 1, - } - - } - #endregion - - public const int ReadsFieldNumber = 9; - private pbc::PopsicleList reads_ = new pbc::PopsicleList(); - public scg::IList ReadsList { - get { return reads_; } - } - public int ReadsCount { - get { return reads_.Count; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return reads_[index]; - } - - public const int WritesFieldNumber = 10; - private pbc::PopsicleList writes_ = new pbc::PopsicleList(); - public scg::IList WritesList { - get { return writes_; } - } - public int WritesCount { - get { return writes_.Count; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetWrites(int index) { - return writes_[index]; - } - - public const int OptionsFieldNumber = 14; - private bool hasOptions; - private ulong options_ = 0UL; - public bool HasOptions { - get { return hasOptions; } - } - [global::System.CLSCompliant(false)] - public ulong Options { - get { return options_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - output.WriteMessage(9, element); - } - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in WritesList) { - output.WriteMessage(10, element); - } - if (HasOptions) { - output.WriteUInt64(14, Options); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - size += pb::CodedOutputStream.ComputeMessageSize(9, element); - } - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in WritesList) { - size += pb::CodedOutputStream.ComputeMessageSize(10, element); - } - if (HasOptions) { - size += pb::CodedOutputStream.ComputeUInt64Size(14, Options); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static ReadWriteSet ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ReadWriteSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ReadWriteSet ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ReadWriteSet ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ReadWriteSet ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ReadWriteSet ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static ReadWriteSet ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static ReadWriteSet ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static ReadWriteSet ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ReadWriteSet 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(ReadWriteSet prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - ReadWriteSet result = new ReadWriteSet(); - - protected override ReadWriteSet MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new ReadWriteSet(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.ReadWriteSet.Descriptor; } - } - - public override ReadWriteSet DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.ReadWriteSet.DefaultInstance; } - } - - public override ReadWriteSet BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.reads_.MakeReadOnly(); - result.writes_.MakeReadOnly(); - ReadWriteSet returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is ReadWriteSet) { - return MergeFrom((ReadWriteSet) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(ReadWriteSet other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.ReadWriteSet.DefaultInstance) return this; - if (other.reads_.Count != 0) { - base.AddRange(other.reads_, result.reads_); - } - if (other.writes_.Count != 0) { - base.AddRange(other.writes_, result.writes_); - } - if (other.HasOptions) { - Options = other.Options; - } - 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 74: { - global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder subBuilder = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddReads(subBuilder.BuildPartial()); - break; - } - case 82: { - global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder subBuilder = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddWrites(subBuilder.BuildPartial()); - break; - } - case 112: { - Options = input.ReadUInt64(); - break; - } - } - } - } - - - public pbc::IPopsicleList ReadsList { - get { return result.reads_; } - } - public int ReadsCount { - get { return result.ReadsCount; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return result.GetReads(index); - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_[index] = value; - return this; - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_[index] = builderForValue.Build(); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_.Add(value); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeReads(scg::IEnumerable values) { - base.AddRange(values, result.reads_); - return this; - } - public Builder ClearReads() { - result.reads_.Clear(); - return this; - } - - public pbc::IPopsicleList WritesList { - get { return result.writes_; } - } - public int WritesCount { - get { return result.WritesCount; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetWrites(int index) { - return result.GetWrites(index); - } - public Builder SetWrites(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.writes_[index] = value; - return this; - } - public Builder SetWrites(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.writes_[index] = builderForValue.Build(); - return this; - } - public Builder AddWrites(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.writes_.Add(value); - return this; - } - public Builder AddWrites(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.writes_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeWrites(scg::IEnumerable values) { - base.AddRange(values, result.writes_); - return this; - } - public Builder ClearWrites() { - result.writes_.Clear(); - return this; - } - - public bool HasOptions { - get { return result.HasOptions; } - } - [global::System.CLSCompliant(false)] - public ulong Options { - get { return result.Options; } - set { SetOptions(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetOptions(ulong value) { - result.hasOptions = true; - result.options_ = value; - return this; - } - public Builder ClearOptions() { - result.hasOptions = false; - result.options_ = 0UL; - return this; - } - } - static ReadWriteSet() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - public sealed partial class Minitransaction : pb::GeneratedMessage { - private static readonly Minitransaction defaultInstance = new Builder().BuildPartial(); - public static Minitransaction DefaultInstance { - get { return defaultInstance; } - } - - public override Minitransaction DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override Minitransaction ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Minitransaction__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Minitransaction__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum TransactionOptions { - RETURN_READ_NAMES = 1, - } - - } - #endregion - - public const int ReadsFieldNumber = 9; - private pbc::PopsicleList reads_ = new pbc::PopsicleList(); - public scg::IList ReadsList { - get { return reads_; } - } - public int ReadsCount { - get { return reads_.Count; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return reads_[index]; - } - - public const int WritesFieldNumber = 10; - private pbc::PopsicleList writes_ = new pbc::PopsicleList(); - public scg::IList WritesList { - get { return writes_; } - } - public int WritesCount { - get { return writes_.Count; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetWrites(int index) { - return writes_[index]; - } - - public const int ComparesFieldNumber = 11; - private pbc::PopsicleList compares_ = new pbc::PopsicleList(); - public scg::IList ComparesList { - get { return compares_; } - } - public int ComparesCount { - get { return compares_.Count; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement GetCompares(int index) { - return compares_[index]; - } - - public const int OptionsFieldNumber = 14; - private bool hasOptions; - private ulong options_ = 0UL; - public bool HasOptions { - get { return hasOptions; } - } - [global::System.CLSCompliant(false)] - public ulong Options { - get { return options_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - output.WriteMessage(9, element); - } - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in WritesList) { - output.WriteMessage(10, element); - } - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement element in ComparesList) { - output.WriteMessage(11, element); - } - if (HasOptions) { - output.WriteUInt64(14, Options); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - size += pb::CodedOutputStream.ComputeMessageSize(9, element); - } - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in WritesList) { - size += pb::CodedOutputStream.ComputeMessageSize(10, element); - } - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement element in ComparesList) { - size += pb::CodedOutputStream.ComputeMessageSize(11, element); - } - if (HasOptions) { - size += pb::CodedOutputStream.ComputeUInt64Size(14, Options); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static Minitransaction ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static Minitransaction ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static Minitransaction ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static Minitransaction ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static Minitransaction ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static Minitransaction ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static Minitransaction ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static Minitransaction ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static Minitransaction ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static Minitransaction 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(Minitransaction prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - Minitransaction result = new Minitransaction(); - - protected override Minitransaction MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new Minitransaction(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Minitransaction.Descriptor; } - } - - public override Minitransaction DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Minitransaction.DefaultInstance; } - } - - public override Minitransaction BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.reads_.MakeReadOnly(); - result.writes_.MakeReadOnly(); - result.compares_.MakeReadOnly(); - Minitransaction returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is Minitransaction) { - return MergeFrom((Minitransaction) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(Minitransaction other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.Minitransaction.DefaultInstance) return this; - if (other.reads_.Count != 0) { - base.AddRange(other.reads_, result.reads_); - } - if (other.writes_.Count != 0) { - base.AddRange(other.writes_, result.writes_); - } - if (other.compares_.Count != 0) { - base.AddRange(other.compares_, result.compares_); - } - if (other.HasOptions) { - Options = other.Options; - } - 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 74: { - global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder subBuilder = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddReads(subBuilder.BuildPartial()); - break; - } - case 82: { - global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder subBuilder = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddWrites(subBuilder.BuildPartial()); - break; - } - case 90: { - global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Builder subBuilder = global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddCompares(subBuilder.BuildPartial()); - break; - } - case 112: { - Options = input.ReadUInt64(); - break; - } - } - } - } - - - public pbc::IPopsicleList ReadsList { - get { return result.reads_; } - } - public int ReadsCount { - get { return result.ReadsCount; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return result.GetReads(index); - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_[index] = value; - return this; - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_[index] = builderForValue.Build(); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_.Add(value); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeReads(scg::IEnumerable values) { - base.AddRange(values, result.reads_); - return this; - } - public Builder ClearReads() { - result.reads_.Clear(); - return this; - } - - public pbc::IPopsicleList WritesList { - get { return result.writes_; } - } - public int WritesCount { - get { return result.WritesCount; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetWrites(int index) { - return result.GetWrites(index); - } - public Builder SetWrites(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.writes_[index] = value; - return this; - } - public Builder SetWrites(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.writes_[index] = builderForValue.Build(); - return this; - } - public Builder AddWrites(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.writes_.Add(value); - return this; - } - public Builder AddWrites(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.writes_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeWrites(scg::IEnumerable values) { - base.AddRange(values, result.writes_); - return this; - } - public Builder ClearWrites() { - result.writes_.Clear(); - return this; - } - - public pbc::IPopsicleList ComparesList { - get { return result.compares_; } - } - public int ComparesCount { - get { return result.ComparesCount; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement GetCompares(int index) { - return result.GetCompares(index); - } - public Builder SetCompares(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.compares_[index] = value; - return this; - } - public Builder SetCompares(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.compares_[index] = builderForValue.Build(); - return this; - } - public Builder AddCompares(global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.compares_.Add(value); - return this; - } - public Builder AddCompares(global::Sirikata.Persistence.Protocol._PBJ_Internal.CompareElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.compares_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeCompares(scg::IEnumerable values) { - base.AddRange(values, result.compares_); - return this; - } - public Builder ClearCompares() { - result.compares_.Clear(); - return this; - } - - public bool HasOptions { - get { return result.HasOptions; } - } - [global::System.CLSCompliant(false)] - public ulong Options { - get { return result.Options; } - set { SetOptions(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetOptions(ulong value) { - result.hasOptions = true; - result.options_ = value; - return this; - } - public Builder ClearOptions() { - result.hasOptions = false; - result.options_ = 0UL; - return this; - } - } - static Minitransaction() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - public sealed partial class Response : pb::GeneratedMessage { - private static readonly Response defaultInstance = new Builder().BuildPartial(); - public static Response DefaultInstance { - get { return defaultInstance; } - } - - public override Response DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override Response ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Response__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.internal__static_Sirikata_Persistence_Protocol__PBJ_Internal_Response__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum ReturnStatus { - SUCCESS = 0, - DATABASE_LOCKED = 3, - KEY_MISSING = 4, - COMPARISON_FAILED = 5, - INTERNAL_ERROR = 6, - } - - } - #endregion - - public const int ReadsFieldNumber = 9; - private pbc::PopsicleList reads_ = new pbc::PopsicleList(); - public scg::IList ReadsList { - get { return reads_; } - } - public int ReadsCount { - get { return reads_.Count; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return reads_[index]; - } - - public const int ReturnStatusFieldNumber = 15; - private bool hasReturnStatus; - private global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.Types.ReturnStatus returnStatus_ = global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.Types.ReturnStatus.SUCCESS; - public bool HasReturnStatus { - get { return hasReturnStatus; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.Types.ReturnStatus ReturnStatus { - get { return returnStatus_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - output.WriteMessage(9, element); - } - if (HasReturnStatus) { - output.WriteEnum(15, (int) ReturnStatus); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - foreach (global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement element in ReadsList) { - size += pb::CodedOutputStream.ComputeMessageSize(9, element); - } - if (HasReturnStatus) { - size += pb::CodedOutputStream.ComputeEnumSize(15, (int) ReturnStatus); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static Response ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static Response ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static Response ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static Response ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static Response ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static Response ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static Response ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static Response ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static Response ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static Response 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(Response prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - Response result = new Response(); - - protected override Response MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new Response(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.Descriptor; } - } - - public override Response DefaultInstanceForType { - get { return global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.DefaultInstance; } - } - - public override Response BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.reads_.MakeReadOnly(); - Response returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is Response) { - return MergeFrom((Response) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(Response other) { - if (other == global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.DefaultInstance) return this; - if (other.reads_.Count != 0) { - base.AddRange(other.reads_, result.reads_); - } - 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 74: { - global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder subBuilder = global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddReads(subBuilder.BuildPartial()); - break; - } - case 120: { - int rawValue = input.ReadEnum(); - if (!global::System.Enum.IsDefined(typeof(global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.Types.ReturnStatus), rawValue)) { - if (unknownFields == null) { - unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); - } - unknownFields.MergeVarintField(15, (ulong) rawValue); - } else { - ReturnStatus = (global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.Types.ReturnStatus) rawValue; - } - break; - } - } - } - } - - - public pbc::IPopsicleList ReadsList { - get { return result.reads_; } - } - public int ReadsCount { - get { return result.ReadsCount; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement GetReads(int index) { - return result.GetReads(index); - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_[index] = value; - return this; - } - public Builder SetReads(int index, global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_[index] = builderForValue.Build(); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.reads_.Add(value); - return this; - } - public Builder AddReads(global::Sirikata.Persistence.Protocol._PBJ_Internal.StorageElement.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.reads_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeReads(scg::IEnumerable values) { - base.AddRange(values, result.reads_); - return this; - } - public Builder ClearReads() { - result.reads_.Clear(); - return this; - } - - public bool HasReturnStatus { - get { return result.HasReturnStatus; } - } - public global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.Types.ReturnStatus ReturnStatus { - get { return result.ReturnStatus; } - set { SetReturnStatus(value); } - } - public Builder SetReturnStatus(global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.Types.ReturnStatus value) { - result.hasReturnStatus = true; - result.returnStatus_ = value; - return this; - } - public Builder ClearReturnStatus() { - result.hasReturnStatus = false; - result.returnStatus_ = global::Sirikata.Persistence.Protocol._PBJ_Internal.Response.Types.ReturnStatus.SUCCESS; - return this; - } - } - static Response() { - object.ReferenceEquals(global::Sirikata.Persistence.Protocol._PBJ_Internal.Persistence.Descriptor, null); - } - } - - #endregion - -} diff --git a/OpenSim/Client/Sirikata/Protocol/Persistence.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Persistence.pbj.cs deleted file mode 100644 index 196b0b9527..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Persistence.pbj.cs +++ /dev/null @@ -1,1543 +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.Persistence.Protocol { - public class StorageKey : PBJ.IMessage { - protected _PBJ_Internal.StorageKey super; - public _PBJ_Internal.StorageKey _PBJSuper{ get { return super;} } - public StorageKey() { - super=new _PBJ_Internal.StorageKey(); - } - public StorageKey(_PBJ_Internal.StorageKey reference) { - super=reference; - } - public static StorageKey defaultInstance= new StorageKey (_PBJ_Internal.StorageKey.DefaultInstance); - public static StorageKey DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.StorageKey.Descriptor; } } - public static class Types { - } - 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 ObjectUuidFieldTag=9; - public bool HasObjectUuid{ get {return super.HasObjectUuid&&PBJ._PBJ.ValidateUuid(super.ObjectUuid);} } - public PBJ.UUID ObjectUuid{ get { - if (HasObjectUuid) { - return PBJ._PBJ.CastUuid(super.ObjectUuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int FieldIdFieldTag=10; - public bool HasFieldId{ get {return super.HasFieldId&&PBJ._PBJ.ValidateUint64(super.FieldId);} } - public ulong FieldId{ get { - if (HasFieldId) { - return PBJ._PBJ.CastUint64(super.FieldId); - } else { - return PBJ._PBJ.CastUint64(); - } - } - } - public const int FieldNameFieldTag=11; - public bool HasFieldName{ get {return super.HasFieldName&&PBJ._PBJ.ValidateString(super.FieldName);} } - public string FieldName{ get { - if (HasFieldName) { - return PBJ._PBJ.CastString(super.FieldName); - } 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(StorageKey prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static StorageKey ParseFrom(pb::ByteString data) { - return new StorageKey(_PBJ_Internal.StorageKey.ParseFrom(data)); - } - public static StorageKey ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new StorageKey(_PBJ_Internal.StorageKey.ParseFrom(data,er)); - } - public static StorageKey ParseFrom(byte[] data) { - return new StorageKey(_PBJ_Internal.StorageKey.ParseFrom(data)); - } - public static StorageKey ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new StorageKey(_PBJ_Internal.StorageKey.ParseFrom(data,er)); - } - public static StorageKey ParseFrom(global::System.IO.Stream data) { - return new StorageKey(_PBJ_Internal.StorageKey.ParseFrom(data)); - } - public static StorageKey ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new StorageKey(_PBJ_Internal.StorageKey.ParseFrom(data,er)); - } - public static StorageKey ParseFrom(pb::CodedInputStream data) { - return new StorageKey(_PBJ_Internal.StorageKey.ParseFrom(data)); - } - public static StorageKey ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new StorageKey(_PBJ_Internal.StorageKey.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.StorageKey.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.StorageKey.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.StorageKey.Builder();} - public Builder(_PBJ_Internal.StorageKey.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(StorageKey prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public StorageKey BuildPartial() {return new StorageKey(super.BuildPartial());} - public StorageKey Build() {if (_HasAllPBJFields) return new StorageKey(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return StorageKey.Descriptor; } } - public Builder ClearObjectUuid() { super.ClearObjectUuid();return this;} - public const int ObjectUuidFieldTag=9; - public bool HasObjectUuid{ get {return super.HasObjectUuid&&PBJ._PBJ.ValidateUuid(super.ObjectUuid);} } - public PBJ.UUID ObjectUuid{ get { - if (HasObjectUuid) { - return PBJ._PBJ.CastUuid(super.ObjectUuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.ObjectUuid=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearFieldId() { super.ClearFieldId();return this;} - public const int FieldIdFieldTag=10; - public bool HasFieldId{ get {return super.HasFieldId&&PBJ._PBJ.ValidateUint64(super.FieldId);} } - public ulong FieldId{ get { - if (HasFieldId) { - return PBJ._PBJ.CastUint64(super.FieldId); - } else { - return PBJ._PBJ.CastUint64(); - } - } - set { - super.FieldId=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearFieldName() { super.ClearFieldName();return this;} - public const int FieldNameFieldTag=11; - public bool HasFieldName{ get {return super.HasFieldName&&PBJ._PBJ.ValidateString(super.FieldName);} } - public string FieldName{ get { - if (HasFieldName) { - return PBJ._PBJ.CastString(super.FieldName); - } else { - return PBJ._PBJ.CastString(); - } - } - set { - super.FieldName=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Persistence.Protocol { - public class StorageValue : PBJ.IMessage { - protected _PBJ_Internal.StorageValue super; - public _PBJ_Internal.StorageValue _PBJSuper{ get { return super;} } - public StorageValue() { - super=new _PBJ_Internal.StorageValue(); - } - public StorageValue(_PBJ_Internal.StorageValue reference) { - super=reference; - } - public static StorageValue defaultInstance= new StorageValue (_PBJ_Internal.StorageValue.DefaultInstance); - public static StorageValue DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.StorageValue.Descriptor; } } - public static class Types { - } - 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 DataFieldTag=12; - public bool HasData{ get {return super.HasData&&PBJ._PBJ.ValidateBytes(super.Data);} } - public pb::ByteString Data{ get { - if (HasData) { - return PBJ._PBJ.CastBytes(super.Data); - } else { - return PBJ._PBJ.CastBytes(); - } - } - } - 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(StorageValue prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static StorageValue ParseFrom(pb::ByteString data) { - return new StorageValue(_PBJ_Internal.StorageValue.ParseFrom(data)); - } - public static StorageValue ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new StorageValue(_PBJ_Internal.StorageValue.ParseFrom(data,er)); - } - public static StorageValue ParseFrom(byte[] data) { - return new StorageValue(_PBJ_Internal.StorageValue.ParseFrom(data)); - } - public static StorageValue ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new StorageValue(_PBJ_Internal.StorageValue.ParseFrom(data,er)); - } - public static StorageValue ParseFrom(global::System.IO.Stream data) { - return new StorageValue(_PBJ_Internal.StorageValue.ParseFrom(data)); - } - public static StorageValue ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new StorageValue(_PBJ_Internal.StorageValue.ParseFrom(data,er)); - } - public static StorageValue ParseFrom(pb::CodedInputStream data) { - return new StorageValue(_PBJ_Internal.StorageValue.ParseFrom(data)); - } - public static StorageValue ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new StorageValue(_PBJ_Internal.StorageValue.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.StorageValue.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.StorageValue.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.StorageValue.Builder();} - public Builder(_PBJ_Internal.StorageValue.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(StorageValue prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public StorageValue BuildPartial() {return new StorageValue(super.BuildPartial());} - public StorageValue Build() {if (_HasAllPBJFields) return new StorageValue(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return StorageValue.Descriptor; } } - public Builder ClearData() { super.ClearData();return this;} - public const int DataFieldTag=12; - public bool HasData{ get {return super.HasData&&PBJ._PBJ.ValidateBytes(super.Data);} } - public pb::ByteString Data{ get { - if (HasData) { - return PBJ._PBJ.CastBytes(super.Data); - } else { - return PBJ._PBJ.CastBytes(); - } - } - set { - super.Data=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Persistence.Protocol { - public class StorageElement : PBJ.IMessage { - protected _PBJ_Internal.StorageElement super; - public _PBJ_Internal.StorageElement _PBJSuper{ get { return super;} } - public StorageElement() { - super=new _PBJ_Internal.StorageElement(); - } - public StorageElement(_PBJ_Internal.StorageElement reference) { - super=reference; - } - public static StorageElement defaultInstance= new StorageElement (_PBJ_Internal.StorageElement.DefaultInstance); - public static StorageElement DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.StorageElement.Descriptor; } } - public static class Types { - public enum ReturnStatus { - KEY_MISSING=_PBJ_Internal.StorageElement.Types.ReturnStatus.KEY_MISSING, - INTERNAL_ERROR=_PBJ_Internal.StorageElement.Types.ReturnStatus.INTERNAL_ERROR - }; - } - 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 ObjectUuidFieldTag=9; - public bool HasObjectUuid{ get {return super.HasObjectUuid&&PBJ._PBJ.ValidateUuid(super.ObjectUuid);} } - public PBJ.UUID ObjectUuid{ get { - if (HasObjectUuid) { - return PBJ._PBJ.CastUuid(super.ObjectUuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int FieldIdFieldTag=10; - public bool HasFieldId{ get {return super.HasFieldId&&PBJ._PBJ.ValidateUint64(super.FieldId);} } - public ulong FieldId{ get { - if (HasFieldId) { - return PBJ._PBJ.CastUint64(super.FieldId); - } else { - return PBJ._PBJ.CastUint64(); - } - } - } - public const int FieldNameFieldTag=11; - public bool HasFieldName{ get {return super.HasFieldName&&PBJ._PBJ.ValidateString(super.FieldName);} } - public string FieldName{ get { - if (HasFieldName) { - return PBJ._PBJ.CastString(super.FieldName); - } else { - return PBJ._PBJ.CastString(); - } - } - } - public const int DataFieldTag=12; - public bool HasData{ get {return super.HasData&&PBJ._PBJ.ValidateBytes(super.Data);} } - public pb::ByteString Data{ get { - if (HasData) { - return PBJ._PBJ.CastBytes(super.Data); - } else { - return PBJ._PBJ.CastBytes(); - } - } - } - public const int IndexFieldTag=13; - public bool HasIndex{ get {return super.HasIndex&&PBJ._PBJ.ValidateInt32(super.Index);} } - public int Index{ get { - if (HasIndex) { - return PBJ._PBJ.CastInt32(super.Index); - } else { - return PBJ._PBJ.CastInt32(); - } - } - } - public const int ReturnStatusFieldTag=15; - 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(StorageElement prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static StorageElement ParseFrom(pb::ByteString data) { - return new StorageElement(_PBJ_Internal.StorageElement.ParseFrom(data)); - } - public static StorageElement ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new StorageElement(_PBJ_Internal.StorageElement.ParseFrom(data,er)); - } - public static StorageElement ParseFrom(byte[] data) { - return new StorageElement(_PBJ_Internal.StorageElement.ParseFrom(data)); - } - public static StorageElement ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new StorageElement(_PBJ_Internal.StorageElement.ParseFrom(data,er)); - } - public static StorageElement ParseFrom(global::System.IO.Stream data) { - return new StorageElement(_PBJ_Internal.StorageElement.ParseFrom(data)); - } - public static StorageElement ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new StorageElement(_PBJ_Internal.StorageElement.ParseFrom(data,er)); - } - public static StorageElement ParseFrom(pb::CodedInputStream data) { - return new StorageElement(_PBJ_Internal.StorageElement.ParseFrom(data)); - } - public static StorageElement ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new StorageElement(_PBJ_Internal.StorageElement.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.StorageElement.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.StorageElement.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.StorageElement.Builder();} - public Builder(_PBJ_Internal.StorageElement.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(StorageElement prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public StorageElement BuildPartial() {return new StorageElement(super.BuildPartial());} - public StorageElement Build() {if (_HasAllPBJFields) return new StorageElement(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return StorageElement.Descriptor; } } - public Builder ClearObjectUuid() { super.ClearObjectUuid();return this;} - public const int ObjectUuidFieldTag=9; - public bool HasObjectUuid{ get {return super.HasObjectUuid&&PBJ._PBJ.ValidateUuid(super.ObjectUuid);} } - public PBJ.UUID ObjectUuid{ get { - if (HasObjectUuid) { - return PBJ._PBJ.CastUuid(super.ObjectUuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.ObjectUuid=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearFieldId() { super.ClearFieldId();return this;} - public const int FieldIdFieldTag=10; - public bool HasFieldId{ get {return super.HasFieldId&&PBJ._PBJ.ValidateUint64(super.FieldId);} } - public ulong FieldId{ get { - if (HasFieldId) { - return PBJ._PBJ.CastUint64(super.FieldId); - } else { - return PBJ._PBJ.CastUint64(); - } - } - set { - super.FieldId=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearFieldName() { super.ClearFieldName();return this;} - public const int FieldNameFieldTag=11; - public bool HasFieldName{ get {return super.HasFieldName&&PBJ._PBJ.ValidateString(super.FieldName);} } - public string FieldName{ get { - if (HasFieldName) { - return PBJ._PBJ.CastString(super.FieldName); - } else { - return PBJ._PBJ.CastString(); - } - } - set { - super.FieldName=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearData() { super.ClearData();return this;} - public const int DataFieldTag=12; - public bool HasData{ get {return super.HasData&&PBJ._PBJ.ValidateBytes(super.Data);} } - public pb::ByteString Data{ get { - if (HasData) { - return PBJ._PBJ.CastBytes(super.Data); - } else { - return PBJ._PBJ.CastBytes(); - } - } - set { - super.Data=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearIndex() { super.ClearIndex();return this;} - public const int IndexFieldTag=13; - public bool HasIndex{ get {return super.HasIndex&&PBJ._PBJ.ValidateInt32(super.Index);} } - public int Index{ get { - if (HasIndex) { - return PBJ._PBJ.CastInt32(super.Index); - } else { - return PBJ._PBJ.CastInt32(); - } - } - set { - super.Index=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearReturnStatus() { super.ClearReturnStatus();return this;} - public const int ReturnStatusFieldTag=15; - 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.StorageElement.Types.ReturnStatus)value); - } - } - } - } -} -namespace Sirikata.Persistence.Protocol { - public class CompareElement : PBJ.IMessage { - protected _PBJ_Internal.CompareElement super; - public _PBJ_Internal.CompareElement _PBJSuper{ get { return super;} } - public CompareElement() { - super=new _PBJ_Internal.CompareElement(); - } - public CompareElement(_PBJ_Internal.CompareElement reference) { - super=reference; - } - public static CompareElement defaultInstance= new CompareElement (_PBJ_Internal.CompareElement.DefaultInstance); - public static CompareElement DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.CompareElement.Descriptor; } } - public static class Types { - public enum COMPARATOR { - EQUAL=_PBJ_Internal.CompareElement.Types.COMPARATOR.EQUAL, - NEQUAL=_PBJ_Internal.CompareElement.Types.COMPARATOR.NEQUAL - }; - } - 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 ObjectUuidFieldTag=9; - public bool HasObjectUuid{ get {return super.HasObjectUuid&&PBJ._PBJ.ValidateUuid(super.ObjectUuid);} } - public PBJ.UUID ObjectUuid{ get { - if (HasObjectUuid) { - return PBJ._PBJ.CastUuid(super.ObjectUuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int FieldIdFieldTag=10; - public bool HasFieldId{ get {return super.HasFieldId&&PBJ._PBJ.ValidateUint64(super.FieldId);} } - public ulong FieldId{ get { - if (HasFieldId) { - return PBJ._PBJ.CastUint64(super.FieldId); - } else { - return PBJ._PBJ.CastUint64(); - } - } - } - public const int FieldNameFieldTag=11; - public bool HasFieldName{ get {return super.HasFieldName&&PBJ._PBJ.ValidateString(super.FieldName);} } - public string FieldName{ get { - if (HasFieldName) { - return PBJ._PBJ.CastString(super.FieldName); - } else { - return PBJ._PBJ.CastString(); - } - } - } - public const int DataFieldTag=12; - public bool HasData{ get {return super.HasData&&PBJ._PBJ.ValidateBytes(super.Data);} } - public pb::ByteString Data{ get { - if (HasData) { - return PBJ._PBJ.CastBytes(super.Data); - } else { - return PBJ._PBJ.CastBytes(); - } - } - } - public const int ComparatorFieldTag=14; - public bool HasComparator{ get {return super.HasComparator;} } - public Types.COMPARATOR Comparator{ get { - if (HasComparator) { - return (Types.COMPARATOR)super.Comparator; - } else { - return new Types.COMPARATOR(); - } - } - } - 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(CompareElement prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static CompareElement ParseFrom(pb::ByteString data) { - return new CompareElement(_PBJ_Internal.CompareElement.ParseFrom(data)); - } - public static CompareElement ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new CompareElement(_PBJ_Internal.CompareElement.ParseFrom(data,er)); - } - public static CompareElement ParseFrom(byte[] data) { - return new CompareElement(_PBJ_Internal.CompareElement.ParseFrom(data)); - } - public static CompareElement ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new CompareElement(_PBJ_Internal.CompareElement.ParseFrom(data,er)); - } - public static CompareElement ParseFrom(global::System.IO.Stream data) { - return new CompareElement(_PBJ_Internal.CompareElement.ParseFrom(data)); - } - public static CompareElement ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new CompareElement(_PBJ_Internal.CompareElement.ParseFrom(data,er)); - } - public static CompareElement ParseFrom(pb::CodedInputStream data) { - return new CompareElement(_PBJ_Internal.CompareElement.ParseFrom(data)); - } - public static CompareElement ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new CompareElement(_PBJ_Internal.CompareElement.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.CompareElement.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.CompareElement.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.CompareElement.Builder();} - public Builder(_PBJ_Internal.CompareElement.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(CompareElement prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public CompareElement BuildPartial() {return new CompareElement(super.BuildPartial());} - public CompareElement Build() {if (_HasAllPBJFields) return new CompareElement(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return CompareElement.Descriptor; } } - public Builder ClearObjectUuid() { super.ClearObjectUuid();return this;} - public const int ObjectUuidFieldTag=9; - public bool HasObjectUuid{ get {return super.HasObjectUuid&&PBJ._PBJ.ValidateUuid(super.ObjectUuid);} } - public PBJ.UUID ObjectUuid{ get { - if (HasObjectUuid) { - return PBJ._PBJ.CastUuid(super.ObjectUuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.ObjectUuid=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearFieldId() { super.ClearFieldId();return this;} - public const int FieldIdFieldTag=10; - public bool HasFieldId{ get {return super.HasFieldId&&PBJ._PBJ.ValidateUint64(super.FieldId);} } - public ulong FieldId{ get { - if (HasFieldId) { - return PBJ._PBJ.CastUint64(super.FieldId); - } else { - return PBJ._PBJ.CastUint64(); - } - } - set { - super.FieldId=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearFieldName() { super.ClearFieldName();return this;} - public const int FieldNameFieldTag=11; - public bool HasFieldName{ get {return super.HasFieldName&&PBJ._PBJ.ValidateString(super.FieldName);} } - public string FieldName{ get { - if (HasFieldName) { - return PBJ._PBJ.CastString(super.FieldName); - } else { - return PBJ._PBJ.CastString(); - } - } - set { - super.FieldName=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearData() { super.ClearData();return this;} - public const int DataFieldTag=12; - public bool HasData{ get {return super.HasData&&PBJ._PBJ.ValidateBytes(super.Data);} } - public pb::ByteString Data{ get { - if (HasData) { - return PBJ._PBJ.CastBytes(super.Data); - } else { - return PBJ._PBJ.CastBytes(); - } - } - set { - super.Data=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearComparator() { super.ClearComparator();return this;} - public const int ComparatorFieldTag=14; - public bool HasComparator{ get {return super.HasComparator;} } - public Types.COMPARATOR Comparator{ get { - if (HasComparator) { - return (Types.COMPARATOR)super.Comparator; - } else { - return new Types.COMPARATOR(); - } - } - set { - super.Comparator=((_PBJ_Internal.CompareElement.Types.COMPARATOR)value); - } - } - } - } -} -namespace Sirikata.Persistence.Protocol { - public class StorageSet : PBJ.IMessage { - protected _PBJ_Internal.StorageSet super; - public _PBJ_Internal.StorageSet _PBJSuper{ get { return super;} } - public StorageSet() { - super=new _PBJ_Internal.StorageSet(); - } - public StorageSet(_PBJ_Internal.StorageSet reference) { - super=reference; - } - public static StorageSet defaultInstance= new StorageSet (_PBJ_Internal.StorageSet.DefaultInstance); - public static StorageSet DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.StorageSet.Descriptor; } } - public static class Types { - } - 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 ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - 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(StorageSet prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static StorageSet ParseFrom(pb::ByteString data) { - return new StorageSet(_PBJ_Internal.StorageSet.ParseFrom(data)); - } - public static StorageSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new StorageSet(_PBJ_Internal.StorageSet.ParseFrom(data,er)); - } - public static StorageSet ParseFrom(byte[] data) { - return new StorageSet(_PBJ_Internal.StorageSet.ParseFrom(data)); - } - public static StorageSet ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new StorageSet(_PBJ_Internal.StorageSet.ParseFrom(data,er)); - } - public static StorageSet ParseFrom(global::System.IO.Stream data) { - return new StorageSet(_PBJ_Internal.StorageSet.ParseFrom(data)); - } - public static StorageSet ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new StorageSet(_PBJ_Internal.StorageSet.ParseFrom(data,er)); - } - public static StorageSet ParseFrom(pb::CodedInputStream data) { - return new StorageSet(_PBJ_Internal.StorageSet.ParseFrom(data)); - } - public static StorageSet ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new StorageSet(_PBJ_Internal.StorageSet.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.StorageSet.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.StorageSet.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.StorageSet.Builder();} - public Builder(_PBJ_Internal.StorageSet.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(StorageSet prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public StorageSet BuildPartial() {return new StorageSet(super.BuildPartial());} - public StorageSet Build() {if (_HasAllPBJFields) return new StorageSet(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return StorageSet.Descriptor; } } - public Builder ClearReads() { super.ClearReads();return this;} - public Builder SetReads(int index,StorageElement value) { - super.SetReads(index,value._PBJSuper); - return this; - } - public const int ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - public Builder AddReads(StorageElement value) { - super.AddReads(value._PBJSuper); - return this; - } - } - } -} -namespace Sirikata.Persistence.Protocol { - public class ReadSet : PBJ.IMessage { - protected _PBJ_Internal.ReadSet super; - public _PBJ_Internal.ReadSet _PBJSuper{ get { return super;} } - public ReadSet() { - super=new _PBJ_Internal.ReadSet(); - } - public ReadSet(_PBJ_Internal.ReadSet reference) { - super=reference; - } - public static ReadSet defaultInstance= new ReadSet (_PBJ_Internal.ReadSet.DefaultInstance); - public static ReadSet DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.ReadSet.Descriptor; } } - public static class Types { - } - 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 ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - 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(ReadSet prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static ReadSet ParseFrom(pb::ByteString data) { - return new ReadSet(_PBJ_Internal.ReadSet.ParseFrom(data)); - } - public static ReadSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new ReadSet(_PBJ_Internal.ReadSet.ParseFrom(data,er)); - } - public static ReadSet ParseFrom(byte[] data) { - return new ReadSet(_PBJ_Internal.ReadSet.ParseFrom(data)); - } - public static ReadSet ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new ReadSet(_PBJ_Internal.ReadSet.ParseFrom(data,er)); - } - public static ReadSet ParseFrom(global::System.IO.Stream data) { - return new ReadSet(_PBJ_Internal.ReadSet.ParseFrom(data)); - } - public static ReadSet ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new ReadSet(_PBJ_Internal.ReadSet.ParseFrom(data,er)); - } - public static ReadSet ParseFrom(pb::CodedInputStream data) { - return new ReadSet(_PBJ_Internal.ReadSet.ParseFrom(data)); - } - public static ReadSet ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new ReadSet(_PBJ_Internal.ReadSet.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.ReadSet.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.ReadSet.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.ReadSet.Builder();} - public Builder(_PBJ_Internal.ReadSet.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(ReadSet prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public ReadSet BuildPartial() {return new ReadSet(super.BuildPartial());} - public ReadSet Build() {if (_HasAllPBJFields) return new ReadSet(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return ReadSet.Descriptor; } } - public Builder ClearReads() { super.ClearReads();return this;} - public Builder SetReads(int index,StorageElement value) { - super.SetReads(index,value._PBJSuper); - return this; - } - public const int ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - public Builder AddReads(StorageElement value) { - super.AddReads(value._PBJSuper); - return this; - } - } - } -} -namespace Sirikata.Persistence.Protocol { - public class WriteSet : PBJ.IMessage { - protected _PBJ_Internal.WriteSet super; - public _PBJ_Internal.WriteSet _PBJSuper{ get { return super;} } - public WriteSet() { - super=new _PBJ_Internal.WriteSet(); - } - public WriteSet(_PBJ_Internal.WriteSet reference) { - super=reference; - } - public static WriteSet defaultInstance= new WriteSet (_PBJ_Internal.WriteSet.DefaultInstance); - public static WriteSet DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.WriteSet.Descriptor; } } - public static class Types { - } - 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 WritesFieldTag=10; - public int WritesCount { get { return super.WritesCount;} } - public bool HasWrites(int index) {return true;} - public StorageElement Writes(int index) { - return new StorageElement(super.GetWrites(index)); - } - 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(WriteSet prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static WriteSet ParseFrom(pb::ByteString data) { - return new WriteSet(_PBJ_Internal.WriteSet.ParseFrom(data)); - } - public static WriteSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new WriteSet(_PBJ_Internal.WriteSet.ParseFrom(data,er)); - } - public static WriteSet ParseFrom(byte[] data) { - return new WriteSet(_PBJ_Internal.WriteSet.ParseFrom(data)); - } - public static WriteSet ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new WriteSet(_PBJ_Internal.WriteSet.ParseFrom(data,er)); - } - public static WriteSet ParseFrom(global::System.IO.Stream data) { - return new WriteSet(_PBJ_Internal.WriteSet.ParseFrom(data)); - } - public static WriteSet ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new WriteSet(_PBJ_Internal.WriteSet.ParseFrom(data,er)); - } - public static WriteSet ParseFrom(pb::CodedInputStream data) { - return new WriteSet(_PBJ_Internal.WriteSet.ParseFrom(data)); - } - public static WriteSet ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new WriteSet(_PBJ_Internal.WriteSet.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.WriteSet.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.WriteSet.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.WriteSet.Builder();} - public Builder(_PBJ_Internal.WriteSet.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(WriteSet prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public WriteSet BuildPartial() {return new WriteSet(super.BuildPartial());} - public WriteSet Build() {if (_HasAllPBJFields) return new WriteSet(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return WriteSet.Descriptor; } } - public Builder ClearWrites() { super.ClearWrites();return this;} - public Builder SetWrites(int index,StorageElement value) { - super.SetWrites(index,value._PBJSuper); - return this; - } - public const int WritesFieldTag=10; - public int WritesCount { get { return super.WritesCount;} } - public bool HasWrites(int index) {return true;} - public StorageElement Writes(int index) { - return new StorageElement(super.GetWrites(index)); - } - public Builder AddWrites(StorageElement value) { - super.AddWrites(value._PBJSuper); - return this; - } - } - } -} -namespace Sirikata.Persistence.Protocol { - public class ReadWriteSet : PBJ.IMessage { - protected _PBJ_Internal.ReadWriteSet super; - public _PBJ_Internal.ReadWriteSet _PBJSuper{ get { return super;} } - public ReadWriteSet() { - super=new _PBJ_Internal.ReadWriteSet(); - } - public ReadWriteSet(_PBJ_Internal.ReadWriteSet reference) { - super=reference; - } - public static ReadWriteSet defaultInstance= new ReadWriteSet (_PBJ_Internal.ReadWriteSet.DefaultInstance); - public static ReadWriteSet DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.ReadWriteSet.Descriptor; } } - public static class Types { - public enum ReadWriteSetOptions { - RETURN_READ_NAMES=_PBJ_Internal.ReadWriteSet.Types.ReadWriteSetOptions.RETURN_READ_NAMES - }; - } - 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 ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - public const int WritesFieldTag=10; - public int WritesCount { get { return super.WritesCount;} } - public bool HasWrites(int index) {return true;} - public StorageElement Writes(int index) { - return new StorageElement(super.GetWrites(index)); - } - public const int OptionsFieldTag=14; - public bool HasOptions { get { - if (!super.HasOptions) return false; - return PBJ._PBJ.ValidateFlags(super.Options,(ulong)Types.ReadWriteSetOptions.RETURN_READ_NAMES); - } } - public ulong Options{ get { - if (HasOptions) { - return (ulong)PBJ._PBJ.CastFlags(super.Options,(ulong)Types.ReadWriteSetOptions.RETURN_READ_NAMES); - } else { - return (ulong)PBJ._PBJ.CastFlags((ulong)Types.ReadWriteSetOptions.RETURN_READ_NAMES); - } - } - } - 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(ReadWriteSet prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static ReadWriteSet ParseFrom(pb::ByteString data) { - return new ReadWriteSet(_PBJ_Internal.ReadWriteSet.ParseFrom(data)); - } - public static ReadWriteSet ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new ReadWriteSet(_PBJ_Internal.ReadWriteSet.ParseFrom(data,er)); - } - public static ReadWriteSet ParseFrom(byte[] data) { - return new ReadWriteSet(_PBJ_Internal.ReadWriteSet.ParseFrom(data)); - } - public static ReadWriteSet ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new ReadWriteSet(_PBJ_Internal.ReadWriteSet.ParseFrom(data,er)); - } - public static ReadWriteSet ParseFrom(global::System.IO.Stream data) { - return new ReadWriteSet(_PBJ_Internal.ReadWriteSet.ParseFrom(data)); - } - public static ReadWriteSet ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new ReadWriteSet(_PBJ_Internal.ReadWriteSet.ParseFrom(data,er)); - } - public static ReadWriteSet ParseFrom(pb::CodedInputStream data) { - return new ReadWriteSet(_PBJ_Internal.ReadWriteSet.ParseFrom(data)); - } - public static ReadWriteSet ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new ReadWriteSet(_PBJ_Internal.ReadWriteSet.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.ReadWriteSet.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.ReadWriteSet.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.ReadWriteSet.Builder();} - public Builder(_PBJ_Internal.ReadWriteSet.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(ReadWriteSet prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public ReadWriteSet BuildPartial() {return new ReadWriteSet(super.BuildPartial());} - public ReadWriteSet Build() {if (_HasAllPBJFields) return new ReadWriteSet(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return ReadWriteSet.Descriptor; } } - public Builder ClearReads() { super.ClearReads();return this;} - public Builder SetReads(int index,StorageElement value) { - super.SetReads(index,value._PBJSuper); - return this; - } - public const int ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - public Builder AddReads(StorageElement value) { - super.AddReads(value._PBJSuper); - return this; - } - public Builder ClearWrites() { super.ClearWrites();return this;} - public Builder SetWrites(int index,StorageElement value) { - super.SetWrites(index,value._PBJSuper); - return this; - } - public const int WritesFieldTag=10; - public int WritesCount { get { return super.WritesCount;} } - public bool HasWrites(int index) {return true;} - public StorageElement Writes(int index) { - return new StorageElement(super.GetWrites(index)); - } - public Builder AddWrites(StorageElement value) { - super.AddWrites(value._PBJSuper); - return this; - } - public Builder ClearOptions() { super.ClearOptions();return this;} - public const int OptionsFieldTag=14; - public bool HasOptions { get { - if (!super.HasOptions) return false; - return PBJ._PBJ.ValidateFlags(super.Options,(ulong)Types.ReadWriteSetOptions.RETURN_READ_NAMES); - } } - public ulong Options{ get { - if (HasOptions) { - return (ulong)PBJ._PBJ.CastFlags(super.Options,(ulong)Types.ReadWriteSetOptions.RETURN_READ_NAMES); - } else { - return (ulong)PBJ._PBJ.CastFlags((ulong)Types.ReadWriteSetOptions.RETURN_READ_NAMES); - } - } - set { - super.Options=((value)); - } - } - } - } -} -namespace Sirikata.Persistence.Protocol { - public class Minitransaction : PBJ.IMessage { - protected _PBJ_Internal.Minitransaction super; - public _PBJ_Internal.Minitransaction _PBJSuper{ get { return super;} } - public Minitransaction() { - super=new _PBJ_Internal.Minitransaction(); - } - public Minitransaction(_PBJ_Internal.Minitransaction reference) { - super=reference; - } - public static Minitransaction defaultInstance= new Minitransaction (_PBJ_Internal.Minitransaction.DefaultInstance); - public static Minitransaction DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.Minitransaction.Descriptor; } } - public static class Types { - public enum TransactionOptions { - RETURN_READ_NAMES=_PBJ_Internal.Minitransaction.Types.TransactionOptions.RETURN_READ_NAMES - }; - } - public static bool WithinReservedFieldTagRange(int field_tag) { - return false; - } - public static bool WithinExtensionFieldTagRange(int field_tag) { - return false; - } - public const int ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - public const int WritesFieldTag=10; - public int WritesCount { get { return super.WritesCount;} } - public bool HasWrites(int index) {return true;} - public StorageElement Writes(int index) { - return new StorageElement(super.GetWrites(index)); - } - public const int ComparesFieldTag=11; - public int ComparesCount { get { return super.ComparesCount;} } - public bool HasCompares(int index) {return true;} - public CompareElement Compares(int index) { - return new CompareElement(super.GetCompares(index)); - } - public const int OptionsFieldTag=14; - public bool HasOptions { get { - if (!super.HasOptions) return false; - return PBJ._PBJ.ValidateFlags(super.Options,(ulong)Types.TransactionOptions.RETURN_READ_NAMES); - } } - public ulong Options{ get { - if (HasOptions) { - return (ulong)PBJ._PBJ.CastFlags(super.Options,(ulong)Types.TransactionOptions.RETURN_READ_NAMES); - } else { - return (ulong)PBJ._PBJ.CastFlags((ulong)Types.TransactionOptions.RETURN_READ_NAMES); - } - } - } - 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(Minitransaction prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static Minitransaction ParseFrom(pb::ByteString data) { - return new Minitransaction(_PBJ_Internal.Minitransaction.ParseFrom(data)); - } - public static Minitransaction ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new Minitransaction(_PBJ_Internal.Minitransaction.ParseFrom(data,er)); - } - public static Minitransaction ParseFrom(byte[] data) { - return new Minitransaction(_PBJ_Internal.Minitransaction.ParseFrom(data)); - } - public static Minitransaction ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new Minitransaction(_PBJ_Internal.Minitransaction.ParseFrom(data,er)); - } - public static Minitransaction ParseFrom(global::System.IO.Stream data) { - return new Minitransaction(_PBJ_Internal.Minitransaction.ParseFrom(data)); - } - public static Minitransaction ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new Minitransaction(_PBJ_Internal.Minitransaction.ParseFrom(data,er)); - } - public static Minitransaction ParseFrom(pb::CodedInputStream data) { - return new Minitransaction(_PBJ_Internal.Minitransaction.ParseFrom(data)); - } - public static Minitransaction ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new Minitransaction(_PBJ_Internal.Minitransaction.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.Minitransaction.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.Minitransaction.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.Minitransaction.Builder();} - public Builder(_PBJ_Internal.Minitransaction.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(Minitransaction prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public Minitransaction BuildPartial() {return new Minitransaction(super.BuildPartial());} - public Minitransaction Build() {if (_HasAllPBJFields) return new Minitransaction(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return Minitransaction.Descriptor; } } - public Builder ClearReads() { super.ClearReads();return this;} - public Builder SetReads(int index,StorageElement value) { - super.SetReads(index,value._PBJSuper); - return this; - } - public const int ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - public Builder AddReads(StorageElement value) { - super.AddReads(value._PBJSuper); - return this; - } - public Builder ClearWrites() { super.ClearWrites();return this;} - public Builder SetWrites(int index,StorageElement value) { - super.SetWrites(index,value._PBJSuper); - return this; - } - public const int WritesFieldTag=10; - public int WritesCount { get { return super.WritesCount;} } - public bool HasWrites(int index) {return true;} - public StorageElement Writes(int index) { - return new StorageElement(super.GetWrites(index)); - } - public Builder AddWrites(StorageElement value) { - super.AddWrites(value._PBJSuper); - return this; - } - public Builder ClearCompares() { super.ClearCompares();return this;} - public Builder SetCompares(int index,CompareElement value) { - super.SetCompares(index,value._PBJSuper); - return this; - } - public const int ComparesFieldTag=11; - public int ComparesCount { get { return super.ComparesCount;} } - public bool HasCompares(int index) {return true;} - public CompareElement Compares(int index) { - return new CompareElement(super.GetCompares(index)); - } - public Builder AddCompares(CompareElement value) { - super.AddCompares(value._PBJSuper); - return this; - } - public Builder ClearOptions() { super.ClearOptions();return this;} - public const int OptionsFieldTag=14; - public bool HasOptions { get { - if (!super.HasOptions) return false; - return PBJ._PBJ.ValidateFlags(super.Options,(ulong)Types.TransactionOptions.RETURN_READ_NAMES); - } } - public ulong Options{ get { - if (HasOptions) { - return (ulong)PBJ._PBJ.CastFlags(super.Options,(ulong)Types.TransactionOptions.RETURN_READ_NAMES); - } else { - return (ulong)PBJ._PBJ.CastFlags((ulong)Types.TransactionOptions.RETURN_READ_NAMES); - } - } - set { - super.Options=((value)); - } - } - } - } -} -namespace Sirikata.Persistence.Protocol { - public class Response : PBJ.IMessage { - protected _PBJ_Internal.Response super; - public _PBJ_Internal.Response _PBJSuper{ get { return super;} } - public Response() { - super=new _PBJ_Internal.Response(); - } - public Response(_PBJ_Internal.Response reference) { - super=reference; - } - public static Response defaultInstance= new Response (_PBJ_Internal.Response.DefaultInstance); - public static Response DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.Response.Descriptor; } } - public static class Types { - public enum ReturnStatus { - SUCCESS=_PBJ_Internal.Response.Types.ReturnStatus.SUCCESS, - DATABASE_LOCKED=_PBJ_Internal.Response.Types.ReturnStatus.DATABASE_LOCKED, - KEY_MISSING=_PBJ_Internal.Response.Types.ReturnStatus.KEY_MISSING, - COMPARISON_FAILED=_PBJ_Internal.Response.Types.ReturnStatus.COMPARISON_FAILED, - INTERNAL_ERROR=_PBJ_Internal.Response.Types.ReturnStatus.INTERNAL_ERROR - }; - } - public static bool WithinReservedFieldTagRange(int field_tag) { - return false||(field_tag>=1&&field_tag<=8); - } - public static bool WithinExtensionFieldTagRange(int field_tag) { - return false; - } - public const int ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - public const int ReturnStatusFieldTag=15; - 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(Response prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static Response ParseFrom(pb::ByteString data) { - return new Response(_PBJ_Internal.Response.ParseFrom(data)); - } - public static Response ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new Response(_PBJ_Internal.Response.ParseFrom(data,er)); - } - public static Response ParseFrom(byte[] data) { - return new Response(_PBJ_Internal.Response.ParseFrom(data)); - } - public static Response ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new Response(_PBJ_Internal.Response.ParseFrom(data,er)); - } - public static Response ParseFrom(global::System.IO.Stream data) { - return new Response(_PBJ_Internal.Response.ParseFrom(data)); - } - public static Response ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new Response(_PBJ_Internal.Response.ParseFrom(data,er)); - } - public static Response ParseFrom(pb::CodedInputStream data) { - return new Response(_PBJ_Internal.Response.ParseFrom(data)); - } - public static Response ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new Response(_PBJ_Internal.Response.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.Response.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.Response.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.Response.Builder();} - public Builder(_PBJ_Internal.Response.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(Response prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public Response BuildPartial() {return new Response(super.BuildPartial());} - public Response Build() {if (_HasAllPBJFields) return new Response(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return Response.Descriptor; } } - public Builder ClearReads() { super.ClearReads();return this;} - public Builder SetReads(int index,StorageElement value) { - super.SetReads(index,value._PBJSuper); - return this; - } - public const int ReadsFieldTag=9; - public int ReadsCount { get { return super.ReadsCount;} } - public bool HasReads(int index) {return true;} - public StorageElement Reads(int index) { - return new StorageElement(super.GetReads(index)); - } - public Builder AddReads(StorageElement value) { - super.AddReads(value._PBJSuper); - return this; - } - public Builder ClearReturnStatus() { super.ClearReturnStatus();return this;} - public const int ReturnStatusFieldTag=15; - 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.Response.Types.ReturnStatus)value); - } - } - } - } -} diff --git a/OpenSim/Client/Sirikata/Protocol/Physics.cs b/OpenSim/Client/Sirikata/Protocol/Physics.cs deleted file mode 100644 index a81a6fd20b..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Physics.cs +++ /dev/null @@ -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 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 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(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(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 { - 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 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 thisPosition_ = new pbc::PopsicleList(); - public scg::IList 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 otherPosition_ = new pbc::PopsicleList(); - public scg::IList 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 thisNormal_ = new pbc::PopsicleList(); - public scg::IList 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 impulse_ = new pbc::PopsicleList(); - public scg::IList 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 { - 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 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 values) { - base.AddRange(values, result.thisPosition_); - return this; - } - public Builder ClearThisPosition() { - result.thisPosition_.Clear(); - return this; - } - - public pbc::IPopsicleList 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 values) { - base.AddRange(values, result.otherPosition_); - return this; - } - public Builder ClearOtherPosition() { - result.otherPosition_.Clear(); - return this; - } - - public pbc::IPopsicleList 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 values) { - base.AddRange(values, result.thisNormal_); - return this; - } - public Builder ClearThisNormal() { - result.thisNormal_.Clear(); - return this; - } - - public pbc::IPopsicleList 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 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 { - 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 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 { - 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 - -} diff --git a/OpenSim/Client/Sirikata/Protocol/Physics.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Physics.pbj.cs deleted file mode 100644 index 9fb5a28876..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Physics.pbj.cs +++ /dev/null @@ -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)); - } - } - } - } -} diff --git a/OpenSim/Client/Sirikata/Protocol/Sirikata.cs b/OpenSim/Client/Sirikata/Protocol/Sirikata.cs deleted file mode 100644 index 928308626f..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Sirikata.cs +++ /dev/null @@ -1,8074 +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 Sirikata { - - #region Extension registration - public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { - } - #endregion - #region Static variables - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_MessageBody__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_MessageBody__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_ReadOnlyMessage__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_ReadOnlyMessage__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_SpaceServices__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_SpaceServices__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_ObjLoc__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_ObjLoc__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_LocRequest__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_LocRequest__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_NewObj__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_NewObj__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_RetObj__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_RetObj__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_DelObj__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_DelObj__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_NewProxQuery__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_NewProxQuery__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_ProxCall__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_ProxCall__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_DelProxQuery__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_DelProxQuery__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_Vector3fProperty__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_Vector3fProperty__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_StringProperty__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_StringProperty__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_StringMapProperty__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_StringMapProperty__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_PhysicalParameters__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_PhysicalParameters__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_LightInfoProperty__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_LightInfoProperty__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_ParentProperty__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_ParentProperty__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_UUIDListProperty__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_UUIDListProperty__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_ConnectToSpace__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_ConnectToSpace__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_Protocol__PBJ_Internal_CreateObject__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_Protocol__PBJ_Internal_CreateObject__FieldAccessorTable; - #endregion - #region Descriptor - public static pbd::FileDescriptor Descriptor { - get { return descriptor; } - } - private static pbd::FileDescriptor descriptor; - - static Sirikata() { - byte[] descriptorData = global::System.Convert.FromBase64String( - "Cg5TaXJpa2F0YS5wcm90bxIfU2lyaWthdGEuUHJvdG9jb2wuX1BCSl9JbnRl" + - "cm5hbCI/CgtNZXNzYWdlQm9keRIVCg1tZXNzYWdlX25hbWVzGAkgAygJEhkK" + - "EW1lc3NhZ2VfYXJndW1lbnRzGAogAygMIroDCg9SZWFkT25seU1lc3NhZ2US" + - "FQoNc291cmNlX29iamVjdBgBIAEoDBITCgtzb3VyY2VfcG9ydBgDIAEoDRIV" + - "Cgxzb3VyY2Vfc3BhY2UYgAwgASgMEhoKEmRlc3RpbmF0aW9uX29iamVjdBgC" + - "IAEoDBIYChBkZXN0aW5hdGlvbl9wb3J0GAQgASgNEhoKEWRlc3RpbmF0aW9u" + - "X3NwYWNlGIEMIAEoDBIKCgJpZBgHIAEoAxIQCghyZXBseV9pZBgIIAEoAxJV" + - "Cg1yZXR1cm5fc3RhdHVzGIAOIAEoDjI9LlNpcmlrYXRhLlByb3RvY29sLl9Q" + - "QkpfSW50ZXJuYWwuUmVhZE9ubHlNZXNzYWdlLlJldHVyblN0YXR1cxIVCg1t" + - "ZXNzYWdlX25hbWVzGAkgAygJEhkKEW1lc3NhZ2VfYXJndW1lbnRzGAogAygM" + - "ImsKDFJldHVyblN0YXR1cxILCgdTVUNDRVNTEAASEwoPTkVUV09SS19GQUlM" + - "VVJFEAESEwoPVElNRU9VVF9GQUlMVVJFEAMSEgoOUFJPVE9DT0xfRVJST1IQ" + - "BBIQCgxQT1JUX0ZBSUxVUkUQBSLOAQoNU3BhY2VTZXJ2aWNlcxIZChFyZWdp" + - "c3RyYXRpb25fcG9ydBghIAEoDRIQCghsb2NfcG9ydBgiIAEoDRIRCglnZW9t" + - "X3BvcnQYIyABKA0SEQoJb3NlZ19wb3J0GCQgASgNEhEKCWNzZWdfcG9ydBgl" + - "IAEoDRITCgtyb3V0ZXJfcG9ydBgmIAEoDRIdChVwcmVfY29ubmVjdGlvbl9i" + - "dWZmZXIYQCABKAQSIwobbWF4X3ByZV9jb25uZWN0aW9uX21lc3NhZ2VzGEEg" + - "ASgEIsQBCgZPYmpMb2MSEQoJdGltZXN0YW1wGAIgASgGEhQKCHBvc2l0aW9u" + - "GAMgAygBQgIQARIXCgtvcmllbnRhdGlvbhgEIAMoAkICEAESFAoIdmVsb2Np" + - "dHkYBSADKAJCAhABEhsKD3JvdGF0aW9uYWxfYXhpcxgHIAMoAkICEAESFQoN" + - "YW5ndWxhcl9zcGVlZBgIIAEoAhIUCgx1cGRhdGVfZmxhZ3MYBiABKA0iGAoL" + - "VXBkYXRlRmxhZ3MSCQoFRk9SQ0UQASKFAQoKTG9jUmVxdWVzdBIYChByZXF1" + - "ZXN0ZWRfZmllbGRzGAIgASgNIl0KBkZpZWxkcxIMCghQT1NJVElPThABEg8K" + - "C09SSUVOVEFUSU9OEAISDAoIVkVMT0NJVFkQBBITCg9ST1RBVElPTkFMX0FY" + - "SVMQCBIRCg1BTkdVTEFSX1NQRUVEEBAiigEKBk5ld09iahIcChRvYmplY3Rf" + - "dXVpZF9ldmlkZW5jZRgCIAEoDBJFChRyZXF1ZXN0ZWRfb2JqZWN0X2xvYxgD" + - "IAEoCzInLlNpcmlrYXRhLlByb3RvY29sLl9QQkpfSW50ZXJuYWwuT2JqTG9j" + - "EhsKD2JvdW5kaW5nX3NwaGVyZRgEIAMoAkICEAEiegoGUmV0T2JqEhgKEG9i" + - "amVjdF9yZWZlcmVuY2UYAiABKAwSOQoIbG9jYXRpb24YAyABKAsyJy5TaXJp" + - "a2F0YS5Qcm90b2NvbC5fUEJKX0ludGVybmFsLk9iakxvYxIbCg9ib3VuZGlu" + - "Z19zcGhlcmUYBCADKAJCAhABIiIKBkRlbE9iahIYChBvYmplY3RfcmVmZXJl" + - "bmNlGAIgASgMIpoBCgxOZXdQcm94UXVlcnkSEAoIcXVlcnlfaWQYAiABKA0S" + - "EQoJc3RhdGVsZXNzGAMgASgIEhsKD3JlbGF0aXZlX2NlbnRlchgEIAMoAkIC" + - "EAESGwoPYWJzb2x1dGVfY2VudGVyGAUgAygBQgIQARISCgptYXhfcmFkaXVz" + - "GAYgASgCEhcKD21pbl9zb2xpZF9hbmdsZRgHIAEoAiLhAQoIUHJveENhbGwS" + - "EAoIcXVlcnlfaWQYAiACKA0SGAoQcHJveGltYXRlX29iamVjdBgDIAIoDBJR" + - "Cg9wcm94aW1pdHlfZXZlbnQYBCACKA4yOC5TaXJpa2F0YS5Qcm90b2NvbC5f" + - "UEJKX0ludGVybmFsLlByb3hDYWxsLlByb3hpbWl0eUV2ZW50IlYKDlByb3hp" + - "bWl0eUV2ZW50EhQKEEVYSVRFRF9QUk9YSU1JVFkQABIVChFFTlRFUkVEX1BS" + - "T1hJTUlUWRABEhcKE1NUQVRFTEVTU19QUk9YSU1JVFkQAiIgCgxEZWxQcm94" + - "UXVlcnkSEAoIcXVlcnlfaWQYAiABKA0iJQoQVmVjdG9yM2ZQcm9wZXJ0eRIR" + - "CgV2YWx1ZRgKIAMoAkICEAEiHwoOU3RyaW5nUHJvcGVydHkSDQoFdmFsdWUY" + - "CiABKAkiMQoRU3RyaW5nTWFwUHJvcGVydHkSDAoEa2V5cxgCIAMoCRIOCgZ2" + - "YWx1ZXMYAyADKAkiyQIKElBoeXNpY2FsUGFyYW1ldGVycxJGCgRtb2RlGAIg" + - "ASgOMjguU2lyaWthdGEuUHJvdG9jb2wuX1BCSl9JbnRlcm5hbC5QaHlzaWNh" + - "bFBhcmFtZXRlcnMuTW9kZRIPCgdkZW5zaXR5GAMgASgCEhAKCGZyaWN0aW9u" + - "GAQgASgCEg4KBmJvdW5jZRgFIAEoAhIQCgRodWxsGAYgAygCQgIQARITCgtj" + - "b2xsaWRlX21zZxgQIAEoDRIUCgxjb2xsaWRlX21hc2sYESABKA0SDwoHZ3Jh" + - "dml0eRgSIAEoAiJqCgRNb2RlEg8KC05PTlBIWVNJQ0FMEAASCgoGU1RBVElD" + - "EAESDgoKRFlOQU1JQ0JPWBACEhEKDURZTkFNSUNTUEhFUkUQAxITCg9EWU5B" + - "TUlDQ1lMSU5ERVIQBBINCglDSEFSQUNURVIQBSLaAwoRTGlnaHRJbmZvUHJv" + - "cGVydHkSGQoNZGlmZnVzZV9jb2xvchgDIAMoAkICEAESGgoOc3BlY3VsYXJf" + - "Y29sb3IYBCADKAJCAhABEg0KBXBvd2VyGAUgASgCEhkKDWFtYmllbnRfY29s" + - "b3IYBiADKAJCAhABEhgKDHNoYWRvd19jb2xvchgHIAMoAkICEAESEwoLbGln" + - "aHRfcmFuZ2UYCCABKAESGAoQY29uc3RhbnRfZmFsbG9mZhgJIAEoAhIWCg5s" + - "aW5lYXJfZmFsbG9mZhgKIAEoAhIZChFxdWFkcmF0aWNfZmFsbG9mZhgLIAEo" + - "AhIaChJjb25lX2lubmVyX3JhZGlhbnMYDCABKAISGgoSY29uZV9vdXRlcl9y" + - "YWRpYW5zGA0gASgCEhQKDGNvbmVfZmFsbG9mZhgOIAEoAhJLCgR0eXBlGA8g" + - "ASgOMj0uU2lyaWthdGEuUHJvdG9jb2wuX1BCSl9JbnRlcm5hbC5MaWdodElu" + - "Zm9Qcm9wZXJ0eS5MaWdodFR5cGVzEhQKDGNhc3RzX3NoYWRvdxgQIAEoCCI3" + - "CgpMaWdodFR5cGVzEgkKBVBPSU5UEAASDQoJU1BPVExJR0hUEAESDwoLRElS" + - "RUNUSU9OQUwQAiIfCg5QYXJlbnRQcm9wZXJ0eRINCgV2YWx1ZRgKIAEoDCIh" + - "ChBVVUlETGlzdFByb3BlcnR5Eg0KBXZhbHVlGAogAygMIqQBCg5Db25uZWN0" + - "VG9TcGFjZRIQCghzcGFjZV9pZBgBIAEoDBIcChRvYmplY3RfdXVpZF9ldmlk" + - "ZW5jZRgCIAEoDBJFChRyZXF1ZXN0ZWRfb2JqZWN0X2xvYxgDIAEoCzInLlNp" + - "cmlrYXRhLlByb3RvY29sLl9QQkpfSW50ZXJuYWwuT2JqTG9jEhsKD2JvdW5k" + - "aW5nX3NwaGVyZRgEIAMoAkICEAEivgIKDENyZWF0ZU9iamVjdBITCgtvYmpl" + - "Y3RfdXVpZBgBIAEoDBJJChBzcGFjZV9wcm9wZXJ0aWVzGAIgAygLMi8uU2ly" + - "aWthdGEuUHJvdG9jb2wuX1BCSl9JbnRlcm5hbC5Db25uZWN0VG9TcGFjZRIM" + - "CgRtZXNoGAMgASgJEhEKBXNjYWxlGAQgAygCQgIQARIOCgZ3ZWJ1cmwYBSAB" + - "KAkSRgoKbGlnaHRfaW5mbxgGIAEoCzIyLlNpcmlrYXRhLlByb3RvY29sLl9Q" + - "QkpfSW50ZXJuYWwuTGlnaHRJbmZvUHJvcGVydHkSDgoGY2FtZXJhGAcgASgI" + - "EkUKCHBoeXNpY2FsGAggASgLMjMuU2lyaWthdGEuUHJvdG9jb2wuX1BCSl9J" + - "bnRlcm5hbC5QaHlzaWNhbFBhcmFtZXRlcnM="); - pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { - descriptor = root; - internal__static_Sirikata_Protocol__PBJ_Internal_MessageBody__Descriptor = Descriptor.MessageTypes[0]; - internal__static_Sirikata_Protocol__PBJ_Internal_MessageBody__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_MessageBody__Descriptor, - new string[] { "MessageNames", "MessageArguments", }); - internal__static_Sirikata_Protocol__PBJ_Internal_ReadOnlyMessage__Descriptor = Descriptor.MessageTypes[1]; - internal__static_Sirikata_Protocol__PBJ_Internal_ReadOnlyMessage__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_ReadOnlyMessage__Descriptor, - new string[] { "SourceObject", "SourcePort", "SourceSpace", "DestinationObject", "DestinationPort", "DestinationSpace", "Id", "ReplyId", "ReturnStatus", "MessageNames", "MessageArguments", }); - internal__static_Sirikata_Protocol__PBJ_Internal_SpaceServices__Descriptor = Descriptor.MessageTypes[2]; - internal__static_Sirikata_Protocol__PBJ_Internal_SpaceServices__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_SpaceServices__Descriptor, - new string[] { "RegistrationPort", "LocPort", "GeomPort", "OsegPort", "CsegPort", "RouterPort", "PreConnectionBuffer", "MaxPreConnectionMessages", }); - internal__static_Sirikata_Protocol__PBJ_Internal_ObjLoc__Descriptor = Descriptor.MessageTypes[3]; - internal__static_Sirikata_Protocol__PBJ_Internal_ObjLoc__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_ObjLoc__Descriptor, - new string[] { "Timestamp", "Position", "Orientation", "Velocity", "RotationalAxis", "AngularSpeed", "UpdateFlags", }); - internal__static_Sirikata_Protocol__PBJ_Internal_LocRequest__Descriptor = Descriptor.MessageTypes[4]; - internal__static_Sirikata_Protocol__PBJ_Internal_LocRequest__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_LocRequest__Descriptor, - new string[] { "RequestedFields", }); - internal__static_Sirikata_Protocol__PBJ_Internal_NewObj__Descriptor = Descriptor.MessageTypes[5]; - internal__static_Sirikata_Protocol__PBJ_Internal_NewObj__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_NewObj__Descriptor, - new string[] { "ObjectUuidEvidence", "RequestedObjectLoc", "BoundingSphere", }); - internal__static_Sirikata_Protocol__PBJ_Internal_RetObj__Descriptor = Descriptor.MessageTypes[6]; - internal__static_Sirikata_Protocol__PBJ_Internal_RetObj__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_RetObj__Descriptor, - new string[] { "ObjectReference", "Location", "BoundingSphere", }); - internal__static_Sirikata_Protocol__PBJ_Internal_DelObj__Descriptor = Descriptor.MessageTypes[7]; - internal__static_Sirikata_Protocol__PBJ_Internal_DelObj__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_DelObj__Descriptor, - new string[] { "ObjectReference", }); - internal__static_Sirikata_Protocol__PBJ_Internal_NewProxQuery__Descriptor = Descriptor.MessageTypes[8]; - internal__static_Sirikata_Protocol__PBJ_Internal_NewProxQuery__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_NewProxQuery__Descriptor, - new string[] { "QueryId", "Stateless", "RelativeCenter", "AbsoluteCenter", "MaxRadius", "MinSolidAngle", }); - internal__static_Sirikata_Protocol__PBJ_Internal_ProxCall__Descriptor = Descriptor.MessageTypes[9]; - internal__static_Sirikata_Protocol__PBJ_Internal_ProxCall__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_ProxCall__Descriptor, - new string[] { "QueryId", "ProximateObject", "ProximityEvent", }); - internal__static_Sirikata_Protocol__PBJ_Internal_DelProxQuery__Descriptor = Descriptor.MessageTypes[10]; - internal__static_Sirikata_Protocol__PBJ_Internal_DelProxQuery__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_DelProxQuery__Descriptor, - new string[] { "QueryId", }); - internal__static_Sirikata_Protocol__PBJ_Internal_Vector3fProperty__Descriptor = Descriptor.MessageTypes[11]; - internal__static_Sirikata_Protocol__PBJ_Internal_Vector3fProperty__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_Vector3fProperty__Descriptor, - new string[] { "Value", }); - internal__static_Sirikata_Protocol__PBJ_Internal_StringProperty__Descriptor = Descriptor.MessageTypes[12]; - internal__static_Sirikata_Protocol__PBJ_Internal_StringProperty__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_StringProperty__Descriptor, - new string[] { "Value", }); - internal__static_Sirikata_Protocol__PBJ_Internal_StringMapProperty__Descriptor = Descriptor.MessageTypes[13]; - internal__static_Sirikata_Protocol__PBJ_Internal_StringMapProperty__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_StringMapProperty__Descriptor, - new string[] { "Keys", "Values", }); - internal__static_Sirikata_Protocol__PBJ_Internal_PhysicalParameters__Descriptor = Descriptor.MessageTypes[14]; - internal__static_Sirikata_Protocol__PBJ_Internal_PhysicalParameters__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_PhysicalParameters__Descriptor, - new string[] { "Mode", "Density", "Friction", "Bounce", "Hull", "CollideMsg", "CollideMask", "Gravity", }); - internal__static_Sirikata_Protocol__PBJ_Internal_LightInfoProperty__Descriptor = Descriptor.MessageTypes[15]; - internal__static_Sirikata_Protocol__PBJ_Internal_LightInfoProperty__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_LightInfoProperty__Descriptor, - new string[] { "DiffuseColor", "SpecularColor", "Power", "AmbientColor", "ShadowColor", "LightRange", "ConstantFalloff", "LinearFalloff", "QuadraticFalloff", "ConeInnerRadians", "ConeOuterRadians", "ConeFalloff", "Type", "CastsShadow", }); - internal__static_Sirikata_Protocol__PBJ_Internal_ParentProperty__Descriptor = Descriptor.MessageTypes[16]; - internal__static_Sirikata_Protocol__PBJ_Internal_ParentProperty__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_ParentProperty__Descriptor, - new string[] { "Value", }); - internal__static_Sirikata_Protocol__PBJ_Internal_UUIDListProperty__Descriptor = Descriptor.MessageTypes[17]; - internal__static_Sirikata_Protocol__PBJ_Internal_UUIDListProperty__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_UUIDListProperty__Descriptor, - new string[] { "Value", }); - internal__static_Sirikata_Protocol__PBJ_Internal_ConnectToSpace__Descriptor = Descriptor.MessageTypes[18]; - internal__static_Sirikata_Protocol__PBJ_Internal_ConnectToSpace__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_ConnectToSpace__Descriptor, - new string[] { "SpaceId", "ObjectUuidEvidence", "RequestedObjectLoc", "BoundingSphere", }); - internal__static_Sirikata_Protocol__PBJ_Internal_CreateObject__Descriptor = Descriptor.MessageTypes[19]; - internal__static_Sirikata_Protocol__PBJ_Internal_CreateObject__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_Protocol__PBJ_Internal_CreateObject__Descriptor, - new string[] { "ObjectUuid", "SpaceProperties", "Mesh", "Scale", "Weburl", "LightInfo", "Camera", "Physical", }); - return null; - }; - pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, - new pbd::FileDescriptor[] { - }, assigner); - } - #endregion - - } - #region Messages - public sealed partial class MessageBody : pb::GeneratedMessage { - private static readonly MessageBody defaultInstance = new Builder().BuildPartial(); - public static MessageBody DefaultInstance { - get { return defaultInstance; } - } - - public override MessageBody DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override MessageBody ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_MessageBody__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_MessageBody__FieldAccessorTable; } - } - - public const int MessageNamesFieldNumber = 9; - private pbc::PopsicleList messageNames_ = new pbc::PopsicleList(); - public scg::IList MessageNamesList { - get { return pbc::Lists.AsReadOnly(messageNames_); } - } - public int MessageNamesCount { - get { return messageNames_.Count; } - } - public string GetMessageNames(int index) { - return messageNames_[index]; - } - - public const int MessageArgumentsFieldNumber = 10; - private pbc::PopsicleList messageArguments_ = new pbc::PopsicleList(); - public scg::IList MessageArgumentsList { - get { return pbc::Lists.AsReadOnly(messageArguments_); } - } - public int MessageArgumentsCount { - get { return messageArguments_.Count; } - } - public pb::ByteString GetMessageArguments(int index) { - return messageArguments_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (messageNames_.Count > 0) { - foreach (string element in messageNames_) { - output.WriteString(9, element); - } - } - if (messageArguments_.Count > 0) { - foreach (pb::ByteString element in messageArguments_) { - output.WriteBytes(10, element); - } - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - foreach (string element in MessageNamesList) { - dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); - } - size += dataSize; - size += 1 * messageNames_.Count; - } - { - int dataSize = 0; - foreach (pb::ByteString element in MessageArgumentsList) { - dataSize += pb::CodedOutputStream.ComputeBytesSizeNoTag(element); - } - size += dataSize; - size += 1 * messageArguments_.Count; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static MessageBody ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static MessageBody ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static MessageBody ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static MessageBody ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static MessageBody ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static MessageBody ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static MessageBody ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static MessageBody ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static MessageBody ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static MessageBody 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(MessageBody prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - MessageBody result = new MessageBody(); - - protected override MessageBody MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new MessageBody(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.MessageBody.Descriptor; } - } - - public override MessageBody DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.MessageBody.DefaultInstance; } - } - - public override MessageBody BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.messageNames_.MakeReadOnly(); - result.messageArguments_.MakeReadOnly(); - MessageBody returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is MessageBody) { - return MergeFrom((MessageBody) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(MessageBody other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.MessageBody.DefaultInstance) return this; - if (other.messageNames_.Count != 0) { - base.AddRange(other.messageNames_, result.messageNames_); - } - if (other.messageArguments_.Count != 0) { - base.AddRange(other.messageArguments_, result.messageArguments_); - } - 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 74: { - AddMessageNames(input.ReadString()); - break; - } - case 82: { - AddMessageArguments(input.ReadBytes()); - break; - } - } - } - } - - - public pbc::IPopsicleList MessageNamesList { - get { return result.messageNames_; } - } - public int MessageNamesCount { - get { return result.MessageNamesCount; } - } - public string GetMessageNames(int index) { - return result.GetMessageNames(index); - } - public Builder SetMessageNames(int index, string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.messageNames_[index] = value; - return this; - } - public Builder AddMessageNames(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.messageNames_.Add(value); - return this; - } - public Builder AddRangeMessageNames(scg::IEnumerable values) { - base.AddRange(values, result.messageNames_); - return this; - } - public Builder ClearMessageNames() { - result.messageNames_.Clear(); - return this; - } - - public pbc::IPopsicleList MessageArgumentsList { - get { return result.messageArguments_; } - } - public int MessageArgumentsCount { - get { return result.MessageArgumentsCount; } - } - public pb::ByteString GetMessageArguments(int index) { - return result.GetMessageArguments(index); - } - public Builder SetMessageArguments(int index, pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.messageArguments_[index] = value; - return this; - } - public Builder AddMessageArguments(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.messageArguments_.Add(value); - return this; - } - public Builder AddRangeMessageArguments(scg::IEnumerable values) { - base.AddRange(values, result.messageArguments_); - return this; - } - public Builder ClearMessageArguments() { - result.messageArguments_.Clear(); - return this; - } - } - static MessageBody() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class ReadOnlyMessage : pb::GeneratedMessage { - private static readonly ReadOnlyMessage defaultInstance = new Builder().BuildPartial(); - public static ReadOnlyMessage DefaultInstance { - get { return defaultInstance; } - } - - public override ReadOnlyMessage DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override ReadOnlyMessage ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ReadOnlyMessage__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ReadOnlyMessage__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, - } - - } - #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.ReadOnlyMessage.Types.ReturnStatus returnStatus_ = global::Sirikata.Protocol._PBJ_Internal.ReadOnlyMessage.Types.ReturnStatus.SUCCESS; - public bool HasReturnStatus { - get { return hasReturnStatus; } - } - public global::Sirikata.Protocol._PBJ_Internal.ReadOnlyMessage.Types.ReturnStatus ReturnStatus { - get { return returnStatus_; } - } - - public const int MessageNamesFieldNumber = 9; - private pbc::PopsicleList messageNames_ = new pbc::PopsicleList(); - public scg::IList MessageNamesList { - get { return pbc::Lists.AsReadOnly(messageNames_); } - } - public int MessageNamesCount { - get { return messageNames_.Count; } - } - public string GetMessageNames(int index) { - return messageNames_[index]; - } - - public const int MessageArgumentsFieldNumber = 10; - private pbc::PopsicleList messageArguments_ = new pbc::PopsicleList(); - public scg::IList MessageArgumentsList { - get { return pbc::Lists.AsReadOnly(messageArguments_); } - } - public int MessageArgumentsCount { - get { return messageArguments_.Count; } - } - public pb::ByteString GetMessageArguments(int index) { - return messageArguments_[index]; - } - - 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 (messageNames_.Count > 0) { - foreach (string element in messageNames_) { - output.WriteString(9, element); - } - } - if (messageArguments_.Count > 0) { - foreach (pb::ByteString element in messageArguments_) { - output.WriteBytes(10, element); - } - } - 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); - } - { - int dataSize = 0; - foreach (string element in MessageNamesList) { - dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); - } - size += dataSize; - size += 1 * messageNames_.Count; - } - { - int dataSize = 0; - foreach (pb::ByteString element in MessageArgumentsList) { - dataSize += pb::CodedOutputStream.ComputeBytesSizeNoTag(element); - } - size += dataSize; - size += 1 * messageArguments_.Count; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static ReadOnlyMessage ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ReadOnlyMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ReadOnlyMessage ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ReadOnlyMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ReadOnlyMessage ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ReadOnlyMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static ReadOnlyMessage ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static ReadOnlyMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static ReadOnlyMessage ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ReadOnlyMessage 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(ReadOnlyMessage prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - ReadOnlyMessage result = new ReadOnlyMessage(); - - protected override ReadOnlyMessage MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new ReadOnlyMessage(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ReadOnlyMessage.Descriptor; } - } - - public override ReadOnlyMessage DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ReadOnlyMessage.DefaultInstance; } - } - - public override ReadOnlyMessage BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.messageNames_.MakeReadOnly(); - result.messageArguments_.MakeReadOnly(); - ReadOnlyMessage returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is ReadOnlyMessage) { - return MergeFrom((ReadOnlyMessage) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(ReadOnlyMessage other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.ReadOnlyMessage.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; - } - if (other.messageNames_.Count != 0) { - base.AddRange(other.messageNames_, result.messageNames_); - } - if (other.messageArguments_.Count != 0) { - base.AddRange(other.messageArguments_, result.messageArguments_); - } - 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 74: { - AddMessageNames(input.ReadString()); - break; - } - case 82: { - AddMessageArguments(input.ReadBytes()); - 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.ReadOnlyMessage.Types.ReturnStatus), rawValue)) { - if (unknownFields == null) { - unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); - } - unknownFields.MergeVarintField(1792, (ulong) rawValue); - } else { - ReturnStatus = (global::Sirikata.Protocol._PBJ_Internal.ReadOnlyMessage.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.ReadOnlyMessage.Types.ReturnStatus ReturnStatus { - get { return result.ReturnStatus; } - set { SetReturnStatus(value); } - } - public Builder SetReturnStatus(global::Sirikata.Protocol._PBJ_Internal.ReadOnlyMessage.Types.ReturnStatus value) { - result.hasReturnStatus = true; - result.returnStatus_ = value; - return this; - } - public Builder ClearReturnStatus() { - result.hasReturnStatus = false; - result.returnStatus_ = global::Sirikata.Protocol._PBJ_Internal.ReadOnlyMessage.Types.ReturnStatus.SUCCESS; - return this; - } - - public pbc::IPopsicleList MessageNamesList { - get { return result.messageNames_; } - } - public int MessageNamesCount { - get { return result.MessageNamesCount; } - } - public string GetMessageNames(int index) { - return result.GetMessageNames(index); - } - public Builder SetMessageNames(int index, string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.messageNames_[index] = value; - return this; - } - public Builder AddMessageNames(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.messageNames_.Add(value); - return this; - } - public Builder AddRangeMessageNames(scg::IEnumerable values) { - base.AddRange(values, result.messageNames_); - return this; - } - public Builder ClearMessageNames() { - result.messageNames_.Clear(); - return this; - } - - public pbc::IPopsicleList MessageArgumentsList { - get { return result.messageArguments_; } - } - public int MessageArgumentsCount { - get { return result.MessageArgumentsCount; } - } - public pb::ByteString GetMessageArguments(int index) { - return result.GetMessageArguments(index); - } - public Builder SetMessageArguments(int index, pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.messageArguments_[index] = value; - return this; - } - public Builder AddMessageArguments(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.messageArguments_.Add(value); - return this; - } - public Builder AddRangeMessageArguments(scg::IEnumerable values) { - base.AddRange(values, result.messageArguments_); - return this; - } - public Builder ClearMessageArguments() { - result.messageArguments_.Clear(); - return this; - } - } - static ReadOnlyMessage() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class SpaceServices : pb::GeneratedMessage { - private static readonly SpaceServices defaultInstance = new Builder().BuildPartial(); - public static SpaceServices DefaultInstance { - get { return defaultInstance; } - } - - public override SpaceServices DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override SpaceServices ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_SpaceServices__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_SpaceServices__FieldAccessorTable; } - } - - public const int RegistrationPortFieldNumber = 33; - private bool hasRegistrationPort; - private uint registrationPort_ = 0; - public bool HasRegistrationPort { - get { return hasRegistrationPort; } - } - [global::System.CLSCompliant(false)] - public uint RegistrationPort { - get { return registrationPort_; } - } - - public const int LocPortFieldNumber = 34; - private bool hasLocPort; - private uint locPort_ = 0; - public bool HasLocPort { - get { return hasLocPort; } - } - [global::System.CLSCompliant(false)] - public uint LocPort { - get { return locPort_; } - } - - public const int GeomPortFieldNumber = 35; - private bool hasGeomPort; - private uint geomPort_ = 0; - public bool HasGeomPort { - get { return hasGeomPort; } - } - [global::System.CLSCompliant(false)] - public uint GeomPort { - get { return geomPort_; } - } - - public const int OsegPortFieldNumber = 36; - private bool hasOsegPort; - private uint osegPort_ = 0; - public bool HasOsegPort { - get { return hasOsegPort; } - } - [global::System.CLSCompliant(false)] - public uint OsegPort { - get { return osegPort_; } - } - - public const int CsegPortFieldNumber = 37; - private bool hasCsegPort; - private uint csegPort_ = 0; - public bool HasCsegPort { - get { return hasCsegPort; } - } - [global::System.CLSCompliant(false)] - public uint CsegPort { - get { return csegPort_; } - } - - public const int RouterPortFieldNumber = 38; - private bool hasRouterPort; - private uint routerPort_ = 0; - public bool HasRouterPort { - get { return hasRouterPort; } - } - [global::System.CLSCompliant(false)] - public uint RouterPort { - get { return routerPort_; } - } - - public const int PreConnectionBufferFieldNumber = 64; - private bool hasPreConnectionBuffer; - private ulong preConnectionBuffer_ = 0UL; - public bool HasPreConnectionBuffer { - get { return hasPreConnectionBuffer; } - } - [global::System.CLSCompliant(false)] - public ulong PreConnectionBuffer { - get { return preConnectionBuffer_; } - } - - public const int MaxPreConnectionMessagesFieldNumber = 65; - private bool hasMaxPreConnectionMessages; - private ulong maxPreConnectionMessages_ = 0UL; - public bool HasMaxPreConnectionMessages { - get { return hasMaxPreConnectionMessages; } - } - [global::System.CLSCompliant(false)] - public ulong MaxPreConnectionMessages { - get { return maxPreConnectionMessages_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasRegistrationPort) { - output.WriteUInt32(33, RegistrationPort); - } - if (HasLocPort) { - output.WriteUInt32(34, LocPort); - } - if (HasGeomPort) { - output.WriteUInt32(35, GeomPort); - } - if (HasOsegPort) { - output.WriteUInt32(36, OsegPort); - } - if (HasCsegPort) { - output.WriteUInt32(37, CsegPort); - } - if (HasRouterPort) { - output.WriteUInt32(38, RouterPort); - } - if (HasPreConnectionBuffer) { - output.WriteUInt64(64, PreConnectionBuffer); - } - if (HasMaxPreConnectionMessages) { - output.WriteUInt64(65, MaxPreConnectionMessages); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasRegistrationPort) { - size += pb::CodedOutputStream.ComputeUInt32Size(33, RegistrationPort); - } - if (HasLocPort) { - size += pb::CodedOutputStream.ComputeUInt32Size(34, LocPort); - } - if (HasGeomPort) { - size += pb::CodedOutputStream.ComputeUInt32Size(35, GeomPort); - } - if (HasOsegPort) { - size += pb::CodedOutputStream.ComputeUInt32Size(36, OsegPort); - } - if (HasCsegPort) { - size += pb::CodedOutputStream.ComputeUInt32Size(37, CsegPort); - } - if (HasRouterPort) { - size += pb::CodedOutputStream.ComputeUInt32Size(38, RouterPort); - } - if (HasPreConnectionBuffer) { - size += pb::CodedOutputStream.ComputeUInt64Size(64, PreConnectionBuffer); - } - if (HasMaxPreConnectionMessages) { - size += pb::CodedOutputStream.ComputeUInt64Size(65, MaxPreConnectionMessages); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static SpaceServices ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static SpaceServices ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static SpaceServices ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static SpaceServices ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static SpaceServices ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static SpaceServices ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static SpaceServices ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static SpaceServices ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static SpaceServices ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static SpaceServices 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(SpaceServices prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - SpaceServices result = new SpaceServices(); - - protected override SpaceServices MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new SpaceServices(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.SpaceServices.Descriptor; } - } - - public override SpaceServices DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.SpaceServices.DefaultInstance; } - } - - public override SpaceServices BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - SpaceServices returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is SpaceServices) { - return MergeFrom((SpaceServices) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(SpaceServices other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.SpaceServices.DefaultInstance) return this; - if (other.HasRegistrationPort) { - RegistrationPort = other.RegistrationPort; - } - if (other.HasLocPort) { - LocPort = other.LocPort; - } - if (other.HasGeomPort) { - GeomPort = other.GeomPort; - } - if (other.HasOsegPort) { - OsegPort = other.OsegPort; - } - if (other.HasCsegPort) { - CsegPort = other.CsegPort; - } - if (other.HasRouterPort) { - RouterPort = other.RouterPort; - } - if (other.HasPreConnectionBuffer) { - PreConnectionBuffer = other.PreConnectionBuffer; - } - if (other.HasMaxPreConnectionMessages) { - MaxPreConnectionMessages = other.MaxPreConnectionMessages; - } - 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 264: { - RegistrationPort = input.ReadUInt32(); - break; - } - case 272: { - LocPort = input.ReadUInt32(); - break; - } - case 280: { - GeomPort = input.ReadUInt32(); - break; - } - case 288: { - OsegPort = input.ReadUInt32(); - break; - } - case 296: { - CsegPort = input.ReadUInt32(); - break; - } - case 304: { - RouterPort = input.ReadUInt32(); - break; - } - case 512: { - PreConnectionBuffer = input.ReadUInt64(); - break; - } - case 520: { - MaxPreConnectionMessages = input.ReadUInt64(); - break; - } - } - } - } - - - public bool HasRegistrationPort { - get { return result.HasRegistrationPort; } - } - [global::System.CLSCompliant(false)] - public uint RegistrationPort { - get { return result.RegistrationPort; } - set { SetRegistrationPort(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetRegistrationPort(uint value) { - result.hasRegistrationPort = true; - result.registrationPort_ = value; - return this; - } - public Builder ClearRegistrationPort() { - result.hasRegistrationPort = false; - result.registrationPort_ = 0; - return this; - } - - public bool HasLocPort { - get { return result.HasLocPort; } - } - [global::System.CLSCompliant(false)] - public uint LocPort { - get { return result.LocPort; } - set { SetLocPort(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetLocPort(uint value) { - result.hasLocPort = true; - result.locPort_ = value; - return this; - } - public Builder ClearLocPort() { - result.hasLocPort = false; - result.locPort_ = 0; - return this; - } - - public bool HasGeomPort { - get { return result.HasGeomPort; } - } - [global::System.CLSCompliant(false)] - public uint GeomPort { - get { return result.GeomPort; } - set { SetGeomPort(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetGeomPort(uint value) { - result.hasGeomPort = true; - result.geomPort_ = value; - return this; - } - public Builder ClearGeomPort() { - result.hasGeomPort = false; - result.geomPort_ = 0; - return this; - } - - public bool HasOsegPort { - get { return result.HasOsegPort; } - } - [global::System.CLSCompliant(false)] - public uint OsegPort { - get { return result.OsegPort; } - set { SetOsegPort(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetOsegPort(uint value) { - result.hasOsegPort = true; - result.osegPort_ = value; - return this; - } - public Builder ClearOsegPort() { - result.hasOsegPort = false; - result.osegPort_ = 0; - return this; - } - - public bool HasCsegPort { - get { return result.HasCsegPort; } - } - [global::System.CLSCompliant(false)] - public uint CsegPort { - get { return result.CsegPort; } - set { SetCsegPort(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetCsegPort(uint value) { - result.hasCsegPort = true; - result.csegPort_ = value; - return this; - } - public Builder ClearCsegPort() { - result.hasCsegPort = false; - result.csegPort_ = 0; - return this; - } - - public bool HasRouterPort { - get { return result.HasRouterPort; } - } - [global::System.CLSCompliant(false)] - public uint RouterPort { - get { return result.RouterPort; } - set { SetRouterPort(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetRouterPort(uint value) { - result.hasRouterPort = true; - result.routerPort_ = value; - return this; - } - public Builder ClearRouterPort() { - result.hasRouterPort = false; - result.routerPort_ = 0; - return this; - } - - public bool HasPreConnectionBuffer { - get { return result.HasPreConnectionBuffer; } - } - [global::System.CLSCompliant(false)] - public ulong PreConnectionBuffer { - get { return result.PreConnectionBuffer; } - set { SetPreConnectionBuffer(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetPreConnectionBuffer(ulong value) { - result.hasPreConnectionBuffer = true; - result.preConnectionBuffer_ = value; - return this; - } - public Builder ClearPreConnectionBuffer() { - result.hasPreConnectionBuffer = false; - result.preConnectionBuffer_ = 0UL; - return this; - } - - public bool HasMaxPreConnectionMessages { - get { return result.HasMaxPreConnectionMessages; } - } - [global::System.CLSCompliant(false)] - public ulong MaxPreConnectionMessages { - get { return result.MaxPreConnectionMessages; } - set { SetMaxPreConnectionMessages(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetMaxPreConnectionMessages(ulong value) { - result.hasMaxPreConnectionMessages = true; - result.maxPreConnectionMessages_ = value; - return this; - } - public Builder ClearMaxPreConnectionMessages() { - result.hasMaxPreConnectionMessages = false; - result.maxPreConnectionMessages_ = 0UL; - return this; - } - } - static SpaceServices() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class ObjLoc : pb::GeneratedMessage { - private static readonly ObjLoc defaultInstance = new Builder().BuildPartial(); - public static ObjLoc DefaultInstance { - get { return defaultInstance; } - } - - public override ObjLoc DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override ObjLoc ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ObjLoc__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ObjLoc__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum UpdateFlags { - FORCE = 1, - } - - } - #endregion - - 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 PositionFieldNumber = 3; - private int positionMemoizedSerializedSize; - private pbc::PopsicleList position_ = new pbc::PopsicleList(); - public scg::IList PositionList { - get { return pbc::Lists.AsReadOnly(position_); } - } - public int PositionCount { - get { return position_.Count; } - } - public double GetPosition(int index) { - return position_[index]; - } - - public const int OrientationFieldNumber = 4; - private int orientationMemoizedSerializedSize; - private pbc::PopsicleList orientation_ = new pbc::PopsicleList(); - public scg::IList OrientationList { - get { return pbc::Lists.AsReadOnly(orientation_); } - } - public int OrientationCount { - get { return orientation_.Count; } - } - public float GetOrientation(int index) { - return orientation_[index]; - } - - public const int VelocityFieldNumber = 5; - private int velocityMemoizedSerializedSize; - private pbc::PopsicleList velocity_ = new pbc::PopsicleList(); - public scg::IList VelocityList { - get { return pbc::Lists.AsReadOnly(velocity_); } - } - public int VelocityCount { - get { return velocity_.Count; } - } - public float GetVelocity(int index) { - return velocity_[index]; - } - - public const int RotationalAxisFieldNumber = 7; - private int rotationalAxisMemoizedSerializedSize; - private pbc::PopsicleList rotationalAxis_ = new pbc::PopsicleList(); - public scg::IList RotationalAxisList { - get { return pbc::Lists.AsReadOnly(rotationalAxis_); } - } - public int RotationalAxisCount { - get { return rotationalAxis_.Count; } - } - public float GetRotationalAxis(int index) { - return rotationalAxis_[index]; - } - - public const int AngularSpeedFieldNumber = 8; - private bool hasAngularSpeed; - private float angularSpeed_ = 0F; - public bool HasAngularSpeed { - get { return hasAngularSpeed; } - } - public float AngularSpeed { - get { return angularSpeed_; } - } - - public const int UpdateFlagsFieldNumber = 6; - private bool hasUpdateFlags; - private uint updateFlags_ = 0; - public bool HasUpdateFlags { - get { return hasUpdateFlags; } - } - [global::System.CLSCompliant(false)] - public uint UpdateFlags { - get { return updateFlags_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasTimestamp) { - output.WriteFixed64(2, Timestamp); - } - if (position_.Count > 0) { - output.WriteRawVarint32(26); - output.WriteRawVarint32((uint) positionMemoizedSerializedSize); - foreach (double element in position_) { - output.WriteDoubleNoTag(element); - } - } - if (orientation_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) orientationMemoizedSerializedSize); - foreach (float element in orientation_) { - output.WriteFloatNoTag(element); - } - } - if (velocity_.Count > 0) { - output.WriteRawVarint32(42); - output.WriteRawVarint32((uint) velocityMemoizedSerializedSize); - foreach (float element in velocity_) { - output.WriteFloatNoTag(element); - } - } - if (HasUpdateFlags) { - output.WriteUInt32(6, UpdateFlags); - } - if (rotationalAxis_.Count > 0) { - output.WriteRawVarint32(58); - output.WriteRawVarint32((uint) rotationalAxisMemoizedSerializedSize); - foreach (float element in rotationalAxis_) { - output.WriteFloatNoTag(element); - } - } - if (HasAngularSpeed) { - output.WriteFloat(8, AngularSpeed); - } - 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 * position_.Count; - size += dataSize; - if (position_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - positionMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * orientation_.Count; - size += dataSize; - if (orientation_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - orientationMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * velocity_.Count; - size += dataSize; - if (velocity_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - velocityMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * rotationalAxis_.Count; - size += dataSize; - if (rotationalAxis_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - rotationalAxisMemoizedSerializedSize = dataSize; - } - if (HasAngularSpeed) { - size += pb::CodedOutputStream.ComputeFloatSize(8, AngularSpeed); - } - if (HasUpdateFlags) { - size += pb::CodedOutputStream.ComputeUInt32Size(6, UpdateFlags); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static ObjLoc ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ObjLoc ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ObjLoc ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ObjLoc ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ObjLoc ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ObjLoc ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static ObjLoc ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static ObjLoc ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static ObjLoc ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ObjLoc 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(ObjLoc prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - ObjLoc result = new ObjLoc(); - - protected override ObjLoc MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new ObjLoc(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ObjLoc.Descriptor; } - } - - public override ObjLoc DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance; } - } - - public override ObjLoc BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.position_.MakeReadOnly(); - result.orientation_.MakeReadOnly(); - result.velocity_.MakeReadOnly(); - result.rotationalAxis_.MakeReadOnly(); - ObjLoc returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is ObjLoc) { - return MergeFrom((ObjLoc) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(ObjLoc other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance) return this; - if (other.HasTimestamp) { - Timestamp = other.Timestamp; - } - if (other.position_.Count != 0) { - base.AddRange(other.position_, result.position_); - } - if (other.orientation_.Count != 0) { - base.AddRange(other.orientation_, result.orientation_); - } - if (other.velocity_.Count != 0) { - base.AddRange(other.velocity_, result.velocity_); - } - if (other.rotationalAxis_.Count != 0) { - base.AddRange(other.rotationalAxis_, result.rotationalAxis_); - } - if (other.HasAngularSpeed) { - AngularSpeed = other.AngularSpeed; - } - if (other.HasUpdateFlags) { - UpdateFlags = other.UpdateFlags; - } - 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) { - AddPosition(input.ReadDouble()); - } - input.PopLimit(limit); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddOrientation(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 42: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddVelocity(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 48: { - UpdateFlags = input.ReadUInt32(); - break; - } - case 58: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddRotationalAxis(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 69: { - AngularSpeed = input.ReadFloat(); - 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 PositionList { - get { return result.position_; } - } - public int PositionCount { - get { return result.PositionCount; } - } - public double GetPosition(int index) { - return result.GetPosition(index); - } - public Builder SetPosition(int index, double value) { - result.position_[index] = value; - return this; - } - public Builder AddPosition(double value) { - result.position_.Add(value); - return this; - } - public Builder AddRangePosition(scg::IEnumerable values) { - base.AddRange(values, result.position_); - return this; - } - public Builder ClearPosition() { - result.position_.Clear(); - return this; - } - - public pbc::IPopsicleList OrientationList { - get { return result.orientation_; } - } - public int OrientationCount { - get { return result.OrientationCount; } - } - public float GetOrientation(int index) { - return result.GetOrientation(index); - } - public Builder SetOrientation(int index, float value) { - result.orientation_[index] = value; - return this; - } - public Builder AddOrientation(float value) { - result.orientation_.Add(value); - return this; - } - public Builder AddRangeOrientation(scg::IEnumerable values) { - base.AddRange(values, result.orientation_); - return this; - } - public Builder ClearOrientation() { - result.orientation_.Clear(); - return this; - } - - public pbc::IPopsicleList VelocityList { - get { return result.velocity_; } - } - public int VelocityCount { - get { return result.VelocityCount; } - } - public float GetVelocity(int index) { - return result.GetVelocity(index); - } - public Builder SetVelocity(int index, float value) { - result.velocity_[index] = value; - return this; - } - public Builder AddVelocity(float value) { - result.velocity_.Add(value); - return this; - } - public Builder AddRangeVelocity(scg::IEnumerable values) { - base.AddRange(values, result.velocity_); - return this; - } - public Builder ClearVelocity() { - result.velocity_.Clear(); - return this; - } - - public pbc::IPopsicleList RotationalAxisList { - get { return result.rotationalAxis_; } - } - public int RotationalAxisCount { - get { return result.RotationalAxisCount; } - } - public float GetRotationalAxis(int index) { - return result.GetRotationalAxis(index); - } - public Builder SetRotationalAxis(int index, float value) { - result.rotationalAxis_[index] = value; - return this; - } - public Builder AddRotationalAxis(float value) { - result.rotationalAxis_.Add(value); - return this; - } - public Builder AddRangeRotationalAxis(scg::IEnumerable values) { - base.AddRange(values, result.rotationalAxis_); - return this; - } - public Builder ClearRotationalAxis() { - result.rotationalAxis_.Clear(); - return this; - } - - public bool HasAngularSpeed { - get { return result.HasAngularSpeed; } - } - public float AngularSpeed { - get { return result.AngularSpeed; } - set { SetAngularSpeed(value); } - } - public Builder SetAngularSpeed(float value) { - result.hasAngularSpeed = true; - result.angularSpeed_ = value; - return this; - } - public Builder ClearAngularSpeed() { - result.hasAngularSpeed = false; - result.angularSpeed_ = 0F; - return this; - } - - public bool HasUpdateFlags { - get { return result.HasUpdateFlags; } - } - [global::System.CLSCompliant(false)] - public uint UpdateFlags { - get { return result.UpdateFlags; } - set { SetUpdateFlags(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetUpdateFlags(uint value) { - result.hasUpdateFlags = true; - result.updateFlags_ = value; - return this; - } - public Builder ClearUpdateFlags() { - result.hasUpdateFlags = false; - result.updateFlags_ = 0; - return this; - } - } - static ObjLoc() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class LocRequest : pb::GeneratedMessage { - private static readonly LocRequest defaultInstance = new Builder().BuildPartial(); - public static LocRequest DefaultInstance { - get { return defaultInstance; } - } - - public override LocRequest DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override LocRequest ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_LocRequest__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_LocRequest__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum Fields { - POSITION = 1, - ORIENTATION = 2, - VELOCITY = 4, - ROTATIONAL_AXIS = 8, - ANGULAR_SPEED = 16, - } - - } - #endregion - - public const int RequestedFieldsFieldNumber = 2; - private bool hasRequestedFields; - private uint requestedFields_ = 0; - public bool HasRequestedFields { - get { return hasRequestedFields; } - } - [global::System.CLSCompliant(false)] - public uint RequestedFields { - get { return requestedFields_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasRequestedFields) { - output.WriteUInt32(2, RequestedFields); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasRequestedFields) { - size += pb::CodedOutputStream.ComputeUInt32Size(2, RequestedFields); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static LocRequest ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static LocRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static LocRequest ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static LocRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static LocRequest ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static LocRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static LocRequest ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static LocRequest ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static LocRequest ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static LocRequest 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(LocRequest prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - LocRequest result = new LocRequest(); - - protected override LocRequest MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new LocRequest(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.LocRequest.Descriptor; } - } - - public override LocRequest DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.LocRequest.DefaultInstance; } - } - - public override LocRequest BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - LocRequest returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is LocRequest) { - return MergeFrom((LocRequest) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(LocRequest other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.LocRequest.DefaultInstance) return this; - if (other.HasRequestedFields) { - RequestedFields = other.RequestedFields; - } - 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 16: { - RequestedFields = input.ReadUInt32(); - break; - } - } - } - } - - - public bool HasRequestedFields { - get { return result.HasRequestedFields; } - } - [global::System.CLSCompliant(false)] - public uint RequestedFields { - get { return result.RequestedFields; } - set { SetRequestedFields(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetRequestedFields(uint value) { - result.hasRequestedFields = true; - result.requestedFields_ = value; - return this; - } - public Builder ClearRequestedFields() { - result.hasRequestedFields = false; - result.requestedFields_ = 0; - return this; - } - } - static LocRequest() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class NewObj : pb::GeneratedMessage { - private static readonly NewObj defaultInstance = new Builder().BuildPartial(); - public static NewObj DefaultInstance { - get { return defaultInstance; } - } - - public override NewObj DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override NewObj ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_NewObj__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_NewObj__FieldAccessorTable; } - } - - public const int ObjectUuidEvidenceFieldNumber = 2; - private bool hasObjectUuidEvidence; - private pb::ByteString objectUuidEvidence_ = pb::ByteString.Empty; - public bool HasObjectUuidEvidence { - get { return hasObjectUuidEvidence; } - } - public pb::ByteString ObjectUuidEvidence { - get { return objectUuidEvidence_; } - } - - public const int RequestedObjectLocFieldNumber = 3; - private bool hasRequestedObjectLoc; - private global::Sirikata.Protocol._PBJ_Internal.ObjLoc requestedObjectLoc_ = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance; - public bool HasRequestedObjectLoc { - get { return hasRequestedObjectLoc; } - } - public global::Sirikata.Protocol._PBJ_Internal.ObjLoc RequestedObjectLoc { - get { return requestedObjectLoc_; } - } - - public const int BoundingSphereFieldNumber = 4; - private int boundingSphereMemoizedSerializedSize; - private pbc::PopsicleList boundingSphere_ = new pbc::PopsicleList(); - public scg::IList BoundingSphereList { - get { return pbc::Lists.AsReadOnly(boundingSphere_); } - } - public int BoundingSphereCount { - get { return boundingSphere_.Count; } - } - public float GetBoundingSphere(int index) { - return boundingSphere_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasObjectUuidEvidence) { - output.WriteBytes(2, ObjectUuidEvidence); - } - if (HasRequestedObjectLoc) { - output.WriteMessage(3, RequestedObjectLoc); - } - if (boundingSphere_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) boundingSphereMemoizedSerializedSize); - foreach (float element in boundingSphere_) { - output.WriteFloatNoTag(element); - } - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasObjectUuidEvidence) { - size += pb::CodedOutputStream.ComputeBytesSize(2, ObjectUuidEvidence); - } - if (HasRequestedObjectLoc) { - size += pb::CodedOutputStream.ComputeMessageSize(3, RequestedObjectLoc); - } - { - int dataSize = 0; - dataSize = 4 * boundingSphere_.Count; - size += dataSize; - if (boundingSphere_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - boundingSphereMemoizedSerializedSize = dataSize; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static NewObj ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static NewObj ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static NewObj ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static NewObj ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static NewObj ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static NewObj ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static NewObj ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static NewObj ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static NewObj ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static NewObj 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(NewObj prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - NewObj result = new NewObj(); - - protected override NewObj MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new NewObj(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.NewObj.Descriptor; } - } - - public override NewObj DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.NewObj.DefaultInstance; } - } - - public override NewObj BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.boundingSphere_.MakeReadOnly(); - NewObj returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is NewObj) { - return MergeFrom((NewObj) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(NewObj other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.NewObj.DefaultInstance) return this; - if (other.HasObjectUuidEvidence) { - ObjectUuidEvidence = other.ObjectUuidEvidence; - } - if (other.HasRequestedObjectLoc) { - MergeRequestedObjectLoc(other.RequestedObjectLoc); - } - if (other.boundingSphere_.Count != 0) { - base.AddRange(other.boundingSphere_, result.boundingSphere_); - } - 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 18: { - ObjectUuidEvidence = input.ReadBytes(); - break; - } - case 26: { - global::Sirikata.Protocol._PBJ_Internal.ObjLoc.Builder subBuilder = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.CreateBuilder(); - if (HasRequestedObjectLoc) { - subBuilder.MergeFrom(RequestedObjectLoc); - } - input.ReadMessage(subBuilder, extensionRegistry); - RequestedObjectLoc = subBuilder.BuildPartial(); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddBoundingSphere(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - } - } - } - - - public bool HasObjectUuidEvidence { - get { return result.HasObjectUuidEvidence; } - } - public pb::ByteString ObjectUuidEvidence { - get { return result.ObjectUuidEvidence; } - set { SetObjectUuidEvidence(value); } - } - public Builder SetObjectUuidEvidence(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasObjectUuidEvidence = true; - result.objectUuidEvidence_ = value; - return this; - } - public Builder ClearObjectUuidEvidence() { - result.hasObjectUuidEvidence = false; - result.objectUuidEvidence_ = pb::ByteString.Empty; - return this; - } - - public bool HasRequestedObjectLoc { - get { return result.HasRequestedObjectLoc; } - } - public global::Sirikata.Protocol._PBJ_Internal.ObjLoc RequestedObjectLoc { - get { return result.RequestedObjectLoc; } - set { SetRequestedObjectLoc(value); } - } - public Builder SetRequestedObjectLoc(global::Sirikata.Protocol._PBJ_Internal.ObjLoc value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasRequestedObjectLoc = true; - result.requestedObjectLoc_ = value; - return this; - } - public Builder SetRequestedObjectLoc(global::Sirikata.Protocol._PBJ_Internal.ObjLoc.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.hasRequestedObjectLoc = true; - result.requestedObjectLoc_ = builderForValue.Build(); - return this; - } - public Builder MergeRequestedObjectLoc(global::Sirikata.Protocol._PBJ_Internal.ObjLoc value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - if (result.HasRequestedObjectLoc && - result.requestedObjectLoc_ != global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance) { - result.requestedObjectLoc_ = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.CreateBuilder(result.requestedObjectLoc_).MergeFrom(value).BuildPartial(); - } else { - result.requestedObjectLoc_ = value; - } - result.hasRequestedObjectLoc = true; - return this; - } - public Builder ClearRequestedObjectLoc() { - result.hasRequestedObjectLoc = false; - result.requestedObjectLoc_ = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance; - return this; - } - - public pbc::IPopsicleList BoundingSphereList { - get { return result.boundingSphere_; } - } - public int BoundingSphereCount { - get { return result.BoundingSphereCount; } - } - public float GetBoundingSphere(int index) { - return result.GetBoundingSphere(index); - } - public Builder SetBoundingSphere(int index, float value) { - result.boundingSphere_[index] = value; - return this; - } - public Builder AddBoundingSphere(float value) { - result.boundingSphere_.Add(value); - return this; - } - public Builder AddRangeBoundingSphere(scg::IEnumerable values) { - base.AddRange(values, result.boundingSphere_); - return this; - } - public Builder ClearBoundingSphere() { - result.boundingSphere_.Clear(); - return this; - } - } - static NewObj() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class RetObj : pb::GeneratedMessage { - private static readonly RetObj defaultInstance = new Builder().BuildPartial(); - public static RetObj DefaultInstance { - get { return defaultInstance; } - } - - public override RetObj DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override RetObj ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_RetObj__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_RetObj__FieldAccessorTable; } - } - - public const int ObjectReferenceFieldNumber = 2; - private bool hasObjectReference; - private pb::ByteString objectReference_ = pb::ByteString.Empty; - public bool HasObjectReference { - get { return hasObjectReference; } - } - public pb::ByteString ObjectReference { - get { return objectReference_; } - } - - public const int LocationFieldNumber = 3; - private bool hasLocation; - private global::Sirikata.Protocol._PBJ_Internal.ObjLoc location_ = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance; - public bool HasLocation { - get { return hasLocation; } - } - public global::Sirikata.Protocol._PBJ_Internal.ObjLoc Location { - get { return location_; } - } - - public const int BoundingSphereFieldNumber = 4; - private int boundingSphereMemoizedSerializedSize; - private pbc::PopsicleList boundingSphere_ = new pbc::PopsicleList(); - public scg::IList BoundingSphereList { - get { return pbc::Lists.AsReadOnly(boundingSphere_); } - } - public int BoundingSphereCount { - get { return boundingSphere_.Count; } - } - public float GetBoundingSphere(int index) { - return boundingSphere_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasObjectReference) { - output.WriteBytes(2, ObjectReference); - } - if (HasLocation) { - output.WriteMessage(3, Location); - } - if (boundingSphere_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) boundingSphereMemoizedSerializedSize); - foreach (float element in boundingSphere_) { - output.WriteFloatNoTag(element); - } - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasObjectReference) { - size += pb::CodedOutputStream.ComputeBytesSize(2, ObjectReference); - } - if (HasLocation) { - size += pb::CodedOutputStream.ComputeMessageSize(3, Location); - } - { - int dataSize = 0; - dataSize = 4 * boundingSphere_.Count; - size += dataSize; - if (boundingSphere_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - boundingSphereMemoizedSerializedSize = dataSize; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static RetObj ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static RetObj ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static RetObj ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static RetObj ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static RetObj ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static RetObj ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static RetObj ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static RetObj ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static RetObj ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static RetObj 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(RetObj prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - RetObj result = new RetObj(); - - protected override RetObj MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new RetObj(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.RetObj.Descriptor; } - } - - public override RetObj DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.RetObj.DefaultInstance; } - } - - public override RetObj BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.boundingSphere_.MakeReadOnly(); - RetObj returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is RetObj) { - return MergeFrom((RetObj) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(RetObj other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.RetObj.DefaultInstance) return this; - if (other.HasObjectReference) { - ObjectReference = other.ObjectReference; - } - if (other.HasLocation) { - MergeLocation(other.Location); - } - if (other.boundingSphere_.Count != 0) { - base.AddRange(other.boundingSphere_, result.boundingSphere_); - } - 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 18: { - ObjectReference = input.ReadBytes(); - break; - } - case 26: { - global::Sirikata.Protocol._PBJ_Internal.ObjLoc.Builder subBuilder = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.CreateBuilder(); - if (HasLocation) { - subBuilder.MergeFrom(Location); - } - input.ReadMessage(subBuilder, extensionRegistry); - Location = subBuilder.BuildPartial(); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddBoundingSphere(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - } - } - } - - - public bool HasObjectReference { - get { return result.HasObjectReference; } - } - public pb::ByteString ObjectReference { - get { return result.ObjectReference; } - set { SetObjectReference(value); } - } - public Builder SetObjectReference(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasObjectReference = true; - result.objectReference_ = value; - return this; - } - public Builder ClearObjectReference() { - result.hasObjectReference = false; - result.objectReference_ = pb::ByteString.Empty; - return this; - } - - public bool HasLocation { - get { return result.HasLocation; } - } - public global::Sirikata.Protocol._PBJ_Internal.ObjLoc Location { - get { return result.Location; } - set { SetLocation(value); } - } - public Builder SetLocation(global::Sirikata.Protocol._PBJ_Internal.ObjLoc value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasLocation = true; - result.location_ = value; - return this; - } - public Builder SetLocation(global::Sirikata.Protocol._PBJ_Internal.ObjLoc.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.hasLocation = true; - result.location_ = builderForValue.Build(); - return this; - } - public Builder MergeLocation(global::Sirikata.Protocol._PBJ_Internal.ObjLoc value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - if (result.HasLocation && - result.location_ != global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance) { - result.location_ = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.CreateBuilder(result.location_).MergeFrom(value).BuildPartial(); - } else { - result.location_ = value; - } - result.hasLocation = true; - return this; - } - public Builder ClearLocation() { - result.hasLocation = false; - result.location_ = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance; - return this; - } - - public pbc::IPopsicleList BoundingSphereList { - get { return result.boundingSphere_; } - } - public int BoundingSphereCount { - get { return result.BoundingSphereCount; } - } - public float GetBoundingSphere(int index) { - return result.GetBoundingSphere(index); - } - public Builder SetBoundingSphere(int index, float value) { - result.boundingSphere_[index] = value; - return this; - } - public Builder AddBoundingSphere(float value) { - result.boundingSphere_.Add(value); - return this; - } - public Builder AddRangeBoundingSphere(scg::IEnumerable values) { - base.AddRange(values, result.boundingSphere_); - return this; - } - public Builder ClearBoundingSphere() { - result.boundingSphere_.Clear(); - return this; - } - } - static RetObj() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class DelObj : pb::GeneratedMessage { - private static readonly DelObj defaultInstance = new Builder().BuildPartial(); - public static DelObj DefaultInstance { - get { return defaultInstance; } - } - - public override DelObj DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override DelObj ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_DelObj__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_DelObj__FieldAccessorTable; } - } - - public const int ObjectReferenceFieldNumber = 2; - private bool hasObjectReference; - private pb::ByteString objectReference_ = pb::ByteString.Empty; - public bool HasObjectReference { - get { return hasObjectReference; } - } - public pb::ByteString ObjectReference { - get { return objectReference_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasObjectReference) { - output.WriteBytes(2, ObjectReference); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasObjectReference) { - size += pb::CodedOutputStream.ComputeBytesSize(2, ObjectReference); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static DelObj ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static DelObj ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static DelObj ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static DelObj ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static DelObj ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static DelObj ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static DelObj ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static DelObj ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static DelObj ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static DelObj 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(DelObj prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - DelObj result = new DelObj(); - - protected override DelObj MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new DelObj(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.DelObj.Descriptor; } - } - - public override DelObj DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.DelObj.DefaultInstance; } - } - - public override DelObj BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - DelObj returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is DelObj) { - return MergeFrom((DelObj) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(DelObj other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.DelObj.DefaultInstance) return this; - if (other.HasObjectReference) { - ObjectReference = other.ObjectReference; - } - 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 18: { - ObjectReference = input.ReadBytes(); - break; - } - } - } - } - - - public bool HasObjectReference { - get { return result.HasObjectReference; } - } - public pb::ByteString ObjectReference { - get { return result.ObjectReference; } - set { SetObjectReference(value); } - } - public Builder SetObjectReference(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasObjectReference = true; - result.objectReference_ = value; - return this; - } - public Builder ClearObjectReference() { - result.hasObjectReference = false; - result.objectReference_ = pb::ByteString.Empty; - return this; - } - } - static DelObj() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class NewProxQuery : pb::GeneratedMessage { - private static readonly NewProxQuery defaultInstance = new Builder().BuildPartial(); - public static NewProxQuery DefaultInstance { - get { return defaultInstance; } - } - - public override NewProxQuery DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override NewProxQuery ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_NewProxQuery__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_NewProxQuery__FieldAccessorTable; } - } - - public const int QueryIdFieldNumber = 2; - private bool hasQueryId; - private uint queryId_ = 0; - public bool HasQueryId { - get { return hasQueryId; } - } - [global::System.CLSCompliant(false)] - public uint QueryId { - get { return queryId_; } - } - - public const int StatelessFieldNumber = 3; - private bool hasStateless; - private bool stateless_ = false; - public bool HasStateless { - get { return hasStateless; } - } - public bool Stateless { - get { return stateless_; } - } - - public const int RelativeCenterFieldNumber = 4; - private int relativeCenterMemoizedSerializedSize; - private pbc::PopsicleList relativeCenter_ = new pbc::PopsicleList(); - public scg::IList RelativeCenterList { - get { return pbc::Lists.AsReadOnly(relativeCenter_); } - } - public int RelativeCenterCount { - get { return relativeCenter_.Count; } - } - public float GetRelativeCenter(int index) { - return relativeCenter_[index]; - } - - public const int AbsoluteCenterFieldNumber = 5; - private int absoluteCenterMemoizedSerializedSize; - private pbc::PopsicleList absoluteCenter_ = new pbc::PopsicleList(); - public scg::IList AbsoluteCenterList { - get { return pbc::Lists.AsReadOnly(absoluteCenter_); } - } - public int AbsoluteCenterCount { - get { return absoluteCenter_.Count; } - } - public double GetAbsoluteCenter(int index) { - return absoluteCenter_[index]; - } - - public const int MaxRadiusFieldNumber = 6; - private bool hasMaxRadius; - private float maxRadius_ = 0F; - public bool HasMaxRadius { - get { return hasMaxRadius; } - } - public float MaxRadius { - get { return maxRadius_; } - } - - public const int MinSolidAngleFieldNumber = 7; - private bool hasMinSolidAngle; - private float minSolidAngle_ = 0F; - public bool HasMinSolidAngle { - get { return hasMinSolidAngle; } - } - public float MinSolidAngle { - get { return minSolidAngle_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasQueryId) { - output.WriteUInt32(2, QueryId); - } - if (HasStateless) { - output.WriteBool(3, Stateless); - } - if (relativeCenter_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) relativeCenterMemoizedSerializedSize); - foreach (float element in relativeCenter_) { - output.WriteFloatNoTag(element); - } - } - if (absoluteCenter_.Count > 0) { - output.WriteRawVarint32(42); - output.WriteRawVarint32((uint) absoluteCenterMemoizedSerializedSize); - foreach (double element in absoluteCenter_) { - output.WriteDoubleNoTag(element); - } - } - if (HasMaxRadius) { - output.WriteFloat(6, MaxRadius); - } - if (HasMinSolidAngle) { - output.WriteFloat(7, MinSolidAngle); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasQueryId) { - size += pb::CodedOutputStream.ComputeUInt32Size(2, QueryId); - } - if (HasStateless) { - size += pb::CodedOutputStream.ComputeBoolSize(3, Stateless); - } - { - int dataSize = 0; - dataSize = 4 * relativeCenter_.Count; - size += dataSize; - if (relativeCenter_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - relativeCenterMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 8 * absoluteCenter_.Count; - size += dataSize; - if (absoluteCenter_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - absoluteCenterMemoizedSerializedSize = dataSize; - } - if (HasMaxRadius) { - size += pb::CodedOutputStream.ComputeFloatSize(6, MaxRadius); - } - if (HasMinSolidAngle) { - size += pb::CodedOutputStream.ComputeFloatSize(7, MinSolidAngle); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static NewProxQuery ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static NewProxQuery ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static NewProxQuery ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static NewProxQuery ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static NewProxQuery ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static NewProxQuery ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static NewProxQuery ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static NewProxQuery ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static NewProxQuery ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static NewProxQuery 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(NewProxQuery prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - NewProxQuery result = new NewProxQuery(); - - protected override NewProxQuery MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new NewProxQuery(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.NewProxQuery.Descriptor; } - } - - public override NewProxQuery DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.NewProxQuery.DefaultInstance; } - } - - public override NewProxQuery BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.relativeCenter_.MakeReadOnly(); - result.absoluteCenter_.MakeReadOnly(); - NewProxQuery returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is NewProxQuery) { - return MergeFrom((NewProxQuery) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(NewProxQuery other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.NewProxQuery.DefaultInstance) return this; - if (other.HasQueryId) { - QueryId = other.QueryId; - } - if (other.HasStateless) { - Stateless = other.Stateless; - } - if (other.relativeCenter_.Count != 0) { - base.AddRange(other.relativeCenter_, result.relativeCenter_); - } - if (other.absoluteCenter_.Count != 0) { - base.AddRange(other.absoluteCenter_, result.absoluteCenter_); - } - if (other.HasMaxRadius) { - MaxRadius = other.MaxRadius; - } - if (other.HasMinSolidAngle) { - MinSolidAngle = other.MinSolidAngle; - } - 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 16: { - QueryId = input.ReadUInt32(); - break; - } - case 24: { - Stateless = input.ReadBool(); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddRelativeCenter(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 42: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddAbsoluteCenter(input.ReadDouble()); - } - input.PopLimit(limit); - break; - } - case 53: { - MaxRadius = input.ReadFloat(); - break; - } - case 61: { - MinSolidAngle = input.ReadFloat(); - break; - } - } - } - } - - - public bool HasQueryId { - get { return result.HasQueryId; } - } - [global::System.CLSCompliant(false)] - public uint QueryId { - get { return result.QueryId; } - set { SetQueryId(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetQueryId(uint value) { - result.hasQueryId = true; - result.queryId_ = value; - return this; - } - public Builder ClearQueryId() { - result.hasQueryId = false; - result.queryId_ = 0; - return this; - } - - public bool HasStateless { - get { return result.HasStateless; } - } - public bool Stateless { - get { return result.Stateless; } - set { SetStateless(value); } - } - public Builder SetStateless(bool value) { - result.hasStateless = true; - result.stateless_ = value; - return this; - } - public Builder ClearStateless() { - result.hasStateless = false; - result.stateless_ = false; - return this; - } - - public pbc::IPopsicleList RelativeCenterList { - get { return result.relativeCenter_; } - } - public int RelativeCenterCount { - get { return result.RelativeCenterCount; } - } - public float GetRelativeCenter(int index) { - return result.GetRelativeCenter(index); - } - public Builder SetRelativeCenter(int index, float value) { - result.relativeCenter_[index] = value; - return this; - } - public Builder AddRelativeCenter(float value) { - result.relativeCenter_.Add(value); - return this; - } - public Builder AddRangeRelativeCenter(scg::IEnumerable values) { - base.AddRange(values, result.relativeCenter_); - return this; - } - public Builder ClearRelativeCenter() { - result.relativeCenter_.Clear(); - return this; - } - - public pbc::IPopsicleList AbsoluteCenterList { - get { return result.absoluteCenter_; } - } - public int AbsoluteCenterCount { - get { return result.AbsoluteCenterCount; } - } - public double GetAbsoluteCenter(int index) { - return result.GetAbsoluteCenter(index); - } - public Builder SetAbsoluteCenter(int index, double value) { - result.absoluteCenter_[index] = value; - return this; - } - public Builder AddAbsoluteCenter(double value) { - result.absoluteCenter_.Add(value); - return this; - } - public Builder AddRangeAbsoluteCenter(scg::IEnumerable values) { - base.AddRange(values, result.absoluteCenter_); - return this; - } - public Builder ClearAbsoluteCenter() { - result.absoluteCenter_.Clear(); - return this; - } - - public bool HasMaxRadius { - get { return result.HasMaxRadius; } - } - public float MaxRadius { - get { return result.MaxRadius; } - set { SetMaxRadius(value); } - } - public Builder SetMaxRadius(float value) { - result.hasMaxRadius = true; - result.maxRadius_ = value; - return this; - } - public Builder ClearMaxRadius() { - result.hasMaxRadius = false; - result.maxRadius_ = 0F; - return this; - } - - public bool HasMinSolidAngle { - get { return result.HasMinSolidAngle; } - } - public float MinSolidAngle { - get { return result.MinSolidAngle; } - set { SetMinSolidAngle(value); } - } - public Builder SetMinSolidAngle(float value) { - result.hasMinSolidAngle = true; - result.minSolidAngle_ = value; - return this; - } - public Builder ClearMinSolidAngle() { - result.hasMinSolidAngle = false; - result.minSolidAngle_ = 0F; - return this; - } - } - static NewProxQuery() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class ProxCall : pb::GeneratedMessage { - private static readonly ProxCall defaultInstance = new Builder().BuildPartial(); - public static ProxCall DefaultInstance { - get { return defaultInstance; } - } - - public override ProxCall DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override ProxCall ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ProxCall__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ProxCall__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum ProximityEvent { - EXITED_PROXIMITY = 0, - ENTERED_PROXIMITY = 1, - STATELESS_PROXIMITY = 2, - } - - } - #endregion - - public const int QueryIdFieldNumber = 2; - private bool hasQueryId; - private uint queryId_ = 0; - public bool HasQueryId { - get { return hasQueryId; } - } - [global::System.CLSCompliant(false)] - public uint QueryId { - get { return queryId_; } - } - - public const int ProximateObjectFieldNumber = 3; - private bool hasProximateObject; - private pb::ByteString proximateObject_ = pb::ByteString.Empty; - public bool HasProximateObject { - get { return hasProximateObject; } - } - public pb::ByteString ProximateObject { - get { return proximateObject_; } - } - - public const int ProximityEventFieldNumber = 4; - private bool hasProximityEvent; - private global::Sirikata.Protocol._PBJ_Internal.ProxCall.Types.ProximityEvent proximityEvent_ = global::Sirikata.Protocol._PBJ_Internal.ProxCall.Types.ProximityEvent.EXITED_PROXIMITY; - public bool HasProximityEvent { - get { return hasProximityEvent; } - } - public global::Sirikata.Protocol._PBJ_Internal.ProxCall.Types.ProximityEvent ProximityEvent { - get { return proximityEvent_; } - } - - public override bool IsInitialized { - get { - if (!hasQueryId) return false; - if (!hasProximateObject) return false; - if (!hasProximityEvent) return false; - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasQueryId) { - output.WriteUInt32(2, QueryId); - } - if (HasProximateObject) { - output.WriteBytes(3, ProximateObject); - } - if (HasProximityEvent) { - output.WriteEnum(4, (int) ProximityEvent); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasQueryId) { - size += pb::CodedOutputStream.ComputeUInt32Size(2, QueryId); - } - if (HasProximateObject) { - size += pb::CodedOutputStream.ComputeBytesSize(3, ProximateObject); - } - if (HasProximityEvent) { - size += pb::CodedOutputStream.ComputeEnumSize(4, (int) ProximityEvent); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static ProxCall ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ProxCall ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ProxCall ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ProxCall ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ProxCall ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ProxCall ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static ProxCall ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static ProxCall ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static ProxCall ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ProxCall 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(ProxCall prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - ProxCall result = new ProxCall(); - - protected override ProxCall MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new ProxCall(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ProxCall.Descriptor; } - } - - public override ProxCall DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ProxCall.DefaultInstance; } - } - - public override ProxCall BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - ProxCall returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is ProxCall) { - return MergeFrom((ProxCall) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(ProxCall other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.ProxCall.DefaultInstance) return this; - if (other.HasQueryId) { - QueryId = other.QueryId; - } - if (other.HasProximateObject) { - ProximateObject = other.ProximateObject; - } - if (other.HasProximityEvent) { - ProximityEvent = other.ProximityEvent; - } - 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 16: { - QueryId = input.ReadUInt32(); - break; - } - case 26: { - ProximateObject = input.ReadBytes(); - break; - } - case 32: { - int rawValue = input.ReadEnum(); - if (!global::System.Enum.IsDefined(typeof(global::Sirikata.Protocol._PBJ_Internal.ProxCall.Types.ProximityEvent), rawValue)) { - if (unknownFields == null) { - unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); - } - unknownFields.MergeVarintField(4, (ulong) rawValue); - } else { - ProximityEvent = (global::Sirikata.Protocol._PBJ_Internal.ProxCall.Types.ProximityEvent) rawValue; - } - break; - } - } - } - } - - - public bool HasQueryId { - get { return result.HasQueryId; } - } - [global::System.CLSCompliant(false)] - public uint QueryId { - get { return result.QueryId; } - set { SetQueryId(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetQueryId(uint value) { - result.hasQueryId = true; - result.queryId_ = value; - return this; - } - public Builder ClearQueryId() { - result.hasQueryId = false; - result.queryId_ = 0; - return this; - } - - public bool HasProximateObject { - get { return result.HasProximateObject; } - } - public pb::ByteString ProximateObject { - get { return result.ProximateObject; } - set { SetProximateObject(value); } - } - public Builder SetProximateObject(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasProximateObject = true; - result.proximateObject_ = value; - return this; - } - public Builder ClearProximateObject() { - result.hasProximateObject = false; - result.proximateObject_ = pb::ByteString.Empty; - return this; - } - - public bool HasProximityEvent { - get { return result.HasProximityEvent; } - } - public global::Sirikata.Protocol._PBJ_Internal.ProxCall.Types.ProximityEvent ProximityEvent { - get { return result.ProximityEvent; } - set { SetProximityEvent(value); } - } - public Builder SetProximityEvent(global::Sirikata.Protocol._PBJ_Internal.ProxCall.Types.ProximityEvent value) { - result.hasProximityEvent = true; - result.proximityEvent_ = value; - return this; - } - public Builder ClearProximityEvent() { - result.hasProximityEvent = false; - result.proximityEvent_ = global::Sirikata.Protocol._PBJ_Internal.ProxCall.Types.ProximityEvent.EXITED_PROXIMITY; - return this; - } - } - static ProxCall() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class DelProxQuery : pb::GeneratedMessage { - private static readonly DelProxQuery defaultInstance = new Builder().BuildPartial(); - public static DelProxQuery DefaultInstance { - get { return defaultInstance; } - } - - public override DelProxQuery DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override DelProxQuery ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_DelProxQuery__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_DelProxQuery__FieldAccessorTable; } - } - - public const int QueryIdFieldNumber = 2; - private bool hasQueryId; - private uint queryId_ = 0; - public bool HasQueryId { - get { return hasQueryId; } - } - [global::System.CLSCompliant(false)] - public uint QueryId { - get { return queryId_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasQueryId) { - output.WriteUInt32(2, QueryId); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasQueryId) { - size += pb::CodedOutputStream.ComputeUInt32Size(2, QueryId); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static DelProxQuery ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static DelProxQuery ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static DelProxQuery ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static DelProxQuery ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static DelProxQuery ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static DelProxQuery ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static DelProxQuery ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static DelProxQuery ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static DelProxQuery ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static DelProxQuery 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(DelProxQuery prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - DelProxQuery result = new DelProxQuery(); - - protected override DelProxQuery MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new DelProxQuery(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.DelProxQuery.Descriptor; } - } - - public override DelProxQuery DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.DelProxQuery.DefaultInstance; } - } - - public override DelProxQuery BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - DelProxQuery returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is DelProxQuery) { - return MergeFrom((DelProxQuery) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(DelProxQuery other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.DelProxQuery.DefaultInstance) return this; - if (other.HasQueryId) { - QueryId = other.QueryId; - } - 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 16: { - QueryId = input.ReadUInt32(); - break; - } - } - } - } - - - public bool HasQueryId { - get { return result.HasQueryId; } - } - [global::System.CLSCompliant(false)] - public uint QueryId { - get { return result.QueryId; } - set { SetQueryId(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetQueryId(uint value) { - result.hasQueryId = true; - result.queryId_ = value; - return this; - } - public Builder ClearQueryId() { - result.hasQueryId = false; - result.queryId_ = 0; - return this; - } - } - static DelProxQuery() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class Vector3fProperty : pb::GeneratedMessage { - private static readonly Vector3fProperty defaultInstance = new Builder().BuildPartial(); - public static Vector3fProperty DefaultInstance { - get { return defaultInstance; } - } - - public override Vector3fProperty DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override Vector3fProperty ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_Vector3fProperty__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_Vector3fProperty__FieldAccessorTable; } - } - - public const int ValueFieldNumber = 10; - private int valueMemoizedSerializedSize; - private pbc::PopsicleList value_ = new pbc::PopsicleList(); - public scg::IList ValueList { - get { return pbc::Lists.AsReadOnly(value_); } - } - public int ValueCount { - get { return value_.Count; } - } - public float GetValue(int index) { - return value_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (value_.Count > 0) { - output.WriteRawVarint32(82); - output.WriteRawVarint32((uint) valueMemoizedSerializedSize); - foreach (float element in value_) { - output.WriteFloatNoTag(element); - } - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * value_.Count; - size += dataSize; - if (value_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - valueMemoizedSerializedSize = dataSize; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static Vector3fProperty ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static Vector3fProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static Vector3fProperty ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static Vector3fProperty ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static Vector3fProperty ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static Vector3fProperty ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static Vector3fProperty ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static Vector3fProperty ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static Vector3fProperty ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static Vector3fProperty 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(Vector3fProperty prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - Vector3fProperty result = new Vector3fProperty(); - - protected override Vector3fProperty MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new Vector3fProperty(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.Vector3fProperty.Descriptor; } - } - - public override Vector3fProperty DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.Vector3fProperty.DefaultInstance; } - } - - public override Vector3fProperty BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.value_.MakeReadOnly(); - Vector3fProperty returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is Vector3fProperty) { - return MergeFrom((Vector3fProperty) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(Vector3fProperty other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.Vector3fProperty.DefaultInstance) return this; - if (other.value_.Count != 0) { - base.AddRange(other.value_, result.value_); - } - 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 82: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddValue(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - } - } - } - - - public pbc::IPopsicleList ValueList { - get { return result.value_; } - } - public int ValueCount { - get { return result.ValueCount; } - } - public float GetValue(int index) { - return result.GetValue(index); - } - public Builder SetValue(int index, float value) { - result.value_[index] = value; - return this; - } - public Builder AddValue(float value) { - result.value_.Add(value); - return this; - } - public Builder AddRangeValue(scg::IEnumerable values) { - base.AddRange(values, result.value_); - return this; - } - public Builder ClearValue() { - result.value_.Clear(); - return this; - } - } - static Vector3fProperty() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class StringProperty : pb::GeneratedMessage { - private static readonly StringProperty defaultInstance = new Builder().BuildPartial(); - public static StringProperty DefaultInstance { - get { return defaultInstance; } - } - - public override StringProperty DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override StringProperty ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_StringProperty__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_StringProperty__FieldAccessorTable; } - } - - public const int ValueFieldNumber = 10; - private bool hasValue; - private string value_ = ""; - public bool HasValue { - get { return hasValue; } - } - public string Value { - get { return value_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasValue) { - output.WriteString(10, Value); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasValue) { - size += pb::CodedOutputStream.ComputeStringSize(10, Value); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static StringProperty ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StringProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StringProperty ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StringProperty ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StringProperty ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StringProperty ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static StringProperty ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static StringProperty ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static StringProperty ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StringProperty 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(StringProperty prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - StringProperty result = new StringProperty(); - - protected override StringProperty MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new StringProperty(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.StringProperty.Descriptor; } - } - - public override StringProperty DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.StringProperty.DefaultInstance; } - } - - public override StringProperty BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - StringProperty returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is StringProperty) { - return MergeFrom((StringProperty) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(StringProperty other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.StringProperty.DefaultInstance) return this; - if (other.HasValue) { - Value = other.Value; - } - 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 82: { - Value = input.ReadString(); - break; - } - } - } - } - - - public bool HasValue { - get { return result.HasValue; } - } - public string Value { - get { return result.Value; } - set { SetValue(value); } - } - public Builder SetValue(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasValue = true; - result.value_ = value; - return this; - } - public Builder ClearValue() { - result.hasValue = false; - result.value_ = ""; - return this; - } - } - static StringProperty() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class StringMapProperty : pb::GeneratedMessage { - private static readonly StringMapProperty defaultInstance = new Builder().BuildPartial(); - public static StringMapProperty DefaultInstance { - get { return defaultInstance; } - } - - public override StringMapProperty DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override StringMapProperty ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_StringMapProperty__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_StringMapProperty__FieldAccessorTable; } - } - - public const int KeysFieldNumber = 2; - private pbc::PopsicleList keys_ = new pbc::PopsicleList(); - public scg::IList KeysList { - get { return pbc::Lists.AsReadOnly(keys_); } - } - public int KeysCount { - get { return keys_.Count; } - } - public string GetKeys(int index) { - return keys_[index]; - } - - public const int ValuesFieldNumber = 3; - private pbc::PopsicleList values_ = new pbc::PopsicleList(); - public scg::IList ValuesList { - get { return pbc::Lists.AsReadOnly(values_); } - } - public int ValuesCount { - get { return values_.Count; } - } - public string GetValues(int index) { - return values_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (keys_.Count > 0) { - foreach (string element in keys_) { - output.WriteString(2, element); - } - } - if (values_.Count > 0) { - foreach (string element in values_) { - output.WriteString(3, element); - } - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - foreach (string element in KeysList) { - dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); - } - size += dataSize; - size += 1 * keys_.Count; - } - { - int dataSize = 0; - foreach (string element in ValuesList) { - dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); - } - size += dataSize; - size += 1 * values_.Count; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static StringMapProperty ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StringMapProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StringMapProperty ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static StringMapProperty ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static StringMapProperty ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StringMapProperty ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static StringMapProperty ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static StringMapProperty ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static StringMapProperty ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static StringMapProperty 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(StringMapProperty prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - StringMapProperty result = new StringMapProperty(); - - protected override StringMapProperty MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new StringMapProperty(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.StringMapProperty.Descriptor; } - } - - public override StringMapProperty DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.StringMapProperty.DefaultInstance; } - } - - public override StringMapProperty BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.keys_.MakeReadOnly(); - result.values_.MakeReadOnly(); - StringMapProperty returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is StringMapProperty) { - return MergeFrom((StringMapProperty) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(StringMapProperty other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.StringMapProperty.DefaultInstance) return this; - if (other.keys_.Count != 0) { - base.AddRange(other.keys_, result.keys_); - } - if (other.values_.Count != 0) { - base.AddRange(other.values_, result.values_); - } - 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 18: { - AddKeys(input.ReadString()); - break; - } - case 26: { - AddValues(input.ReadString()); - break; - } - } - } - } - - - public pbc::IPopsicleList KeysList { - get { return result.keys_; } - } - public int KeysCount { - get { return result.KeysCount; } - } - public string GetKeys(int index) { - return result.GetKeys(index); - } - public Builder SetKeys(int index, string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.keys_[index] = value; - return this; - } - public Builder AddKeys(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.keys_.Add(value); - return this; - } - public Builder AddRangeKeys(scg::IEnumerable values) { - base.AddRange(values, result.keys_); - return this; - } - public Builder ClearKeys() { - result.keys_.Clear(); - return this; - } - - public pbc::IPopsicleList ValuesList { - get { return result.values_; } - } - public int ValuesCount { - get { return result.ValuesCount; } - } - public string GetValues(int index) { - return result.GetValues(index); - } - public Builder SetValues(int index, string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.values_[index] = value; - return this; - } - public Builder AddValues(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.values_.Add(value); - return this; - } - public Builder AddRangeValues(scg::IEnumerable values) { - base.AddRange(values, result.values_); - return this; - } - public Builder ClearValues() { - result.values_.Clear(); - return this; - } - } - static StringMapProperty() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class PhysicalParameters : pb::GeneratedMessage { - private static readonly PhysicalParameters defaultInstance = new Builder().BuildPartial(); - public static PhysicalParameters DefaultInstance { - get { return defaultInstance; } - } - - public override PhysicalParameters DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override PhysicalParameters ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_PhysicalParameters__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_PhysicalParameters__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum Mode { - NONPHYSICAL = 0, - STATIC = 1, - DYNAMICBOX = 2, - DYNAMICSPHERE = 3, - DYNAMICCYLINDER = 4, - CHARACTER = 5, - } - - } - #endregion - - public const int ModeFieldNumber = 2; - private bool hasMode; - private global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Types.Mode mode_ = global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Types.Mode.NONPHYSICAL; - public bool HasMode { - get { return hasMode; } - } - public global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Types.Mode Mode { - get { return mode_; } - } - - public const int DensityFieldNumber = 3; - private bool hasDensity; - private float density_ = 0F; - public bool HasDensity { - get { return hasDensity; } - } - public float Density { - get { return density_; } - } - - public const int FrictionFieldNumber = 4; - private bool hasFriction; - private float friction_ = 0F; - public bool HasFriction { - get { return hasFriction; } - } - public float Friction { - get { return friction_; } - } - - public const int BounceFieldNumber = 5; - private bool hasBounce; - private float bounce_ = 0F; - public bool HasBounce { - get { return hasBounce; } - } - public float Bounce { - get { return bounce_; } - } - - public const int HullFieldNumber = 6; - private int hullMemoizedSerializedSize; - private pbc::PopsicleList hull_ = new pbc::PopsicleList(); - public scg::IList HullList { - get { return pbc::Lists.AsReadOnly(hull_); } - } - public int HullCount { - get { return hull_.Count; } - } - public float GetHull(int index) { - return hull_[index]; - } - - public const int CollideMsgFieldNumber = 16; - private bool hasCollideMsg; - private uint collideMsg_ = 0; - public bool HasCollideMsg { - get { return hasCollideMsg; } - } - [global::System.CLSCompliant(false)] - public uint CollideMsg { - get { return collideMsg_; } - } - - public const int CollideMaskFieldNumber = 17; - private bool hasCollideMask; - private uint collideMask_ = 0; - public bool HasCollideMask { - get { return hasCollideMask; } - } - [global::System.CLSCompliant(false)] - public uint CollideMask { - get { return collideMask_; } - } - - public const int GravityFieldNumber = 18; - private bool hasGravity; - private float gravity_ = 0F; - public bool HasGravity { - get { return hasGravity; } - } - public float Gravity { - get { return gravity_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasMode) { - output.WriteEnum(2, (int) Mode); - } - if (HasDensity) { - output.WriteFloat(3, Density); - } - if (HasFriction) { - output.WriteFloat(4, Friction); - } - if (HasBounce) { - output.WriteFloat(5, Bounce); - } - if (hull_.Count > 0) { - output.WriteRawVarint32(50); - output.WriteRawVarint32((uint) hullMemoizedSerializedSize); - foreach (float element in hull_) { - output.WriteFloatNoTag(element); - } - } - if (HasCollideMsg) { - output.WriteUInt32(16, CollideMsg); - } - if (HasCollideMask) { - output.WriteUInt32(17, CollideMask); - } - if (HasGravity) { - output.WriteFloat(18, Gravity); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasMode) { - size += pb::CodedOutputStream.ComputeEnumSize(2, (int) Mode); - } - if (HasDensity) { - size += pb::CodedOutputStream.ComputeFloatSize(3, Density); - } - if (HasFriction) { - size += pb::CodedOutputStream.ComputeFloatSize(4, Friction); - } - if (HasBounce) { - size += pb::CodedOutputStream.ComputeFloatSize(5, Bounce); - } - { - int dataSize = 0; - dataSize = 4 * hull_.Count; - size += dataSize; - if (hull_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - hullMemoizedSerializedSize = dataSize; - } - if (HasCollideMsg) { - size += pb::CodedOutputStream.ComputeUInt32Size(16, CollideMsg); - } - if (HasCollideMask) { - size += pb::CodedOutputStream.ComputeUInt32Size(17, CollideMask); - } - if (HasGravity) { - size += pb::CodedOutputStream.ComputeFloatSize(18, Gravity); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static PhysicalParameters ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static PhysicalParameters ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static PhysicalParameters ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static PhysicalParameters ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static PhysicalParameters ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static PhysicalParameters ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static PhysicalParameters ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static PhysicalParameters ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static PhysicalParameters ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static PhysicalParameters 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(PhysicalParameters prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - PhysicalParameters result = new PhysicalParameters(); - - protected override PhysicalParameters MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new PhysicalParameters(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Descriptor; } - } - - public override PhysicalParameters DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.DefaultInstance; } - } - - public override PhysicalParameters BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.hull_.MakeReadOnly(); - PhysicalParameters returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is PhysicalParameters) { - return MergeFrom((PhysicalParameters) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(PhysicalParameters other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.DefaultInstance) return this; - if (other.HasMode) { - Mode = other.Mode; - } - if (other.HasDensity) { - Density = other.Density; - } - if (other.HasFriction) { - Friction = other.Friction; - } - if (other.HasBounce) { - Bounce = other.Bounce; - } - if (other.hull_.Count != 0) { - base.AddRange(other.hull_, result.hull_); - } - if (other.HasCollideMsg) { - CollideMsg = other.CollideMsg; - } - if (other.HasCollideMask) { - CollideMask = other.CollideMask; - } - if (other.HasGravity) { - Gravity = other.Gravity; - } - 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 16: { - int rawValue = input.ReadEnum(); - if (!global::System.Enum.IsDefined(typeof(global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Types.Mode), rawValue)) { - if (unknownFields == null) { - unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); - } - unknownFields.MergeVarintField(2, (ulong) rawValue); - } else { - Mode = (global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Types.Mode) rawValue; - } - break; - } - case 29: { - Density = input.ReadFloat(); - break; - } - case 37: { - Friction = input.ReadFloat(); - break; - } - case 45: { - Bounce = input.ReadFloat(); - break; - } - case 50: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddHull(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 128: { - CollideMsg = input.ReadUInt32(); - break; - } - case 136: { - CollideMask = input.ReadUInt32(); - break; - } - case 149: { - Gravity = input.ReadFloat(); - break; - } - } - } - } - - - public bool HasMode { - get { return result.HasMode; } - } - public global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Types.Mode Mode { - get { return result.Mode; } - set { SetMode(value); } - } - public Builder SetMode(global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Types.Mode value) { - result.hasMode = true; - result.mode_ = value; - return this; - } - public Builder ClearMode() { - result.hasMode = false; - result.mode_ = global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Types.Mode.NONPHYSICAL; - return this; - } - - public bool HasDensity { - get { return result.HasDensity; } - } - public float Density { - get { return result.Density; } - set { SetDensity(value); } - } - public Builder SetDensity(float value) { - result.hasDensity = true; - result.density_ = value; - return this; - } - public Builder ClearDensity() { - result.hasDensity = false; - result.density_ = 0F; - return this; - } - - public bool HasFriction { - get { return result.HasFriction; } - } - public float Friction { - get { return result.Friction; } - set { SetFriction(value); } - } - public Builder SetFriction(float value) { - result.hasFriction = true; - result.friction_ = value; - return this; - } - public Builder ClearFriction() { - result.hasFriction = false; - result.friction_ = 0F; - return this; - } - - public bool HasBounce { - get { return result.HasBounce; } - } - public float Bounce { - get { return result.Bounce; } - set { SetBounce(value); } - } - public Builder SetBounce(float value) { - result.hasBounce = true; - result.bounce_ = value; - return this; - } - public Builder ClearBounce() { - result.hasBounce = false; - result.bounce_ = 0F; - return this; - } - - public pbc::IPopsicleList HullList { - get { return result.hull_; } - } - public int HullCount { - get { return result.HullCount; } - } - public float GetHull(int index) { - return result.GetHull(index); - } - public Builder SetHull(int index, float value) { - result.hull_[index] = value; - return this; - } - public Builder AddHull(float value) { - result.hull_.Add(value); - return this; - } - public Builder AddRangeHull(scg::IEnumerable values) { - base.AddRange(values, result.hull_); - return this; - } - public Builder ClearHull() { - result.hull_.Clear(); - return this; - } - - public bool HasCollideMsg { - get { return result.HasCollideMsg; } - } - [global::System.CLSCompliant(false)] - public uint CollideMsg { - get { return result.CollideMsg; } - set { SetCollideMsg(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetCollideMsg(uint value) { - result.hasCollideMsg = true; - result.collideMsg_ = value; - return this; - } - public Builder ClearCollideMsg() { - result.hasCollideMsg = false; - result.collideMsg_ = 0; - return this; - } - - public bool HasCollideMask { - get { return result.HasCollideMask; } - } - [global::System.CLSCompliant(false)] - public uint CollideMask { - get { return result.CollideMask; } - set { SetCollideMask(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetCollideMask(uint value) { - result.hasCollideMask = true; - result.collideMask_ = value; - return this; - } - public Builder ClearCollideMask() { - result.hasCollideMask = false; - result.collideMask_ = 0; - return this; - } - - public bool HasGravity { - get { return result.HasGravity; } - } - public float Gravity { - get { return result.Gravity; } - set { SetGravity(value); } - } - public Builder SetGravity(float value) { - result.hasGravity = true; - result.gravity_ = value; - return this; - } - public Builder ClearGravity() { - result.hasGravity = false; - result.gravity_ = 0F; - return this; - } - } - static PhysicalParameters() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class LightInfoProperty : pb::GeneratedMessage { - private static readonly LightInfoProperty defaultInstance = new Builder().BuildPartial(); - public static LightInfoProperty DefaultInstance { - get { return defaultInstance; } - } - - public override LightInfoProperty DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override LightInfoProperty ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_LightInfoProperty__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_LightInfoProperty__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum LightTypes { - POINT = 0, - SPOTLIGHT = 1, - DIRECTIONAL = 2, - } - - } - #endregion - - public const int DiffuseColorFieldNumber = 3; - private int diffuseColorMemoizedSerializedSize; - private pbc::PopsicleList diffuseColor_ = new pbc::PopsicleList(); - public scg::IList DiffuseColorList { - get { return pbc::Lists.AsReadOnly(diffuseColor_); } - } - public int DiffuseColorCount { - get { return diffuseColor_.Count; } - } - public float GetDiffuseColor(int index) { - return diffuseColor_[index]; - } - - public const int SpecularColorFieldNumber = 4; - private int specularColorMemoizedSerializedSize; - private pbc::PopsicleList specularColor_ = new pbc::PopsicleList(); - public scg::IList SpecularColorList { - get { return pbc::Lists.AsReadOnly(specularColor_); } - } - public int SpecularColorCount { - get { return specularColor_.Count; } - } - public float GetSpecularColor(int index) { - return specularColor_[index]; - } - - public const int PowerFieldNumber = 5; - private bool hasPower; - private float power_ = 0F; - public bool HasPower { - get { return hasPower; } - } - public float Power { - get { return power_; } - } - - public const int AmbientColorFieldNumber = 6; - private int ambientColorMemoizedSerializedSize; - private pbc::PopsicleList ambientColor_ = new pbc::PopsicleList(); - public scg::IList AmbientColorList { - get { return pbc::Lists.AsReadOnly(ambientColor_); } - } - public int AmbientColorCount { - get { return ambientColor_.Count; } - } - public float GetAmbientColor(int index) { - return ambientColor_[index]; - } - - public const int ShadowColorFieldNumber = 7; - private int shadowColorMemoizedSerializedSize; - private pbc::PopsicleList shadowColor_ = new pbc::PopsicleList(); - public scg::IList ShadowColorList { - get { return pbc::Lists.AsReadOnly(shadowColor_); } - } - public int ShadowColorCount { - get { return shadowColor_.Count; } - } - public float GetShadowColor(int index) { - return shadowColor_[index]; - } - - public const int LightRangeFieldNumber = 8; - private bool hasLightRange; - private double lightRange_ = 0D; - public bool HasLightRange { - get { return hasLightRange; } - } - public double LightRange { - get { return lightRange_; } - } - - public const int ConstantFalloffFieldNumber = 9; - private bool hasConstantFalloff; - private float constantFalloff_ = 0F; - public bool HasConstantFalloff { - get { return hasConstantFalloff; } - } - public float ConstantFalloff { - get { return constantFalloff_; } - } - - public const int LinearFalloffFieldNumber = 10; - private bool hasLinearFalloff; - private float linearFalloff_ = 0F; - public bool HasLinearFalloff { - get { return hasLinearFalloff; } - } - public float LinearFalloff { - get { return linearFalloff_; } - } - - public const int QuadraticFalloffFieldNumber = 11; - private bool hasQuadraticFalloff; - private float quadraticFalloff_ = 0F; - public bool HasQuadraticFalloff { - get { return hasQuadraticFalloff; } - } - public float QuadraticFalloff { - get { return quadraticFalloff_; } - } - - public const int ConeInnerRadiansFieldNumber = 12; - private bool hasConeInnerRadians; - private float coneInnerRadians_ = 0F; - public bool HasConeInnerRadians { - get { return hasConeInnerRadians; } - } - public float ConeInnerRadians { - get { return coneInnerRadians_; } - } - - public const int ConeOuterRadiansFieldNumber = 13; - private bool hasConeOuterRadians; - private float coneOuterRadians_ = 0F; - public bool HasConeOuterRadians { - get { return hasConeOuterRadians; } - } - public float ConeOuterRadians { - get { return coneOuterRadians_; } - } - - public const int ConeFalloffFieldNumber = 14; - private bool hasConeFalloff; - private float coneFalloff_ = 0F; - public bool HasConeFalloff { - get { return hasConeFalloff; } - } - public float ConeFalloff { - get { return coneFalloff_; } - } - - public const int TypeFieldNumber = 15; - private bool hasType; - private global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Types.LightTypes type_ = global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Types.LightTypes.POINT; - public bool HasType { - get { return hasType; } - } - public global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Types.LightTypes Type { - get { return type_; } - } - - public const int CastsShadowFieldNumber = 16; - private bool hasCastsShadow; - private bool castsShadow_ = false; - public bool HasCastsShadow { - get { return hasCastsShadow; } - } - public bool CastsShadow { - get { return castsShadow_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (diffuseColor_.Count > 0) { - output.WriteRawVarint32(26); - output.WriteRawVarint32((uint) diffuseColorMemoizedSerializedSize); - foreach (float element in diffuseColor_) { - output.WriteFloatNoTag(element); - } - } - if (specularColor_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) specularColorMemoizedSerializedSize); - foreach (float element in specularColor_) { - output.WriteFloatNoTag(element); - } - } - if (HasPower) { - output.WriteFloat(5, Power); - } - if (ambientColor_.Count > 0) { - output.WriteRawVarint32(50); - output.WriteRawVarint32((uint) ambientColorMemoizedSerializedSize); - foreach (float element in ambientColor_) { - output.WriteFloatNoTag(element); - } - } - if (shadowColor_.Count > 0) { - output.WriteRawVarint32(58); - output.WriteRawVarint32((uint) shadowColorMemoizedSerializedSize); - foreach (float element in shadowColor_) { - output.WriteFloatNoTag(element); - } - } - if (HasLightRange) { - output.WriteDouble(8, LightRange); - } - if (HasConstantFalloff) { - output.WriteFloat(9, ConstantFalloff); - } - if (HasLinearFalloff) { - output.WriteFloat(10, LinearFalloff); - } - if (HasQuadraticFalloff) { - output.WriteFloat(11, QuadraticFalloff); - } - if (HasConeInnerRadians) { - output.WriteFloat(12, ConeInnerRadians); - } - if (HasConeOuterRadians) { - output.WriteFloat(13, ConeOuterRadians); - } - if (HasConeFalloff) { - output.WriteFloat(14, ConeFalloff); - } - if (HasType) { - output.WriteEnum(15, (int) Type); - } - if (HasCastsShadow) { - output.WriteBool(16, CastsShadow); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 4 * diffuseColor_.Count; - size += dataSize; - if (diffuseColor_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - diffuseColorMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * specularColor_.Count; - size += dataSize; - if (specularColor_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - specularColorMemoizedSerializedSize = dataSize; - } - if (HasPower) { - size += pb::CodedOutputStream.ComputeFloatSize(5, Power); - } - { - int dataSize = 0; - dataSize = 4 * ambientColor_.Count; - size += dataSize; - if (ambientColor_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - ambientColorMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * shadowColor_.Count; - size += dataSize; - if (shadowColor_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - shadowColorMemoizedSerializedSize = dataSize; - } - if (HasLightRange) { - size += pb::CodedOutputStream.ComputeDoubleSize(8, LightRange); - } - if (HasConstantFalloff) { - size += pb::CodedOutputStream.ComputeFloatSize(9, ConstantFalloff); - } - if (HasLinearFalloff) { - size += pb::CodedOutputStream.ComputeFloatSize(10, LinearFalloff); - } - if (HasQuadraticFalloff) { - size += pb::CodedOutputStream.ComputeFloatSize(11, QuadraticFalloff); - } - if (HasConeInnerRadians) { - size += pb::CodedOutputStream.ComputeFloatSize(12, ConeInnerRadians); - } - if (HasConeOuterRadians) { - size += pb::CodedOutputStream.ComputeFloatSize(13, ConeOuterRadians); - } - if (HasConeFalloff) { - size += pb::CodedOutputStream.ComputeFloatSize(14, ConeFalloff); - } - if (HasType) { - size += pb::CodedOutputStream.ComputeEnumSize(15, (int) Type); - } - if (HasCastsShadow) { - size += pb::CodedOutputStream.ComputeBoolSize(16, CastsShadow); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static LightInfoProperty ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static LightInfoProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static LightInfoProperty ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static LightInfoProperty ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static LightInfoProperty ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static LightInfoProperty ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static LightInfoProperty ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static LightInfoProperty ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static LightInfoProperty ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static LightInfoProperty 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(LightInfoProperty prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - LightInfoProperty result = new LightInfoProperty(); - - protected override LightInfoProperty MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new LightInfoProperty(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Descriptor; } - } - - public override LightInfoProperty DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.DefaultInstance; } - } - - public override LightInfoProperty BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.diffuseColor_.MakeReadOnly(); - result.specularColor_.MakeReadOnly(); - result.ambientColor_.MakeReadOnly(); - result.shadowColor_.MakeReadOnly(); - LightInfoProperty returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is LightInfoProperty) { - return MergeFrom((LightInfoProperty) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(LightInfoProperty other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.DefaultInstance) return this; - if (other.diffuseColor_.Count != 0) { - base.AddRange(other.diffuseColor_, result.diffuseColor_); - } - if (other.specularColor_.Count != 0) { - base.AddRange(other.specularColor_, result.specularColor_); - } - if (other.HasPower) { - Power = other.Power; - } - if (other.ambientColor_.Count != 0) { - base.AddRange(other.ambientColor_, result.ambientColor_); - } - if (other.shadowColor_.Count != 0) { - base.AddRange(other.shadowColor_, result.shadowColor_); - } - if (other.HasLightRange) { - LightRange = other.LightRange; - } - if (other.HasConstantFalloff) { - ConstantFalloff = other.ConstantFalloff; - } - if (other.HasLinearFalloff) { - LinearFalloff = other.LinearFalloff; - } - if (other.HasQuadraticFalloff) { - QuadraticFalloff = other.QuadraticFalloff; - } - if (other.HasConeInnerRadians) { - ConeInnerRadians = other.ConeInnerRadians; - } - if (other.HasConeOuterRadians) { - ConeOuterRadians = other.ConeOuterRadians; - } - if (other.HasConeFalloff) { - ConeFalloff = other.ConeFalloff; - } - if (other.HasType) { - Type = other.Type; - } - if (other.HasCastsShadow) { - CastsShadow = other.CastsShadow; - } - 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 26: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddDiffuseColor(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddSpecularColor(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 45: { - Power = input.ReadFloat(); - break; - } - case 50: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddAmbientColor(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 58: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddShadowColor(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 65: { - LightRange = input.ReadDouble(); - break; - } - case 77: { - ConstantFalloff = input.ReadFloat(); - break; - } - case 85: { - LinearFalloff = input.ReadFloat(); - break; - } - case 93: { - QuadraticFalloff = input.ReadFloat(); - break; - } - case 101: { - ConeInnerRadians = input.ReadFloat(); - break; - } - case 109: { - ConeOuterRadians = input.ReadFloat(); - break; - } - case 117: { - ConeFalloff = input.ReadFloat(); - break; - } - case 120: { - int rawValue = input.ReadEnum(); - if (!global::System.Enum.IsDefined(typeof(global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Types.LightTypes), rawValue)) { - if (unknownFields == null) { - unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); - } - unknownFields.MergeVarintField(15, (ulong) rawValue); - } else { - Type = (global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Types.LightTypes) rawValue; - } - break; - } - case 128: { - CastsShadow = input.ReadBool(); - break; - } - } - } - } - - - public pbc::IPopsicleList DiffuseColorList { - get { return result.diffuseColor_; } - } - public int DiffuseColorCount { - get { return result.DiffuseColorCount; } - } - public float GetDiffuseColor(int index) { - return result.GetDiffuseColor(index); - } - public Builder SetDiffuseColor(int index, float value) { - result.diffuseColor_[index] = value; - return this; - } - public Builder AddDiffuseColor(float value) { - result.diffuseColor_.Add(value); - return this; - } - public Builder AddRangeDiffuseColor(scg::IEnumerable values) { - base.AddRange(values, result.diffuseColor_); - return this; - } - public Builder ClearDiffuseColor() { - result.diffuseColor_.Clear(); - return this; - } - - public pbc::IPopsicleList SpecularColorList { - get { return result.specularColor_; } - } - public int SpecularColorCount { - get { return result.SpecularColorCount; } - } - public float GetSpecularColor(int index) { - return result.GetSpecularColor(index); - } - public Builder SetSpecularColor(int index, float value) { - result.specularColor_[index] = value; - return this; - } - public Builder AddSpecularColor(float value) { - result.specularColor_.Add(value); - return this; - } - public Builder AddRangeSpecularColor(scg::IEnumerable values) { - base.AddRange(values, result.specularColor_); - return this; - } - public Builder ClearSpecularColor() { - result.specularColor_.Clear(); - return this; - } - - public bool HasPower { - get { return result.HasPower; } - } - public float Power { - get { return result.Power; } - set { SetPower(value); } - } - public Builder SetPower(float value) { - result.hasPower = true; - result.power_ = value; - return this; - } - public Builder ClearPower() { - result.hasPower = false; - result.power_ = 0F; - return this; - } - - public pbc::IPopsicleList AmbientColorList { - get { return result.ambientColor_; } - } - public int AmbientColorCount { - get { return result.AmbientColorCount; } - } - public float GetAmbientColor(int index) { - return result.GetAmbientColor(index); - } - public Builder SetAmbientColor(int index, float value) { - result.ambientColor_[index] = value; - return this; - } - public Builder AddAmbientColor(float value) { - result.ambientColor_.Add(value); - return this; - } - public Builder AddRangeAmbientColor(scg::IEnumerable values) { - base.AddRange(values, result.ambientColor_); - return this; - } - public Builder ClearAmbientColor() { - result.ambientColor_.Clear(); - return this; - } - - public pbc::IPopsicleList ShadowColorList { - get { return result.shadowColor_; } - } - public int ShadowColorCount { - get { return result.ShadowColorCount; } - } - public float GetShadowColor(int index) { - return result.GetShadowColor(index); - } - public Builder SetShadowColor(int index, float value) { - result.shadowColor_[index] = value; - return this; - } - public Builder AddShadowColor(float value) { - result.shadowColor_.Add(value); - return this; - } - public Builder AddRangeShadowColor(scg::IEnumerable values) { - base.AddRange(values, result.shadowColor_); - return this; - } - public Builder ClearShadowColor() { - result.shadowColor_.Clear(); - return this; - } - - public bool HasLightRange { - get { return result.HasLightRange; } - } - public double LightRange { - get { return result.LightRange; } - set { SetLightRange(value); } - } - public Builder SetLightRange(double value) { - result.hasLightRange = true; - result.lightRange_ = value; - return this; - } - public Builder ClearLightRange() { - result.hasLightRange = false; - result.lightRange_ = 0D; - return this; - } - - public bool HasConstantFalloff { - get { return result.HasConstantFalloff; } - } - public float ConstantFalloff { - get { return result.ConstantFalloff; } - set { SetConstantFalloff(value); } - } - public Builder SetConstantFalloff(float value) { - result.hasConstantFalloff = true; - result.constantFalloff_ = value; - return this; - } - public Builder ClearConstantFalloff() { - result.hasConstantFalloff = false; - result.constantFalloff_ = 0F; - return this; - } - - public bool HasLinearFalloff { - get { return result.HasLinearFalloff; } - } - public float LinearFalloff { - get { return result.LinearFalloff; } - set { SetLinearFalloff(value); } - } - public Builder SetLinearFalloff(float value) { - result.hasLinearFalloff = true; - result.linearFalloff_ = value; - return this; - } - public Builder ClearLinearFalloff() { - result.hasLinearFalloff = false; - result.linearFalloff_ = 0F; - return this; - } - - public bool HasQuadraticFalloff { - get { return result.HasQuadraticFalloff; } - } - public float QuadraticFalloff { - get { return result.QuadraticFalloff; } - set { SetQuadraticFalloff(value); } - } - public Builder SetQuadraticFalloff(float value) { - result.hasQuadraticFalloff = true; - result.quadraticFalloff_ = value; - return this; - } - public Builder ClearQuadraticFalloff() { - result.hasQuadraticFalloff = false; - result.quadraticFalloff_ = 0F; - return this; - } - - public bool HasConeInnerRadians { - get { return result.HasConeInnerRadians; } - } - public float ConeInnerRadians { - get { return result.ConeInnerRadians; } - set { SetConeInnerRadians(value); } - } - public Builder SetConeInnerRadians(float value) { - result.hasConeInnerRadians = true; - result.coneInnerRadians_ = value; - return this; - } - public Builder ClearConeInnerRadians() { - result.hasConeInnerRadians = false; - result.coneInnerRadians_ = 0F; - return this; - } - - public bool HasConeOuterRadians { - get { return result.HasConeOuterRadians; } - } - public float ConeOuterRadians { - get { return result.ConeOuterRadians; } - set { SetConeOuterRadians(value); } - } - public Builder SetConeOuterRadians(float value) { - result.hasConeOuterRadians = true; - result.coneOuterRadians_ = value; - return this; - } - public Builder ClearConeOuterRadians() { - result.hasConeOuterRadians = false; - result.coneOuterRadians_ = 0F; - return this; - } - - public bool HasConeFalloff { - get { return result.HasConeFalloff; } - } - public float ConeFalloff { - get { return result.ConeFalloff; } - set { SetConeFalloff(value); } - } - public Builder SetConeFalloff(float value) { - result.hasConeFalloff = true; - result.coneFalloff_ = value; - return this; - } - public Builder ClearConeFalloff() { - result.hasConeFalloff = false; - result.coneFalloff_ = 0F; - return this; - } - - public bool HasType { - get { return result.HasType; } - } - public global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Types.LightTypes Type { - get { return result.Type; } - set { SetType(value); } - } - public Builder SetType(global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Types.LightTypes value) { - result.hasType = true; - result.type_ = value; - return this; - } - public Builder ClearType() { - result.hasType = false; - result.type_ = global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Types.LightTypes.POINT; - return this; - } - - public bool HasCastsShadow { - get { return result.HasCastsShadow; } - } - public bool CastsShadow { - get { return result.CastsShadow; } - set { SetCastsShadow(value); } - } - public Builder SetCastsShadow(bool value) { - result.hasCastsShadow = true; - result.castsShadow_ = value; - return this; - } - public Builder ClearCastsShadow() { - result.hasCastsShadow = false; - result.castsShadow_ = false; - return this; - } - } - static LightInfoProperty() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class ParentProperty : pb::GeneratedMessage { - private static readonly ParentProperty defaultInstance = new Builder().BuildPartial(); - public static ParentProperty DefaultInstance { - get { return defaultInstance; } - } - - public override ParentProperty DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override ParentProperty ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ParentProperty__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ParentProperty__FieldAccessorTable; } - } - - public const int ValueFieldNumber = 10; - private bool hasValue; - private pb::ByteString value_ = pb::ByteString.Empty; - public bool HasValue { - get { return hasValue; } - } - public pb::ByteString Value { - get { return value_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasValue) { - output.WriteBytes(10, Value); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasValue) { - size += pb::CodedOutputStream.ComputeBytesSize(10, Value); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static ParentProperty ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ParentProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ParentProperty ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ParentProperty ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ParentProperty ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ParentProperty ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static ParentProperty ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static ParentProperty ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static ParentProperty ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ParentProperty 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(ParentProperty prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - ParentProperty result = new ParentProperty(); - - protected override ParentProperty MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new ParentProperty(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ParentProperty.Descriptor; } - } - - public override ParentProperty DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ParentProperty.DefaultInstance; } - } - - public override ParentProperty BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - ParentProperty returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is ParentProperty) { - return MergeFrom((ParentProperty) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(ParentProperty other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.ParentProperty.DefaultInstance) return this; - if (other.HasValue) { - Value = other.Value; - } - 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 82: { - Value = input.ReadBytes(); - break; - } - } - } - } - - - public bool HasValue { - get { return result.HasValue; } - } - public pb::ByteString Value { - get { return result.Value; } - set { SetValue(value); } - } - public Builder SetValue(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasValue = true; - result.value_ = value; - return this; - } - public Builder ClearValue() { - result.hasValue = false; - result.value_ = pb::ByteString.Empty; - return this; - } - } - static ParentProperty() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class UUIDListProperty : pb::GeneratedMessage { - private static readonly UUIDListProperty defaultInstance = new Builder().BuildPartial(); - public static UUIDListProperty DefaultInstance { - get { return defaultInstance; } - } - - public override UUIDListProperty DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override UUIDListProperty ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_UUIDListProperty__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_UUIDListProperty__FieldAccessorTable; } - } - - public const int ValueFieldNumber = 10; - private pbc::PopsicleList value_ = new pbc::PopsicleList(); - public scg::IList ValueList { - get { return pbc::Lists.AsReadOnly(value_); } - } - public int ValueCount { - get { return value_.Count; } - } - public pb::ByteString GetValue(int index) { - return value_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (value_.Count > 0) { - foreach (pb::ByteString element in value_) { - output.WriteBytes(10, element); - } - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - foreach (pb::ByteString element in ValueList) { - dataSize += pb::CodedOutputStream.ComputeBytesSizeNoTag(element); - } - size += dataSize; - size += 1 * value_.Count; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static UUIDListProperty ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static UUIDListProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static UUIDListProperty ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static UUIDListProperty ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static UUIDListProperty ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static UUIDListProperty ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static UUIDListProperty ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static UUIDListProperty ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static UUIDListProperty ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static UUIDListProperty 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(UUIDListProperty prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - UUIDListProperty result = new UUIDListProperty(); - - protected override UUIDListProperty MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new UUIDListProperty(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.UUIDListProperty.Descriptor; } - } - - public override UUIDListProperty DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.UUIDListProperty.DefaultInstance; } - } - - public override UUIDListProperty BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.value_.MakeReadOnly(); - UUIDListProperty returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is UUIDListProperty) { - return MergeFrom((UUIDListProperty) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(UUIDListProperty other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.UUIDListProperty.DefaultInstance) return this; - if (other.value_.Count != 0) { - base.AddRange(other.value_, result.value_); - } - 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 82: { - AddValue(input.ReadBytes()); - break; - } - } - } - } - - - public pbc::IPopsicleList ValueList { - get { return result.value_; } - } - public int ValueCount { - get { return result.ValueCount; } - } - public pb::ByteString GetValue(int index) { - return result.GetValue(index); - } - public Builder SetValue(int index, pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.value_[index] = value; - return this; - } - public Builder AddValue(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.value_.Add(value); - return this; - } - public Builder AddRangeValue(scg::IEnumerable values) { - base.AddRange(values, result.value_); - return this; - } - public Builder ClearValue() { - result.value_.Clear(); - return this; - } - } - static UUIDListProperty() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class ConnectToSpace : pb::GeneratedMessage { - private static readonly ConnectToSpace defaultInstance = new Builder().BuildPartial(); - public static ConnectToSpace DefaultInstance { - get { return defaultInstance; } - } - - public override ConnectToSpace DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override ConnectToSpace ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ConnectToSpace__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_ConnectToSpace__FieldAccessorTable; } - } - - public const int SpaceIdFieldNumber = 1; - private bool hasSpaceId; - private pb::ByteString spaceId_ = pb::ByteString.Empty; - public bool HasSpaceId { - get { return hasSpaceId; } - } - public pb::ByteString SpaceId { - get { return spaceId_; } - } - - public const int ObjectUuidEvidenceFieldNumber = 2; - private bool hasObjectUuidEvidence; - private pb::ByteString objectUuidEvidence_ = pb::ByteString.Empty; - public bool HasObjectUuidEvidence { - get { return hasObjectUuidEvidence; } - } - public pb::ByteString ObjectUuidEvidence { - get { return objectUuidEvidence_; } - } - - public const int RequestedObjectLocFieldNumber = 3; - private bool hasRequestedObjectLoc; - private global::Sirikata.Protocol._PBJ_Internal.ObjLoc requestedObjectLoc_ = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance; - public bool HasRequestedObjectLoc { - get { return hasRequestedObjectLoc; } - } - public global::Sirikata.Protocol._PBJ_Internal.ObjLoc RequestedObjectLoc { - get { return requestedObjectLoc_; } - } - - public const int BoundingSphereFieldNumber = 4; - private int boundingSphereMemoizedSerializedSize; - private pbc::PopsicleList boundingSphere_ = new pbc::PopsicleList(); - public scg::IList BoundingSphereList { - get { return pbc::Lists.AsReadOnly(boundingSphere_); } - } - public int BoundingSphereCount { - get { return boundingSphere_.Count; } - } - public float GetBoundingSphere(int index) { - return boundingSphere_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasSpaceId) { - output.WriteBytes(1, SpaceId); - } - if (HasObjectUuidEvidence) { - output.WriteBytes(2, ObjectUuidEvidence); - } - if (HasRequestedObjectLoc) { - output.WriteMessage(3, RequestedObjectLoc); - } - if (boundingSphere_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) boundingSphereMemoizedSerializedSize); - foreach (float element in boundingSphere_) { - output.WriteFloatNoTag(element); - } - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasSpaceId) { - size += pb::CodedOutputStream.ComputeBytesSize(1, SpaceId); - } - if (HasObjectUuidEvidence) { - size += pb::CodedOutputStream.ComputeBytesSize(2, ObjectUuidEvidence); - } - if (HasRequestedObjectLoc) { - size += pb::CodedOutputStream.ComputeMessageSize(3, RequestedObjectLoc); - } - { - int dataSize = 0; - dataSize = 4 * boundingSphere_.Count; - size += dataSize; - if (boundingSphere_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - boundingSphereMemoizedSerializedSize = dataSize; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static ConnectToSpace ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ConnectToSpace ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ConnectToSpace ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ConnectToSpace ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ConnectToSpace ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ConnectToSpace ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static ConnectToSpace ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static ConnectToSpace ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static ConnectToSpace ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ConnectToSpace 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(ConnectToSpace prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - ConnectToSpace result = new ConnectToSpace(); - - protected override ConnectToSpace MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new ConnectToSpace(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace.Descriptor; } - } - - public override ConnectToSpace DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace.DefaultInstance; } - } - - public override ConnectToSpace BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.boundingSphere_.MakeReadOnly(); - ConnectToSpace returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is ConnectToSpace) { - return MergeFrom((ConnectToSpace) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(ConnectToSpace other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace.DefaultInstance) return this; - if (other.HasSpaceId) { - SpaceId = other.SpaceId; - } - if (other.HasObjectUuidEvidence) { - ObjectUuidEvidence = other.ObjectUuidEvidence; - } - if (other.HasRequestedObjectLoc) { - MergeRequestedObjectLoc(other.RequestedObjectLoc); - } - if (other.boundingSphere_.Count != 0) { - base.AddRange(other.boundingSphere_, result.boundingSphere_); - } - 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: { - SpaceId = input.ReadBytes(); - break; - } - case 18: { - ObjectUuidEvidence = input.ReadBytes(); - break; - } - case 26: { - global::Sirikata.Protocol._PBJ_Internal.ObjLoc.Builder subBuilder = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.CreateBuilder(); - if (HasRequestedObjectLoc) { - subBuilder.MergeFrom(RequestedObjectLoc); - } - input.ReadMessage(subBuilder, extensionRegistry); - RequestedObjectLoc = subBuilder.BuildPartial(); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddBoundingSphere(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - } - } - } - - - public bool HasSpaceId { - get { return result.HasSpaceId; } - } - public pb::ByteString SpaceId { - get { return result.SpaceId; } - set { SetSpaceId(value); } - } - public Builder SetSpaceId(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasSpaceId = true; - result.spaceId_ = value; - return this; - } - public Builder ClearSpaceId() { - result.hasSpaceId = false; - result.spaceId_ = pb::ByteString.Empty; - return this; - } - - public bool HasObjectUuidEvidence { - get { return result.HasObjectUuidEvidence; } - } - public pb::ByteString ObjectUuidEvidence { - get { return result.ObjectUuidEvidence; } - set { SetObjectUuidEvidence(value); } - } - public Builder SetObjectUuidEvidence(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasObjectUuidEvidence = true; - result.objectUuidEvidence_ = value; - return this; - } - public Builder ClearObjectUuidEvidence() { - result.hasObjectUuidEvidence = false; - result.objectUuidEvidence_ = pb::ByteString.Empty; - return this; - } - - public bool HasRequestedObjectLoc { - get { return result.HasRequestedObjectLoc; } - } - public global::Sirikata.Protocol._PBJ_Internal.ObjLoc RequestedObjectLoc { - get { return result.RequestedObjectLoc; } - set { SetRequestedObjectLoc(value); } - } - public Builder SetRequestedObjectLoc(global::Sirikata.Protocol._PBJ_Internal.ObjLoc value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasRequestedObjectLoc = true; - result.requestedObjectLoc_ = value; - return this; - } - public Builder SetRequestedObjectLoc(global::Sirikata.Protocol._PBJ_Internal.ObjLoc.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.hasRequestedObjectLoc = true; - result.requestedObjectLoc_ = builderForValue.Build(); - return this; - } - public Builder MergeRequestedObjectLoc(global::Sirikata.Protocol._PBJ_Internal.ObjLoc value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - if (result.HasRequestedObjectLoc && - result.requestedObjectLoc_ != global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance) { - result.requestedObjectLoc_ = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.CreateBuilder(result.requestedObjectLoc_).MergeFrom(value).BuildPartial(); - } else { - result.requestedObjectLoc_ = value; - } - result.hasRequestedObjectLoc = true; - return this; - } - public Builder ClearRequestedObjectLoc() { - result.hasRequestedObjectLoc = false; - result.requestedObjectLoc_ = global::Sirikata.Protocol._PBJ_Internal.ObjLoc.DefaultInstance; - return this; - } - - public pbc::IPopsicleList BoundingSphereList { - get { return result.boundingSphere_; } - } - public int BoundingSphereCount { - get { return result.BoundingSphereCount; } - } - public float GetBoundingSphere(int index) { - return result.GetBoundingSphere(index); - } - public Builder SetBoundingSphere(int index, float value) { - result.boundingSphere_[index] = value; - return this; - } - public Builder AddBoundingSphere(float value) { - result.boundingSphere_.Add(value); - return this; - } - public Builder AddRangeBoundingSphere(scg::IEnumerable values) { - base.AddRange(values, result.boundingSphere_); - return this; - } - public Builder ClearBoundingSphere() { - result.boundingSphere_.Clear(); - return this; - } - } - static ConnectToSpace() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - public sealed partial class CreateObject : pb::GeneratedMessage { - private static readonly CreateObject defaultInstance = new Builder().BuildPartial(); - public static CreateObject DefaultInstance { - get { return defaultInstance; } - } - - public override CreateObject DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override CreateObject ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_CreateObject__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.Protocol._PBJ_Internal.Sirikata.internal__static_Sirikata_Protocol__PBJ_Internal_CreateObject__FieldAccessorTable; } - } - - public const int ObjectUuidFieldNumber = 1; - private bool hasObjectUuid; - private pb::ByteString objectUuid_ = pb::ByteString.Empty; - public bool HasObjectUuid { - get { return hasObjectUuid; } - } - public pb::ByteString ObjectUuid { - get { return objectUuid_; } - } - - public const int SpacePropertiesFieldNumber = 2; - private pbc::PopsicleList spaceProperties_ = new pbc::PopsicleList(); - public scg::IList SpacePropertiesList { - get { return spaceProperties_; } - } - public int SpacePropertiesCount { - get { return spaceProperties_.Count; } - } - public global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace GetSpaceProperties(int index) { - return spaceProperties_[index]; - } - - public const int MeshFieldNumber = 3; - private bool hasMesh; - private string mesh_ = ""; - public bool HasMesh { - get { return hasMesh; } - } - public string Mesh { - get { return mesh_; } - } - - public const int ScaleFieldNumber = 4; - private int scaleMemoizedSerializedSize; - private pbc::PopsicleList scale_ = new pbc::PopsicleList(); - public scg::IList ScaleList { - get { return pbc::Lists.AsReadOnly(scale_); } - } - public int ScaleCount { - get { return scale_.Count; } - } - public float GetScale(int index) { - return scale_[index]; - } - - public const int WeburlFieldNumber = 5; - private bool hasWeburl; - private string weburl_ = ""; - public bool HasWeburl { - get { return hasWeburl; } - } - public string Weburl { - get { return weburl_; } - } - - public const int LightInfoFieldNumber = 6; - private bool hasLightInfo; - private global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty lightInfo_ = global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.DefaultInstance; - public bool HasLightInfo { - get { return hasLightInfo; } - } - public global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty LightInfo { - get { return lightInfo_; } - } - - public const int CameraFieldNumber = 7; - private bool hasCamera; - private bool camera_ = false; - public bool HasCamera { - get { return hasCamera; } - } - public bool Camera { - get { return camera_; } - } - - public const int PhysicalFieldNumber = 8; - private bool hasPhysical; - private global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters physical_ = global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.DefaultInstance; - public bool HasPhysical { - get { return hasPhysical; } - } - public global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters Physical { - get { return physical_; } - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasObjectUuid) { - output.WriteBytes(1, ObjectUuid); - } - foreach (global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace element in SpacePropertiesList) { - output.WriteMessage(2, element); - } - if (HasMesh) { - output.WriteString(3, Mesh); - } - if (scale_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) scaleMemoizedSerializedSize); - foreach (float element in scale_) { - output.WriteFloatNoTag(element); - } - } - if (HasWeburl) { - output.WriteString(5, Weburl); - } - if (HasLightInfo) { - output.WriteMessage(6, LightInfo); - } - if (HasCamera) { - output.WriteBool(7, Camera); - } - if (HasPhysical) { - output.WriteMessage(8, Physical); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasObjectUuid) { - size += pb::CodedOutputStream.ComputeBytesSize(1, ObjectUuid); - } - foreach (global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace element in SpacePropertiesList) { - size += pb::CodedOutputStream.ComputeMessageSize(2, element); - } - if (HasMesh) { - size += pb::CodedOutputStream.ComputeStringSize(3, Mesh); - } - { - int dataSize = 0; - dataSize = 4 * scale_.Count; - size += dataSize; - if (scale_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - scaleMemoizedSerializedSize = dataSize; - } - if (HasWeburl) { - size += pb::CodedOutputStream.ComputeStringSize(5, Weburl); - } - if (HasLightInfo) { - size += pb::CodedOutputStream.ComputeMessageSize(6, LightInfo); - } - if (HasCamera) { - size += pb::CodedOutputStream.ComputeBoolSize(7, Camera); - } - if (HasPhysical) { - size += pb::CodedOutputStream.ComputeMessageSize(8, Physical); - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static CreateObject ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static CreateObject ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static CreateObject ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static CreateObject ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static CreateObject ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static CreateObject ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static CreateObject ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static CreateObject ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static CreateObject ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static CreateObject 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(CreateObject prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - CreateObject result = new CreateObject(); - - protected override CreateObject MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new CreateObject(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.Protocol._PBJ_Internal.CreateObject.Descriptor; } - } - - public override CreateObject DefaultInstanceForType { - get { return global::Sirikata.Protocol._PBJ_Internal.CreateObject.DefaultInstance; } - } - - public override CreateObject BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.spaceProperties_.MakeReadOnly(); - result.scale_.MakeReadOnly(); - CreateObject returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is CreateObject) { - return MergeFrom((CreateObject) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(CreateObject other) { - if (other == global::Sirikata.Protocol._PBJ_Internal.CreateObject.DefaultInstance) return this; - if (other.HasObjectUuid) { - ObjectUuid = other.ObjectUuid; - } - if (other.spaceProperties_.Count != 0) { - base.AddRange(other.spaceProperties_, result.spaceProperties_); - } - if (other.HasMesh) { - Mesh = other.Mesh; - } - if (other.scale_.Count != 0) { - base.AddRange(other.scale_, result.scale_); - } - if (other.HasWeburl) { - Weburl = other.Weburl; - } - if (other.HasLightInfo) { - MergeLightInfo(other.LightInfo); - } - if (other.HasCamera) { - Camera = other.Camera; - } - if (other.HasPhysical) { - MergePhysical(other.Physical); - } - 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: { - ObjectUuid = input.ReadBytes(); - break; - } - case 18: { - global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace.Builder subBuilder = global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddSpaceProperties(subBuilder.BuildPartial()); - break; - } - case 26: { - Mesh = input.ReadString(); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddScale(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 42: { - Weburl = input.ReadString(); - break; - } - case 50: { - global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Builder subBuilder = global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.CreateBuilder(); - if (HasLightInfo) { - subBuilder.MergeFrom(LightInfo); - } - input.ReadMessage(subBuilder, extensionRegistry); - LightInfo = subBuilder.BuildPartial(); - break; - } - case 56: { - Camera = input.ReadBool(); - break; - } - case 66: { - global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Builder subBuilder = global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.CreateBuilder(); - if (HasPhysical) { - subBuilder.MergeFrom(Physical); - } - input.ReadMessage(subBuilder, extensionRegistry); - Physical = subBuilder.BuildPartial(); - break; - } - } - } - } - - - public bool HasObjectUuid { - get { return result.HasObjectUuid; } - } - public pb::ByteString ObjectUuid { - get { return result.ObjectUuid; } - set { SetObjectUuid(value); } - } - public Builder SetObjectUuid(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasObjectUuid = true; - result.objectUuid_ = value; - return this; - } - public Builder ClearObjectUuid() { - result.hasObjectUuid = false; - result.objectUuid_ = pb::ByteString.Empty; - return this; - } - - public pbc::IPopsicleList SpacePropertiesList { - get { return result.spaceProperties_; } - } - public int SpacePropertiesCount { - get { return result.SpacePropertiesCount; } - } - public global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace GetSpaceProperties(int index) { - return result.GetSpaceProperties(index); - } - public Builder SetSpaceProperties(int index, global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.spaceProperties_[index] = value; - return this; - } - public Builder SetSpaceProperties(int index, global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.spaceProperties_[index] = builderForValue.Build(); - return this; - } - public Builder AddSpaceProperties(global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.spaceProperties_.Add(value); - return this; - } - public Builder AddSpaceProperties(global::Sirikata.Protocol._PBJ_Internal.ConnectToSpace.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.spaceProperties_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeSpaceProperties(scg::IEnumerable values) { - base.AddRange(values, result.spaceProperties_); - return this; - } - public Builder ClearSpaceProperties() { - result.spaceProperties_.Clear(); - return this; - } - - public bool HasMesh { - get { return result.HasMesh; } - } - public string Mesh { - get { return result.Mesh; } - set { SetMesh(value); } - } - public Builder SetMesh(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasMesh = true; - result.mesh_ = value; - return this; - } - public Builder ClearMesh() { - result.hasMesh = false; - result.mesh_ = ""; - return this; - } - - public pbc::IPopsicleList ScaleList { - get { return result.scale_; } - } - public int ScaleCount { - get { return result.ScaleCount; } - } - public float GetScale(int index) { - return result.GetScale(index); - } - public Builder SetScale(int index, float value) { - result.scale_[index] = value; - return this; - } - public Builder AddScale(float value) { - result.scale_.Add(value); - return this; - } - public Builder AddRangeScale(scg::IEnumerable values) { - base.AddRange(values, result.scale_); - return this; - } - public Builder ClearScale() { - result.scale_.Clear(); - return this; - } - - public bool HasWeburl { - get { return result.HasWeburl; } - } - public string Weburl { - get { return result.Weburl; } - set { SetWeburl(value); } - } - public Builder SetWeburl(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasWeburl = true; - result.weburl_ = value; - return this; - } - public Builder ClearWeburl() { - result.hasWeburl = false; - result.weburl_ = ""; - return this; - } - - public bool HasLightInfo { - get { return result.HasLightInfo; } - } - public global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty LightInfo { - get { return result.LightInfo; } - set { SetLightInfo(value); } - } - public Builder SetLightInfo(global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasLightInfo = true; - result.lightInfo_ = value; - return this; - } - public Builder SetLightInfo(global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.hasLightInfo = true; - result.lightInfo_ = builderForValue.Build(); - return this; - } - public Builder MergeLightInfo(global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - if (result.HasLightInfo && - result.lightInfo_ != global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.DefaultInstance) { - result.lightInfo_ = global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.CreateBuilder(result.lightInfo_).MergeFrom(value).BuildPartial(); - } else { - result.lightInfo_ = value; - } - result.hasLightInfo = true; - return this; - } - public Builder ClearLightInfo() { - result.hasLightInfo = false; - result.lightInfo_ = global::Sirikata.Protocol._PBJ_Internal.LightInfoProperty.DefaultInstance; - return this; - } - - public bool HasCamera { - get { return result.HasCamera; } - } - public bool Camera { - get { return result.Camera; } - set { SetCamera(value); } - } - public Builder SetCamera(bool value) { - result.hasCamera = true; - result.camera_ = value; - return this; - } - public Builder ClearCamera() { - result.hasCamera = false; - result.camera_ = false; - return this; - } - - public bool HasPhysical { - get { return result.HasPhysical; } - } - public global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters Physical { - get { return result.Physical; } - set { SetPhysical(value); } - } - public Builder SetPhysical(global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasPhysical = true; - result.physical_ = value; - return this; - } - public Builder SetPhysical(global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.hasPhysical = true; - result.physical_ = builderForValue.Build(); - return this; - } - public Builder MergePhysical(global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - if (result.HasPhysical && - result.physical_ != global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.DefaultInstance) { - result.physical_ = global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.CreateBuilder(result.physical_).MergeFrom(value).BuildPartial(); - } else { - result.physical_ = value; - } - result.hasPhysical = true; - return this; - } - public Builder ClearPhysical() { - result.hasPhysical = false; - result.physical_ = global::Sirikata.Protocol._PBJ_Internal.PhysicalParameters.DefaultInstance; - return this; - } - } - static CreateObject() { - object.ReferenceEquals(global::Sirikata.Protocol._PBJ_Internal.Sirikata.Descriptor, null); - } - } - - #endregion - -} diff --git a/OpenSim/Client/Sirikata/Protocol/Sirikata.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Sirikata.pbj.cs deleted file mode 100644 index fcf01527ba..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Sirikata.pbj.cs +++ /dev/null @@ -1,3934 +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 MessageBody : PBJ.IMessage { - protected _PBJ_Internal.MessageBody super; - public _PBJ_Internal.MessageBody _PBJSuper{ get { return super;} } - public MessageBody() { - super=new _PBJ_Internal.MessageBody(); - } - public MessageBody(_PBJ_Internal.MessageBody reference) { - super=reference; - } - public static MessageBody defaultInstance= new MessageBody (_PBJ_Internal.MessageBody.DefaultInstance); - public static MessageBody DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.MessageBody.Descriptor; } } - public static class Types { - } - 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 MessageNamesFieldTag=9; - public int MessageNamesCount { get { return super.MessageNamesCount;} } - public bool HasMessageNames(int index) {return PBJ._PBJ.ValidateString(super.GetMessageNames(index));} - public string MessageNames(int index) { - return (string)PBJ._PBJ.CastString(super.GetMessageNames(index)); - } - public const int MessageArgumentsFieldTag=10; - public int MessageArgumentsCount { get { return super.MessageArgumentsCount;} } - public bool HasMessageArguments(int index) {return PBJ._PBJ.ValidateBytes(super.GetMessageArguments(index));} - public pb::ByteString MessageArguments(int index) { - return (pb::ByteString)PBJ._PBJ.CastBytes(super.GetMessageArguments(index)); - } - 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(MessageBody prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static MessageBody ParseFrom(pb::ByteString data) { - return new MessageBody(_PBJ_Internal.MessageBody.ParseFrom(data)); - } - public static MessageBody ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new MessageBody(_PBJ_Internal.MessageBody.ParseFrom(data,er)); - } - public static MessageBody ParseFrom(byte[] data) { - return new MessageBody(_PBJ_Internal.MessageBody.ParseFrom(data)); - } - public static MessageBody ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new MessageBody(_PBJ_Internal.MessageBody.ParseFrom(data,er)); - } - public static MessageBody ParseFrom(global::System.IO.Stream data) { - return new MessageBody(_PBJ_Internal.MessageBody.ParseFrom(data)); - } - public static MessageBody ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new MessageBody(_PBJ_Internal.MessageBody.ParseFrom(data,er)); - } - public static MessageBody ParseFrom(pb::CodedInputStream data) { - return new MessageBody(_PBJ_Internal.MessageBody.ParseFrom(data)); - } - public static MessageBody ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new MessageBody(_PBJ_Internal.MessageBody.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.MessageBody.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.MessageBody.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.MessageBody.Builder();} - public Builder(_PBJ_Internal.MessageBody.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(MessageBody prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public MessageBody BuildPartial() {return new MessageBody(super.BuildPartial());} - public MessageBody Build() {if (_HasAllPBJFields) return new MessageBody(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return MessageBody.Descriptor; } } - public Builder ClearMessageNames() { super.ClearMessageNames();return this;} - public Builder SetMessageNames(int index, string value) { - super.SetMessageNames(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int MessageNamesFieldTag=9; - public int MessageNamesCount { get { return super.MessageNamesCount;} } - public bool HasMessageNames(int index) {return PBJ._PBJ.ValidateString(super.GetMessageNames(index));} - public string MessageNames(int index) { - return (string)PBJ._PBJ.CastString(super.GetMessageNames(index)); - } - public Builder AddMessageNames(string value) { - super.AddMessageNames(PBJ._PBJ.Construct(value)); - return this; - } - public Builder ClearMessageArguments() { super.ClearMessageArguments();return this;} - public Builder SetMessageArguments(int index, pb::ByteString value) { - super.SetMessageArguments(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int MessageArgumentsFieldTag=10; - public int MessageArgumentsCount { get { return super.MessageArgumentsCount;} } - public bool HasMessageArguments(int index) {return PBJ._PBJ.ValidateBytes(super.GetMessageArguments(index));} - public pb::ByteString MessageArguments(int index) { - return (pb::ByteString)PBJ._PBJ.CastBytes(super.GetMessageArguments(index)); - } - public Builder AddMessageArguments(pb::ByteString value) { - super.AddMessageArguments(PBJ._PBJ.Construct(value)); - return this; - } - } - } -} -namespace Sirikata.Protocol { - public class ReadOnlyMessage : PBJ.IMessage { - protected _PBJ_Internal.ReadOnlyMessage super; - public _PBJ_Internal.ReadOnlyMessage _PBJSuper{ get { return super;} } - public ReadOnlyMessage() { - super=new _PBJ_Internal.ReadOnlyMessage(); - } - public ReadOnlyMessage(_PBJ_Internal.ReadOnlyMessage reference) { - super=reference; - } - public static ReadOnlyMessage defaultInstance= new ReadOnlyMessage (_PBJ_Internal.ReadOnlyMessage.DefaultInstance); - public static ReadOnlyMessage DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.ReadOnlyMessage.Descriptor; } } - public static class Types { - public enum ReturnStatus { - SUCCESS=_PBJ_Internal.ReadOnlyMessage.Types.ReturnStatus.SUCCESS, - NETWORK_FAILURE=_PBJ_Internal.ReadOnlyMessage.Types.ReturnStatus.NETWORK_FAILURE, - TIMEOUT_FAILURE=_PBJ_Internal.ReadOnlyMessage.Types.ReturnStatus.TIMEOUT_FAILURE, - PROTOCOL_ERROR=_PBJ_Internal.ReadOnlyMessage.Types.ReturnStatus.PROTOCOL_ERROR, - PORT_FAILURE=_PBJ_Internal.ReadOnlyMessage.Types.ReturnStatus.PORT_FAILURE - }; - } - 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 const int MessageNamesFieldTag=9; - public int MessageNamesCount { get { return super.MessageNamesCount;} } - public bool HasMessageNames(int index) {return PBJ._PBJ.ValidateString(super.GetMessageNames(index));} - public string MessageNames(int index) { - return (string)PBJ._PBJ.CastString(super.GetMessageNames(index)); - } - public const int MessageArgumentsFieldTag=10; - public int MessageArgumentsCount { get { return super.MessageArgumentsCount;} } - public bool HasMessageArguments(int index) {return PBJ._PBJ.ValidateBytes(super.GetMessageArguments(index));} - public pb::ByteString MessageArguments(int index) { - return (pb::ByteString)PBJ._PBJ.CastBytes(super.GetMessageArguments(index)); - } - 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(ReadOnlyMessage prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static ReadOnlyMessage ParseFrom(pb::ByteString data) { - return new ReadOnlyMessage(_PBJ_Internal.ReadOnlyMessage.ParseFrom(data)); - } - public static ReadOnlyMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new ReadOnlyMessage(_PBJ_Internal.ReadOnlyMessage.ParseFrom(data,er)); - } - public static ReadOnlyMessage ParseFrom(byte[] data) { - return new ReadOnlyMessage(_PBJ_Internal.ReadOnlyMessage.ParseFrom(data)); - } - public static ReadOnlyMessage ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new ReadOnlyMessage(_PBJ_Internal.ReadOnlyMessage.ParseFrom(data,er)); - } - public static ReadOnlyMessage ParseFrom(global::System.IO.Stream data) { - return new ReadOnlyMessage(_PBJ_Internal.ReadOnlyMessage.ParseFrom(data)); - } - public static ReadOnlyMessage ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new ReadOnlyMessage(_PBJ_Internal.ReadOnlyMessage.ParseFrom(data,er)); - } - public static ReadOnlyMessage ParseFrom(pb::CodedInputStream data) { - return new ReadOnlyMessage(_PBJ_Internal.ReadOnlyMessage.ParseFrom(data)); - } - public static ReadOnlyMessage ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new ReadOnlyMessage(_PBJ_Internal.ReadOnlyMessage.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.ReadOnlyMessage.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.ReadOnlyMessage.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.ReadOnlyMessage.Builder();} - public Builder(_PBJ_Internal.ReadOnlyMessage.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(ReadOnlyMessage prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public ReadOnlyMessage BuildPartial() {return new ReadOnlyMessage(super.BuildPartial());} - public ReadOnlyMessage Build() {if (_HasAllPBJFields) return new ReadOnlyMessage(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return ReadOnlyMessage.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.ReadOnlyMessage.Types.ReturnStatus)value); - } - } - public Builder ClearMessageNames() { super.ClearMessageNames();return this;} - public Builder SetMessageNames(int index, string value) { - super.SetMessageNames(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int MessageNamesFieldTag=9; - public int MessageNamesCount { get { return super.MessageNamesCount;} } - public bool HasMessageNames(int index) {return PBJ._PBJ.ValidateString(super.GetMessageNames(index));} - public string MessageNames(int index) { - return (string)PBJ._PBJ.CastString(super.GetMessageNames(index)); - } - public Builder AddMessageNames(string value) { - super.AddMessageNames(PBJ._PBJ.Construct(value)); - return this; - } - public Builder ClearMessageArguments() { super.ClearMessageArguments();return this;} - public Builder SetMessageArguments(int index, pb::ByteString value) { - super.SetMessageArguments(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int MessageArgumentsFieldTag=10; - public int MessageArgumentsCount { get { return super.MessageArgumentsCount;} } - public bool HasMessageArguments(int index) {return PBJ._PBJ.ValidateBytes(super.GetMessageArguments(index));} - public pb::ByteString MessageArguments(int index) { - return (pb::ByteString)PBJ._PBJ.CastBytes(super.GetMessageArguments(index)); - } - public Builder AddMessageArguments(pb::ByteString value) { - super.AddMessageArguments(PBJ._PBJ.Construct(value)); - return this; - } - } - } -} -namespace Sirikata.Protocol { - public class SpaceServices : PBJ.IMessage { - protected _PBJ_Internal.SpaceServices super; - public _PBJ_Internal.SpaceServices _PBJSuper{ get { return super;} } - public SpaceServices() { - super=new _PBJ_Internal.SpaceServices(); - } - public SpaceServices(_PBJ_Internal.SpaceServices reference) { - super=reference; - } - public static SpaceServices defaultInstance= new SpaceServices (_PBJ_Internal.SpaceServices.DefaultInstance); - public static SpaceServices DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.SpaceServices.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 RegistrationPortFieldTag=33; - public bool HasRegistrationPort{ get {return super.HasRegistrationPort&&PBJ._PBJ.ValidateUint32(super.RegistrationPort);} } - public uint RegistrationPort{ get { - if (HasRegistrationPort) { - return PBJ._PBJ.CastUint32(super.RegistrationPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int LocPortFieldTag=34; - public bool HasLocPort{ get {return super.HasLocPort&&PBJ._PBJ.ValidateUint32(super.LocPort);} } - public uint LocPort{ get { - if (HasLocPort) { - return PBJ._PBJ.CastUint32(super.LocPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int GeomPortFieldTag=35; - public bool HasGeomPort{ get {return super.HasGeomPort&&PBJ._PBJ.ValidateUint32(super.GeomPort);} } - public uint GeomPort{ get { - if (HasGeomPort) { - return PBJ._PBJ.CastUint32(super.GeomPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int OsegPortFieldTag=36; - public bool HasOsegPort{ get {return super.HasOsegPort&&PBJ._PBJ.ValidateUint32(super.OsegPort);} } - public uint OsegPort{ get { - if (HasOsegPort) { - return PBJ._PBJ.CastUint32(super.OsegPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int CsegPortFieldTag=37; - public bool HasCsegPort{ get {return super.HasCsegPort&&PBJ._PBJ.ValidateUint32(super.CsegPort);} } - public uint CsegPort{ get { - if (HasCsegPort) { - return PBJ._PBJ.CastUint32(super.CsegPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int RouterPortFieldTag=38; - public bool HasRouterPort{ get {return super.HasRouterPort&&PBJ._PBJ.ValidateUint32(super.RouterPort);} } - public uint RouterPort{ get { - if (HasRouterPort) { - return PBJ._PBJ.CastUint32(super.RouterPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int PreConnectionBufferFieldTag=64; - public bool HasPreConnectionBuffer{ get {return super.HasPreConnectionBuffer&&PBJ._PBJ.ValidateUint64(super.PreConnectionBuffer);} } - public ulong PreConnectionBuffer{ get { - if (HasPreConnectionBuffer) { - return PBJ._PBJ.CastUint64(super.PreConnectionBuffer); - } else { - return PBJ._PBJ.CastUint64(); - } - } - } - public const int MaxPreConnectionMessagesFieldTag=65; - public bool HasMaxPreConnectionMessages{ get {return super.HasMaxPreConnectionMessages&&PBJ._PBJ.ValidateUint64(super.MaxPreConnectionMessages);} } - public ulong MaxPreConnectionMessages{ get { - if (HasMaxPreConnectionMessages) { - return PBJ._PBJ.CastUint64(super.MaxPreConnectionMessages); - } else { - return PBJ._PBJ.CastUint64(); - } - } - } - 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(SpaceServices prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static SpaceServices ParseFrom(pb::ByteString data) { - return new SpaceServices(_PBJ_Internal.SpaceServices.ParseFrom(data)); - } - public static SpaceServices ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new SpaceServices(_PBJ_Internal.SpaceServices.ParseFrom(data,er)); - } - public static SpaceServices ParseFrom(byte[] data) { - return new SpaceServices(_PBJ_Internal.SpaceServices.ParseFrom(data)); - } - public static SpaceServices ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new SpaceServices(_PBJ_Internal.SpaceServices.ParseFrom(data,er)); - } - public static SpaceServices ParseFrom(global::System.IO.Stream data) { - return new SpaceServices(_PBJ_Internal.SpaceServices.ParseFrom(data)); - } - public static SpaceServices ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new SpaceServices(_PBJ_Internal.SpaceServices.ParseFrom(data,er)); - } - public static SpaceServices ParseFrom(pb::CodedInputStream data) { - return new SpaceServices(_PBJ_Internal.SpaceServices.ParseFrom(data)); - } - public static SpaceServices ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new SpaceServices(_PBJ_Internal.SpaceServices.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.SpaceServices.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.SpaceServices.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.SpaceServices.Builder();} - public Builder(_PBJ_Internal.SpaceServices.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(SpaceServices prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public SpaceServices BuildPartial() {return new SpaceServices(super.BuildPartial());} - public SpaceServices Build() {if (_HasAllPBJFields) return new SpaceServices(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return SpaceServices.Descriptor; } } - public Builder ClearRegistrationPort() { super.ClearRegistrationPort();return this;} - public const int RegistrationPortFieldTag=33; - public bool HasRegistrationPort{ get {return super.HasRegistrationPort&&PBJ._PBJ.ValidateUint32(super.RegistrationPort);} } - public uint RegistrationPort{ get { - if (HasRegistrationPort) { - return PBJ._PBJ.CastUint32(super.RegistrationPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.RegistrationPort=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearLocPort() { super.ClearLocPort();return this;} - public const int LocPortFieldTag=34; - public bool HasLocPort{ get {return super.HasLocPort&&PBJ._PBJ.ValidateUint32(super.LocPort);} } - public uint LocPort{ get { - if (HasLocPort) { - return PBJ._PBJ.CastUint32(super.LocPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.LocPort=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearGeomPort() { super.ClearGeomPort();return this;} - public const int GeomPortFieldTag=35; - public bool HasGeomPort{ get {return super.HasGeomPort&&PBJ._PBJ.ValidateUint32(super.GeomPort);} } - public uint GeomPort{ get { - if (HasGeomPort) { - return PBJ._PBJ.CastUint32(super.GeomPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.GeomPort=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearOsegPort() { super.ClearOsegPort();return this;} - public const int OsegPortFieldTag=36; - public bool HasOsegPort{ get {return super.HasOsegPort&&PBJ._PBJ.ValidateUint32(super.OsegPort);} } - public uint OsegPort{ get { - if (HasOsegPort) { - return PBJ._PBJ.CastUint32(super.OsegPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.OsegPort=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearCsegPort() { super.ClearCsegPort();return this;} - public const int CsegPortFieldTag=37; - public bool HasCsegPort{ get {return super.HasCsegPort&&PBJ._PBJ.ValidateUint32(super.CsegPort);} } - public uint CsegPort{ get { - if (HasCsegPort) { - return PBJ._PBJ.CastUint32(super.CsegPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.CsegPort=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearRouterPort() { super.ClearRouterPort();return this;} - public const int RouterPortFieldTag=38; - public bool HasRouterPort{ get {return super.HasRouterPort&&PBJ._PBJ.ValidateUint32(super.RouterPort);} } - public uint RouterPort{ get { - if (HasRouterPort) { - return PBJ._PBJ.CastUint32(super.RouterPort); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.RouterPort=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearPreConnectionBuffer() { super.ClearPreConnectionBuffer();return this;} - public const int PreConnectionBufferFieldTag=64; - public bool HasPreConnectionBuffer{ get {return super.HasPreConnectionBuffer&&PBJ._PBJ.ValidateUint64(super.PreConnectionBuffer);} } - public ulong PreConnectionBuffer{ get { - if (HasPreConnectionBuffer) { - return PBJ._PBJ.CastUint64(super.PreConnectionBuffer); - } else { - return PBJ._PBJ.CastUint64(); - } - } - set { - super.PreConnectionBuffer=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearMaxPreConnectionMessages() { super.ClearMaxPreConnectionMessages();return this;} - public const int MaxPreConnectionMessagesFieldTag=65; - public bool HasMaxPreConnectionMessages{ get {return super.HasMaxPreConnectionMessages&&PBJ._PBJ.ValidateUint64(super.MaxPreConnectionMessages);} } - public ulong MaxPreConnectionMessages{ get { - if (HasMaxPreConnectionMessages) { - return PBJ._PBJ.CastUint64(super.MaxPreConnectionMessages); - } else { - return PBJ._PBJ.CastUint64(); - } - } - set { - super.MaxPreConnectionMessages=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class ObjLoc : PBJ.IMessage { - protected _PBJ_Internal.ObjLoc super; - public _PBJ_Internal.ObjLoc _PBJSuper{ get { return super;} } - public ObjLoc() { - super=new _PBJ_Internal.ObjLoc(); - } - public ObjLoc(_PBJ_Internal.ObjLoc reference) { - super=reference; - } - public static ObjLoc defaultInstance= new ObjLoc (_PBJ_Internal.ObjLoc.DefaultInstance); - public static ObjLoc DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.ObjLoc.Descriptor; } } - public static class Types { - public enum UpdateFlags { - FORCE=_PBJ_Internal.ObjLoc.Types.UpdateFlags.FORCE - }; - } - 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 PositionFieldTag=3; - public bool HasPosition{ get {return super.PositionCount>=3;} } - public PBJ.Vector3d Position{ get { - int index=0; - if (HasPosition) { - return PBJ._PBJ.CastVector3d(super.GetPosition(index*3+0),super.GetPosition(index*3+1),super.GetPosition(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - } - public const int OrientationFieldTag=4; - public bool HasOrientation{ get {return super.OrientationCount>=3;} } - public PBJ.Quaternion Orientation{ get { - int index=0; - if (HasOrientation) { - return PBJ._PBJ.CastQuaternion(super.GetOrientation(index*3+0),super.GetOrientation(index*3+1),super.GetOrientation(index*3+2)); - } else { - return PBJ._PBJ.CastQuaternion(); - } - } - } - public const int VelocityFieldTag=5; - public bool HasVelocity{ get {return super.VelocityCount>=3;} } - public PBJ.Vector3f Velocity{ get { - int index=0; - if (HasVelocity) { - return PBJ._PBJ.CastVector3f(super.GetVelocity(index*3+0),super.GetVelocity(index*3+1),super.GetVelocity(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int RotationalAxisFieldTag=7; - public bool HasRotationalAxis{ get {return super.RotationalAxisCount>=2;} } - public PBJ.Vector3f RotationalAxis{ get { - int index=0; - if (HasRotationalAxis) { - return PBJ._PBJ.CastNormal(super.GetRotationalAxis(index*2+0),super.GetRotationalAxis(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - } - public const int AngularSpeedFieldTag=8; - public bool HasAngularSpeed{ get {return super.HasAngularSpeed&&PBJ._PBJ.ValidateFloat(super.AngularSpeed);} } - public float AngularSpeed{ get { - if (HasAngularSpeed) { - return PBJ._PBJ.CastFloat(super.AngularSpeed); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int UpdateFlagsFieldTag=6; - public bool HasUpdateFlags { get { - if (!super.HasUpdateFlags) return false; - return PBJ._PBJ.ValidateFlags(super.UpdateFlags,(ulong)Types.UpdateFlags.FORCE); - } } - public byte UpdateFlags{ get { - if (HasUpdateFlags) { - return (byte)PBJ._PBJ.CastFlags(super.UpdateFlags,(ulong)Types.UpdateFlags.FORCE); - } else { - return (byte)PBJ._PBJ.CastFlags((ulong)Types.UpdateFlags.FORCE); - } - } - } - 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(ObjLoc prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static ObjLoc ParseFrom(pb::ByteString data) { - return new ObjLoc(_PBJ_Internal.ObjLoc.ParseFrom(data)); - } - public static ObjLoc ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new ObjLoc(_PBJ_Internal.ObjLoc.ParseFrom(data,er)); - } - public static ObjLoc ParseFrom(byte[] data) { - return new ObjLoc(_PBJ_Internal.ObjLoc.ParseFrom(data)); - } - public static ObjLoc ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new ObjLoc(_PBJ_Internal.ObjLoc.ParseFrom(data,er)); - } - public static ObjLoc ParseFrom(global::System.IO.Stream data) { - return new ObjLoc(_PBJ_Internal.ObjLoc.ParseFrom(data)); - } - public static ObjLoc ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new ObjLoc(_PBJ_Internal.ObjLoc.ParseFrom(data,er)); - } - public static ObjLoc ParseFrom(pb::CodedInputStream data) { - return new ObjLoc(_PBJ_Internal.ObjLoc.ParseFrom(data)); - } - public static ObjLoc ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new ObjLoc(_PBJ_Internal.ObjLoc.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.ObjLoc.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.ObjLoc.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.ObjLoc.Builder();} - public Builder(_PBJ_Internal.ObjLoc.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(ObjLoc prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public ObjLoc BuildPartial() {return new ObjLoc(super.BuildPartial());} - public ObjLoc Build() {if (_HasAllPBJFields) return new ObjLoc(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return ObjLoc.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 ClearPosition() { super.ClearPosition();return this;} - public const int PositionFieldTag=3; - public bool HasPosition{ get {return super.PositionCount>=3;} } - public PBJ.Vector3d Position{ get { - int index=0; - if (HasPosition) { - return PBJ._PBJ.CastVector3d(super.GetPosition(index*3+0),super.GetPosition(index*3+1),super.GetPosition(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - set { - super.ClearPosition(); - double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value); - super.AddPosition(_PBJtempArray[0]); - super.AddPosition(_PBJtempArray[1]); - super.AddPosition(_PBJtempArray[2]); - } - } - public Builder ClearOrientation() { super.ClearOrientation();return this;} - public const int OrientationFieldTag=4; - public bool HasOrientation{ get {return super.OrientationCount>=3;} } - public PBJ.Quaternion Orientation{ get { - int index=0; - if (HasOrientation) { - return PBJ._PBJ.CastQuaternion(super.GetOrientation(index*3+0),super.GetOrientation(index*3+1),super.GetOrientation(index*3+2)); - } else { - return PBJ._PBJ.CastQuaternion(); - } - } - set { - super.ClearOrientation(); - float[] _PBJtempArray=PBJ._PBJ.ConstructQuaternion(value); - super.AddOrientation(_PBJtempArray[0]); - super.AddOrientation(_PBJtempArray[1]); - super.AddOrientation(_PBJtempArray[2]); - } - } - public Builder ClearVelocity() { super.ClearVelocity();return this;} - public const int VelocityFieldTag=5; - public bool HasVelocity{ get {return super.VelocityCount>=3;} } - public PBJ.Vector3f Velocity{ get { - int index=0; - if (HasVelocity) { - return PBJ._PBJ.CastVector3f(super.GetVelocity(index*3+0),super.GetVelocity(index*3+1),super.GetVelocity(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearVelocity(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddVelocity(_PBJtempArray[0]); - super.AddVelocity(_PBJtempArray[1]); - super.AddVelocity(_PBJtempArray[2]); - } - } - public Builder ClearRotationalAxis() { super.ClearRotationalAxis();return this;} - public const int RotationalAxisFieldTag=7; - public bool HasRotationalAxis{ get {return super.RotationalAxisCount>=2;} } - public PBJ.Vector3f RotationalAxis{ get { - int index=0; - if (HasRotationalAxis) { - return PBJ._PBJ.CastNormal(super.GetRotationalAxis(index*2+0),super.GetRotationalAxis(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - set { - super.ClearRotationalAxis(); - float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value); - super.AddRotationalAxis(_PBJtempArray[0]); - super.AddRotationalAxis(_PBJtempArray[1]); - } - } - public Builder ClearAngularSpeed() { super.ClearAngularSpeed();return this;} - public const int AngularSpeedFieldTag=8; - public bool HasAngularSpeed{ get {return super.HasAngularSpeed&&PBJ._PBJ.ValidateFloat(super.AngularSpeed);} } - public float AngularSpeed{ get { - if (HasAngularSpeed) { - return PBJ._PBJ.CastFloat(super.AngularSpeed); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.AngularSpeed=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearUpdateFlags() { super.ClearUpdateFlags();return this;} - public const int UpdateFlagsFieldTag=6; - public bool HasUpdateFlags { get { - if (!super.HasUpdateFlags) return false; - return PBJ._PBJ.ValidateFlags(super.UpdateFlags,(ulong)Types.UpdateFlags.FORCE); - } } - public byte UpdateFlags{ get { - if (HasUpdateFlags) { - return (byte)PBJ._PBJ.CastFlags(super.UpdateFlags,(ulong)Types.UpdateFlags.FORCE); - } else { - return (byte)PBJ._PBJ.CastFlags((ulong)Types.UpdateFlags.FORCE); - } - } - set { - super.UpdateFlags=((value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class LocRequest : PBJ.IMessage { - protected _PBJ_Internal.LocRequest super; - public _PBJ_Internal.LocRequest _PBJSuper{ get { return super;} } - public LocRequest() { - super=new _PBJ_Internal.LocRequest(); - } - public LocRequest(_PBJ_Internal.LocRequest reference) { - super=reference; - } - public static LocRequest defaultInstance= new LocRequest (_PBJ_Internal.LocRequest.DefaultInstance); - public static LocRequest DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.LocRequest.Descriptor; } } - public static class Types { - public enum Fields { - POSITION=_PBJ_Internal.LocRequest.Types.Fields.POSITION, - ORIENTATION=_PBJ_Internal.LocRequest.Types.Fields.ORIENTATION, - VELOCITY=_PBJ_Internal.LocRequest.Types.Fields.VELOCITY, - ROTATIONAL_AXIS=_PBJ_Internal.LocRequest.Types.Fields.ROTATIONAL_AXIS, - ANGULAR_SPEED=_PBJ_Internal.LocRequest.Types.Fields.ANGULAR_SPEED - }; - } - public static bool WithinReservedFieldTagRange(int field_tag) { - return false; - } - public static bool WithinExtensionFieldTagRange(int field_tag) { - return false; - } - public const int RequestedFieldsFieldTag=2; - public bool HasRequestedFields { get { - if (!super.HasRequestedFields) return false; - return PBJ._PBJ.ValidateFlags(super.RequestedFields,(ulong)Types.Fields.POSITION|(ulong)Types.Fields.ORIENTATION|(ulong)Types.Fields.VELOCITY|(ulong)Types.Fields.ROTATIONAL_AXIS|(ulong)Types.Fields.ANGULAR_SPEED); - } } - public uint RequestedFields{ get { - if (HasRequestedFields) { - return (uint)PBJ._PBJ.CastFlags(super.RequestedFields,(ulong)Types.Fields.POSITION|(ulong)Types.Fields.ORIENTATION|(ulong)Types.Fields.VELOCITY|(ulong)Types.Fields.ROTATIONAL_AXIS|(ulong)Types.Fields.ANGULAR_SPEED); - } else { - return (uint)PBJ._PBJ.CastFlags((ulong)Types.Fields.POSITION|(ulong)Types.Fields.ORIENTATION|(ulong)Types.Fields.VELOCITY|(ulong)Types.Fields.ROTATIONAL_AXIS|(ulong)Types.Fields.ANGULAR_SPEED); - } - } - } - 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(LocRequest prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static LocRequest ParseFrom(pb::ByteString data) { - return new LocRequest(_PBJ_Internal.LocRequest.ParseFrom(data)); - } - public static LocRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new LocRequest(_PBJ_Internal.LocRequest.ParseFrom(data,er)); - } - public static LocRequest ParseFrom(byte[] data) { - return new LocRequest(_PBJ_Internal.LocRequest.ParseFrom(data)); - } - public static LocRequest ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new LocRequest(_PBJ_Internal.LocRequest.ParseFrom(data,er)); - } - public static LocRequest ParseFrom(global::System.IO.Stream data) { - return new LocRequest(_PBJ_Internal.LocRequest.ParseFrom(data)); - } - public static LocRequest ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new LocRequest(_PBJ_Internal.LocRequest.ParseFrom(data,er)); - } - public static LocRequest ParseFrom(pb::CodedInputStream data) { - return new LocRequest(_PBJ_Internal.LocRequest.ParseFrom(data)); - } - public static LocRequest ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new LocRequest(_PBJ_Internal.LocRequest.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.LocRequest.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.LocRequest.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.LocRequest.Builder();} - public Builder(_PBJ_Internal.LocRequest.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(LocRequest prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public LocRequest BuildPartial() {return new LocRequest(super.BuildPartial());} - public LocRequest Build() {if (_HasAllPBJFields) return new LocRequest(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return LocRequest.Descriptor; } } - public Builder ClearRequestedFields() { super.ClearRequestedFields();return this;} - public const int RequestedFieldsFieldTag=2; - public bool HasRequestedFields { get { - if (!super.HasRequestedFields) return false; - return PBJ._PBJ.ValidateFlags(super.RequestedFields,(ulong)Types.Fields.POSITION|(ulong)Types.Fields.ORIENTATION|(ulong)Types.Fields.VELOCITY|(ulong)Types.Fields.ROTATIONAL_AXIS|(ulong)Types.Fields.ANGULAR_SPEED); - } } - public uint RequestedFields{ get { - if (HasRequestedFields) { - return (uint)PBJ._PBJ.CastFlags(super.RequestedFields,(ulong)Types.Fields.POSITION|(ulong)Types.Fields.ORIENTATION|(ulong)Types.Fields.VELOCITY|(ulong)Types.Fields.ROTATIONAL_AXIS|(ulong)Types.Fields.ANGULAR_SPEED); - } else { - return (uint)PBJ._PBJ.CastFlags((ulong)Types.Fields.POSITION|(ulong)Types.Fields.ORIENTATION|(ulong)Types.Fields.VELOCITY|(ulong)Types.Fields.ROTATIONAL_AXIS|(ulong)Types.Fields.ANGULAR_SPEED); - } - } - set { - super.RequestedFields=((value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class NewObj : PBJ.IMessage { - protected _PBJ_Internal.NewObj super; - public _PBJ_Internal.NewObj _PBJSuper{ get { return super;} } - public NewObj() { - super=new _PBJ_Internal.NewObj(); - } - public NewObj(_PBJ_Internal.NewObj reference) { - super=reference; - } - public static NewObj defaultInstance= new NewObj (_PBJ_Internal.NewObj.DefaultInstance); - public static NewObj DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.NewObj.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 ObjectUuidEvidenceFieldTag=2; - public bool HasObjectUuidEvidence{ get {return super.HasObjectUuidEvidence&&PBJ._PBJ.ValidateUuid(super.ObjectUuidEvidence);} } - public PBJ.UUID ObjectUuidEvidence{ get { - if (HasObjectUuidEvidence) { - return PBJ._PBJ.CastUuid(super.ObjectUuidEvidence); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int RequestedObjectLocFieldTag=3; - public bool HasRequestedObjectLoc{ get {return super.HasRequestedObjectLoc;} } - public ObjLoc RequestedObjectLoc{ get { - if (HasRequestedObjectLoc) { - return new ObjLoc(super.RequestedObjectLoc); - } else { - return new ObjLoc(); - } - } - } - public const int BoundingSphereFieldTag=4; - public bool HasBoundingSphere{ get {return super.BoundingSphereCount>=4;} } - public PBJ.BoundingSphere3f BoundingSphere{ get { - int index=0; - if (HasBoundingSphere) { - return PBJ._PBJ.CastBoundingsphere3f(super.GetBoundingSphere(index*4+0),super.GetBoundingSphere(index*4+1),super.GetBoundingSphere(index*4+2),super.GetBoundingSphere(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3f(); - } - } - } - 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(NewObj prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static NewObj ParseFrom(pb::ByteString data) { - return new NewObj(_PBJ_Internal.NewObj.ParseFrom(data)); - } - public static NewObj ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new NewObj(_PBJ_Internal.NewObj.ParseFrom(data,er)); - } - public static NewObj ParseFrom(byte[] data) { - return new NewObj(_PBJ_Internal.NewObj.ParseFrom(data)); - } - public static NewObj ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new NewObj(_PBJ_Internal.NewObj.ParseFrom(data,er)); - } - public static NewObj ParseFrom(global::System.IO.Stream data) { - return new NewObj(_PBJ_Internal.NewObj.ParseFrom(data)); - } - public static NewObj ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new NewObj(_PBJ_Internal.NewObj.ParseFrom(data,er)); - } - public static NewObj ParseFrom(pb::CodedInputStream data) { - return new NewObj(_PBJ_Internal.NewObj.ParseFrom(data)); - } - public static NewObj ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new NewObj(_PBJ_Internal.NewObj.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.NewObj.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.NewObj.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.NewObj.Builder();} - public Builder(_PBJ_Internal.NewObj.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(NewObj prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public NewObj BuildPartial() {return new NewObj(super.BuildPartial());} - public NewObj Build() {if (_HasAllPBJFields) return new NewObj(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return NewObj.Descriptor; } } - public Builder ClearObjectUuidEvidence() { super.ClearObjectUuidEvidence();return this;} - public const int ObjectUuidEvidenceFieldTag=2; - public bool HasObjectUuidEvidence{ get {return super.HasObjectUuidEvidence&&PBJ._PBJ.ValidateUuid(super.ObjectUuidEvidence);} } - public PBJ.UUID ObjectUuidEvidence{ get { - if (HasObjectUuidEvidence) { - return PBJ._PBJ.CastUuid(super.ObjectUuidEvidence); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.ObjectUuidEvidence=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearRequestedObjectLoc() { super.ClearRequestedObjectLoc();return this;} - public const int RequestedObjectLocFieldTag=3; - public bool HasRequestedObjectLoc{ get {return super.HasRequestedObjectLoc;} } - public ObjLoc RequestedObjectLoc{ get { - if (HasRequestedObjectLoc) { - return new ObjLoc(super.RequestedObjectLoc); - } else { - return new ObjLoc(); - } - } - set { - super.RequestedObjectLoc=value._PBJSuper; - } - } - public Builder ClearBoundingSphere() { super.ClearBoundingSphere();return this;} - public const int BoundingSphereFieldTag=4; - public bool HasBoundingSphere{ get {return super.BoundingSphereCount>=4;} } - public PBJ.BoundingSphere3f BoundingSphere{ get { - int index=0; - if (HasBoundingSphere) { - return PBJ._PBJ.CastBoundingsphere3f(super.GetBoundingSphere(index*4+0),super.GetBoundingSphere(index*4+1),super.GetBoundingSphere(index*4+2),super.GetBoundingSphere(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3f(); - } - } - set { - super.ClearBoundingSphere(); - float[] _PBJtempArray=PBJ._PBJ.ConstructBoundingsphere3f(value); - super.AddBoundingSphere(_PBJtempArray[0]); - super.AddBoundingSphere(_PBJtempArray[1]); - super.AddBoundingSphere(_PBJtempArray[2]); - super.AddBoundingSphere(_PBJtempArray[3]); - } - } - } - } -} -namespace Sirikata.Protocol { - public class RetObj : PBJ.IMessage { - protected _PBJ_Internal.RetObj super; - public _PBJ_Internal.RetObj _PBJSuper{ get { return super;} } - public RetObj() { - super=new _PBJ_Internal.RetObj(); - } - public RetObj(_PBJ_Internal.RetObj reference) { - super=reference; - } - public static RetObj defaultInstance= new RetObj (_PBJ_Internal.RetObj.DefaultInstance); - public static RetObj DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.RetObj.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 ObjectReferenceFieldTag=2; - public bool HasObjectReference{ get {return super.HasObjectReference&&PBJ._PBJ.ValidateUuid(super.ObjectReference);} } - public PBJ.UUID ObjectReference{ get { - if (HasObjectReference) { - return PBJ._PBJ.CastUuid(super.ObjectReference); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int LocationFieldTag=3; - public bool HasLocation{ get {return super.HasLocation;} } - public ObjLoc Location{ get { - if (HasLocation) { - return new ObjLoc(super.Location); - } else { - return new ObjLoc(); - } - } - } - public const int BoundingSphereFieldTag=4; - public bool HasBoundingSphere{ get {return super.BoundingSphereCount>=4;} } - public PBJ.BoundingSphere3f BoundingSphere{ get { - int index=0; - if (HasBoundingSphere) { - return PBJ._PBJ.CastBoundingsphere3f(super.GetBoundingSphere(index*4+0),super.GetBoundingSphere(index*4+1),super.GetBoundingSphere(index*4+2),super.GetBoundingSphere(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3f(); - } - } - } - 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(RetObj prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static RetObj ParseFrom(pb::ByteString data) { - return new RetObj(_PBJ_Internal.RetObj.ParseFrom(data)); - } - public static RetObj ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new RetObj(_PBJ_Internal.RetObj.ParseFrom(data,er)); - } - public static RetObj ParseFrom(byte[] data) { - return new RetObj(_PBJ_Internal.RetObj.ParseFrom(data)); - } - public static RetObj ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new RetObj(_PBJ_Internal.RetObj.ParseFrom(data,er)); - } - public static RetObj ParseFrom(global::System.IO.Stream data) { - return new RetObj(_PBJ_Internal.RetObj.ParseFrom(data)); - } - public static RetObj ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new RetObj(_PBJ_Internal.RetObj.ParseFrom(data,er)); - } - public static RetObj ParseFrom(pb::CodedInputStream data) { - return new RetObj(_PBJ_Internal.RetObj.ParseFrom(data)); - } - public static RetObj ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new RetObj(_PBJ_Internal.RetObj.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.RetObj.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.RetObj.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.RetObj.Builder();} - public Builder(_PBJ_Internal.RetObj.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(RetObj prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public RetObj BuildPartial() {return new RetObj(super.BuildPartial());} - public RetObj Build() {if (_HasAllPBJFields) return new RetObj(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return RetObj.Descriptor; } } - public Builder ClearObjectReference() { super.ClearObjectReference();return this;} - public const int ObjectReferenceFieldTag=2; - public bool HasObjectReference{ get {return super.HasObjectReference&&PBJ._PBJ.ValidateUuid(super.ObjectReference);} } - public PBJ.UUID ObjectReference{ get { - if (HasObjectReference) { - return PBJ._PBJ.CastUuid(super.ObjectReference); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.ObjectReference=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearLocation() { super.ClearLocation();return this;} - public const int LocationFieldTag=3; - public bool HasLocation{ get {return super.HasLocation;} } - public ObjLoc Location{ get { - if (HasLocation) { - return new ObjLoc(super.Location); - } else { - return new ObjLoc(); - } - } - set { - super.Location=value._PBJSuper; - } - } - public Builder ClearBoundingSphere() { super.ClearBoundingSphere();return this;} - public const int BoundingSphereFieldTag=4; - public bool HasBoundingSphere{ get {return super.BoundingSphereCount>=4;} } - public PBJ.BoundingSphere3f BoundingSphere{ get { - int index=0; - if (HasBoundingSphere) { - return PBJ._PBJ.CastBoundingsphere3f(super.GetBoundingSphere(index*4+0),super.GetBoundingSphere(index*4+1),super.GetBoundingSphere(index*4+2),super.GetBoundingSphere(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3f(); - } - } - set { - super.ClearBoundingSphere(); - float[] _PBJtempArray=PBJ._PBJ.ConstructBoundingsphere3f(value); - super.AddBoundingSphere(_PBJtempArray[0]); - super.AddBoundingSphere(_PBJtempArray[1]); - super.AddBoundingSphere(_PBJtempArray[2]); - super.AddBoundingSphere(_PBJtempArray[3]); - } - } - } - } -} -namespace Sirikata.Protocol { - public class DelObj : PBJ.IMessage { - protected _PBJ_Internal.DelObj super; - public _PBJ_Internal.DelObj _PBJSuper{ get { return super;} } - public DelObj() { - super=new _PBJ_Internal.DelObj(); - } - public DelObj(_PBJ_Internal.DelObj reference) { - super=reference; - } - public static DelObj defaultInstance= new DelObj (_PBJ_Internal.DelObj.DefaultInstance); - public static DelObj DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.DelObj.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 ObjectReferenceFieldTag=2; - public bool HasObjectReference{ get {return super.HasObjectReference&&PBJ._PBJ.ValidateUuid(super.ObjectReference);} } - public PBJ.UUID ObjectReference{ get { - if (HasObjectReference) { - return PBJ._PBJ.CastUuid(super.ObjectReference); - } 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(DelObj prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static DelObj ParseFrom(pb::ByteString data) { - return new DelObj(_PBJ_Internal.DelObj.ParseFrom(data)); - } - public static DelObj ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new DelObj(_PBJ_Internal.DelObj.ParseFrom(data,er)); - } - public static DelObj ParseFrom(byte[] data) { - return new DelObj(_PBJ_Internal.DelObj.ParseFrom(data)); - } - public static DelObj ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new DelObj(_PBJ_Internal.DelObj.ParseFrom(data,er)); - } - public static DelObj ParseFrom(global::System.IO.Stream data) { - return new DelObj(_PBJ_Internal.DelObj.ParseFrom(data)); - } - public static DelObj ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new DelObj(_PBJ_Internal.DelObj.ParseFrom(data,er)); - } - public static DelObj ParseFrom(pb::CodedInputStream data) { - return new DelObj(_PBJ_Internal.DelObj.ParseFrom(data)); - } - public static DelObj ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new DelObj(_PBJ_Internal.DelObj.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.DelObj.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.DelObj.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.DelObj.Builder();} - public Builder(_PBJ_Internal.DelObj.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(DelObj prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public DelObj BuildPartial() {return new DelObj(super.BuildPartial());} - public DelObj Build() {if (_HasAllPBJFields) return new DelObj(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return DelObj.Descriptor; } } - public Builder ClearObjectReference() { super.ClearObjectReference();return this;} - public const int ObjectReferenceFieldTag=2; - public bool HasObjectReference{ get {return super.HasObjectReference&&PBJ._PBJ.ValidateUuid(super.ObjectReference);} } - public PBJ.UUID ObjectReference{ get { - if (HasObjectReference) { - return PBJ._PBJ.CastUuid(super.ObjectReference); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.ObjectReference=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class NewProxQuery : PBJ.IMessage { - protected _PBJ_Internal.NewProxQuery super; - public _PBJ_Internal.NewProxQuery _PBJSuper{ get { return super;} } - public NewProxQuery() { - super=new _PBJ_Internal.NewProxQuery(); - } - public NewProxQuery(_PBJ_Internal.NewProxQuery reference) { - super=reference; - } - public static NewProxQuery defaultInstance= new NewProxQuery (_PBJ_Internal.NewProxQuery.DefaultInstance); - public static NewProxQuery DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.NewProxQuery.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 QueryIdFieldTag=2; - public bool HasQueryId{ get {return super.HasQueryId&&PBJ._PBJ.ValidateUint32(super.QueryId);} } - public uint QueryId{ get { - if (HasQueryId) { - return PBJ._PBJ.CastUint32(super.QueryId); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int StatelessFieldTag=3; - public bool HasStateless{ get {return super.HasStateless&&PBJ._PBJ.ValidateBool(super.Stateless);} } - public bool Stateless{ get { - if (HasStateless) { - return PBJ._PBJ.CastBool(super.Stateless); - } else { - return PBJ._PBJ.CastBool(); - } - } - } - public const int RelativeCenterFieldTag=4; - public bool HasRelativeCenter{ get {return super.RelativeCenterCount>=3;} } - public PBJ.Vector3f RelativeCenter{ get { - int index=0; - if (HasRelativeCenter) { - return PBJ._PBJ.CastVector3f(super.GetRelativeCenter(index*3+0),super.GetRelativeCenter(index*3+1),super.GetRelativeCenter(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int AbsoluteCenterFieldTag=5; - public bool HasAbsoluteCenter{ get {return super.AbsoluteCenterCount>=3;} } - public PBJ.Vector3d AbsoluteCenter{ get { - int index=0; - if (HasAbsoluteCenter) { - return PBJ._PBJ.CastVector3d(super.GetAbsoluteCenter(index*3+0),super.GetAbsoluteCenter(index*3+1),super.GetAbsoluteCenter(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - } - public const int MaxRadiusFieldTag=6; - public bool HasMaxRadius{ get {return super.HasMaxRadius&&PBJ._PBJ.ValidateFloat(super.MaxRadius);} } - public float MaxRadius{ get { - if (HasMaxRadius) { - return PBJ._PBJ.CastFloat(super.MaxRadius); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int MinSolidAngleFieldTag=7; - public bool HasMinSolidAngle{ get {return super.HasMinSolidAngle&&PBJ._PBJ.ValidateAngle(super.MinSolidAngle);} } - public float MinSolidAngle{ get { - if (HasMinSolidAngle) { - return PBJ._PBJ.CastAngle(super.MinSolidAngle); - } else { - return PBJ._PBJ.CastAngle(); - } - } - } - 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(NewProxQuery prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static NewProxQuery ParseFrom(pb::ByteString data) { - return new NewProxQuery(_PBJ_Internal.NewProxQuery.ParseFrom(data)); - } - public static NewProxQuery ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new NewProxQuery(_PBJ_Internal.NewProxQuery.ParseFrom(data,er)); - } - public static NewProxQuery ParseFrom(byte[] data) { - return new NewProxQuery(_PBJ_Internal.NewProxQuery.ParseFrom(data)); - } - public static NewProxQuery ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new NewProxQuery(_PBJ_Internal.NewProxQuery.ParseFrom(data,er)); - } - public static NewProxQuery ParseFrom(global::System.IO.Stream data) { - return new NewProxQuery(_PBJ_Internal.NewProxQuery.ParseFrom(data)); - } - public static NewProxQuery ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new NewProxQuery(_PBJ_Internal.NewProxQuery.ParseFrom(data,er)); - } - public static NewProxQuery ParseFrom(pb::CodedInputStream data) { - return new NewProxQuery(_PBJ_Internal.NewProxQuery.ParseFrom(data)); - } - public static NewProxQuery ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new NewProxQuery(_PBJ_Internal.NewProxQuery.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.NewProxQuery.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.NewProxQuery.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.NewProxQuery.Builder();} - public Builder(_PBJ_Internal.NewProxQuery.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(NewProxQuery prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public NewProxQuery BuildPartial() {return new NewProxQuery(super.BuildPartial());} - public NewProxQuery Build() {if (_HasAllPBJFields) return new NewProxQuery(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return NewProxQuery.Descriptor; } } - public Builder ClearQueryId() { super.ClearQueryId();return this;} - public const int QueryIdFieldTag=2; - public bool HasQueryId{ get {return super.HasQueryId&&PBJ._PBJ.ValidateUint32(super.QueryId);} } - public uint QueryId{ get { - if (HasQueryId) { - return PBJ._PBJ.CastUint32(super.QueryId); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.QueryId=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearStateless() { super.ClearStateless();return this;} - public const int StatelessFieldTag=3; - public bool HasStateless{ get {return super.HasStateless&&PBJ._PBJ.ValidateBool(super.Stateless);} } - public bool Stateless{ get { - if (HasStateless) { - return PBJ._PBJ.CastBool(super.Stateless); - } else { - return PBJ._PBJ.CastBool(); - } - } - set { - super.Stateless=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearRelativeCenter() { super.ClearRelativeCenter();return this;} - public const int RelativeCenterFieldTag=4; - public bool HasRelativeCenter{ get {return super.RelativeCenterCount>=3;} } - public PBJ.Vector3f RelativeCenter{ get { - int index=0; - if (HasRelativeCenter) { - return PBJ._PBJ.CastVector3f(super.GetRelativeCenter(index*3+0),super.GetRelativeCenter(index*3+1),super.GetRelativeCenter(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearRelativeCenter(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddRelativeCenter(_PBJtempArray[0]); - super.AddRelativeCenter(_PBJtempArray[1]); - super.AddRelativeCenter(_PBJtempArray[2]); - } - } - public Builder ClearAbsoluteCenter() { super.ClearAbsoluteCenter();return this;} - public const int AbsoluteCenterFieldTag=5; - public bool HasAbsoluteCenter{ get {return super.AbsoluteCenterCount>=3;} } - public PBJ.Vector3d AbsoluteCenter{ get { - int index=0; - if (HasAbsoluteCenter) { - return PBJ._PBJ.CastVector3d(super.GetAbsoluteCenter(index*3+0),super.GetAbsoluteCenter(index*3+1),super.GetAbsoluteCenter(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - set { - super.ClearAbsoluteCenter(); - double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value); - super.AddAbsoluteCenter(_PBJtempArray[0]); - super.AddAbsoluteCenter(_PBJtempArray[1]); - super.AddAbsoluteCenter(_PBJtempArray[2]); - } - } - public Builder ClearMaxRadius() { super.ClearMaxRadius();return this;} - public const int MaxRadiusFieldTag=6; - public bool HasMaxRadius{ get {return super.HasMaxRadius&&PBJ._PBJ.ValidateFloat(super.MaxRadius);} } - public float MaxRadius{ get { - if (HasMaxRadius) { - return PBJ._PBJ.CastFloat(super.MaxRadius); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.MaxRadius=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearMinSolidAngle() { super.ClearMinSolidAngle();return this;} - public const int MinSolidAngleFieldTag=7; - public bool HasMinSolidAngle{ get {return super.HasMinSolidAngle&&PBJ._PBJ.ValidateAngle(super.MinSolidAngle);} } - public float MinSolidAngle{ get { - if (HasMinSolidAngle) { - return PBJ._PBJ.CastAngle(super.MinSolidAngle); - } else { - return PBJ._PBJ.CastAngle(); - } - } - set { - super.MinSolidAngle=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class ProxCall : PBJ.IMessage { - protected _PBJ_Internal.ProxCall super; - public _PBJ_Internal.ProxCall _PBJSuper{ get { return super;} } - public ProxCall() { - super=new _PBJ_Internal.ProxCall(); - } - public ProxCall(_PBJ_Internal.ProxCall reference) { - super=reference; - } - public static ProxCall defaultInstance= new ProxCall (_PBJ_Internal.ProxCall.DefaultInstance); - public static ProxCall DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.ProxCall.Descriptor; } } - public static class Types { - public enum ProximityEvent { - EXITED_PROXIMITY=_PBJ_Internal.ProxCall.Types.ProximityEvent.EXITED_PROXIMITY, - ENTERED_PROXIMITY=_PBJ_Internal.ProxCall.Types.ProximityEvent.ENTERED_PROXIMITY, - STATELESS_PROXIMITY=_PBJ_Internal.ProxCall.Types.ProximityEvent.STATELESS_PROXIMITY - }; - } - public static bool WithinReservedFieldTagRange(int field_tag) { - return false; - } - public static bool WithinExtensionFieldTagRange(int field_tag) { - return false; - } - public const int QueryIdFieldTag=2; - public bool HasQueryId{ get {return super.HasQueryId&&PBJ._PBJ.ValidateUint32(super.QueryId);} } - public uint QueryId{ get { - if (HasQueryId) { - return PBJ._PBJ.CastUint32(super.QueryId); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int ProximateObjectFieldTag=3; - public bool HasProximateObject{ get {return super.HasProximateObject&&PBJ._PBJ.ValidateUuid(super.ProximateObject);} } - public PBJ.UUID ProximateObject{ get { - if (HasProximateObject) { - return PBJ._PBJ.CastUuid(super.ProximateObject); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int ProximityEventFieldTag=4; - public bool HasProximityEvent{ get {return super.HasProximityEvent;} } - public Types.ProximityEvent ProximityEvent{ get { - if (HasProximityEvent) { - return (Types.ProximityEvent)super.ProximityEvent; - } else { - return new Types.ProximityEvent(); - } - } - } - 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(ProxCall prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static ProxCall ParseFrom(pb::ByteString data) { - return new ProxCall(_PBJ_Internal.ProxCall.ParseFrom(data)); - } - public static ProxCall ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new ProxCall(_PBJ_Internal.ProxCall.ParseFrom(data,er)); - } - public static ProxCall ParseFrom(byte[] data) { - return new ProxCall(_PBJ_Internal.ProxCall.ParseFrom(data)); - } - public static ProxCall ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new ProxCall(_PBJ_Internal.ProxCall.ParseFrom(data,er)); - } - public static ProxCall ParseFrom(global::System.IO.Stream data) { - return new ProxCall(_PBJ_Internal.ProxCall.ParseFrom(data)); - } - public static ProxCall ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new ProxCall(_PBJ_Internal.ProxCall.ParseFrom(data,er)); - } - public static ProxCall ParseFrom(pb::CodedInputStream data) { - return new ProxCall(_PBJ_Internal.ProxCall.ParseFrom(data)); - } - public static ProxCall ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new ProxCall(_PBJ_Internal.ProxCall.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.ProxCall.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.ProxCall.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.ProxCall.Builder();} - public Builder(_PBJ_Internal.ProxCall.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(ProxCall prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public ProxCall BuildPartial() {return new ProxCall(super.BuildPartial());} - public ProxCall Build() {if (_HasAllPBJFields) return new ProxCall(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return ProxCall.Descriptor; } } - public Builder ClearQueryId() { super.ClearQueryId();return this;} - public const int QueryIdFieldTag=2; - public bool HasQueryId{ get {return super.HasQueryId&&PBJ._PBJ.ValidateUint32(super.QueryId);} } - public uint QueryId{ get { - if (HasQueryId) { - return PBJ._PBJ.CastUint32(super.QueryId); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.QueryId=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearProximateObject() { super.ClearProximateObject();return this;} - public const int ProximateObjectFieldTag=3; - public bool HasProximateObject{ get {return super.HasProximateObject&&PBJ._PBJ.ValidateUuid(super.ProximateObject);} } - public PBJ.UUID ProximateObject{ get { - if (HasProximateObject) { - return PBJ._PBJ.CastUuid(super.ProximateObject); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.ProximateObject=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearProximityEvent() { super.ClearProximityEvent();return this;} - public const int ProximityEventFieldTag=4; - public bool HasProximityEvent{ get {return super.HasProximityEvent;} } - public Types.ProximityEvent ProximityEvent{ get { - if (HasProximityEvent) { - return (Types.ProximityEvent)super.ProximityEvent; - } else { - return new Types.ProximityEvent(); - } - } - set { - super.ProximityEvent=((_PBJ_Internal.ProxCall.Types.ProximityEvent)value); - } - } - } - } -} -namespace Sirikata.Protocol { - public class DelProxQuery : PBJ.IMessage { - protected _PBJ_Internal.DelProxQuery super; - public _PBJ_Internal.DelProxQuery _PBJSuper{ get { return super;} } - public DelProxQuery() { - super=new _PBJ_Internal.DelProxQuery(); - } - public DelProxQuery(_PBJ_Internal.DelProxQuery reference) { - super=reference; - } - public static DelProxQuery defaultInstance= new DelProxQuery (_PBJ_Internal.DelProxQuery.DefaultInstance); - public static DelProxQuery DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.DelProxQuery.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 QueryIdFieldTag=2; - public bool HasQueryId{ get {return super.HasQueryId&&PBJ._PBJ.ValidateUint32(super.QueryId);} } - public uint QueryId{ get { - if (HasQueryId) { - return PBJ._PBJ.CastUint32(super.QueryId); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - 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(DelProxQuery prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static DelProxQuery ParseFrom(pb::ByteString data) { - return new DelProxQuery(_PBJ_Internal.DelProxQuery.ParseFrom(data)); - } - public static DelProxQuery ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new DelProxQuery(_PBJ_Internal.DelProxQuery.ParseFrom(data,er)); - } - public static DelProxQuery ParseFrom(byte[] data) { - return new DelProxQuery(_PBJ_Internal.DelProxQuery.ParseFrom(data)); - } - public static DelProxQuery ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new DelProxQuery(_PBJ_Internal.DelProxQuery.ParseFrom(data,er)); - } - public static DelProxQuery ParseFrom(global::System.IO.Stream data) { - return new DelProxQuery(_PBJ_Internal.DelProxQuery.ParseFrom(data)); - } - public static DelProxQuery ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new DelProxQuery(_PBJ_Internal.DelProxQuery.ParseFrom(data,er)); - } - public static DelProxQuery ParseFrom(pb::CodedInputStream data) { - return new DelProxQuery(_PBJ_Internal.DelProxQuery.ParseFrom(data)); - } - public static DelProxQuery ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new DelProxQuery(_PBJ_Internal.DelProxQuery.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.DelProxQuery.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.DelProxQuery.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.DelProxQuery.Builder();} - public Builder(_PBJ_Internal.DelProxQuery.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(DelProxQuery prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public DelProxQuery BuildPartial() {return new DelProxQuery(super.BuildPartial());} - public DelProxQuery Build() {if (_HasAllPBJFields) return new DelProxQuery(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return DelProxQuery.Descriptor; } } - public Builder ClearQueryId() { super.ClearQueryId();return this;} - public const int QueryIdFieldTag=2; - public bool HasQueryId{ get {return super.HasQueryId&&PBJ._PBJ.ValidateUint32(super.QueryId);} } - public uint QueryId{ get { - if (HasQueryId) { - return PBJ._PBJ.CastUint32(super.QueryId); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.QueryId=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class Vector3fProperty : PBJ.IMessage { - protected _PBJ_Internal.Vector3fProperty super; - public _PBJ_Internal.Vector3fProperty _PBJSuper{ get { return super;} } - public Vector3fProperty() { - super=new _PBJ_Internal.Vector3fProperty(); - } - public Vector3fProperty(_PBJ_Internal.Vector3fProperty reference) { - super=reference; - } - public static Vector3fProperty defaultInstance= new Vector3fProperty (_PBJ_Internal.Vector3fProperty.DefaultInstance); - public static Vector3fProperty DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.Vector3fProperty.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 ValueFieldTag=10; - public bool HasValue{ get {return super.ValueCount>=3;} } - public PBJ.Vector3f Value{ get { - int index=0; - if (HasValue) { - return PBJ._PBJ.CastVector3f(super.GetValue(index*3+0),super.GetValue(index*3+1),super.GetValue(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - 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(Vector3fProperty prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static Vector3fProperty ParseFrom(pb::ByteString data) { - return new Vector3fProperty(_PBJ_Internal.Vector3fProperty.ParseFrom(data)); - } - public static Vector3fProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new Vector3fProperty(_PBJ_Internal.Vector3fProperty.ParseFrom(data,er)); - } - public static Vector3fProperty ParseFrom(byte[] data) { - return new Vector3fProperty(_PBJ_Internal.Vector3fProperty.ParseFrom(data)); - } - public static Vector3fProperty ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new Vector3fProperty(_PBJ_Internal.Vector3fProperty.ParseFrom(data,er)); - } - public static Vector3fProperty ParseFrom(global::System.IO.Stream data) { - return new Vector3fProperty(_PBJ_Internal.Vector3fProperty.ParseFrom(data)); - } - public static Vector3fProperty ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new Vector3fProperty(_PBJ_Internal.Vector3fProperty.ParseFrom(data,er)); - } - public static Vector3fProperty ParseFrom(pb::CodedInputStream data) { - return new Vector3fProperty(_PBJ_Internal.Vector3fProperty.ParseFrom(data)); - } - public static Vector3fProperty ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new Vector3fProperty(_PBJ_Internal.Vector3fProperty.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.Vector3fProperty.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.Vector3fProperty.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.Vector3fProperty.Builder();} - public Builder(_PBJ_Internal.Vector3fProperty.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(Vector3fProperty prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public Vector3fProperty BuildPartial() {return new Vector3fProperty(super.BuildPartial());} - public Vector3fProperty Build() {if (_HasAllPBJFields) return new Vector3fProperty(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return Vector3fProperty.Descriptor; } } - public Builder ClearValue() { super.ClearValue();return this;} - public const int ValueFieldTag=10; - public bool HasValue{ get {return super.ValueCount>=3;} } - public PBJ.Vector3f Value{ get { - int index=0; - if (HasValue) { - return PBJ._PBJ.CastVector3f(super.GetValue(index*3+0),super.GetValue(index*3+1),super.GetValue(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearValue(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddValue(_PBJtempArray[0]); - super.AddValue(_PBJtempArray[1]); - super.AddValue(_PBJtempArray[2]); - } - } - } - } -} -namespace Sirikata.Protocol { - public class StringProperty : PBJ.IMessage { - protected _PBJ_Internal.StringProperty super; - public _PBJ_Internal.StringProperty _PBJSuper{ get { return super;} } - public StringProperty() { - super=new _PBJ_Internal.StringProperty(); - } - public StringProperty(_PBJ_Internal.StringProperty reference) { - super=reference; - } - public static StringProperty defaultInstance= new StringProperty (_PBJ_Internal.StringProperty.DefaultInstance); - public static StringProperty DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.StringProperty.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 ValueFieldTag=10; - public bool HasValue{ get {return super.HasValue&&PBJ._PBJ.ValidateString(super.Value);} } - public string Value{ get { - if (HasValue) { - return PBJ._PBJ.CastString(super.Value); - } 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(StringProperty prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static StringProperty ParseFrom(pb::ByteString data) { - return new StringProperty(_PBJ_Internal.StringProperty.ParseFrom(data)); - } - public static StringProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new StringProperty(_PBJ_Internal.StringProperty.ParseFrom(data,er)); - } - public static StringProperty ParseFrom(byte[] data) { - return new StringProperty(_PBJ_Internal.StringProperty.ParseFrom(data)); - } - public static StringProperty ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new StringProperty(_PBJ_Internal.StringProperty.ParseFrom(data,er)); - } - public static StringProperty ParseFrom(global::System.IO.Stream data) { - return new StringProperty(_PBJ_Internal.StringProperty.ParseFrom(data)); - } - public static StringProperty ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new StringProperty(_PBJ_Internal.StringProperty.ParseFrom(data,er)); - } - public static StringProperty ParseFrom(pb::CodedInputStream data) { - return new StringProperty(_PBJ_Internal.StringProperty.ParseFrom(data)); - } - public static StringProperty ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new StringProperty(_PBJ_Internal.StringProperty.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.StringProperty.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.StringProperty.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.StringProperty.Builder();} - public Builder(_PBJ_Internal.StringProperty.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(StringProperty prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public StringProperty BuildPartial() {return new StringProperty(super.BuildPartial());} - public StringProperty Build() {if (_HasAllPBJFields) return new StringProperty(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return StringProperty.Descriptor; } } - public Builder ClearValue() { super.ClearValue();return this;} - public const int ValueFieldTag=10; - public bool HasValue{ get {return super.HasValue&&PBJ._PBJ.ValidateString(super.Value);} } - public string Value{ get { - if (HasValue) { - return PBJ._PBJ.CastString(super.Value); - } else { - return PBJ._PBJ.CastString(); - } - } - set { - super.Value=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class StringMapProperty : PBJ.IMessage { - protected _PBJ_Internal.StringMapProperty super; - public _PBJ_Internal.StringMapProperty _PBJSuper{ get { return super;} } - public StringMapProperty() { - super=new _PBJ_Internal.StringMapProperty(); - } - public StringMapProperty(_PBJ_Internal.StringMapProperty reference) { - super=reference; - } - public static StringMapProperty defaultInstance= new StringMapProperty (_PBJ_Internal.StringMapProperty.DefaultInstance); - public static StringMapProperty DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.StringMapProperty.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 KeysFieldTag=2; - public int KeysCount { get { return super.KeysCount;} } - public bool HasKeys(int index) {return PBJ._PBJ.ValidateString(super.GetKeys(index));} - public string Keys(int index) { - return (string)PBJ._PBJ.CastString(super.GetKeys(index)); - } - public const int ValuesFieldTag=3; - public int ValuesCount { get { return super.ValuesCount;} } - public bool HasValues(int index) {return PBJ._PBJ.ValidateString(super.GetValues(index));} - public string Values(int index) { - return (string)PBJ._PBJ.CastString(super.GetValues(index)); - } - 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(StringMapProperty prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static StringMapProperty ParseFrom(pb::ByteString data) { - return new StringMapProperty(_PBJ_Internal.StringMapProperty.ParseFrom(data)); - } - public static StringMapProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new StringMapProperty(_PBJ_Internal.StringMapProperty.ParseFrom(data,er)); - } - public static StringMapProperty ParseFrom(byte[] data) { - return new StringMapProperty(_PBJ_Internal.StringMapProperty.ParseFrom(data)); - } - public static StringMapProperty ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new StringMapProperty(_PBJ_Internal.StringMapProperty.ParseFrom(data,er)); - } - public static StringMapProperty ParseFrom(global::System.IO.Stream data) { - return new StringMapProperty(_PBJ_Internal.StringMapProperty.ParseFrom(data)); - } - public static StringMapProperty ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new StringMapProperty(_PBJ_Internal.StringMapProperty.ParseFrom(data,er)); - } - public static StringMapProperty ParseFrom(pb::CodedInputStream data) { - return new StringMapProperty(_PBJ_Internal.StringMapProperty.ParseFrom(data)); - } - public static StringMapProperty ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new StringMapProperty(_PBJ_Internal.StringMapProperty.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.StringMapProperty.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.StringMapProperty.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.StringMapProperty.Builder();} - public Builder(_PBJ_Internal.StringMapProperty.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(StringMapProperty prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public StringMapProperty BuildPartial() {return new StringMapProperty(super.BuildPartial());} - public StringMapProperty Build() {if (_HasAllPBJFields) return new StringMapProperty(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return StringMapProperty.Descriptor; } } - public Builder ClearKeys() { super.ClearKeys();return this;} - public Builder SetKeys(int index, string value) { - super.SetKeys(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int KeysFieldTag=2; - public int KeysCount { get { return super.KeysCount;} } - public bool HasKeys(int index) {return PBJ._PBJ.ValidateString(super.GetKeys(index));} - public string Keys(int index) { - return (string)PBJ._PBJ.CastString(super.GetKeys(index)); - } - public Builder AddKeys(string value) { - super.AddKeys(PBJ._PBJ.Construct(value)); - return this; - } - public Builder ClearValues() { super.ClearValues();return this;} - public Builder SetValues(int index, string value) { - super.SetValues(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int ValuesFieldTag=3; - public int ValuesCount { get { return super.ValuesCount;} } - public bool HasValues(int index) {return PBJ._PBJ.ValidateString(super.GetValues(index));} - public string Values(int index) { - return (string)PBJ._PBJ.CastString(super.GetValues(index)); - } - public Builder AddValues(string value) { - super.AddValues(PBJ._PBJ.Construct(value)); - return this; - } - } - } -} -namespace Sirikata.Protocol { - public class PhysicalParameters : PBJ.IMessage { - protected _PBJ_Internal.PhysicalParameters super; - public _PBJ_Internal.PhysicalParameters _PBJSuper{ get { return super;} } - public PhysicalParameters() { - super=new _PBJ_Internal.PhysicalParameters(); - } - public PhysicalParameters(_PBJ_Internal.PhysicalParameters reference) { - super=reference; - } - public static PhysicalParameters defaultInstance= new PhysicalParameters (_PBJ_Internal.PhysicalParameters.DefaultInstance); - public static PhysicalParameters DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.PhysicalParameters.Descriptor; } } - public static class Types { - public enum Mode { - NONPHYSICAL=_PBJ_Internal.PhysicalParameters.Types.Mode.NONPHYSICAL, - STATIC=_PBJ_Internal.PhysicalParameters.Types.Mode.STATIC, - DYNAMICBOX=_PBJ_Internal.PhysicalParameters.Types.Mode.DYNAMICBOX, - DYNAMICSPHERE=_PBJ_Internal.PhysicalParameters.Types.Mode.DYNAMICSPHERE, - DYNAMICCYLINDER=_PBJ_Internal.PhysicalParameters.Types.Mode.DYNAMICCYLINDER, - CHARACTER=_PBJ_Internal.PhysicalParameters.Types.Mode.CHARACTER - }; - } - public static bool WithinReservedFieldTagRange(int field_tag) { - return false; - } - public static bool WithinExtensionFieldTagRange(int field_tag) { - return false; - } - public const int ModeFieldTag=2; - public bool HasMode{ get {return super.HasMode;} } - public Types.Mode Mode{ get { - if (HasMode) { - return (Types.Mode)super.Mode; - } else { - return new Types.Mode(); - } - } - } - public const int DensityFieldTag=3; - public bool HasDensity{ get {return super.HasDensity&&PBJ._PBJ.ValidateFloat(super.Density);} } - public float Density{ get { - if (HasDensity) { - return PBJ._PBJ.CastFloat(super.Density); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int FrictionFieldTag=4; - public bool HasFriction{ get {return super.HasFriction&&PBJ._PBJ.ValidateFloat(super.Friction);} } - public float Friction{ get { - if (HasFriction) { - return PBJ._PBJ.CastFloat(super.Friction); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int BounceFieldTag=5; - public bool HasBounce{ get {return super.HasBounce&&PBJ._PBJ.ValidateFloat(super.Bounce);} } - public float Bounce{ get { - if (HasBounce) { - return PBJ._PBJ.CastFloat(super.Bounce); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int HullFieldTag=6; - public bool HasHull{ get {return super.HullCount>=3;} } - public PBJ.Vector3f Hull{ get { - int index=0; - if (HasHull) { - return PBJ._PBJ.CastVector3f(super.GetHull(index*3+0),super.GetHull(index*3+1),super.GetHull(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int CollideMsgFieldTag=16; - public bool HasCollideMsg{ get {return super.HasCollideMsg&&PBJ._PBJ.ValidateUint32(super.CollideMsg);} } - public uint CollideMsg{ get { - if (HasCollideMsg) { - return PBJ._PBJ.CastUint32(super.CollideMsg); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int CollideMaskFieldTag=17; - public bool HasCollideMask{ get {return super.HasCollideMask&&PBJ._PBJ.ValidateUint32(super.CollideMask);} } - public uint CollideMask{ get { - if (HasCollideMask) { - return PBJ._PBJ.CastUint32(super.CollideMask); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int GravityFieldTag=18; - public bool HasGravity{ get {return super.HasGravity&&PBJ._PBJ.ValidateFloat(super.Gravity);} } - public float Gravity{ get { - if (HasGravity) { - return PBJ._PBJ.CastFloat(super.Gravity); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - 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(PhysicalParameters prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static PhysicalParameters ParseFrom(pb::ByteString data) { - return new PhysicalParameters(_PBJ_Internal.PhysicalParameters.ParseFrom(data)); - } - public static PhysicalParameters ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new PhysicalParameters(_PBJ_Internal.PhysicalParameters.ParseFrom(data,er)); - } - public static PhysicalParameters ParseFrom(byte[] data) { - return new PhysicalParameters(_PBJ_Internal.PhysicalParameters.ParseFrom(data)); - } - public static PhysicalParameters ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new PhysicalParameters(_PBJ_Internal.PhysicalParameters.ParseFrom(data,er)); - } - public static PhysicalParameters ParseFrom(global::System.IO.Stream data) { - return new PhysicalParameters(_PBJ_Internal.PhysicalParameters.ParseFrom(data)); - } - public static PhysicalParameters ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new PhysicalParameters(_PBJ_Internal.PhysicalParameters.ParseFrom(data,er)); - } - public static PhysicalParameters ParseFrom(pb::CodedInputStream data) { - return new PhysicalParameters(_PBJ_Internal.PhysicalParameters.ParseFrom(data)); - } - public static PhysicalParameters ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new PhysicalParameters(_PBJ_Internal.PhysicalParameters.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.PhysicalParameters.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.PhysicalParameters.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.PhysicalParameters.Builder();} - public Builder(_PBJ_Internal.PhysicalParameters.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(PhysicalParameters prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public PhysicalParameters BuildPartial() {return new PhysicalParameters(super.BuildPartial());} - public PhysicalParameters Build() {if (_HasAllPBJFields) return new PhysicalParameters(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return PhysicalParameters.Descriptor; } } - public Builder ClearMode() { super.ClearMode();return this;} - public const int ModeFieldTag=2; - public bool HasMode{ get {return super.HasMode;} } - public Types.Mode Mode{ get { - if (HasMode) { - return (Types.Mode)super.Mode; - } else { - return new Types.Mode(); - } - } - set { - super.Mode=((_PBJ_Internal.PhysicalParameters.Types.Mode)value); - } - } - public Builder ClearDensity() { super.ClearDensity();return this;} - public const int DensityFieldTag=3; - public bool HasDensity{ get {return super.HasDensity&&PBJ._PBJ.ValidateFloat(super.Density);} } - public float Density{ get { - if (HasDensity) { - return PBJ._PBJ.CastFloat(super.Density); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.Density=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearFriction() { super.ClearFriction();return this;} - public const int FrictionFieldTag=4; - public bool HasFriction{ get {return super.HasFriction&&PBJ._PBJ.ValidateFloat(super.Friction);} } - public float Friction{ get { - if (HasFriction) { - return PBJ._PBJ.CastFloat(super.Friction); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.Friction=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearBounce() { super.ClearBounce();return this;} - public const int BounceFieldTag=5; - public bool HasBounce{ get {return super.HasBounce&&PBJ._PBJ.ValidateFloat(super.Bounce);} } - public float Bounce{ get { - if (HasBounce) { - return PBJ._PBJ.CastFloat(super.Bounce); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.Bounce=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearHull() { super.ClearHull();return this;} - public const int HullFieldTag=6; - public bool HasHull{ get {return super.HullCount>=3;} } - public PBJ.Vector3f Hull{ get { - int index=0; - if (HasHull) { - return PBJ._PBJ.CastVector3f(super.GetHull(index*3+0),super.GetHull(index*3+1),super.GetHull(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearHull(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddHull(_PBJtempArray[0]); - super.AddHull(_PBJtempArray[1]); - super.AddHull(_PBJtempArray[2]); - } - } - public Builder ClearCollideMsg() { super.ClearCollideMsg();return this;} - public const int CollideMsgFieldTag=16; - public bool HasCollideMsg{ get {return super.HasCollideMsg&&PBJ._PBJ.ValidateUint32(super.CollideMsg);} } - public uint CollideMsg{ get { - if (HasCollideMsg) { - return PBJ._PBJ.CastUint32(super.CollideMsg); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.CollideMsg=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearCollideMask() { super.ClearCollideMask();return this;} - public const int CollideMaskFieldTag=17; - public bool HasCollideMask{ get {return super.HasCollideMask&&PBJ._PBJ.ValidateUint32(super.CollideMask);} } - public uint CollideMask{ get { - if (HasCollideMask) { - return PBJ._PBJ.CastUint32(super.CollideMask); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.CollideMask=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearGravity() { super.ClearGravity();return this;} - public const int GravityFieldTag=18; - public bool HasGravity{ get {return super.HasGravity&&PBJ._PBJ.ValidateFloat(super.Gravity);} } - public float Gravity{ get { - if (HasGravity) { - return PBJ._PBJ.CastFloat(super.Gravity); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.Gravity=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class LightInfoProperty : PBJ.IMessage { - protected _PBJ_Internal.LightInfoProperty super; - public _PBJ_Internal.LightInfoProperty _PBJSuper{ get { return super;} } - public LightInfoProperty() { - super=new _PBJ_Internal.LightInfoProperty(); - } - public LightInfoProperty(_PBJ_Internal.LightInfoProperty reference) { - super=reference; - } - public static LightInfoProperty defaultInstance= new LightInfoProperty (_PBJ_Internal.LightInfoProperty.DefaultInstance); - public static LightInfoProperty DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.LightInfoProperty.Descriptor; } } - public static class Types { - public enum LightTypes { - POINT=_PBJ_Internal.LightInfoProperty.Types.LightTypes.POINT, - SPOTLIGHT=_PBJ_Internal.LightInfoProperty.Types.LightTypes.SPOTLIGHT, - DIRECTIONAL=_PBJ_Internal.LightInfoProperty.Types.LightTypes.DIRECTIONAL - }; - } - public static bool WithinReservedFieldTagRange(int field_tag) { - return false; - } - public static bool WithinExtensionFieldTagRange(int field_tag) { - return false; - } - public const int DiffuseColorFieldTag=3; - public bool HasDiffuseColor{ get {return super.DiffuseColorCount>=3;} } - public PBJ.Vector3f DiffuseColor{ get { - int index=0; - if (HasDiffuseColor) { - return PBJ._PBJ.CastVector3f(super.GetDiffuseColor(index*3+0),super.GetDiffuseColor(index*3+1),super.GetDiffuseColor(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int SpecularColorFieldTag=4; - public bool HasSpecularColor{ get {return super.SpecularColorCount>=3;} } - public PBJ.Vector3f SpecularColor{ get { - int index=0; - if (HasSpecularColor) { - return PBJ._PBJ.CastVector3f(super.GetSpecularColor(index*3+0),super.GetSpecularColor(index*3+1),super.GetSpecularColor(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int PowerFieldTag=5; - public bool HasPower{ get {return super.HasPower&&PBJ._PBJ.ValidateFloat(super.Power);} } - public float Power{ get { - if (HasPower) { - return PBJ._PBJ.CastFloat(super.Power); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int AmbientColorFieldTag=6; - public bool HasAmbientColor{ get {return super.AmbientColorCount>=3;} } - public PBJ.Vector3f AmbientColor{ get { - int index=0; - if (HasAmbientColor) { - return PBJ._PBJ.CastVector3f(super.GetAmbientColor(index*3+0),super.GetAmbientColor(index*3+1),super.GetAmbientColor(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int ShadowColorFieldTag=7; - public bool HasShadowColor{ get {return super.ShadowColorCount>=3;} } - public PBJ.Vector3f ShadowColor{ get { - int index=0; - if (HasShadowColor) { - return PBJ._PBJ.CastVector3f(super.GetShadowColor(index*3+0),super.GetShadowColor(index*3+1),super.GetShadowColor(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int LightRangeFieldTag=8; - public bool HasLightRange{ get {return super.HasLightRange&&PBJ._PBJ.ValidateDouble(super.LightRange);} } - public double LightRange{ get { - if (HasLightRange) { - return PBJ._PBJ.CastDouble(super.LightRange); - } else { - return PBJ._PBJ.CastDouble(); - } - } - } - public const int ConstantFalloffFieldTag=9; - public bool HasConstantFalloff{ get {return super.HasConstantFalloff&&PBJ._PBJ.ValidateFloat(super.ConstantFalloff);} } - public float ConstantFalloff{ get { - if (HasConstantFalloff) { - return PBJ._PBJ.CastFloat(super.ConstantFalloff); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int LinearFalloffFieldTag=10; - public bool HasLinearFalloff{ get {return super.HasLinearFalloff&&PBJ._PBJ.ValidateFloat(super.LinearFalloff);} } - public float LinearFalloff{ get { - if (HasLinearFalloff) { - return PBJ._PBJ.CastFloat(super.LinearFalloff); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int QuadraticFalloffFieldTag=11; - public bool HasQuadraticFalloff{ get {return super.HasQuadraticFalloff&&PBJ._PBJ.ValidateFloat(super.QuadraticFalloff);} } - public float QuadraticFalloff{ get { - if (HasQuadraticFalloff) { - return PBJ._PBJ.CastFloat(super.QuadraticFalloff); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int ConeInnerRadiansFieldTag=12; - public bool HasConeInnerRadians{ get {return super.HasConeInnerRadians&&PBJ._PBJ.ValidateFloat(super.ConeInnerRadians);} } - public float ConeInnerRadians{ get { - if (HasConeInnerRadians) { - return PBJ._PBJ.CastFloat(super.ConeInnerRadians); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int ConeOuterRadiansFieldTag=13; - public bool HasConeOuterRadians{ get {return super.HasConeOuterRadians&&PBJ._PBJ.ValidateFloat(super.ConeOuterRadians);} } - public float ConeOuterRadians{ get { - if (HasConeOuterRadians) { - return PBJ._PBJ.CastFloat(super.ConeOuterRadians); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int ConeFalloffFieldTag=14; - public bool HasConeFalloff{ get {return super.HasConeFalloff&&PBJ._PBJ.ValidateFloat(super.ConeFalloff);} } - public float ConeFalloff{ get { - if (HasConeFalloff) { - return PBJ._PBJ.CastFloat(super.ConeFalloff); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int TypeFieldTag=15; - public bool HasType{ get {return super.HasType;} } - public Types.LightTypes Type{ get { - if (HasType) { - return (Types.LightTypes)super.Type; - } else { - return new Types.LightTypes(); - } - } - } - public const int CastsShadowFieldTag=16; - public bool HasCastsShadow{ get {return super.HasCastsShadow&&PBJ._PBJ.ValidateBool(super.CastsShadow);} } - public bool CastsShadow{ get { - if (HasCastsShadow) { - return PBJ._PBJ.CastBool(super.CastsShadow); - } else { - return PBJ._PBJ.CastBool(); - } - } - } - 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(LightInfoProperty prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static LightInfoProperty ParseFrom(pb::ByteString data) { - return new LightInfoProperty(_PBJ_Internal.LightInfoProperty.ParseFrom(data)); - } - public static LightInfoProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new LightInfoProperty(_PBJ_Internal.LightInfoProperty.ParseFrom(data,er)); - } - public static LightInfoProperty ParseFrom(byte[] data) { - return new LightInfoProperty(_PBJ_Internal.LightInfoProperty.ParseFrom(data)); - } - public static LightInfoProperty ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new LightInfoProperty(_PBJ_Internal.LightInfoProperty.ParseFrom(data,er)); - } - public static LightInfoProperty ParseFrom(global::System.IO.Stream data) { - return new LightInfoProperty(_PBJ_Internal.LightInfoProperty.ParseFrom(data)); - } - public static LightInfoProperty ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new LightInfoProperty(_PBJ_Internal.LightInfoProperty.ParseFrom(data,er)); - } - public static LightInfoProperty ParseFrom(pb::CodedInputStream data) { - return new LightInfoProperty(_PBJ_Internal.LightInfoProperty.ParseFrom(data)); - } - public static LightInfoProperty ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new LightInfoProperty(_PBJ_Internal.LightInfoProperty.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.LightInfoProperty.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.LightInfoProperty.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.LightInfoProperty.Builder();} - public Builder(_PBJ_Internal.LightInfoProperty.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(LightInfoProperty prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public LightInfoProperty BuildPartial() {return new LightInfoProperty(super.BuildPartial());} - public LightInfoProperty Build() {if (_HasAllPBJFields) return new LightInfoProperty(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return LightInfoProperty.Descriptor; } } - public Builder ClearDiffuseColor() { super.ClearDiffuseColor();return this;} - public const int DiffuseColorFieldTag=3; - public bool HasDiffuseColor{ get {return super.DiffuseColorCount>=3;} } - public PBJ.Vector3f DiffuseColor{ get { - int index=0; - if (HasDiffuseColor) { - return PBJ._PBJ.CastVector3f(super.GetDiffuseColor(index*3+0),super.GetDiffuseColor(index*3+1),super.GetDiffuseColor(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearDiffuseColor(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddDiffuseColor(_PBJtempArray[0]); - super.AddDiffuseColor(_PBJtempArray[1]); - super.AddDiffuseColor(_PBJtempArray[2]); - } - } - public Builder ClearSpecularColor() { super.ClearSpecularColor();return this;} - public const int SpecularColorFieldTag=4; - public bool HasSpecularColor{ get {return super.SpecularColorCount>=3;} } - public PBJ.Vector3f SpecularColor{ get { - int index=0; - if (HasSpecularColor) { - return PBJ._PBJ.CastVector3f(super.GetSpecularColor(index*3+0),super.GetSpecularColor(index*3+1),super.GetSpecularColor(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearSpecularColor(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddSpecularColor(_PBJtempArray[0]); - super.AddSpecularColor(_PBJtempArray[1]); - super.AddSpecularColor(_PBJtempArray[2]); - } - } - public Builder ClearPower() { super.ClearPower();return this;} - public const int PowerFieldTag=5; - public bool HasPower{ get {return super.HasPower&&PBJ._PBJ.ValidateFloat(super.Power);} } - public float Power{ get { - if (HasPower) { - return PBJ._PBJ.CastFloat(super.Power); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.Power=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearAmbientColor() { super.ClearAmbientColor();return this;} - public const int AmbientColorFieldTag=6; - public bool HasAmbientColor{ get {return super.AmbientColorCount>=3;} } - public PBJ.Vector3f AmbientColor{ get { - int index=0; - if (HasAmbientColor) { - return PBJ._PBJ.CastVector3f(super.GetAmbientColor(index*3+0),super.GetAmbientColor(index*3+1),super.GetAmbientColor(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearAmbientColor(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddAmbientColor(_PBJtempArray[0]); - super.AddAmbientColor(_PBJtempArray[1]); - super.AddAmbientColor(_PBJtempArray[2]); - } - } - public Builder ClearShadowColor() { super.ClearShadowColor();return this;} - public const int ShadowColorFieldTag=7; - public bool HasShadowColor{ get {return super.ShadowColorCount>=3;} } - public PBJ.Vector3f ShadowColor{ get { - int index=0; - if (HasShadowColor) { - return PBJ._PBJ.CastVector3f(super.GetShadowColor(index*3+0),super.GetShadowColor(index*3+1),super.GetShadowColor(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearShadowColor(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddShadowColor(_PBJtempArray[0]); - super.AddShadowColor(_PBJtempArray[1]); - super.AddShadowColor(_PBJtempArray[2]); - } - } - public Builder ClearLightRange() { super.ClearLightRange();return this;} - public const int LightRangeFieldTag=8; - public bool HasLightRange{ get {return super.HasLightRange&&PBJ._PBJ.ValidateDouble(super.LightRange);} } - public double LightRange{ get { - if (HasLightRange) { - return PBJ._PBJ.CastDouble(super.LightRange); - } else { - return PBJ._PBJ.CastDouble(); - } - } - set { - super.LightRange=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearConstantFalloff() { super.ClearConstantFalloff();return this;} - public const int ConstantFalloffFieldTag=9; - public bool HasConstantFalloff{ get {return super.HasConstantFalloff&&PBJ._PBJ.ValidateFloat(super.ConstantFalloff);} } - public float ConstantFalloff{ get { - if (HasConstantFalloff) { - return PBJ._PBJ.CastFloat(super.ConstantFalloff); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.ConstantFalloff=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearLinearFalloff() { super.ClearLinearFalloff();return this;} - public const int LinearFalloffFieldTag=10; - public bool HasLinearFalloff{ get {return super.HasLinearFalloff&&PBJ._PBJ.ValidateFloat(super.LinearFalloff);} } - public float LinearFalloff{ get { - if (HasLinearFalloff) { - return PBJ._PBJ.CastFloat(super.LinearFalloff); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.LinearFalloff=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearQuadraticFalloff() { super.ClearQuadraticFalloff();return this;} - public const int QuadraticFalloffFieldTag=11; - public bool HasQuadraticFalloff{ get {return super.HasQuadraticFalloff&&PBJ._PBJ.ValidateFloat(super.QuadraticFalloff);} } - public float QuadraticFalloff{ get { - if (HasQuadraticFalloff) { - return PBJ._PBJ.CastFloat(super.QuadraticFalloff); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.QuadraticFalloff=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearConeInnerRadians() { super.ClearConeInnerRadians();return this;} - public const int ConeInnerRadiansFieldTag=12; - public bool HasConeInnerRadians{ get {return super.HasConeInnerRadians&&PBJ._PBJ.ValidateFloat(super.ConeInnerRadians);} } - public float ConeInnerRadians{ get { - if (HasConeInnerRadians) { - return PBJ._PBJ.CastFloat(super.ConeInnerRadians); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.ConeInnerRadians=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearConeOuterRadians() { super.ClearConeOuterRadians();return this;} - public const int ConeOuterRadiansFieldTag=13; - public bool HasConeOuterRadians{ get {return super.HasConeOuterRadians&&PBJ._PBJ.ValidateFloat(super.ConeOuterRadians);} } - public float ConeOuterRadians{ get { - if (HasConeOuterRadians) { - return PBJ._PBJ.CastFloat(super.ConeOuterRadians); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.ConeOuterRadians=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearConeFalloff() { super.ClearConeFalloff();return this;} - public const int ConeFalloffFieldTag=14; - public bool HasConeFalloff{ get {return super.HasConeFalloff&&PBJ._PBJ.ValidateFloat(super.ConeFalloff);} } - public float ConeFalloff{ get { - if (HasConeFalloff) { - return PBJ._PBJ.CastFloat(super.ConeFalloff); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.ConeFalloff=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearType() { super.ClearType();return this;} - public const int TypeFieldTag=15; - public bool HasType{ get {return super.HasType;} } - public Types.LightTypes Type{ get { - if (HasType) { - return (Types.LightTypes)super.Type; - } else { - return new Types.LightTypes(); - } - } - set { - super.Type=((_PBJ_Internal.LightInfoProperty.Types.LightTypes)value); - } - } - public Builder ClearCastsShadow() { super.ClearCastsShadow();return this;} - public const int CastsShadowFieldTag=16; - public bool HasCastsShadow{ get {return super.HasCastsShadow&&PBJ._PBJ.ValidateBool(super.CastsShadow);} } - public bool CastsShadow{ get { - if (HasCastsShadow) { - return PBJ._PBJ.CastBool(super.CastsShadow); - } else { - return PBJ._PBJ.CastBool(); - } - } - set { - super.CastsShadow=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class ParentProperty : PBJ.IMessage { - protected _PBJ_Internal.ParentProperty super; - public _PBJ_Internal.ParentProperty _PBJSuper{ get { return super;} } - public ParentProperty() { - super=new _PBJ_Internal.ParentProperty(); - } - public ParentProperty(_PBJ_Internal.ParentProperty reference) { - super=reference; - } - public static ParentProperty defaultInstance= new ParentProperty (_PBJ_Internal.ParentProperty.DefaultInstance); - public static ParentProperty DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.ParentProperty.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 ValueFieldTag=10; - public bool HasValue{ get {return super.HasValue&&PBJ._PBJ.ValidateUuid(super.Value);} } - public PBJ.UUID Value{ get { - if (HasValue) { - return PBJ._PBJ.CastUuid(super.Value); - } 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(ParentProperty prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static ParentProperty ParseFrom(pb::ByteString data) { - return new ParentProperty(_PBJ_Internal.ParentProperty.ParseFrom(data)); - } - public static ParentProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new ParentProperty(_PBJ_Internal.ParentProperty.ParseFrom(data,er)); - } - public static ParentProperty ParseFrom(byte[] data) { - return new ParentProperty(_PBJ_Internal.ParentProperty.ParseFrom(data)); - } - public static ParentProperty ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new ParentProperty(_PBJ_Internal.ParentProperty.ParseFrom(data,er)); - } - public static ParentProperty ParseFrom(global::System.IO.Stream data) { - return new ParentProperty(_PBJ_Internal.ParentProperty.ParseFrom(data)); - } - public static ParentProperty ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new ParentProperty(_PBJ_Internal.ParentProperty.ParseFrom(data,er)); - } - public static ParentProperty ParseFrom(pb::CodedInputStream data) { - return new ParentProperty(_PBJ_Internal.ParentProperty.ParseFrom(data)); - } - public static ParentProperty ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new ParentProperty(_PBJ_Internal.ParentProperty.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.ParentProperty.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.ParentProperty.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.ParentProperty.Builder();} - public Builder(_PBJ_Internal.ParentProperty.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(ParentProperty prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public ParentProperty BuildPartial() {return new ParentProperty(super.BuildPartial());} - public ParentProperty Build() {if (_HasAllPBJFields) return new ParentProperty(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return ParentProperty.Descriptor; } } - public Builder ClearValue() { super.ClearValue();return this;} - public const int ValueFieldTag=10; - public bool HasValue{ get {return super.HasValue&&PBJ._PBJ.ValidateUuid(super.Value);} } - public PBJ.UUID Value{ get { - if (HasValue) { - return PBJ._PBJ.CastUuid(super.Value); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.Value=(PBJ._PBJ.Construct(value)); - } - } - } - } -} -namespace Sirikata.Protocol { - public class UUIDListProperty : PBJ.IMessage { - protected _PBJ_Internal.UUIDListProperty super; - public _PBJ_Internal.UUIDListProperty _PBJSuper{ get { return super;} } - public UUIDListProperty() { - super=new _PBJ_Internal.UUIDListProperty(); - } - public UUIDListProperty(_PBJ_Internal.UUIDListProperty reference) { - super=reference; - } - public static UUIDListProperty defaultInstance= new UUIDListProperty (_PBJ_Internal.UUIDListProperty.DefaultInstance); - public static UUIDListProperty DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.UUIDListProperty.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 ValueFieldTag=10; - public int ValueCount { get { return super.ValueCount;} } - public bool HasValue(int index) {return PBJ._PBJ.ValidateUuid(super.GetValue(index));} - public PBJ.UUID Value(int index) { - return (PBJ.UUID)PBJ._PBJ.CastUuid(super.GetValue(index)); - } - 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(UUIDListProperty prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static UUIDListProperty ParseFrom(pb::ByteString data) { - return new UUIDListProperty(_PBJ_Internal.UUIDListProperty.ParseFrom(data)); - } - public static UUIDListProperty ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new UUIDListProperty(_PBJ_Internal.UUIDListProperty.ParseFrom(data,er)); - } - public static UUIDListProperty ParseFrom(byte[] data) { - return new UUIDListProperty(_PBJ_Internal.UUIDListProperty.ParseFrom(data)); - } - public static UUIDListProperty ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new UUIDListProperty(_PBJ_Internal.UUIDListProperty.ParseFrom(data,er)); - } - public static UUIDListProperty ParseFrom(global::System.IO.Stream data) { - return new UUIDListProperty(_PBJ_Internal.UUIDListProperty.ParseFrom(data)); - } - public static UUIDListProperty ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new UUIDListProperty(_PBJ_Internal.UUIDListProperty.ParseFrom(data,er)); - } - public static UUIDListProperty ParseFrom(pb::CodedInputStream data) { - return new UUIDListProperty(_PBJ_Internal.UUIDListProperty.ParseFrom(data)); - } - public static UUIDListProperty ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new UUIDListProperty(_PBJ_Internal.UUIDListProperty.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.UUIDListProperty.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.UUIDListProperty.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.UUIDListProperty.Builder();} - public Builder(_PBJ_Internal.UUIDListProperty.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(UUIDListProperty prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public UUIDListProperty BuildPartial() {return new UUIDListProperty(super.BuildPartial());} - public UUIDListProperty Build() {if (_HasAllPBJFields) return new UUIDListProperty(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return UUIDListProperty.Descriptor; } } - public Builder ClearValue() { super.ClearValue();return this;} - public Builder SetValue(int index, PBJ.UUID value) { - super.SetValue(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int ValueFieldTag=10; - public int ValueCount { get { return super.ValueCount;} } - public bool HasValue(int index) {return PBJ._PBJ.ValidateUuid(super.GetValue(index));} - public PBJ.UUID Value(int index) { - return (PBJ.UUID)PBJ._PBJ.CastUuid(super.GetValue(index)); - } - public Builder AddValue(PBJ.UUID value) { - super.AddValue(PBJ._PBJ.Construct(value)); - return this; - } - } - } -} -namespace Sirikata.Protocol { - public class ConnectToSpace : PBJ.IMessage { - protected _PBJ_Internal.ConnectToSpace super; - public _PBJ_Internal.ConnectToSpace _PBJSuper{ get { return super;} } - public ConnectToSpace() { - super=new _PBJ_Internal.ConnectToSpace(); - } - public ConnectToSpace(_PBJ_Internal.ConnectToSpace reference) { - super=reference; - } - public static ConnectToSpace defaultInstance= new ConnectToSpace (_PBJ_Internal.ConnectToSpace.DefaultInstance); - public static ConnectToSpace DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.ConnectToSpace.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 SpaceIdFieldTag=1; - public bool HasSpaceId{ get {return super.HasSpaceId&&PBJ._PBJ.ValidateUuid(super.SpaceId);} } - public PBJ.UUID SpaceId{ get { - if (HasSpaceId) { - return PBJ._PBJ.CastUuid(super.SpaceId); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int ObjectUuidEvidenceFieldTag=2; - public bool HasObjectUuidEvidence{ get {return super.HasObjectUuidEvidence&&PBJ._PBJ.ValidateUuid(super.ObjectUuidEvidence);} } - public PBJ.UUID ObjectUuidEvidence{ get { - if (HasObjectUuidEvidence) { - return PBJ._PBJ.CastUuid(super.ObjectUuidEvidence); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int RequestedObjectLocFieldTag=3; - public bool HasRequestedObjectLoc{ get {return super.HasRequestedObjectLoc;} } - public ObjLoc RequestedObjectLoc{ get { - if (HasRequestedObjectLoc) { - return new ObjLoc(super.RequestedObjectLoc); - } else { - return new ObjLoc(); - } - } - } - public const int BoundingSphereFieldTag=4; - public bool HasBoundingSphere{ get {return super.BoundingSphereCount>=4;} } - public PBJ.BoundingSphere3f BoundingSphere{ get { - int index=0; - if (HasBoundingSphere) { - return PBJ._PBJ.CastBoundingsphere3f(super.GetBoundingSphere(index*4+0),super.GetBoundingSphere(index*4+1),super.GetBoundingSphere(index*4+2),super.GetBoundingSphere(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3f(); - } - } - } - 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(ConnectToSpace prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static ConnectToSpace ParseFrom(pb::ByteString data) { - return new ConnectToSpace(_PBJ_Internal.ConnectToSpace.ParseFrom(data)); - } - public static ConnectToSpace ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new ConnectToSpace(_PBJ_Internal.ConnectToSpace.ParseFrom(data,er)); - } - public static ConnectToSpace ParseFrom(byte[] data) { - return new ConnectToSpace(_PBJ_Internal.ConnectToSpace.ParseFrom(data)); - } - public static ConnectToSpace ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new ConnectToSpace(_PBJ_Internal.ConnectToSpace.ParseFrom(data,er)); - } - public static ConnectToSpace ParseFrom(global::System.IO.Stream data) { - return new ConnectToSpace(_PBJ_Internal.ConnectToSpace.ParseFrom(data)); - } - public static ConnectToSpace ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new ConnectToSpace(_PBJ_Internal.ConnectToSpace.ParseFrom(data,er)); - } - public static ConnectToSpace ParseFrom(pb::CodedInputStream data) { - return new ConnectToSpace(_PBJ_Internal.ConnectToSpace.ParseFrom(data)); - } - public static ConnectToSpace ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new ConnectToSpace(_PBJ_Internal.ConnectToSpace.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.ConnectToSpace.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.ConnectToSpace.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.ConnectToSpace.Builder();} - public Builder(_PBJ_Internal.ConnectToSpace.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(ConnectToSpace prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public ConnectToSpace BuildPartial() {return new ConnectToSpace(super.BuildPartial());} - public ConnectToSpace Build() {if (_HasAllPBJFields) return new ConnectToSpace(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return ConnectToSpace.Descriptor; } } - public Builder ClearSpaceId() { super.ClearSpaceId();return this;} - public const int SpaceIdFieldTag=1; - public bool HasSpaceId{ get {return super.HasSpaceId&&PBJ._PBJ.ValidateUuid(super.SpaceId);} } - public PBJ.UUID SpaceId{ get { - if (HasSpaceId) { - return PBJ._PBJ.CastUuid(super.SpaceId); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.SpaceId=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearObjectUuidEvidence() { super.ClearObjectUuidEvidence();return this;} - public const int ObjectUuidEvidenceFieldTag=2; - public bool HasObjectUuidEvidence{ get {return super.HasObjectUuidEvidence&&PBJ._PBJ.ValidateUuid(super.ObjectUuidEvidence);} } - public PBJ.UUID ObjectUuidEvidence{ get { - if (HasObjectUuidEvidence) { - return PBJ._PBJ.CastUuid(super.ObjectUuidEvidence); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.ObjectUuidEvidence=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearRequestedObjectLoc() { super.ClearRequestedObjectLoc();return this;} - public const int RequestedObjectLocFieldTag=3; - public bool HasRequestedObjectLoc{ get {return super.HasRequestedObjectLoc;} } - public ObjLoc RequestedObjectLoc{ get { - if (HasRequestedObjectLoc) { - return new ObjLoc(super.RequestedObjectLoc); - } else { - return new ObjLoc(); - } - } - set { - super.RequestedObjectLoc=value._PBJSuper; - } - } - public Builder ClearBoundingSphere() { super.ClearBoundingSphere();return this;} - public const int BoundingSphereFieldTag=4; - public bool HasBoundingSphere{ get {return super.BoundingSphereCount>=4;} } - public PBJ.BoundingSphere3f BoundingSphere{ get { - int index=0; - if (HasBoundingSphere) { - return PBJ._PBJ.CastBoundingsphere3f(super.GetBoundingSphere(index*4+0),super.GetBoundingSphere(index*4+1),super.GetBoundingSphere(index*4+2),super.GetBoundingSphere(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3f(); - } - } - set { - super.ClearBoundingSphere(); - float[] _PBJtempArray=PBJ._PBJ.ConstructBoundingsphere3f(value); - super.AddBoundingSphere(_PBJtempArray[0]); - super.AddBoundingSphere(_PBJtempArray[1]); - super.AddBoundingSphere(_PBJtempArray[2]); - super.AddBoundingSphere(_PBJtempArray[3]); - } - } - } - } -} -namespace Sirikata.Protocol { - public class CreateObject : PBJ.IMessage { - protected _PBJ_Internal.CreateObject super; - public _PBJ_Internal.CreateObject _PBJSuper{ get { return super;} } - public CreateObject() { - super=new _PBJ_Internal.CreateObject(); - } - public CreateObject(_PBJ_Internal.CreateObject reference) { - super=reference; - } - public static CreateObject defaultInstance= new CreateObject (_PBJ_Internal.CreateObject.DefaultInstance); - public static CreateObject DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.CreateObject.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 ObjectUuidFieldTag=1; - public bool HasObjectUuid{ get {return super.HasObjectUuid&&PBJ._PBJ.ValidateUuid(super.ObjectUuid);} } - public PBJ.UUID ObjectUuid{ get { - if (HasObjectUuid) { - return PBJ._PBJ.CastUuid(super.ObjectUuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int SpacePropertiesFieldTag=2; - public int SpacePropertiesCount { get { return super.SpacePropertiesCount;} } - public bool HasSpaceProperties(int index) {return true;} - public ConnectToSpace SpaceProperties(int index) { - return new ConnectToSpace(super.GetSpaceProperties(index)); - } - public const int MeshFieldTag=3; - public bool HasMesh{ get {return super.HasMesh&&PBJ._PBJ.ValidateString(super.Mesh);} } - public string Mesh{ get { - if (HasMesh) { - return PBJ._PBJ.CastString(super.Mesh); - } else { - return PBJ._PBJ.CastString(); - } - } - } - public const int ScaleFieldTag=4; - public bool HasScale{ get {return super.ScaleCount>=3;} } - public PBJ.Vector3f Scale{ get { - int index=0; - if (HasScale) { - return PBJ._PBJ.CastVector3f(super.GetScale(index*3+0),super.GetScale(index*3+1),super.GetScale(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int WeburlFieldTag=5; - public bool HasWeburl{ get {return super.HasWeburl&&PBJ._PBJ.ValidateString(super.Weburl);} } - public string Weburl{ get { - if (HasWeburl) { - return PBJ._PBJ.CastString(super.Weburl); - } else { - return PBJ._PBJ.CastString(); - } - } - } - public const int LightInfoFieldTag=6; - public bool HasLightInfo{ get {return super.HasLightInfo;} } - public LightInfoProperty LightInfo{ get { - if (HasLightInfo) { - return new LightInfoProperty(super.LightInfo); - } else { - return new LightInfoProperty(); - } - } - } - public const int CameraFieldTag=7; - public bool HasCamera{ get {return super.HasCamera&&PBJ._PBJ.ValidateBool(super.Camera);} } - public bool Camera{ get { - if (HasCamera) { - return PBJ._PBJ.CastBool(super.Camera); - } else { - return PBJ._PBJ.CastBool(); - } - } - } - public const int PhysicalFieldTag=8; - public bool HasPhysical{ get {return super.HasPhysical;} } - public PhysicalParameters Physical{ get { - if (HasPhysical) { - return new PhysicalParameters(super.Physical); - } else { - return new PhysicalParameters(); - } - } - } - 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(CreateObject prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static CreateObject ParseFrom(pb::ByteString data) { - return new CreateObject(_PBJ_Internal.CreateObject.ParseFrom(data)); - } - public static CreateObject ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new CreateObject(_PBJ_Internal.CreateObject.ParseFrom(data,er)); - } - public static CreateObject ParseFrom(byte[] data) { - return new CreateObject(_PBJ_Internal.CreateObject.ParseFrom(data)); - } - public static CreateObject ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new CreateObject(_PBJ_Internal.CreateObject.ParseFrom(data,er)); - } - public static CreateObject ParseFrom(global::System.IO.Stream data) { - return new CreateObject(_PBJ_Internal.CreateObject.ParseFrom(data)); - } - public static CreateObject ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new CreateObject(_PBJ_Internal.CreateObject.ParseFrom(data,er)); - } - public static CreateObject ParseFrom(pb::CodedInputStream data) { - return new CreateObject(_PBJ_Internal.CreateObject.ParseFrom(data)); - } - public static CreateObject ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new CreateObject(_PBJ_Internal.CreateObject.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.CreateObject.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.CreateObject.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.CreateObject.Builder();} - public Builder(_PBJ_Internal.CreateObject.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(CreateObject prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public CreateObject BuildPartial() {return new CreateObject(super.BuildPartial());} - public CreateObject Build() {if (_HasAllPBJFields) return new CreateObject(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return CreateObject.Descriptor; } } - public Builder ClearObjectUuid() { super.ClearObjectUuid();return this;} - public const int ObjectUuidFieldTag=1; - public bool HasObjectUuid{ get {return super.HasObjectUuid&&PBJ._PBJ.ValidateUuid(super.ObjectUuid);} } - public PBJ.UUID ObjectUuid{ get { - if (HasObjectUuid) { - return PBJ._PBJ.CastUuid(super.ObjectUuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.ObjectUuid=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearSpaceProperties() { super.ClearSpaceProperties();return this;} - public Builder SetSpaceProperties(int index,ConnectToSpace value) { - super.SetSpaceProperties(index,value._PBJSuper); - return this; - } - public const int SpacePropertiesFieldTag=2; - public int SpacePropertiesCount { get { return super.SpacePropertiesCount;} } - public bool HasSpaceProperties(int index) {return true;} - public ConnectToSpace SpaceProperties(int index) { - return new ConnectToSpace(super.GetSpaceProperties(index)); - } - public Builder AddSpaceProperties(ConnectToSpace value) { - super.AddSpaceProperties(value._PBJSuper); - return this; - } - public Builder ClearMesh() { super.ClearMesh();return this;} - public const int MeshFieldTag=3; - public bool HasMesh{ get {return super.HasMesh&&PBJ._PBJ.ValidateString(super.Mesh);} } - public string Mesh{ get { - if (HasMesh) { - return PBJ._PBJ.CastString(super.Mesh); - } else { - return PBJ._PBJ.CastString(); - } - } - set { - super.Mesh=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearScale() { super.ClearScale();return this;} - public const int ScaleFieldTag=4; - public bool HasScale{ get {return super.ScaleCount>=3;} } - public PBJ.Vector3f Scale{ get { - int index=0; - if (HasScale) { - return PBJ._PBJ.CastVector3f(super.GetScale(index*3+0),super.GetScale(index*3+1),super.GetScale(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearScale(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddScale(_PBJtempArray[0]); - super.AddScale(_PBJtempArray[1]); - super.AddScale(_PBJtempArray[2]); - } - } - public Builder ClearWeburl() { super.ClearWeburl();return this;} - public const int WeburlFieldTag=5; - public bool HasWeburl{ get {return super.HasWeburl&&PBJ._PBJ.ValidateString(super.Weburl);} } - public string Weburl{ get { - if (HasWeburl) { - return PBJ._PBJ.CastString(super.Weburl); - } else { - return PBJ._PBJ.CastString(); - } - } - set { - super.Weburl=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearLightInfo() { super.ClearLightInfo();return this;} - public const int LightInfoFieldTag=6; - public bool HasLightInfo{ get {return super.HasLightInfo;} } - public LightInfoProperty LightInfo{ get { - if (HasLightInfo) { - return new LightInfoProperty(super.LightInfo); - } else { - return new LightInfoProperty(); - } - } - set { - super.LightInfo=value._PBJSuper; - } - } - public Builder ClearCamera() { super.ClearCamera();return this;} - public const int CameraFieldTag=7; - public bool HasCamera{ get {return super.HasCamera&&PBJ._PBJ.ValidateBool(super.Camera);} } - public bool Camera{ get { - if (HasCamera) { - return PBJ._PBJ.CastBool(super.Camera); - } else { - return PBJ._PBJ.CastBool(); - } - } - set { - super.Camera=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearPhysical() { super.ClearPhysical();return this;} - public const int PhysicalFieldTag=8; - public bool HasPhysical{ get {return super.HasPhysical;} } - public PhysicalParameters Physical{ get { - if (HasPhysical) { - return new PhysicalParameters(super.Physical); - } else { - return new PhysicalParameters(); - } - } - set { - super.Physical=value._PBJSuper; - } - } - } - } -} diff --git a/OpenSim/Client/Sirikata/Protocol/Subscription.cs b/OpenSim/Client/Sirikata/Protocol/Subscription.cs deleted file mode 100644 index 06ac8a244c..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Subscription.cs +++ /dev/null @@ -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 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 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 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(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(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(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 { - 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 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 { - 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 { - 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 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 { - 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 { - 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 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 { - 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 - -} diff --git a/OpenSim/Client/Sirikata/Protocol/Subscription.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Subscription.pbj.cs deleted file mode 100644 index c8c2fbf9bc..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Subscription.pbj.cs +++ /dev/null @@ -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)); - } - } - } - } -} diff --git a/OpenSim/Client/Sirikata/Protocol/Test.cs b/OpenSim/Client/Sirikata/Protocol/Test.cs deleted file mode 100644 index 0e1372a8b0..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Test.cs +++ /dev/null @@ -1,3773 +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.PB._PBJ_Internal { - - public static partial class Test { - - #region Extension registration - public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { - registry.Add(global::Sirikata.PB._PBJ_Internal.Test.Extensionbbox); - registry.Add(global::Sirikata.PB._PBJ_Internal.Test.Extensionvector); - } - #endregion - #region Extensions - public const int ExtensionbboxFieldNumber = 100; - public static pb::GeneratedExtensionBase> Extensionbbox; - public const int ExtensionvectorFieldNumber = 101; - public static pb::GeneratedExtensionBase> Extensionvector; - #endregion - - #region Static variables - internal static pbd::MessageDescriptor internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage_SubMessage__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage_SubMessage__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_PB__PBJ_Internal_TestMessage__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_PB__PBJ_Internal_TestMessage__FieldAccessorTable; - internal static pbd::MessageDescriptor internal__static_Sirikata_PB__PBJ_Internal_TestMessage_SubMessage__Descriptor; - internal static pb::FieldAccess.FieldAccessorTable internal__static_Sirikata_PB__PBJ_Internal_TestMessage_SubMessage__FieldAccessorTable; - #endregion - #region Descriptor - public static pbd::FileDescriptor Descriptor { - get { return descriptor; } - } - private static pbd::FileDescriptor descriptor; - - static Test() { - byte[] descriptorData = global::System.Convert.FromBase64String( - "CgpUZXN0LnByb3RvEhlTaXJpa2F0YS5QQi5fUEJKX0ludGVybmFsIuwCCg9F" + - "eHRlcm5hbE1lc3NhZ2USFQoHaXNfdHJ1ZRgoIAEoCDoEdHJ1ZRIPCgN2MmYY" + - "AiADKAJCAhABEkYKB3N1Yl9tZXMYHiABKAsyNS5TaXJpa2F0YS5QQi5fUEJK" + - "X0ludGVybmFsLkV4dGVybmFsTWVzc2FnZS5TdWJNZXNzYWdlEkkKCnN1Ym1l" + - "c3NlcnMYHyADKAsyNS5TaXJpa2F0YS5QQi5fUEJKX0ludGVybmFsLkV4dGVy" + - "bmFsTWVzc2FnZS5TdWJNZXNzYWdlEgsKA3NoYRggIAEoDBIMCgRzaGFzGCEg" + - "AygMEg8KA3YzZhgEIAMoAkICEAESEAoEdjNmZhgFIAMoAkICEAEaYAoKU3Vi" + - "TWVzc2FnZRIPCgdzdWJ1dWlkGAEgASgMEhUKCXN1YnZlY3RvchgCIAMoAUIC" + - "EAESEwoLc3ViZHVyYXRpb24YAyABKBASFQoJc3Vibm9ybWFsGAQgAygCQgIQ" + - "ASLmCAoLVGVzdE1lc3NhZ2USEQoDeHhkGBQgASgBOgQxMC4zEgsKA3h4ZhgV" + - "IAEoAhINCgV4eHUzMhgWIAEoDRILCgN4eHMYFyABKAkSCwoDeHhiGBggASgM" + - "EgwKBHh4c3MYGSADKAkSDAoEeHhiYhgaIAMoDBIQCgR4eGZmGBsgAygCQgIQ" + - "ARIQCgR4eG5uGB0gAygCQgIQARIMCgR4eGZyGBwgAigCEg0KAW4YASADKAJC" + - "AhABEg8KA3YyZhgCIAMoAkICEAESDwoDdjJkGAMgAygBQgIQARIPCgN2M2YY" + - "BCADKAJCAhABEg8KA3YzZBgFIAMoAUICEAESDwoDdjRmGAYgAygCQgIQARIP" + - "CgN2NGQYByADKAFCAhABEg0KAXEYCCADKAJCAhABEgkKAXUYCSABKAwSCQoB" + - "YRgKIAEoAhIJCgF0GAsgASgGEgkKAWQYDCABKBASCwoDZjMyGA0gASgNEgsK" + - "A2Y2NBgOIAEoBBIPCgNic2YYDyADKAJCAhABEg8KA2JzZBgQIAMoAUICEAES" + - "DwoDYmJmGBEgAygCQgIQARIPCgNiYmQYEiADKAFCAhABEjoKA2UzMhgTIAEo" + - "DjItLlNpcmlrYXRhLlBCLl9QQkpfSW50ZXJuYWwuVGVzdE1lc3NhZ2UuRW51" + - "bTMyEkEKBnN1Ym1lcxgeIAEoCzIxLlNpcmlrYXRhLlBCLl9QQkpfSW50ZXJu" + - "YWwuVGVzdE1lc3NhZ2UuU3ViTWVzc2FnZRJFCgpzdWJtZXNzZXJzGB8gAygL" + - "MjEuU2lyaWthdGEuUEIuX1BCSl9JbnRlcm5hbC5UZXN0TWVzc2FnZS5TdWJN" + - "ZXNzYWdlEgsKA3NoYRggIAEoDBIMCgRzaGFzGCEgAygMEjoKBmV4dG1lcxgi" + - "IAEoCzIqLlNpcmlrYXRhLlBCLl9QQkpfSW50ZXJuYWwuRXh0ZXJuYWxNZXNz" + - "YWdlEj4KCmV4dG1lc3NlcnMYIyADKAsyKi5TaXJpa2F0YS5QQi5fUEJKX0lu" + - "dGVybmFsLkV4dGVybmFsTWVzc2FnZRI9CglleHRtZXNzZXIYJCACKAsyKi5T" + - "aXJpa2F0YS5QQi5fUEJKX0ludGVybmFsLkV4dGVybmFsTWVzc2FnZRpgCgpT" + - "dWJNZXNzYWdlEg8KB3N1YnV1aWQYASABKAwSFQoJc3VidmVjdG9yGAIgAygB" + - "QgIQARITCgtzdWJkdXJhdGlvbhgDIAEoEBIVCglzdWJub3JtYWwYBCADKAJC" + - "AhABIjUKCEZsYWdzZjMyEgwKCFVOSVZFUlNBEAASBgoCV0UQARIJCgVJTUFH" + - "RRACEggKBExPQ0EQAyI5CghGbGFnc2Y2NBINCglVTklWRVJTQUwQABIHCgNX" + - "RUIQARIKCgZJTUFHRVMQAhIJCgVMT0NBTBADIjsKBkVudW0zMhIOCgpVTklW" + - "RVJTQUwxEAASCAoEV0VCMRABEgsKB0lNQUdFUzEQAhIKCgZMT0NBTDEQAyoF" + - "CGQQyAE6QQoNZXh0ZW5zaW9uYmJveBImLlNpcmlrYXRhLlBCLl9QQkpfSW50" + - "ZXJuYWwuVGVzdE1lc3NhZ2UYZCADKAJCAhABOkMKD2V4dGVuc2lvbnZlY3Rv" + - "chImLlNpcmlrYXRhLlBCLl9QQkpfSW50ZXJuYWwuVGVzdE1lc3NhZ2UYZSAD" + - "KAJCAhAB"); - pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { - descriptor = root; - internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage__Descriptor = Descriptor.MessageTypes[0]; - internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage__Descriptor, - new string[] { "IsTrue", "V2F", "SubMes", "Submessers", "Sha", "Shas", "V3F", "V3Ff", }); - internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage_SubMessage__Descriptor = internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage__Descriptor.NestedTypes[0]; - internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage_SubMessage__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage_SubMessage__Descriptor, - new string[] { "Subuuid", "Subvector", "Subduration", "Subnormal", }); - internal__static_Sirikata_PB__PBJ_Internal_TestMessage__Descriptor = Descriptor.MessageTypes[1]; - internal__static_Sirikata_PB__PBJ_Internal_TestMessage__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_PB__PBJ_Internal_TestMessage__Descriptor, - new string[] { "Xxd", "Xxf", "Xxu32", "Xxs", "Xxb", "Xxss", "Xxbb", "Xxff", "Xxnn", "Xxfr", "N", "V2F", "V2D", "V3F", "V3D", "V4F", "V4D", "Q", "U", "A", "T", "D", "F32", "F64", "Bsf", "Bsd", "Bbf", "Bbd", "E32", "Submes", "Submessers", "Sha", "Shas", "Extmes", "Extmessers", "Extmesser", }); - internal__static_Sirikata_PB__PBJ_Internal_TestMessage_SubMessage__Descriptor = internal__static_Sirikata_PB__PBJ_Internal_TestMessage__Descriptor.NestedTypes[0]; - internal__static_Sirikata_PB__PBJ_Internal_TestMessage_SubMessage__FieldAccessorTable = - new pb::FieldAccess.FieldAccessorTable(internal__static_Sirikata_PB__PBJ_Internal_TestMessage_SubMessage__Descriptor, - new string[] { "Subuuid", "Subvector", "Subduration", "Subnormal", }); - global::Sirikata.PB._PBJ_Internal.Test.Extensionbbox = pb::GeneratedRepeatExtension.CreateInstance(global::Sirikata.PB._PBJ_Internal.Test.Descriptor.Extensions[0]); - global::Sirikata.PB._PBJ_Internal.Test.Extensionvector = pb::GeneratedRepeatExtension.CreateInstance(global::Sirikata.PB._PBJ_Internal.Test.Descriptor.Extensions[1]); - return null; - }; - pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, - new pbd::FileDescriptor[] { - }, assigner); - } - #endregion - - } - #region Messages - public sealed partial class ExternalMessage : pb::GeneratedMessage { - private static readonly ExternalMessage defaultInstance = new Builder().BuildPartial(); - public static ExternalMessage DefaultInstance { - get { return defaultInstance; } - } - - public override ExternalMessage DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override ExternalMessage ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.PB._PBJ_Internal.Test.internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.PB._PBJ_Internal.Test.internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public sealed partial class SubMessage : pb::GeneratedMessage { - private static readonly SubMessage defaultInstance = new Builder().BuildPartial(); - public static SubMessage DefaultInstance { - get { return defaultInstance; } - } - - public override SubMessage DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override SubMessage ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.PB._PBJ_Internal.Test.internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage_SubMessage__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.PB._PBJ_Internal.Test.internal__static_Sirikata_PB__PBJ_Internal_ExternalMessage_SubMessage__FieldAccessorTable; } - } - - public const int SubuuidFieldNumber = 1; - private bool hasSubuuid; - private pb::ByteString subuuid_ = pb::ByteString.Empty; - public bool HasSubuuid { - get { return hasSubuuid; } - } - public pb::ByteString Subuuid { - get { return subuuid_; } - } - - public const int SubvectorFieldNumber = 2; - private int subvectorMemoizedSerializedSize; - private pbc::PopsicleList subvector_ = new pbc::PopsicleList(); - public scg::IList SubvectorList { - get { return pbc::Lists.AsReadOnly(subvector_); } - } - public int SubvectorCount { - get { return subvector_.Count; } - } - public double GetSubvector(int index) { - return subvector_[index]; - } - - public const int SubdurationFieldNumber = 3; - private bool hasSubduration; - private long subduration_ = 0; - public bool HasSubduration { - get { return hasSubduration; } - } - public long Subduration { - get { return subduration_; } - } - - public const int SubnormalFieldNumber = 4; - private int subnormalMemoizedSerializedSize; - private pbc::PopsicleList subnormal_ = new pbc::PopsicleList(); - public scg::IList SubnormalList { - get { return pbc::Lists.AsReadOnly(subnormal_); } - } - public int SubnormalCount { - get { return subnormal_.Count; } - } - public float GetSubnormal(int index) { - return subnormal_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasSubuuid) { - output.WriteBytes(1, Subuuid); - } - if (subvector_.Count > 0) { - output.WriteRawVarint32(18); - output.WriteRawVarint32((uint) subvectorMemoizedSerializedSize); - foreach (double element in subvector_) { - output.WriteDoubleNoTag(element); - } - } - if (HasSubduration) { - output.WriteSFixed64(3, Subduration); - } - if (subnormal_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) subnormalMemoizedSerializedSize); - foreach (float element in subnormal_) { - output.WriteFloatNoTag(element); - } - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasSubuuid) { - size += pb::CodedOutputStream.ComputeBytesSize(1, Subuuid); - } - { - int dataSize = 0; - dataSize = 8 * subvector_.Count; - size += dataSize; - if (subvector_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - subvectorMemoizedSerializedSize = dataSize; - } - if (HasSubduration) { - size += pb::CodedOutputStream.ComputeSFixed64Size(3, Subduration); - } - { - int dataSize = 0; - dataSize = 4 * subnormal_.Count; - size += dataSize; - if (subnormal_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - subnormalMemoizedSerializedSize = dataSize; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static SubMessage ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static SubMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static SubMessage ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static SubMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static SubMessage ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static SubMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static SubMessage ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static SubMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static SubMessage ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static SubMessage 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(SubMessage prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - SubMessage result = new SubMessage(); - - protected override SubMessage MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new SubMessage(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.Descriptor; } - } - - public override SubMessage DefaultInstanceForType { - get { return global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.DefaultInstance; } - } - - public override SubMessage BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.subvector_.MakeReadOnly(); - result.subnormal_.MakeReadOnly(); - SubMessage returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is SubMessage) { - return MergeFrom((SubMessage) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(SubMessage other) { - if (other == global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.DefaultInstance) return this; - if (other.HasSubuuid) { - Subuuid = other.Subuuid; - } - if (other.subvector_.Count != 0) { - base.AddRange(other.subvector_, result.subvector_); - } - if (other.HasSubduration) { - Subduration = other.Subduration; - } - if (other.subnormal_.Count != 0) { - base.AddRange(other.subnormal_, result.subnormal_); - } - 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: { - Subuuid = input.ReadBytes(); - break; - } - case 18: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddSubvector(input.ReadDouble()); - } - input.PopLimit(limit); - break; - } - case 25: { - Subduration = input.ReadSFixed64(); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddSubnormal(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - } - } - } - - - public bool HasSubuuid { - get { return result.HasSubuuid; } - } - public pb::ByteString Subuuid { - get { return result.Subuuid; } - set { SetSubuuid(value); } - } - public Builder SetSubuuid(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasSubuuid = true; - result.subuuid_ = value; - return this; - } - public Builder ClearSubuuid() { - result.hasSubuuid = false; - result.subuuid_ = pb::ByteString.Empty; - return this; - } - - public pbc::IPopsicleList SubvectorList { - get { return result.subvector_; } - } - public int SubvectorCount { - get { return result.SubvectorCount; } - } - public double GetSubvector(int index) { - return result.GetSubvector(index); - } - public Builder SetSubvector(int index, double value) { - result.subvector_[index] = value; - return this; - } - public Builder AddSubvector(double value) { - result.subvector_.Add(value); - return this; - } - public Builder AddRangeSubvector(scg::IEnumerable values) { - base.AddRange(values, result.subvector_); - return this; - } - public Builder ClearSubvector() { - result.subvector_.Clear(); - return this; - } - - public bool HasSubduration { - get { return result.HasSubduration; } - } - public long Subduration { - get { return result.Subduration; } - set { SetSubduration(value); } - } - public Builder SetSubduration(long value) { - result.hasSubduration = true; - result.subduration_ = value; - return this; - } - public Builder ClearSubduration() { - result.hasSubduration = false; - result.subduration_ = 0; - return this; - } - - public pbc::IPopsicleList SubnormalList { - get { return result.subnormal_; } - } - public int SubnormalCount { - get { return result.SubnormalCount; } - } - public float GetSubnormal(int index) { - return result.GetSubnormal(index); - } - public Builder SetSubnormal(int index, float value) { - result.subnormal_[index] = value; - return this; - } - public Builder AddSubnormal(float value) { - result.subnormal_.Add(value); - return this; - } - public Builder AddRangeSubnormal(scg::IEnumerable values) { - base.AddRange(values, result.subnormal_); - return this; - } - public Builder ClearSubnormal() { - result.subnormal_.Clear(); - return this; - } - } - static SubMessage() { - object.ReferenceEquals(global::Sirikata.PB._PBJ_Internal.Test.Descriptor, null); - } - } - - } - #endregion - - public const int IsTrueFieldNumber = 40; - private bool hasIsTrue; - private bool isTrue_ = true; - public bool HasIsTrue { - get { return hasIsTrue; } - } - public bool IsTrue { - get { return isTrue_; } - } - - public const int V2FFieldNumber = 2; - private int v2FMemoizedSerializedSize; - private pbc::PopsicleList v2F_ = new pbc::PopsicleList(); - public scg::IList V2FList { - get { return pbc::Lists.AsReadOnly(v2F_); } - } - public int V2FCount { - get { return v2F_.Count; } - } - public float GetV2F(int index) { - return v2F_[index]; - } - - public const int SubMesFieldNumber = 30; - private bool hasSubMes; - private global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage subMes_ = global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.DefaultInstance; - public bool HasSubMes { - get { return hasSubMes; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage SubMes { - get { return subMes_; } - } - - public const int SubmessersFieldNumber = 31; - private pbc::PopsicleList submessers_ = new pbc::PopsicleList(); - public scg::IList SubmessersList { - get { return submessers_; } - } - public int SubmessersCount { - get { return submessers_.Count; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage GetSubmessers(int index) { - return submessers_[index]; - } - - public const int ShaFieldNumber = 32; - private bool hasSha; - private pb::ByteString sha_ = pb::ByteString.Empty; - public bool HasSha { - get { return hasSha; } - } - public pb::ByteString Sha { - get { return sha_; } - } - - public const int ShasFieldNumber = 33; - private pbc::PopsicleList shas_ = new pbc::PopsicleList(); - public scg::IList ShasList { - get { return pbc::Lists.AsReadOnly(shas_); } - } - public int ShasCount { - get { return shas_.Count; } - } - public pb::ByteString GetShas(int index) { - return shas_[index]; - } - - public const int V3FFieldNumber = 4; - private int v3FMemoizedSerializedSize; - private pbc::PopsicleList v3F_ = new pbc::PopsicleList(); - public scg::IList V3FList { - get { return pbc::Lists.AsReadOnly(v3F_); } - } - public int V3FCount { - get { return v3F_.Count; } - } - public float GetV3F(int index) { - return v3F_[index]; - } - - public const int V3FfFieldNumber = 5; - private int v3FfMemoizedSerializedSize; - private pbc::PopsicleList v3Ff_ = new pbc::PopsicleList(); - public scg::IList V3FfList { - get { return pbc::Lists.AsReadOnly(v3Ff_); } - } - public int V3FfCount { - get { return v3Ff_.Count; } - } - public float GetV3Ff(int index) { - return v3Ff_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (v2F_.Count > 0) { - output.WriteRawVarint32(18); - output.WriteRawVarint32((uint) v2FMemoizedSerializedSize); - foreach (float element in v2F_) { - output.WriteFloatNoTag(element); - } - } - if (v3F_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) v3FMemoizedSerializedSize); - foreach (float element in v3F_) { - output.WriteFloatNoTag(element); - } - } - if (v3Ff_.Count > 0) { - output.WriteRawVarint32(42); - output.WriteRawVarint32((uint) v3FfMemoizedSerializedSize); - foreach (float element in v3Ff_) { - output.WriteFloatNoTag(element); - } - } - if (HasSubMes) { - output.WriteMessage(30, SubMes); - } - foreach (global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage element in SubmessersList) { - output.WriteMessage(31, element); - } - if (HasSha) { - output.WriteBytes(32, Sha); - } - if (shas_.Count > 0) { - foreach (pb::ByteString element in shas_) { - output.WriteBytes(33, element); - } - } - if (HasIsTrue) { - output.WriteBool(40, IsTrue); - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasIsTrue) { - size += pb::CodedOutputStream.ComputeBoolSize(40, IsTrue); - } - { - int dataSize = 0; - dataSize = 4 * v2F_.Count; - size += dataSize; - if (v2F_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - v2FMemoizedSerializedSize = dataSize; - } - if (HasSubMes) { - size += pb::CodedOutputStream.ComputeMessageSize(30, SubMes); - } - foreach (global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage element in SubmessersList) { - size += pb::CodedOutputStream.ComputeMessageSize(31, element); - } - if (HasSha) { - size += pb::CodedOutputStream.ComputeBytesSize(32, Sha); - } - { - int dataSize = 0; - foreach (pb::ByteString element in ShasList) { - dataSize += pb::CodedOutputStream.ComputeBytesSizeNoTag(element); - } - size += dataSize; - size += 2 * shas_.Count; - } - { - int dataSize = 0; - dataSize = 4 * v3F_.Count; - size += dataSize; - if (v3F_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - v3FMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * v3Ff_.Count; - size += dataSize; - if (v3Ff_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - v3FfMemoizedSerializedSize = dataSize; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static ExternalMessage ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ExternalMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ExternalMessage ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static ExternalMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static ExternalMessage ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ExternalMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static ExternalMessage ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static ExternalMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static ExternalMessage ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static ExternalMessage 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(ExternalMessage prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - ExternalMessage result = new ExternalMessage(); - - protected override ExternalMessage MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new ExternalMessage(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.PB._PBJ_Internal.ExternalMessage.Descriptor; } - } - - public override ExternalMessage DefaultInstanceForType { - get { return global::Sirikata.PB._PBJ_Internal.ExternalMessage.DefaultInstance; } - } - - public override ExternalMessage BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.v2F_.MakeReadOnly(); - result.submessers_.MakeReadOnly(); - result.shas_.MakeReadOnly(); - result.v3F_.MakeReadOnly(); - result.v3Ff_.MakeReadOnly(); - ExternalMessage returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is ExternalMessage) { - return MergeFrom((ExternalMessage) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(ExternalMessage other) { - if (other == global::Sirikata.PB._PBJ_Internal.ExternalMessage.DefaultInstance) return this; - if (other.HasIsTrue) { - IsTrue = other.IsTrue; - } - if (other.v2F_.Count != 0) { - base.AddRange(other.v2F_, result.v2F_); - } - if (other.HasSubMes) { - MergeSubMes(other.SubMes); - } - if (other.submessers_.Count != 0) { - base.AddRange(other.submessers_, result.submessers_); - } - if (other.HasSha) { - Sha = other.Sha; - } - if (other.shas_.Count != 0) { - base.AddRange(other.shas_, result.shas_); - } - if (other.v3F_.Count != 0) { - base.AddRange(other.v3F_, result.v3F_); - } - if (other.v3Ff_.Count != 0) { - base.AddRange(other.v3Ff_, result.v3Ff_); - } - 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 18: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddV2F(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddV3F(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 42: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddV3Ff(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 242: { - global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.Builder subBuilder = global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.CreateBuilder(); - if (HasSubMes) { - subBuilder.MergeFrom(SubMes); - } - input.ReadMessage(subBuilder, extensionRegistry); - SubMes = subBuilder.BuildPartial(); - break; - } - case 250: { - global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.Builder subBuilder = global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddSubmessers(subBuilder.BuildPartial()); - break; - } - case 258: { - Sha = input.ReadBytes(); - break; - } - case 266: { - AddShas(input.ReadBytes()); - break; - } - case 320: { - IsTrue = input.ReadBool(); - break; - } - } - } - } - - - public bool HasIsTrue { - get { return result.HasIsTrue; } - } - public bool IsTrue { - get { return result.IsTrue; } - set { SetIsTrue(value); } - } - public Builder SetIsTrue(bool value) { - result.hasIsTrue = true; - result.isTrue_ = value; - return this; - } - public Builder ClearIsTrue() { - result.hasIsTrue = false; - result.isTrue_ = true; - return this; - } - - public pbc::IPopsicleList V2FList { - get { return result.v2F_; } - } - public int V2FCount { - get { return result.V2FCount; } - } - public float GetV2F(int index) { - return result.GetV2F(index); - } - public Builder SetV2F(int index, float value) { - result.v2F_[index] = value; - return this; - } - public Builder AddV2F(float value) { - result.v2F_.Add(value); - return this; - } - public Builder AddRangeV2F(scg::IEnumerable values) { - base.AddRange(values, result.v2F_); - return this; - } - public Builder ClearV2F() { - result.v2F_.Clear(); - return this; - } - - public bool HasSubMes { - get { return result.HasSubMes; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage SubMes { - get { return result.SubMes; } - set { SetSubMes(value); } - } - public Builder SetSubMes(global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasSubMes = true; - result.subMes_ = value; - return this; - } - public Builder SetSubMes(global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.hasSubMes = true; - result.subMes_ = builderForValue.Build(); - return this; - } - public Builder MergeSubMes(global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - if (result.HasSubMes && - result.subMes_ != global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.DefaultInstance) { - result.subMes_ = global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.CreateBuilder(result.subMes_).MergeFrom(value).BuildPartial(); - } else { - result.subMes_ = value; - } - result.hasSubMes = true; - return this; - } - public Builder ClearSubMes() { - result.hasSubMes = false; - result.subMes_ = global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.DefaultInstance; - return this; - } - - public pbc::IPopsicleList SubmessersList { - get { return result.submessers_; } - } - public int SubmessersCount { - get { return result.SubmessersCount; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage GetSubmessers(int index) { - return result.GetSubmessers(index); - } - public Builder SetSubmessers(int index, global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.submessers_[index] = value; - return this; - } - public Builder SetSubmessers(int index, global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.submessers_[index] = builderForValue.Build(); - return this; - } - public Builder AddSubmessers(global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.submessers_.Add(value); - return this; - } - public Builder AddSubmessers(global::Sirikata.PB._PBJ_Internal.ExternalMessage.Types.SubMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.submessers_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeSubmessers(scg::IEnumerable values) { - base.AddRange(values, result.submessers_); - return this; - } - public Builder ClearSubmessers() { - result.submessers_.Clear(); - return this; - } - - public bool HasSha { - get { return result.HasSha; } - } - public pb::ByteString Sha { - get { return result.Sha; } - set { SetSha(value); } - } - public Builder SetSha(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasSha = true; - result.sha_ = value; - return this; - } - public Builder ClearSha() { - result.hasSha = false; - result.sha_ = pb::ByteString.Empty; - return this; - } - - public pbc::IPopsicleList ShasList { - get { return result.shas_; } - } - public int ShasCount { - get { return result.ShasCount; } - } - public pb::ByteString GetShas(int index) { - return result.GetShas(index); - } - public Builder SetShas(int index, pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.shas_[index] = value; - return this; - } - public Builder AddShas(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.shas_.Add(value); - return this; - } - public Builder AddRangeShas(scg::IEnumerable values) { - base.AddRange(values, result.shas_); - return this; - } - public Builder ClearShas() { - result.shas_.Clear(); - return this; - } - - public pbc::IPopsicleList V3FList { - get { return result.v3F_; } - } - public int V3FCount { - get { return result.V3FCount; } - } - public float GetV3F(int index) { - return result.GetV3F(index); - } - public Builder SetV3F(int index, float value) { - result.v3F_[index] = value; - return this; - } - public Builder AddV3F(float value) { - result.v3F_.Add(value); - return this; - } - public Builder AddRangeV3F(scg::IEnumerable values) { - base.AddRange(values, result.v3F_); - return this; - } - public Builder ClearV3F() { - result.v3F_.Clear(); - return this; - } - - public pbc::IPopsicleList V3FfList { - get { return result.v3Ff_; } - } - public int V3FfCount { - get { return result.V3FfCount; } - } - public float GetV3Ff(int index) { - return result.GetV3Ff(index); - } - public Builder SetV3Ff(int index, float value) { - result.v3Ff_[index] = value; - return this; - } - public Builder AddV3Ff(float value) { - result.v3Ff_.Add(value); - return this; - } - public Builder AddRangeV3Ff(scg::IEnumerable values) { - base.AddRange(values, result.v3Ff_); - return this; - } - public Builder ClearV3Ff() { - result.v3Ff_.Clear(); - return this; - } - } - static ExternalMessage() { - object.ReferenceEquals(global::Sirikata.PB._PBJ_Internal.Test.Descriptor, null); - } - } - - public sealed partial class TestMessage : pb::ExtendableMessage { - private static readonly TestMessage defaultInstance = new Builder().BuildPartial(); - public static TestMessage DefaultInstance { - get { return defaultInstance; } - } - - public override TestMessage DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override TestMessage ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.PB._PBJ_Internal.Test.internal__static_Sirikata_PB__PBJ_Internal_TestMessage__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.PB._PBJ_Internal.Test.internal__static_Sirikata_PB__PBJ_Internal_TestMessage__FieldAccessorTable; } - } - - #region Nested types - public static class Types { - public enum Flagsf32 { - UNIVERSA = 0, - WE = 1, - IMAGE = 2, - LOCA = 3, - } - - public enum Flagsf64 { - UNIVERSAL = 0, - WEB = 1, - IMAGES = 2, - LOCAL = 3, - } - - public enum Enum32 { - UNIVERSAL1 = 0, - WEB1 = 1, - IMAGES1 = 2, - LOCAL1 = 3, - } - - public sealed partial class SubMessage : pb::GeneratedMessage { - private static readonly SubMessage defaultInstance = new Builder().BuildPartial(); - public static SubMessage DefaultInstance { - get { return defaultInstance; } - } - - public override SubMessage DefaultInstanceForType { - get { return defaultInstance; } - } - - protected override SubMessage ThisMessage { - get { return this; } - } - - public static pbd::MessageDescriptor Descriptor { - get { return global::Sirikata.PB._PBJ_Internal.Test.internal__static_Sirikata_PB__PBJ_Internal_TestMessage_SubMessage__Descriptor; } - } - - protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { - get { return global::Sirikata.PB._PBJ_Internal.Test.internal__static_Sirikata_PB__PBJ_Internal_TestMessage_SubMessage__FieldAccessorTable; } - } - - public const int SubuuidFieldNumber = 1; - private bool hasSubuuid; - private pb::ByteString subuuid_ = pb::ByteString.Empty; - public bool HasSubuuid { - get { return hasSubuuid; } - } - public pb::ByteString Subuuid { - get { return subuuid_; } - } - - public const int SubvectorFieldNumber = 2; - private int subvectorMemoizedSerializedSize; - private pbc::PopsicleList subvector_ = new pbc::PopsicleList(); - public scg::IList SubvectorList { - get { return pbc::Lists.AsReadOnly(subvector_); } - } - public int SubvectorCount { - get { return subvector_.Count; } - } - public double GetSubvector(int index) { - return subvector_[index]; - } - - public const int SubdurationFieldNumber = 3; - private bool hasSubduration; - private long subduration_ = 0; - public bool HasSubduration { - get { return hasSubduration; } - } - public long Subduration { - get { return subduration_; } - } - - public const int SubnormalFieldNumber = 4; - private int subnormalMemoizedSerializedSize; - private pbc::PopsicleList subnormal_ = new pbc::PopsicleList(); - public scg::IList SubnormalList { - get { return pbc::Lists.AsReadOnly(subnormal_); } - } - public int SubnormalCount { - get { return subnormal_.Count; } - } - public float GetSubnormal(int index) { - return subnormal_[index]; - } - - public override bool IsInitialized { - get { - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - if (HasSubuuid) { - output.WriteBytes(1, Subuuid); - } - if (subvector_.Count > 0) { - output.WriteRawVarint32(18); - output.WriteRawVarint32((uint) subvectorMemoizedSerializedSize); - foreach (double element in subvector_) { - output.WriteDoubleNoTag(element); - } - } - if (HasSubduration) { - output.WriteSFixed64(3, Subduration); - } - if (subnormal_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) subnormalMemoizedSerializedSize); - foreach (float element in subnormal_) { - output.WriteFloatNoTag(element); - } - } - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasSubuuid) { - size += pb::CodedOutputStream.ComputeBytesSize(1, Subuuid); - } - { - int dataSize = 0; - dataSize = 8 * subvector_.Count; - size += dataSize; - if (subvector_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - subvectorMemoizedSerializedSize = dataSize; - } - if (HasSubduration) { - size += pb::CodedOutputStream.ComputeSFixed64Size(3, Subduration); - } - { - int dataSize = 0; - dataSize = 4 * subnormal_.Count; - size += dataSize; - if (subnormal_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - subnormalMemoizedSerializedSize = dataSize; - } - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static SubMessage ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static SubMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static SubMessage ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static SubMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static SubMessage ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static SubMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static SubMessage ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static SubMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static SubMessage ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static SubMessage 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(SubMessage prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::GeneratedBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - SubMessage result = new SubMessage(); - - protected override SubMessage MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new SubMessage(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.Descriptor; } - } - - public override SubMessage DefaultInstanceForType { - get { return global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.DefaultInstance; } - } - - public override SubMessage BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.subvector_.MakeReadOnly(); - result.subnormal_.MakeReadOnly(); - SubMessage returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is SubMessage) { - return MergeFrom((SubMessage) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(SubMessage other) { - if (other == global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.DefaultInstance) return this; - if (other.HasSubuuid) { - Subuuid = other.Subuuid; - } - if (other.subvector_.Count != 0) { - base.AddRange(other.subvector_, result.subvector_); - } - if (other.HasSubduration) { - Subduration = other.Subduration; - } - if (other.subnormal_.Count != 0) { - base.AddRange(other.subnormal_, result.subnormal_); - } - 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: { - Subuuid = input.ReadBytes(); - break; - } - case 18: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddSubvector(input.ReadDouble()); - } - input.PopLimit(limit); - break; - } - case 25: { - Subduration = input.ReadSFixed64(); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddSubnormal(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - } - } - } - - - public bool HasSubuuid { - get { return result.HasSubuuid; } - } - public pb::ByteString Subuuid { - get { return result.Subuuid; } - set { SetSubuuid(value); } - } - public Builder SetSubuuid(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasSubuuid = true; - result.subuuid_ = value; - return this; - } - public Builder ClearSubuuid() { - result.hasSubuuid = false; - result.subuuid_ = pb::ByteString.Empty; - return this; - } - - public pbc::IPopsicleList SubvectorList { - get { return result.subvector_; } - } - public int SubvectorCount { - get { return result.SubvectorCount; } - } - public double GetSubvector(int index) { - return result.GetSubvector(index); - } - public Builder SetSubvector(int index, double value) { - result.subvector_[index] = value; - return this; - } - public Builder AddSubvector(double value) { - result.subvector_.Add(value); - return this; - } - public Builder AddRangeSubvector(scg::IEnumerable values) { - base.AddRange(values, result.subvector_); - return this; - } - public Builder ClearSubvector() { - result.subvector_.Clear(); - return this; - } - - public bool HasSubduration { - get { return result.HasSubduration; } - } - public long Subduration { - get { return result.Subduration; } - set { SetSubduration(value); } - } - public Builder SetSubduration(long value) { - result.hasSubduration = true; - result.subduration_ = value; - return this; - } - public Builder ClearSubduration() { - result.hasSubduration = false; - result.subduration_ = 0; - return this; - } - - public pbc::IPopsicleList SubnormalList { - get { return result.subnormal_; } - } - public int SubnormalCount { - get { return result.SubnormalCount; } - } - public float GetSubnormal(int index) { - return result.GetSubnormal(index); - } - public Builder SetSubnormal(int index, float value) { - result.subnormal_[index] = value; - return this; - } - public Builder AddSubnormal(float value) { - result.subnormal_.Add(value); - return this; - } - public Builder AddRangeSubnormal(scg::IEnumerable values) { - base.AddRange(values, result.subnormal_); - return this; - } - public Builder ClearSubnormal() { - result.subnormal_.Clear(); - return this; - } - } - static SubMessage() { - object.ReferenceEquals(global::Sirikata.PB._PBJ_Internal.Test.Descriptor, null); - } - } - - } - #endregion - - public const int XxdFieldNumber = 20; - private bool hasXxd; - private double xxd_ = 10.3D; - public bool HasXxd { - get { return hasXxd; } - } - public double Xxd { - get { return xxd_; } - } - - public const int XxfFieldNumber = 21; - private bool hasXxf; - private float xxf_ = 0F; - public bool HasXxf { - get { return hasXxf; } - } - public float Xxf { - get { return xxf_; } - } - - public const int Xxu32FieldNumber = 22; - private bool hasXxu32; - private uint xxu32_ = 0; - public bool HasXxu32 { - get { return hasXxu32; } - } - [global::System.CLSCompliant(false)] - public uint Xxu32 { - get { return xxu32_; } - } - - public const int XxsFieldNumber = 23; - private bool hasXxs; - private string xxs_ = ""; - public bool HasXxs { - get { return hasXxs; } - } - public string Xxs { - get { return xxs_; } - } - - public const int XxbFieldNumber = 24; - private bool hasXxb; - private pb::ByteString xxb_ = pb::ByteString.Empty; - public bool HasXxb { - get { return hasXxb; } - } - public pb::ByteString Xxb { - get { return xxb_; } - } - - public const int XxssFieldNumber = 25; - private pbc::PopsicleList xxss_ = new pbc::PopsicleList(); - public scg::IList XxssList { - get { return pbc::Lists.AsReadOnly(xxss_); } - } - public int XxssCount { - get { return xxss_.Count; } - } - public string GetXxss(int index) { - return xxss_[index]; - } - - public const int XxbbFieldNumber = 26; - private pbc::PopsicleList xxbb_ = new pbc::PopsicleList(); - public scg::IList XxbbList { - get { return pbc::Lists.AsReadOnly(xxbb_); } - } - public int XxbbCount { - get { return xxbb_.Count; } - } - public pb::ByteString GetXxbb(int index) { - return xxbb_[index]; - } - - public const int XxffFieldNumber = 27; - private int xxffMemoizedSerializedSize; - private pbc::PopsicleList xxff_ = new pbc::PopsicleList(); - public scg::IList XxffList { - get { return pbc::Lists.AsReadOnly(xxff_); } - } - public int XxffCount { - get { return xxff_.Count; } - } - public float GetXxff(int index) { - return xxff_[index]; - } - - public const int XxnnFieldNumber = 29; - private int xxnnMemoizedSerializedSize; - private pbc::PopsicleList xxnn_ = new pbc::PopsicleList(); - public scg::IList XxnnList { - get { return pbc::Lists.AsReadOnly(xxnn_); } - } - public int XxnnCount { - get { return xxnn_.Count; } - } - public float GetXxnn(int index) { - return xxnn_[index]; - } - - public const int XxfrFieldNumber = 28; - private bool hasXxfr; - private float xxfr_ = 0F; - public bool HasXxfr { - get { return hasXxfr; } - } - public float Xxfr { - get { return xxfr_; } - } - - public const int NFieldNumber = 1; - private int nMemoizedSerializedSize; - private pbc::PopsicleList n_ = new pbc::PopsicleList(); - public scg::IList NList { - get { return pbc::Lists.AsReadOnly(n_); } - } - public int NCount { - get { return n_.Count; } - } - public float GetN(int index) { - return n_[index]; - } - - public const int V2FFieldNumber = 2; - private int v2FMemoizedSerializedSize; - private pbc::PopsicleList v2F_ = new pbc::PopsicleList(); - public scg::IList V2FList { - get { return pbc::Lists.AsReadOnly(v2F_); } - } - public int V2FCount { - get { return v2F_.Count; } - } - public float GetV2F(int index) { - return v2F_[index]; - } - - public const int V2DFieldNumber = 3; - private int v2DMemoizedSerializedSize; - private pbc::PopsicleList v2D_ = new pbc::PopsicleList(); - public scg::IList V2DList { - get { return pbc::Lists.AsReadOnly(v2D_); } - } - public int V2DCount { - get { return v2D_.Count; } - } - public double GetV2D(int index) { - return v2D_[index]; - } - - public const int V3FFieldNumber = 4; - private int v3FMemoizedSerializedSize; - private pbc::PopsicleList v3F_ = new pbc::PopsicleList(); - public scg::IList V3FList { - get { return pbc::Lists.AsReadOnly(v3F_); } - } - public int V3FCount { - get { return v3F_.Count; } - } - public float GetV3F(int index) { - return v3F_[index]; - } - - public const int V3DFieldNumber = 5; - private int v3DMemoizedSerializedSize; - private pbc::PopsicleList v3D_ = new pbc::PopsicleList(); - public scg::IList V3DList { - get { return pbc::Lists.AsReadOnly(v3D_); } - } - public int V3DCount { - get { return v3D_.Count; } - } - public double GetV3D(int index) { - return v3D_[index]; - } - - public const int V4FFieldNumber = 6; - private int v4FMemoizedSerializedSize; - private pbc::PopsicleList v4F_ = new pbc::PopsicleList(); - public scg::IList V4FList { - get { return pbc::Lists.AsReadOnly(v4F_); } - } - public int V4FCount { - get { return v4F_.Count; } - } - public float GetV4F(int index) { - return v4F_[index]; - } - - public const int V4DFieldNumber = 7; - private int v4DMemoizedSerializedSize; - private pbc::PopsicleList v4D_ = new pbc::PopsicleList(); - public scg::IList V4DList { - get { return pbc::Lists.AsReadOnly(v4D_); } - } - public int V4DCount { - get { return v4D_.Count; } - } - public double GetV4D(int index) { - return v4D_[index]; - } - - public const int QFieldNumber = 8; - private int qMemoizedSerializedSize; - private pbc::PopsicleList q_ = new pbc::PopsicleList(); - public scg::IList QList { - get { return pbc::Lists.AsReadOnly(q_); } - } - public int QCount { - get { return q_.Count; } - } - public float GetQ(int index) { - return q_[index]; - } - - public const int UFieldNumber = 9; - private bool hasU; - private pb::ByteString u_ = pb::ByteString.Empty; - public bool HasU { - get { return hasU; } - } - public pb::ByteString U { - get { return u_; } - } - - public const int AFieldNumber = 10; - private bool hasA; - private float a_ = 0F; - public bool HasA { - get { return hasA; } - } - public float A { - get { return a_; } - } - - public const int TFieldNumber = 11; - private bool hasT; - private ulong t_ = 0; - public bool HasT { - get { return hasT; } - } - [global::System.CLSCompliant(false)] - public ulong T { - get { return t_; } - } - - public const int DFieldNumber = 12; - private bool hasD; - private long d_ = 0; - public bool HasD { - get { return hasD; } - } - public long D { - get { return d_; } - } - - public const int F32FieldNumber = 13; - private bool hasF32; - private uint f32_ = 0; - public bool HasF32 { - get { return hasF32; } - } - [global::System.CLSCompliant(false)] - public uint F32 { - get { return f32_; } - } - - public const int F64FieldNumber = 14; - private bool hasF64; - private ulong f64_ = 0UL; - public bool HasF64 { - get { return hasF64; } - } - [global::System.CLSCompliant(false)] - public ulong F64 { - get { return f64_; } - } - - public const int BsfFieldNumber = 15; - private int bsfMemoizedSerializedSize; - private pbc::PopsicleList bsf_ = new pbc::PopsicleList(); - public scg::IList BsfList { - get { return pbc::Lists.AsReadOnly(bsf_); } - } - public int BsfCount { - get { return bsf_.Count; } - } - public float GetBsf(int index) { - return bsf_[index]; - } - - public const int BsdFieldNumber = 16; - private int bsdMemoizedSerializedSize; - private pbc::PopsicleList bsd_ = new pbc::PopsicleList(); - public scg::IList BsdList { - get { return pbc::Lists.AsReadOnly(bsd_); } - } - public int BsdCount { - get { return bsd_.Count; } - } - public double GetBsd(int index) { - return bsd_[index]; - } - - public const int BbfFieldNumber = 17; - private int bbfMemoizedSerializedSize; - private pbc::PopsicleList bbf_ = new pbc::PopsicleList(); - public scg::IList BbfList { - get { return pbc::Lists.AsReadOnly(bbf_); } - } - public int BbfCount { - get { return bbf_.Count; } - } - public float GetBbf(int index) { - return bbf_[index]; - } - - public const int BbdFieldNumber = 18; - private int bbdMemoizedSerializedSize; - private pbc::PopsicleList bbd_ = new pbc::PopsicleList(); - public scg::IList BbdList { - get { return pbc::Lists.AsReadOnly(bbd_); } - } - public int BbdCount { - get { return bbd_.Count; } - } - public double GetBbd(int index) { - return bbd_[index]; - } - - public const int E32FieldNumber = 19; - private bool hasE32; - private global::Sirikata.PB._PBJ_Internal.TestMessage.Types.Enum32 e32_ = global::Sirikata.PB._PBJ_Internal.TestMessage.Types.Enum32.UNIVERSAL1; - public bool HasE32 { - get { return hasE32; } - } - public global::Sirikata.PB._PBJ_Internal.TestMessage.Types.Enum32 E32 { - get { return e32_; } - } - - public const int SubmesFieldNumber = 30; - private bool hasSubmes; - private global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage submes_ = global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.DefaultInstance; - public bool HasSubmes { - get { return hasSubmes; } - } - public global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage Submes { - get { return submes_; } - } - - public const int SubmessersFieldNumber = 31; - private pbc::PopsicleList submessers_ = new pbc::PopsicleList(); - public scg::IList SubmessersList { - get { return submessers_; } - } - public int SubmessersCount { - get { return submessers_.Count; } - } - public global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage GetSubmessers(int index) { - return submessers_[index]; - } - - public const int ShaFieldNumber = 32; - private bool hasSha; - private pb::ByteString sha_ = pb::ByteString.Empty; - public bool HasSha { - get { return hasSha; } - } - public pb::ByteString Sha { - get { return sha_; } - } - - public const int ShasFieldNumber = 33; - private pbc::PopsicleList shas_ = new pbc::PopsicleList(); - public scg::IList ShasList { - get { return pbc::Lists.AsReadOnly(shas_); } - } - public int ShasCount { - get { return shas_.Count; } - } - public pb::ByteString GetShas(int index) { - return shas_[index]; - } - - public const int ExtmesFieldNumber = 34; - private bool hasExtmes; - private global::Sirikata.PB._PBJ_Internal.ExternalMessage extmes_ = global::Sirikata.PB._PBJ_Internal.ExternalMessage.DefaultInstance; - public bool HasExtmes { - get { return hasExtmes; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage Extmes { - get { return extmes_; } - } - - public const int ExtmessersFieldNumber = 35; - private pbc::PopsicleList extmessers_ = new pbc::PopsicleList(); - public scg::IList ExtmessersList { - get { return extmessers_; } - } - public int ExtmessersCount { - get { return extmessers_.Count; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage GetExtmessers(int index) { - return extmessers_[index]; - } - - public const int ExtmesserFieldNumber = 36; - private bool hasExtmesser; - private global::Sirikata.PB._PBJ_Internal.ExternalMessage extmesser_ = global::Sirikata.PB._PBJ_Internal.ExternalMessage.DefaultInstance; - public bool HasExtmesser { - get { return hasExtmesser; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage Extmesser { - get { return extmesser_; } - } - - public override bool IsInitialized { - get { - if (!hasXxfr) return false; - if (!hasExtmesser) return false; - if (!ExtensionsAreInitialized) return false; - return true; - } - } - - public override void WriteTo(pb::CodedOutputStream output) { - pb::ExtendableMessage.ExtensionWriter extensionWriter = CreateExtensionWriter(this); - if (n_.Count > 0) { - output.WriteRawVarint32(10); - output.WriteRawVarint32((uint) nMemoizedSerializedSize); - foreach (float element in n_) { - output.WriteFloatNoTag(element); - } - } - if (v2F_.Count > 0) { - output.WriteRawVarint32(18); - output.WriteRawVarint32((uint) v2FMemoizedSerializedSize); - foreach (float element in v2F_) { - output.WriteFloatNoTag(element); - } - } - if (v2D_.Count > 0) { - output.WriteRawVarint32(26); - output.WriteRawVarint32((uint) v2DMemoizedSerializedSize); - foreach (double element in v2D_) { - output.WriteDoubleNoTag(element); - } - } - if (v3F_.Count > 0) { - output.WriteRawVarint32(34); - output.WriteRawVarint32((uint) v3FMemoizedSerializedSize); - foreach (float element in v3F_) { - output.WriteFloatNoTag(element); - } - } - if (v3D_.Count > 0) { - output.WriteRawVarint32(42); - output.WriteRawVarint32((uint) v3DMemoizedSerializedSize); - foreach (double element in v3D_) { - output.WriteDoubleNoTag(element); - } - } - if (v4F_.Count > 0) { - output.WriteRawVarint32(50); - output.WriteRawVarint32((uint) v4FMemoizedSerializedSize); - foreach (float element in v4F_) { - output.WriteFloatNoTag(element); - } - } - if (v4D_.Count > 0) { - output.WriteRawVarint32(58); - output.WriteRawVarint32((uint) v4DMemoizedSerializedSize); - foreach (double element in v4D_) { - output.WriteDoubleNoTag(element); - } - } - if (q_.Count > 0) { - output.WriteRawVarint32(66); - output.WriteRawVarint32((uint) qMemoizedSerializedSize); - foreach (float element in q_) { - output.WriteFloatNoTag(element); - } - } - if (HasU) { - output.WriteBytes(9, U); - } - if (HasA) { - output.WriteFloat(10, A); - } - if (HasT) { - output.WriteFixed64(11, T); - } - if (HasD) { - output.WriteSFixed64(12, D); - } - if (HasF32) { - output.WriteUInt32(13, F32); - } - if (HasF64) { - output.WriteUInt64(14, F64); - } - if (bsf_.Count > 0) { - output.WriteRawVarint32(122); - output.WriteRawVarint32((uint) bsfMemoizedSerializedSize); - foreach (float element in bsf_) { - output.WriteFloatNoTag(element); - } - } - if (bsd_.Count > 0) { - output.WriteRawVarint32(130); - output.WriteRawVarint32((uint) bsdMemoizedSerializedSize); - foreach (double element in bsd_) { - output.WriteDoubleNoTag(element); - } - } - if (bbf_.Count > 0) { - output.WriteRawVarint32(138); - output.WriteRawVarint32((uint) bbfMemoizedSerializedSize); - foreach (float element in bbf_) { - output.WriteFloatNoTag(element); - } - } - if (bbd_.Count > 0) { - output.WriteRawVarint32(146); - output.WriteRawVarint32((uint) bbdMemoizedSerializedSize); - foreach (double element in bbd_) { - output.WriteDoubleNoTag(element); - } - } - if (HasE32) { - output.WriteEnum(19, (int) E32); - } - if (HasXxd) { - output.WriteDouble(20, Xxd); - } - if (HasXxf) { - output.WriteFloat(21, Xxf); - } - if (HasXxu32) { - output.WriteUInt32(22, Xxu32); - } - if (HasXxs) { - output.WriteString(23, Xxs); - } - if (HasXxb) { - output.WriteBytes(24, Xxb); - } - if (xxss_.Count > 0) { - foreach (string element in xxss_) { - output.WriteString(25, element); - } - } - if (xxbb_.Count > 0) { - foreach (pb::ByteString element in xxbb_) { - output.WriteBytes(26, element); - } - } - if (xxff_.Count > 0) { - output.WriteRawVarint32(218); - output.WriteRawVarint32((uint) xxffMemoizedSerializedSize); - foreach (float element in xxff_) { - output.WriteFloatNoTag(element); - } - } - if (HasXxfr) { - output.WriteFloat(28, Xxfr); - } - if (xxnn_.Count > 0) { - output.WriteRawVarint32(234); - output.WriteRawVarint32((uint) xxnnMemoizedSerializedSize); - foreach (float element in xxnn_) { - output.WriteFloatNoTag(element); - } - } - if (HasSubmes) { - output.WriteMessage(30, Submes); - } - foreach (global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage element in SubmessersList) { - output.WriteMessage(31, element); - } - if (HasSha) { - output.WriteBytes(32, Sha); - } - if (shas_.Count > 0) { - foreach (pb::ByteString element in shas_) { - output.WriteBytes(33, element); - } - } - if (HasExtmes) { - output.WriteMessage(34, Extmes); - } - foreach (global::Sirikata.PB._PBJ_Internal.ExternalMessage element in ExtmessersList) { - output.WriteMessage(35, element); - } - if (HasExtmesser) { - output.WriteMessage(36, Extmesser); - } - extensionWriter.WriteUntil(200, output); - UnknownFields.WriteTo(output); - } - - private int memoizedSerializedSize = -1; - public override int SerializedSize { - get { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (HasXxd) { - size += pb::CodedOutputStream.ComputeDoubleSize(20, Xxd); - } - if (HasXxf) { - size += pb::CodedOutputStream.ComputeFloatSize(21, Xxf); - } - if (HasXxu32) { - size += pb::CodedOutputStream.ComputeUInt32Size(22, Xxu32); - } - if (HasXxs) { - size += pb::CodedOutputStream.ComputeStringSize(23, Xxs); - } - if (HasXxb) { - size += pb::CodedOutputStream.ComputeBytesSize(24, Xxb); - } - { - int dataSize = 0; - foreach (string element in XxssList) { - dataSize += pb::CodedOutputStream.ComputeStringSizeNoTag(element); - } - size += dataSize; - size += 2 * xxss_.Count; - } - { - int dataSize = 0; - foreach (pb::ByteString element in XxbbList) { - dataSize += pb::CodedOutputStream.ComputeBytesSizeNoTag(element); - } - size += dataSize; - size += 2 * xxbb_.Count; - } - { - int dataSize = 0; - dataSize = 4 * xxff_.Count; - size += dataSize; - if (xxff_.Count!=0) size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - xxffMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * xxnn_.Count; - size += dataSize; - if (xxnn_.Count!=0) size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - xxnnMemoizedSerializedSize = dataSize; - } - if (HasXxfr) { - size += pb::CodedOutputStream.ComputeFloatSize(28, Xxfr); - } - { - int dataSize = 0; - dataSize = 4 * n_.Count; - size += dataSize; - if (n_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - nMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * v2F_.Count; - size += dataSize; - if (v2F_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - v2FMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 8 * v2D_.Count; - size += dataSize; - if (v2D_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - v2DMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * v3F_.Count; - size += dataSize; - if (v3F_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - v3FMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 8 * v3D_.Count; - size += dataSize; - if (v3D_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - v3DMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * v4F_.Count; - size += dataSize; - if (v4F_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - v4FMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 8 * v4D_.Count; - size += dataSize; - if (v4D_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - v4DMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * q_.Count; - size += dataSize; - if (q_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - qMemoizedSerializedSize = dataSize; - } - if (HasU) { - size += pb::CodedOutputStream.ComputeBytesSize(9, U); - } - if (HasA) { - size += pb::CodedOutputStream.ComputeFloatSize(10, A); - } - if (HasT) { - size += pb::CodedOutputStream.ComputeFixed64Size(11, T); - } - if (HasD) { - size += pb::CodedOutputStream.ComputeSFixed64Size(12, D); - } - if (HasF32) { - size += pb::CodedOutputStream.ComputeUInt32Size(13, F32); - } - if (HasF64) { - size += pb::CodedOutputStream.ComputeUInt64Size(14, F64); - } - { - int dataSize = 0; - dataSize = 4 * bsf_.Count; - size += dataSize; - if (bsf_.Count!=0) size += 1 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - bsfMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 8 * bsd_.Count; - size += dataSize; - if (bsd_.Count!=0) size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - bsdMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 4 * bbf_.Count; - size += dataSize; - if (bbf_.Count!=0) size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - bbfMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - dataSize = 8 * bbd_.Count; - size += dataSize; - if (bbd_.Count!=0) size += 2 + pb::CodedOutputStream.ComputeInt32SizeNoTag(dataSize); - bbdMemoizedSerializedSize = dataSize; - } - if (HasE32) { - size += pb::CodedOutputStream.ComputeEnumSize(19, (int) E32); - } - if (HasSubmes) { - size += pb::CodedOutputStream.ComputeMessageSize(30, Submes); - } - foreach (global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage element in SubmessersList) { - size += pb::CodedOutputStream.ComputeMessageSize(31, element); - } - if (HasSha) { - size += pb::CodedOutputStream.ComputeBytesSize(32, Sha); - } - { - int dataSize = 0; - foreach (pb::ByteString element in ShasList) { - dataSize += pb::CodedOutputStream.ComputeBytesSizeNoTag(element); - } - size += dataSize; - size += 2 * shas_.Count; - } - if (HasExtmes) { - size += pb::CodedOutputStream.ComputeMessageSize(34, Extmes); - } - foreach (global::Sirikata.PB._PBJ_Internal.ExternalMessage element in ExtmessersList) { - size += pb::CodedOutputStream.ComputeMessageSize(35, element); - } - if (HasExtmesser) { - size += pb::CodedOutputStream.ComputeMessageSize(36, Extmesser); - } - size += ExtensionsSerializedSize; - size += UnknownFields.SerializedSize; - memoizedSerializedSize = size; - return size; - } - } - - public static TestMessage ParseFrom(pb::ByteString data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static TestMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static TestMessage ParseFrom(byte[] data) { - return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); - } - public static TestMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); - } - public static TestMessage ParseFrom(global::System.IO.Stream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static TestMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); - } - public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input) { - return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); - } - public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { - return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); - } - public static TestMessage ParseFrom(pb::CodedInputStream input) { - return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); - } - public static TestMessage 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(TestMessage prototype) { - return (Builder) new Builder().MergeFrom(prototype); - } - - public sealed partial class Builder : pb::ExtendableBuilder { - protected override Builder ThisBuilder { - get { return this; } - } - public Builder() {} - - TestMessage result = new TestMessage(); - - protected override TestMessage MessageBeingBuilt { - get { return result; } - } - - public override Builder Clear() { - result = new TestMessage(); - return this; - } - - public override Builder Clone() { - return new Builder().MergeFrom(result); - } - - public override pbd::MessageDescriptor DescriptorForType { - get { return global::Sirikata.PB._PBJ_Internal.TestMessage.Descriptor; } - } - - public override TestMessage DefaultInstanceForType { - get { return global::Sirikata.PB._PBJ_Internal.TestMessage.DefaultInstance; } - } - - public override TestMessage BuildPartial() { - if (result == null) { - throw new global::System.InvalidOperationException("build() has already been called on this Builder"); - } - result.xxss_.MakeReadOnly(); - result.xxbb_.MakeReadOnly(); - result.xxff_.MakeReadOnly(); - result.xxnn_.MakeReadOnly(); - result.n_.MakeReadOnly(); - result.v2F_.MakeReadOnly(); - result.v2D_.MakeReadOnly(); - result.v3F_.MakeReadOnly(); - result.v3D_.MakeReadOnly(); - result.v4F_.MakeReadOnly(); - result.v4D_.MakeReadOnly(); - result.q_.MakeReadOnly(); - result.bsf_.MakeReadOnly(); - result.bsd_.MakeReadOnly(); - result.bbf_.MakeReadOnly(); - result.bbd_.MakeReadOnly(); - result.submessers_.MakeReadOnly(); - result.shas_.MakeReadOnly(); - result.extmessers_.MakeReadOnly(); - TestMessage returnMe = result; - result = null; - return returnMe; - } - - public override Builder MergeFrom(pb::IMessage other) { - if (other is TestMessage) { - return MergeFrom((TestMessage) other); - } else { - base.MergeFrom(other); - return this; - } - } - - public override Builder MergeFrom(TestMessage other) { - if (other == global::Sirikata.PB._PBJ_Internal.TestMessage.DefaultInstance) return this; - if (other.HasXxd) { - Xxd = other.Xxd; - } - if (other.HasXxf) { - Xxf = other.Xxf; - } - if (other.HasXxu32) { - Xxu32 = other.Xxu32; - } - if (other.HasXxs) { - Xxs = other.Xxs; - } - if (other.HasXxb) { - Xxb = other.Xxb; - } - if (other.xxss_.Count != 0) { - base.AddRange(other.xxss_, result.xxss_); - } - if (other.xxbb_.Count != 0) { - base.AddRange(other.xxbb_, result.xxbb_); - } - if (other.xxff_.Count != 0) { - base.AddRange(other.xxff_, result.xxff_); - } - if (other.xxnn_.Count != 0) { - base.AddRange(other.xxnn_, result.xxnn_); - } - if (other.HasXxfr) { - Xxfr = other.Xxfr; - } - if (other.n_.Count != 0) { - base.AddRange(other.n_, result.n_); - } - if (other.v2F_.Count != 0) { - base.AddRange(other.v2F_, result.v2F_); - } - if (other.v2D_.Count != 0) { - base.AddRange(other.v2D_, result.v2D_); - } - if (other.v3F_.Count != 0) { - base.AddRange(other.v3F_, result.v3F_); - } - if (other.v3D_.Count != 0) { - base.AddRange(other.v3D_, result.v3D_); - } - if (other.v4F_.Count != 0) { - base.AddRange(other.v4F_, result.v4F_); - } - if (other.v4D_.Count != 0) { - base.AddRange(other.v4D_, result.v4D_); - } - if (other.q_.Count != 0) { - base.AddRange(other.q_, result.q_); - } - if (other.HasU) { - U = other.U; - } - if (other.HasA) { - A = other.A; - } - if (other.HasT) { - T = other.T; - } - if (other.HasD) { - D = other.D; - } - if (other.HasF32) { - F32 = other.F32; - } - if (other.HasF64) { - F64 = other.F64; - } - if (other.bsf_.Count != 0) { - base.AddRange(other.bsf_, result.bsf_); - } - if (other.bsd_.Count != 0) { - base.AddRange(other.bsd_, result.bsd_); - } - if (other.bbf_.Count != 0) { - base.AddRange(other.bbf_, result.bbf_); - } - if (other.bbd_.Count != 0) { - base.AddRange(other.bbd_, result.bbd_); - } - if (other.HasE32) { - E32 = other.E32; - } - if (other.HasSubmes) { - MergeSubmes(other.Submes); - } - if (other.submessers_.Count != 0) { - base.AddRange(other.submessers_, result.submessers_); - } - if (other.HasSha) { - Sha = other.Sha; - } - if (other.shas_.Count != 0) { - base.AddRange(other.shas_, result.shas_); - } - if (other.HasExtmes) { - MergeExtmes(other.Extmes); - } - if (other.extmessers_.Count != 0) { - base.AddRange(other.extmessers_, result.extmessers_); - } - if (other.HasExtmesser) { - MergeExtmesser(other.Extmesser); - } - this.MergeExtensionFields(other); - 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: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddN(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 18: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddV2F(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 26: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddV2D(input.ReadDouble()); - } - input.PopLimit(limit); - break; - } - case 34: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddV3F(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 42: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddV3D(input.ReadDouble()); - } - input.PopLimit(limit); - break; - } - case 50: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddV4F(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 58: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddV4D(input.ReadDouble()); - } - input.PopLimit(limit); - break; - } - case 66: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddQ(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 74: { - U = input.ReadBytes(); - break; - } - case 85: { - A = input.ReadFloat(); - break; - } - case 89: { - T = input.ReadFixed64(); - break; - } - case 97: { - D = input.ReadSFixed64(); - break; - } - case 104: { - F32 = input.ReadUInt32(); - break; - } - case 112: { - F64 = input.ReadUInt64(); - break; - } - case 122: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddBsf(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 130: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddBsd(input.ReadDouble()); - } - input.PopLimit(limit); - break; - } - case 138: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddBbf(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 146: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddBbd(input.ReadDouble()); - } - input.PopLimit(limit); - break; - } - case 152: { - int rawValue = input.ReadEnum(); - if (!global::System.Enum.IsDefined(typeof(global::Sirikata.PB._PBJ_Internal.TestMessage.Types.Enum32), rawValue)) { - if (unknownFields == null) { - unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); - } - unknownFields.MergeVarintField(19, (ulong) rawValue); - } else { - E32 = (global::Sirikata.PB._PBJ_Internal.TestMessage.Types.Enum32) rawValue; - } - break; - } - case 161: { - Xxd = input.ReadDouble(); - break; - } - case 173: { - Xxf = input.ReadFloat(); - break; - } - case 176: { - Xxu32 = input.ReadUInt32(); - break; - } - case 186: { - Xxs = input.ReadString(); - break; - } - case 194: { - Xxb = input.ReadBytes(); - break; - } - case 202: { - AddXxss(input.ReadString()); - break; - } - case 210: { - AddXxbb(input.ReadBytes()); - break; - } - case 218: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddXxff(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 229: { - Xxfr = input.ReadFloat(); - break; - } - case 234: { - int length = input.ReadInt32(); - int limit = input.PushLimit(length); - while (!input.ReachedLimit) { - AddXxnn(input.ReadFloat()); - } - input.PopLimit(limit); - break; - } - case 242: { - global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.Builder subBuilder = global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.CreateBuilder(); - if (HasSubmes) { - subBuilder.MergeFrom(Submes); - } - input.ReadMessage(subBuilder, extensionRegistry); - Submes = subBuilder.BuildPartial(); - break; - } - case 250: { - global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.Builder subBuilder = global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddSubmessers(subBuilder.BuildPartial()); - break; - } - case 258: { - Sha = input.ReadBytes(); - break; - } - case 266: { - AddShas(input.ReadBytes()); - break; - } - case 274: { - global::Sirikata.PB._PBJ_Internal.ExternalMessage.Builder subBuilder = global::Sirikata.PB._PBJ_Internal.ExternalMessage.CreateBuilder(); - if (HasExtmes) { - subBuilder.MergeFrom(Extmes); - } - input.ReadMessage(subBuilder, extensionRegistry); - Extmes = subBuilder.BuildPartial(); - break; - } - case 282: { - global::Sirikata.PB._PBJ_Internal.ExternalMessage.Builder subBuilder = global::Sirikata.PB._PBJ_Internal.ExternalMessage.CreateBuilder(); - input.ReadMessage(subBuilder, extensionRegistry); - AddExtmessers(subBuilder.BuildPartial()); - break; - } - case 290: { - global::Sirikata.PB._PBJ_Internal.ExternalMessage.Builder subBuilder = global::Sirikata.PB._PBJ_Internal.ExternalMessage.CreateBuilder(); - if (HasExtmesser) { - subBuilder.MergeFrom(Extmesser); - } - input.ReadMessage(subBuilder, extensionRegistry); - Extmesser = subBuilder.BuildPartial(); - break; - } - } - } - } - - - public bool HasXxd { - get { return result.HasXxd; } - } - public double Xxd { - get { return result.Xxd; } - set { SetXxd(value); } - } - public Builder SetXxd(double value) { - result.hasXxd = true; - result.xxd_ = value; - return this; - } - public Builder ClearXxd() { - result.hasXxd = false; - result.xxd_ = 10.3D; - return this; - } - - public bool HasXxf { - get { return result.HasXxf; } - } - public float Xxf { - get { return result.Xxf; } - set { SetXxf(value); } - } - public Builder SetXxf(float value) { - result.hasXxf = true; - result.xxf_ = value; - return this; - } - public Builder ClearXxf() { - result.hasXxf = false; - result.xxf_ = 0F; - return this; - } - - public bool HasXxu32 { - get { return result.HasXxu32; } - } - [global::System.CLSCompliant(false)] - public uint Xxu32 { - get { return result.Xxu32; } - set { SetXxu32(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetXxu32(uint value) { - result.hasXxu32 = true; - result.xxu32_ = value; - return this; - } - public Builder ClearXxu32() { - result.hasXxu32 = false; - result.xxu32_ = 0; - return this; - } - - public bool HasXxs { - get { return result.HasXxs; } - } - public string Xxs { - get { return result.Xxs; } - set { SetXxs(value); } - } - public Builder SetXxs(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasXxs = true; - result.xxs_ = value; - return this; - } - public Builder ClearXxs() { - result.hasXxs = false; - result.xxs_ = ""; - return this; - } - - public bool HasXxb { - get { return result.HasXxb; } - } - public pb::ByteString Xxb { - get { return result.Xxb; } - set { SetXxb(value); } - } - public Builder SetXxb(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasXxb = true; - result.xxb_ = value; - return this; - } - public Builder ClearXxb() { - result.hasXxb = false; - result.xxb_ = pb::ByteString.Empty; - return this; - } - - public pbc::IPopsicleList XxssList { - get { return result.xxss_; } - } - public int XxssCount { - get { return result.XxssCount; } - } - public string GetXxss(int index) { - return result.GetXxss(index); - } - public Builder SetXxss(int index, string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.xxss_[index] = value; - return this; - } - public Builder AddXxss(string value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.xxss_.Add(value); - return this; - } - public Builder AddRangeXxss(scg::IEnumerable values) { - base.AddRange(values, result.xxss_); - return this; - } - public Builder ClearXxss() { - result.xxss_.Clear(); - return this; - } - - public pbc::IPopsicleList XxbbList { - get { return result.xxbb_; } - } - public int XxbbCount { - get { return result.XxbbCount; } - } - public pb::ByteString GetXxbb(int index) { - return result.GetXxbb(index); - } - public Builder SetXxbb(int index, pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.xxbb_[index] = value; - return this; - } - public Builder AddXxbb(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.xxbb_.Add(value); - return this; - } - public Builder AddRangeXxbb(scg::IEnumerable values) { - base.AddRange(values, result.xxbb_); - return this; - } - public Builder ClearXxbb() { - result.xxbb_.Clear(); - return this; - } - - public pbc::IPopsicleList XxffList { - get { return result.xxff_; } - } - public int XxffCount { - get { return result.XxffCount; } - } - public float GetXxff(int index) { - return result.GetXxff(index); - } - public Builder SetXxff(int index, float value) { - result.xxff_[index] = value; - return this; - } - public Builder AddXxff(float value) { - result.xxff_.Add(value); - return this; - } - public Builder AddRangeXxff(scg::IEnumerable values) { - base.AddRange(values, result.xxff_); - return this; - } - public Builder ClearXxff() { - result.xxff_.Clear(); - return this; - } - - public pbc::IPopsicleList XxnnList { - get { return result.xxnn_; } - } - public int XxnnCount { - get { return result.XxnnCount; } - } - public float GetXxnn(int index) { - return result.GetXxnn(index); - } - public Builder SetXxnn(int index, float value) { - result.xxnn_[index] = value; - return this; - } - public Builder AddXxnn(float value) { - result.xxnn_.Add(value); - return this; - } - public Builder AddRangeXxnn(scg::IEnumerable values) { - base.AddRange(values, result.xxnn_); - return this; - } - public Builder ClearXxnn() { - result.xxnn_.Clear(); - return this; - } - - public bool HasXxfr { - get { return result.HasXxfr; } - } - public float Xxfr { - get { return result.Xxfr; } - set { SetXxfr(value); } - } - public Builder SetXxfr(float value) { - result.hasXxfr = true; - result.xxfr_ = value; - return this; - } - public Builder ClearXxfr() { - result.hasXxfr = false; - result.xxfr_ = 0F; - return this; - } - - public pbc::IPopsicleList NList { - get { return result.n_; } - } - public int NCount { - get { return result.NCount; } - } - public float GetN(int index) { - return result.GetN(index); - } - public Builder SetN(int index, float value) { - result.n_[index] = value; - return this; - } - public Builder AddN(float value) { - result.n_.Add(value); - return this; - } - public Builder AddRangeN(scg::IEnumerable values) { - base.AddRange(values, result.n_); - return this; - } - public Builder ClearN() { - result.n_.Clear(); - return this; - } - - public pbc::IPopsicleList V2FList { - get { return result.v2F_; } - } - public int V2FCount { - get { return result.V2FCount; } - } - public float GetV2F(int index) { - return result.GetV2F(index); - } - public Builder SetV2F(int index, float value) { - result.v2F_[index] = value; - return this; - } - public Builder AddV2F(float value) { - result.v2F_.Add(value); - return this; - } - public Builder AddRangeV2F(scg::IEnumerable values) { - base.AddRange(values, result.v2F_); - return this; - } - public Builder ClearV2F() { - result.v2F_.Clear(); - return this; - } - - public pbc::IPopsicleList V2DList { - get { return result.v2D_; } - } - public int V2DCount { - get { return result.V2DCount; } - } - public double GetV2D(int index) { - return result.GetV2D(index); - } - public Builder SetV2D(int index, double value) { - result.v2D_[index] = value; - return this; - } - public Builder AddV2D(double value) { - result.v2D_.Add(value); - return this; - } - public Builder AddRangeV2D(scg::IEnumerable values) { - base.AddRange(values, result.v2D_); - return this; - } - public Builder ClearV2D() { - result.v2D_.Clear(); - return this; - } - - public pbc::IPopsicleList V3FList { - get { return result.v3F_; } - } - public int V3FCount { - get { return result.V3FCount; } - } - public float GetV3F(int index) { - return result.GetV3F(index); - } - public Builder SetV3F(int index, float value) { - result.v3F_[index] = value; - return this; - } - public Builder AddV3F(float value) { - result.v3F_.Add(value); - return this; - } - public Builder AddRangeV3F(scg::IEnumerable values) { - base.AddRange(values, result.v3F_); - return this; - } - public Builder ClearV3F() { - result.v3F_.Clear(); - return this; - } - - public pbc::IPopsicleList V3DList { - get { return result.v3D_; } - } - public int V3DCount { - get { return result.V3DCount; } - } - public double GetV3D(int index) { - return result.GetV3D(index); - } - public Builder SetV3D(int index, double value) { - result.v3D_[index] = value; - return this; - } - public Builder AddV3D(double value) { - result.v3D_.Add(value); - return this; - } - public Builder AddRangeV3D(scg::IEnumerable values) { - base.AddRange(values, result.v3D_); - return this; - } - public Builder ClearV3D() { - result.v3D_.Clear(); - return this; - } - - public pbc::IPopsicleList V4FList { - get { return result.v4F_; } - } - public int V4FCount { - get { return result.V4FCount; } - } - public float GetV4F(int index) { - return result.GetV4F(index); - } - public Builder SetV4F(int index, float value) { - result.v4F_[index] = value; - return this; - } - public Builder AddV4F(float value) { - result.v4F_.Add(value); - return this; - } - public Builder AddRangeV4F(scg::IEnumerable values) { - base.AddRange(values, result.v4F_); - return this; - } - public Builder ClearV4F() { - result.v4F_.Clear(); - return this; - } - - public pbc::IPopsicleList V4DList { - get { return result.v4D_; } - } - public int V4DCount { - get { return result.V4DCount; } - } - public double GetV4D(int index) { - return result.GetV4D(index); - } - public Builder SetV4D(int index, double value) { - result.v4D_[index] = value; - return this; - } - public Builder AddV4D(double value) { - result.v4D_.Add(value); - return this; - } - public Builder AddRangeV4D(scg::IEnumerable values) { - base.AddRange(values, result.v4D_); - return this; - } - public Builder ClearV4D() { - result.v4D_.Clear(); - return this; - } - - public pbc::IPopsicleList QList { - get { return result.q_; } - } - public int QCount { - get { return result.QCount; } - } - public float GetQ(int index) { - return result.GetQ(index); - } - public Builder SetQ(int index, float value) { - result.q_[index] = value; - return this; - } - public Builder AddQ(float value) { - result.q_.Add(value); - return this; - } - public Builder AddRangeQ(scg::IEnumerable values) { - base.AddRange(values, result.q_); - return this; - } - public Builder ClearQ() { - result.q_.Clear(); - return this; - } - - public bool HasU { - get { return result.HasU; } - } - public pb::ByteString U { - get { return result.U; } - set { SetU(value); } - } - public Builder SetU(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasU = true; - result.u_ = value; - return this; - } - public Builder ClearU() { - result.hasU = false; - result.u_ = pb::ByteString.Empty; - return this; - } - - public bool HasA { - get { return result.HasA; } - } - public float A { - get { return result.A; } - set { SetA(value); } - } - public Builder SetA(float value) { - result.hasA = true; - result.a_ = value; - return this; - } - public Builder ClearA() { - result.hasA = false; - result.a_ = 0F; - return this; - } - - public bool HasT { - get { return result.HasT; } - } - [global::System.CLSCompliant(false)] - public ulong T { - get { return result.T; } - set { SetT(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetT(ulong value) { - result.hasT = true; - result.t_ = value; - return this; - } - public Builder ClearT() { - result.hasT = false; - result.t_ = 0; - return this; - } - - public bool HasD { - get { return result.HasD; } - } - public long D { - get { return result.D; } - set { SetD(value); } - } - public Builder SetD(long value) { - result.hasD = true; - result.d_ = value; - return this; - } - public Builder ClearD() { - result.hasD = false; - result.d_ = 0; - return this; - } - - public bool HasF32 { - get { return result.HasF32; } - } - [global::System.CLSCompliant(false)] - public uint F32 { - get { return result.F32; } - set { SetF32(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetF32(uint value) { - result.hasF32 = true; - result.f32_ = value; - return this; - } - public Builder ClearF32() { - result.hasF32 = false; - result.f32_ = 0; - return this; - } - - public bool HasF64 { - get { return result.HasF64; } - } - [global::System.CLSCompliant(false)] - public ulong F64 { - get { return result.F64; } - set { SetF64(value); } - } - [global::System.CLSCompliant(false)] - public Builder SetF64(ulong value) { - result.hasF64 = true; - result.f64_ = value; - return this; - } - public Builder ClearF64() { - result.hasF64 = false; - result.f64_ = 0UL; - return this; - } - - public pbc::IPopsicleList BsfList { - get { return result.bsf_; } - } - public int BsfCount { - get { return result.BsfCount; } - } - public float GetBsf(int index) { - return result.GetBsf(index); - } - public Builder SetBsf(int index, float value) { - result.bsf_[index] = value; - return this; - } - public Builder AddBsf(float value) { - result.bsf_.Add(value); - return this; - } - public Builder AddRangeBsf(scg::IEnumerable values) { - base.AddRange(values, result.bsf_); - return this; - } - public Builder ClearBsf() { - result.bsf_.Clear(); - return this; - } - - public pbc::IPopsicleList BsdList { - get { return result.bsd_; } - } - public int BsdCount { - get { return result.BsdCount; } - } - public double GetBsd(int index) { - return result.GetBsd(index); - } - public Builder SetBsd(int index, double value) { - result.bsd_[index] = value; - return this; - } - public Builder AddBsd(double value) { - result.bsd_.Add(value); - return this; - } - public Builder AddRangeBsd(scg::IEnumerable values) { - base.AddRange(values, result.bsd_); - return this; - } - public Builder ClearBsd() { - result.bsd_.Clear(); - return this; - } - - public pbc::IPopsicleList BbfList { - get { return result.bbf_; } - } - public int BbfCount { - get { return result.BbfCount; } - } - public float GetBbf(int index) { - return result.GetBbf(index); - } - public Builder SetBbf(int index, float value) { - result.bbf_[index] = value; - return this; - } - public Builder AddBbf(float value) { - result.bbf_.Add(value); - return this; - } - public Builder AddRangeBbf(scg::IEnumerable values) { - base.AddRange(values, result.bbf_); - return this; - } - public Builder ClearBbf() { - result.bbf_.Clear(); - return this; - } - - public pbc::IPopsicleList BbdList { - get { return result.bbd_; } - } - public int BbdCount { - get { return result.BbdCount; } - } - public double GetBbd(int index) { - return result.GetBbd(index); - } - public Builder SetBbd(int index, double value) { - result.bbd_[index] = value; - return this; - } - public Builder AddBbd(double value) { - result.bbd_.Add(value); - return this; - } - public Builder AddRangeBbd(scg::IEnumerable values) { - base.AddRange(values, result.bbd_); - return this; - } - public Builder ClearBbd() { - result.bbd_.Clear(); - return this; - } - - public bool HasE32 { - get { return result.HasE32; } - } - public global::Sirikata.PB._PBJ_Internal.TestMessage.Types.Enum32 E32 { - get { return result.E32; } - set { SetE32(value); } - } - public Builder SetE32(global::Sirikata.PB._PBJ_Internal.TestMessage.Types.Enum32 value) { - result.hasE32 = true; - result.e32_ = value; - return this; - } - public Builder ClearE32() { - result.hasE32 = false; - result.e32_ = global::Sirikata.PB._PBJ_Internal.TestMessage.Types.Enum32.UNIVERSAL1; - return this; - } - - public bool HasSubmes { - get { return result.HasSubmes; } - } - public global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage Submes { - get { return result.Submes; } - set { SetSubmes(value); } - } - public Builder SetSubmes(global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasSubmes = true; - result.submes_ = value; - return this; - } - public Builder SetSubmes(global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.hasSubmes = true; - result.submes_ = builderForValue.Build(); - return this; - } - public Builder MergeSubmes(global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - if (result.HasSubmes && - result.submes_ != global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.DefaultInstance) { - result.submes_ = global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.CreateBuilder(result.submes_).MergeFrom(value).BuildPartial(); - } else { - result.submes_ = value; - } - result.hasSubmes = true; - return this; - } - public Builder ClearSubmes() { - result.hasSubmes = false; - result.submes_ = global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.DefaultInstance; - return this; - } - - public pbc::IPopsicleList SubmessersList { - get { return result.submessers_; } - } - public int SubmessersCount { - get { return result.SubmessersCount; } - } - public global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage GetSubmessers(int index) { - return result.GetSubmessers(index); - } - public Builder SetSubmessers(int index, global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.submessers_[index] = value; - return this; - } - public Builder SetSubmessers(int index, global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.submessers_[index] = builderForValue.Build(); - return this; - } - public Builder AddSubmessers(global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.submessers_.Add(value); - return this; - } - public Builder AddSubmessers(global::Sirikata.PB._PBJ_Internal.TestMessage.Types.SubMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.submessers_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeSubmessers(scg::IEnumerable values) { - base.AddRange(values, result.submessers_); - return this; - } - public Builder ClearSubmessers() { - result.submessers_.Clear(); - return this; - } - - public bool HasSha { - get { return result.HasSha; } - } - public pb::ByteString Sha { - get { return result.Sha; } - set { SetSha(value); } - } - public Builder SetSha(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasSha = true; - result.sha_ = value; - return this; - } - public Builder ClearSha() { - result.hasSha = false; - result.sha_ = pb::ByteString.Empty; - return this; - } - - public pbc::IPopsicleList ShasList { - get { return result.shas_; } - } - public int ShasCount { - get { return result.ShasCount; } - } - public pb::ByteString GetShas(int index) { - return result.GetShas(index); - } - public Builder SetShas(int index, pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.shas_[index] = value; - return this; - } - public Builder AddShas(pb::ByteString value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.shas_.Add(value); - return this; - } - public Builder AddRangeShas(scg::IEnumerable values) { - base.AddRange(values, result.shas_); - return this; - } - public Builder ClearShas() { - result.shas_.Clear(); - return this; - } - - public bool HasExtmes { - get { return result.HasExtmes; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage Extmes { - get { return result.Extmes; } - set { SetExtmes(value); } - } - public Builder SetExtmes(global::Sirikata.PB._PBJ_Internal.ExternalMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasExtmes = true; - result.extmes_ = value; - return this; - } - public Builder SetExtmes(global::Sirikata.PB._PBJ_Internal.ExternalMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.hasExtmes = true; - result.extmes_ = builderForValue.Build(); - return this; - } - public Builder MergeExtmes(global::Sirikata.PB._PBJ_Internal.ExternalMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - if (result.HasExtmes && - result.extmes_ != global::Sirikata.PB._PBJ_Internal.ExternalMessage.DefaultInstance) { - result.extmes_ = global::Sirikata.PB._PBJ_Internal.ExternalMessage.CreateBuilder(result.extmes_).MergeFrom(value).BuildPartial(); - } else { - result.extmes_ = value; - } - result.hasExtmes = true; - return this; - } - public Builder ClearExtmes() { - result.hasExtmes = false; - result.extmes_ = global::Sirikata.PB._PBJ_Internal.ExternalMessage.DefaultInstance; - return this; - } - - public pbc::IPopsicleList ExtmessersList { - get { return result.extmessers_; } - } - public int ExtmessersCount { - get { return result.ExtmessersCount; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage GetExtmessers(int index) { - return result.GetExtmessers(index); - } - public Builder SetExtmessers(int index, global::Sirikata.PB._PBJ_Internal.ExternalMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.extmessers_[index] = value; - return this; - } - public Builder SetExtmessers(int index, global::Sirikata.PB._PBJ_Internal.ExternalMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.extmessers_[index] = builderForValue.Build(); - return this; - } - public Builder AddExtmessers(global::Sirikata.PB._PBJ_Internal.ExternalMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.extmessers_.Add(value); - return this; - } - public Builder AddExtmessers(global::Sirikata.PB._PBJ_Internal.ExternalMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.extmessers_.Add(builderForValue.Build()); - return this; - } - public Builder AddRangeExtmessers(scg::IEnumerable values) { - base.AddRange(values, result.extmessers_); - return this; - } - public Builder ClearExtmessers() { - result.extmessers_.Clear(); - return this; - } - - public bool HasExtmesser { - get { return result.HasExtmesser; } - } - public global::Sirikata.PB._PBJ_Internal.ExternalMessage Extmesser { - get { return result.Extmesser; } - set { SetExtmesser(value); } - } - public Builder SetExtmesser(global::Sirikata.PB._PBJ_Internal.ExternalMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - result.hasExtmesser = true; - result.extmesser_ = value; - return this; - } - public Builder SetExtmesser(global::Sirikata.PB._PBJ_Internal.ExternalMessage.Builder builderForValue) { - pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); - result.hasExtmesser = true; - result.extmesser_ = builderForValue.Build(); - return this; - } - public Builder MergeExtmesser(global::Sirikata.PB._PBJ_Internal.ExternalMessage value) { - pb::ThrowHelper.ThrowIfNull(value, "value"); - if (result.HasExtmesser && - result.extmesser_ != global::Sirikata.PB._PBJ_Internal.ExternalMessage.DefaultInstance) { - result.extmesser_ = global::Sirikata.PB._PBJ_Internal.ExternalMessage.CreateBuilder(result.extmesser_).MergeFrom(value).BuildPartial(); - } else { - result.extmesser_ = value; - } - result.hasExtmesser = true; - return this; - } - public Builder ClearExtmesser() { - result.hasExtmesser = false; - result.extmesser_ = global::Sirikata.PB._PBJ_Internal.ExternalMessage.DefaultInstance; - return this; - } - } - static TestMessage() { - object.ReferenceEquals(global::Sirikata.PB._PBJ_Internal.Test.Descriptor, null); - } - } - - #endregion - -} diff --git a/OpenSim/Client/Sirikata/Protocol/Test.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Test.pbj.cs deleted file mode 100644 index bcd02fa3d5..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Test.pbj.cs +++ /dev/null @@ -1,1761 +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.PB { - public class ExternalMessage : PBJ.IMessage { - protected _PBJ_Internal.ExternalMessage super; - public _PBJ_Internal.ExternalMessage _PBJSuper{ get { return super;} } - public ExternalMessage() { - super=new _PBJ_Internal.ExternalMessage(); - } - public ExternalMessage(_PBJ_Internal.ExternalMessage reference) { - super=reference; - } - public static ExternalMessage defaultInstance= new ExternalMessage (_PBJ_Internal.ExternalMessage.DefaultInstance); - public static ExternalMessage DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.ExternalMessage.Descriptor; } } - public static class Types { - public class SubMessage : PBJ.IMessage { - protected _PBJ_Internal.ExternalMessage.Types.SubMessage super; - public _PBJ_Internal.ExternalMessage.Types.SubMessage _PBJSuper{ get { return super;} } - public SubMessage() { - super=new _PBJ_Internal.ExternalMessage.Types.SubMessage(); - } - public SubMessage(_PBJ_Internal.ExternalMessage.Types.SubMessage reference) { - super=reference; - } - public static SubMessage defaultInstance= new SubMessage (_PBJ_Internal.ExternalMessage.Types.SubMessage.DefaultInstance); - public static SubMessage DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.ExternalMessage.Types.SubMessage.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 SubuuidFieldTag=1; - public bool HasSubuuid{ get {return super.HasSubuuid&&PBJ._PBJ.ValidateUuid(super.Subuuid);} } - public PBJ.UUID Subuuid{ get { - if (HasSubuuid) { - return PBJ._PBJ.CastUuid(super.Subuuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int SubvectorFieldTag=2; - public bool HasSubvector{ get {return super.SubvectorCount>=3;} } - public PBJ.Vector3d Subvector{ get { - int index=0; - if (HasSubvector) { - return PBJ._PBJ.CastVector3d(super.GetSubvector(index*3+0),super.GetSubvector(index*3+1),super.GetSubvector(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - } - public const int SubdurationFieldTag=3; - public bool HasSubduration{ get {return super.HasSubduration&&PBJ._PBJ.ValidateDuration(super.Subduration);} } - public PBJ.Duration Subduration{ get { - if (HasSubduration) { - return PBJ._PBJ.CastDuration(super.Subduration); - } else { - return PBJ._PBJ.CastDuration(); - } - } - } - public const int SubnormalFieldTag=4; - public bool HasSubnormal{ get {return super.SubnormalCount>=2;} } - public PBJ.Vector3f Subnormal{ get { - int index=0; - if (HasSubnormal) { - return PBJ._PBJ.CastNormal(super.GetSubnormal(index*2+0),super.GetSubnormal(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - } - 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(SubMessage prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static SubMessage ParseFrom(pb::ByteString data) { - return new SubMessage(_PBJ_Internal.ExternalMessage.Types.SubMessage.ParseFrom(data)); - } - public static SubMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new SubMessage(_PBJ_Internal.ExternalMessage.Types.SubMessage.ParseFrom(data,er)); - } - public static SubMessage ParseFrom(byte[] data) { - return new SubMessage(_PBJ_Internal.ExternalMessage.Types.SubMessage.ParseFrom(data)); - } - public static SubMessage ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new SubMessage(_PBJ_Internal.ExternalMessage.Types.SubMessage.ParseFrom(data,er)); - } - public static SubMessage ParseFrom(global::System.IO.Stream data) { - return new SubMessage(_PBJ_Internal.ExternalMessage.Types.SubMessage.ParseFrom(data)); - } - public static SubMessage ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new SubMessage(_PBJ_Internal.ExternalMessage.Types.SubMessage.ParseFrom(data,er)); - } - public static SubMessage ParseFrom(pb::CodedInputStream data) { - return new SubMessage(_PBJ_Internal.ExternalMessage.Types.SubMessage.ParseFrom(data)); - } - public static SubMessage ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new SubMessage(_PBJ_Internal.ExternalMessage.Types.SubMessage.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.ExternalMessage.Types.SubMessage.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.ExternalMessage.Types.SubMessage.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.ExternalMessage.Types.SubMessage.Builder();} - public Builder(_PBJ_Internal.ExternalMessage.Types.SubMessage.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(SubMessage prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public SubMessage BuildPartial() {return new SubMessage(super.BuildPartial());} - public SubMessage Build() {if (_HasAllPBJFields) return new SubMessage(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return SubMessage.Descriptor; } } - public Builder ClearSubuuid() { super.ClearSubuuid();return this;} - public const int SubuuidFieldTag=1; - public bool HasSubuuid{ get {return super.HasSubuuid&&PBJ._PBJ.ValidateUuid(super.Subuuid);} } - public PBJ.UUID Subuuid{ get { - if (HasSubuuid) { - return PBJ._PBJ.CastUuid(super.Subuuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.Subuuid=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearSubvector() { super.ClearSubvector();return this;} - public const int SubvectorFieldTag=2; - public bool HasSubvector{ get {return super.SubvectorCount>=3;} } - public PBJ.Vector3d Subvector{ get { - int index=0; - if (HasSubvector) { - return PBJ._PBJ.CastVector3d(super.GetSubvector(index*3+0),super.GetSubvector(index*3+1),super.GetSubvector(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - set { - super.ClearSubvector(); - double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value); - super.AddSubvector(_PBJtempArray[0]); - super.AddSubvector(_PBJtempArray[1]); - super.AddSubvector(_PBJtempArray[2]); - } - } - public Builder ClearSubduration() { super.ClearSubduration();return this;} - public const int SubdurationFieldTag=3; - public bool HasSubduration{ get {return super.HasSubduration&&PBJ._PBJ.ValidateDuration(super.Subduration);} } - public PBJ.Duration Subduration{ get { - if (HasSubduration) { - return PBJ._PBJ.CastDuration(super.Subduration); - } else { - return PBJ._PBJ.CastDuration(); - } - } - set { - super.Subduration=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearSubnormal() { super.ClearSubnormal();return this;} - public const int SubnormalFieldTag=4; - public bool HasSubnormal{ get {return super.SubnormalCount>=2;} } - public PBJ.Vector3f Subnormal{ get { - int index=0; - if (HasSubnormal) { - return PBJ._PBJ.CastNormal(super.GetSubnormal(index*2+0),super.GetSubnormal(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - set { - super.ClearSubnormal(); - float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value); - super.AddSubnormal(_PBJtempArray[0]); - super.AddSubnormal(_PBJtempArray[1]); - } - } - } - } - } - public static bool WithinReservedFieldTagRange(int field_tag) { - return false; - } - public static bool WithinExtensionFieldTagRange(int field_tag) { - return false; - } - public const int IsTrueFieldTag=40; - public bool HasIsTrue{ get {return super.HasIsTrue&&PBJ._PBJ.ValidateBool(super.IsTrue);} } - public bool IsTrue{ get { - if (HasIsTrue) { - return PBJ._PBJ.CastBool(super.IsTrue); - } else { - return true; - } - } - } - public const int V2FFieldTag=2; - public bool HasV2F{ get {return super.V2FCount>=2;} } - public PBJ.Vector2f V2F{ get { - int index=0; - if (HasV2F) { - return PBJ._PBJ.CastVector2f(super.GetV2F(index*2+0),super.GetV2F(index*2+1)); - } else { - return PBJ._PBJ.CastVector2f(); - } - } - } - public const int SubMesFieldTag=30; - public bool HasSubMes{ get {return super.HasSubMes;} } - public Types.SubMessage SubMes{ get { - if (HasSubMes) { - return new Types.SubMessage(super.SubMes); - } else { - return new Types.SubMessage(); - } - } - } - public const int SubmessersFieldTag=31; - public int SubmessersCount { get { return super.SubmessersCount;} } - public bool HasSubmessers(int index) {return true;} - public Types.SubMessage Submessers(int index) { - return new Types.SubMessage(super.GetSubmessers(index)); - } - public const int ShaFieldTag=32; - public bool HasSha{ get {return super.HasSha&&PBJ._PBJ.ValidateSha256(super.Sha);} } - public PBJ.SHA256 Sha{ get { - if (HasSha) { - return PBJ._PBJ.CastSha256(super.Sha); - } else { - return PBJ._PBJ.CastSha256(); - } - } - } - public const int ShasFieldTag=33; - public int ShasCount { get { return super.ShasCount;} } - public bool HasShas(int index) {return PBJ._PBJ.ValidateSha256(super.GetShas(index));} - public PBJ.SHA256 Shas(int index) { - return (PBJ.SHA256)PBJ._PBJ.CastSha256(super.GetShas(index)); - } - public const int V3FFieldTag=4; - public bool HasV3F{ get {return super.V3FCount>=3;} } - public PBJ.Vector3f V3F{ get { - int index=0; - if (HasV3F) { - return PBJ._PBJ.CastVector3f(super.GetV3F(index*3+0),super.GetV3F(index*3+1),super.GetV3F(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int V3FfFieldTag=5; - public int V3FfCount { get { return super.V3FfCount/3;} } - public bool HasV3Ff(int index) { return true; } - public PBJ.Vector3f GetV3Ff(int index) { - if (HasV3Ff(index)) { - return PBJ._PBJ.CastVector3f(super.GetV3Ff(index*3+0),super.GetV3Ff(index*3+1),super.GetV3Ff(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - 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(ExternalMessage prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static ExternalMessage ParseFrom(pb::ByteString data) { - return new ExternalMessage(_PBJ_Internal.ExternalMessage.ParseFrom(data)); - } - public static ExternalMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new ExternalMessage(_PBJ_Internal.ExternalMessage.ParseFrom(data,er)); - } - public static ExternalMessage ParseFrom(byte[] data) { - return new ExternalMessage(_PBJ_Internal.ExternalMessage.ParseFrom(data)); - } - public static ExternalMessage ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new ExternalMessage(_PBJ_Internal.ExternalMessage.ParseFrom(data,er)); - } - public static ExternalMessage ParseFrom(global::System.IO.Stream data) { - return new ExternalMessage(_PBJ_Internal.ExternalMessage.ParseFrom(data)); - } - public static ExternalMessage ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new ExternalMessage(_PBJ_Internal.ExternalMessage.ParseFrom(data,er)); - } - public static ExternalMessage ParseFrom(pb::CodedInputStream data) { - return new ExternalMessage(_PBJ_Internal.ExternalMessage.ParseFrom(data)); - } - public static ExternalMessage ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new ExternalMessage(_PBJ_Internal.ExternalMessage.ParseFrom(data,er)); - } - protected override bool _HasAllPBJFields{ get { - return true - &&HasV3F - ; - } } - public bool IsInitialized { get { - return super.IsInitialized&&_HasAllPBJFields; - } } - public class Builder : global::PBJ.IMessage.IBuilder{ - protected override bool _HasAllPBJFields{ get { - return true - &&HasV3F - ; - } } - public bool IsInitialized { get { - return super.IsInitialized&&_HasAllPBJFields; - } } - protected _PBJ_Internal.ExternalMessage.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.ExternalMessage.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.ExternalMessage.Builder();} - public Builder(_PBJ_Internal.ExternalMessage.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(ExternalMessage prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public ExternalMessage BuildPartial() {return new ExternalMessage(super.BuildPartial());} - public ExternalMessage Build() {if (_HasAllPBJFields) return new ExternalMessage(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return ExternalMessage.Descriptor; } } - public Builder ClearIsTrue() { super.ClearIsTrue();return this;} - public const int IsTrueFieldTag=40; - public bool HasIsTrue{ get {return super.HasIsTrue&&PBJ._PBJ.ValidateBool(super.IsTrue);} } - public bool IsTrue{ get { - if (HasIsTrue) { - return PBJ._PBJ.CastBool(super.IsTrue); - } else { - return true; - } - } - set { - super.IsTrue=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearV2F() { super.ClearV2F();return this;} - public const int V2FFieldTag=2; - public bool HasV2F{ get {return super.V2FCount>=2;} } - public PBJ.Vector2f V2F{ get { - int index=0; - if (HasV2F) { - return PBJ._PBJ.CastVector2f(super.GetV2F(index*2+0),super.GetV2F(index*2+1)); - } else { - return PBJ._PBJ.CastVector2f(); - } - } - set { - super.ClearV2F(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector2f(value); - super.AddV2F(_PBJtempArray[0]); - super.AddV2F(_PBJtempArray[1]); - } - } - public Builder ClearSubMes() { super.ClearSubMes();return this;} - public const int SubMesFieldTag=30; - public bool HasSubMes{ get {return super.HasSubMes;} } - public Types.SubMessage SubMes{ get { - if (HasSubMes) { - return new Types.SubMessage(super.SubMes); - } else { - return new Types.SubMessage(); - } - } - set { - super.SubMes=value._PBJSuper; - } - } - public Builder ClearSubmessers() { super.ClearSubmessers();return this;} - public Builder SetSubmessers(int index,Types.SubMessage value) { - super.SetSubmessers(index,value._PBJSuper); - return this; - } - public const int SubmessersFieldTag=31; - public int SubmessersCount { get { return super.SubmessersCount;} } - public bool HasSubmessers(int index) {return true;} - public Types.SubMessage Submessers(int index) { - return new Types.SubMessage(super.GetSubmessers(index)); - } - public Builder AddSubmessers(Types.SubMessage value) { - super.AddSubmessers(value._PBJSuper); - return this; - } - public Builder ClearSha() { super.ClearSha();return this;} - public const int ShaFieldTag=32; - public bool HasSha{ get {return super.HasSha&&PBJ._PBJ.ValidateSha256(super.Sha);} } - public PBJ.SHA256 Sha{ get { - if (HasSha) { - return PBJ._PBJ.CastSha256(super.Sha); - } else { - return PBJ._PBJ.CastSha256(); - } - } - set { - super.Sha=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearShas() { super.ClearShas();return this;} - public Builder SetShas(int index, PBJ.SHA256 value) { - super.SetShas(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int ShasFieldTag=33; - public int ShasCount { get { return super.ShasCount;} } - public bool HasShas(int index) {return PBJ._PBJ.ValidateSha256(super.GetShas(index));} - public PBJ.SHA256 Shas(int index) { - return (PBJ.SHA256)PBJ._PBJ.CastSha256(super.GetShas(index)); - } - public Builder AddShas(PBJ.SHA256 value) { - super.AddShas(PBJ._PBJ.Construct(value)); - return this; - } - public Builder ClearV3F() { super.ClearV3F();return this;} - public const int V3FFieldTag=4; - public bool HasV3F{ get {return super.V3FCount>=3;} } - public PBJ.Vector3f V3F{ get { - int index=0; - if (HasV3F) { - return PBJ._PBJ.CastVector3f(super.GetV3F(index*3+0),super.GetV3F(index*3+1),super.GetV3F(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearV3F(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddV3F(_PBJtempArray[0]); - super.AddV3F(_PBJtempArray[1]); - super.AddV3F(_PBJtempArray[2]); - } - } - public Builder ClearV3Ff() { super.ClearV3Ff();return this;} - public const int V3FfFieldTag=5; - public int V3FfCount { get { return super.V3FfCount/3;} } - public bool HasV3Ff(int index) { return true; } - public PBJ.Vector3f GetV3Ff(int index) { - if (HasV3Ff(index)) { - return PBJ._PBJ.CastVector3f(super.GetV3Ff(index*3+0),super.GetV3Ff(index*3+1),super.GetV3Ff(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - public Builder AddV3Ff(PBJ.Vector3f value) { - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddV3Ff(_PBJtempArray[0]); - super.AddV3Ff(_PBJtempArray[1]); - super.AddV3Ff(_PBJtempArray[2]); - return this; - } - public Builder SetV3Ff(int index,PBJ.Vector3f value) { - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.SetV3Ff(index*3+0,_PBJtempArray[0]); - super.SetV3Ff(index*3+1,_PBJtempArray[1]); - super.SetV3Ff(index*3+2,_PBJtempArray[2]); - return this; - } - } - } -} -namespace Sirikata.PB { - public class TestMessage : PBJ.IMessage { - protected _PBJ_Internal.TestMessage super; - public _PBJ_Internal.TestMessage _PBJSuper{ get { return super;} } - public TestMessage() { - super=new _PBJ_Internal.TestMessage(); - } - public TestMessage(_PBJ_Internal.TestMessage reference) { - super=reference; - } - public static TestMessage defaultInstance= new TestMessage (_PBJ_Internal.TestMessage.DefaultInstance); - public static TestMessage DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.TestMessage.Descriptor; } } - public static class Types { - public enum Flagsf32 { - UNIVERSA=_PBJ_Internal.TestMessage.Types.Flagsf32.UNIVERSA, - WE=_PBJ_Internal.TestMessage.Types.Flagsf32.WE, - IMAGE=_PBJ_Internal.TestMessage.Types.Flagsf32.IMAGE, - LOCA=_PBJ_Internal.TestMessage.Types.Flagsf32.LOCA - }; - public enum Flagsf64 { - UNIVERSAL=_PBJ_Internal.TestMessage.Types.Flagsf64.UNIVERSAL, - WEB=_PBJ_Internal.TestMessage.Types.Flagsf64.WEB, - IMAGES=_PBJ_Internal.TestMessage.Types.Flagsf64.IMAGES, - LOCAL=_PBJ_Internal.TestMessage.Types.Flagsf64.LOCAL - }; - public enum Enum32 { - UNIVERSAL1=_PBJ_Internal.TestMessage.Types.Enum32.UNIVERSAL1, - WEB1=_PBJ_Internal.TestMessage.Types.Enum32.WEB1, - IMAGES1=_PBJ_Internal.TestMessage.Types.Enum32.IMAGES1, - LOCAL1=_PBJ_Internal.TestMessage.Types.Enum32.LOCAL1 - }; - public class SubMessage : PBJ.IMessage { - protected _PBJ_Internal.TestMessage.Types.SubMessage super; - public _PBJ_Internal.TestMessage.Types.SubMessage _PBJSuper{ get { return super;} } - public SubMessage() { - super=new _PBJ_Internal.TestMessage.Types.SubMessage(); - } - public SubMessage(_PBJ_Internal.TestMessage.Types.SubMessage reference) { - super=reference; - } - public static SubMessage defaultInstance= new SubMessage (_PBJ_Internal.TestMessage.Types.SubMessage.DefaultInstance); - public static SubMessage DefaultInstance{ - get {return defaultInstance;} - } - public static pbd.MessageDescriptor Descriptor { - get { return _PBJ_Internal.TestMessage.Types.SubMessage.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 SubuuidFieldTag=1; - public bool HasSubuuid{ get {return super.HasSubuuid&&PBJ._PBJ.ValidateUuid(super.Subuuid);} } - public PBJ.UUID Subuuid{ get { - if (HasSubuuid) { - return PBJ._PBJ.CastUuid(super.Subuuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int SubvectorFieldTag=2; - public bool HasSubvector{ get {return super.SubvectorCount>=3;} } - public PBJ.Vector3d Subvector{ get { - int index=0; - if (HasSubvector) { - return PBJ._PBJ.CastVector3d(super.GetSubvector(index*3+0),super.GetSubvector(index*3+1),super.GetSubvector(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - } - public const int SubdurationFieldTag=3; - public bool HasSubduration{ get {return super.HasSubduration&&PBJ._PBJ.ValidateDuration(super.Subduration);} } - public PBJ.Duration Subduration{ get { - if (HasSubduration) { - return PBJ._PBJ.CastDuration(super.Subduration); - } else { - return PBJ._PBJ.CastDuration(); - } - } - } - public const int SubnormalFieldTag=4; - public bool HasSubnormal{ get {return super.SubnormalCount>=2;} } - public PBJ.Vector3f Subnormal{ get { - int index=0; - if (HasSubnormal) { - return PBJ._PBJ.CastNormal(super.GetSubnormal(index*2+0),super.GetSubnormal(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - } - 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(SubMessage prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static SubMessage ParseFrom(pb::ByteString data) { - return new SubMessage(_PBJ_Internal.TestMessage.Types.SubMessage.ParseFrom(data)); - } - public static SubMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new SubMessage(_PBJ_Internal.TestMessage.Types.SubMessage.ParseFrom(data,er)); - } - public static SubMessage ParseFrom(byte[] data) { - return new SubMessage(_PBJ_Internal.TestMessage.Types.SubMessage.ParseFrom(data)); - } - public static SubMessage ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new SubMessage(_PBJ_Internal.TestMessage.Types.SubMessage.ParseFrom(data,er)); - } - public static SubMessage ParseFrom(global::System.IO.Stream data) { - return new SubMessage(_PBJ_Internal.TestMessage.Types.SubMessage.ParseFrom(data)); - } - public static SubMessage ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new SubMessage(_PBJ_Internal.TestMessage.Types.SubMessage.ParseFrom(data,er)); - } - public static SubMessage ParseFrom(pb::CodedInputStream data) { - return new SubMessage(_PBJ_Internal.TestMessage.Types.SubMessage.ParseFrom(data)); - } - public static SubMessage ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new SubMessage(_PBJ_Internal.TestMessage.Types.SubMessage.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.TestMessage.Types.SubMessage.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.TestMessage.Types.SubMessage.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.TestMessage.Types.SubMessage.Builder();} - public Builder(_PBJ_Internal.TestMessage.Types.SubMessage.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(SubMessage prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public SubMessage BuildPartial() {return new SubMessage(super.BuildPartial());} - public SubMessage Build() {if (_HasAllPBJFields) return new SubMessage(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return SubMessage.Descriptor; } } - public Builder ClearSubuuid() { super.ClearSubuuid();return this;} - public const int SubuuidFieldTag=1; - public bool HasSubuuid{ get {return super.HasSubuuid&&PBJ._PBJ.ValidateUuid(super.Subuuid);} } - public PBJ.UUID Subuuid{ get { - if (HasSubuuid) { - return PBJ._PBJ.CastUuid(super.Subuuid); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.Subuuid=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearSubvector() { super.ClearSubvector();return this;} - public const int SubvectorFieldTag=2; - public bool HasSubvector{ get {return super.SubvectorCount>=3;} } - public PBJ.Vector3d Subvector{ get { - int index=0; - if (HasSubvector) { - return PBJ._PBJ.CastVector3d(super.GetSubvector(index*3+0),super.GetSubvector(index*3+1),super.GetSubvector(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - set { - super.ClearSubvector(); - double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value); - super.AddSubvector(_PBJtempArray[0]); - super.AddSubvector(_PBJtempArray[1]); - super.AddSubvector(_PBJtempArray[2]); - } - } - public Builder ClearSubduration() { super.ClearSubduration();return this;} - public const int SubdurationFieldTag=3; - public bool HasSubduration{ get {return super.HasSubduration&&PBJ._PBJ.ValidateDuration(super.Subduration);} } - public PBJ.Duration Subduration{ get { - if (HasSubduration) { - return PBJ._PBJ.CastDuration(super.Subduration); - } else { - return PBJ._PBJ.CastDuration(); - } - } - set { - super.Subduration=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearSubnormal() { super.ClearSubnormal();return this;} - public const int SubnormalFieldTag=4; - public bool HasSubnormal{ get {return super.SubnormalCount>=2;} } - public PBJ.Vector3f Subnormal{ get { - int index=0; - if (HasSubnormal) { - return PBJ._PBJ.CastNormal(super.GetSubnormal(index*2+0),super.GetSubnormal(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - set { - super.ClearSubnormal(); - float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value); - super.AddSubnormal(_PBJtempArray[0]); - super.AddSubnormal(_PBJtempArray[1]); - } - } - } - } - } - public static bool WithinReservedFieldTagRange(int field_tag) { - return false; - } - public static bool WithinExtensionFieldTagRange(int field_tag) { - return false||(field_tag>=100&&field_tag<=199); - } - public const int XxdFieldTag=20; - public bool HasXxd{ get {return super.HasXxd&&PBJ._PBJ.ValidateDouble(super.Xxd);} } - public double Xxd{ get { - if (HasXxd) { - return PBJ._PBJ.CastDouble(super.Xxd); - } else { - return 10.3; - } - } - } - public const int XxfFieldTag=21; - public bool HasXxf{ get {return super.HasXxf&&PBJ._PBJ.ValidateFloat(super.Xxf);} } - public float Xxf{ get { - if (HasXxf) { - return PBJ._PBJ.CastFloat(super.Xxf); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int Xxu32FieldTag=22; - public bool HasXxu32{ get {return super.HasXxu32&&PBJ._PBJ.ValidateUint32(super.Xxu32);} } - public uint Xxu32{ get { - if (HasXxu32) { - return PBJ._PBJ.CastUint32(super.Xxu32); - } else { - return PBJ._PBJ.CastUint32(); - } - } - } - public const int XxsFieldTag=23; - public bool HasXxs{ get {return super.HasXxs&&PBJ._PBJ.ValidateString(super.Xxs);} } - public string Xxs{ get { - if (HasXxs) { - return PBJ._PBJ.CastString(super.Xxs); - } else { - return PBJ._PBJ.CastString(); - } - } - } - public const int XxbFieldTag=24; - public bool HasXxb{ get {return super.HasXxb&&PBJ._PBJ.ValidateBytes(super.Xxb);} } - public pb::ByteString Xxb{ get { - if (HasXxb) { - return PBJ._PBJ.CastBytes(super.Xxb); - } else { - return PBJ._PBJ.CastBytes(); - } - } - } - public const int XxssFieldTag=25; - public int XxssCount { get { return super.XxssCount;} } - public bool HasXxss(int index) {return PBJ._PBJ.ValidateString(super.GetXxss(index));} - public string Xxss(int index) { - return (string)PBJ._PBJ.CastString(super.GetXxss(index)); - } - public const int XxbbFieldTag=26; - public int XxbbCount { get { return super.XxbbCount;} } - public bool HasXxbb(int index) {return PBJ._PBJ.ValidateBytes(super.GetXxbb(index));} - public pb::ByteString Xxbb(int index) { - return (pb::ByteString)PBJ._PBJ.CastBytes(super.GetXxbb(index)); - } - public const int XxffFieldTag=27; - public int XxffCount { get { return super.XxffCount;} } - public bool HasXxff(int index) {return PBJ._PBJ.ValidateFloat(super.GetXxff(index));} - public float Xxff(int index) { - return (float)PBJ._PBJ.CastFloat(super.GetXxff(index)); - } - public const int XxnnFieldTag=29; - public int XxnnCount { get { return super.XxnnCount/2;} } - public bool HasXxnn(int index) { return true; } - public PBJ.Vector3f GetXxnn(int index) { - if (HasXxnn(index)) { - return PBJ._PBJ.CastNormal(super.GetXxnn(index*2+0),super.GetXxnn(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - public const int XxfrFieldTag=28; - public bool HasXxfr{ get {return super.HasXxfr&&PBJ._PBJ.ValidateFloat(super.Xxfr);} } - public float Xxfr{ get { - if (HasXxfr) { - return PBJ._PBJ.CastFloat(super.Xxfr); - } else { - return PBJ._PBJ.CastFloat(); - } - } - } - public const int NFieldTag=1; - public bool HasN{ get {return super.NCount>=2;} } - public PBJ.Vector3f N{ get { - int index=0; - if (HasN) { - return PBJ._PBJ.CastNormal(super.GetN(index*2+0),super.GetN(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - } - public const int V2FFieldTag=2; - public bool HasV2F{ get {return super.V2FCount>=2;} } - public PBJ.Vector2f V2F{ get { - int index=0; - if (HasV2F) { - return PBJ._PBJ.CastVector2f(super.GetV2F(index*2+0),super.GetV2F(index*2+1)); - } else { - return PBJ._PBJ.CastVector2f(); - } - } - } - public const int V2DFieldTag=3; - public bool HasV2D{ get {return super.V2DCount>=2;} } - public PBJ.Vector2d V2D{ get { - int index=0; - if (HasV2D) { - return PBJ._PBJ.CastVector2d(super.GetV2D(index*2+0),super.GetV2D(index*2+1)); - } else { - return PBJ._PBJ.CastVector2d(); - } - } - } - public const int V3FFieldTag=4; - public bool HasV3F{ get {return super.V3FCount>=3;} } - public PBJ.Vector3f V3F{ get { - int index=0; - if (HasV3F) { - return PBJ._PBJ.CastVector3f(super.GetV3F(index*3+0),super.GetV3F(index*3+1),super.GetV3F(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - } - public const int V3DFieldTag=5; - public bool HasV3D{ get {return super.V3DCount>=3;} } - public PBJ.Vector3d V3D{ get { - int index=0; - if (HasV3D) { - return PBJ._PBJ.CastVector3d(super.GetV3D(index*3+0),super.GetV3D(index*3+1),super.GetV3D(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - } - public const int V4FFieldTag=6; - public bool HasV4F{ get {return super.V4FCount>=4;} } - public PBJ.Vector4f V4F{ get { - int index=0; - if (HasV4F) { - return PBJ._PBJ.CastVector4f(super.GetV4F(index*4+0),super.GetV4F(index*4+1),super.GetV4F(index*4+2),super.GetV4F(index*4+3)); - } else { - return PBJ._PBJ.CastVector4f(); - } - } - } - public const int V4DFieldTag=7; - public bool HasV4D{ get {return super.V4DCount>=4;} } - public PBJ.Vector4d V4D{ get { - int index=0; - if (HasV4D) { - return PBJ._PBJ.CastVector4d(super.GetV4D(index*4+0),super.GetV4D(index*4+1),super.GetV4D(index*4+2),super.GetV4D(index*4+3)); - } else { - return PBJ._PBJ.CastVector4d(); - } - } - } - public const int QFieldTag=8; - public bool HasQ{ get {return super.QCount>=3;} } - public PBJ.Quaternion Q{ get { - int index=0; - if (HasQ) { - return PBJ._PBJ.CastQuaternion(super.GetQ(index*3+0),super.GetQ(index*3+1),super.GetQ(index*3+2)); - } else { - return PBJ._PBJ.CastQuaternion(); - } - } - } - public const int UFieldTag=9; - public bool HasU{ get {return super.HasU&&PBJ._PBJ.ValidateUuid(super.U);} } - public PBJ.UUID U{ get { - if (HasU) { - return PBJ._PBJ.CastUuid(super.U); - } else { - return PBJ._PBJ.CastUuid(); - } - } - } - public const int AFieldTag=10; - public bool HasA{ get {return super.HasA&&PBJ._PBJ.ValidateAngle(super.A);} } - public float A{ get { - if (HasA) { - return PBJ._PBJ.CastAngle(super.A); - } else { - return PBJ._PBJ.CastAngle(); - } - } - } - public const int TFieldTag=11; - public bool HasT{ get {return super.HasT&&PBJ._PBJ.ValidateTime(super.T);} } - public PBJ.Time T{ get { - if (HasT) { - return PBJ._PBJ.CastTime(super.T); - } else { - return PBJ._PBJ.CastTime(); - } - } - } - public const int DFieldTag=12; - public bool HasD{ get {return super.HasD&&PBJ._PBJ.ValidateDuration(super.D);} } - public PBJ.Duration D{ get { - if (HasD) { - return PBJ._PBJ.CastDuration(super.D); - } else { - return PBJ._PBJ.CastDuration(); - } - } - } - public const int F32FieldTag=13; - public bool HasF32 { get { - if (!super.HasF32) return false; - return PBJ._PBJ.ValidateFlags(super.F32,(ulong)Types.Flagsf32.UNIVERSA|(ulong)Types.Flagsf32.WE|(ulong)Types.Flagsf32.IMAGE|(ulong)Types.Flagsf32.LOCA); - } } - public uint F32{ get { - if (HasF32) { - return (uint)PBJ._PBJ.CastFlags(super.F32,(ulong)Types.Flagsf32.UNIVERSA|(ulong)Types.Flagsf32.WE|(ulong)Types.Flagsf32.IMAGE|(ulong)Types.Flagsf32.LOCA); - } else { - return (uint)PBJ._PBJ.CastFlags((ulong)Types.Flagsf32.UNIVERSA|(ulong)Types.Flagsf32.WE|(ulong)Types.Flagsf32.IMAGE|(ulong)Types.Flagsf32.LOCA); - } - } - } - public const int F64FieldTag=14; - public bool HasF64 { get { - if (!super.HasF64) return false; - return PBJ._PBJ.ValidateFlags(super.F64,(ulong)Types.Flagsf64.UNIVERSAL|(ulong)Types.Flagsf64.WEB|(ulong)Types.Flagsf64.IMAGES|(ulong)Types.Flagsf64.LOCAL); - } } - public ulong F64{ get { - if (HasF64) { - return (ulong)PBJ._PBJ.CastFlags(super.F64,(ulong)Types.Flagsf64.UNIVERSAL|(ulong)Types.Flagsf64.WEB|(ulong)Types.Flagsf64.IMAGES|(ulong)Types.Flagsf64.LOCAL); - } else { - return (ulong)PBJ._PBJ.CastFlags((ulong)Types.Flagsf64.UNIVERSAL|(ulong)Types.Flagsf64.WEB|(ulong)Types.Flagsf64.IMAGES|(ulong)Types.Flagsf64.LOCAL); - } - } - } - public const int BsfFieldTag=15; - public bool HasBsf{ get {return super.BsfCount>=4;} } - public PBJ.BoundingSphere3f Bsf{ get { - int index=0; - if (HasBsf) { - return PBJ._PBJ.CastBoundingsphere3f(super.GetBsf(index*4+0),super.GetBsf(index*4+1),super.GetBsf(index*4+2),super.GetBsf(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3f(); - } - } - } - public const int BsdFieldTag=16; - public bool HasBsd{ get {return super.BsdCount>=4;} } - public PBJ.BoundingSphere3d Bsd{ get { - int index=0; - if (HasBsd) { - return PBJ._PBJ.CastBoundingsphere3d(super.GetBsd(index*4+0),super.GetBsd(index*4+1),super.GetBsd(index*4+2),super.GetBsd(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3d(); - } - } - } - public const int BbfFieldTag=17; - public bool HasBbf{ get {return super.BbfCount>=6;} } - public PBJ.BoundingBox3f3f Bbf{ get { - int index=0; - if (HasBbf) { - return PBJ._PBJ.CastBoundingbox3f3f(super.GetBbf(index*6+0),super.GetBbf(index*6+1),super.GetBbf(index*6+2),super.GetBbf(index*6+3),super.GetBbf(index*6+4),super.GetBbf(index*6+5)); - } else { - return PBJ._PBJ.CastBoundingbox3f3f(); - } - } - } - public const int BbdFieldTag=18; - public bool HasBbd{ get {return super.BbdCount>=6;} } - public PBJ.BoundingBox3d3f Bbd{ get { - int index=0; - if (HasBbd) { - return PBJ._PBJ.CastBoundingbox3d3f(super.GetBbd(index*6+0),super.GetBbd(index*6+1),super.GetBbd(index*6+2),super.GetBbd(index*6+3),super.GetBbd(index*6+4),super.GetBbd(index*6+5)); - } else { - return PBJ._PBJ.CastBoundingbox3d3f(); - } - } - } - public const int E32FieldTag=19; - public bool HasE32{ get {return super.HasE32;} } - public Types.Enum32 E32{ get { - if (HasE32) { - return (Types.Enum32)super.E32; - } else { - return new Types.Enum32(); - } - } - } - public const int SubmesFieldTag=30; - public bool HasSubmes{ get {return super.HasSubmes;} } - public Types.SubMessage Submes{ get { - if (HasSubmes) { - return new Types.SubMessage(super.Submes); - } else { - return new Types.SubMessage(); - } - } - } - public const int SubmessersFieldTag=31; - public int SubmessersCount { get { return super.SubmessersCount;} } - public bool HasSubmessers(int index) {return true;} - public Types.SubMessage Submessers(int index) { - return new Types.SubMessage(super.GetSubmessers(index)); - } - public const int ShaFieldTag=32; - public bool HasSha{ get {return super.HasSha&&PBJ._PBJ.ValidateSha256(super.Sha);} } - public PBJ.SHA256 Sha{ get { - if (HasSha) { - return PBJ._PBJ.CastSha256(super.Sha); - } else { - return PBJ._PBJ.CastSha256(); - } - } - } - public const int ShasFieldTag=33; - public int ShasCount { get { return super.ShasCount;} } - public bool HasShas(int index) {return PBJ._PBJ.ValidateSha256(super.GetShas(index));} - public PBJ.SHA256 Shas(int index) { - return (PBJ.SHA256)PBJ._PBJ.CastSha256(super.GetShas(index)); - } - public const int ExtmesFieldTag=34; - public bool HasExtmes{ get {return super.HasExtmes;} } - public ExternalMessage Extmes{ get { - if (HasExtmes) { - return new ExternalMessage(super.Extmes); - } else { - return new ExternalMessage(); - } - } - } - public const int ExtmessersFieldTag=35; - public int ExtmessersCount { get { return super.ExtmessersCount;} } - public bool HasExtmessers(int index) {return true;} - public ExternalMessage Extmessers(int index) { - return new ExternalMessage(super.GetExtmessers(index)); - } - public const int ExtmesserFieldTag=36; - public bool HasExtmesser{ get {return super.HasExtmesser;} } - public ExternalMessage Extmesser{ get { - if (HasExtmesser) { - return new ExternalMessage(super.Extmesser); - } else { - return new ExternalMessage(); - } - } - } - 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(TestMessage prototype) { - return (Builder)new Builder().MergeFrom(prototype); - } - public static TestMessage ParseFrom(pb::ByteString data) { - return new TestMessage(_PBJ_Internal.TestMessage.ParseFrom(data)); - } - public static TestMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry er) { - return new TestMessage(_PBJ_Internal.TestMessage.ParseFrom(data,er)); - } - public static TestMessage ParseFrom(byte[] data) { - return new TestMessage(_PBJ_Internal.TestMessage.ParseFrom(data)); - } - public static TestMessage ParseFrom(byte[] data, pb::ExtensionRegistry er) { - return new TestMessage(_PBJ_Internal.TestMessage.ParseFrom(data,er)); - } - public static TestMessage ParseFrom(global::System.IO.Stream data) { - return new TestMessage(_PBJ_Internal.TestMessage.ParseFrom(data)); - } - public static TestMessage ParseFrom(global::System.IO.Stream data, pb::ExtensionRegistry er) { - return new TestMessage(_PBJ_Internal.TestMessage.ParseFrom(data,er)); - } - public static TestMessage ParseFrom(pb::CodedInputStream data) { - return new TestMessage(_PBJ_Internal.TestMessage.ParseFrom(data)); - } - public static TestMessage ParseFrom(pb::CodedInputStream data, pb::ExtensionRegistry er) { - return new TestMessage(_PBJ_Internal.TestMessage.ParseFrom(data,er)); - } - protected override bool _HasAllPBJFields{ get { - return true - &&HasV3F - ; - } } - public bool IsInitialized { get { - return super.IsInitialized&&_HasAllPBJFields; - } } - public class Builder : global::PBJ.IMessage.IBuilder{ - protected override bool _HasAllPBJFields{ get { - return true - &&HasV3F - ; - } } - public bool IsInitialized { get { - return super.IsInitialized&&_HasAllPBJFields; - } } - protected _PBJ_Internal.TestMessage.Builder super; - public override Google.ProtocolBuffers.IBuilder _PBJISuper { get { return super; } } - public _PBJ_Internal.TestMessage.Builder _PBJSuper{ get { return super;} } - public Builder() {super = new _PBJ_Internal.TestMessage.Builder();} - public Builder(_PBJ_Internal.TestMessage.Builder other) { - super=other; - } - public Builder Clone() {return new Builder(super.Clone());} - public Builder MergeFrom(TestMessage prototype) { super.MergeFrom(prototype._PBJSuper);return this;} - public Builder Clear() {super.Clear();return this;} - public TestMessage BuildPartial() {return new TestMessage(super.BuildPartial());} - public TestMessage Build() {if (_HasAllPBJFields) return new TestMessage(super.Build());return null;} - public pbd::MessageDescriptor DescriptorForType { - get { return TestMessage.Descriptor; } } - public Builder ClearXxd() { super.ClearXxd();return this;} - public const int XxdFieldTag=20; - public bool HasXxd{ get {return super.HasXxd&&PBJ._PBJ.ValidateDouble(super.Xxd);} } - public double Xxd{ get { - if (HasXxd) { - return PBJ._PBJ.CastDouble(super.Xxd); - } else { - return 10.3; - } - } - set { - super.Xxd=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearXxf() { super.ClearXxf();return this;} - public const int XxfFieldTag=21; - public bool HasXxf{ get {return super.HasXxf&&PBJ._PBJ.ValidateFloat(super.Xxf);} } - public float Xxf{ get { - if (HasXxf) { - return PBJ._PBJ.CastFloat(super.Xxf); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.Xxf=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearXxu32() { super.ClearXxu32();return this;} - public const int Xxu32FieldTag=22; - public bool HasXxu32{ get {return super.HasXxu32&&PBJ._PBJ.ValidateUint32(super.Xxu32);} } - public uint Xxu32{ get { - if (HasXxu32) { - return PBJ._PBJ.CastUint32(super.Xxu32); - } else { - return PBJ._PBJ.CastUint32(); - } - } - set { - super.Xxu32=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearXxs() { super.ClearXxs();return this;} - public const int XxsFieldTag=23; - public bool HasXxs{ get {return super.HasXxs&&PBJ._PBJ.ValidateString(super.Xxs);} } - public string Xxs{ get { - if (HasXxs) { - return PBJ._PBJ.CastString(super.Xxs); - } else { - return PBJ._PBJ.CastString(); - } - } - set { - super.Xxs=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearXxb() { super.ClearXxb();return this;} - public const int XxbFieldTag=24; - public bool HasXxb{ get {return super.HasXxb&&PBJ._PBJ.ValidateBytes(super.Xxb);} } - public pb::ByteString Xxb{ get { - if (HasXxb) { - return PBJ._PBJ.CastBytes(super.Xxb); - } else { - return PBJ._PBJ.CastBytes(); - } - } - set { - super.Xxb=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearXxss() { super.ClearXxss();return this;} - public Builder SetXxss(int index, string value) { - super.SetXxss(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int XxssFieldTag=25; - public int XxssCount { get { return super.XxssCount;} } - public bool HasXxss(int index) {return PBJ._PBJ.ValidateString(super.GetXxss(index));} - public string Xxss(int index) { - return (string)PBJ._PBJ.CastString(super.GetXxss(index)); - } - public Builder AddXxss(string value) { - super.AddXxss(PBJ._PBJ.Construct(value)); - return this; - } - public Builder ClearXxbb() { super.ClearXxbb();return this;} - public Builder SetXxbb(int index, pb::ByteString value) { - super.SetXxbb(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int XxbbFieldTag=26; - public int XxbbCount { get { return super.XxbbCount;} } - public bool HasXxbb(int index) {return PBJ._PBJ.ValidateBytes(super.GetXxbb(index));} - public pb::ByteString Xxbb(int index) { - return (pb::ByteString)PBJ._PBJ.CastBytes(super.GetXxbb(index)); - } - public Builder AddXxbb(pb::ByteString value) { - super.AddXxbb(PBJ._PBJ.Construct(value)); - return this; - } - public Builder ClearXxff() { super.ClearXxff();return this;} - public Builder SetXxff(int index, float value) { - super.SetXxff(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int XxffFieldTag=27; - public int XxffCount { get { return super.XxffCount;} } - public bool HasXxff(int index) {return PBJ._PBJ.ValidateFloat(super.GetXxff(index));} - public float Xxff(int index) { - return (float)PBJ._PBJ.CastFloat(super.GetXxff(index)); - } - public Builder AddXxff(float value) { - super.AddXxff(PBJ._PBJ.Construct(value)); - return this; - } - public Builder ClearXxnn() { super.ClearXxnn();return this;} - public const int XxnnFieldTag=29; - public int XxnnCount { get { return super.XxnnCount/2;} } - public bool HasXxnn(int index) { return true; } - public PBJ.Vector3f GetXxnn(int index) { - if (HasXxnn(index)) { - return PBJ._PBJ.CastNormal(super.GetXxnn(index*2+0),super.GetXxnn(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - public Builder AddXxnn(PBJ.Vector3f value) { - float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value); - super.AddXxnn(_PBJtempArray[0]); - super.AddXxnn(_PBJtempArray[1]); - return this; - } - public Builder SetXxnn(int index,PBJ.Vector3f value) { - float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value); - super.SetXxnn(index*2+0,_PBJtempArray[0]); - super.SetXxnn(index*2+1,_PBJtempArray[1]); - return this; - } - public Builder ClearXxfr() { super.ClearXxfr();return this;} - public const int XxfrFieldTag=28; - public bool HasXxfr{ get {return super.HasXxfr&&PBJ._PBJ.ValidateFloat(super.Xxfr);} } - public float Xxfr{ get { - if (HasXxfr) { - return PBJ._PBJ.CastFloat(super.Xxfr); - } else { - return PBJ._PBJ.CastFloat(); - } - } - set { - super.Xxfr=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearN() { super.ClearN();return this;} - public const int NFieldTag=1; - public bool HasN{ get {return super.NCount>=2;} } - public PBJ.Vector3f N{ get { - int index=0; - if (HasN) { - return PBJ._PBJ.CastNormal(super.GetN(index*2+0),super.GetN(index*2+1)); - } else { - return PBJ._PBJ.CastNormal(); - } - } - set { - super.ClearN(); - float[] _PBJtempArray=PBJ._PBJ.ConstructNormal(value); - super.AddN(_PBJtempArray[0]); - super.AddN(_PBJtempArray[1]); - } - } - public Builder ClearV2F() { super.ClearV2F();return this;} - public const int V2FFieldTag=2; - public bool HasV2F{ get {return super.V2FCount>=2;} } - public PBJ.Vector2f V2F{ get { - int index=0; - if (HasV2F) { - return PBJ._PBJ.CastVector2f(super.GetV2F(index*2+0),super.GetV2F(index*2+1)); - } else { - return PBJ._PBJ.CastVector2f(); - } - } - set { - super.ClearV2F(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector2f(value); - super.AddV2F(_PBJtempArray[0]); - super.AddV2F(_PBJtempArray[1]); - } - } - public Builder ClearV2D() { super.ClearV2D();return this;} - public const int V2DFieldTag=3; - public bool HasV2D{ get {return super.V2DCount>=2;} } - public PBJ.Vector2d V2D{ get { - int index=0; - if (HasV2D) { - return PBJ._PBJ.CastVector2d(super.GetV2D(index*2+0),super.GetV2D(index*2+1)); - } else { - return PBJ._PBJ.CastVector2d(); - } - } - set { - super.ClearV2D(); - double[] _PBJtempArray=PBJ._PBJ.ConstructVector2d(value); - super.AddV2D(_PBJtempArray[0]); - super.AddV2D(_PBJtempArray[1]); - } - } - public Builder ClearV3F() { super.ClearV3F();return this;} - public const int V3FFieldTag=4; - public bool HasV3F{ get {return super.V3FCount>=3;} } - public PBJ.Vector3f V3F{ get { - int index=0; - if (HasV3F) { - return PBJ._PBJ.CastVector3f(super.GetV3F(index*3+0),super.GetV3F(index*3+1),super.GetV3F(index*3+2)); - } else { - return PBJ._PBJ.CastVector3f(); - } - } - set { - super.ClearV3F(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector3f(value); - super.AddV3F(_PBJtempArray[0]); - super.AddV3F(_PBJtempArray[1]); - super.AddV3F(_PBJtempArray[2]); - } - } - public Builder ClearV3D() { super.ClearV3D();return this;} - public const int V3DFieldTag=5; - public bool HasV3D{ get {return super.V3DCount>=3;} } - public PBJ.Vector3d V3D{ get { - int index=0; - if (HasV3D) { - return PBJ._PBJ.CastVector3d(super.GetV3D(index*3+0),super.GetV3D(index*3+1),super.GetV3D(index*3+2)); - } else { - return PBJ._PBJ.CastVector3d(); - } - } - set { - super.ClearV3D(); - double[] _PBJtempArray=PBJ._PBJ.ConstructVector3d(value); - super.AddV3D(_PBJtempArray[0]); - super.AddV3D(_PBJtempArray[1]); - super.AddV3D(_PBJtempArray[2]); - } - } - public Builder ClearV4F() { super.ClearV4F();return this;} - public const int V4FFieldTag=6; - public bool HasV4F{ get {return super.V4FCount>=4;} } - public PBJ.Vector4f V4F{ get { - int index=0; - if (HasV4F) { - return PBJ._PBJ.CastVector4f(super.GetV4F(index*4+0),super.GetV4F(index*4+1),super.GetV4F(index*4+2),super.GetV4F(index*4+3)); - } else { - return PBJ._PBJ.CastVector4f(); - } - } - set { - super.ClearV4F(); - float[] _PBJtempArray=PBJ._PBJ.ConstructVector4f(value); - super.AddV4F(_PBJtempArray[0]); - super.AddV4F(_PBJtempArray[1]); - super.AddV4F(_PBJtempArray[2]); - super.AddV4F(_PBJtempArray[3]); - } - } - public Builder ClearV4D() { super.ClearV4D();return this;} - public const int V4DFieldTag=7; - public bool HasV4D{ get {return super.V4DCount>=4;} } - public PBJ.Vector4d V4D{ get { - int index=0; - if (HasV4D) { - return PBJ._PBJ.CastVector4d(super.GetV4D(index*4+0),super.GetV4D(index*4+1),super.GetV4D(index*4+2),super.GetV4D(index*4+3)); - } else { - return PBJ._PBJ.CastVector4d(); - } - } - set { - super.ClearV4D(); - double[] _PBJtempArray=PBJ._PBJ.ConstructVector4d(value); - super.AddV4D(_PBJtempArray[0]); - super.AddV4D(_PBJtempArray[1]); - super.AddV4D(_PBJtempArray[2]); - super.AddV4D(_PBJtempArray[3]); - } - } - public Builder ClearQ() { super.ClearQ();return this;} - public const int QFieldTag=8; - public bool HasQ{ get {return super.QCount>=3;} } - public PBJ.Quaternion Q{ get { - int index=0; - if (HasQ) { - return PBJ._PBJ.CastQuaternion(super.GetQ(index*3+0),super.GetQ(index*3+1),super.GetQ(index*3+2)); - } else { - return PBJ._PBJ.CastQuaternion(); - } - } - set { - super.ClearQ(); - float[] _PBJtempArray=PBJ._PBJ.ConstructQuaternion(value); - super.AddQ(_PBJtempArray[0]); - super.AddQ(_PBJtempArray[1]); - super.AddQ(_PBJtempArray[2]); - } - } - public Builder ClearU() { super.ClearU();return this;} - public const int UFieldTag=9; - public bool HasU{ get {return super.HasU&&PBJ._PBJ.ValidateUuid(super.U);} } - public PBJ.UUID U{ get { - if (HasU) { - return PBJ._PBJ.CastUuid(super.U); - } else { - return PBJ._PBJ.CastUuid(); - } - } - set { - super.U=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearA() { super.ClearA();return this;} - public const int AFieldTag=10; - public bool HasA{ get {return super.HasA&&PBJ._PBJ.ValidateAngle(super.A);} } - public float A{ get { - if (HasA) { - return PBJ._PBJ.CastAngle(super.A); - } else { - return PBJ._PBJ.CastAngle(); - } - } - set { - super.A=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearT() { super.ClearT();return this;} - public const int TFieldTag=11; - public bool HasT{ get {return super.HasT&&PBJ._PBJ.ValidateTime(super.T);} } - public PBJ.Time T{ get { - if (HasT) { - return PBJ._PBJ.CastTime(super.T); - } else { - return PBJ._PBJ.CastTime(); - } - } - set { - super.T=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearD() { super.ClearD();return this;} - public const int DFieldTag=12; - public bool HasD{ get {return super.HasD&&PBJ._PBJ.ValidateDuration(super.D);} } - public PBJ.Duration D{ get { - if (HasD) { - return PBJ._PBJ.CastDuration(super.D); - } else { - return PBJ._PBJ.CastDuration(); - } - } - set { - super.D=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearF32() { super.ClearF32();return this;} - public const int F32FieldTag=13; - public bool HasF32 { get { - if (!super.HasF32) return false; - return PBJ._PBJ.ValidateFlags(super.F32,(ulong)Types.Flagsf32.UNIVERSA|(ulong)Types.Flagsf32.WE|(ulong)Types.Flagsf32.IMAGE|(ulong)Types.Flagsf32.LOCA); - } } - public uint F32{ get { - if (HasF32) { - return (uint)PBJ._PBJ.CastFlags(super.F32,(ulong)Types.Flagsf32.UNIVERSA|(ulong)Types.Flagsf32.WE|(ulong)Types.Flagsf32.IMAGE|(ulong)Types.Flagsf32.LOCA); - } else { - return (uint)PBJ._PBJ.CastFlags((ulong)Types.Flagsf32.UNIVERSA|(ulong)Types.Flagsf32.WE|(ulong)Types.Flagsf32.IMAGE|(ulong)Types.Flagsf32.LOCA); - } - } - set { - super.F32=((value)); - } - } - public Builder ClearF64() { super.ClearF64();return this;} - public const int F64FieldTag=14; - public bool HasF64 { get { - if (!super.HasF64) return false; - return PBJ._PBJ.ValidateFlags(super.F64,(ulong)Types.Flagsf64.UNIVERSAL|(ulong)Types.Flagsf64.WEB|(ulong)Types.Flagsf64.IMAGES|(ulong)Types.Flagsf64.LOCAL); - } } - public ulong F64{ get { - if (HasF64) { - return (ulong)PBJ._PBJ.CastFlags(super.F64,(ulong)Types.Flagsf64.UNIVERSAL|(ulong)Types.Flagsf64.WEB|(ulong)Types.Flagsf64.IMAGES|(ulong)Types.Flagsf64.LOCAL); - } else { - return (ulong)PBJ._PBJ.CastFlags((ulong)Types.Flagsf64.UNIVERSAL|(ulong)Types.Flagsf64.WEB|(ulong)Types.Flagsf64.IMAGES|(ulong)Types.Flagsf64.LOCAL); - } - } - set { - super.F64=((value)); - } - } - public Builder ClearBsf() { super.ClearBsf();return this;} - public const int BsfFieldTag=15; - public bool HasBsf{ get {return super.BsfCount>=4;} } - public PBJ.BoundingSphere3f Bsf{ get { - int index=0; - if (HasBsf) { - return PBJ._PBJ.CastBoundingsphere3f(super.GetBsf(index*4+0),super.GetBsf(index*4+1),super.GetBsf(index*4+2),super.GetBsf(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3f(); - } - } - set { - super.ClearBsf(); - float[] _PBJtempArray=PBJ._PBJ.ConstructBoundingsphere3f(value); - super.AddBsf(_PBJtempArray[0]); - super.AddBsf(_PBJtempArray[1]); - super.AddBsf(_PBJtempArray[2]); - super.AddBsf(_PBJtempArray[3]); - } - } - public Builder ClearBsd() { super.ClearBsd();return this;} - public const int BsdFieldTag=16; - public bool HasBsd{ get {return super.BsdCount>=4;} } - public PBJ.BoundingSphere3d Bsd{ get { - int index=0; - if (HasBsd) { - return PBJ._PBJ.CastBoundingsphere3d(super.GetBsd(index*4+0),super.GetBsd(index*4+1),super.GetBsd(index*4+2),super.GetBsd(index*4+3)); - } else { - return PBJ._PBJ.CastBoundingsphere3d(); - } - } - set { - super.ClearBsd(); - double[] _PBJtempArray=PBJ._PBJ.ConstructBoundingsphere3d(value); - super.AddBsd(_PBJtempArray[0]); - super.AddBsd(_PBJtempArray[1]); - super.AddBsd(_PBJtempArray[2]); - super.AddBsd(_PBJtempArray[3]); - } - } - public Builder ClearBbf() { super.ClearBbf();return this;} - public const int BbfFieldTag=17; - public bool HasBbf{ get {return super.BbfCount>=6;} } - public PBJ.BoundingBox3f3f Bbf{ get { - int index=0; - if (HasBbf) { - return PBJ._PBJ.CastBoundingbox3f3f(super.GetBbf(index*6+0),super.GetBbf(index*6+1),super.GetBbf(index*6+2),super.GetBbf(index*6+3),super.GetBbf(index*6+4),super.GetBbf(index*6+5)); - } else { - return PBJ._PBJ.CastBoundingbox3f3f(); - } - } - set { - super.ClearBbf(); - float[] _PBJtempArray=PBJ._PBJ.ConstructBoundingbox3f3f(value); - super.AddBbf(_PBJtempArray[0]); - super.AddBbf(_PBJtempArray[1]); - super.AddBbf(_PBJtempArray[2]); - super.AddBbf(_PBJtempArray[3]); - super.AddBbf(_PBJtempArray[4]); - super.AddBbf(_PBJtempArray[5]); - } - } - public Builder ClearBbd() { super.ClearBbd();return this;} - public const int BbdFieldTag=18; - public bool HasBbd{ get {return super.BbdCount>=6;} } - public PBJ.BoundingBox3d3f Bbd{ get { - int index=0; - if (HasBbd) { - return PBJ._PBJ.CastBoundingbox3d3f(super.GetBbd(index*6+0),super.GetBbd(index*6+1),super.GetBbd(index*6+2),super.GetBbd(index*6+3),super.GetBbd(index*6+4),super.GetBbd(index*6+5)); - } else { - return PBJ._PBJ.CastBoundingbox3d3f(); - } - } - set { - super.ClearBbd(); - double[] _PBJtempArray=PBJ._PBJ.ConstructBoundingbox3d3f(value); - super.AddBbd(_PBJtempArray[0]); - super.AddBbd(_PBJtempArray[1]); - super.AddBbd(_PBJtempArray[2]); - super.AddBbd(_PBJtempArray[3]); - super.AddBbd(_PBJtempArray[4]); - super.AddBbd(_PBJtempArray[5]); - } - } - public Builder ClearE32() { super.ClearE32();return this;} - public const int E32FieldTag=19; - public bool HasE32{ get {return super.HasE32;} } - public Types.Enum32 E32{ get { - if (HasE32) { - return (Types.Enum32)super.E32; - } else { - return new Types.Enum32(); - } - } - set { - super.E32=((_PBJ_Internal.TestMessage.Types.Enum32)value); - } - } - public Builder ClearSubmes() { super.ClearSubmes();return this;} - public const int SubmesFieldTag=30; - public bool HasSubmes{ get {return super.HasSubmes;} } - public Types.SubMessage Submes{ get { - if (HasSubmes) { - return new Types.SubMessage(super.Submes); - } else { - return new Types.SubMessage(); - } - } - set { - super.Submes=value._PBJSuper; - } - } - public Builder ClearSubmessers() { super.ClearSubmessers();return this;} - public Builder SetSubmessers(int index,Types.SubMessage value) { - super.SetSubmessers(index,value._PBJSuper); - return this; - } - public const int SubmessersFieldTag=31; - public int SubmessersCount { get { return super.SubmessersCount;} } - public bool HasSubmessers(int index) {return true;} - public Types.SubMessage Submessers(int index) { - return new Types.SubMessage(super.GetSubmessers(index)); - } - public Builder AddSubmessers(Types.SubMessage value) { - super.AddSubmessers(value._PBJSuper); - return this; - } - public Builder ClearSha() { super.ClearSha();return this;} - public const int ShaFieldTag=32; - public bool HasSha{ get {return super.HasSha&&PBJ._PBJ.ValidateSha256(super.Sha);} } - public PBJ.SHA256 Sha{ get { - if (HasSha) { - return PBJ._PBJ.CastSha256(super.Sha); - } else { - return PBJ._PBJ.CastSha256(); - } - } - set { - super.Sha=(PBJ._PBJ.Construct(value)); - } - } - public Builder ClearShas() { super.ClearShas();return this;} - public Builder SetShas(int index, PBJ.SHA256 value) { - super.SetShas(index,PBJ._PBJ.Construct(value)); - return this; - } - public const int ShasFieldTag=33; - public int ShasCount { get { return super.ShasCount;} } - public bool HasShas(int index) {return PBJ._PBJ.ValidateSha256(super.GetShas(index));} - public PBJ.SHA256 Shas(int index) { - return (PBJ.SHA256)PBJ._PBJ.CastSha256(super.GetShas(index)); - } - public Builder AddShas(PBJ.SHA256 value) { - super.AddShas(PBJ._PBJ.Construct(value)); - return this; - } - public Builder ClearExtmes() { super.ClearExtmes();return this;} - public const int ExtmesFieldTag=34; - public bool HasExtmes{ get {return super.HasExtmes;} } - public ExternalMessage Extmes{ get { - if (HasExtmes) { - return new ExternalMessage(super.Extmes); - } else { - return new ExternalMessage(); - } - } - set { - super.Extmes=value._PBJSuper; - } - } - public Builder ClearExtmessers() { super.ClearExtmessers();return this;} - public Builder SetExtmessers(int index,ExternalMessage value) { - super.SetExtmessers(index,value._PBJSuper); - return this; - } - public const int ExtmessersFieldTag=35; - public int ExtmessersCount { get { return super.ExtmessersCount;} } - public bool HasExtmessers(int index) {return true;} - public ExternalMessage Extmessers(int index) { - return new ExternalMessage(super.GetExtmessers(index)); - } - public Builder AddExtmessers(ExternalMessage value) { - super.AddExtmessers(value._PBJSuper); - return this; - } - public Builder ClearExtmesser() { super.ClearExtmesser();return this;} - public const int ExtmesserFieldTag=36; - public bool HasExtmesser{ get {return super.HasExtmesser;} } - public ExternalMessage Extmesser{ get { - if (HasExtmesser) { - return new ExternalMessage(super.Extmesser); - } else { - return new ExternalMessage(); - } - } - set { - super.Extmesser=value._PBJSuper; - } - } - } - } -} -namespace Sirikata.PB { -} diff --git a/OpenSim/Client/Sirikata/Protocol/Time.cs b/OpenSim/Client/Sirikata/Protocol/Time.cs deleted file mode 100644 index 4ad49cc22c..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Time.cs +++ /dev/null @@ -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 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(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 { - 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 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 { - 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 - -} diff --git a/OpenSim/Client/Sirikata/Protocol/Time.pbj.cs b/OpenSim/Client/Sirikata/Protocol/Time.pbj.cs deleted file mode 100644 index 15b4ae7e5d..0000000000 --- a/OpenSim/Client/Sirikata/Protocol/Time.pbj.cs +++ /dev/null @@ -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)); - } - } - } - } -} diff --git a/OpenSim/Client/Sirikata/SirikataModule.cs b/OpenSim/Client/Sirikata/SirikataModule.cs deleted file mode 100644 index 01dc9d70cc..0000000000 --- a/OpenSim/Client/Sirikata/SirikataModule.cs +++ /dev/null @@ -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 - - - 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 m_scenes = new List(); - private Dictionary m_clients = new Dictionary(); - - #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 - } -} diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index a6c490b2bc..f2b58d3c4c 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs @@ -245,7 +245,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack public event TeleportLandmarkRequest OnTeleportLandmarkRequest = delegate { }; public event DeRezObject OnDeRezObject = delegate { }; public event Action 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 { }; @@ -579,7 +579,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(); } @@ -664,6 +669,11 @@ namespace OpenSim.Client.VWoHTTP.ClientStack throw new System.NotImplementedException(); } + public virtual void SendAbortXferPacket(ulong xferID) + { + throw new System.NotImplementedException(); + } + public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) { throw new System.NotImplementedException(); @@ -1213,5 +1223,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } diff --git a/OpenSim/Data/DBGuids.cs b/OpenSim/Data/DBGuids.cs index fb6832b8d1..ad1c19c6ee 100644 --- a/OpenSim/Data/DBGuids.cs +++ b/OpenSim/Data/DBGuids.cs @@ -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 /// 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)) diff --git a/OpenSim/Data/IAssetData.cs b/OpenSim/Data/IAssetData.cs index 90d5eeb489..f31b215c0f 100644 --- a/OpenSim/Data/IAssetData.cs +++ b/OpenSim/Data/IAssetData.cs @@ -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); - } - } } diff --git a/OpenSim/Data/IInventoryData.cs b/OpenSim/Data/IInventoryData.cs index 90f74b713b..74d5d37bf9 100644 --- a/OpenSim/Data/IInventoryData.cs +++ b/OpenSim/Data/IInventoryData.cs @@ -155,15 +155,4 @@ namespace OpenSim.Data /// List 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); - } - } } diff --git a/OpenSim/Data/IRegionData.cs b/OpenSim/Data/IRegionData.cs index 8259f9b316..46dc4fbe8a 100644 --- a/OpenSim/Data/IRegionData.cs +++ b/OpenSim/Data/IRegionData.cs @@ -62,6 +62,7 @@ namespace OpenSim.Data List GetDefaultRegions(UUID scopeID); List GetFallbackRegions(UUID scopeID, int x, int y); + List 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 + { + 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(); + } + } } diff --git a/OpenSim/Data/MSSQL/MSSQLEstateData.cs b/OpenSim/Data/MSSQL/MSSQLEstateData.cs index 80bf10638d..e9a0935048 100644 --- a/OpenSim/Data/MSSQL/MSSQLEstateData.cs +++ b/OpenSim/Data/MSSQL/MSSQLEstateData.cs @@ -50,6 +50,15 @@ namespace OpenSim.Data.MSSQL #region Public methods + public MSSQLEstateStore() + { + } + + public MSSQLEstateStore(string connectionString) + { + Initialise(connectionString); + } + /// /// Initialises the estatedata class. /// diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs index 66c3f8117f..cdf8ec09fb 100644 --- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs @@ -310,23 +310,26 @@ namespace OpenSim.Data.MSSQL public List 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 GetFallbackRegions(UUID scopeID, int x, int y) { - string sql = "SELECT * FROM [" + m_Realm + "] WHERE (flags & 2) <> 0"; + List regions = Get((int)RegionFlags.FallbackRegion, scopeID); + RegionDataDistanceCompare distanceComparer = new RegionDataDistanceCompare(x, y); + regions.Sort(distanceComparer); + + return regions; + } + + public List GetHyperlinks(UUID scopeID) + { + return Get((int)RegionFlags.Hyperlink, scopeID); + } + + private List 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); } } diff --git a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs similarity index 98% rename from OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs rename to OpenSim/Data/MSSQL/MSSQLSimulationData.cs index d6cb91f27f..80ec65e246 100644 --- a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs @@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL /// /// A MSSQL Interface for the Region Server. /// - public class MSSQLRegionDataStore : IRegionDataStore + public class MSSQLSimulationData : ISimulationDataStore { private const string _migrationStore = "RegionStore"; @@ -55,6 +55,16 @@ namespace OpenSim.Data.MSSQL /// private MSSQLManager _Database; private string m_connectionString; + + public MSSQLSimulationData() + { + } + + public MSSQLSimulationData(string connectionString) + { + Initialise(connectionString); + } + /// /// Initialises the region datastore /// @@ -89,7 +99,6 @@ namespace OpenSim.Data.MSSQL Dictionary objects = new Dictionary(); 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 /// 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 } } } - } /// @@ -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"]); @@ -1127,6 +1137,9 @@ VALUES if (Convert.ToInt16(primRow["PassTouches"]) != 0) 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(); } diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations index e912d646a0..e2e8cbb117 100644 --- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations @@ -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 \ No newline at end of file diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index c177097ebd..d60647015f 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs @@ -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 migrations = new SortedList(); 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 '.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; } } diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index fe5152ad85..ed92f3ebc2 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs @@ -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)) diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 9158f7a427..c42c687ed9 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs @@ -54,6 +54,15 @@ namespace OpenSim.Data.MySQL private Dictionary m_FieldMap = new Dictionary(); + public MySQLEstateStore() + { + } + + public MySQLEstateStore(string connectionString) + { + Initialise(connectionString); + } + public void Initialise(string connectionString) { m_connectionString = connectionString; diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 6cbb2ee9a2..7c23a47d04 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs @@ -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]); diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 0aea30ffb9..9d70acbeeb 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -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 @@ -867,7 +867,7 @@ namespace OpenSim.Data.MySQL dbcon.Open(); using (MySqlCommand sqlCmd = new MySqlCommand( - "SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags = 1", dbcon)) + "SELECT * FROM inventoryitems WHERE avatarId = ?uuid AND assetType = ?type and flags & 1", dbcon)) { sqlCmd.Parameters.AddWithValue("?uuid", avatarID.ToString()); sqlCmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); diff --git a/OpenSim/Data/MySQL/MySQLPresenceData.cs b/OpenSim/Data/MySQL/MySQLPresenceData.cs index 71caa1aa2a..2390febd7f 100644 --- a/OpenSim/Data/MySQL/MySQLPresenceData.cs +++ b/OpenSim/Data/MySQL/MySQLPresenceData.cs @@ -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; } - } } diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index c7bddacd16..d04e3dc996 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -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 > 128) + data.RegionName = data.RegionName.Substring(0, 128); + string[] fields = new List(data.Data.Keys).ToArray(); using (MySqlCommand cmd = new MySqlCommand()) @@ -281,22 +286,28 @@ namespace OpenSim.Data.MySQL return false; } + public List 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 GetFallbackRegions(UUID scopeID, int x, int y) { - string command = "select * from `"+m_Realm+"` where (flags & 2) <> 0"; + List regions = Get((int)RegionFlags.FallbackRegion, scopeID); + RegionDataDistanceCompare distanceComparer = new RegionDataDistanceCompare(x, y); + regions.Sort(distanceComparer); + return regions; + } + + public List GetHyperlinks(UUID scopeID) + { + return Get((int)RegionFlags.Hyperlink, scopeID); + } + + private List 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); } } diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs similarity index 96% rename from OpenSim/Data/MySQL/MySQLLegacyRegionData.cs rename to OpenSim/Data/MySQL/MySQLSimulationData.cs index bfeae12385..02997b3278 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -45,13 +45,22 @@ namespace OpenSim.Data.MySQL /// /// A MySQL Interface for the Region Server /// - 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 uuids = new List(); // 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)) { @@ -676,7 +689,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, " + @@ -686,7 +700,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); @@ -723,7 +738,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; @@ -802,6 +817,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; } } } @@ -949,6 +965,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) @@ -1059,7 +1090,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"]); @@ -1081,7 +1112,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"]; @@ -1184,6 +1215,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; } @@ -1209,7 +1243,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"]); @@ -1323,7 +1357,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; @@ -1343,6 +1376,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(); return newData; @@ -1411,8 +1452,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()); @@ -1521,6 +1562,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("PassTouches", 0); cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); + cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); } /// @@ -1541,7 +1583,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); @@ -1645,7 +1687,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); + } /// @@ -1700,6 +1749,9 @@ namespace OpenSim.Data.MySQL s.ExtraParams = (byte[])row["ExtraParams"]; s.State = (byte)(int)row["State"]; + + if (!(row["Media"] is System.DBNull)) + s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); return s; } @@ -1743,6 +1795,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 items) diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index 3c73095fc3..287c4dda7b 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs @@ -130,7 +130,7 @@ namespace OpenSim.Data.MySQL { using (MySqlCommand cmd = new MySqlCommand()) { - cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags = 1", m_Realm); + cmd.CommandText = String.Format("select * from inventoryitems where avatarId = ?uuid and assetType = ?type and flags & 1", m_Realm); cmd.Parameters.AddWithValue("?uuid", principalID.ToString()); cmd.Parameters.AddWithValue("?type", (int)AssetType.Gesture); diff --git a/OpenSim/Data/MySQL/Resources/Avatar.migrations b/OpenSim/Data/MySQL/Resources/Avatar.migrations index 8d0eee68a1..f7cf1766fc 100644 --- a/OpenSim/Data/MySQL/Resources/Avatar.migrations +++ b/OpenSim/Data/MySQL/Resources/Avatar.migrations @@ -10,3 +10,11 @@ CREATE TABLE Avatars ( KEY(PrincipalID)); COMMIT; + +:VERSION 2 + +BEGIN; + +alter table Avatars change column Value Value text; + +COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/GridStore.migrations b/OpenSim/Data/MySQL/Resources/GridStore.migrations index 523a8ac7dc..eda6dbb2a3 100644 --- a/OpenSim/Data/MySQL/Resources/GridStore.migrations +++ b/OpenSim/Data/MySQL/Resources/GridStore.migrations @@ -87,3 +87,10 @@ ALTER TABLE `regions` ADD COLUMN `Token` varchar(255) NOT NULL; COMMIT; +:VERSION 8 # ------------ + +BEGIN; + +alter table regions modify column regionName varchar(128) default NULL; + +COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations index 3e9bad5f95..993a5a0f1f 100644 --- a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations +++ b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations @@ -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; diff --git a/OpenSim/Data/MySQL/Resources/Presence.migrations b/OpenSim/Data/MySQL/Resources/Presence.migrations index 91f7de55f7..be4030efb0 100644 --- a/OpenSim/Data/MySQL/Resources/Presence.migrations +++ b/OpenSim/Data/MySQL/Resources/Presence.migrations @@ -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; diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 3f644f903f..ba8d5388a6 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations @@ -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; diff --git a/OpenSim/Data/Null/NullInventoryData.cs b/OpenSim/Data/Null/NullInventoryData.cs index 8f196e2018..fe9ed017a1 100644 --- a/OpenSim/Data/Null/NullInventoryData.cs +++ b/OpenSim/Data/Null/NullInventoryData.cs @@ -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; diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index d596698127..2065355890 100644 --- a/OpenSim/Data/Null/NullRegionData.cs +++ b/OpenSim/Data/Null/NullRegionData.cs @@ -164,34 +164,36 @@ namespace OpenSim.Data.Null public List GetDefaultRegions(UUID scopeID) { - if (Instance != this) - return Instance.GetDefaultRegions(scopeID); - - List ret = new List(); - - 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 GetFallbackRegions(UUID scopeID, int x, int y) + { + List regions = Get((int)RegionFlags.FallbackRegion, scopeID); + RegionDataDistanceCompare distanceComparer = new RegionDataDistanceCompare(x, y); + regions.Sort(distanceComparer); + return regions; + } + + public List GetHyperlinks(UUID scopeID) + { + return Get((int)RegionFlags.Hyperlink, scopeID); + } + + private List Get(int regionFlags, UUID scopeID) { if (Instance != this) - return Instance.GetFallbackRegions(scopeID, x, y); + return Instance.Get(regionFlags, scopeID); List ret = new List(); 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); } return ret; } } -} \ No newline at end of file +} diff --git a/OpenSim/Data/Null/NullDataStore.cs b/OpenSim/Data/Null/NullSimulationData.cs similarity index 96% rename from OpenSim/Data/Null/NullDataStore.cs rename to OpenSim/Data/Null/NullSimulationData.cs index 3ba44bb54b..eb4e313f84 100644 --- a/OpenSim/Data/Null/NullDataStore.cs +++ b/OpenSim/Data/Null/NullSimulationData.cs @@ -36,7 +36,7 @@ namespace OpenSim.Data.Null /// /// NULL DataStore, do not store anything /// - 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 items) { } diff --git a/OpenSim/Data/SQLite/Resources/019_RegionStore.sql b/OpenSim/Data/SQLite/Resources/019_RegionStore.sql deleted file mode 100644 index d62f8484b8..0000000000 --- a/OpenSim/Data/SQLite/Resources/019_RegionStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; - -COMMIT; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations index c461bf0727..5e2045b1b9 100644 --- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations @@ -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; \ No newline at end of file diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 16e560c6df..5b71897ced 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs @@ -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; diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs index a1412ff0fa..c54bd743b3 100644 --- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs +++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs @@ -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 { diff --git a/OpenSim/Data/SQLite/SQLiteAvatarData.cs b/OpenSim/Data/SQLite/SQLiteAvatarData.cs index c093884db4..60a1a3e9f7 100644 --- a/OpenSim/Data/SQLite/SQLiteAvatarData.cs +++ b/OpenSim/Data/SQLite/SQLiteAvatarData.cs @@ -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 { diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs index fcf041e41f..63252aa3d3 100644 --- a/OpenSim/Data/SQLite/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs @@ -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 m_FieldMap = new Dictionary(); + 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) { diff --git a/OpenSim/Data/SQLite/SQLiteFramework.cs b/OpenSim/Data/SQLite/SQLiteFramework.cs index cf114d1a07..4992bcc7de 100644 --- a/OpenSim/Data/SQLite/SQLiteFramework.cs +++ b/OpenSim/Data/SQLite/SQLiteFramework.cs @@ -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 { diff --git a/OpenSim/Data/SQLite/SQLiteFriendsData.cs b/OpenSim/Data/SQLite/SQLiteFriendsData.cs index b06853ce68..4bfd228364 100644 --- a/OpenSim/Data/SQLite/SQLiteFriendsData.cs +++ b/OpenSim/Data/SQLite/SQLiteFriendsData.cs @@ -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 { diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs index 9b8e2fa7f3..0d7b001e3f 100644 --- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs +++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs @@ -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; diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index ece2495c2b..7dc07ec1ac 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs @@ -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; @@ -731,12 +735,12 @@ namespace OpenSim.Data.SQLite **********************************************************************/ protected void CreateDataSetMapping(IDataAdapter da, string tableName) - { + { ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName); foreach (DataColumn col in ds.Tables[tableName].Columns) - { + { dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName); - } + } } /// diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs similarity index 97% rename from OpenSim/Data/SQLite/SQLiteRegionData.cs rename to OpenSim/Data/SQLite/SQLiteSimulationData.cs index 81d0ac4f6e..8d93354391 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -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 /// /// A RegionData Interface to the SQLite database /// - 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 **********************************************************************/ /// - /// See IRegionDataStore /// /// Initialises RegionData Interface /// Loads and initialises a new SQLite connection and maintains it. @@ -176,7 +189,7 @@ namespace OpenSim.Data.SQLite { m_log.Info("[SQLITE REGION DB]: Caught fill error on primitems table"); } - + try { terrainDa.Fill(ds.Tables["terrain"]); @@ -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); @@ -510,7 +526,7 @@ namespace OpenSim.Data.SQLite "[SQLITE REGION DB]: No shape found for prim in storage, so setting default box shape"); prim.Shape = PrimitiveBaseShape.Default; } - + createdObjects[new UUID(objID)].AddPart(prim); LoadItems(prim); } @@ -534,17 +550,17 @@ namespace OpenSim.Data.SQLite /// /// the prim 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()); + String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); DataRow[] dbItemRows = dbItems.Select(sql); IList inventory = new List(); -// 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) { TaskInventoryItem item = buildItem(row); @@ -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 rowsToDelete = new List(); @@ -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(); @@ -804,7 +821,7 @@ namespace OpenSim.Data.SQLite try { regionSettingsDa.Update(ds, "regionsettings"); - } + } catch (SqliteException SqlEx) { throw new Exception( @@ -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"]}; @@ -1189,10 +1208,10 @@ namespace OpenSim.Data.SQLite private SceneObjectPart buildPrim(DataRow row) { // Code commented. Uncomment to test the unit test inline. - - // The unit test mentions this commented code for the purposes + + // The unit test mentions this commented code for the purposes // of debugging a unit test failure - + // SceneObjectGroup sog = new SceneObjectGroup(); // SceneObjectPart sop = new SceneObjectPart(); // sop.LocalId = 1; @@ -1209,7 +1228,7 @@ namespace OpenSim.Data.SQLite // TODO: this doesn't work yet because something more // interesting has to be done to actually get these values // back out. Not enough time to figure it out yet. - + SceneObjectPart prim = new SceneObjectPart(); prim.UUID = new UUID((String) row["UUID"]); // explicit conversion of integers is required, which sort @@ -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; } /// @@ -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(); } /// @@ -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(); } /// - /// + /// Persistently store a prim. /// /// /// /// 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 } /// - /// see IRegionDatastore /// /// /// @@ -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) @@ -2301,7 +2334,7 @@ namespace OpenSim.Data.SQLite return DbType.String; } } - + static void PrintDataSet(DataSet ds) { // Print out any name and extended properties. diff --git a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs index 893f105604..7a5de5073d 100644 --- a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs @@ -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 diff --git a/OpenSim/Data/SQLite/SQLiteUtils.cs b/OpenSim/Data/SQLite/SQLiteUtils.cs index 07c6b69a3b..ca5861fefd 100644 --- a/OpenSim/Data/SQLite/SQLiteUtils.cs +++ b/OpenSim/Data/SQLite/SQLiteUtils.cs @@ -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 { diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs index ca651e1998..ccbd86e119 100644 --- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs +++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs @@ -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; diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs index bf8ee147b5..547ea6b07d 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs @@ -49,6 +49,15 @@ namespace OpenSim.Data.SQLiteLegacy private Dictionary m_FieldMap = new Dictionary(); + public SQLiteEstateStore() + { + } + + public SQLiteEstateStore(string connectionString) + { + Initialise(connectionString); + } + public void Initialise(string connectionString) { m_connectionString = connectionString; diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs b/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs index 726703b79d..8ca48f94b1 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteInventoryStore.cs @@ -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; diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs similarity index 99% rename from OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs rename to OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs index eb78037bb1..644864af28 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs @@ -43,7 +43,7 @@ namespace OpenSim.Data.SQLiteLegacy /// /// A RegionData Interface to the SQLite database /// - 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 **********************************************************************/ /// - /// See IRegionDataStore /// /// Initialises RegionData Interface /// Loads and initialises a new SQLite connection and maintains it. @@ -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 rowsToDelete = new List(); @@ -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; } /// @@ -1891,7 +1902,6 @@ namespace OpenSim.Data.SQLiteLegacy } /// - /// see IRegionDatastore /// /// /// diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs index c261126722..7d85f0c8eb 100644 --- a/OpenSim/Data/Tests/BasicDataServiceTest.cs +++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs @@ -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; @@ -41,13 +68,13 @@ namespace OpenSim.Data.Tests { m_connStr = !String.IsNullOrEmpty(conn) ? conn : DefaultTestConns.Get(typeof(TConn)); - m_log = LogManager.GetLogger(this.GetType()); + m_log = LogManager.GetLogger(this.GetType()); OpenSim.Tests.Common.TestLogging.LogToConsole(); // TODO: Is that right? } /// /// To be overridden in derived classes. Do whatever init with the m_service, like setting the conn string to it. - /// You'd probably want to to cast the 'service' to a more specific type and store it in a member var. + /// You'd probably want to to cast the 'service' to a more specific type and store it in a member var. /// This framework takes care of disposing it, if it's disposable. /// /// The service being tested @@ -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); } @@ -204,7 +231,7 @@ namespace OpenSim.Data.Tests lst += ", " + s; } - string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst); + string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst); try { ExecuteSql("DELETE FROM migrations where name " + sCond); diff --git a/OpenSim/Data/Tests/DefaultTestConns.cs b/OpenSim/Data/Tests/DefaultTestConns.cs index 7b52af575a..7c47bddd21 100644 --- a/OpenSim/Data/Tests/DefaultTestConns.cs +++ b/OpenSim/Data/Tests/DefaultTestConns.cs @@ -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; diff --git a/OpenSim/Data/Tests/EstateTests.cs b/OpenSim/Data/Tests/EstateTests.cs index d6eed3dadd..fbf8ba658e 100644 --- a/OpenSim/Data/Tests/EstateTests.cs +++ b/OpenSim/Data/Tests/EstateTests.cs @@ -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 { diff --git a/OpenSim/Data/Tests/InventoryTests.cs b/OpenSim/Data/Tests/InventoryTests.cs index c22e26c3c9..9c2a2d6fd5 100644 --- a/OpenSim/Data/Tests/InventoryTests.cs +++ b/OpenSim/Data/Tests/InventoryTests.cs @@ -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.CreatorIdentification) + .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.CreatorIdentification) + .IgnoreProperty(x => x.CreatorData)); } [Test] diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs index eeffddaa1b..23d498d6fa 100644 --- a/OpenSim/Data/Tests/RegionTests.cs +++ b/OpenSim/Data/Tests/RegionTests.cs @@ -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 + public class SQLiteRegionTests : RegionTests { } [TestFixture(Description = "Region store tests (MySQL)")] - public class MySqlRegionTests : RegionTests + public class MySqlRegionTests : RegionTests { } [TestFixture(Description = "Region store tests (MS SQL Server)")] - public class MSSQLRegionTests : RegionTests + public class MSSQLRegionTests : RegionTests { } @@ -83,11 +79,11 @@ namespace OpenSim.Data.Tests public class RegionTests : BasicDataServiceTest 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,15 +232,15 @@ 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); List sogs = db.LoadObjects(newregion); 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)); } diff --git a/OpenSim/Framework/ACL.cs b/OpenSim/Framework/ACL.cs deleted file mode 100644 index f76e8b7288..0000000000 --- a/OpenSim/Framework/ACL.cs +++ /dev/null @@ -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 - - /// - /// Access Control List Engine - /// - public class ACL - { - private Dictionary Resources = new Dictionary(); - private Dictionary Roles = new Dictionary(); - - /// - /// Adds a new role - /// - /// - /// - public ACL AddRole(Role role) - { - if (Roles.ContainsKey(role.Name)) - throw new AlreadyContainsRoleException(role); - - Roles.Add(role.Name, role); - - return this; - } - - /// - /// Adds a new resource - /// - /// - /// - public ACL AddResource(Resource resource) - { - Resources.Add(resource.Name, resource); - - return this; - } - - /// - /// Permision for user/roll on a resource - /// - /// - /// - /// - 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 - - /// - /// Thrown when an ACL attempts to add a duplicate role. - /// - 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 - - /// - /// Does this Role have permission to access a specified Resource? - /// - public enum Permission - { - Deny, - None, - Allow - } ; - - /// - /// A role class, for use with Users or Groups - /// - public class Role - { - private string m_name; - private Role[] m_parents; - private Dictionary m_resources = new Dictionary(); - - 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 - - -} \ No newline at end of file diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 783a8337a5..1600bdc00d 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -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 /// public class AgentCircuitData { +// DEBUG ON + private static readonly ILog m_log = + LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); +// DEBUG OFF + /// /// Avatar Unique Agent Identifier /// @@ -108,10 +116,30 @@ namespace OpenSim.Framework public string ServiceSessionID = string.Empty; /// - /// Viewer's version string + /// The client's IP address, as captured by the login service + /// + public string IPAddress; + + /// + /// Viewer's version string as reported by the viewer at login /// public string Viewer; + /// + /// The channel strinf sent by the viewer at login + /// + public string Channel; + + /// + /// The Mac address as reported by the viewer at login + /// + public string Mac; + + /// + /// The id0 as reported by the viewer at login + /// + public string Id0; + /// /// Position the Agent's Avatar starts in the region /// @@ -175,40 +203,21 @@ namespace OpenSim.Framework args["inventory_folder"] = OSD.FromUUID(InventoryFolder); args["secure_session_id"] = OSD.FromUUID(SecureSessionID); args["session_id"] = OSD.FromUUID(SessionID); - + 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 attachments = Appearance.GetAttachmentDictionary(); - if ((attachments != null) && (attachments.Count > 0)) - { - OSDArray attachs = new OSDArray(attachments.Count); - foreach (KeyValuePair 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,40 +288,44 @@ 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); - Appearance = new AvatarAppearance(AgentID); - 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(); - } - } + m_log.InfoFormat("[AGENTCIRCUITDATA] agentid={0}, child={1}, startpos={2}",AgentID,child,startpos.ToString()); + + try { + // Unpack various appearance elements + Appearance = new AvatarAppearance(AgentID); - if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array) - { - OSDArray attachs = (OSDArray)(args["attachments"]); - AttachmentData[] attachments = new AttachmentData[attachs.Count]; - int i = 0; - foreach (OSD o in attachs) + // 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.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map)) { - if (o.Type == OSDType.Map) - { - attachments[i++] = new AttachmentData((OSDMap)o); - } + Appearance.Unpack((OSDMap)args["packed_appearance"]); + m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance"); } - Appearance.SetAttachments(attachments); + else + m_log.Warn("[AGENTCIRCUITDATA] failed to find a valid packed_appearance"); } - + catch (Exception e) + { + m_log.ErrorFormat("[AGENTCIRCUITDATA] failed to unpack appearance; {0}",e.Message); + } + ServiceURLs = new Dictionary(); if (args.ContainsKey("service_urls") && args["service_urls"] != null && (args["service_urls"]).Type == OSDType.Array) { @@ -349,6 +362,9 @@ namespace OpenSim.Framework public float startposy; public float startposz; public string Viewer; + public string Channel; + public string Mac; + public string Id0; public sAgentCircuitData() { diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs index 7806c1fc2d..f433235ec8 100644 --- a/OpenSim/Framework/AssetLandmark.cs +++ b/OpenSim/Framework/AssetLandmark.cs @@ -51,8 +51,16 @@ namespace OpenSim.Framework string[] parts = temp.Split('\n'); int.TryParse(parts[0].Substring(17, 1), out Version); UUID.TryParse(parts[1].Substring(10, 36), out RegionID); - // the vector is stored with spaces as separators, not with commas ("10.3 32.5 43" instead of "10.3, 32.5, 43") - Vector3.TryParse(parts[2].Substring(10, parts[2].Length - 10).Replace(" ", ","), out Position); + // The position is a vector with spaces as separators ("10.3 32.5 43"). + // Parse each scalar separately to take into account the system's culture setting. + string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' '); + if (scalars.Length > 0) + System.Single.TryParse(scalars[0], out Position.X); + if (scalars.Length > 1) + System.Single.TryParse(scalars[1], out Position.Y); + if (scalars.Length > 2) + System.Single.TryParse(scalars[2], out Position.Z); + ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); } } diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 5da8ba1368..5a6b265aad 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -26,9 +26,12 @@ */ using System; +using System.Reflection; using System.Collections; using System.Collections.Generic; using OpenMetaverse; +using OpenMetaverse.StructuredData; +using log4net; namespace OpenSim.Framework { @@ -37,48 +40,27 @@ namespace OpenSim.Framework /// public class AvatarAppearance { - //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - // 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 readonly static int BODY = 0; - public readonly static int SKIN = 1; - public readonly static int HAIR = 2; - public readonly static int EYES = 3; - public readonly static int SHIRT = 4; - public readonly static int PANTS = 5; - public readonly static int SHOES = 6; - public readonly static int SOCKS = 7; - public readonly static int JACKET = 8; - public readonly static int GLOVES = 9; - public readonly static int UNDERSHIRT = 10; - public readonly static int UNDERPANTS = 11; - public readonly static int SKIRT = 12; - - private readonly static int MAX_WEARABLES = 13; - - private static UUID BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73"); - private static UUID BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); - private static UUID SKIN_ASSET = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb"); - private static UUID SKIN_ITEM = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9"); - private static UUID SHIRT_ASSET = new UUID("00000000-38f9-1111-024e-222222111110"); - private static UUID SHIRT_ITEM = new UUID("77c41e39-38f9-f75a-0000-585989bf0000"); - private static UUID PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120"); - private static UUID PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111"); - private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); - private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public readonly static int VISUALPARAM_COUNT = 218; + public readonly static int TEXTURE_COUNT = 21; + public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; + protected UUID m_owner; + protected int m_serial = 0; + protected byte[] m_visualparams; + protected Primitive.TextureEntry m_texture; + protected AvatarWearable[] m_wearables; + protected Dictionary> m_attachments; + protected float m_avatarHeight = 0; + protected float m_hipOffset = 0; public virtual UUID Owner { get { return m_owner; } set { m_owner = value; } } - protected int m_serial = 1; public virtual int Serial { @@ -86,194 +68,23 @@ namespace OpenSim.Framework set { m_serial = value; } } - protected byte[] m_visualparams; - public virtual byte[] VisualParams { get { return m_visualparams; } set { m_visualparams = value; } } - protected AvatarWearable[] m_wearables; - - public virtual AvatarWearable[] Wearables - { - get { return m_wearables; } - set { m_wearables = value; } - } - - public virtual UUID BodyItem { - get { return m_wearables[BODY].ItemID; } - set { m_wearables[BODY].ItemID = value; } - } - - public virtual UUID BodyAsset { - get { return m_wearables[BODY].AssetID; } - set { m_wearables[BODY].AssetID = value; } - } - - public virtual UUID SkinItem { - get { return m_wearables[SKIN].ItemID; } - set { m_wearables[SKIN].ItemID = value; } - } - - public virtual UUID SkinAsset { - get { return m_wearables[SKIN].AssetID; } - set { m_wearables[SKIN].AssetID = value; } - } - - public virtual UUID HairItem { - get { return m_wearables[HAIR].ItemID; } - set { m_wearables[HAIR].ItemID = value; } - } - - public virtual UUID HairAsset { - get { return m_wearables[HAIR].AssetID; } - set { m_wearables[HAIR].AssetID = value; } - } - - public virtual UUID EyesItem { - get { return m_wearables[EYES].ItemID; } - set { m_wearables[EYES].ItemID = value; } - } - - public virtual UUID EyesAsset { - get { return m_wearables[EYES].AssetID; } - set { m_wearables[EYES].AssetID = value; } - } - - public virtual UUID ShirtItem { - get { return m_wearables[SHIRT].ItemID; } - set { m_wearables[SHIRT].ItemID = value; } - } - - public virtual UUID ShirtAsset { - get { return m_wearables[SHIRT].AssetID; } - set { m_wearables[SHIRT].AssetID = value; } - } - - public virtual UUID PantsItem { - get { return m_wearables[PANTS].ItemID; } - set { m_wearables[PANTS].ItemID = value; } - } - - public virtual UUID PantsAsset { - get { return m_wearables[PANTS].AssetID; } - set { m_wearables[PANTS].AssetID = value; } - } - - public virtual UUID ShoesItem { - get { return m_wearables[SHOES].ItemID; } - set { m_wearables[SHOES].ItemID = value; } - } - - public virtual UUID ShoesAsset { - get { return m_wearables[SHOES].AssetID; } - set { m_wearables[SHOES].AssetID = value; } - } - - public virtual UUID SocksItem { - get { return m_wearables[SOCKS].ItemID; } - set { m_wearables[SOCKS].ItemID = value; } - } - - public virtual UUID SocksAsset { - get { return m_wearables[SOCKS].AssetID; } - set { m_wearables[SOCKS].AssetID = value; } - } - - public virtual UUID JacketItem { - get { return m_wearables[JACKET].ItemID; } - set { m_wearables[JACKET].ItemID = value; } - } - - public virtual UUID JacketAsset { - get { return m_wearables[JACKET].AssetID; } - set { m_wearables[JACKET].AssetID = value; } - } - - public virtual UUID GlovesItem { - get { return m_wearables[GLOVES].ItemID; } - set { m_wearables[GLOVES].ItemID = value; } - } - - public virtual UUID GlovesAsset { - get { return m_wearables[GLOVES].AssetID; } - set { m_wearables[GLOVES].AssetID = value; } - } - - public virtual UUID UnderShirtItem { - get { return m_wearables[UNDERSHIRT].ItemID; } - set { m_wearables[UNDERSHIRT].ItemID = value; } - } - - public virtual UUID UnderShirtAsset { - get { return m_wearables[UNDERSHIRT].AssetID; } - set { m_wearables[UNDERSHIRT].AssetID = value; } - } - - public virtual UUID UnderPantsItem { - get { return m_wearables[UNDERPANTS].ItemID; } - set { m_wearables[UNDERPANTS].ItemID = value; } - } - - public virtual UUID UnderPantsAsset { - get { return m_wearables[UNDERPANTS].AssetID; } - set { m_wearables[UNDERPANTS].AssetID = value; } - } - - public virtual UUID SkirtItem { - get { return m_wearables[SKIRT].ItemID; } - set { m_wearables[SKIRT].ItemID = value; } - } - - public virtual UUID SkirtAsset { - get { return m_wearables[SKIRT].AssetID; } - set { m_wearables[SKIRT].AssetID = value; } - } - - public virtual void SetDefaultWearables() - { - m_wearables[BODY].AssetID = BODY_ASSET; - m_wearables[BODY].ItemID = BODY_ITEM; - m_wearables[SKIN].AssetID = SKIN_ASSET; - m_wearables[SKIN].ItemID = SKIN_ITEM; - m_wearables[HAIR].AssetID = HAIR_ASSET; - m_wearables[HAIR].ItemID = HAIR_ITEM; - m_wearables[SHIRT].AssetID = SHIRT_ASSET; - m_wearables[SHIRT].ItemID = SHIRT_ITEM; - m_wearables[PANTS].AssetID = PANTS_ASSET; - m_wearables[PANTS].ItemID = PANTS_ITEM; - } - - public virtual void ClearWearables() - { - for (int i = 0; i < 13; i++) - { - m_wearables[i].AssetID = UUID.Zero; - m_wearables[i].ItemID = UUID.Zero; - } - } - - public virtual void SetDefaultParams(byte[] vparams) - { - // TODO: Figure out better values then 'fat scientist 150' or 'alien 0' - for (int i = 0; i < VISUALPARAM_COUNT; i++) - { - vparams[i] = 150; - } - } - - protected Primitive.TextureEntry m_texture; - public virtual Primitive.TextureEntry Texture { get { return m_texture; } set { m_texture = value; } } - protected float m_avatarHeight = 0; - protected float m_hipOffset = 0; + public virtual AvatarWearable[] Wearables + { + get { return m_wearables; } + set { m_wearables = value; } + } public virtual float AvatarHeight { @@ -286,103 +97,250 @@ namespace OpenSim.Framework get { return m_hipOffset; } } - //Builds the VisualParam Enum using LIBOMV's Visual Param NameValues - /* - public void BuildVisualParamEnum() - { - Dictionary IndexedParams = new Dictionary(); - int vpIndex = 0; - IndexedParams = new Dictionary(); - - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - - sb.Append("public enum VPElement: int\n"); - sb.Append("{\n"); - foreach (KeyValuePair kvp in OpenMetaverse.VisualParams.Params) - { - VisualParam vp = kvp.Value; - - // Only Group-0 parameters are sent in AgentSetAppearance packets - if (kvp.Value.Group == 0) - { - - if (!IndexedParams.ContainsKey(vp.Name)) - { - - if (vp.Label.Length > 0 || vp.LabelMin.Length > 0 || vp.LabelMax.Length > 0) - { - - sb.Append("/// \n"); - if (vp.LabelMin.Length > 0 && vp.LabelMax.Length > 0) - sb.Append(string.Format("/// {0} - {1} 0--+255 {2}\n", vp.Label, vp.LabelMin, - vp.LabelMax)); - - else - sb.Append(string.Format("/// {0}\n", vp.Label)); - - sb.Append("/// \n"); - } - sb.Append(string.Format(" {0}_{1} = {2}", vp.Wearable.ToUpper(), vp.Name.ToUpper().Replace(" ", "_"),vpIndex)); - - IndexedParams.Add(vp.Name, vpIndex++); - } - else - { - sb.Append(string.Format(" {0}_{1}_{2} = {2}", vp.Wearable.ToUpper(), vp.Name.ToUpper().Replace(" ", "_"), vpIndex)); - vpIndex++; - //int i = 0; - } - } - if (vpIndex < 217) - sb.Append(",\n"); - else - sb.Append("\n"); - - } - sb.Append("}\n"); - - } - */ - public AvatarAppearance() : this(UUID.Zero) {} public AvatarAppearance(UUID owner) { - m_wearables = new AvatarWearable[MAX_WEARABLES]; - for (int i = 0; i < MAX_WEARABLES; i++) - { - // this makes them all null - m_wearables[i] = new AvatarWearable(); - } +// m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance for {0}",owner); + m_serial = 0; m_owner = owner; - //BuildVisualParamEnum() - m_visualparams = new byte[VISUALPARAM_COUNT]; - // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist - SetDefaultParams(m_visualparams); + SetDefaultWearables(); - m_texture = GetDefaultTexture(); + SetDefaultTexture(); + SetDefaultParams(); + SetHeight(); + + m_attachments = new Dictionary>(); } - - public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) + + public AvatarAppearance(UUID avatarID, OSDMap map) { +// m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID); + m_owner = avatarID; - m_serial = 1; - m_wearables = wearables; - m_visualparams = visualParams; - m_texture = GetDefaultTexture(); + Unpack(map); + SetHeight(); + } + + public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) + { +// m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID); + + m_serial = 0; + m_owner = avatarID; + + if (wearables != null) + m_wearables = wearables; + else + SetDefaultWearables(); + + if (textureEntry != null) + m_texture = textureEntry; + else + SetDefaultTexture(); + + if (visualParams != null) + m_visualparams = visualParams; + else + SetDefaultParams(); + + SetHeight(); + + m_attachments = new Dictionary>(); + } + + public AvatarAppearance(AvatarAppearance appearance) : this(appearance, true) + { + } + + public AvatarAppearance(AvatarAppearance appearance, bool copyWearables) + { +// m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance"); + + if (appearance == null) + { + m_serial = 0; + m_owner = UUID.Zero; + + SetDefaultWearables(); + SetDefaultTexture(); + SetDefaultParams(); + SetHeight(); + + m_attachments = new Dictionary>(); + + return; + } + + m_serial = appearance.Serial; + m_owner = appearance.Owner; + + m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) + m_wearables[i] = new AvatarWearable(); + if (copyWearables && (appearance.Wearables != null)) + { + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) + SetWearable(i,appearance.Wearables[i]); + } + + m_texture = null; + if (appearance.Texture != null) + { + byte[] tbytes = appearance.Texture.GetBytes(); + m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length); + } + + m_visualparams = null; + if (appearance.VisualParams != null) + m_visualparams = (byte[])appearance.VisualParams.Clone(); + + // Copy the attachment, force append mode since that ensures consistency + m_attachments = new Dictionary>(); + foreach (AvatarAttachment attachment in appearance.GetAttachments()) + AppendAttachment(new AvatarAttachment(attachment)); + } + + public void GetAssetsFrom(AvatarAppearance app) + { + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) + { + for (int j = 0; j < m_wearables[i].Count; j++) + { + UUID itemID = m_wearables[i][j].ItemID; + UUID assetID = app.Wearables[i].GetAsset(itemID); + + if (assetID != UUID.Zero) + m_wearables[i].Add(itemID, assetID); + } + } + } + + public void ClearWearables() + { + m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) + m_wearables[i] = new AvatarWearable(); + } + + protected virtual void SetDefaultWearables() + { + m_wearables = AvatarWearable.DefaultWearables; } /// - /// Set up appearance textures and avatar parameters, including a height calculation + /// Invalidate all of the baked textures in the appearance, useful + /// if you know that none are valid /// + public virtual void ResetAppearance() + { + m_serial = 0; + + SetDefaultParams(); + SetDefaultTexture(); + + //for (int i = 0; i < BAKE_INDICES.Length; i++) + // { + // int idx = BAKE_INDICES[i]; + // m_texture.FaceTextures[idx].TextureID = UUID.Zero; + // } + } + + protected virtual void SetDefaultParams() + { + m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 }; +// for (int i = 0; i < VISUALPARAM_COUNT; i++) +// { +// m_visualparams[i] = 150; +// } + } + + protected virtual void SetDefaultTexture() + { + m_texture = new Primitive.TextureEntry(new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE)); + + // for (uint i = 0; i < TEXTURE_COUNT; i++) + // m_texture.CreateFace(i).TextureID = new UUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE); + } + + /// + /// Set up appearance textures. + /// Returns boolean that indicates whether the new entries actually change the + /// existing values. + /// + public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry) + { + if (textureEntry == null) + return false; + + // There are much simpler versions of this copy that could be + // made. We determine if any of the textures actually + // changed to know if the appearance should be saved later + bool changed = false; + for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++) + { + Primitive.TextureEntryFace newface = textureEntry.FaceTextures[i]; + Primitive.TextureEntryFace oldface = m_texture.FaceTextures[i]; + + if (newface == null) + { + if (oldface == null) continue; + } + else + { + if (oldface != null && oldface.TextureID == newface.TextureID) continue; + } + + changed = true; + } + + m_texture = textureEntry; + return changed; + } + + /// + /// Set up visual parameters for the avatar and refresh the avatar height + /// Returns boolean that indicates whether the new entries actually change the + /// existing values. + /// + public virtual bool SetVisualParams(byte[] visualParams) + { + if (visualParams == null) + return false; + + // There are much simpler versions of this copy that could be + // made. We determine if any of the visual parameters actually + // changed to know if the appearance should be saved later + bool changed = false; + for (int i = 0; i < AvatarAppearance.VISUALPARAM_COUNT; i++) + { + if (visualParams[i] != m_visualparams[i]) + { +// DEBUG ON +// m_log.WarnFormat("[AVATARAPPEARANCE] vparams changed [{0}] {1} ==> {2}", +// i,m_visualparams[i],visualParams[i]); +// DEBUG OFF + m_visualparams[i] = visualParams[i]; + changed = true; + } + } + + // Reset the height if the visual parameters actually changed + if (changed) + SetHeight(); + + return changed; + } + public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams) { - if (textureEntry != null) - m_texture = textureEntry; - if (visualParams != null) - m_visualparams = visualParams; + SetTextureEntries(textureEntry); + SetVisualParams(visualParams); + } + public virtual void SetHeight() + { m_avatarHeight = 1.23077f // Shortest possible avatar height + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height + 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size @@ -390,299 +348,152 @@ namespace OpenSim.Framework + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; // Neck length + m_hipOffset = (((1.23077f // Half of avatar + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height + 0.3836f * (float)m_visualparams[(int)VPElement.SHAPE_LEG_LENGTH] / 255.0f // Leg length + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f // Shoe platform height + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f // Shoe heel height ) / 2) - m_avatarHeight / 2) * 0.31f - 0.0425f; - - - - //System.Console.WriteLine(">>>>>>> [APPEARANCE]: Height {0} Hip offset {1}" + m_avatarHeight + " " + m_hipOffset); - //m_log.Debug("------------- Set Appearance Texture ---------------"); - //Primitive.TextureEntryFace[] faces = Texture.FaceTextures; - //foreach (Primitive.TextureEntryFace face in faces) - //{ - // if (face != null) - // m_log.Debug(" ++ " + face.TextureID); - // else - // m_log.Debug(" ++ NULL "); - //} - //m_log.Debug("----------------------------"); - } public virtual void SetWearable(int wearableId, AvatarWearable wearable) { - m_wearables[wearableId] = wearable; - } - - public static Primitive.TextureEntry GetDefaultTexture() - { - Primitive.TextureEntry textu = new Primitive.TextureEntry(new UUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); - textu.CreateFace(0).TextureID = new UUID("00000000-0000-1111-9999-000000000012"); - textu.CreateFace(1).TextureID = Util.BLANK_TEXTURE_UUID; - textu.CreateFace(2).TextureID = Util.BLANK_TEXTURE_UUID; - textu.CreateFace(3).TextureID = new UUID("6522E74D-1660-4E7F-B601-6F48C1659A77"); - textu.CreateFace(4).TextureID = new UUID("7CA39B4C-BD19-4699-AFF7-F93FD03D3E7B"); - textu.CreateFace(5).TextureID = new UUID("00000000-0000-1111-9999-000000000010"); - textu.CreateFace(6).TextureID = new UUID("00000000-0000-1111-9999-000000000011"); - return textu; - } - - public static byte[] GetDefaultVisualParams() - { - byte[] visualParams; - visualParams = new byte[VISUALPARAM_COUNT]; - for (int i = 0; i < VISUALPARAM_COUNT; i++) - { - visualParams[i] = 100; - } - return visualParams; +// DEBUG ON +// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); +// DEBUG OFF + m_wearables[wearableId].Clear(); + for (int i = 0; i < wearable.Count; i++) + m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); } +// DEBUG ON public override String ToString() { - String s = "[Wearables] =>"; - s += " Body Item: " + BodyItem.ToString() + ";"; - s += " Skin Item: " + SkinItem.ToString() + ";"; - s += " Shirt Item: " + ShirtItem.ToString() + ";"; - s += " Pants Item: " + PantsItem.ToString() + ";"; + String s = ""; + + s += String.Format("Serial: {0}\n",m_serial); + + for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++) + if (m_texture.FaceTextures[i] != null) + s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID); + + foreach (AvatarWearable awear in m_wearables) + { + for (int i = 0; i < awear.Count; i++) + s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID); + } + + s += "Visual Params: "; + for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) + s += String.Format("{0},",m_visualparams[j]); + s += "\n"; + return s; } +// DEBUG OFF - // this is used for OGS1 - public virtual Hashtable ToHashTable() + /// + /// Get a list of the attachments, note that there may be + /// duplicate attachpoints + /// + public List GetAttachments() { - Hashtable h = new Hashtable(); - h["owner"] = Owner.ToString(); - h["serial"] = Serial.ToString(); - h["visual_params"] = VisualParams; - h["texture"] = Texture.GetBytes(); - h["avatar_height"] = AvatarHeight.ToString(); - h["body_item"] = BodyItem.ToString(); - h["body_asset"] = BodyAsset.ToString(); - h["skin_item"] = SkinItem.ToString(); - h["skin_asset"] = SkinAsset.ToString(); - h["hair_item"] = HairItem.ToString(); - h["hair_asset"] = HairAsset.ToString(); - h["eyes_item"] = EyesItem.ToString(); - h["eyes_asset"] = EyesAsset.ToString(); - h["shirt_item"] = ShirtItem.ToString(); - h["shirt_asset"] = ShirtAsset.ToString(); - h["pants_item"] = PantsItem.ToString(); - h["pants_asset"] = PantsAsset.ToString(); - h["shoes_item"] = ShoesItem.ToString(); - h["shoes_asset"] = ShoesAsset.ToString(); - h["socks_item"] = SocksItem.ToString(); - h["socks_asset"] = SocksAsset.ToString(); - h["jacket_item"] = JacketItem.ToString(); - h["jacket_asset"] = JacketAsset.ToString(); - h["gloves_item"] = GlovesItem.ToString(); - h["gloves_asset"] = GlovesAsset.ToString(); - h["undershirt_item"] = UnderShirtItem.ToString(); - h["undershirt_asset"] = UnderShirtAsset.ToString(); - h["underpants_item"] = UnderPantsItem.ToString(); - h["underpants_asset"] = UnderPantsAsset.ToString(); - h["skirt_item"] = SkirtItem.ToString(); - h["skirt_asset"] = SkirtAsset.ToString(); - - string attachments = GetAttachmentsString(); - if (attachments != String.Empty) - h["attachments"] = attachments; - - return h; - } - - public AvatarAppearance(Hashtable h) - { - Owner = new UUID((string)h["owner"]); - Serial = Convert.ToInt32((string)h["serial"]); - VisualParams = (byte[])h["visual_params"]; - - if (h.Contains("texture")) + List alist = new List(); + foreach (KeyValuePair> kvp in m_attachments) { - byte[] te = h["texture"] as byte[]; - if (te != null && te.Length > 0) - Texture = new Primitive.TextureEntry(te, 0, te.Length); - } - else - { - // We shouldn't be receiving appearance hashtables without a TextureEntry, - // but in case we do this will prevent a failure when saving to the database - Texture = GetDefaultTexture(); + foreach (AvatarAttachment attach in kvp.Value) + alist.Add(new AvatarAttachment(attach)); } - - AvatarHeight = (float)Convert.ToDouble((string)h["avatar_height"]); - - m_wearables = new AvatarWearable[MAX_WEARABLES]; - for (int i = 0; i < MAX_WEARABLES; i++) - { - // this makes them all null - m_wearables[i] = new AvatarWearable(); - } - - BodyItem = new UUID((string)h["body_item"]); - BodyAsset = new UUID((string)h["body_asset"]); - SkinItem = new UUID((string)h["skin_item"]); - SkinAsset = new UUID((string)h["skin_asset"]); - HairItem = new UUID((string)h["hair_item"]); - HairAsset = new UUID((string)h["hair_asset"]); - EyesItem = new UUID((string)h["eyes_item"]); - EyesAsset = new UUID((string)h["eyes_asset"]); - ShirtItem = new UUID((string)h["shirt_item"]); - ShirtAsset = new UUID((string)h["shirt_asset"]); - PantsItem = new UUID((string)h["pants_item"]); - PantsAsset = new UUID((string)h["pants_asset"]); - ShoesItem = new UUID((string)h["shoes_item"]); - ShoesAsset = new UUID((string)h["shoes_asset"]); - SocksItem = new UUID((string)h["socks_item"]); - SocksAsset = new UUID((string)h["socks_asset"]); - JacketItem = new UUID((string)h["jacket_item"]); - JacketAsset = new UUID((string)h["jacket_asset"]); - GlovesItem = new UUID((string)h["gloves_item"]); - GlovesAsset = new UUID((string)h["gloves_asset"]); - UnderShirtItem = new UUID((string)h["undershirt_item"]); - UnderShirtAsset = new UUID((string)h["undershirt_asset"]); - UnderPantsItem = new UUID((string)h["underpants_item"]); - UnderPantsAsset = new UUID((string)h["underpants_asset"]); - SkirtItem = new UUID((string)h["skirt_item"]); - SkirtAsset = new UUID((string)h["skirt_asset"]); - - if (h.ContainsKey("attachments")) - { - SetAttachmentsString(h["attachments"].ToString()); - } + return alist; } - private Dictionary m_attachments = new Dictionary(); - - public void SetAttachments(AttachmentData[] data) + internal void AppendAttachment(AvatarAttachment attach) { - foreach (AttachmentData a in data) - { - m_attachments[a.AttachPoint] = new UUID[2]; - m_attachments[a.AttachPoint][0] = a.ItemID; - m_attachments[a.AttachPoint][1] = a.AssetID; - } + if (! m_attachments.ContainsKey(attach.AttachPoint)) + m_attachments[attach.AttachPoint] = new List(); + m_attachments[attach.AttachPoint].Add(attach); } - public void SetAttachments(Hashtable data) + internal void ReplaceAttachment(AvatarAttachment attach) { - m_attachments.Clear(); - - if (data == null) - return; - - foreach (DictionaryEntry e in data) - { - int attachpoint = Convert.ToInt32(e.Key); - - if (m_attachments.ContainsKey(attachpoint)) - continue; - - UUID item; - UUID asset; - - Hashtable uuids = (Hashtable) e.Value; - UUID.TryParse(uuids["item"].ToString(), out item); - UUID.TryParse(uuids["asset"].ToString(), out asset); - - UUID[] attachment = new UUID[2]; - attachment[0] = item; - attachment[1] = asset; - - m_attachments[attachpoint] = attachment; - } + m_attachments[attach.AttachPoint] = new List(); + m_attachments[attach.AttachPoint].Add(attach); } - public Dictionary GetAttachmentDictionary() - { - return m_attachments; - } - - public Hashtable GetAttachments() - { - if (m_attachments.Count == 0) - return null; - - Hashtable ret = new Hashtable(); - - foreach (KeyValuePair kvp in m_attachments) - { - int attachpoint = kvp.Key; - UUID[] uuids = kvp.Value; - - Hashtable data = new Hashtable(); - data["item"] = uuids[0].ToString(); - data["asset"] = uuids[1].ToString(); - - ret[attachpoint] = data; - } - - return ret; - } - - public List GetAttachedPoints() - { - return new List(m_attachments.Keys); - } - - public UUID GetAttachedItem(int attachpoint) - { - if (!m_attachments.ContainsKey(attachpoint)) - return UUID.Zero; - - return m_attachments[attachpoint][0]; - } - - public UUID GetAttachedAsset(int attachpoint) - { - if (!m_attachments.ContainsKey(attachpoint)) - return UUID.Zero; - - return m_attachments[attachpoint][1]; - } - - public void SetAttachment(int attachpoint, UUID item, UUID asset) + /// + /// Add an attachment, if the attachpoint has the + /// 0x80 bit set then we assume this is an append + /// operation otherwise we replace whatever is + /// currently attached at the attachpoint + /// return true if something actually changed + /// + public bool SetAttachment(int attachpoint, UUID item, UUID asset) { if (attachpoint == 0) - return; + return false; if (item == UUID.Zero) { if (m_attachments.ContainsKey(attachpoint)) + { m_attachments.Remove(attachpoint); - return; + return true; + } + return false; } - if (!m_attachments.ContainsKey(attachpoint)) - m_attachments[attachpoint] = new UUID[2]; - - m_attachments[attachpoint][0] = item; - m_attachments[attachpoint][1] = asset; + // check if the item is already attached at this point + if (GetAttachpoint(item) == (attachpoint & 0x7F)) + { + // m_log.DebugFormat("[AVATAR APPEARANCE] attempt to attach an already attached item {0}",item); + return false; + } + + // check if this is an append or a replace, 0x80 marks it as an append + if ((attachpoint & 0x80) > 0) + { + // strip the append bit + int point = attachpoint & 0x7F; + AppendAttachment(new AvatarAttachment(point, item, asset)); + } + else + { + ReplaceAttachment(new AvatarAttachment(attachpoint,item,asset)); + } + return true; } public int GetAttachpoint(UUID itemID) { - foreach (KeyValuePair kvp in m_attachments) + foreach (KeyValuePair> kvp in m_attachments) { - if (kvp.Value[0] == itemID) - { + int index = kvp.Value.FindIndex(delegate(AvatarAttachment a) { return a.ItemID == itemID; }); + if (index >= 0) return kvp.Key; - } } + return 0; } - public void DetachAttachment(UUID itemID) + public bool DetachAttachment(UUID itemID) { - int attachpoint = GetAttachpoint(itemID); + foreach (KeyValuePair> kvp in m_attachments) + { + int index = kvp.Value.FindIndex(delegate(AvatarAttachment a) { return a.ItemID == itemID; }); + if (index >= 0) + { + // Remove it from the list of attachments at that attach point + m_attachments[kvp.Key].RemoveAt(index); - if (attachpoint > 0) - m_attachments.Remove(attachpoint); + // And remove the list if there are no more attachments here + if (m_attachments[kvp.Key].Count == 0) + m_attachments.Remove(kvp.Key); + return true; + } + } + return false; } public void ClearAttachments() @@ -690,42 +501,126 @@ namespace OpenSim.Framework m_attachments.Clear(); } - string GetAttachmentsString() + #region Packing Functions + + /// + /// Create an OSDMap from the appearance data + /// + public OSDMap Pack() { - List strings = new List(); + OSDMap data = new OSDMap(); - foreach (KeyValuePair e in m_attachments) + data["serial"] = OSD.FromInteger(m_serial); + data["height"] = OSD.FromReal(m_avatarHeight); + data["hipoffset"] = OSD.FromReal(m_hipOffset); + + // Wearables + OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES); + for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) + wears.Add(m_wearables[i].Pack()); + data["wearables"] = wears; + + // Avatar Textures + OSDArray textures = new OSDArray(AvatarAppearance.TEXTURE_COUNT); + for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++) { - strings.Add(e.Key.ToString()); - strings.Add(e.Value[0].ToString()); - strings.Add(e.Value[1].ToString()); + if (m_texture.FaceTextures[i] != null) + textures.Add(OSD.FromUUID(m_texture.FaceTextures[i].TextureID)); + else + textures.Add(OSD.FromUUID(AppearanceManager.DEFAULT_AVATAR_TEXTURE)); } + data["textures"] = textures; - return String.Join(",", strings.ToArray()); + // Visual Parameters + OSDBinary visualparams = new OSDBinary(m_visualparams); + data["visualparams"] = visualparams; + + // Attachments + OSDArray attachs = new OSDArray(m_attachments.Count); + foreach (AvatarAttachment attach in GetAttachments()) + attachs.Add(attach.Pack()); + data["attachments"] = attachs; + + return data; } - void SetAttachmentsString(string data) + /// + /// Unpack and OSDMap and initialize the appearance + /// from it + /// + public void Unpack(OSDMap data) { - string[] strings = data.Split(new char[] {','}); - int i = 0; + if ((data != null) && (data["serial"] != null)) + m_serial = data["serial"].AsInteger(); + if ((data != null) && (data["height"] != null)) + m_avatarHeight = (float)data["height"].AsReal(); + if ((data != null) && (data["hipoffset"] != null)) + m_hipOffset = (float)data["hipoffset"].AsReal(); - m_attachments.Clear(); - - while (strings.Length - i > 2) + try { - int attachpoint = Int32.Parse(strings[i]); - UUID item = new UUID(strings[i+1]); - UUID asset = new UUID(strings[i+2]); - i += 3; - - if (!m_attachments.ContainsKey(attachpoint)) + // Wearables + SetDefaultWearables(); + if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array) { - m_attachments[attachpoint] = new UUID[2]; - m_attachments[attachpoint][0] = item; - m_attachments[attachpoint][1] = asset; + OSDArray wears = (OSDArray)(data["wearables"]); + for (int i = 0; i < wears.Count; i++) + m_wearables[i] = new AvatarWearable((OSDArray)wears[i]); + } + else + { + m_log.Warn("[AVATAR APPEARANCE]: failed to unpack wearables"); + } + + // Avatar Textures + SetDefaultTexture(); + if ((data != null) && (data["textures"] != null) && (data["textures"]).Type == OSDType.Array) + { + OSDArray textures = (OSDArray)(data["textures"]); + for (int i = 0; i < AvatarAppearance.TEXTURE_COUNT && i < textures.Count; i++) + { + UUID textureID = AppearanceManager.DEFAULT_AVATAR_TEXTURE; + if (textures[i] != null) + textureID = textures[i].AsUUID(); + m_texture.CreateFace((uint)i).TextureID = new UUID(textureID); + } + } + else + { + m_log.Warn("[AVATAR APPEARANCE]: failed to unpack textures"); + } + + // Visual Parameters + SetDefaultParams(); + if ((data != null) && (data["visualparams"] != null)) + { + if ((data["visualparams"].Type == OSDType.Binary) || (data["visualparams"].Type == OSDType.Array)) + m_visualparams = data["visualparams"].AsBinary(); + } + else + { + m_log.Warn("[AVATAR APPEARANCE]: failed to unpack visual parameters"); + } + + // Attachments + m_attachments = new Dictionary>(); + if ((data != null) && (data["attachments"] != null) && (data["attachments"]).Type == OSDType.Array) + { + OSDArray attachs = (OSDArray)(data["attachments"]); + for (int i = 0; i < attachs.Count; i++) + AppendAttachment(new AvatarAttachment((OSDMap)attachs[i])); } } + catch (Exception e) + { + m_log.ErrorFormat("[AVATAR APPEARANCE]: unpack failed badly: {0}{1}", e.Message, e.StackTrace); + } } + + #endregion + + #region VPElement + /// /// Viewer Params Array Element for AgentSetAppearance /// Generated from LibOMV's Visual Params list @@ -1488,5 +1383,6 @@ namespace OpenSim.Framework SKIRT_SKIRT_GREEN = 216, SKIRT_SKIRT_BLUE = 217 } + #endregion } -} \ No newline at end of file +} diff --git a/OpenSim/Tools/OpenSim.GridLaunch/GUI/Service/Service.cs b/OpenSim/Framework/AvatarAttachment.cs similarity index 59% rename from OpenSim/Tools/OpenSim.GridLaunch/GUI/Service/Service.cs rename to OpenSim/Framework/AvatarAttachment.cs index f518bd79f7..c68d78d74e 100644 --- a/OpenSim/Tools/OpenSim.GridLaunch/GUI/Service/Service.cs +++ b/OpenSim/Framework/AvatarAttachment.cs @@ -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; + } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index 87d9e617b8..8e27596b85 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs @@ -26,56 +26,225 @@ */ 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"); + + protected Dictionary m_items = new Dictionary(); + protected List m_ids = new List(); 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 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++) + AvatarWearable[] 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; } diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index da953bbef0..c2f9c3ab7b 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -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; + } + /// /// Called by the notecard update handler. Provides a URL to which the client can upload a new asset. /// @@ -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,18 @@ 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); + } + /// /// Called when new asset data for an agent inventory item update has been uploaded. /// @@ -1243,5 +1317,53 @@ 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; +// m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID); + } + + /// + /// + /// + /// + /// + /// + /// + public string uploaderCaps(byte[] data, string path, string param) + { + handlerUpLoad = OnUpLoad; + if (handlerUpLoad != null) + { + Util.FireAndForget(delegate(object o) { handlerUpLoad(newAssetID, data); }); + } + + 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); + +// m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID); + + return res; + } + } } } diff --git a/OpenSim/Framework/Capabilities/CapsHandlers.cs b/OpenSim/Framework/Capabilities/CapsHandlers.cs index f000aed3c2..864e6ddb7e 100644 --- a/OpenSim/Framework/Capabilities/CapsHandlers.cs +++ b/OpenSim/Framework/Capabilities/CapsHandlers.cs @@ -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; diff --git a/OpenSim/Framework/Capabilities/CapsUtil.cs b/OpenSim/Framework/Capabilities/CapsUtil.cs index 0334e4b4a2..faf2708541 100644 --- a/OpenSim/Framework/Capabilities/CapsUtil.cs +++ b/OpenSim/Framework/Capabilities/CapsUtil.cs @@ -41,7 +41,7 @@ namespace OpenSim.Framework.Capabilities /// public static string GetCapsSeedPath(string capsObjectPath) { - return "/CAPS/" + capsObjectPath + "0000/"; + return "CAPS/" + capsObjectPath + "0000/"; } /// diff --git a/OpenSim/Framework/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Framework/Capabilities/LLSDAssetUploadResponse.cs index 08f14e302f..0d6f7f9423 100644 --- a/OpenSim/Framework/Capabilities/LLSDAssetUploadResponse.cs +++ b/OpenSim/Framework/Capabilities/LLSDAssetUploadResponse.cs @@ -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"; + } + } } \ No newline at end of file diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 89ee39cecc..ce0b2fb784 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs @@ -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,8 @@ namespace OpenSim.Framework public virtual OSDMap Pack() { + m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data"); + OSDMap args = new OSDMap(); args["message_type"] = OSD.FromString("AgentData"); @@ -413,6 +386,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 +397,37 @@ namespace OpenSim.Framework // args["agent_textures"] = textures; //} - - if ((AgentTextures != null) && (AgentTextures.Length > 0)) - args["texture_entry"] = OSD.FromBinary(AgentTextures); + // 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 ((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 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 +452,8 @@ namespace OpenSim.Framework /// public virtual void Unpack(OSDMap args) { + m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Unpack data"); + if (args.ContainsKey("region_id")) UUID.TryParse(args["region_id"].AsString(), out RegionID); @@ -581,34 +566,51 @@ 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"]); + else + m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance"); if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array) { diff --git a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs deleted file mode 100644 index bcd1eee05c..0000000000 --- a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs +++ /dev/null @@ -1,104 +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.Collections.Generic; -using OpenSim.Data; -using OpenMetaverse; -using OpenSim.Services.Interfaces; - -namespace OpenSim.Framework.Communications.Osp -{ - /// - /// Wrap other inventory data plugins so that we can perform OSP related post processing for items - /// - public class OspInventoryWrapperPlugin : IInventoryDataPlugin - { - protected IInventoryDataPlugin m_wrappedPlugin; - //protected CommunicationsManager m_commsManager; - protected IUserAccountService m_userAccountService; - - public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, IUserAccountService userService) - { - m_wrappedPlugin = wrappedPlugin; - m_userAccountService = userService; - } - - public string Name { get { return "OspInventoryWrapperPlugin"; } } - public string Version { get { return "0.1"; } } - public void Initialise() {} - public void Initialise(string connect) {} - public void Dispose() {} - - public InventoryItemBase getInventoryItem(UUID item) - { - return PostProcessItem(m_wrappedPlugin.getInventoryItem(item)); - } - - // XXX: Why on earth does this exist as it appears to duplicate getInventoryItem? - public InventoryItemBase queryInventoryItem(UUID item) - { - return PostProcessItem(m_wrappedPlugin.queryInventoryItem(item)); - } - - public List getInventoryInFolder(UUID folderID) - { - List items = m_wrappedPlugin.getInventoryInFolder(folderID); - - foreach (InventoryItemBase item in items) - PostProcessItem(item); - - return items; - } - - public List fetchActiveGestures(UUID avatarID) - { - return m_wrappedPlugin.fetchActiveGestures(avatarID); - - // Presuming that no post processing is needed here as gestures don't refer to creator information (?) - } - - protected InventoryItemBase PostProcessItem(InventoryItemBase item) - { - item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_userAccountService); - return item; - } - - public List getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); } - public List getUserRootFolders(UUID user) { return m_wrappedPlugin.getUserRootFolders(user); } - public InventoryFolderBase getUserRootFolder(UUID user) { return m_wrappedPlugin.getUserRootFolder(user); } - public List getInventoryFolders(UUID parentID) { return m_wrappedPlugin.getInventoryFolders(parentID); } - public InventoryFolderBase getInventoryFolder(UUID folder) { return m_wrappedPlugin.getInventoryFolder(folder); } - public void addInventoryItem(InventoryItemBase item) { m_wrappedPlugin.addInventoryItem(item); } - public void updateInventoryItem(InventoryItemBase item) { m_wrappedPlugin.updateInventoryItem(item); } - public void deleteInventoryItem(UUID item) { m_wrappedPlugin.deleteInventoryItem(item); } - public InventoryFolderBase queryInventoryFolder(UUID folder) { return m_wrappedPlugin.queryInventoryFolder(folder); } - public void addInventoryFolder(InventoryFolderBase folder) { m_wrappedPlugin.addInventoryFolder(folder); } - public void updateInventoryFolder(InventoryFolderBase folder) { m_wrappedPlugin.updateInventoryFolder(folder); } - public void moveInventoryFolder(InventoryFolderBase folder) { m_wrappedPlugin.moveInventoryFolder(folder); } - public void deleteInventoryFolder(UUID folder) { m_wrappedPlugin.deleteInventoryFolder(folder); } - } -} diff --git a/OpenSim/Framework/ConfigSettings.cs b/OpenSim/Framework/ConfigSettings.cs index 8feaa372ee..be7734128f 100644 --- a/OpenSim/Framework/ConfigSettings.cs +++ b/OpenSim/Framework/ConfigSettings.cs @@ -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 { diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index b17dbc08de..52bcd5599b 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -151,7 +151,7 @@ namespace OpenSim.Framework.Console help.Add(commandInfo.descriptive_help); if (descriptiveHelp != string.Empty) - help.Add(string.Empty); + help.Add(string.Empty); } else { diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index b70d1dbdc6..c59fbca074 100755 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -75,6 +75,11 @@ namespace OpenSim.Framework.Console { System.Console.WriteLine(text); } + + public virtual void OutputFormat(string format, params object[] components) + { + Output(string.Format(format, components)); + } public string CmdPrompt(string p) { @@ -89,6 +94,57 @@ namespace OpenSim.Framework.Console return ret; } + + public string CmdPrompt(string p, List 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 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 options) @@ -118,7 +174,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) diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index a3036d0df6..eda41b8d5a 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs @@ -38,12 +38,13 @@ namespace OpenSim.Framework.Console { /// /// A console that uses cursor control and color - /// + /// public class LocalConsole : CommandConsole { // 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; @@ -100,8 +101,8 @@ namespace OpenSim.Framework.Console private int SetCursorTop(int top) { // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try - // to set a cursor row position with a currently invalid column, mono will throw an exception. - // Therefore, we need to make sure that the column position is valid first. + // to set a cursor row position with a currently invalid column, mono will throw an exception. + // Therefore, we need to make sure that the column position is valid first. int left = System.Console.CursorLeft; if (left < 0) @@ -121,7 +122,7 @@ namespace OpenSim.Framework.Console { top = 0; } - else + else { int bh = System.Console.BufferHeight; @@ -133,7 +134,7 @@ namespace OpenSim.Framework.Console System.Console.CursorTop = top; return top; - } + } /// /// Set the cursor column. @@ -145,12 +146,12 @@ namespace OpenSim.Framework.Console /// /// /// The new cursor column. - /// + /// private int SetCursorLeft(int left) { // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try - // to set a cursor column position with a currently invalid row, mono will throw an exception. - // Therefore, we need to make sure that the row position is valid first. + // to set a cursor column position with a currently invalid row, mono will throw an exception. + // Therefore, we need to make sure that the row position is valid first. int top = System.Console.CursorTop; if (top < 0) @@ -214,7 +215,7 @@ namespace OpenSim.Framework.Console System.Console.Write("{0}", prompt); SetCursorTop(new_y); - SetCursorLeft(new_x); + SetCursorLeft(new_x); } } @@ -278,22 +279,25 @@ namespace OpenSim.Framework.Console private void WriteLocalText(string text, string level) { - string regex = @"^(?.*?)\[(?[^\]]+)\]:?(?.*)"; - - 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 = @"^(?.*?)\[(?[^\]]+)\]:?(?.*)"; - 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; } diff --git a/OpenSim/Framework/Console/MockConsole.cs b/OpenSim/Framework/Console/MockConsole.cs index 9eb197750d..a29b370857 100644 --- a/OpenSim/Framework/Console/MockConsole.cs +++ b/OpenSim/Framework/Console/MockConsole.cs @@ -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; diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs index c038aaca5c..07de27a2fc 100644 --- a/OpenSim/Framework/Console/RemoteConsole.cs +++ b/OpenSim/Framework/Console/RemoteConsole.cs @@ -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(); 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 expired = new List(); @@ -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; } diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index 5757061efc..1b1aaf2bc4 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs @@ -83,7 +83,9 @@ namespace OpenSim.Framework /// Finished, Sim Changed FinishedViaNewSim = 1 << 28, /// Finished, Same Sim - FinishedViaSameSim = 1 << 29 + FinishedViaSameSim = 1 << 29, + /// Agent coming into the grid from another grid + ViaHGLogin = 1 << 30 } } diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs deleted file mode 100644 index 3a43a14415..0000000000 --- a/OpenSim/Framework/GridConfig.cs +++ /dev/null @@ -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; - } - } -} diff --git a/OpenSim/Framework/HGNetworkServersInfo.cs b/OpenSim/Framework/HGNetworkServersInfo.cs deleted file mode 100644 index 08655764d1..0000000000 --- a/OpenSim/Framework/HGNetworkServersInfo.cs +++ /dev/null @@ -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; - } - - } -} diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index db745481bc..a6be157688 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -43,7 +43,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); @@ -65,7 +65,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 StartAnim(IClientAPI remoteClient, UUID animID); @@ -174,9 +174,10 @@ namespace OpenSim.Framework public delegate void ParcelAccessListRequest( UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client); - public delegate void ParcelAccessListUpdateRequest( - UUID agentID, UUID sessionID, uint flags, int landLocalID, List entries, - IClientAPI remote_client); + public delegate void ParcelAccessListUpdateRequest(UUID agentID, uint flags, + int landLocalID, UUID transactionID, int sequenceID, + int sections, List entries, + IClientAPI remote_client); public delegate void ParcelPropertiesRequest( int start_x, int start_y, int end_x, int end_y, int sequence_id, bool snap_selection, IClientAPI remote_client); @@ -573,14 +574,33 @@ namespace OpenSim.Framework { public ISceneEntity Entity; public PrimUpdateFlags Flags; + public float TimeDilation; - public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags) + public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation) { Entity = entity; Flags = flags; + TimeDilation = timedilation; } } + public class PlacesReplyData + { + public UUID OwnerID; + public string Name; + public string Desc; + public int ActualArea; + public int BillableArea; + public byte Flags; + public uint GlobalX; + public uint GlobalY; + public uint GlobalZ; + public string SimName; + public UUID SnapshotID; + public uint Dwell; + public int Price; + } + /// /// Specifies the fields that have been changed when sending a prim or /// avatar update @@ -711,7 +731,7 @@ namespace OpenSim.Framework event TeleportLandmarkRequest OnTeleportLandmarkRequest; event DeRezObject OnDeRezObject; event Action OnRegionHandShakeReply; - event GenericCall2 OnRequestWearables; + event GenericCall1 OnRequestWearables; event GenericCall1 OnCompleteMovementToRegion; event UpdateAgent OnPreAgentUpdate; event UpdateAgent OnAgentUpdate; @@ -1011,7 +1031,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); @@ -1054,6 +1076,8 @@ namespace OpenSim.Framework void SendXferPacket(ulong xferID, uint packet, byte[] data); + void SendAbortXferPacket(ulong xferID); + void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, @@ -1309,5 +1333,7 @@ namespace OpenSim.Framework void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId); void StopFlying(ISceneEntity presence); + + void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data); } } diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs index 6798b7be8a..1298f26a62 100644 --- a/OpenSim/Framework/IScene.cs +++ b/OpenSim/Framework/IScene.cs @@ -73,7 +73,7 @@ namespace OpenSim.Framework void AddNewClient(IClientAPI client); void RemoveClient(UUID agentID); - void Restart(int seconds); + void Restart(); //RegionInfo OtherRegionUp(RegionInfo thisRegion); string GetSimulatorVersion(); diff --git a/OpenSim/Framework/ISceneObject.cs b/OpenSim/Framework/ISceneObject.cs index 51479014cd..18631f17b1 100644 --- a/OpenSim/Framework/ISceneObject.cs +++ b/OpenSim/Framework/ISceneObject.cs @@ -39,5 +39,6 @@ namespace OpenSim.Framework void ExtraFromXmlString(string xmlstr); string GetStateSnapshot(); void SetState(string xmlstr, IScene s); + bool HasGroupChanged { get; set; } } } diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs index aeb01e2493..a663680a78 100644 --- a/OpenSim/Framework/InventoryItemBase.cs +++ b/OpenSim/Framework/InventoryItemBase.cs @@ -117,6 +117,56 @@ namespace OpenSim.Framework } protected UUID m_creatorIdAsUuid = UUID.Zero; + protected string m_creatorData = string.Empty; + public string CreatorData // = ; + { + get { return m_creatorData; } + set { m_creatorData = value; } + } + + /// + /// 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]] + /// + 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 // [;[;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; + + } + } + } + /// /// The description of the inventory item (must be less than 64 characters) /// diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index 060e88696a..a9a493d876 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs @@ -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; + + /// + /// Whether to obscure parcel media URL + /// + [XmlIgnore] + public bool ObscureMedia { + get { + return _obscureMedia; + } + set { + _obscureMedia = value; + } + } + + /// + /// Whether to obscure parcel music URL + /// + [XmlIgnore] + public bool ObscureMusic { + get { + return _obscureMusic; + } + set { + _obscureMusic = value; + } + } + + /// + /// Whether to loop parcel media + /// + [XmlIgnore] + public bool MediaLoop { + get { + return _mediaLoop; + } + set { + _mediaLoop = value; + } + } + + /// + /// Height of parcel media render + /// + [XmlIgnore] + public int MediaHeight { + get { + return _mediaHeight; + } + set { + _mediaHeight = value; + } + } + + /// + /// Width of parcel media render + /// + [XmlIgnore] + public int MediaWidth { + get { + return _mediaWidth; + } + set { + _mediaWidth = value; + } + } /// /// 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 } } - /// - /// Deprecated idea. Number of visitors ~= free money - /// - public int Dwell { - get { - return _dwell; - } - set { - _dwell = value; - } - } - /// /// 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 } } + /// + /// parcel media description + /// + public string MediaDescription { + get { + return _mediaDescription; + } + set { + _mediaDescription = value; + } + } public LandData() { @@ -634,7 +690,15 @@ 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._simwideArea = _simwideArea; + landData._simwidePrims = _simwidePrims; landData._parcelAccessList.Clear(); foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList) diff --git a/OpenSim/Framework/LandUpdateArgs.cs b/OpenSim/Framework/LandUpdateArgs.cs index 9760a1d328..7d6c4f2dab 100644 --- a/OpenSim/Framework/LandUpdateArgs.cs +++ b/OpenSim/Framework/LandUpdateArgs.cs @@ -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; } } diff --git a/OpenSim/Framework/Lazy.cs b/OpenSim/Framework/Lazy.cs index 8a417ac64b..91de4bdd1d 100644 --- a/OpenSim/Framework/Lazy.cs +++ b/OpenSim/Framework/Lazy.cs @@ -1,4 +1,4 @@ -// +// // Lazy.cs // // Authors: diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index 1f5f2088fc..0515b166e2 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs @@ -27,6 +27,7 @@ using System.Collections.Generic; using System.Reflection; +using System.Net; using log4net; using OpenSim.Framework.Servers.HttpServer; @@ -35,7 +36,7 @@ namespace OpenSim.Framework public class MainServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + private static BaseHttpServer instance = null; private static Dictionary m_Servers = new Dictionary(); @@ -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(); diff --git a/OpenSim/Framework/MapAndArray.cs b/OpenSim/Framework/MapAndArray.cs new file mode 100644 index 0000000000..c98d3ccd6f --- /dev/null +++ b/OpenSim/Framework/MapAndArray.cs @@ -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 +{ + /// + /// 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 + /// + /// Key type to use for hash lookups + /// Value type to store + public sealed class MapAndArray + { + private Dictionary m_dict; + private TValue[] m_array; + private object m_syncRoot = new object(); + + /// Number of values currently stored in the collection + public int Count { get { return m_array.Length; } } + /// 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 + public object SyncRoot { get { return m_syncRoot; } } + + /// + /// Constructor + /// + public MapAndArray() + { + m_dict = new Dictionary(); + m_array = new TValue[0]; + } + + /// + /// Constructor + /// + /// Initial capacity of the dictionary + public MapAndArray(int capacity) + { + m_dict = new Dictionary(capacity); + m_array = new TValue[0]; + } + + /// + /// Adds a key/value pair to the collection, or updates an existing key + /// with a new value + /// + /// Key to add or update + /// Value to add + /// True if a new key was added, false if an existing key was + /// updated + public bool AddOrReplace(TKey key, TValue value) + { + lock (m_syncRoot) + { + bool containedKey = m_dict.ContainsKey(key); + + m_dict[key] = value; + CreateArray(); + + return !containedKey; + } + } + + /// + /// Adds a key/value pair to the collection. This will throw an + /// exception if the key is already present in the collection + /// + /// Key to add or update + /// Value to add + /// Index of the inserted item + public int Add(TKey key, TValue value) + { + lock (m_syncRoot) + { + m_dict.Add(key, value); + CreateArray(); + return m_array.Length; + } + } + + /// + /// Removes a key/value pair from the collection + /// + /// Key to remove + /// True if the key was found and removed, otherwise false + public bool Remove(TKey key) + { + lock (m_syncRoot) + { + bool removed = m_dict.Remove(key); + CreateArray(); + + return removed; + } + } + + /// + /// Determines whether the collections contains a specified key + /// + /// Key to search for + /// True if the key was found, otherwise false + public bool ContainsKey(TKey key) + { + lock (m_syncRoot) + return m_dict.ContainsKey(key); + } + + /// + /// Gets the value associated with the specified key + /// + /// Key of the value to get + /// 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 + /// True if the key was found and a value was retrieved, + /// otherwise false + public bool TryGetValue(TKey key, out TValue value) + { + lock (m_syncRoot) + return m_dict.TryGetValue(key, out value); + } + + /// + /// Clears all key/value pairs from the collection + /// + public void Clear() + { + lock (m_syncRoot) + { + m_dict = new Dictionary(); + m_array = new TValue[0]; + } + } + + /// + /// Gets a reference to the immutable array of values stored in this + /// collection. This array is thread safe for iteration + /// + /// A thread safe reference ton an array of all of the stored + /// values + 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; + } + } +} diff --git a/OpenSim/Framework/MessageServerConfig.cs b/OpenSim/Framework/MessageServerConfig.cs deleted file mode 100644 index 884c0eab23..0000000000 --- a/OpenSim/Framework/MessageServerConfig.cs +++ /dev/null @@ -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 -{ - /// - /// Message Server Config - Configuration of the Message Server - /// - 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; - } - } -} diff --git a/OpenSim/Framework/NetworkUtil.cs b/OpenSim/Framework/NetworkUtil.cs index 5fe343d059..2e94b0d5b4 100644 --- a/OpenSim/Framework/NetworkUtil.cs +++ b/OpenSim/Framework/NetworkUtil.cs @@ -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; } + } } diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 4d1de22eeb..927415e850 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -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 } } + /// + /// Entries to store media textures on each face + /// + /// 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; + } + /// /// Creates a OpenMetaverse.Primitive and populates it with converted PrimitiveBaseShape values @@ -1204,8 +1341,107 @@ namespace OpenSim.Framework prim.Properties.Permissions = new Permissions(); prim.Properties.SalePrice = 10; prim.Properties.SaleType = new SaleType(); - + return prim; } + + /// + /// Encapsulates a list of media entries. + /// + /// 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, IXmlSerializable + { + public const string MEDIA_TEXTURE_TYPE = "sl"; + + public MediaList() : base() {} + public MediaList(IEnumerable 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()); + } + } } } diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index afc4060044..680e702a11 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -42,6 +42,7 @@ namespace OpenSim.Framework { public class RegionLightShareData : ICloneable { + public bool valid = false; public UUID regionID = UUID.Zero; public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f); public float waterFogDensityExponent = 4.0f; @@ -97,9 +98,9 @@ namespace OpenSim.Framework [Serializable] public class SimpleRegionInfo - { + { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + /// /// The port by which http communication occurs with the region (most noticeably, CAPS communication) /// @@ -115,8 +116,20 @@ namespace OpenSim.Framework /// public string ServerURI { - get { return m_serverURI; } - set { m_serverURI = value; } + get { + if ( m_serverURI != string.Empty ) { + return m_serverURI; + } else { + return "http://" + m_externalHostName + ":" + m_httpPort + "/"; + } + } + set { + if ( value.EndsWith("/") ) { + m_serverURI = value; + } else { + m_serverURI = value + '/'; + } + } } protected string m_serverURI; @@ -141,6 +154,7 @@ namespace OpenSim.Framework public SimpleRegionInfo() { + m_serverURI = string.Empty; } public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) @@ -150,6 +164,7 @@ namespace OpenSim.Framework m_internalEndPoint = internalEndPoint; m_externalHostName = externalUri; + m_serverURI = string.Empty; } public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port) @@ -160,6 +175,7 @@ namespace OpenSim.Framework m_externalHostName = externalUri; m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); + m_serverURI = string.Empty; } public SimpleRegionInfo(RegionInfo ConvertFrom) @@ -344,7 +360,7 @@ namespace OpenSim.Framework public string proxyUrl = ""; public int ProxyOffset = 0; public string regionSecret = UUID.Random().ToString(); - + public string osSecret; public UUID lastMapUUID = UUID.Zero; @@ -393,7 +409,7 @@ namespace OpenSim.Framework if (!File.Exists(filename)) // New region config request { IniConfigSource newFile = new IniConfigSource(); - ReadNiniConfig(newFile, String.Empty); + ReadNiniConfig(newFile, configName); newFile.Save(filename); @@ -449,6 +465,7 @@ namespace OpenSim.Framework configMember = new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); configMember.performConfigurationRetrieve(); + m_serverURI = string.Empty; } public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) @@ -458,10 +475,12 @@ namespace OpenSim.Framework m_internalEndPoint = internalEndPoint; m_externalHostName = externalUri; + m_serverURI = string.Empty; } public RegionInfo() { + m_serverURI = string.Empty; } public EstateSettings EstateSettings @@ -551,10 +570,23 @@ namespace OpenSim.Framework /// /// A well-formed URI for the host region server (namely "http://" + ExternalHostName) /// + public string ServerURI { - get { return m_serverURI; } - set { m_serverURI = value; } + get { + if ( m_serverURI != string.Empty ) { + return m_serverURI; + } else { + return "http://" + m_externalHostName + ":" + m_httpPort + "/"; + } + } + set { + if ( value.EndsWith("/") ) { + m_serverURI = value; + } else { + m_serverURI = value + '/'; + } + } } public string RegionName @@ -699,7 +731,7 @@ namespace OpenSim.Framework RegionID = new UUID(regionUUID); originRegionID = RegionID; // What IS this?! - + RegionName = name; string location = config.GetString("Location", String.Empty); @@ -720,7 +752,7 @@ namespace OpenSim.Framework // Internal IP IPAddress address; - + if (config.Contains("InternalAddress")) { address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty)); @@ -774,7 +806,7 @@ namespace OpenSim.Framework { m_externalHostName = Util.GetLocalHost().ToString(); m_log.InfoFormat( - "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", + "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", m_externalHostName, name); } else @@ -805,7 +837,7 @@ namespace OpenSim.Framework IConfig config = source.Configs[RegionName]; if (config != null) - source.Configs.Remove(RegionName); + source.Configs.Remove(config); config = source.AddConfig(RegionName); @@ -864,10 +896,15 @@ namespace OpenSim.Framework return; } - configMember = new ConfigurationMember(filename, description, loadConfigurationOptionsFromMe, - ignoreIncomingConfiguration, false); - configMember.performConfigurationRetrieve(); - RegionFile = filename; + else if (filename.ToLower().EndsWith(".xml")) + { + configMember = new ConfigurationMember(filename, description, loadConfigurationOptionsFromMe, + ignoreIncomingConfiguration, false); + configMember.performConfigurationRetrieve(); + RegionFile = filename; + } + else + throw new Exception("Invalid file type for region persistence."); } public void loadConfigurationOptionsFromMe() @@ -904,16 +941,16 @@ namespace OpenSim.Framework configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true); - + configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Maximum size for physical prims", m_physPrimMax.ToString(), true); - + configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "Clamp prims to max size", m_clampPrimSize.ToString(), true); - + configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Max objects this sim will hold", m_objectCapacity.ToString(), true); - + configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, "Scope ID for this region", ScopeID.ToString(), true); @@ -951,16 +988,16 @@ namespace OpenSim.Framework configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); - + configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Maximum size for nonphysical prims", "0", true); - + configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Maximum size for physical prims", "0", true); - + configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, "Clamp prims to max size", "false", true); - + configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Max objects this sim will hold", "0", true); diff --git a/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs b/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs index fee3126978..f274da2e7a 100644 --- a/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs +++ b/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs @@ -47,5 +47,6 @@ namespace OpenSim.Framework public bool useEstateSun; public float waterHeight; public string simName; + public string regionType; } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index 8d1212bbbc..673cf203f8 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs @@ -33,8 +33,6 @@ namespace OpenSim.Framework { public class RegionSettings { - private ConfigurationMember configMember; - public delegate void SaveDelegate(RegionSettings rs); public event SaveDelegate OnSave; @@ -47,202 +45,6 @@ namespace OpenSim.Framework public static readonly UUID DEFAULT_TERRAIN_TEXTURE_3 = new UUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); public static readonly UUID DEFAULT_TERRAIN_TEXTURE_4 = new UUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); - public RegionSettings() - { - if (configMember == null) - { - try - { - configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", LoadConfigurationOptions, HandleIncomingConfiguration, true); - configMember.performConfigurationRetrieve(); - } - catch (Exception) - { - } - } - } - - public void LoadConfigurationOptions() - { - configMember.addConfigurationOption("region_flags", - ConfigurationOption.ConfigurationTypes.TYPE_UINT32, - String.Empty, "336723974", true); - - configMember.addConfigurationOption("max_agents", - ConfigurationOption.ConfigurationTypes.TYPE_INT32, - String.Empty, "40", true); - - configMember.addConfigurationOption("object_bonus_factor", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "1.0", true); - - configMember.addConfigurationOption("sim_access", - ConfigurationOption.ConfigurationTypes.TYPE_INT32, - String.Empty, "21", true); - - configMember.addConfigurationOption("terrain_base_0", - ConfigurationOption.ConfigurationTypes.TYPE_UUID, - String.Empty, DEFAULT_TERRAIN_TEXTURE_1.ToString(), true); - - configMember.addConfigurationOption("terrain_base_1", - ConfigurationOption.ConfigurationTypes.TYPE_UUID, - String.Empty, DEFAULT_TERRAIN_TEXTURE_2.ToString(), true); - - configMember.addConfigurationOption("terrain_base_2", - ConfigurationOption.ConfigurationTypes.TYPE_UUID, - String.Empty, DEFAULT_TERRAIN_TEXTURE_3.ToString(), true); - - configMember.addConfigurationOption("terrain_base_3", - ConfigurationOption.ConfigurationTypes.TYPE_UUID, - String.Empty, DEFAULT_TERRAIN_TEXTURE_4.ToString(), true); - - configMember.addConfigurationOption("terrain_start_height_0", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "10.0", true); - - configMember.addConfigurationOption("terrain_start_height_1", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "10.0", true); - - configMember.addConfigurationOption("terrain_start_height_2", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "10.0", true); - - configMember.addConfigurationOption("terrain_start_height_3", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "10.0", true); - - configMember.addConfigurationOption("terrain_height_range_0", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "60.0", true); - - configMember.addConfigurationOption("terrain_height_range_1", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "60.0", true); - - configMember.addConfigurationOption("terrain_height_range_2", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "60.0", true); - - configMember.addConfigurationOption("terrain_height_range_3", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "60.0", true); - - configMember.addConfigurationOption("region_water_height", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "20.0", true); - - configMember.addConfigurationOption("terrain_raise_limit", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "100.0", true); - - configMember.addConfigurationOption("terrain_lower_limit", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "-100.0", true); - - configMember.addConfigurationOption("sun_hour", - ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, - String.Empty, "0.0", true); - } - - public bool HandleIncomingConfiguration(string key, object value) - { - switch (key) - { - case "region_flags": - RegionFlags flags = (RegionFlags)(uint)value; - - m_BlockTerraform = - (flags & RegionFlags.BlockTerraform) != 0; - m_BlockFly = - (flags & RegionFlags.NoFly) != 0; - m_AllowDamage = - (flags & RegionFlags.AllowDamage) != 0; - m_RestrictPushing = - (flags & RegionFlags.RestrictPushObject) != 0; - m_AllowLandResell = - (flags & RegionFlags.BlockLandResell) == 0; - m_AllowLandJoinDivide = - (flags & RegionFlags.AllowParcelChanges) != 0; - m_BlockShowInSearch = - ((uint)flags & (1 << 29)) != 0; - m_DisableScripts = - (flags & RegionFlags.SkipScripts) != 0; - m_DisableCollisions = - (flags & RegionFlags.SkipCollisions) != 0; - m_DisablePhysics = - (flags & RegionFlags.SkipPhysics) != 0; - m_FixedSun = - (flags & RegionFlags.SunFixed) != 0; - m_Sandbox = - (flags & RegionFlags.Sandbox) != 0; - break; - case "max_agents": - m_AgentLimit = (int)value; - break; - case "object_bonus_factor": - m_ObjectBonus = (double)value; - break; - case "sim_access": - int access = (int)value; - if (access <= 13) - m_Maturity = 0; - else - m_Maturity = 1; - break; - case "terrain_base_0": - m_TerrainTexture1 = (UUID)value; - break; - case "terrain_base_1": - m_TerrainTexture2 = (UUID)value; - break; - case "terrain_base_2": - m_TerrainTexture3 = (UUID)value; - break; - case "terrain_base_3": - m_TerrainTexture4 = (UUID)value; - break; - case "terrain_start_height_0": - m_Elevation1SW = (double)value; - break; - case "terrain_start_height_1": - m_Elevation1NW = (double)value; - break; - case "terrain_start_height_2": - m_Elevation1SE = (double)value; - break; - case "terrain_start_height_3": - m_Elevation1NE = (double)value; - break; - case "terrain_height_range_0": - m_Elevation2SW = (double)value; - break; - case "terrain_height_range_1": - m_Elevation2NW = (double)value; - break; - case "terrain_height_range_2": - m_Elevation2SE = (double)value; - break; - case "terrain_height_range_3": - m_Elevation2NE = (double)value; - break; - case "region_water_height": - m_WaterHeight = (double)value; - break; - case "terrain_raise_limit": - m_TerrainRaiseLimit = (double)value; - break; - case "terrain_lower_limit": - m_TerrainLowerLimit = (double)value; - break; - case "sun_hour": - m_SunPosition = (double)value; - break; - } - - return true; - } - public void Save() { if (OnSave != null) diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs index a4898061da..b337e034fa 100644 --- a/OpenSim/Framework/SLUtil.cs +++ b/OpenSim/Framework/SLUtil.cs @@ -46,7 +46,7 @@ namespace OpenSim.Framework case AssetType.Texture: return "image/x-j2c"; case AssetType.Sound: - return "application/ogg"; + return "audio/ogg"; case AssetType.CallingCard: return "application/vnd.ll.callingcard"; case AssetType.Landmark: @@ -98,8 +98,6 @@ namespace OpenSim.Framework return "application/vnd.ll.outfitfolder"; case AssetType.MyOutfitsFolder: return "application/vnd.ll.myoutfitsfolder"; - case AssetType.InboxFolder: - return "application/vnd.ll.inboxfolder"; case AssetType.Unknown: default: return "application/octet-stream"; @@ -128,7 +126,7 @@ namespace OpenSim.Framework case InventoryType.Object: return "application/vnd.ll.primitive"; case InventoryType.Sound: - return "application/ogg"; + return "audio/ogg"; case InventoryType.Snapshot: case InventoryType.Texture: return "image/x-j2c"; @@ -147,6 +145,7 @@ namespace OpenSim.Framework case "image/jp2": return (sbyte)AssetType.Texture; case "application/ogg": + case "audio/ogg": return (sbyte)AssetType.Sound; case "application/vnd.ll.callingcard": case "application/x-metaverse-callingcard": @@ -209,8 +208,6 @@ namespace OpenSim.Framework return (sbyte)AssetType.OutfitFolder; case "application/vnd.ll.myoutfitsfolder": return (sbyte)AssetType.MyOutfitsFolder; - case "application/vnd.ll.inboxfolder": - return (sbyte)AssetType.InboxFolder; case "application/octet-stream": default: return (sbyte)AssetType.Unknown; @@ -227,6 +224,7 @@ namespace OpenSim.Framework case "image/jpeg": return (sbyte)InventoryType.Texture; case "application/ogg": + case "audio/ogg": case "audio/x-wav": return (sbyte)InventoryType.Sound; case "application/vnd.ll.callingcard": @@ -342,7 +340,7 @@ namespace OpenSim.Framework int count = -1; - while (count < len) + while (count < len && idx < input.Length) { // int l = input[idx].Length; string ln = input[idx]; @@ -377,4 +375,4 @@ namespace OpenSim.Framework return output; } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Serialization/ArchiveConstants.cs b/OpenSim/Framework/Serialization/ArchiveConstants.cs index 475a9de0cb..2c5e0018ec 100644 --- a/OpenSim/Framework/Serialization/ArchiveConstants.cs +++ b/OpenSim/Framework/Serialization/ArchiveConstants.cs @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; +using System.Text; using OpenMetaverse; namespace OpenSim.Framework.Serialization @@ -111,6 +112,7 @@ namespace OpenSim.Framework.Serialization ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LostAndFoundFolder] = ASSET_EXTENSION_SEPARATOR + "lostandfoundfolder.txt"; // Not sure if we'll ever see this ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LSLBytecode] = ASSET_EXTENSION_SEPARATOR + "bytecode.lso"; ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.LSLText] = ASSET_EXTENSION_SEPARATOR + "script.lsl"; + ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Mesh] = ASSET_EXTENSION_SEPARATOR + "mesh.llmesh"; ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ASSET_EXTENSION_SEPARATOR + "notecard.txt"; ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ASSET_EXTENSION_SEPARATOR + "object.xml"; ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"; // Not sure if we'll ever see this @@ -134,6 +136,7 @@ namespace OpenSim.Framework.Serialization EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "lostandfoundfolder.txt"] = (sbyte)AssetType.LostAndFoundFolder; EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "bytecode.lso"] = (sbyte)AssetType.LSLBytecode; EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "script.lsl"] = (sbyte)AssetType.LSLText; + EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "mesh.llmesh"] = (sbyte)AssetType.Mesh; EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "notecard.txt"] = (sbyte)AssetType.Notecard; EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "object.xml"] = (sbyte)AssetType.Object; EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"] = (sbyte)AssetType.RootFolder; @@ -156,9 +159,9 @@ namespace OpenSim.Framework.Serialization public static string CreateOarObjectFilename(string objectName, UUID uuid, Vector3 pos) { return string.Format( - OAR_OBJECT_FILENAME_TEMPLATE, objectName, + OAR_OBJECT_FILENAME_TEMPLATE, objectName, Math.Round(pos.X), Math.Round(pos.Y), Math.Round(pos.Z), - uuid); + uuid); } /// @@ -170,7 +173,31 @@ namespace OpenSim.Framework.Serialization /// public static string CreateOarObjectPath(string objectName, UUID uuid, Vector3 pos) { - return OBJECTS_PATH + CreateOarObjectFilename(objectName, uuid, pos); - } + return OBJECTS_PATH + CreateOarObjectFilename(objectName, uuid, pos); + } + + /// + /// Extract a plain path from an IAR path + /// + /// + /// + public static string ExtractPlainPathFromIarPath(string iarPath) + { + List plainDirs = new List(); + + string[] iarDirs = iarPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); + + foreach (string iarDir in iarDirs) + { + if (!iarDir.Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR)) + plainDirs.Add(iarDir); + + int i = iarDir.LastIndexOf(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR); + + plainDirs.Add(iarDir.Remove(i)); + } + + return string.Join("/", plainDirs.ToArray()); + } } } diff --git a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs new file mode 100644 index 0000000000..6e8c2ee173 --- /dev/null +++ b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs @@ -0,0 +1,99 @@ +/* + * 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.IO; +using System.Xml; + +using OpenMetaverse; +using OpenSim.Services.Interfaces; + +namespace OpenSim.Framework.Serialization.External +{ + /// + /// Utilities for manipulating external representations of data structures in OpenSim + /// + public class ExternalRepresentationUtils + { + /// + /// Takes a XML representation of a SceneObjectPart and returns another XML representation + /// with creator data added to it. + /// + /// The SceneObjectPart represented in XML2 + /// The URL of the profile service for the creator + /// The service for retrieving user account information + /// The scope of the user account information (Grid ID) + /// The SceneObjectPart represented in XML2 + public static string RewriteSOP(string xml, string profileURL, IUserAccountService userService, UUID scopeID) + { + if (xml == string.Empty || profileURL == string.Empty || userService == null) + return xml; + + XmlDocument doc = new XmlDocument(); + doc.LoadXml(xml); + XmlNodeList sops = doc.GetElementsByTagName("SceneObjectPart"); + + foreach (XmlNode sop in sops) + { + UserAccount creator = null; + bool hasCreatorData = false; + XmlNodeList nodes = sop.ChildNodes; + foreach (XmlNode node in nodes) + { + if (node.Name == "CreatorID") + { + UUID uuid = UUID.Zero; + UUID.TryParse(node.InnerText, out uuid); + creator = userService.GetUserAccount(scopeID, uuid); + } + if (node.Name == "CreatorData" && node.InnerText != null && node.InnerText != string.Empty) + hasCreatorData = true; + + //if (node.Name == "OwnerID") + //{ + // UserAccount owner = GetUser(node.InnerText); + // if (owner != null) + // node.InnerText = m_ProfileServiceURL + "/" + node.InnerText + "/" + owner.FirstName + " " + owner.LastName; + //} + } + if (!hasCreatorData && creator != null) + { + XmlElement creatorData = doc.CreateElement("CreatorData"); + creatorData.InnerText = profileURL + "/" + creator.PrincipalID + ";" + creator.FirstName + " " + creator.LastName; + sop.AppendChild(creatorData); + } + } + + using (StringWriter wr = new StringWriter()) + { + doc.Save(wr); + return wr.ToString(); + } + + } + } +} diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs index ff0afc86e8..fc0387b76c 100644 --- a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs +++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs @@ -118,7 +118,8 @@ namespace OpenSim.Framework.Serialization.External landData.SnapshotID = UUID.Parse( xtr.ReadElementString("SnapshotID")); landData.UserLocation = Vector3.Parse( xtr.ReadElementString("UserLocation")); landData.UserLookAt = Vector3.Parse( xtr.ReadElementString("UserLookAt")); - landData.Dwell = Convert.ToInt32( xtr.ReadElementString("Dwell")); + // No longer used here + xtr.ReadElementString("Dwell"); landData.OtherCleanTime = Convert.ToInt32( xtr.ReadElementString("OtherCleanTime")); xtr.ReadEndElement(); @@ -177,7 +178,7 @@ namespace OpenSim.Framework.Serialization.External xtw.WriteElementString("SnapshotID", landData.SnapshotID.ToString()); xtw.WriteElementString("UserLocation", landData.UserLocation.ToString()); xtw.WriteElementString("UserLookAt", landData.UserLookAt.ToString()); - xtw.WriteElementString("Dwell", Convert.ToString(landData.Dwell)); + xtw.WriteElementString("Dwell", "0"); xtw.WriteElementString("OtherCleanTime", Convert.ToString(landData.OtherCleanTime)); xtw.WriteEndElement(); diff --git a/OpenSim/Framework/Communications/Osp/OspResolver.cs b/OpenSim/Framework/Serialization/External/OspResolver.cs similarity index 97% rename from OpenSim/Framework/Communications/Osp/OspResolver.cs rename to OpenSim/Framework/Serialization/External/OspResolver.cs index 24ea64d87f..7e3dd1b79b 100644 --- a/OpenSim/Framework/Communications/Osp/OspResolver.cs +++ b/OpenSim/Framework/Serialization/External/OspResolver.cs @@ -32,7 +32,7 @@ using OpenMetaverse; using OpenSim.Framework; using OpenSim.Services.Interfaces; -namespace OpenSim.Framework.Communications.Osp +namespace OpenSim.Framework.Serialization { /// /// Resolves OpenSim Profile Anchors (OSPA). An OSPA is a string used to provide information for @@ -57,6 +57,12 @@ namespace OpenSim.Framework.Communications.Osp /// The OSPA. Null if a user with the given UUID could not be found. public static string MakeOspa(UUID userId, IUserAccountService userService) { + if (userService == null) + { + m_log.Warn("[OSP RESOLVER]: UserService is null"); + return userId.ToString(); + } + UserAccount account = userService.GetUserAccount(UUID.Zero, userId); if (account != null) return MakeOspa(account.FirstName, account.LastName); diff --git a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs index 862cc72f84..d5e84c779e 100644 --- a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs +++ b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs @@ -26,11 +26,16 @@ */ using System; +using System.Collections.Generic; using System.IO; +using System.Reflection; using System.Text; using System.Xml; + +using log4net; using OpenMetaverse; using OpenSim.Framework; +using OpenSim.Services.Interfaces; namespace OpenSim.Framework.Serialization.External { @@ -40,6 +45,141 @@ namespace OpenSim.Framework.Serialization.External /// XXX: Please do not use yet. public class UserInventoryItemSerializer { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + private delegate void InventoryItemXmlProcessor(InventoryItemBase item, XmlTextReader reader); + private static Dictionary m_InventoryItemXmlProcessors = new Dictionary(); + + #region InventoryItemBase Processor initialization + static UserInventoryItemSerializer() + { + m_InventoryItemXmlProcessors.Add("Name", ProcessName); + m_InventoryItemXmlProcessors.Add("ID", ProcessID); + m_InventoryItemXmlProcessors.Add("InvType", ProcessInvType); + m_InventoryItemXmlProcessors.Add("CreatorUUID", ProcessCreatorUUID); + m_InventoryItemXmlProcessors.Add("CreatorID", ProcessCreatorID); + m_InventoryItemXmlProcessors.Add("CreatorData", ProcessCreatorData); + m_InventoryItemXmlProcessors.Add("CreationDate", ProcessCreationDate); + m_InventoryItemXmlProcessors.Add("Owner", ProcessOwner); + m_InventoryItemXmlProcessors.Add("Description", ProcessDescription); + m_InventoryItemXmlProcessors.Add("AssetType", ProcessAssetType); + m_InventoryItemXmlProcessors.Add("AssetID", ProcessAssetID); + m_InventoryItemXmlProcessors.Add("SaleType", ProcessSaleType); + m_InventoryItemXmlProcessors.Add("SalePrice", ProcessSalePrice); + m_InventoryItemXmlProcessors.Add("BasePermissions", ProcessBasePermissions); + m_InventoryItemXmlProcessors.Add("CurrentPermissions", ProcessCurrentPermissions); + m_InventoryItemXmlProcessors.Add("EveryOnePermissions", ProcessEveryOnePermissions); + m_InventoryItemXmlProcessors.Add("NextPermissions", ProcessNextPermissions); + m_InventoryItemXmlProcessors.Add("Flags", ProcessFlags); + m_InventoryItemXmlProcessors.Add("GroupID", ProcessGroupID); + m_InventoryItemXmlProcessors.Add("GroupOwned", ProcessGroupOwned); + } + #endregion + + #region InventoryItemBase Processors + private static void ProcessName(InventoryItemBase item, XmlTextReader reader) + { + item.Name = reader.ReadElementContentAsString("Name", String.Empty); + } + + private static void ProcessID(InventoryItemBase item, XmlTextReader reader) + { + item.ID = Util.ReadUUID(reader, "ID"); + } + + private static void ProcessInvType(InventoryItemBase item, XmlTextReader reader) + { + item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty); + } + + private static void ProcessCreatorUUID(InventoryItemBase item, XmlTextReader reader) + { + item.CreatorId = reader.ReadElementContentAsString("CreatorUUID", String.Empty); + } + + private static void ProcessCreatorID(InventoryItemBase item, XmlTextReader reader) + { + // when it exists, this overrides the previous + item.CreatorId = reader.ReadElementContentAsString("CreatorID", String.Empty); + } + + private static void ProcessCreationDate(InventoryItemBase item, XmlTextReader reader) + { + item.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty); + } + + private static void ProcessOwner(InventoryItemBase item, XmlTextReader reader) + { + item.Owner = Util.ReadUUID(reader, "Owner"); + } + + private static void ProcessDescription(InventoryItemBase item, XmlTextReader reader) + { + item.Description = reader.ReadElementContentAsString("Description", String.Empty); + } + + private static void ProcessAssetType(InventoryItemBase item, XmlTextReader reader) + { + item.AssetType = reader.ReadElementContentAsInt("AssetType", String.Empty); + } + + private static void ProcessAssetID(InventoryItemBase item, XmlTextReader reader) + { + item.AssetID = Util.ReadUUID(reader, "AssetID"); + } + + private static void ProcessSaleType(InventoryItemBase item, XmlTextReader reader) + { + item.SaleType = (byte)reader.ReadElementContentAsInt("SaleType", String.Empty); + } + + private static void ProcessSalePrice(InventoryItemBase item, XmlTextReader reader) + { + item.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty); + } + + private static void ProcessBasePermissions(InventoryItemBase item, XmlTextReader reader) + { + item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty); + } + + private static void ProcessCurrentPermissions(InventoryItemBase item, XmlTextReader reader) + { + item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty); + } + + private static void ProcessEveryOnePermissions(InventoryItemBase item, XmlTextReader reader) + { + item.EveryOnePermissions = (uint)reader.ReadElementContentAsInt("EveryOnePermissions", String.Empty); + } + + private static void ProcessNextPermissions(InventoryItemBase item, XmlTextReader reader) + { + item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty); + } + + private static void ProcessFlags(InventoryItemBase item, XmlTextReader reader) + { + item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty); + } + + private static void ProcessGroupID(InventoryItemBase item, XmlTextReader reader) + { + item.GroupID = Util.ReadUUID(reader, "GroupID"); + } + + private static void ProcessGroupOwned(InventoryItemBase item, XmlTextReader reader) + { + item.GroupOwned = Util.ReadBoolean(reader); + } + + private static void ProcessCreatorData(InventoryItemBase item, XmlTextReader reader) + { + item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); + } + + #endregion + /// /// Deserialize item /// @@ -60,40 +200,47 @@ namespace OpenSim.Framework.Serialization.External public static InventoryItemBase Deserialize(string serialization) { InventoryItemBase item = new InventoryItemBase(); - - StringReader sr = new StringReader(serialization); - XmlTextReader xtr = new XmlTextReader(sr); - - xtr.ReadStartElement("InventoryItem"); - - item.Name = xtr.ReadElementString("Name"); - item.ID = UUID.Parse( xtr.ReadElementString("ID")); - item.InvType = Convert.ToInt32( xtr.ReadElementString("InvType")); - item.CreatorId = xtr.ReadElementString("CreatorUUID"); - item.CreationDate = Convert.ToInt32( xtr.ReadElementString("CreationDate")); - item.Owner = UUID.Parse( xtr.ReadElementString("Owner")); - item.Description = xtr.ReadElementString("Description"); - item.AssetType = Convert.ToInt32( xtr.ReadElementString("AssetType")); - item.AssetID = UUID.Parse( xtr.ReadElementString("AssetID")); - item.SaleType = Convert.ToByte( xtr.ReadElementString("SaleType")); - item.SalePrice = Convert.ToInt32( xtr.ReadElementString("SalePrice")); - item.BasePermissions = Convert.ToUInt32( xtr.ReadElementString("BasePermissions")); - item.CurrentPermissions = Convert.ToUInt32( xtr.ReadElementString("CurrentPermissions")); - item.EveryOnePermissions = Convert.ToUInt32( xtr.ReadElementString("EveryOnePermissions")); - item.NextPermissions = Convert.ToUInt32( xtr.ReadElementString("NextPermissions")); - item.Flags = Convert.ToUInt32( xtr.ReadElementString("Flags")); - item.GroupID = UUID.Parse( xtr.ReadElementString("GroupID")); - item.GroupOwned = Convert.ToBoolean(xtr.ReadElementString("GroupOwned")); - - xtr.ReadEndElement(); - - xtr.Close(); - sr.Close(); - + + using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization))) + { + reader.ReadStartElement("InventoryItem"); + + string nodeName = string.Empty; + while (reader.NodeType != XmlNodeType.EndElement) + { + nodeName = reader.Name; + InventoryItemXmlProcessor p = null; + if (m_InventoryItemXmlProcessors.TryGetValue(reader.Name, out p)) + { + //m_log.DebugFormat("[XXX] Processing: {0}", reader.Name); + try + { + p(item, reader); + } + catch (Exception e) + { + m_log.DebugFormat("[InventoryItemSerializer]: exception while parsing {0}: {1}", nodeName, e); + if (reader.NodeType == XmlNodeType.EndElement) + reader.Read(); + } + } + else + { + // m_log.DebugFormat("[InventoryItemSerializer]: caught unknown element {0}", nodeName); + reader.ReadOuterXml(); // ignore + } + + } + + reader.ReadEndElement(); // InventoryItem + } + + //m_log.DebugFormat("[XXX]: parsed InventoryItemBase {0} - {1}", obj.Name, obj.UUID); return item; + } - public static string Serialize(InventoryItemBase inventoryItem) + public static string Serialize(InventoryItemBase inventoryItem, Dictionary options, IUserAccountService userAccountService) { StringWriter sw = new StringWriter(); XmlTextWriter writer = new XmlTextWriter(sw); @@ -112,7 +259,7 @@ namespace OpenSim.Framework.Serialization.External writer.WriteString(inventoryItem.InvType.ToString()); writer.WriteEndElement(); writer.WriteStartElement("CreatorUUID"); - writer.WriteString(inventoryItem.CreatorId); + writer.WriteString(OspResolver.MakeOspa(inventoryItem.CreatorIdAsUuid, userAccountService)); writer.WriteEndElement(); writer.WriteStartElement("CreationDate"); writer.WriteString(inventoryItem.CreationDate.ToString()); @@ -156,6 +303,20 @@ namespace OpenSim.Framework.Serialization.External writer.WriteStartElement("GroupOwned"); writer.WriteString(inventoryItem.GroupOwned.ToString()); writer.WriteEndElement(); + if (inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty) + writer.WriteElementString("CreatorData", inventoryItem.CreatorData); + else if (options.ContainsKey("profile")) + { + if (userAccountService != null) + { + UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid); + if (account != null) + { + writer.WriteElementString("CreatorData", (string)options["profile"] + "/" + inventoryItem.CreatorIdAsUuid + ";" + account.FirstName + " " + account.LastName); + } + writer.WriteElementString("CreatorID", inventoryItem.CreatorId); + } + } writer.WriteEndElement(); diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index f0f8d0186b..b28ad69a5e 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -37,6 +37,7 @@ using log4net; using log4net.Appender; using log4net.Core; using log4net.Repository; +using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; @@ -174,7 +175,7 @@ namespace OpenSim.Framework.Servers m_console.Commands.AddCommand("base", false, "show info", "show info", - "Show general information", HandleShow); + "Show general information about the server", HandleShow); m_console.Commands.AddCommand("base", false, "show stats", "show stats", @@ -234,26 +235,19 @@ namespace OpenSim.Framework.Servers protected string GetThreadsReport() { StringBuilder sb = new StringBuilder(); + Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreads(); - ProcessThreadCollection threads = ThreadTracker.GetThreads(); - if (threads == null) + sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine); + foreach (Watchdog.ThreadWatchdogInfo twi in threads) { - sb.Append("OpenSim thread tracking is only enabled in DEBUG mode."); + Thread t = twi.Thread; + + sb.Append( + "ID: " + t.ManagedThreadId + ", Name: " + t.Name + ", TimeRunning: " + + "Pri: " + t.Priority + ", State: " + t.ThreadState); + sb.Append(Environment.NewLine); } - else - { - sb.Append(threads.Count + " threads are being tracked:" + Environment.NewLine); - foreach (ProcessThread t in threads) - { - sb.Append("ID: " + t.Id + ", TotalProcessorTime: " + t.TotalProcessorTime + ", TimeRunning: " + - (DateTime.Now - t.StartTime) + ", Pri: " + t.CurrentPriority + ", State: " + t.ThreadState); - if (t.ThreadState == System.Diagnostics.ThreadState.Wait) - sb.Append(", Reason: " + t.WaitReason + Environment.NewLine); - else - sb.Append(Environment.NewLine); - } - } int workers = 0, ports = 0, maxWorkers = 0, maxPorts = 0; ThreadPool.GetAvailableThreads(out workers, out ports); ThreadPool.GetMaxThreads(out maxWorkers, out maxPorts); @@ -377,8 +371,7 @@ namespace OpenSim.Framework.Servers switch (showParams[0]) { case "info": - Notice("Version: " + m_version); - Notice("Startup directory: " + m_startupDirectory); + ShowInfo(); break; case "stats": @@ -395,18 +388,30 @@ namespace OpenSim.Framework.Servers break; case "version": - Notice( - String.Format( - "Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion)); + Notice(GetVersionText()); break; } } + + protected void ShowInfo() + { + Notice(GetVersionText()); + Notice("Startup directory: " + m_startupDirectory); + if (null != m_consoleAppender) + Notice(String.Format("Console log level: {0}", m_consoleAppender.Threshold)); + } + + protected string GetVersionText() + { + return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion); + } /// /// Console output is only possible if a console has been established. /// That is something that cannot be determined within this class. So /// all attempts to use the console MUST be verified. /// + /// protected void Notice(string msg) { if (m_console != null) @@ -414,6 +419,19 @@ namespace OpenSim.Framework.Servers m_console.Output(msg); } } + + /// + /// Console output is only possible if a console has been established. + /// That is something that cannot be determined within this class. So + /// all attempts to use the console MUST be verified. + /// + /// + /// + protected void Notice(string format, params string[] components) + { + if (m_console != null) + m_console.OutputFormat(format, components); + } /// /// Enhance the version string with extra information if it's available. diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 8123f2fed7..d4ee7ba56d 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -28,6 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Collections.Specialized; using System.IO; using System.Net; using System.Net.Sockets; @@ -50,7 +51,7 @@ namespace OpenSim.Framework.Servers.HttpServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private HttpServerLogWriter httpserverlog = new HttpServerLogWriter(); - + private volatile int NotSocketErrors = 0; public volatile bool HTTPDRunning = false; @@ -159,7 +160,7 @@ namespace OpenSim.Framework.Servers.HttpServer m_rpcHandlers[method] = handler; m_rpcHandlersKeepAlive[method] = keepAlive; // default } - + return true; } @@ -181,7 +182,7 @@ namespace OpenSim.Framework.Servers.HttpServer public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler) { //m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName); - + lock (m_HTTPHandlers) { if (!m_HTTPHandlers.ContainsKey(methodName)) @@ -203,14 +204,14 @@ namespace OpenSim.Framework.Servers.HttpServer if (!m_pollHandlers.ContainsKey(methodName)) { m_pollHandlers.Add(methodName,args); - pollHandlerResult = true; + pollHandlerResult = true; } } - + if (pollHandlerResult) return AddHTTPHandler(methodName, handler); - return false; + return false; } // Note that the agent string is provided simply to differentiate @@ -256,51 +257,51 @@ namespace OpenSim.Framework.Servers.HttpServer { IHttpClientContext context = (IHttpClientContext)source; IHttpRequest request = args.Request; - + PollServiceEventArgs psEvArgs; - + if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs)) { PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request); - + if (psEvArgs.Request != null) { OSHttpRequest req = new OSHttpRequest(context, request); - + Stream requestStream = req.InputStream; - + Encoding encoding = Encoding.UTF8; StreamReader reader = new StreamReader(requestStream, encoding); - + string requestBody = reader.ReadToEnd(); - + Hashtable keysvals = new Hashtable(); Hashtable headervals = new Hashtable(); - + string[] querystringkeys = req.QueryString.AllKeys; string[] rHeaders = req.Headers.AllKeys; - + keysvals.Add("body", requestBody); keysvals.Add("uri", req.RawUrl); keysvals.Add("content-type", req.ContentType); keysvals.Add("http-method", req.HttpMethod); - + foreach (string queryname in querystringkeys) { keysvals.Add(queryname, req.QueryString[queryname]); } - + foreach (string headername in rHeaders) { headervals[headername] = req.Headers[headername]; } - + keysvals.Add("headers", headervals); keysvals.Add("querystringkeys", querystringkeys); - + psEvArgs.Request(psreq.RequestID, keysvals); } - + m_PollServiceManager.Enqueue(psreq); } else @@ -319,6 +320,13 @@ namespace OpenSim.Framework.Servers.HttpServer OSHttpRequest req = new OSHttpRequest(context, request); OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context); HandleRequest(req, resp); + + // !!!HACK ALERT!!! + // There seems to be a bug in the underlying http code that makes subsequent requests + // come up with trash in Accept headers. Until that gets fixed, we're cleaning them up here. + if (request.AcceptTypes != null) + for (int i = 0; i < request.AcceptTypes.Length; i++) + request.AcceptTypes[i] = string.Empty; } // public void ConvertIHttpClientContextToOSHttp(object stateinfo) @@ -331,19 +339,31 @@ namespace OpenSim.Framework.Servers.HttpServer // HandleRequest(request,resp); // } + /// + /// This methods is the start of incoming HTTP request handling. + /// + /// + /// public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) { + string reqnum = "unknown"; + int tickstart = Environment.TickCount; + try { + // OpenSim.Framework.WebUtil.OSHeaderRequestID + if (request.Headers["opensim-request-id"] != null) + reqnum = String.Format("{0}:{1}",request.RemoteIPEndPoint,request.Headers["opensim-request-id"]); + // m_log.DebugFormat("[BASE HTTP SERVER]: <{0}> handle request for {1}",reqnum,request.RawUrl); + Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); + // This is the REST agent interface. We require an agent to properly identify // itself. If the REST handler recognizes the prefix it will attempt to // satisfy the request. If it is not recognizable, and no damage has occurred // the request can be passed through to the other handlers. This is a low // probability event; if a request is matched it is normally expected to be // handled -// m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); - IHttpAgentHandler agentHandler; if (TryGetAgentHandler(request, response, out agentHandler)) @@ -442,7 +462,7 @@ namespace OpenSim.Framework.Servers.HttpServer } request.InputStream.Close(); - + // HTTP IN support. The script engine taes it from here // Nothing to worry about for us. // @@ -526,7 +546,7 @@ namespace OpenSim.Framework.Servers.HttpServer HandleLLSDRequests(request, response); return; } - + // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); if (DoWeHaveAHTTPHandler(request.RawUrl)) { @@ -562,6 +582,15 @@ namespace OpenSim.Framework.Servers.HttpServer m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e); SendHTML500(response); } + finally + { + // Every month or so this will wrap and give bad numbers, not really a problem + // since its just for reporting, 200ms limit can be adjusted + int tickdiff = Environment.TickCount - tickstart; + if (tickdiff > 500) + m_log.InfoFormat( + "[BASE HTTP SERVER]: slow request <{0}> for {1} took {2} ms", reqnum, request.RawUrl, tickdiff); + } } private bool TryGetStreamHandler(string handlerKey, out IRequestHandler streamHandler) @@ -580,7 +609,7 @@ namespace OpenSim.Framework.Servers.HttpServer } } } - + if (String.IsNullOrEmpty(bestMatch)) { streamHandler = null; @@ -627,7 +656,7 @@ namespace OpenSim.Framework.Servers.HttpServer private bool TryGetHTTPHandler(string handlerKey, out GenericHTTPMethod HTTPHandler) { // m_log.DebugFormat("[BASE HTTP HANDLER]: Looking for HTTP handler for {0}", handlerKey); - + string bestMatch = null; lock (m_HTTPHandlers) @@ -713,17 +742,18 @@ namespace OpenSim.Framework.Servers.HttpServer { xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1] XmlRpcResponse xmlRpcResponse; - + XmlRpcMethod method; bool methodWasFound; lock (m_rpcHandlers) { methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method); } - + if (methodWasFound) { xmlRprcRequest.Params.Add(request.Url); // Param[2] + xmlRprcRequest.Params.Add(request.Headers.Get("X-Forwarded-For")); // Param[3] try { @@ -751,10 +781,10 @@ namespace OpenSim.Framework.Servers.HttpServer else { xmlRpcResponse = new XmlRpcResponse(); - + // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php xmlRpcResponse.SetFault( - XmlRpcErrorCodes.SERVER_ERROR_METHOD, + XmlRpcErrorCodes.SERVER_ERROR_METHOD, String.Format("Requested method [{0}] not found", methodName)); } @@ -771,11 +801,11 @@ namespace OpenSim.Framework.Servers.HttpServer response.KeepAlive = false; m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl); - + response.SendChunked = false; response.ContentLength64 = buf.Length; response.ContentEncoding = Encoding.UTF8; - + try { response.OutputStream.Write(buf, 0, buf.Length); @@ -857,13 +887,13 @@ namespace OpenSim.Framework.Servers.HttpServer OSD llsdRequest = null; OSD llsdResponse = null; - + bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest")); - + if (requestBody.Length == 0) // Get Request { - requestBody = "requestget"; + requestBody = "requestget"; } try { @@ -1075,7 +1105,7 @@ namespace OpenSim.Framework.Servers.HttpServer string bestMatch = null; //m_log.DebugFormat("[BASE HTTP HANDLER]: Checking if we have an HTTP handler for {0}", searchquery); - + lock (m_HTTPHandlers) { foreach (string pattern in m_HTTPHandlers.Keys) @@ -1141,7 +1171,7 @@ namespace OpenSim.Framework.Servers.HttpServer // You have to specifically register for '/' and to get it, you must specificaly request it // if (pattern == "/" && searchquery == "/" || pattern != "/") - bestMatch = pattern; + bestMatch = pattern; } } } @@ -1221,11 +1251,11 @@ namespace OpenSim.Framework.Servers.HttpServer } public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) - { + { // m_log.DebugFormat( -// "[BASE HTTP SERVER]: HandleHTTPRequest for request to {0}, method {1}", +// "[BASE HTTP SERVER]: HandleHTTPRequest for request to {0}, method {1}", // request.RawUrl, request.HttpMethod); - + switch (request.HttpMethod) { case "OPTIONS": @@ -1241,7 +1271,7 @@ namespace OpenSim.Framework.Servers.HttpServer private void HandleContentVerbs(OSHttpRequest request, OSHttpResponse response) { // m_log.DebugFormat("[BASE HTTP SERVER]: HandleContentVerbs for request to {0}", request.RawUrl); - + // This is a test. There's a workable alternative.. as this way sucks. // We'd like to put this into a text file parhaps that's easily editable. // @@ -1376,7 +1406,7 @@ namespace OpenSim.Framework.Servers.HttpServer // m_log.DebugFormat( // "[BASE HTTP HANDLER]: TryGetHTTPHandlerPathBased() looking for HTTP handler to match {0}", searchquery); - + lock (m_HTTPHandlers) { foreach (string pattern in m_HTTPHandlers.Keys) @@ -1435,9 +1465,13 @@ namespace OpenSim.Framework.Servers.HttpServer if (responsedata.ContainsKey("reusecontext")) response.ReuseContext = (bool) responsedata["reusecontext"]; + // Cross-Origin Resource Sharing with simple requests + if (responsedata.ContainsKey("access_control_allow_origin")) + response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]); + //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this //and should check for NullReferenceExceptions - + if (string.IsNullOrEmpty(contentType)) { contentType = "text/html"; @@ -1457,9 +1491,10 @@ namespace OpenSim.Framework.Servers.HttpServer byte[] buffer; - if (!(contentType.Contains("image") - || contentType.Contains("x-shockwave-flash") - || contentType.Contains("application/x-oar"))) + if (!(contentType.Contains("image") + || contentType.Contains("x-shockwave-flash") + || contentType.Contains("application/x-oar") + || contentType.Contains("application/vnd.ll.mesh"))) { // Text buffer = Encoding.UTF8.GetBytes(responseString); @@ -1489,7 +1524,7 @@ namespace OpenSim.Framework.Servers.HttpServer { response.OutputStream.Flush(); response.Send(); - + //if (!response.KeepAlive && response.ReuseContext) // response.FreeContext(); } @@ -1596,11 +1631,11 @@ namespace OpenSim.Framework.Servers.HttpServer m_httpListener2 = CoolHTTPListener.Create(m_listenIPAddress, (int)m_port); m_httpListener2.ExceptionThrown += httpServerException; m_httpListener2.LogWriter = httpserverlog; - - // Uncomment this line in addition to those in HttpServerLogWriter + + // Uncomment this line in addition to those in HttpServerLogWriter // if you want more detailed trace information from the HttpServer //m_httpListener2.UseTraceLogs = true; - + //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; } else @@ -1628,8 +1663,8 @@ namespace OpenSim.Framework.Servers.HttpServer { m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message); m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?"); - - // We want this exception to halt the entire server since in current configurations we aren't too + + // We want this exception to halt the entire server since in current configurations we aren't too // useful without inbound HTTP. throw e; } @@ -1641,7 +1676,7 @@ namespace OpenSim.Framework.Servers.HttpServer { case SocketError.NotSocket: NotSocketErrors++; - + break; } } @@ -1671,12 +1706,11 @@ namespace OpenSim.Framework.Servers.HttpServer m_httpListener2.LogWriter = null; m_httpListener2.RequestReceived -= OnRequest; m_httpListener2.Stop(); - } + } catch (NullReferenceException) { m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer."); } - } public void RemoveStreamHandler(string httpMethod, string path) @@ -1697,7 +1731,7 @@ namespace OpenSim.Framework.Servers.HttpServer m_HTTPHandlers.Remove(path); return; } - + m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); } } @@ -1713,7 +1747,6 @@ namespace OpenSim.Framework.Servers.HttpServer } RemoveHTTPHandler(httpMethod, path); - } public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) @@ -1744,7 +1777,6 @@ namespace OpenSim.Framework.Servers.HttpServer } } - public bool RemoveLLSDHandler(string path, LLSDMethod handler) { try @@ -1818,7 +1850,7 @@ namespace OpenSim.Framework.Servers.HttpServer oresp = osresp; } } - + /// /// Relays HttpServer log messages to our own logging mechanism. /// @@ -1828,7 +1860,7 @@ namespace OpenSim.Framework.Servers.HttpServer /// property in StartHttp() for the HttpListener public class HttpServerLogWriter : ILogWriter { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public void Write(object source, LogPrio priority, string message) { @@ -1837,7 +1869,7 @@ namespace OpenSim.Framework.Servers.HttpServer { case LogPrio.Trace: m_log.DebugFormat("[{0}]: {1}", source, message); - break; + break; case LogPrio.Debug: m_log.DebugFormat("[{0}]: {1}", source, message); break; @@ -1857,8 +1889,8 @@ namespace OpenSim.Framework.Servers.HttpServer break; } */ - + return; } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs index 86fa44dfea..bae4e1b997 100644 --- a/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs @@ -53,8 +53,8 @@ namespace OpenSim.Framework.Servers.HttpServer private static byte[] ReadFully(Stream stream) { - byte[] buffer = new byte[32768]; - using (MemoryStream ms = new MemoryStream()) + byte[] buffer = new byte[1024]; + using (MemoryStream ms = new MemoryStream(1024*256)) { while (true) { diff --git a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs index b0cf34d16e..41ece86047 100644 --- a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs +++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs @@ -57,75 +57,73 @@ namespace OpenSim.Framework.Servers.HttpServer { WebRequest request = WebRequest.Create(requestUrl); request.Method = verb; - - if ((verb == "POST") || (verb == "PUT")) - { - request.ContentType = "text/www-form-urlencoded"; - - MemoryStream buffer = new MemoryStream(); - int length = 0; - using (StreamWriter writer = new StreamWriter(buffer)) - { - writer.Write(obj); - writer.Flush(); - } - - length = (int)obj.Length; - request.ContentLength = length; - - Stream requestStream = null; - try - { - requestStream = request.GetRequestStream(); - requestStream.Write(buffer.ToArray(), 0, length); - } - catch (Exception e) - { - m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: {1}", requestUrl, e.Message); - } - finally - { - if (requestStream != null) - requestStream.Close(); - // Let's not close this - //buffer.Close(); - - } - } - string respstring = String.Empty; - try + using (MemoryStream buffer = new MemoryStream()) { - using (WebResponse resp = request.GetResponse()) + if ((verb == "POST") || (verb == "PUT")) { - if (resp.ContentLength > 0) + request.ContentType = "text/www-form-urlencoded"; + + int length = 0; + using (StreamWriter writer = new StreamWriter(buffer)) { - Stream respStream = null; - try + writer.Write(obj); + writer.Flush(); + } + + length = (int)obj.Length; + request.ContentLength = length; + + Stream requestStream = null; + try + { + requestStream = request.GetRequestStream(); + requestStream.Write(buffer.ToArray(), 0, length); + } + catch (Exception e) + { + m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: " + e.ToString(), requestUrl); + } + finally + { + if (requestStream != null) + requestStream.Close(); + } + } + + try + { + using (WebResponse resp = request.GetResponse()) + { + if (resp.ContentLength != 0) { - respStream = resp.GetResponseStream(); - using (StreamReader reader = new StreamReader(respStream)) + Stream respStream = null; + try { - respstring = reader.ReadToEnd(); + respStream = resp.GetResponseStream(); + using (StreamReader reader = new StreamReader(respStream)) + { + respstring = reader.ReadToEnd(); + } + } + catch (Exception e) + { + m_log.DebugFormat("[FORMS]: exception occured on receiving reply " + e.ToString()); + } + finally + { + if (respStream != null) + respStream.Close(); } - } - catch (Exception e) - { - m_log.DebugFormat("[FORMS]: exception occured on receiving reply {0}", e.Message); - } - finally - { - if (respStream != null) - respStream.Close(); } } } - } - catch (System.InvalidOperationException) - { - // This is what happens when there is invalid XML - m_log.DebugFormat("[FORMS]: InvalidOperationException on receiving request"); + catch (System.InvalidOperationException) + { + // This is what happens when there is invalid XML + m_log.DebugFormat("[FORMS]: InvalidOperationException on receiving request"); + } } return respstring; } diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index 100bf1fd52..c9d4c93d49 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs @@ -49,7 +49,7 @@ namespace OpenSim public static string GetVersionString(string versionNumber, Flavour flavour) { - string versionString = "OpenSim " + versionNumber + " (" + flavour + ")"; + string versionString = "OpenSim " + versionNumber + " " + flavour; return versionString.PadRight(VERSIONINFO_VERSION_LENGTH); } @@ -69,6 +69,6 @@ namespace OpenSim /// of the code that is too old. /// /// - public readonly static int MajorInterfaceVersion = 6; + public readonly static int MajorInterfaceVersion = 7; } } diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index 3619606679..544975791b 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs @@ -390,36 +390,41 @@ Asset service request failures: {3}" + Environment.NewLine, public override string XReport(string uptime, string version) { OSDMap args = new OSDMap(30); - args["AssetsInCache"] = OSD.FromReal(AssetsInCache); - args["TimeAfterCacheMiss"] = OSD.FromReal(assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0); - args["BlockedMissingTextureRequests"] = OSD.FromReal(BlockedMissingTextureRequests); - args["AssetServiceRequestFailures"] = OSD.FromReal(AssetServiceRequestFailures); - args["abnormalClientThreadTerminations"] = OSD.FromReal(abnormalClientThreadTerminations); - args["InventoryServiceRetrievalFailures"] = OSD.FromReal(InventoryServiceRetrievalFailures); - args["Dilatn"] = OSD.FromReal(timeDilation); - args["SimFPS"] = OSD.FromReal(simFps); - args["PhyFPS"] = OSD.FromReal(physicsFps); - args["AgntUp"] = OSD.FromReal(agentUpdates); - args["RootAg"] = OSD.FromReal(rootAgents); - args["ChldAg"] = OSD.FromReal(childAgents); - args["Prims"] = OSD.FromReal(totalPrims); - args["AtvPrm"] = OSD.FromReal(activePrims); - args["AtvScr"] = OSD.FromReal(activeScripts); - args["ScrLPS"] = OSD.FromReal(scriptLinesPerSecond); - args["PktsIn"] = OSD.FromReal(inPacketsPerSecond); - args["PktOut"] = OSD.FromReal(outPacketsPerSecond); - args["PendDl"] = OSD.FromReal(pendingDownloads); - args["PendUl"] = OSD.FromReal(pendingUploads); - args["UnackB"] = OSD.FromReal(unackedBytes); - args["TotlFt"] = OSD.FromReal(totalFrameTime); - args["NetFt"] = OSD.FromReal(netFrameTime); - args["PhysFt"] = OSD.FromReal(physicsFrameTime); - args["OthrFt"] = OSD.FromReal(otherFrameTime); - args["AgntFt"] = OSD.FromReal(agentFrameTime); - args["ImgsFt"] = OSD.FromReal(imageFrameTime); - args["Memory"] = OSD.FromString(base.XReport(uptime, version)); - args["Uptime"] = OSD.FromString(uptime); - args["Version"] = OSD.FromString(version); + args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache)); + args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}", + assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0)); + args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}", + BlockedMissingTextureRequests)); + args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}", + AssetServiceRequestFailures)); + args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}", + abnormalClientThreadTerminations)); + args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}", + InventoryServiceRetrievalFailures)); + args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation)); + args["SimFPS"] = OSD.FromString (String.Format ("{0:0.##}", simFps)); + args["PhyFPS"] = OSD.FromString (String.Format ("{0:0.##}", physicsFps)); + args["AgntUp"] = OSD.FromString (String.Format ("{0:0.##}", agentUpdates)); + args["RootAg"] = OSD.FromString (String.Format ("{0:0.##}", rootAgents)); + args["ChldAg"] = OSD.FromString (String.Format ("{0:0.##}", childAgents)); + args["Prims"] = OSD.FromString (String.Format ("{0:0.##}", totalPrims)); + args["AtvPrm"] = OSD.FromString (String.Format ("{0:0.##}", activePrims)); + args["AtvScr"] = OSD.FromString (String.Format ("{0:0.##}", activeScripts)); + args["ScrLPS"] = OSD.FromString (String.Format ("{0:0.##}", scriptLinesPerSecond)); + args["PktsIn"] = OSD.FromString (String.Format ("{0:0.##}", inPacketsPerSecond)); + args["PktOut"] = OSD.FromString (String.Format ("{0:0.##}", outPacketsPerSecond)); + args["PendDl"] = OSD.FromString (String.Format ("{0:0.##}", pendingDownloads)); + args["PendUl"] = OSD.FromString (String.Format ("{0:0.##}", pendingUploads)); + args["UnackB"] = OSD.FromString (String.Format ("{0:0.##}", unackedBytes)); + args["TotlFt"] = OSD.FromString (String.Format ("{0:0.##}", totalFrameTime)); + args["NetFt"] = OSD.FromString (String.Format ("{0:0.##}", netFrameTime)); + args["PhysFt"] = OSD.FromString (String.Format ("{0:0.##}", physicsFrameTime)); + args["OthrFt"] = OSD.FromString (String.Format ("{0:0.##}", otherFrameTime)); + args["AgntFt"] = OSD.FromString (String.Format ("{0:0.##}", agentFrameTime)); + args["ImgsFt"] = OSD.FromString (String.Format ("{0:0.##}", imageFrameTime)); + args["Memory"] = OSD.FromString (base.XReport (uptime, version)); + args["Uptime"] = OSD.FromString (uptime); + args["Version"] = OSD.FromString (version); string strBuffer = ""; strBuffer = OSDParser.SerializeJsonString(args); diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index 2cb78957f5..30d775cf6a 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs @@ -102,6 +102,7 @@ namespace OpenSim.Framework private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL; private uint _creationDate = 0; private UUID _creatorID = UUID.Zero; + private string _creatorData = String.Empty; private string _description = String.Empty; private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL; private uint _flags = 0; @@ -160,6 +161,61 @@ namespace OpenSim.Framework } } + public string CreatorData // = ; + { + get { return _creatorData; } + set { _creatorData = value; } + } + + /// + /// 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]] + /// + public string CreatorIdentification + { + get + { + if (_creatorData != null && _creatorData != string.Empty) + return _creatorID.ToString() + ';' + _creatorData; + else + return _creatorID.ToString(); + } + set + { + if ((value == null) || (value != null && value == string.Empty)) + { + _creatorData = string.Empty; + return; + } + + if (!value.Contains(";")) // plain UUID + { + UUID uuid = UUID.Zero; + UUID.TryParse(value, out uuid); + _creatorID = uuid; + } + else // [;[;name]] + { + string name = "Unknown User"; + string[] parts = value.Split(';'); + if (parts.Length >= 1) + { + UUID uuid = UUID.Zero; + UUID.TryParse(parts[0], out uuid); + _creatorID = uuid; + } + if (parts.Length >= 2) + _creatorData = parts[1]; + if (parts.Length >= 3) + name = parts[2]; + + _creatorData += ';' + name; + + } + } + } + public string Description { get { return _description; @@ -348,15 +404,15 @@ namespace OpenSim.Framework /// The new part ID to which this item belongs public void ResetIDs(UUID partID) { - _oldID = _itemID; - _itemID = UUID.Random(); - _parentPartID = partID; - _parentID = partID; + OldItemID = ItemID; + ItemID = UUID.Random(); + ParentPartID = partID; + ParentID = partID; } public TaskInventoryItem() { - _creationDate = (uint)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; + CreationDate = (uint)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; } } } diff --git a/OpenSim/Framework/Tests/ACLTest.cs b/OpenSim/Framework/Tests/ACLTest.cs deleted file mode 100644 index 06e860e01c..0000000000 --- a/OpenSim/Framework/Tests/ACLTest.cs +++ /dev/null @@ -1,125 +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 NUnit.Framework; -using System.Collections.Generic; - - -namespace OpenSim.Framework.Tests -{ - [TestFixture] - public class ACLTest - { - #region Tests - - /// - /// ACL Test class - /// - [Test] - public void ACLTest01() - { - ACL acl = new ACL(); - - Role Guests = new Role("Guests"); - acl.AddRole(Guests); - - Role[] parents = new Role[1]; - parents[0] = Guests; - - Role JoeGuest = new Role("JoeGuest", parents); - acl.AddRole(JoeGuest); - - Resource CanBuild = new Resource("CanBuild"); - acl.AddResource(CanBuild); - - - acl.GrantPermission("Guests", "CanBuild"); - - Permission perm = acl.HasPermission("JoeGuest", "CanBuild"); - Assert.That(perm == Permission.Allow, "JoeGuest should have permission to build"); - perm = Permission.None; - try - { - perm = acl.HasPermission("unknownGuest", "CanBuild"); - - } - catch (KeyNotFoundException) - { - - - } - catch (Exception) - { - Assert.That(false,"Exception thrown should have been KeyNotFoundException"); - } - Assert.That(perm == Permission.None,"Permission None should be set because exception should have been thrown"); - - } - - [Test] - public void KnownButPermissionDenyAndPermissionNoneUserTest() - { - ACL acl = new ACL(); - - Role Guests = new Role("Guests"); - acl.AddRole(Guests); - Role Administrators = new Role("Administrators"); - acl.AddRole(Administrators); - Role[] Guestparents = new Role[1]; - Role[] Adminparents = new Role[1]; - - Guestparents[0] = Guests; - Adminparents[0] = Administrators; - - Role JoeGuest = new Role("JoeGuest", Guestparents); - acl.AddRole(JoeGuest); - - Resource CanBuild = new Resource("CanBuild"); - acl.AddResource(CanBuild); - - Resource CanScript = new Resource("CanScript"); - acl.AddResource(CanScript); - - Resource CanRestart = new Resource("CanRestart"); - acl.AddResource(CanRestart); - - acl.GrantPermission("Guests", "CanBuild"); - acl.DenyPermission("Guests", "CanRestart"); - - acl.GrantPermission("Administrators", "CanScript"); - - acl.GrantPermission("Administrators", "CanRestart"); - Permission setPermission = acl.HasPermission("JoeGuest", "CanRestart"); - Assert.That(setPermission == Permission.Deny, "Guests Should not be able to restart"); - Assert.That(acl.HasPermission("JoeGuest", "CanScript") == Permission.None, - "No Explicit Permissions set so should be Permission.None"); - } - - #endregion - } -} diff --git a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs index 2fda6f31cc..05d8469728 100644 --- a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs +++ b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs @@ -65,9 +65,7 @@ namespace OpenSim.Framework.Tests SessionId = UUID.Random(); AvAppearance = new AvatarAppearance(AgentId); - AvAppearance.SetDefaultWearables(); VisualParams = new byte[218]; - AvAppearance.SetDefaultParams(VisualParams); //body VisualParams[(int)AvatarAppearance.VPElement.SHAPE_HEIGHT] = 155; diff --git a/OpenSim/Framework/Tests/AnimationTests.cs b/OpenSim/Framework/Tests/AnimationTests.cs new file mode 100644 index 0000000000..719ddce306 --- /dev/null +++ b/OpenSim/Framework/Tests/AnimationTests.cs @@ -0,0 +1,96 @@ +/* + * 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.Reflection; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; +using OpenMetaverse; +using OpenMetaverse.StructuredData; +using OpenSim.Framework; +using OpenSim.Tests.Common; +using OpenSim.Tests.Common.Mock; +using OpenSim.Tests.Common.Setup; +using Animation = OpenSim.Framework.Animation; + +namespace OpenSim.Framework.Tests +{ + [TestFixture] + public class AnimationTests + { + private Animation anim1 = null; + private Animation anim2 = null; + private UUID animUUID1 = UUID.Zero; + private UUID objUUID1 = UUID.Zero; + private UUID animUUID2 = UUID.Zero; + private UUID objUUID2 = UUID.Zero; + + [SetUp] + public void Setup() + { + animUUID1 = UUID.Random(); + animUUID2 = UUID.Random(); + objUUID1 = UUID.Random(); + objUUID2 = UUID.Random(); + + anim1 = new Animation(animUUID1, 1, objUUID1); + anim2 = new Animation(animUUID2, 1, objUUID2); + } + + [Test] + public void AnimationOSDTest() + { + Assert.That(anim1.AnimID==animUUID1 && anim1.ObjectID == objUUID1 && anim1.SequenceNum ==1, "The Animation Constructor didn't set the fields correctly"); + OSD updateMessage = anim1.PackUpdateMessage(); + Assert.That(updateMessage is OSDMap, "Packed UpdateMessage isn't an OSDMap"); + OSDMap updateMap = (OSDMap) updateMessage; + Assert.That(updateMap.ContainsKey("animation"), "Packed Message doesn't contain an animation element"); + Assert.That(updateMap.ContainsKey("object_id"), "Packed Message doesn't contain an object_id element"); + Assert.That(updateMap.ContainsKey("seq_num"), "Packed Message doesn't contain a seq_num element"); + Assert.That(updateMap["animation"].AsUUID() == animUUID1); + Assert.That(updateMap["object_id"].AsUUID() == objUUID1); + Assert.That(updateMap["seq_num"].AsInteger() == 1); + + Animation anim3 = new Animation(updateMap); + + Assert.That(anim3.ObjectID == anim1.ObjectID && anim3.AnimID == anim1.AnimID && anim3.SequenceNum == anim1.SequenceNum, "OSDMap Constructor failed to set the properties correctly."); + + anim3.UnpackUpdateMessage(anim2.PackUpdateMessage()); + + Assert.That(anim3.ObjectID == objUUID2 && anim3.AnimID == animUUID2 && anim3.SequenceNum == 1, "Animation.UnpackUpdateMessage failed to set the properties correctly."); + + Animation anim4 = new Animation(); + anim4.AnimID = anim2.AnimID; + anim4.ObjectID = anim2.ObjectID; + anim4.SequenceNum = anim2.SequenceNum; + + Assert.That(anim4.ObjectID == objUUID2 && anim4.AnimID == animUUID2 && anim4.SequenceNum == 1, "void constructor and manual field population failed to set the properties correctly."); + + + } + } +} \ No newline at end of file diff --git a/OpenSim/Framework/Tests/CacheTests.cs b/OpenSim/Framework/Tests/CacheTests.cs index 32c0c9510a..c3613e6410 100644 --- a/OpenSim/Framework/Tests/CacheTests.cs +++ b/OpenSim/Framework/Tests/CacheTests.cs @@ -40,6 +40,7 @@ namespace OpenSim.Framework.Tests public void Build() { cache = new Cache(); + cache = new Cache(CacheMedium.Memory,CacheStrategy.Aggressive,CacheFlags.AllowUpdate); cacheItemUUID = UUID.Random(); MemoryCacheItem cachedItem = new MemoryCacheItem(cacheItemUUID.ToString(),DateTime.Now + TimeSpan.FromDays(1)); byte[] foo = new byte[1]; @@ -68,23 +69,7 @@ namespace OpenSim.Framework.Tests Assert.That(citem == null, "Item should not be in Cache"); } - //NOTE: Test Case disabled until Cache is fixed - [Test] - public void TestTTLExpiredEntry() - { - UUID ImmediateExpiryUUID = UUID.Random(); - MemoryCacheItem cachedItem = new MemoryCacheItem(ImmediateExpiryUUID.ToString(), TimeSpan.FromDays(-1)); - byte[] foo = new byte[1]; - foo[0] = 1; - cachedItem.Store(foo); - cache.Store(cacheItemUUID.ToString(), cachedItem); - - cache.Get(cacheItemUUID.ToString()); - //object citem = cache.Get(cacheItemUUID.ToString()); - //Assert.That(citem == null, "Item should not be in Cache because the expiry time was before now"); - } - - //NOTE: Test Case disabled until Cache is fixed + [Test] public void ExpireItemManually() { @@ -94,10 +79,45 @@ namespace OpenSim.Framework.Tests foo[0] = 1; cachedItem.Store(foo); cache.Store(cacheItemUUID.ToString(), cachedItem); - cache.Invalidate(ImmediateExpiryUUID.ToString()); + cache.Invalidate(cacheItemUUID.ToString()); cache.Get(cacheItemUUID.ToString()); - //object citem = cache.Get(cacheItemUUID.ToString()); - //Assert.That(citem == null, "Item should not be in Cache because we manually invalidated it"); + object citem = cache.Get(cacheItemUUID.ToString()); + Assert.That(citem == null, "Item should not be in Cache because we manually invalidated it"); + } + + [Test] + public void ClearCacheTest() + { + UUID ImmediateExpiryUUID = UUID.Random(); + MemoryCacheItem cachedItem = new MemoryCacheItem(ImmediateExpiryUUID.ToString(), DateTime.Now - TimeSpan.FromDays(1)); + byte[] foo = new byte[1]; + foo[0] = 1; + cachedItem.Store(foo); + cache.Store(cacheItemUUID.ToString(), cachedItem); + cache.Clear(); + + object citem = cache.Get(cacheItemUUID.ToString()); + Assert.That(citem == null, "Item should not be in Cache because we manually invalidated it"); + } + + [Test] + public void CacheItemMundane() + { + UUID Random1 = UUID.Random(); + UUID Random2 = UUID.Random(); + byte[] data = new byte[0]; + CacheItemBase cb1 = new CacheItemBase(Random1.ToString(), DateTime.Now + TimeSpan.FromDays(1)); + CacheItemBase cb2 = new CacheItemBase(Random2.ToString(), DateTime.Now + TimeSpan.FromDays(1)); + CacheItemBase cb3 = new CacheItemBase(Random1.ToString(), DateTime.Now + TimeSpan.FromDays(1)); + + cb1.Store(data); + + Assert.That(cb1.Equals(cb3), "cb1 should equal cb3, their uuids are the same"); + Assert.That(!cb2.Equals(cb1), "cb2 should not equal cb1, their uuids are NOT the same"); + Assert.That(cb1.IsLocked() == false, "CacheItemBase default is false"); + Assert.That(cb1.Retrieve() == null, "Virtual Retrieve method should return null"); + + } } diff --git a/OpenSim/Framework/Tests/LocationTest.cs b/OpenSim/Framework/Tests/LocationTest.cs index 237568f5e4..2707afa066 100644 --- a/OpenSim/Framework/Tests/LocationTest.cs +++ b/OpenSim/Framework/Tests/LocationTest.cs @@ -54,9 +54,28 @@ namespace OpenSim.Framework.Tests Location TestLocation2 = new Location(1099511628032000); Assert.That(TestLocation1 == TestLocation2); + Assert.That(TestLocation2.X == 256000 && TestLocation2.Y == 256000, "Test xy location doesn't match regionhandle provided"); + + Assert.That(TestLocation2.RegionHandle == 1099511628032000, + "Location RegionHandle Property didn't match regionhandle provided in constructor"); + + TestLocation1 = new Location(256001, 256001); TestLocation2 = new Location(1099511628032000); Assert.That(TestLocation1 != TestLocation2); + + Assert.That(TestLocation1.Equals(256001, 256001), "Equals(x,y) failed to match the position in the constructor"); + + Assert.That(TestLocation2.GetHashCode() == (TestLocation2.X.GetHashCode() ^ TestLocation2.Y.GetHashCode()), "GetHashCode failed to produce the expected hashcode"); + + Location TestLocation3; + object cln = TestLocation2.Clone(); + TestLocation3 = (Location) cln; + Assert.That(TestLocation3.X == TestLocation2.X && TestLocation3.Y == TestLocation2.Y, + "Cloned Location values do not match"); + + Assert.That(TestLocation2.Equals(cln), "Cloned object failed .Equals(obj) Test"); + } } diff --git a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs new file mode 100644 index 0000000000..e7f8bfc1f0 --- /dev/null +++ b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs @@ -0,0 +1,311 @@ +/* + * 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 NUnit.Framework; +using OpenSim.Framework; +using OpenMetaverse; +using OpenMetaverse.StructuredData; +using System; +using System.Globalization; +using System.Threading; + +namespace OpenSim.Framework.Tests +{ + [TestFixture] + public class MundaneFrameworkTests + { + private bool m_RegionSettingsOnSaveEventFired; + private bool m_RegionLightShareDataOnSaveEventFired; + + + [Test] + public void ChildAgentDataUpdate01() + { + // code coverage + ChildAgentDataUpdate cadu = new ChildAgentDataUpdate(); + Assert.IsFalse(cadu.alwaysrun, "Default is false"); + } + + [Test] + public void AgentPositionTest01() + { + UUID AgentId1 = UUID.Random(); + UUID SessionId1 = UUID.Random(); + uint CircuitCode1 = uint.MinValue; + Vector3 Size1 = Vector3.UnitZ; + Vector3 Position1 = Vector3.UnitX; + Vector3 LeftAxis1 = Vector3.UnitY; + Vector3 UpAxis1 = Vector3.UnitZ; + Vector3 AtAxis1 = Vector3.UnitX; + + ulong RegionHandle1 = ulong.MinValue; + byte[] Throttles1 = new byte[] {0, 1, 0}; + + Vector3 Velocity1 = Vector3.Zero; + float Far1 = 256; + + bool ChangedGrid1 = false; + Vector3 Center1 = Vector3.Zero; + + AgentPosition position1 = new AgentPosition(); + position1.AgentID = AgentId1; + position1.SessionID = SessionId1; + position1.CircuitCode = CircuitCode1; + position1.Size = Size1; + position1.Position = Position1; + position1.LeftAxis = LeftAxis1; + position1.UpAxis = UpAxis1; + position1.AtAxis = AtAxis1; + position1.RegionHandle = RegionHandle1; + position1.Throttles = Throttles1; + position1.Velocity = Velocity1; + position1.Far = Far1; + position1.ChangedGrid = ChangedGrid1; + position1.Center = Center1; + + ChildAgentDataUpdate cadu = new ChildAgentDataUpdate(); + cadu.AgentID = AgentId1.Guid; + cadu.ActiveGroupID = UUID.Zero.Guid; + cadu.throttles = Throttles1; + cadu.drawdistance = Far1; + cadu.Position = Position1; + cadu.Velocity = Velocity1; + cadu.regionHandle = RegionHandle1; + cadu.cameraPosition = Center1; + cadu.AVHeight = Size1.Z; + + AgentPosition position2 = new AgentPosition(); + position2.CopyFrom(cadu); + + Assert.IsTrue( + position2.AgentID == position1.AgentID + && position2.Size == position1.Size + && position2.Position == position1.Position + && position2.Velocity == position1.Velocity + && position2.Center == position1.Center + && position2.RegionHandle == position1.RegionHandle + && position2.Far == position1.Far + + ,"Copy From ChildAgentDataUpdate failed"); + + position2 = new AgentPosition(); + + Assert.IsFalse(position2.AgentID == position1.AgentID, "Test Error, position2 should be a blank uninitialized AgentPosition"); + position2.Unpack(position1.Pack()); + + Assert.IsTrue(position2.AgentID == position1.AgentID, "Agent ID didn't unpack the same way it packed"); + Assert.IsTrue(position2.Position == position1.Position, "Position didn't unpack the same way it packed"); + Assert.IsTrue(position2.Velocity == position1.Velocity, "Velocity didn't unpack the same way it packed"); + Assert.IsTrue(position2.SessionID == position1.SessionID, "SessionID didn't unpack the same way it packed"); + Assert.IsTrue(position2.CircuitCode == position1.CircuitCode, "CircuitCode didn't unpack the same way it packed"); + Assert.IsTrue(position2.LeftAxis == position1.LeftAxis, "LeftAxis didn't unpack the same way it packed"); + Assert.IsTrue(position2.UpAxis == position1.UpAxis, "UpAxis didn't unpack the same way it packed"); + Assert.IsTrue(position2.AtAxis == position1.AtAxis, "AtAxis didn't unpack the same way it packed"); + Assert.IsTrue(position2.RegionHandle == position1.RegionHandle, "RegionHandle didn't unpack the same way it packed"); + Assert.IsTrue(position2.ChangedGrid == position1.ChangedGrid, "ChangedGrid didn't unpack the same way it packed"); + Assert.IsTrue(position2.Center == position1.Center, "Center didn't unpack the same way it packed"); + Assert.IsTrue(position2.Size == position1.Size, "Size didn't unpack the same way it packed"); + + } + + [Test] + public void RegionSettingsTest01() + { + RegionSettings settings = new RegionSettings(); + settings.OnSave += RegionSaveFired; + settings.Save(); + settings.OnSave -= RegionSaveFired; + +// string str = settings.LoadedCreationDate; +// int dt = settings.LoadedCreationDateTime; +// string id = settings.LoadedCreationID; +// string time = settings.LoadedCreationTime; + + Assert.That(m_RegionSettingsOnSaveEventFired, "RegionSettings Save Event didn't Fire"); + + } + public void RegionSaveFired(RegionSettings settings) + { + m_RegionSettingsOnSaveEventFired = true; + } + + [Test] + public void InventoryItemBaseConstructorTest01() + { + InventoryItemBase b1 = new InventoryItemBase(); + Assert.That(b1.ID == UUID.Zero, "void constructor should create an inventory item with ID = UUID.Zero"); + Assert.That(b1.Owner == UUID.Zero, "void constructor should create an inventory item with Owner = UUID.Zero"); + + UUID ItemID = UUID.Random(); + UUID OwnerID = UUID.Random(); + + InventoryItemBase b2 = new InventoryItemBase(ItemID); + Assert.That(b2.ID == ItemID, "ID constructor should create an inventory item with ID = ItemID"); + Assert.That(b2.Owner == UUID.Zero, "ID constructor should create an inventory item with Owner = UUID.Zero"); + + InventoryItemBase b3 = new InventoryItemBase(ItemID,OwnerID); + Assert.That(b3.ID == ItemID, "ID,OwnerID constructor should create an inventory item with ID = ItemID"); + Assert.That(b3.Owner == OwnerID, "ID,OwnerID constructor should create an inventory item with Owner = OwnerID"); + + } + + [Test] + public void AssetMetaDataNonNullContentTypeTest01() + { + AssetMetadata assetMetadata = new AssetMetadata(); + assetMetadata.ContentType = "image/jp2"; + Assert.That(assetMetadata.Type == (sbyte)AssetType.Texture, "Content type should be AssetType.Texture"); + Assert.That(assetMetadata.ContentType == "image/jp2", "Text of content type should be image/jp2"); + UUID rndID = UUID.Random(); + assetMetadata.ID = rndID.ToString(); + Assert.That(assetMetadata.ID.ToLower() == rndID.ToString().ToLower(), "assetMetadata.ID Setter/Getter not Consistent"); + DateTime fixedTime = DateTime.Now; + assetMetadata.CreationDate = fixedTime; + } + + [Test] + public void RegionLightShareDataCloneSaveTest01() + { + RegionLightShareData rlsd = new RegionLightShareData(); + rlsd.OnSave += RegionLightShareDataSaveFired; + rlsd.Save(); + rlsd.OnSave -= RegionLightShareDataSaveFired; + Assert.IsTrue(m_RegionLightShareDataOnSaveEventFired, "OnSave Event Never Fired"); + + object o = rlsd.Clone(); + RegionLightShareData dupe = (RegionLightShareData) o; + Assert.IsTrue(rlsd.sceneGamma == dupe.sceneGamma, "Memberwise Clone of RegionLightShareData failed"); + } + public void RegionLightShareDataSaveFired(RegionLightShareData settings) + { + m_RegionLightShareDataOnSaveEventFired = true; + } + + [Test] + public void EstateSettingsMundateTests() + { + EstateSettings es = new EstateSettings(); + es.AddBan(null); + UUID bannedUserId = UUID.Random(); + es.AddBan(new EstateBan() + { BannedHostAddress = string.Empty, + BannedHostIPMask = string.Empty, + BannedHostNameMask = string.Empty, + BannedUserID = bannedUserId} + ); + Assert.IsTrue(es.IsBanned(bannedUserId), "User Should be banned but is not."); + Assert.IsFalse(es.IsBanned(UUID.Zero), "User Should not be banned but is."); + + es.RemoveBan(bannedUserId); + + Assert.IsFalse(es.IsBanned(bannedUserId), "User Should not be banned but is."); + + es.AddEstateManager(UUID.Zero); + + es.AddEstateManager(bannedUserId); + Assert.IsTrue(es.IsEstateManager(bannedUserId), "bannedUserId should be EstateManager but isn't."); + + es.RemoveEstateManager(bannedUserId); + Assert.IsFalse(es.IsEstateManager(bannedUserId), "bannedUserID is estateManager but shouldn't be"); + + Assert.IsFalse(es.HasAccess(bannedUserId), "bannedUserID has access but shouldn't"); + + es.AddEstateUser(bannedUserId); + + Assert.IsTrue(es.HasAccess(bannedUserId), "bannedUserID doesn't have access but should"); + es.RemoveEstateUser(bannedUserId); + + es.AddEstateManager(bannedUserId); + + Assert.IsTrue(es.HasAccess(bannedUserId), "bannedUserID doesn't have access but should"); + + Assert.That(es.EstateGroups.Length == 0, "No Estate Groups Added.. so the array should be 0 length"); + + es.AddEstateGroup(bannedUserId); + + Assert.That(es.EstateGroups.Length == 1, "1 Estate Groups Added.. so the array should be 1 length"); + + Assert.That(es.EstateGroups[0] == bannedUserId,"User ID should be in EstateGroups"); + + } + + [Test] + public void InventoryFolderBaseConstructorTest01() + { + UUID uuid1 = UUID.Random(); + UUID uuid2 = UUID.Random(); + + InventoryFolderBase fld = new InventoryFolderBase(uuid1); + Assert.That(fld.ID == uuid1, "ID constructor failed to save value in ID field."); + + fld = new InventoryFolderBase(uuid1, uuid2); + Assert.That(fld.ID == uuid1, "ID,Owner constructor failed to save value in ID field."); + Assert.That(fld.Owner == uuid2, "ID,Owner constructor failed to save value in ID field."); + } + + [Test] + public void AsssetBaseConstructorTest01() + { + AssetBase abase = new AssetBase(); + Assert.IsNotNull(abase.Metadata, "void constructor of AssetBase should have created a MetaData element but didn't."); + UUID itemID = UUID.Random(); + UUID creatorID = UUID.Random(); + abase = new AssetBase(itemID.ToString(), "test item", (sbyte) AssetType.Texture, creatorID.ToString()); + + Assert.IsNotNull(abase.Metadata, "string,string,sbyte,string constructor of AssetBase should have created a MetaData element but didn't."); + Assert.That(abase.ID == itemID.ToString(), "string,string,sbyte,string constructor failed to set ID property"); + Assert.That(abase.Metadata.CreatorID == creatorID.ToString(), "string,string,sbyte,string constructor failed to set Creator ID"); + + + abase = new AssetBase(itemID.ToString(), "test item", -1, creatorID.ToString()); + Assert.IsNotNull(abase.Metadata, "string,string,sbyte,string constructor of AssetBase with unknown type should have created a MetaData element but didn't."); + Assert.That(abase.Metadata.Type == -1, "Unknown Type passed to string,string,sbyte,string constructor and was a known type when it came out again"); + + AssetMetadata metts = new AssetMetadata(); + metts.FullID = itemID; + metts.ID = string.Empty; + metts.Name = "test item"; + abase.Metadata = metts; + + Assert.That(abase.ToString() == itemID.ToString(), "ToString is overriden to be fullID.ToString()"); + Assert.That(abase.ID == itemID.ToString(),"ID should be MetaData.FullID.ToString() when string.empty or null is provided to the ID property"); + } + + [Test] + public void CultureSetCultureTest01() + { + CultureInfo ci = new CultureInfo("en-US", false); + Culture.SetCurrentCulture(); + Assert.That(Thread.CurrentThread.CurrentCulture.Name == ci.Name, "SetCurrentCulture failed to set thread culture to en-US"); + + } + + + + } +} + diff --git a/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs b/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs new file mode 100644 index 0000000000..d741f9116d --- /dev/null +++ b/OpenSim/Framework/Tests/PrimeNumberHelperTests.cs @@ -0,0 +1,146 @@ +/* + * 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.Reflection; +using NUnit.Framework; +using NUnit.Framework.SyntaxHelpers; +using OpenMetaverse; +using OpenMetaverse.StructuredData; +using OpenSim.Framework; + +namespace OpenSim.Framework.Tests +{ + [TestFixture] + public class PrimeNumberHelperTests + { + + + [Test] + public void TestGetPrime() + { + int prime1 = PrimeNumberHelper.GetPrime(7919); + Assert.That(prime1 == 8419, "Prime Number Get Prime Failed, 7919 is prime"); + Assert.That(PrimeNumberHelper.IsPrime(prime1),"Prime1 should be prime"); + Assert.That(PrimeNumberHelper.IsPrime(7919), "7919 is prime but is falsely failing the prime test"); + prime1 = PrimeNumberHelper.GetPrime(Int32.MaxValue - 1); + Assert.That(prime1 == -1, "prime1 should have been -1 since there are no primes between Int32.MaxValue-1 and Int32.MaxValue"); + + } + + [Test] + public void Test1000SmallPrimeNumbers() + { + int[] primes = { + 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, + 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191 + , 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, + 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, + 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, + 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, + 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, + 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, + 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, + 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, + 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, + 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, + 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, + 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, + 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, + 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, + 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, + 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, + 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, + 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, + 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, + 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, + 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, + 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, + 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, + 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, + 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, + 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, + 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, + 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, + 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, + 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, + 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, + 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, + 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, + 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, + 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, + 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, + 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, + 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, + 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, + 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, + 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, + 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, + 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, + 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, + 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, + 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, + 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, + 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, + 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, + 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, + 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, + 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, + 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, + 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, + 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, + 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, + 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, + 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, + 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, + 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, + 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, + 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, + 7877, 7879, 7883, 7901, 7907, 7919 + }; + for (int i = 0; i < primes.Length; i++) + { + Assert.That(PrimeNumberHelper.IsPrime(primes[i]),primes[i] + " is prime but is erroniously failing the prime test"); + } + + int[] nonprimes = { + 4, 6, 8, 10, 14, 16, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, + 96, 366, 372, 378, 382, 388, 396, 400, 408, 418, 420, 430, 432, 438, 442, 448, 456, 460, 462, + 466, 478, 486, 490, 498, 502, 508, 856, 858, 862, 876, 880, 882, 886, 906, 910, 918, 928, 936, + 940, 946, 952, 966, 970, 976, 982, 990, 996, 1008, 1740, 1746, 1752, 1758, 4650, 4656, 4662, + 4672, 4678, 4690, 7740, 7752, 7756, 7758, 7788, 7792, 7816, 7822, 7828, 7840, 7852, 7866, 7872, + 7876, 7878, 7882, 7900, 7906, 7918 + }; + for (int i = 0; i < nonprimes.Length; i++) + { + Assert.That(!PrimeNumberHelper.IsPrime(nonprimes[i]), nonprimes[i] + " is not prime but is erroniously passing the prime test"); + } + + Assert.That(PrimeNumberHelper.IsPrime(3)); + } + } +} \ No newline at end of file diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs index 45d822cec2..89f5c0cba9 100644 --- a/OpenSim/Framework/Tests/UtilTest.cs +++ b/OpenSim/Framework/Tests/UtilTest.cs @@ -170,5 +170,119 @@ namespace OpenSim.Framework.Tests // Varying secrets should not eqal the same Assert.AreNotEqual(Util.GetHashGuid(string1, "secret1"), Util.GetHashGuid(string1, "secret2")); } + + [Test] + public void SLUtilTypeConvertTests() + { + int[] assettypes = new int[]{-1,0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 + ,23,24,25,46,47,48}; + string[] contenttypes = new string[] + { + "application/octet-stream", + "image/x-j2c", + "audio/ogg", + "application/vnd.ll.callingcard", + "application/vnd.ll.landmark", + "application/vnd.ll.clothing", + "application/vnd.ll.primitive", + "application/vnd.ll.notecard", + "application/vnd.ll.folder", + "application/vnd.ll.rootfolder", + "application/vnd.ll.lsltext", + "application/vnd.ll.lslbyte", + "image/tga", + "application/vnd.ll.bodypart", + "application/vnd.ll.trashfolder", + "application/vnd.ll.snapshotfolder", + "application/vnd.ll.lostandfoundfolder", + "audio/x-wav", + "image/tga", + "image/jpeg", + "application/vnd.ll.animation", + "application/vnd.ll.gesture", + "application/x-metaverse-simstate", + "application/vnd.ll.favoritefolder", + "application/vnd.ll.link", + "application/vnd.ll.linkfolder", + "application/vnd.ll.currentoutfitfolder", + "application/vnd.ll.outfitfolder", + "application/vnd.ll.myoutfitsfolder" + }; + for (int i=0;i - /// UserConfig -- For User Server Configuration - /// - public class UserConfig:ConfigBase - { - public string DatabaseProvider = String.Empty; - public string DatabaseConnect = String.Empty; - public string DefaultStartupMsg = String.Empty; - public uint DefaultX = 1000; - public uint DefaultY = 1000; - public string GridRecvKey = String.Empty; - public string GridSendKey = String.Empty; - public uint HttpPort = ConfigSettings.DefaultUserServerHttpPort; - public bool HttpSSL = ConfigSettings.DefaultUserServerHttpSSL; - public uint DefaultUserLevel = 0; - public string LibraryXmlfile = ""; - public string ConsoleUser = String.Empty; - public string ConsolePass = String.Empty; - - private Uri m_inventoryUrl; - - public Uri InventoryUrl - { - get - { - return m_inventoryUrl; - } - set - { - m_inventoryUrl = value; - } - } - - private Uri m_authUrl; - public Uri AuthUrl - { - get - { - return m_authUrl; - } - set - { - m_authUrl = value; - } - } - - private Uri m_gridServerURL; - - public Uri GridServerURL - { - get - { - return m_gridServerURL; - } - set - { - m_gridServerURL = value; - } - } - - public bool EnableLLSDLogin = true; - - public bool EnableHGLogin = true; - - public UserConfig() - { - // weird, but UserManagerBase needs this. - } - public UserConfig(string description, string filename) - { - m_configMember = - new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true); - m_configMember.performConfigurationRetrieve(); - } - - public void loadConfigurationOptions() - { - m_configMember.addConfigurationOption("default_startup_message", - ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, - "Default Startup Message", "Welcome to OGS", false); - - m_configMember.addConfigurationOption("default_grid_server", - ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, - "Default Grid Server URI", - "http://127.0.0.1:" + ConfigSettings.DefaultGridServerHttpPort + "/", 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("default_inventory_server", - ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, - "Default Inventory Server URI", - "http://127.0.0.1:" + ConfigSettings.DefaultInventoryServerHttpPort + "/", - false); - m_configMember.addConfigurationOption("default_authentication_server", - ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, - "User Server (this) External URI for authentication keys", - "http://localhost:" + ConfigSettings.DefaultUserServerHttpPort + "/", - false); - m_configMember.addConfigurationOption("library_location", - ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, - "Path to library control file", - string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar), 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, - "Connection String for Database", "", false); - - m_configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, - "Http Listener port", ConfigSettings.DefaultUserServerHttpPort.ToString(), false); - m_configMember.addConfigurationOption("http_ssl", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, - "Use SSL? true/false", ConfigSettings.DefaultUserServerHttpSSL.ToString(), false); - m_configMember.addConfigurationOption("default_X", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, - "Known good region X", "1000", false); - m_configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, - "Known good region Y", "1000", false); - m_configMember.addConfigurationOption("enable_llsd_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, - "Enable LLSD login support [Currently used by libsl based clients/bots]? true/false", true.ToString(), false); - - m_configMember.addConfigurationOption("enable_hg_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, - "Enable Hypergrid login support [Currently used by GridSurfer-proxied clients]? true/false", true.ToString(), false); - - m_configMember.addConfigurationOption("default_loginLevel", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, - "Minimum Level a user should have to login [0 default]", "0", 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_startup_message": - DefaultStartupMsg = (string) configuration_result; - break; - case "default_grid_server": - GridServerURL = new Uri((string) configuration_result); - break; - case "grid_send_key": - GridSendKey = (string) configuration_result; - break; - case "grid_recv_key": - GridRecvKey = (string) configuration_result; - break; - case "default_inventory_server": - InventoryUrl = new Uri((string) configuration_result); - break; - case "default_authentication_server": - AuthUrl = new Uri((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 "default_X": - DefaultX = (uint) configuration_result; - break; - case "default_Y": - DefaultY = (uint) configuration_result; - break; - case "enable_llsd_login": - EnableLLSDLogin = (bool)configuration_result; - break; - case "enable_hg_login": - EnableHGLogin = (bool)configuration_result; - break; - case "default_loginLevel": - DefaultUserLevel = (uint)configuration_result; - break; - case "library_location": - LibraryXmlfile = (string)configuration_result; - break; - case "console_user": - ConsoleUser = (string)configuration_result; - break; - case "console_pass": - ConsolePass = (string)configuration_result; - break; - } - - return true; - } - } -} diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 802cb37aa0..d1d8736062 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -46,7 +46,7 @@ using System.Threading; using log4net; using Nini.Config; using Nwc.XmlRpc; -using BclExtras; +// using BclExtras; using OpenMetaverse; using OpenMetaverse.StructuredData; using Amib.Threading; @@ -91,6 +91,17 @@ namespace OpenSim.Framework public static FireAndForgetMethod FireAndForgetMethod = FireAndForgetMethod.SmartThreadPool; + /// + /// Gets the name of the directory where the current running executable + /// is located + /// + /// Filesystem path to the directory containing the current + /// executable + public static string ExecutingDirectory() + { + return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + } + /// /// Linear interpolates B<->C using percent A /// @@ -440,6 +451,14 @@ namespace OpenSim.Framework return (x + y - (min >> 1) - (min >> 2) + (min >> 4)); } + /// + /// Are the co-ordinates of the new region visible from the old region? + /// + /// Old region x-coord + /// New region x-coord + /// Old region y-coord + /// New region y-coord + /// public static bool IsOutsideView(uint oldx, uint newx, uint oldy, uint newy) { // Eventually this will be a function of the draw distance / camera position too. @@ -1171,6 +1190,16 @@ namespace OpenSim.Framework } + public static uint ConvertAccessLevelToMaturity(byte maturity) + { + if (maturity <= 13) + return 0; + else if (maturity <= 21) + return 1; + else + return 2; + } + /// /// Produces an OSDMap from its string representation on a stream /// @@ -1346,8 +1375,29 @@ namespace OpenSim.Framework /// /// Created to work around a limitation in Mono with nested delegates /// - private class FireAndForgetWrapper + private sealed class FireAndForgetWrapper { + private static volatile FireAndForgetWrapper instance; + private static object syncRoot = new Object(); + + public static FireAndForgetWrapper Instance { + get { + + if (instance == null) + { + lock (syncRoot) + { + if (instance == null) + { + instance = new FireAndForgetWrapper(); + } + } + } + + return instance; + } + } + public void FireAndForget(System.Threading.WaitCallback callback) { callback.BeginInvoke(null, EndFireAndForget, callback); @@ -1416,7 +1466,7 @@ namespace OpenSim.Framework ThreadPool.QueueUserWorkItem(callback, obj); break; case FireAndForgetMethod.BeginInvoke: - FireAndForgetWrapper wrapper = Singleton.GetInstance(); + FireAndForgetWrapper wrapper = FireAndForgetWrapper.Instance; wrapper.FireAndForget(callback, obj); break; case FireAndForgetMethod.SmartThreadPool: @@ -1485,5 +1535,130 @@ namespace OpenSim.Framework } } + /// + /// Gets the client IP address + /// + /// + /// + public static IPEndPoint GetClientIPFromXFF(string xff) + { + if (xff == string.Empty) + return null; + + string[] parts = xff.Split(new char[] { ',' }); + if (parts.Length > 0) + { + try + { + return new IPEndPoint(IPAddress.Parse(parts[0]), 0); + } + catch (Exception e) + { + m_log.WarnFormat("[UTIL]: Exception parsing XFF header {0}: {1}", xff, e.Message); + } + } + + return null; + } + + public static string GetCallerIP(Hashtable req) + { + if (req.ContainsKey("headers")) + { + try + { + Hashtable headers = (Hashtable)req["headers"]; + if (headers.ContainsKey("remote_addr") && headers["remote_addr"] != null) + return headers["remote_addr"].ToString(); + } + catch (Exception e) + { + m_log.WarnFormat("[UTIL]: exception in GetCallerIP: {0}", e.Message); + } + } + return string.Empty; + } + + #region Xml Serialization Utilities + public static bool ReadBoolean(XmlTextReader reader) + { + reader.ReadStartElement(); + bool result = Boolean.Parse(reader.ReadContentAsString().ToLower()); + reader.ReadEndElement(); + + return result; + } + + public static UUID ReadUUID(XmlTextReader reader, string name) + { + UUID id; + string idStr; + + reader.ReadStartElement(name); + + if (reader.Name == "Guid") + idStr = reader.ReadElementString("Guid"); + else if (reader.Name == "UUID") + idStr = reader.ReadElementString("UUID"); + else // no leading tag + idStr = reader.ReadContentAsString(); + UUID.TryParse(idStr, out id); + reader.ReadEndElement(); + + return id; + } + + public static Vector3 ReadVector(XmlTextReader reader, string name) + { + Vector3 vec; + + reader.ReadStartElement(name); + vec.X = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // X or x + vec.Y = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Y or y + vec.Z = reader.ReadElementContentAsFloat(reader.Name, String.Empty); // Z or z + reader.ReadEndElement(); + + return vec; + } + + public static Quaternion ReadQuaternion(XmlTextReader reader, string name) + { + Quaternion quat = new Quaternion(); + + reader.ReadStartElement(name); + while (reader.NodeType != XmlNodeType.EndElement) + { + switch (reader.Name.ToLower()) + { + case "x": + quat.X = reader.ReadElementContentAsFloat(reader.Name, String.Empty); + break; + case "y": + quat.Y = reader.ReadElementContentAsFloat(reader.Name, String.Empty); + break; + case "z": + quat.Z = reader.ReadElementContentAsFloat(reader.Name, String.Empty); + break; + case "w": + quat.W = reader.ReadElementContentAsFloat(reader.Name, String.Empty); + break; + } + } + + reader.ReadEndElement(); + + return quat; + } + + public static T ReadEnum(XmlTextReader reader, string name) + { + string value = reader.ReadElementContentAsString(name, String.Empty); + // !!!!! to deal with flags without commas + if (value.Contains(" ") && !value.Contains(",")) + value = value.Replace(" ", ", "); + + return (T)Enum.Parse(typeof(T), value); ; + } + #endregion } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs index 5d46905a73..0f34e8338d 100644 --- a/OpenSim/Framework/Watchdog.cs +++ b/OpenSim/Framework/Watchdog.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Threading; using log4net; @@ -43,7 +44,7 @@ namespace OpenSim.Framework const int WATCHDOG_TIMEOUT_MS = 5000; [System.Diagnostics.DebuggerDisplay("{Thread.Name}")] - private class ThreadWatchdogInfo + public class ThreadWatchdogInfo { public Thread Thread; public int LastTick; @@ -149,6 +150,15 @@ namespace OpenSim.Framework } catch { } } + + /// + /// Get currently watched threads for diagnostic purposes + /// + /// + public static ThreadWatchdogInfo[] GetThreads() + { + return m_threads.Values.ToArray(); + } private static void WatchdogTimerElapsed(object sender, System.Timers.ElapsedEventArgs e) { diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index e20866eaa3..d731ac5882 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -26,6 +26,7 @@ */ using System; +using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.IO; @@ -49,6 +50,16 @@ namespace OpenSim.Framework LogManager.GetLogger( MethodBase.GetCurrentMethod().DeclaringType); + private static int m_requestNumber = 0; + + // this is the header field used to communicate the local request id + // used for performance and debugging + public const string OSHeaderRequestID = "opensim-request-id"; + + // number of milliseconds a call can take before it is considered + // a "long" call for warning & debugging purposes + public const int LongCallTime = 500; + /// /// Send LLSD to an HTTP client in application/llsd+json form /// @@ -121,26 +132,187 @@ namespace OpenSim.Framework return new OSDMap { { "Message", OSD.FromString("Service request failed. " + errorMessage) } }; } + /// + /// PUT JSON-encoded data to a web service that returns LLSD or + /// JSON data + /// + public static OSDMap PutToService(string url, OSDMap data) + { + return ServiceOSDRequest(url,data,"PUT",10000); + } + + public static OSDMap PostToService(string url, OSDMap data) + { + return ServiceOSDRequest(url,data,"POST",10000); + } + + public static OSDMap GetFromService(string url) + { + return ServiceOSDRequest(url,null,"GET",10000); + } + + public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout) + { + int reqnum = m_requestNumber++; + // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method); + + string errorMessage = "unknown error"; + int tickstart = Util.EnvironmentTickCount(); + int tickdata = 0; + + try + { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + request.Method = method; + request.Timeout = timeout; + request.KeepAlive = false; + request.MaximumAutomaticRedirections = 10; + request.ReadWriteTimeout = timeout / 4; + request.Headers[OSHeaderRequestID] = reqnum.ToString(); + + // If there is some input, write it into the request + if (data != null) + { + string strBuffer = OSDParser.SerializeJsonString(data); + byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer); + + request.ContentType = "application/json"; + request.ContentLength = buffer.Length; //Count bytes to send + using (Stream requestStream = request.GetRequestStream()) + requestStream.Write(buffer, 0, buffer.Length); //Send it + } + + // capture how much time was spent writing, this may seem silly + // but with the number concurrent requests, this often blocks + tickdata = Util.EnvironmentTickCountSubtract(tickstart); + + using (WebResponse response = request.GetResponse()) + { + using (Stream responseStream = response.GetResponseStream()) + { + string responseStr = null; + responseStr = responseStream.GetStreamString(); + // m_log.DebugFormat("[WEB UTIL]: <{0}> response is <{1}>",reqnum,responseStr); + return CanonicalizeResults(responseStr); + } + } + } + catch (WebException we) + { + errorMessage = we.Message; + if (we.Status == WebExceptionStatus.ProtocolError) + { + HttpWebResponse webResponse = (HttpWebResponse)we.Response; + errorMessage = String.Format("[{0}] {1}",webResponse.StatusCode,webResponse.StatusDescription); + } + } + catch (Exception ex) + { + errorMessage = ex.Message; + } + finally + { + // This just dumps a warning for any operation that takes more than 100 ms + int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); + if (tickdiff > LongCallTime) + m_log.InfoFormat("[WEB UTIL]: osd request <{0}> (URI:{1}, METHOD:{2}) took {3}ms overall, {4}ms writing", + reqnum,url,method,tickdiff,tickdata); + } + + m_log.WarnFormat("[WEB UTIL] <{0}> osd request failed: {1}",reqnum,errorMessage); + return ErrorResponseMap(errorMessage); + } + + /// + /// Since there are no consistencies in the way web requests are + /// formed, we need to do a little guessing about the result format. + /// Keys: + /// Success|success == the success fail of the request + /// _RawResult == the raw string that came back + /// _Result == the OSD unpacked string + /// + private static OSDMap CanonicalizeResults(string response) + { + OSDMap result = new OSDMap(); + + // Default values + result["Success"] = OSD.FromBoolean(true); + result["success"] = OSD.FromBoolean(true); + result["_RawResult"] = OSD.FromString(response); + result["_Result"] = new OSDMap(); + + if (response.Equals("true",System.StringComparison.OrdinalIgnoreCase)) + return result; + + if (response.Equals("false",System.StringComparison.OrdinalIgnoreCase)) + { + result["Success"] = OSD.FromBoolean(false); + result["success"] = OSD.FromBoolean(false); + return result; + } + + try + { + OSD responseOSD = OSDParser.Deserialize(response); + if (responseOSD.Type == OSDType.Map) + { + result["_Result"] = (OSDMap)responseOSD; + return result; + } + } + catch (Exception e) + { + // don't need to treat this as an error... we're just guessing anyway + m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message); + } + + return result; + } + /// /// POST URL-encoded form data to a web service that returns LLSD or /// JSON data /// public static OSDMap PostToService(string url, NameValueCollection data) { - string errorMessage; + return ServiceFormRequest(url,data,10000); + } + + public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) + { + int reqnum = m_requestNumber++; + string method = (data != null && data["RequestMethod"] != null) ? data["RequestMethod"] : "unknown"; + // m_log.DebugFormat("[WEB UTIL]: <{0}> start form request for {1}, method {2}",reqnum,url,method); + + string errorMessage = "unknown error"; + int tickstart = Util.EnvironmentTickCount(); + int tickdata = 0; try { - string queryString = BuildQueryString(data); - byte[] requestData = System.Text.Encoding.UTF8.GetBytes(queryString); - + HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Method = "POST"; - request.ContentLength = requestData.Length; - request.ContentType = "application/x-www-form-urlencoded"; + request.Timeout = timeout; + request.KeepAlive = false; + request.MaximumAutomaticRedirections = 10; + request.ReadWriteTimeout = timeout / 4; + request.Headers[OSHeaderRequestID] = reqnum.ToString(); + + if (data != null) + { + string queryString = BuildQueryString(data); + byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString); + + request.ContentLength = buffer.Length; + request.ContentType = "application/x-www-form-urlencoded"; + using (Stream requestStream = request.GetRequestStream()) + requestStream.Write(buffer, 0, buffer.Length); + } - using (Stream requestStream = request.GetRequestStream()) - requestStream.Write(requestData, 0, requestData.Length); + // capture how much time was spent writing, this may seem silly + // but with the number concurrent requests, this often blocks + tickdata = Util.EnvironmentTickCountSubtract(tickstart); using (WebResponse response = request.GetResponse()) { @@ -148,34 +320,50 @@ namespace OpenSim.Framework { string responseStr = null; - try - { - responseStr = responseStream.GetStreamString(); - OSD responseOSD = OSDParser.Deserialize(responseStr); - if (responseOSD.Type == OSDType.Map) - return (OSDMap)responseOSD; - else - errorMessage = "Response format was invalid."; - } - catch (Exception ex) - { - if (!String.IsNullOrEmpty(responseStr)) - errorMessage = "Failed to parse the response:\n" + responseStr; - else - errorMessage = "Failed to retrieve the response: " + ex.Message; - } + responseStr = responseStream.GetStreamString(); + OSD responseOSD = OSDParser.Deserialize(responseStr); + if (responseOSD.Type == OSDType.Map) + return (OSDMap)responseOSD; } } } + catch (WebException we) + { + errorMessage = we.Message; + if (we.Status == WebExceptionStatus.ProtocolError) + { + HttpWebResponse webResponse = (HttpWebResponse)we.Response; + errorMessage = String.Format("[{0}] {1}",webResponse.StatusCode,webResponse.StatusDescription); + } + } catch (Exception ex) { - m_log.Warn("POST to URL " + url + " failed: " + ex.Message); errorMessage = ex.Message; } + finally + { + int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); + if (tickdiff > LongCallTime) + m_log.InfoFormat("[WEB UTIL]: form request <{0}> (URI:{1}, METHOD:{2}) took {3}ms overall, {4}ms writing", + reqnum,url,method,tickdiff,tickdata); + } - return new OSDMap { { "Message", OSD.FromString("Service request failed. " + errorMessage) } }; + m_log.WarnFormat("[WEB UTIL]: <{0}> form request failed: {1}",reqnum,errorMessage); + return ErrorResponseMap(errorMessage); } + /// + /// Create a response map for an error, trying to keep + /// the result formats consistent + /// + private static OSDMap ErrorResponseMap(string msg) + { + OSDMap result = new OSDMap(); + result["Success"] = "False"; + result["Message"] = OSD.FromString("Service request failed: " + msg); + return result; + } + #region Uri /// @@ -362,5 +550,85 @@ namespace OpenSim.Framework } #endregion Stream + + public class QBasedComparer : IComparer + { + public int Compare(Object x, Object y) + { + float qx = GetQ(x); + float qy = GetQ(y); + if (qx < qy) + return -1; + if (qx == qy) + return 0; + return 1; + } + + private float GetQ(Object o) + { + // Example: image/png;q=0.9 + + if (o is String) + { + string mime = (string)o; + string[] parts = mime.Split(new char[] { ';' }); + if (parts.Length > 1) + { + string[] kvp = parts[1].Split(new char[] { '=' }); + if (kvp.Length == 2 && kvp[0] == "q") + { + float qvalue = 1F; + float.TryParse(kvp[1], out qvalue); + return qvalue; + } + } + } + + return 1F; + } + } + + /// + /// Takes the value of an Accept header and returns the preferred types + /// ordered by q value (if it exists). + /// Example input: image/jpg;q=0.7, image/png;q=0.8, image/jp2 + /// Exmaple output: ["jp2", "png", "jpg"] + /// NOTE: This doesn't handle the semantics of *'s... + /// + /// + /// + public static string[] GetPreferredImageTypes(string accept) + { + + if (accept == null || accept == string.Empty) + return new string[0]; + + string[] types = accept.Split(new char[] { ',' }); + if (types.Length > 0) + { + List list = new List(types); + list.RemoveAll(delegate(string s) { return !s.ToLower().StartsWith("image"); }); + ArrayList tlist = new ArrayList(list); + tlist.Sort(new QBasedComparer()); + + string[] result = new string[tlist.Count]; + for (int i = 0; i < tlist.Count; i++) + { + string mime = (string)tlist[i]; + string[] parts = mime.Split(new char[] { ';' }); + string[] pair = parts[0].Split(new char[] { '/' }); + if (pair.Length == 2) + result[i] = pair[1].ToLower(); + else // oops, we don't know what this is... + result[i] = pair[0]; + } + + return result; + } + + return new string[0]; + } + + } } diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index b860cf6bc0..d120f03dc9 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -225,7 +225,7 @@ namespace OpenSim } } MainConsole.Instance = null; - } + } */ configSource.Alias.AddAlias("On", true); configSource.Alias.AddAlias("Off", false); diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index cac5fa99c8..40ab76571e 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs @@ -83,7 +83,10 @@ namespace OpenSim List sources = new List(); string masterFileName = - startupConfig.GetString("inimaster", String.Empty); + startupConfig.GetString("inimaster", "OpenSimDefaults.ini"); + + if (masterFileName == "none") + masterFileName = String.Empty; if (IsUri(masterFileName)) { @@ -95,10 +98,19 @@ namespace OpenSim string masterFilePath = Path.GetFullPath( Path.Combine(Util.configDir(), masterFileName)); - if (masterFileName != String.Empty && - File.Exists(masterFilePath) && - (!sources.Contains(masterFilePath))) - sources.Add(masterFilePath); + if (masterFileName != String.Empty) + { + if (File.Exists(masterFilePath)) + { + if (!sources.Contains(masterFilePath)) + sources.Add(masterFilePath); + } + else + { + m_log.ErrorFormat("Master ini file {0} not found", masterFilePath); + Environment.Exit(1); + } + } } @@ -160,15 +172,17 @@ namespace OpenSim if (sources.Count == 0) { m_log.FatalFormat("[CONFIG]: Could not load any configuration"); - m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?"); + m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?"); Environment.Exit(1); } for (int i = 0 ; i < sources.Count ; i++) { if (ReadConfig(sources[i])) + { iniFileExists = true; - AddIncludes(sources); + AddIncludes(sources); + } } if (!iniFileExists) @@ -211,12 +225,31 @@ namespace OpenSim else { string basepath = Path.GetFullPath(Util.configDir()); - string path = Path.Combine(basepath, file); - string[] paths = Util.Glob(path); - foreach (string p in paths) + // Resolve relative paths with wildcards + string chunkWithoutWildcards = file; + string chunkWithWildcards = string.Empty; + int wildcardIndex = file.IndexOfAny(new char[] { '*', '?' }); + if (wildcardIndex != -1) { - if (!sources.Contains(p)) - sources.Add(p); + chunkWithoutWildcards = file.Substring(0, wildcardIndex); + chunkWithWildcards = file.Substring(wildcardIndex); + } + string path = Path.Combine(basepath, chunkWithoutWildcards); + path = Path.GetFullPath(path) + chunkWithWildcards; + string[] paths = Util.Glob(path); + + // If the include path contains no wildcards, then warn the user that it wasn't found. + if (wildcardIndex == -1 && paths.Length == 0) + { + m_log.WarnFormat("[CONFIG]: Could not find include file {0}", path); + } + else + { + foreach (string p in paths) + { + if (!sources.Contains(p)) + sources.Add(p); + } } } } @@ -307,21 +340,6 @@ namespace OpenSim config.Set("EventQueue", true); } - { - IConfig config = defaultConfig.Configs["StandAlone"]; - - if (null == config) - config = defaultConfig.AddConfig("StandAlone"); - - config.Set("accounts_authenticate", true); - config.Set("welcome_message", "Welcome to OpenSimulator"); - config.Set("inventory_plugin", "OpenSim.Data.SQLite.dll"); - config.Set("inventory_source", ""); - config.Set("userDatabase_plugin", "OpenSim.Data.SQLite.dll"); - config.Set("user_source", ""); - config.Set("LibrariesXMLFile", string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar)); - } - { IConfig config = defaultConfig.Configs["Network"]; @@ -350,10 +368,6 @@ namespace OpenSim m_configSettings.StorageDll = startupConfig.GetString("storage_plugin"); - m_configSettings.StorageConnectionString - = startupConfig.GetString("storage_connection_string"); - m_configSettings.EstateConnectionString - = startupConfig.GetString("estate_connection_string", m_configSettings.StorageConnectionString); m_configSettings.ClientstackDll = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); } diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 501d47f6d1..ed4b6203c7 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -30,6 +30,7 @@ using System.Collections; using System.Collections.Generic; using System.IO; using System.Reflection; +using System.Text; using System.Timers; using log4net; using Nini.Config; @@ -152,7 +153,7 @@ namespace OpenSim RegisterConsoleCommands(); base.StartupSpecific(); - + MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler()); MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this)); if (userStatsURI != String.Empty) @@ -192,7 +193,7 @@ namespace OpenSim // Hook up to the watchdog timer Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; - PrintFileToConsole("startuplogo.txt"); + PrintFileToConsole("startuplogo.txt"); // For now, start at the 'root' level by default if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it @@ -218,7 +219,14 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "debug packet", "debug packet ", - "Turn on packet debugging", Debug); + "Turn on packet debugging", + "If level > 255 then all incoming and outgoing packets are logged.\n" + + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" + + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" + + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" + + "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n" + + "If level <= 0 then no packets are logged.", + Debug); m_console.Commands.AddCommand("region", false, "debug scene", "debug scene ", @@ -258,9 +266,12 @@ namespace OpenSim LoadOar); m_console.Commands.AddCommand("region", false, "save oar", - "save oar []", + //"save oar [-v|--version=] [-p|--profile=] []", + "save oar [-p|--profile=] []", "Save a region's data to an OAR archive.", - "The OAR path must be a filesystem path." +// "-v|--version= generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine + "-p|--profile= adds the url of the profile service to the saved user information" + Environment.NewLine + + "The OAR path must be a filesystem path." + " If this is not given then the oar is saved to region.oar in the current directory.", SaveOar); @@ -272,22 +283,17 @@ namespace OpenSim "kick user [message]", "Kick a user off the simulator", KickUserCommand); - m_console.Commands.AddCommand("region", false, "show assets", - "show assets", - "Show asset data", HandleShow); - m_console.Commands.AddCommand("region", false, "show users", "show users [full]", - "Show user data", HandleShow); + "Show user data for users currently on the region", + "Without the 'full' option, only users actually on the region are shown." + + " With the 'full' option child agents of users in neighbouring regions are also shown.", + HandleShow); m_console.Commands.AddCommand("region", false, "show connections", "show connections", "Show connection data", HandleShow); - m_console.Commands.AddCommand("region", false, "show users full", - "show users full", - String.Empty, HandleShow); - m_console.Commands.AddCommand("region", false, "show modules", "show modules", "Show module data", HandleShow); @@ -295,10 +301,7 @@ namespace OpenSim m_console.Commands.AddCommand("region", false, "show regions", "show regions", "Show region data", HandleShow); - - m_console.Commands.AddCommand("region", false, "show queues", - "show queues", - "Show queue data", HandleShow); + m_console.Commands.AddCommand("region", false, "show ratings", "show ratings", "Show rating data", HandleShow); @@ -308,24 +311,32 @@ namespace OpenSim "Persist objects to the database now", RunCommand); m_console.Commands.AddCommand("region", false, "create region", - "create region", - "Create a new region", HandleCreateRegion); + "create region [\"region name\"] ", + "Create a new region.", + "The settings for \"region name\" are read from . Paths specified with are relative to your Regions directory, unless an absolute path is given." + + " If \"region name\" does not exist in , it will be added." + Environment.NewLine + + "Without \"region name\", the first region found in will be created." + Environment.NewLine + + "If does not exist, it will be created.", + HandleCreateRegion); m_console.Commands.AddCommand("region", false, "restart", "restart", "Restart all sims in this instance", RunCommand); m_console.Commands.AddCommand("region", false, "config set", - "config set
", - "Set a config option", HandleConfig); + "config set
", + "Set a config option. In most cases this is not useful since changed parameters are not dynamically reloaded. Neither do changed parameters persist - you will have to change a config file manually and restart.", HandleConfig); m_console.Commands.AddCommand("region", false, "config get", - "config get
", - "Read a config option", HandleConfig); + "config get [
] []", + "Show a config option", + "If neither section nor field are specified, then the whole current configuration is printed." + Environment.NewLine + + "If a section is given but not a field, then all fields in that section are printed.", + HandleConfig); m_console.Commands.AddCommand("region", false, "config save", - "config save", - "Save current configuration", HandleConfig); + "config save ", + "Save current configuration to a file at the given path", HandleConfig); m_console.Commands.AddCommand("region", false, "command-script", "command-script