コード例 #1
0
        // <summary>
        // OnRegisterCaps is invoked via the scene.EventManager
        // everytime OpenSim hands out capabilities to a client
        // (login, region crossing). We contribute two capabilities to
        // the set of capabilities handed back to the client:
        // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest.
        //
        // ProvisionVoiceAccountRequest allows the client to obtain
        // the voice account credentials for the avatar it is
        // controlling (e.g., user name, password, etc).
        //
        // ParcelVoiceInfoRequest is invoked whenever the client
        // changes from one region or parcel to another.
        //
        // Note that OnRegisterCaps is called here via a closure
        // delegate containing the scene of the respective region (see
        // Initialise()).
        // </summary>
        public OSDMap OnRegisterCaps(IScene scene, UUID agentID, IHttpServer server)
        {
            MainConsole.Instance.DebugFormat("[FreeSwitchVoice] OnRegisterCaps: agentID {0}", agentID);

            OSDMap retVal = new OSDMap();

            retVal["ProvisionVoiceAccountRequest"] = CapsUtil.CreateCAPS("ProvisionVoiceAccountRequest", "");

            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["ProvisionVoiceAccountRequest"],
                                                             delegate(string path, Stream req,
                                                                      OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(ProvisionVoiceAccountRequest(scene, HttpServerHandlerHelpers.ReadString(req),
                                                    agentID));
            }));
            retVal["ParcelVoiceInfoRequest"] = CapsUtil.CreateCAPS("ParcelVoiceInfoRequest", "");
            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["ParcelVoiceInfoRequest"],
                                                             delegate(string path, Stream req,
                                                                      OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(ParcelVoiceInfoRequest(scene, HttpServerHandlerHelpers.ReadString(req),
                                              agentID));
            }));
            return(retVal);
        }
コード例 #2
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            IConfig displayNamesConfig =
                service.ClientCaps.Registry.RequestModuleInterface <ISimulationBase>().ConfigSource.Configs[
                    "DisplayNamesModule"];

            if (displayNamesConfig != null)
            {
                if (!displayNamesConfig.GetBoolean("Enabled", true))
                {
                    return;
                }
                string bannedNamesString = displayNamesConfig.GetString("BannedUserNames", "");
                if (bannedNamesString != "")
                {
                    bannedNames = new List <string>(bannedNamesString.Split(','));
                }
            }
            m_service          = service;
            m_profileConnector = Framework.Utilities.DataManager.RequestPlugin <IProfileConnector>();
            m_eventQueue       = service.Registry.RequestModuleInterface <IEventQueueService>();
            m_userService      = service.Registry.RequestModuleInterface <IUserAccountService>();

            string post = CapsUtil.CreateCAPS("SetDisplayName", "");

            service.AddStreamHandler("SetDisplayName", new GenericStreamHandler("POST", post,
                                                                                ProcessSetDisplayName));

            post = CapsUtil.CreateCAPS("GetDisplayNames", "");
            service.AddStreamHandler("GetDisplayNames", new GenericStreamHandler("GET", post,
                                                                                 ProcessGetDisplayName));
        }
コード例 #3
0
        public OSDMap OnRegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["DispatchWindLightSettings"] = CapsUtil.CreateCAPS("DispatchWindLightSettings", "");
            //Sets the windlight settings
#if (!ISWIN)
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["DispatchWindLightSettings"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(DispatchWindLightSettings(m_dhttpMethod, agentID));
            }));
#else
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["DispatchWindLightSettings"],
                                                        m_dhttpMethod =>
                                                        DispatchWindLightSettings(m_dhttpMethod, agentID)));
#endif

            retVal["RetrieveWindLightSettings"] = CapsUtil.CreateCAPS("RetrieveWindLightSettings", "");
            //Retrieves the windlight settings for a specifc parcel or region
#if (!ISWIN)
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["RetrieveWindLightSettings"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(RetrieveWindLightSettings(m_dhttpMethod, agentID));
            }));
#else
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["RetrieveWindLightSettings"],
                                                        m_dhttpMethod =>
                                                        RetrieveWindLightSettings(m_dhttpMethod, agentID)));
#endif
            return(retVal);
        }
コード例 #4
0
        public OSDMap OnRegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["DispatchWindLightSettings"] = CapsUtil.CreateCAPS("DispatchWindLightSettings", "");
            //Sets the windlight settings
            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["DispatchWindLightSettings"],
                                                             delegate(string path, Stream request,
                                                                      OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(DispatchWindLightSettings(path, request, httpRequest,
                                                 httpResponse, agentID));
            }));

            retVal["RetrieveWindLightSettings"] = CapsUtil.CreateCAPS("RetrieveWindLightSettings", "");
            //Retrieves the windlight settings for a specifc parcel or region
            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["RetrieveWindLightSettings"],
                                                             delegate(string path, Stream request,
                                                                      OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(RetrieveWindLightSettings(path, request, httpRequest,
                                                 httpResponse, agentID));
            }));
            return(retVal);
        }
コード例 #5
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["ObjectAdd"] = CapsUtil.CreateCAPS("ObjectAdd", "");
#if (!ISWIN)
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["ObjectAdd"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(ProcessAdd(m_dhttpMethod, agentID));
            }));
#else
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["ObjectAdd"],
                                                        m_dhttpMethod => ProcessAdd(m_dhttpMethod, agentID)));
#endif

            retVal["ServerReleaseNotes"] = CapsUtil.CreateCAPS("ServerReleaseNotes", "");
#if (!ISWIN)
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["ServerReleaseNotes"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(ProcessServerReleaseNotes(m_dhttpMethod, agentID));
            }));
#else
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["ServerReleaseNotes"],
                                                        m_dhttpMethod =>
                                                        ProcessServerReleaseNotes(m_dhttpMethod, agentID)));
#endif
            return(retVal);
        }
コード例 #6
0
        // <summary>
        // OnRegisterCaps is invoked via the scene.EventManager
        // everytime OpenSim hands out capabilities to a client
        // (login, region crossing). We contribute two capabilities to
        // the set of capabilities handed back to the client:
        // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest.
        //
        // ProvisionVoiceAccountRequest allows the client to obtain
        // the voice account credentials for the avatar it is
        // controlling (e.g., user name, password, etc).
        //
        // ParcelVoiceInfoRequest is invoked whenever the client
        // changes from one region or parcel to another.
        //
        // Note that OnRegisterCaps is called here via a closure
        // delegate containing the scene of the respective region (see
        // Initialise()).
        // </summary>
        public OSDMap OnRegisterCaps(Scene scene, UUID agentID, IHttpServer server)
        {
            m_log.DebugFormat("[FreeSwitchVoice] OnRegisterCaps: agentID {0}", agentID);

            OSDMap retVal = new OSDMap();

            retVal["ProvisionVoiceAccountRequest"] = CapsUtil.CreateCAPS("ProvisionVoiceAccountRequest", "");

            server.AddStreamHandler(new RestStreamHandler("POST", retVal["ProvisionVoiceAccountRequest"],
                                                          delegate(string request, string path, string param,
                                                                   OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(ProvisionVoiceAccountRequest(scene, request, path, param,
                                                    agentID));
            }));
            retVal["ParcelVoiceInfoRequest"] = CapsUtil.CreateCAPS("ParcelVoiceInfoRequest", "");
            server.AddStreamHandler(new RestStreamHandler("POST", retVal["ParcelVoiceInfoRequest"],
                                                          delegate(string request, string path, string param,
                                                                   OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(ParcelVoiceInfoRequest(scene, request, path, param,
                                              agentID));
            }));
            retVal["ChatSessionRequest"] = CapsUtil.CreateCAPS("ChatSessionRequest", "");
            server.AddStreamHandler(new RestStreamHandler("POST", retVal["ChatSessionRequest"],
                                                          delegate(string request, string path, string param,
                                                                   OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(ChatSessionRequest(scene, request, path, param,
                                          agentID));
            }));
            return(retVal);
        }
コード例 #7
0
        public OSDMap OnRegisterCaps(UUID agentID, IHttpServer server)
        {
//            MainConsole.Instance.DebugFormat(
//                "[MOAP]: Registering ObjectMedia and ObjectMediaNavigate capabilities for agent {0}", agentID);

            OSDMap retVal = new OSDMap();

            retVal["ObjectMedia"] = CapsUtil.CreateCAPS("ObjectMedia", "");

            lock (m_omCapUsers)
            {
                m_omCapUsers[retVal["ObjectMedia"]] = agentID;
                m_omCapUrls[agentID] = retVal["ObjectMedia"];

                // Even though we're registering for POST we're going to get GETS and UPDATES too
                server.AddStreamHandler(new GenericStreamHandler("POST", retVal["ObjectMedia"], HandleObjectMediaMessage));
            }

            retVal["ObjectMediaNavigate"] = CapsUtil.CreateCAPS("ObjectMediaNavigate", "");

            lock (m_omuCapUsers)
            {
                m_omuCapUsers[retVal["ObjectMediaNavigate"]] = agentID;
                m_omuCapUrls[agentID] = retVal["ObjectMediaNavigate"];

                // Even though we're registering for POST we're going to get GETS and UPDATES too
                server.AddStreamHandler(new GenericStreamHandler("POST", retVal["ObjectMediaNavigate"],
                                                                 HandleObjectMediaNavigateMessage));
            }
            return(retVal);
        }
コード例 #8
0
        private OSDMap EventManager_OnRegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["EnvironmentSettings"] = CapsUtil.CreateCAPS("EnvironmentSettings", "");
#if (!ISWIN)
            //Sets the windlight settings
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["EnvironmentSettings"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(SetEnvironment(m_dhttpMethod, agentID));
            }));
            //Sets the windlight settings
            server.AddStreamHandler(new RestHTTPHandler("GET", retVal["EnvironmentSettings"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(EnvironmentSettings(m_dhttpMethod, agentID));
            }));
#else
            //Sets the windlight settings
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["EnvironmentSettings"],
                                                        m_dhttpMethod => SetEnvironment(m_dhttpMethod, agentID)));
            //Sets the windlight settings
            server.AddStreamHandler(new RestHTTPHandler("GET", retVal["EnvironmentSettings"],
                                                        m_dhttpMethod => EnvironmentSettings(m_dhttpMethod, agentID)));
#endif
            return(retVal);
        }
コード例 #9
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal ["RenderMaterials"] = CapsUtil.CreateCAPS("RenderMaterials", "");
            server.AddStreamHandler(new GenericStreamHandler("POST", retVal ["RenderMaterials"], RenderMaterialsPostCap));
            server.AddStreamHandler(new GenericStreamHandler("GET", retVal ["RenderMaterials"], RenderMaterialsGetCap));
            server.AddStreamHandler(new GenericStreamHandler("PUT", retVal ["RenderMaterials"], RenderMaterialsPostCap));
            return(retVal);
        }
コード例 #10
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["ViewerStartAuction"] = CapsUtil.CreateCAPS("ViewerStartAuction", "");

            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["ViewerStartAuction"],
                                                             ViewerStartAuction));
            return(retVal);
        }
コード例 #11
0
        // OnRegisterCaps is invoked via the scene.EventManager
        // every time Universe hands out capabilities to a client
        // (login, region crossing). We contribute two capabilities to
        // the set of capabilities handed back to the client:
        // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest.
        //
        // ProvisionVoiceAccountRequest allows the client to obtain
        // the voice account credentials for the avatar it is
        // controlling (e.g., user name, password, etc).
        //
        // ParcelVoiceInfoRequest is invoked whenever the client
        // changes from one region or parcel to another.
        //
        // Note that OnRegisterCaps is called here via a closure
        // delegate containing the scene of the respective region (see
        // Initialize()).
        public OSDMap OnRegisterCaps(IScene scene, UUID agentID, IHttpServer caps)
        {
            OSDMap retVal = new OSDMap();

            retVal["ProvisionVoiceAccountRequest"] = CapsUtil.CreateCAPS("ProvisionVoiceAccountRequest", "");
            caps.AddStreamHandler(new GenericStreamHandler("POST", retVal["ProvisionVoiceAccountRequest"], (path, request, httpRequest, httpResponse) => ProvisionVoiceAccountRequest(scene, agentID)));
            retVal["ParcelVoiceInfoRequest"] = CapsUtil.CreateCAPS("ParcelVoiceInfoRequest", "");
            caps.AddStreamHandler(new GenericStreamHandler("POST", retVal["ParcelVoiceInfoRequest"], (path, request, httpRequest, httpResponse) => ParcelVoiceInfoRequest(scene, agentID)));

            return(retVal);
        }
コード例 #12
0
        public OSDMap OnRegisterCaps(UUID agentID, IHttpServer httpServer)
        {
            OSDMap retVal = new OSDMap();

            retVal["PublicSnapshotDataInfo"] = CapsUtil.CreateCAPS("PublicSnapshotDataInfo", "");

            httpServer.AddStreamHandler(new RestStreamHandler("POST", retVal["ViewerStartAuction"],
                                                              OnDiscoveryAttempt));
            //m_log.Info("[DATASNAPSHOT]: Registering service discovery capability for " + agentID);
            return(retVal);
        }
コード例 #13
0
ファイル: ObjectAdd.cs プロジェクト: nhede/WhiteCore-Dev
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["ObjectAdd"] = CapsUtil.CreateCAPS("ObjectAdd", "");
            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["ObjectAdd"],
                                                             delegate(string path, Stream request,
                                                                      OSHttpRequest httpRequest,
                                                                      OSHttpResponse httpResponse)
                                                             { return(ProcessAdd(request, agentID)); }));
            return(retVal);
        }
コード例 #14
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["GetMesh"] = CapsUtil.CreateCAPS("GetMesh", "");
            server.AddStreamHandler(new RestHTTPHandler("GET", retVal["GetMesh"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(ProcessGetMesh(m_dhttpMethod, agentID));
            }));
            return(retVal);
        }
コード例 #15
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["UntrustedSimulatorMessage"] = CapsUtil.CreateCAPS("UntrustedSimulatorMessage", "");

            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["UntrustedSimulatorMessage"],
                                                             delegate(string path, Stream request,
                                                                      OSHttpRequest httpRequest,
                                                                      OSHttpResponse httpResponse)
                                                             { return(UntrustedSimulatorMessage(agentID, request)); }));
            return(retVal);
        }
コード例 #16
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["GetObjectPhysicsData"] = CapsUtil.CreateCAPS("GetObjectPhysicsData", "");

            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["GetObjectPhysicsData"],
                                                             delegate(string path, Stream request,
                                                                      OSHttpRequest httpRequest,
                                                                      OSHttpResponse httpResponse)
                                                             { return(GetObjectPhysicsData(agentID, request)); }));
            return(retVal);
        }
コード例 #17
0
ファイル: AuctionModule.cs プロジェクト: x8ball/Aurora-Sim
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["ViewerStartAuction"] = CapsUtil.CreateCAPS("ViewerStartAuction", "");

            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["ViewerStartAuction"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(ViewerStartAuction(m_dhttpMethod));
            }));
            return(retVal);
        }
コード例 #18
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["NewFileAgentInventoryVariablePrice"] = CapsUtil.CreateCAPS("NewFileAgentInventoryVariablePrice", "");
            server.AddStreamHandler(new RestStreamHandler("POST", retVal["NewFileAgentInventoryVariablePrice"],
                                                          delegate(string request, string path, string param,
                                                                   OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(NewAgentInventoryRequest(request, agentID));
            }));
            return(retVal);
        }
コード例 #19
0
        public OSDMap OnRegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["SimConsoleAsync"] = CapsUtil.CreateCAPS("SimConsoleAsync", "");

            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["SimConsoleAsync"],
                                                             delegate(string path, Stream request,
                                                                      OSHttpRequest httpRequest,
                                                                      OSHttpResponse httpResponse)
                                                             { return(SimConsoleAsyncResponder(request, agentID)); }));
            return(retVal);
        }
コード例 #20
0
        public OSDMap OnRegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["DispatchOpenRegionSettings"] = CapsUtil.CreateCAPS("DispatchOpenRegionSettings", "");

            //Sets the OpenRegionSettings
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["DispatchOpenRegionSettings"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(DispatchOpenRegionSettings(m_dhttpMethod, agentID));
            }));
            return(retVal);
        }
コード例 #21
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["ServerReleaseNotes"] = CapsUtil.CreateCAPS("ServerReleaseNotes", "");

            server.AddStreamHandler(new GenericStreamHandler("GET", retVal["ServerReleaseNotes"],
                                                             delegate(string path, Stream request,
                                                                      OSHttpRequest httpRequest,
                                                                      OSHttpResponse httpResponse)
                                                             { return(ProcessServerReleaseNotes(request, httpResponse, agentID)); }));

            return(retVal);
        }
コード例 #22
0
        public OSDMap OnRegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["DispatchOpenRegionSettings"] = CapsUtil.CreateCAPS("DispatchOpenRegionSettings", "");

            //Sets the OpenRegionSettings
            server.AddStreamHandler(new GenericStreamHandler("POST", retVal["DispatchOpenRegionSettings"],
                                                             delegate(string path, Stream request,
                                                                      OSHttpRequest httpRequest,
                                                                      OSHttpResponse httpResponse)
                                                             { return(DispatchOpenRegionSettings(request, agentID)); }));
            return(retVal);
        }
コード例 #23
0
        public OSDMap OnRegisterCaps(UUID agentID, IHttpServer server)
        {
            m_log.DebugFormat("[VC]: OnRegisterCaps: agentID {0}", agentID);
            OSDMap retVal = new OSDMap();

            retVal["ViewerStats"] = CapsUtil.CreateCAPS("ViewerStats", "");

            server.AddStreamHandler(new RestStreamHandler("POST", retVal["ViewerStats"],
                                                          delegate(string request, string path, string param,
                                                                   OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(ViewerStatsReport(request, path, param,
                                         agentID));
            }));
            return(retVal);
        }
コード例 #24
0
        public void RegisterCaps(UUID agentID, Caps caps)
        {
            string homeLocationCap = CapsUtil.CreateCAPS("HomeLocation", String.Empty);

            // OpenSimulator CAPs infrastructure seems to be somewhat hostile towards any CAP that requires both GET
            // and POST handlers, so we first set up a POST handler normally and then add a GET/PUT handler via MainServer

            IRequestHandler homeLocationRequestHandler
                = new RestStreamHandler(
                      "POST", homeLocationCap,
                      (request, path, param, httpRequest, httpResponse) => HomeLocation(request, agentID),
                      "HomeLocation", null);

            MainServer.Instance.AddStreamHandler(homeLocationRequestHandler);
            caps.RegisterHandler("HomeLocation", homeLocationRequestHandler);
        }
コード例 #25
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["ServerReleaseNotes"] = CapsUtil.CreateCAPS("ServerReleaseNotes", "");

#if (!ISWIN)
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["ServerReleaseNotes"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(ProcessServerReleaseNotes(m_dhttpMethod, agentID));
            }));
#else
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["ServerReleaseNotes"],
                                                        m_dhttpMethod =>
                                                        ProcessServerReleaseNotes(m_dhttpMethod, agentID)));
#endif

            retVal["CopyInventoryFromNotecard"] = CapsUtil.CreateCAPS("CopyInventoryFromNotecard", "");

#if (!ISWIN)
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["CopyInventoryFromNotecard"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(CopyInventoryFromNotecard(m_dhttpMethod, agentID));
            }));
#else
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["CopyInventoryFromNotecard"],
                                                        m_dhttpMethod =>
                                                        CopyInventoryFromNotecard(m_dhttpMethod, agentID)));
#endif

            // note: this seems to be pointed to the CopyInventoryFromNotecard function?? I looked but didn't find anything similar
            retVal["ExportObject"] = CapsUtil.CreateCAPS("ExportObject", "");
#if (!ISWIN)
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["ExportObject"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(CopyInventoryFromNotecard(m_dhttpMethod, agentID));
            }));
#else
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["ExportObject"],
                                                        m_dhttpMethod =>
                                                        CopyInventoryFromNotecard(m_dhttpMethod, agentID)));
#endif
            return(retVal);
        }
コード例 #26
0
        OSDMap OnRegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["SendUserReportWithScreenshot"] = CapsUtil.CreateCAPS("SendUserReportWithScreenshot", "");
            retVal["SendUserReport"] = retVal["SendUserReportWithScreenshot"];

            //Region Server bound
            server.AddStreamHandler(new GenericStreamHandler(
                                        "POST", retVal["SendUserReportWithScreenshot"], delegate(
                                            string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) {
                return(ProcessSendUserReportWithScreenshot(agentID, path, request, httpRequest, httpResponse));
            }
                                        ));

            return(retVal);
        }
コード例 #27
0
        OSDMap EventManager_OnRegisterCaps(UUID agentID, IHttpServer httpServer)
        {
            OSDMap map = new OSDMap();

            map["ServerFeatures"] = CapsUtil.CreateCAPS("ServerFeatures", "");
            httpServer.AddStreamHandler(new RestHTTPHandler("POST", map["ServerFeatures"],
                                                            delegate(Hashtable m_dhttpMethod)
            {
                return(SetServerFeature(m_dhttpMethod, agentID));
            }));
            httpServer.AddStreamHandler(new RestHTTPHandler("GET", map["ServerFeatures"],
                                                            delegate(Hashtable m_dhttpMethod)
            {
                return(GetServerFeature(m_dhttpMethod, agentID));
            }));

            return(map);
        }
コード例 #28
0
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["GetObjectPhysicsData"] = CapsUtil.CreateCAPS("GetObjectPhysicsData", "");

#if (!ISWIN)
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["GetObjectPhysicsData"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(GetObjectPhysicsData(agentID, m_dhttpMethod));
            }));
#else
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["GetObjectPhysicsData"],
                                                        m_dhttpMethod => GetObjectPhysicsData(agentID, m_dhttpMethod)));
#endif
            return(retVal);
        }
コード例 #29
0
        private OSDMap EventManager_OnRegisterCaps(UUID agentID, IHttpServer httpServer)
        {
            OSDMap map = new OSDMap();

            map["ServerFeatures"] = CapsUtil.CreateCAPS("ServerFeatures", "");
            httpServer.AddStreamHandler(new GenericStreamHandler("POST", map["ServerFeatures"],
                                                                 delegate(string path, Stream request,
                                                                          OSHttpRequest httpRequest,
                                                                          OSHttpResponse httpResponse)
                                                                 { return(SetServerFeature(request, agentID)); }));
            httpServer.AddStreamHandler(new GenericStreamHandler("GET", map["ServerFeatures"],
                                                                 delegate(string path, Stream request,
                                                                          OSHttpRequest httpRequest,
                                                                          OSHttpResponse httpResponse)
                                                                 { return(GetServerFeature(request, agentID)); }));

            return(map);
        }
コード例 #30
0
ファイル: GodsModule.cs プロジェクト: satlanski2/Aurora-Sim
        public OSDMap RegisterCaps(UUID agentID, IHttpServer server)
        {
            OSDMap retVal = new OSDMap();

            retVal["UntrustedSimulatorMessage"] = CapsUtil.CreateCAPS("UntrustedSimulatorMessage", "");

#if (!ISWIN)
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["UntrustedSimulatorMessage"],
                                                        delegate(Hashtable m_dhttpMethod)
            {
                return(UntrustedSimulatorMessage(agentID, m_dhttpMethod));
            }));
#else
            server.AddStreamHandler(new RestHTTPHandler("POST", retVal["UntrustedSimulatorMessage"],
                                                        m_dhttpMethod =>
                                                        UntrustedSimulatorMessage(agentID, m_dhttpMethod)));
#endif
            return(retVal);
        }