RegionApplicationBase.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. * Copyright (c) Contributors, http://www.openmetaverse.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSim Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. *
  27. */
  28. using System;
  29. using System.Collections.Generic;
  30. using System.Net;
  31. using OpenSim.Assets;
  32. using OpenSim.Framework;
  33. using OpenSim.Framework.Console;
  34. using OpenSim.Framework.Interfaces;
  35. using OpenSim.Framework.Servers;
  36. using OpenSim.Framework.Types;
  37. using OpenSim.Physics.Manager;
  38. using OpenSim.Region.Caches;
  39. using OpenSim.Region.Environment;
  40. namespace OpenSim.Region.ClientStack
  41. {
  42. public class RegionApplicationBase
  43. {
  44. protected IGenericConfig localConfig;
  45. protected PhysicsManager physManager;
  46. protected AssetCache AssetCache;
  47. protected InventoryCache InventoryCache;
  48. protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
  49. protected DateTime startuptime;
  50. protected NetworkServersInfo serversData;
  51. public string m_physicsEngine;
  52. public bool m_sandbox = false;
  53. public bool m_loginserver;
  54. public bool user_accounts = false;
  55. public bool gridLocalAsset = false;
  56. protected bool configFileSetup = false;
  57. public string m_config;
  58. protected List<UDPServer> m_udpServer = new List<UDPServer>();
  59. protected List<RegionInfo> regionData = new List<RegionInfo>();
  60. protected List<IWorld> m_localWorld = new List<IWorld>();
  61. protected BaseHttpServer httpServer;
  62. protected List<AuthenticateSessionsBase> AuthenticateSessionsHandler = new List<AuthenticateSessionsBase>();
  63. protected LogBase m_log;
  64. public RegionApplicationBase()
  65. {
  66. }
  67. public RegionApplicationBase(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool silent, string configFile)
  68. {
  69. this.configFileSetup = useConfigFile;
  70. m_sandbox = sandBoxMode;
  71. m_loginserver = startLoginServer;
  72. m_physicsEngine = physicsEngine;
  73. m_config = configFile;
  74. }
  75. /*protected World m_localWorld;
  76. public World LocalWorld
  77. {
  78. get { return m_localWorld; }
  79. }*/
  80. /// <summary>
  81. /// Performs initialisation of the world, such as loading configuration from disk.
  82. /// </summary>
  83. public virtual void StartUp()
  84. {
  85. }
  86. protected virtual void SetupLocalGridServers()
  87. {
  88. }
  89. protected virtual void SetupRemoteGridServers()
  90. {
  91. }
  92. protected virtual void SetupScene()
  93. {
  94. }
  95. protected virtual void SetupHttpListener()
  96. {
  97. }
  98. protected virtual void ConnectToRemoteGridServer()
  99. {
  100. }
  101. }
  102. }