Exemplo n.º 1
0
        public void IncomingCapsRequest(UUID agentID, WhiteCore.Framework.Services.GridRegion region, ISimulationBase simbase, ref OSDMap capURLs)
        {
            m_agentID      = agentID;
            m_region       = region;
            m_userScopeIDs = simbase.ApplicationRegistry.RequestModuleInterface <IUserAccountService>().GetUserAccount(null, m_agentID).AllScopeIDs;

            m_gridService = simbase.ApplicationRegistry.RequestModuleInterface <IGridService>();
            IConfig config =
                simbase.ConfigSource.Configs["MapCaps"];

            if (config != null)
            {
                m_allowCapsMessage = config.GetBoolean("AllowCapsMessage", m_allowCapsMessage);
            }

            HttpServerHandle method = delegate(string path, Stream request, OSHttpRequest httpRequest,
                                               OSHttpResponse httpResponse)
            {
                return(MapLayerRequest(HttpServerHandlerHelpers.ReadString(request), httpRequest, httpResponse));
            };

            m_uri = "/CAPS/MapLayer/" + UUID.Random() + "/";
            capURLs["MapLayer"]    = MainServer.Instance.ServerURI + m_uri;
            capURLs["MapLayerGod"] = MainServer.Instance.ServerURI + m_uri;

            MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", m_uri, method));
        }
Exemplo n.º 2
0
        public void IncomingCapsRequest(UUID agentID, WhiteCore.Framework.Services.GridRegion region, ISimulationBase simbase, ref OSDMap capURLs)
        {
            m_agentID = agentID;
            m_region = region;
            m_userScopeIDs = simbase.ApplicationRegistry.RequestModuleInterface<IUserAccountService>().GetUserAccount(null, m_agentID).AllScopeIDs;

            m_gridService = simbase.ApplicationRegistry.RequestModuleInterface<IGridService>();
            IConfig config =
                simbase.ConfigSource.Configs["MapCaps"];
            if (config != null)
                m_allowCapsMessage = config.GetBoolean("AllowCapsMessage", m_allowCapsMessage);

            HttpServerHandle method = delegate(string path, Stream request, OSHttpRequest httpRequest,
                                               OSHttpResponse httpResponse)
                                          {
                                              return MapLayerRequest(HttpServerHandlerHelpers.ReadString(request), httpRequest, httpResponse);
                                          };
            m_uri = "/CAPS/MapLayer/" + UUID.Random() + "/";
            capURLs["MapLayer"] = MainServer.Instance.ServerURI + m_uri;
            capURLs["MapLayerGod"] = MainServer.Instance.ServerURI + m_uri;

            MainServer.Instance.AddStreamHandler(new GenericStreamHandler("POST", m_uri, method));
        }