コード例 #1
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service     = service;
            m_gridService = service.Registry.RequestModuleInterface <IGridService>();
            IConfig config =
                service.ClientCaps.Registry.RequestModuleInterface <ISimulationBase>().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(request.ReadUntilEnd(), httpRequest, httpResponse, m_service.AgentID));
            };

            m_service.AddStreamHandler("MapLayer",
                                       new GenericStreamHandler("POST", m_service.CreateCAPS("MapLayer", ""),
                                                                method));
            m_service.AddStreamHandler("MapLayerGod",
                                       new GenericStreamHandler("POST", m_service.CreateCAPS("MapLayerGod", ""),
                                                                method));
        }
コード例 #2
0
ファイル: DisplayNamesCAPS.cs プロジェクト: x8ball/Aurora-Sim
        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 = Aurora.DataManager.DataManager.RequestPlugin<IProfileConnector> ();
            m_eventQueue = service.Registry.RequestModuleInterface<IEventQueueService> ();
            m_userService = service.Registry.RequestModuleInterface<IUserAccountService> ();

            string post = CapsUtil.CreateCAPS ("SetDisplayName", "");
            service.AddCAPS ("SetDisplayName", post);
            service.AddStreamHandler ("SetDisplayName", new RestHTTPHandler ("POST", post,
                                                      ProcessSetDisplayName));

            post = CapsUtil.CreateCAPS ("GetDisplayNames", "");
            service.AddCAPS ("GetDisplayNames", post);
            service.AddStreamHandler ("GetDisplayNames", new StreamHandler ("GET", post,
                                                      ProcessGetDisplayName));
        }
コード例 #3
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service          = service;
            m_agentInfoService = service.Registry.RequestModuleInterface <IAgentInfoService> ();
            m_agentProcessing  = service.Registry.RequestModuleInterface <IAgentProcessing> ();

            HttpServerHandle method;

            service.AddStreamHandler("AvatarPickerSearch",
                                     new GenericStreamHandler("GET", service.CreateCAPS("AvatarPickerSearch", ""),
                                                              ProcessAvatarPickerSearch));

            method = delegate(string path, Stream request,
                              OSHttpRequest httpRequest, OSHttpResponse httpResponse) {
                return(HomeLocation(request, m_service.AgentID));
            };
            service.AddStreamHandler("HomeLocation",
                                     new GenericStreamHandler("POST", service.CreateCAPS("HomeLocation", ""),
                                                              method));

            method = delegate(string path, Stream request,
                              OSHttpRequest httpRequest, OSHttpResponse httpResponse) {
                return(TeleportLocation(request, m_service.AgentID));
            };

            service.AddStreamHandler("TeleportLocation",
                                     new GenericStreamHandler("POST", service.CreateCAPS("TeleportLocation", ""),
                                                              method));
        }
コード例 #4
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;
            m_presenceService = service.Registry.RequestModuleInterface<IPresenceService>();
            m_gridUserService = service.Registry.RequestModuleInterface<IGridUserService>();
            
            GenericHTTPMethod method = delegate(Hashtable httpMethod)
            {
                return ProcessUpdateAgentLanguage(httpMethod, m_service.AgentID);
            };
            service.AddStreamHandler("UpdateAgentLanguage", new RestHTTPHandler("POST", service.CreateCAPS("UpdateAgentLanguage", ""),
                                                      method));
            method = delegate(Hashtable httpMethod)
            {
                return ProcessUpdateAgentInfo(httpMethod, m_service.AgentID);
            };
            service.AddStreamHandler("UpdateAgentInformation", new RestHTTPHandler("POST", service.CreateCAPS("UpdateAgentInformation", ""),
                                                      method));

            method = delegate(Hashtable httpMethod)
            {
                return HomeLocation(httpMethod, m_service.AgentID);
            };
            service.AddStreamHandler("HomeLocation", new RestHTTPHandler("POST", service.CreateCAPS("HomeLocation", ""),
                                                      method));
        }
コード例 #5
0
ファイル: AssortedCAPS.cs プロジェクト: x8ball/Aurora-Sim
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service          = service;
            m_agentInfoService = service.Registry.RequestModuleInterface <IAgentInfoService>();

            GenericHTTPMethod method = delegate(Hashtable httpMethod)
            {
                return(ProcessUpdateAgentLanguage(httpMethod, m_service.AgentID));
            };

            service.AddStreamHandler("UpdateAgentLanguage", new RestHTTPHandler("POST", service.CreateCAPS("UpdateAgentLanguage", ""),
                                                                                method));
            method = delegate(Hashtable httpMethod)
            {
                return(ProcessUpdateAgentInfo(httpMethod, m_service.AgentID));
            };
            service.AddStreamHandler("UpdateAgentInformation", new RestHTTPHandler("POST", service.CreateCAPS("UpdateAgentInformation", ""),
                                                                                   method));

            method = delegate(Hashtable httpMethod)
            {
                return(HomeLocation(httpMethod, m_service.AgentID));
            };
            service.AddStreamHandler("HomeLocation", new RestHTTPHandler("POST", service.CreateCAPS("HomeLocation", ""),
                                                                         method));
        }
コード例 #6
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));
        }
コード例 #7
0
        public void RegisterCaps (IRegionClientCapsService service)
        {
            m_service = service;
            m_agentInfoService = service.Registry.RequestModuleInterface<IAgentInfoService> ();
            m_agentProcessing = service.Registry.RequestModuleInterface<IAgentProcessing> ();
            
            HttpServerHandle method;

            service.AddStreamHandler ("AvatarPickerSearch",
                new GenericStreamHandler ("GET", service.CreateCAPS ("AvatarPickerSearch", ""),
                    ProcessAvatarPickerSearch));

            method = delegate(string path, Stream request,
                              OSHttpRequest httpRequest, OSHttpResponse httpResponse) {
                return HomeLocation (request, m_service.AgentID);
            };
            service.AddStreamHandler ("HomeLocation",
                new GenericStreamHandler ("POST", service.CreateCAPS ("HomeLocation", ""),
                    method));

            method = delegate(string path, Stream request,
                              OSHttpRequest httpRequest, OSHttpResponse httpResponse) {
                return TeleportLocation (request, m_service.AgentID);
            };

            service.AddStreamHandler ("TeleportLocation",
                new GenericStreamHandler ("POST", service.CreateCAPS ("TeleportLocation", ""),
                    method));
        }
コード例 #8
0
        public void RegisterCaps (IRegionClientCapsService service)
        {
            var cfgservice = service.ClientCaps.Registry.RequestModuleInterface<ISimulationBase> ();
            var displayNamesConfig = cfgservice.ConfigSource.Configs ["DisplayNames"];
            if (displayNamesConfig != null) {
                if (!displayNamesConfig.GetBoolean ("Enabled", true))
                    return;

                string bannedNamesString = displayNamesConfig.GetString ("BannedUserNames", "");
                if (bannedNamesString != "")
                    bannedNames = new List<string> (bannedNamesString.Split (','));

                m_update_days = displayNamesConfig.GetDouble ("UpdateDays", m_update_days);

            }
            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));
        }
コード例 #9
0
ファイル: MapCAPS.cs プロジェクト: satlanski2/Aurora-Sim
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;
            m_gridService = service.Registry.RequestModuleInterface<IGridService>();
            IConfig config =
                service.ClientCaps.Registry.RequestModuleInterface<ISimulationBase>().ConfigSource.Configs["MapCaps"];
            if (config != null)
                m_allowCapsMessage = config.GetBoolean("AllowCapsMessage", m_allowCapsMessage);

#if (!ISWIN)
            RestMethod method = delegate(string request, string path, string param,
                                                                OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return MapLayerRequest(request, path, param, httpRequest, httpResponse, m_service.AgentID);
            };
#else
            RestMethod method =
                (request, path, param, httpRequest, httpResponse) =>
                MapLayerRequest(request, path, param, httpRequest, httpResponse,
                                m_service.AgentID);
#endif
            m_service.AddStreamHandler("MapLayer",
                                       new RestStreamHandler("POST", m_service.CreateCAPS("MapLayer", m_mapLayerPath),
                                                             method));
            m_service.AddStreamHandler("MapLayerGod",
                                       new RestStreamHandler("POST", m_service.CreateCAPS("MapLayerGod", m_mapLayerPath),
                                                             method));
        }
コード例 #10
0
ファイル: MapCAPS.cs プロジェクト: SignpostMarv/Aurora-Sim
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service     = service;
            m_gridService = service.Registry.RequestModuleInterface <IGridService>();
            IConfig config =
                service.ClientCaps.Registry.RequestModuleInterface <ISimulationBase>().ConfigSource.Configs["MapCaps"];

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

#if (!ISWIN)
            RestMethod method = delegate(string request, string path, string param,
                                         OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(MapLayerRequest(request, path, param, httpRequest, httpResponse, m_service.AgentID));
            };
#else
            RestMethod method =
                (request, path, param, httpRequest, httpResponse) =>
                MapLayerRequest(request, path, param, httpRequest, httpResponse,
                                m_service.AgentID);
#endif
            m_service.AddStreamHandler("MapLayer",
                                       new RestStreamHandler("POST", m_service.CreateCAPS("MapLayer", m_mapLayerPath),
                                                             method));
            m_service.AddStreamHandler("MapLayerGod",
                                       new RestStreamHandler("POST", m_service.CreateCAPS("MapLayerGod", m_mapLayerPath),
                                                             method));
        }
コード例 #11
0
ファイル: InventoryCAPS.cs プロジェクト: kow/Aurora-Sim
        /// <summary>
        ///
        /// </summary>
        /// <param name="llsdRequest"></param>
        /// <returns></returns>
        public string NewAgentInventoryRequest(string request, string path, string param,
                                               OSHttpRequest httpRequest, OSHttpResponse httpResponse)
        {
            OSDMap map        = (OSDMap)OSDParser.DeserializeLLSDXml(request);
            string asset_type = map["asset_type"].AsString();

            m_log.Info("[CAPS]: NewAgentInventoryRequest Request is: " + map.ToString());
            //m_log.Debug("asset upload request via CAPS" + llsdRequest.inventory_type + " , " + llsdRequest.asset_type);

            if (asset_type == "texture" ||
                asset_type == "animation" ||
                asset_type == "sound")
            {
                /* Disabled until we have a money module that can hook up to this
                 * IMoneyModule mm = .RequestModuleInterface<IMoneyModule>();
                 *
                 *  if (mm != null)
                 *  {
                 *      if (!mm.UploadCovered(client, mm.UploadCharge))
                 *      {
                 *          if (client != null)
                 *              client.SendAgentAlertMessage("Unable to upload asset. Insufficient funds.", false);
                 *
                 *          map = new OSDMap();
                 *          map["uploader"] = "";
                 *          map["state"] = "error";
                 *          return OSDParser.SerializeLLSDXmlString(map);
                 *      }
                 *      else
                 *          mm.ApplyUploadCharge(client.AgentId, mm.UploadCharge, "Upload asset.");
                 *  }
                 */
            }


            string assetName      = map["name"].AsString();
            string assetDes       = map["description"].AsString();
            UUID   parentFolder   = map["folder_id"].AsUUID();
            string inventory_type = map["inventory_type"].AsString();

            UUID   newAsset     = UUID.Random();
            UUID   newInvItem   = UUID.Random();
            string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
            string uploadpath   = m_service.CreateCAPS("Upload" + uploaderPath, uploaderPath);

            AssetUploader uploader =
                new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, inventory_type,
                                  asset_type, uploadpath, "Upload" + uploaderPath, m_service, this);

            m_service.AddStreamHandler("Upload" + uploaderPath,
                                       new BinaryStreamHandler("POST", uploadpath, uploader.uploaderCaps));

            string uploaderURL = m_service.HostUri + uploadpath;

            map             = new OSDMap();
            map["uploader"] = uploaderURL;
            map["state"]    = "upload";
            return(OSDParser.SerializeLLSDXmlString(map));
        }
コード例 #12
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service          = service;
            m_assetService     = service.Registry.RequestModuleInterface <IAssetService>();
            m_inventoryService = service.Registry.RequestModuleInterface <IInventoryService>();
            m_libraryService   = service.Registry.RequestModuleInterface <ILibraryService>();

            RestBytesMethod method = delegate(string request, string path, string param,
                                              OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(HandleWebFetchInventoryDescendents(request, m_service.AgentID));
            };

            service.AddStreamHandler("WebFetchInventoryDescendents",
                                     new RestBytesStreamHandler("POST", service.CreateCAPS("WebFetchInventoryDescendents", ""),
                                                                method));

            method = delegate(string request, string path, string param,
                              OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(HandleFetchLibDescendents(request, m_service.AgentID));
            };
            service.AddStreamHandler("FetchLibDescendents",
                                     new RestBytesStreamHandler("POST", service.CreateCAPS("FetchLibDescendents", ""),
                                                                method));

            method = delegate(string request, string path, string param,
                              OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(HandleFetchInventory(request, m_service.AgentID));
            };
            service.AddStreamHandler("FetchInventory",
                                     new RestBytesStreamHandler("POST", service.CreateCAPS("FetchInventory", ""),
                                                                method));

            method = delegate(string request, string path, string param,
                              OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(HandleFetchLib(request, m_service.AgentID));
            };
            service.AddStreamHandler("FetchLib",
                                     new RestBytesStreamHandler("POST", service.CreateCAPS("FetchLib", ""),
                                                                method));

            service.AddStreamHandler("NewFileAgentInventory",
                                     new RestStreamHandler("POST", service.CreateCAPS("NewFileAgentInventory", m_newInventory),
                                                           NewAgentInventoryRequest));

            /*method = delegate(string request, string path, string param,
             *                                                  OSHttpRequest httpRequest, OSHttpResponse httpResponse)
             * {
             *  return HandleInventoryItemCreate(request, m_service.AgentID);
             * };
             * service.AddStreamHandler("InventoryItemCreate",
             *  new RestBytesStreamHandler("POST", service.CreateCAPS("InventoryItemCreate", ""),
             *                                        method));*/
        }
コード例 #13
0
        public void RegisterCaps (IRegionClientCapsService service)
        {
            m_service = service;
            m_groupService = Framework.Utilities.DataManager.RequestPlugin<IGroupsServiceConnector> ();

            var apiUri = service.CreateCAPS ("GroupAPIv1", "");
            service.AddStreamHandler ("GroupAPIv1", new GenericStreamHandler ("GET", apiUri, ProcessGetGroupAPI));
            service.AddStreamHandler ("GroupAPIv1", new GenericStreamHandler ("POST", apiUri, ProcessPostGroupAPI));
        }
コード例 #14
0
ファイル: InventoryCAPS.cs プロジェクト: x8ball/Aurora-Sim
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;
            m_assetService = service.Registry.RequestModuleInterface<IAssetService>();
            m_inventoryService = service.Registry.RequestModuleInterface<IInventoryService>();
            m_libraryService = service.Registry.RequestModuleInterface<ILibraryService>();

            RestBytesMethod method = delegate(string request, string path, string param,
                                                                OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return HandleWebFetchInventoryDescendents(request, m_service.AgentID);
            };
            service.AddStreamHandler("WebFetchInventoryDescendents",
                new RestBytesStreamHandler("POST", service.CreateCAPS("WebFetchInventoryDescendents", ""),
                                                      method));

            method = delegate(string request, string path, string param,
                                                                OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return HandleFetchLibDescendents(request, m_service.AgentID);
            };
            service.AddStreamHandler("FetchLibDescendents",
                new RestBytesStreamHandler("POST", service.CreateCAPS("FetchLibDescendents", ""),
                                                      method));

            method = delegate(string request, string path, string param,
                                                                OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return HandleFetchInventory(request, m_service.AgentID);
            };
            service.AddStreamHandler("FetchInventory",
                new RestBytesStreamHandler("POST", service.CreateCAPS("FetchInventory", ""),
                                                      method));

            method = delegate(string request, string path, string param,
                                                                OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return HandleFetchLib(request, m_service.AgentID);
            };
            service.AddStreamHandler("FetchLib",
                new RestBytesStreamHandler("POST", service.CreateCAPS("FetchLib", ""),
                                                      method));

            service.AddStreamHandler("NewFileAgentInventory",
                new RestStreamHandler("POST", service.CreateCAPS("NewFileAgentInventory", m_newInventory),
                                                      NewAgentInventoryRequest));

            /*method = delegate(string request, string path, string param,
                                                                OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return HandleInventoryItemCreate(request, m_service.AgentID);
            };
            service.AddStreamHandler("InventoryItemCreate",
                new RestBytesStreamHandler("POST", service.CreateCAPS("InventoryItemCreate", ""),
                                                      method));*/
        }
コード例 #15
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service          = service;
            m_agentInfoService = service.Registry.RequestModuleInterface <IAgentInfoService>();
            m_agentProcessing  = service.Registry.RequestModuleInterface <IAgentProcessing>();

#if (!ISWIN)
            GenericHTTPMethod method = delegate(Hashtable httpMethod)
            {
                return(ProcessUpdateAgentLanguage(httpMethod, m_service.AgentID));
            };
#else
            GenericHTTPMethod method = httpMethod => ProcessUpdateAgentLanguage(httpMethod, m_service.AgentID);
#endif
            service.AddStreamHandler("UpdateAgentLanguage", new RestHTTPHandler("POST", service.CreateCAPS("UpdateAgentLanguage", ""),
                                                                                method));


#if (!ISWIN)
            method = delegate(Hashtable httpMethod)
            {
                return(ProcessUpdateAgentInfo(httpMethod, m_service.AgentID));
            };
#else
            method = httpMethod => ProcessUpdateAgentInfo(httpMethod, m_service.AgentID);
#endif
            service.AddStreamHandler("UpdateAgentInformation", new RestHTTPHandler("POST", service.CreateCAPS("UpdateAgentInformation", ""),
                                                                                   method));

            service.AddStreamHandler("AvatarPickerSearch", new StreamHandler("GET", service.CreateCAPS("AvatarPickerSearch", ""),
                                                                             ProcessAvatarPickerSearch));

#if (!ISWIN)
            method = delegate(Hashtable httpMethod)
            {
                return(HomeLocation(httpMethod, m_service.AgentID));
            };
#else
            method = httpMethod => HomeLocation(httpMethod, m_service.AgentID);
#endif

            service.AddStreamHandler("HomeLocation", new RestHTTPHandler("POST", service.CreateCAPS("HomeLocation", ""),
                                                                         method));

#if (!ISWIN)
            method = delegate(Hashtable httpMethod)
            {
                return(TeleportLocation(httpMethod, m_service.AgentID));
            };
#else
            method = httpMethod => TeleportLocation(httpMethod, m_service.AgentID);
#endif

            service.AddStreamHandler("TeleportLocation", new RestHTTPHandler("POST", service.CreateCAPS("TeleportLocation", ""),
                                                                             method));
        }
コード例 #16
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service      = service;
            m_groupService = Framework.Utilities.DataManager.RequestPlugin <IGroupsServiceConnector> ();

            var apiUri = service.CreateCAPS("GroupAPIv1", "");

            service.AddStreamHandler("GroupAPIv1", new GenericStreamHandler("GET", apiUri, ProcessGetGroupAPI));
            service.AddStreamHandler("GroupAPIv1", new GenericStreamHandler("POST", apiUri, ProcessPostGroupAPI));
        }
コード例 #17
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            service.AddStreamHandler("ExperiencePreferences",
                                     new GenericStreamHandler("POST", service.CreateCAPS("ExperiencePreferences", ""), ExperiencePreferences));

            service.AddStreamHandler("FindExperienceByName",
                                     new GenericStreamHandler("POST", service.CreateCAPS("FindExperienceByName", ""), FindExperienceByName));

            service.AddStreamHandler("GetExperiences",
                                     new GenericStreamHandler("POST", service.CreateCAPS("GetExperiences", ""), GetExperiences));

            service.AddStreamHandler("GetExperienceInfo",
                                     new GenericStreamHandler("POST", service.CreateCAPS("GetExperienceInfo", ""), GetExperienceInfo));

            service.AddStreamHandler("GetAdminExperiences",
                                     new GenericStreamHandler("POST", service.CreateCAPS("GetAdminExperiences", ""), GetAdminExperiences));

            service.AddStreamHandler("GetCreatorExperiences",
                                     new GenericStreamHandler("POST", service.CreateCAPS("GetCreatorExperiences", ""), GetCreatorExperiences));

            service.AddStreamHandler("UpdateExperience",
                                     new GenericStreamHandler("POST", service.CreateCAPS("UpdateExperience", ""), UpdateExperience));

            service.AddStreamHandler("IsExperienceAdmin",
                                     new GenericStreamHandler("POST", service.CreateCAPS("IsExperienceAdmin", ""), IsExperienceAdmin));

            service.AddStreamHandler("IsExperienceContributor",
                                     new GenericStreamHandler("POST", service.CreateCAPS("IsExperienceContributor", ""), IsExperienceContributor));
        }
コード例 #18
0
        public void RegisterCaps (IRegionClientCapsService service)
        {
            m_service = service;
            
            service.AddStreamHandler ("ExperiencePreferences",
                                      new GenericStreamHandler ("POST", service.CreateCAPS ("ExperiencePreferences", ""), ExperiencePreferences));
            
            service.AddStreamHandler ("FindExperienceByName",
                                      new GenericStreamHandler ("POST", service.CreateCAPS("FindExperienceByName", ""), FindExperienceByName));
            
            service.AddStreamHandler ("GetExperiences",
                                      new GenericStreamHandler ("POST", service.CreateCAPS("GetExperiences", ""), GetExperiences));

            service.AddStreamHandler ("GetExperienceInfo",
                                      new GenericStreamHandler ("POST", service.CreateCAPS("GetExperienceInfo", ""), GetExperienceInfo));
            
            service.AddStreamHandler ("GetAdminExperiences",
                                      new GenericStreamHandler ("POST", service.CreateCAPS("GetAdminExperiences", ""), GetAdminExperiences));
            
            service.AddStreamHandler ("GetCreatorExperiences",
                                      new GenericStreamHandler ("POST", service.CreateCAPS("GetCreatorExperiences", ""), GetCreatorExperiences));
            
            service.AddStreamHandler ("UpdateExperience",
                                      new GenericStreamHandler ("POST", service.CreateCAPS("UpdateExperience", ""), UpdateExperience));
            
            service.AddStreamHandler ("IsExperienceAdmin",
                                      new GenericStreamHandler ("POST", service.CreateCAPS("IsExperienceAdmin", ""), IsExperienceAdmin));

            service.AddStreamHandler ("IsExperienceContributor",
                                      new GenericStreamHandler ("POST", service.CreateCAPS("IsExperienceContributor", ""), IsExperienceContributor));
        }
コード例 #19
0
ファイル: AssetCAPS.cs プロジェクト: mugginsm/Aurora-Sim
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service = service;
     m_assetService = service.Registry.RequestModuleInterface<IAssetService>();
     
     service.AddStreamHandler("GetTexture", 
         new StreamHandler("GET", service.CreateCAPS("GetTexture", ""),
                                                 ProcessGetTexture));
     service.AddStreamHandler("UploadBakedTexture", 
         new RestStreamHandler("POST", service.CreateCAPS("UploadBakedTexture", m_uploadBakedTexturePath),
                                                 UploadBakedTexture));
 }
コード例 #20
0
ファイル: AssetCAPS.cs プロジェクト: x8ball/Aurora-Sim
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service      = service;
            m_assetService = service.Registry.RequestModuleInterface <IAssetService>();

            service.AddStreamHandler("GetTexture",
                                     new StreamHandler("GET", service.CreateCAPS("GetTexture", ""),
                                                       ProcessGetTexture));
            service.AddStreamHandler("UploadBakedTexture",
                                     new RestStreamHandler("POST", service.CreateCAPS("UploadBakedTexture", m_uploadBakedTexturePath),
                                                           UploadBakedTexture));
        }
コード例 #21
0
 public void RegisterCaps (IRegionClientCapsService service)
 {
     m_service = service;
     m_profileConnector = Framework.Utilities.DataManager.RequestPlugin<IProfileConnector> ();
     m_service.AddStreamHandler ("MeshUploadFlag",
         new GenericStreamHandler ("GET", m_service.CreateCAPS ("MeshUploadFlag", ""), MeshUploadFlagCAP));
 }
コード例 #22
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            string capsBase = "/CAPS/EQG/";

            m_capsPath = capsBase + UUID.Random() + "/";


            // Register this as a caps handler
            m_service.AddStreamHandler("EventQueueGet", new GenericStreamHandler("POST", m_capsPath,
                                                                                 delegate(string path, System.IO.Stream request,
                                                                                          OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return(ProcessQueue(httpResponse, service.AgentID));
            }));

            // This will persist this beyond the expiry of the caps handlers
            _isValid = true;
            MainServer.Instance.AddPollServiceHTTPHandler(
                m_capsPath, EventQueuePoll,
                new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, Valid, service.AgentID));

            Random rnd = new Random(Environment.TickCount);

            m_ids = rnd.Next(30000000);
        }
コード例 #23
0
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service = service;
     service.AddStreamHandler("ViewerStats",
                              new GenericStreamHandler("POST", service.CreateCAPS("ViewerStats", ""),
                                                       ViewerStatsReport));
 }
コード例 #24
0
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service          = service;
     m_profileConnector = Framework.Utilities.DataManager.RequestPlugin <IProfileConnector> ();
     m_service.AddStreamHandler("MeshUploadFlag",
                                new GenericStreamHandler("GET", m_service.CreateCAPS("MeshUploadFlag", ""), MeshUploadFlagCAP));
 }
コード例 #25
0
ファイル: AssetCAPS.cs プロジェクト: x8ball/Aurora-Sim
        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 uploaderPath           = UUID.Random().ToString();
                string uploadpath             = m_service.CreateCAPS("Upload" + uploaderPath, uploaderPath);
                BakedTextureUploader uploader =
                    new BakedTextureUploader(uploadpath, "Upload" + uploaderPath,
                                             m_service);
                uploader.OnUpLoad += BakedTextureUploaded;

                m_service.AddStreamHandler(uploadpath,
                                           new BinaryStreamHandler("POST", uploadpath,
                                                                   uploader.uploaderCaps));

                string uploaderURL = m_service.HostUri + uploadpath;
                OSDMap map         = new OSDMap();
                map["uploader"] = uploaderURL;
                map["state"]    = "upload";
                return(OSDParser.SerializeLLSDXmlString(map));
            }
            catch (Exception e)
            {
                m_log.Error("[CAPS]: " + e.ToString());
            }

            return(null);
        }
コード例 #26
0
 public void RegisterCaps (IRegionClientCapsService service)
 {
     m_service = service;
     
     service.AddStreamHandler ("GroupExperiences",
         new GenericStreamHandler ("GET", service.CreateCAPS ("GroupExperiences", ""), GroupExperiences));
 }
コード例 #27
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            string capsBase = "/CAPS/EQG/";

            m_capsPath = capsBase + UUID.Random() + "/";


            // Register this as a caps handler
            IRequestHandler rhandler = new RestHTTPHandler("POST", m_capsPath,
                                                           delegate(Hashtable m_dhttpMethod)
            {
                return(ProcessQueue(m_dhttpMethod, service.AgentID));
            });

            m_service.AddStreamHandler("EventQueueGet", rhandler);

            // This will persist this beyond the expiry of the caps handlers
            MainServer.Instance.AddPollServiceHTTPHandler(
                m_capsPath, EventQueuePoll, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, service.AgentID));

            Random rnd = new Random(Environment.TickCount);

            m_ids = rnd.Next(30000000);
        }
コード例 #28
0
ファイル: UserStatsCAPS.cs プロジェクト: nhede/WhiteCore-Dev
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service = service;
     service.AddStreamHandler("ViewerStats",
                              new GenericStreamHandler("POST", service.CreateCAPS("ViewerStats", ""),
                                                       ViewerStatsReport));
 }
コード例 #29
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            service.AddStreamHandler("AgentExperiences",
                                     new GenericStreamHandler("GET", service.CreateCAPS("AgentExperiences", ""), AgentExperiences));
        }
コード例 #30
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service      = service;
            m_groupService = Framework.Utilities.DataManager.RequestPlugin <IGroupsServiceConnector> ();

            service.AddStreamHandler("GroupMemberData",
                                     new GenericStreamHandler("POST", service.CreateCAPS("GroupMemberData", ""), GroupMemberData));
        }
コード例 #31
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            HttpServerHandle method = delegate(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) {
                return(ProcessUpdateAgentPreferences(request, m_service.AgentID));
            };

            service.AddStreamHandler("AgentPreferences",
                                     new GenericStreamHandler("POST", service.CreateCAPS("AgentPreferences", ""), method));

            service.AddStreamHandler("UpdateAgentLanguage",
                                     new GenericStreamHandler("POST", service.CreateCAPS("UpdateAgentLanguage", ""), method));

            service.AddStreamHandler("UpdateAgentInformation",
                                     new GenericStreamHandler("POST", service.CreateCAPS("UpdateAgentInformation", ""), method));
        }
コード例 #32
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            m_service.AddStreamHandler("SimulatorFeatures",
                                       new RestHTTPHandler("GET", m_service.CreateCAPS("SimulatorFeatures", ""),
                                                           SimulatorFeaturesCAP));
        }
コード例 #33
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            m_service.AddStreamHandler("SimulatorFeatures",
                                       new GenericStreamHandler("GET", m_service.CreateCAPS("SimulatorFeatures", ""),
                                                                SimulatorFeaturesCAP));
        }
コード例 #34
0
        public void RegisterCaps (IRegionClientCapsService service)
        {
            m_service = service;
            m_groupService = Framework.Utilities.DataManager.RequestPlugin<IGroupsServiceConnector> ();

            service.AddStreamHandler ("GroupMemberData",
                new GenericStreamHandler ("POST", service.CreateCAPS ("GroupMemberData", ""), GroupMemberData));
        }
コード例 #35
0
        public void RegisterCaps (IRegionClientCapsService service)
        {
            m_service = service;
            
            HttpServerHandle method = delegate(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) {
                return ProcessUpdateAgentPreferences (request, m_service.AgentID);
            };

            service.AddStreamHandler ("AgentPreferences",
                new GenericStreamHandler ("POST", service.CreateCAPS ("AgentPreferences", ""), method));
			
            service.AddStreamHandler ("UpdateAgentLanguage",
                new GenericStreamHandler ("POST", service.CreateCAPS ("UpdateAgentLanguage", ""), method));
			
            service.AddStreamHandler ("UpdateAgentInformation",
                new GenericStreamHandler ("POST", service.CreateCAPS ("UpdateAgentInformation", ""), method));
        }
コード例 #36
0
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service = service;
     m_userService = service.Registry.RequestModuleInterface<IUserAccountService>();
     m_profileConnector = DataManager.RequestPlugin<IProfileConnector>();
     m_service.AddStreamHandler("MeshUploadFlag",
                                new GenericStreamHandler("GET", m_service.CreateCAPS("MeshUploadFlag", ""),
                                                    MeshUploadFlagCAP));
 }
コード例 #37
0
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service          = service;
     m_userService      = service.Registry.RequestModuleInterface <IUserAccountService>();
     m_profileConnector = DataManager.RequestPlugin <IProfileConnector>();
     m_service.AddStreamHandler("MeshUploadFlag",
                                new GenericStreamHandler("GET", m_service.CreateCAPS("MeshUploadFlag", ""),
                                                         MeshUploadFlagCAP));
 }
コード例 #38
0
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service = service;
     m_imService = service.Registry.RequestModuleInterface<IInstantMessagingService>();
     if (m_imService != null)
     {
         service.AddStreamHandler("ChatSessionRequest",
                                  new GenericStreamHandler("POST", service.CreateCAPS("ChatSessionRequest", ""), ChatSessionRequest));
     }
 }
コード例 #39
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            // retrieve our god's if needed
            InitGodNames();

            m_service.AddStreamHandler("SimulatorFeatures",
                                       new GenericStreamHandler("GET", m_service.CreateCAPS("SimulatorFeatures", ""), SimulatorFeaturesCAP));
        }
コード例 #40
0
        public void RegisterCaps (IRegionClientCapsService service)
        {
            m_service = service;

            // retrieve our god's if needed
            InitGodNames ();

            m_service.AddStreamHandler ("SimulatorFeatures",
                new GenericStreamHandler ("GET", m_service.CreateCAPS ("SimulatorFeatures", ""), SimulatorFeaturesCAP));
        }
コード例 #41
0
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service   = service;
     m_imService = service.Registry.RequestModuleInterface <IInstantMessagingService>();
     if (m_imService != null)
     {
         service.AddStreamHandler("ChatSessionRequest",
                                  new GenericStreamHandler("POST", service.CreateCAPS("ChatSessionRequest", ""), ChatSessionRequest));
     }
 }
コード例 #42
0
        private void OnRegisterCaps(UUID agentID, IRegionClientCapsService caps)
        {
            UUID capuuid = UUID.Random();

            caps.AddStreamHandler("SendUserReportWithScreenshot",
                                  new RestHTTPHandler("POST", "/CAPS/" + capuuid + "/",
                                                      delegate(Hashtable m_dhttpMethod)
            {
                return(ProcessSendUserReportWithScreenshot(m_dhttpMethod, capuuid, agentID));
            }));
        }
コード例 #43
0
ファイル: MapCAPS.cs プロジェクト: JAllard/Aurora-Sim
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;
            m_gridService = service.Registry.RequestModuleInterface<IGridService>();
            IConfig config =
                service.ClientCaps.Registry.RequestModuleInterface<ISimulationBase>().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(request.ReadUntilEnd(), httpRequest, httpResponse, m_service.AgentID);
            };
            m_service.AddStreamHandler("MapLayer",
                                       new GenericStreamHandler("POST", m_service.CreateCAPS("MapLayer", ""),
                                                             method));
            m_service.AddStreamHandler("MapLayerGod",
                                       new GenericStreamHandler("POST", m_service.CreateCAPS("MapLayerGod", ""),
                                                             method));
        }
コード例 #44
0
ファイル: MapCAPS.cs プロジェクト: mugginsm/Aurora-Sim
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;
            m_gridService = service.Registry.RequestModuleInterface<IGridService>();

            RestMethod method = delegate(string request, string path, string param,
                                                                OSHttpRequest httpRequest, OSHttpResponse httpResponse)
            {
                return MapLayerRequest(request, path, param, httpRequest, httpResponse, m_service.AgentID);
            };
            m_service.AddStreamHandler("MapLayer", new RestStreamHandler("POST", m_service.CreateCAPS("MapLayer", m_mapLayerPath),
                                                      method));
        }
コード例 #45
0
ファイル: SetHomeModule.cs プロジェクト: mugginsm/Aurora-Sim
        public void RegisterCaps(UUID agentID, IRegionClientCapsService caps)
        {
            UUID capuuid = UUID.Random();

            caps.AddStreamHandler("ServerReleaseNotes",
                                new RestHTTPHandler("POST", "/CAPS/ServerReleaseNotes/" + capuuid + "/",
                                                      delegate(Hashtable m_dhttpMethod)
                                                      {
                                                          return ProcessServerReleaseNotes(m_dhttpMethod, agentID, capuuid);
                                                      }));

            caps.AddStreamHandler("CopyInventoryFromNotecard",
                                new RestHTTPHandler("POST", "/CAPS/" + capuuid + "/",
                                                      delegate(Hashtable m_dhttpMethod)
                                                      {
                                                          return CopyInventoryFromNotecard(m_dhttpMethod, capuuid, agentID);
                                                      }));
        }
コード例 #46
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            const string capsBase = "/CAPS/EQG/";

            m_capsPath = capsBase + UUID.Random() + "/";

            // Register this as a caps handler
            m_service.AddStreamHandler("EventQueueGet",
                                       new GenericStreamHandler("POST", m_capsPath, (path, request, httpRequest, httpResponse) => new byte [0]));

            MainServer.Instance.AddPollServiceHTTPHandler(
                m_capsPath, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, m_service.AgentID));

            Random rnd = new Random(Environment.TickCount);

            m_ids = rnd.Next(30000000);
        }
コード例 #47
0
 void OnRegisterCaps(UUID agentID, IRegionClientCapsService caps)
 {
     string capsBase = "/CAPS/" + UUID.Random();
     caps.AddStreamHandler("GroupProposalBallot",
                         new RestStreamHandler("POST", capsBase + "/",
                                               delegate(string request, string path, string param,
                                                         OSHttpRequest httpRequest, OSHttpResponse httpResponse)
                                               {
                                                   return GroupProposalBallot(request, agentID);
                                               }));
     capsBase = "/CAPS/" + UUID.Random();
     caps.AddStreamHandler("StartGroupProposal",
                         new RestStreamHandler("POST", capsBase + "/",
                                               delegate(string request, string path, string param,
                                                         OSHttpRequest httpRequest, OSHttpResponse httpResponse)
                                               {
                                                   return StartGroupProposal(request, agentID);
                                               }));
 }
コード例 #48
0
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            string capsBase = "/CAPS/EQG/";
            m_capsPath = capsBase + UUID.Random() + "/";

            // Register this as a caps handler
            m_service.AddStreamHandler("EventQueueGet", new GenericStreamHandler("POST", m_capsPath,
                                                                                 delegate(string path,
                                                                                          System.IO.Stream request,
                                                                                          OSHttpRequest httpRequest,
                                                                                          OSHttpResponse httpResponse)
                                                                                     { return new byte[0]; }));

            MainServer.Instance.AddPollServiceHTTPHandler(
                m_capsPath, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, m_service.AgentID));

            Random rnd = new Random(Environment.TickCount);
            m_ids = rnd.Next(30000000);
        }
コード例 #49
0
 private void EventManagerOnRegisterCaps(UUID agentID, IRegionClientCapsService caps)
 {
     string capsBase = "/CAPS/" + UUID.Random();
     caps.AddStreamHandler("RemoteParcelRequest",
                          new RestStreamHandler("POST", capsBase + remoteParcelRequestPath,
                                                delegate(string request, string path, string param,
                                                         OSHttpRequest httpRequest, OSHttpResponse httpResponse)
                                                {
                                                    return RemoteParcelRequest(request, path, param, agentID, caps);
                                                }));
     UUID parcelCapID = UUID.Random();
     caps.AddStreamHandler("ParcelPropertiesUpdate",
                          new RestStreamHandler("POST", "/CAPS/" + parcelCapID,
                                                delegate(string request, string path, string param,
                                                         OSHttpRequest httpRequest, OSHttpResponse httpResponse)
                                                {
                                                    return ProcessPropertiesUpdate(request, path, param, agentID, caps);
                                                }));
 }
コード例 #50
0
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service = service;
     m_service.AddStreamHandler("RetrieveNavMeshSrc",
                                new GenericStreamHandler("GET", m_service.CreateCAPS("RetrieveNavMeshSrc", ""), RetrieveNavMeshSrcCAP));
 }
コード例 #51
0
ファイル: MoapModule.cs プロジェクト: mugginsm/Aurora-Sim
        public void OnRegisterCaps(UUID agentID, IRegionClientCapsService caps)
        {
//            m_log.DebugFormat(
//                "[MOAP]: Registering ObjectMedia and ObjectMediaNavigate capabilities for agent {0}", agentID);
            
            string omCapUrl = "/CAPS/" + UUID.Random();
            
            lock (m_omCapUsers)
            {
                m_omCapUsers[omCapUrl] = agentID;
                m_omCapUrls[agentID] = omCapUrl;
                
                // Even though we're registering for POST we're going to get GETS and UPDATES too
                caps.AddStreamHandler(
                    "ObjectMedia", new RestStreamHandler("POST", omCapUrl, HandleObjectMediaMessage));
            }
            
            string omuCapUrl = "/CAPS/" + UUID.Random();
            
            lock (m_omuCapUsers)
            {
                m_omuCapUsers[omuCapUrl] = agentID;
                m_omuCapUrls[agentID] = omuCapUrl;
                
                // Even though we're registering for POST we're going to get GETS and UPDATES too
                caps.AddStreamHandler(
                    "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage));
            }
        }
コード例 #52
0
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service = service;
     m_service.AddStreamHandler("ProductInfoRequest",
                                new GenericStreamHandler("GET", m_service.CreateCAPS("ProductInfoRequest", ""), ProductInfoRequestCAP));
 }
コード例 #53
0
ファイル: VivoxVoiceCaps.cs プロジェクト: keverw/Aurora-Sim
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;
            m_voiceModule = service.Registry.RequestModuleInterface<IVoiceService>();

            if (m_voiceModule != null)
            {
                service.AddStreamHandler("ProvisionVoiceAccountRequest",
                                         new GenericStreamHandler("POST",
                                                                  service.CreateCAPS("ProvisionVoiceAccountRequest", ""),
                                                                  ProvisionVoiceAccountRequest));
                service.AddStreamHandler("ParcelVoiceInfoRequest",
                                         new GenericStreamHandler("POST",
                                                                  service.CreateCAPS("ParcelVoiceInfoRequest", ""),
                                                                  ParcelVoiceInfoRequest));
            }
        }
コード例 #54
0
        private void OnRegisterCaps(UUID agentID, IRegionClientCapsService caps)
        {
            UUID capuuid = UUID.Random();

            caps.AddStreamHandler("SendUserReportWithScreenshot",
                                new RestHTTPHandler("POST", "/CAPS/" + capuuid + "/",
                                                      delegate(Hashtable m_dhttpMethod)
                                                      {
                                                          return ProcessSendUserReportWithScreenshot(m_dhttpMethod, capuuid, agentID);
                                                      }));

            
        }
コード例 #55
0
        public void RegisterCaps(UUID agentID, IRegionClientCapsService caps)
        {
            UUID capID = UUID.Random();

            //m_log.Info("[GETMESH]: /CAPS/" + capID);
            caps.AddStreamHandler("GetMesh",
                                 new RestHTTPHandler("GET", "/CAPS/" + capID,
                                                       delegate(Hashtable m_dhttpMethod)
                                                       {
                                                           return ProcessGetMesh(m_dhttpMethod, agentID, caps);
                                                       }));
         
        }
コード例 #56
0
ファイル: EventQueueService.cs プロジェクト: Gnu32/Silverfin
        public void RegisterCaps(IRegionClientCapsService service)
        {
            m_service = service;

            string capsBase = "/CAPS/EQG/";
            m_capsPath = capsBase + UUID.Random() + "/";


            // Register this as a caps handler
#if (!ISWIN)
            IRequestHandler rhandler = new RestHTTPHandler("POST", m_capsPath,
                                                           delegate(Hashtable m_dhttpMethod)
                                                           {
                                                               return ProcessQueue(m_dhttpMethod, service.AgentID);
                                                           });
#else
            IRequestHandler rhandler = new RestHTTPHandler("POST", m_capsPath,
                                                           m_dhttpMethod => ProcessQueue(m_dhttpMethod, service.AgentID));
#endif
            m_service.AddStreamHandler("EventQueueGet", rhandler);

            // This will persist this beyond the expiry of the caps handlers
            MainServer.Instance.AddPollServiceHTTPHandler(
                m_capsPath, EventQueuePoll,
                new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, service.AgentID));

            Random rnd = new Random(Environment.TickCount);
            m_ids = rnd.Next(30000000);
        }
コード例 #57
0
        public void RegisterCaps(UUID agentID, IRegionClientCapsService caps)
        {
            UUID capuuid = UUID.Random();

            caps.AddStreamHandler("ViewerStartAuction",
                                new RestHTTPHandler("POST", "/CAPS/" + capuuid + "/",
                                                      delegate(Hashtable m_dhttpMethod)
                                                      {
                                                          return ViewerStartAuction(m_dhttpMethod, capuuid);
                                                      }));
        }