コード例 #1
0
        private void RegisterFetchDescendentsCap(UUID agentID, Caps caps, string capName, string url)
        {
            string capUrl;

            // disable the cap clause
            if (url == "")
            {
                return;
            }
            // handled by the simulator
            else if (url == "localhost")
            {
                capUrl = "/" + UUID.Random();

                // Register this as a poll service
                PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(this, capUrl, agentID);
                //args.Type = PollServiceEventArgs.EventType.Inventory;

                caps.RegisterPollHandler(capName, args);
            }
            // external handler
            else
            {
                capUrl = url;
                IExternalCapsModule handler = Scene.RequestModuleInterface <IExternalCapsModule>();
                if (handler != null)
                {
                    handler.RegisterExternalUserCapsHandler(agentID, caps, capName, capUrl);
                }
                else
                {
                    caps.RegisterHandler(capName, capUrl);
                }
            }
        }
コード例 #2
0
        private void RegisterFetchDescendentsCap(UUID agentID, Caps caps, string capName, string url)
        {
            string capUrl;

            // disable the cap clause
            if (url == "")
            {
                return;
            }
            // handled by the simulator
            else if (url == "localhost")
            {
                capUrl = "/CAPS/" + UUID.Random() + "/";

                // Register this as a poll service
                PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(this, capUrl, agentID);
                args.Type = PollServiceEventArgs.EventType.Inventory;

                caps.RegisterPollHandler(capName, args);
            }
            // external handler
            else
            {
                capUrl = url;
                IExternalCapsModule handler = Scene.RequestModuleInterface<IExternalCapsModule>();
                if (handler != null)
                    handler.RegisterExternalUserCapsHandler(agentID,caps,capName,capUrl);
                else
                    caps.RegisterHandler(capName, capUrl);
            }

            // m_log.DebugFormat(
            //     "[FETCH INVENTORY DESCENDENTS2 MODULE]: Registered capability {0} at {1} in region {2} for {3}",
            //     capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
        }
コード例 #3
0
        private void RegisterCaps(UUID agentID, Caps caps)
        {
            if (m_fetchInventoryDescendents2Url == "")
            {
                return;
            }

            // Register this as a poll service
            PollServiceInventoryEventArgs args
                = new PollServiceInventoryEventArgs(m_scene, "/CAPS/" + UUID.Random() + "/", agentID);

            args.Type = PollServiceEventArgs.EventType.Inventory;

            caps.RegisterPollHandler("FetchInventoryDescendents2", args);

//            MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
//
//            string hostName = m_scene.RegionInfo.ExternalHostName;
//            uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
//            string protocol = "http";
//
//            if (MainServer.Instance.UseSSL)
//            {
//                hostName = MainServer.Instance.SSLCommonName;
//                port = MainServer.Instance.SSLPort;
//                protocol = "https";
//            }
//
//            caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
        }
コード例 #4
0
        private void RegisterFetchDescendentsCap(UUID agentID, Caps caps, string capName, string url)
        {
            string capUrl;

            // disable the cap clause
            if (url == "")
            {
                return;
            }
            // handled by the simulator
            else if (url == "localhost")
            {
                capUrl = "/CAPS/" + UUID.Random() + "/";

                // Register this as a poll service
                PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(this, capUrl, agentID);
                args.Type = PollServiceEventArgs.EventType.Inventory;

                caps.RegisterPollHandler(capName, args);
            }
            // external handler
            else
            {
                capUrl = url;
                IExternalCapsModule handler = Scene.RequestModuleInterface<IExternalCapsModule>();
                if (handler != null)
                    handler.RegisterExternalUserCapsHandler(agentID,caps,capName,capUrl);
                else
                    caps.RegisterHandler(capName, capUrl);
            }

            // m_log.DebugFormat(
            //     "[FETCH INVENTORY DESCENDENTS2 MODULE]: Registered capability {0} at {1} in region {2} for {3}",
            //     capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
        }
コード例 #5
0
        private void RegisterCaps(UUID agentID, Caps caps)
        {
            if (m_fetchInventoryDescendents2Url == "")
                return;

            // Register this as a poll service          
            PollServiceInventoryEventArgs args 
                = new PollServiceInventoryEventArgs(m_scene, "/CAPS/" + UUID.Random() + "/", agentID);            
            args.Type = PollServiceEventArgs.EventType.Inventory;

            caps.RegisterPollHandler("FetchInventoryDescendents2", args);

//            MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
//
//            string hostName = m_scene.RegionInfo.ExternalHostName;
//            uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port;
//            string protocol = "http";
//            
//            if (MainServer.Instance.UseSSL)
//            {
//                hostName = MainServer.Instance.SSLCommonName;
//                port = MainServer.Instance.SSLPort;
//                protocol = "https";
//            }
//
//            caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl));
        }