示例#1
0
 public void Start(WebDAVListener server, string path)
 {
     this.server = server;
     server.HttpServer.AddHandler("DELETE", null, path, DeleteHandler);
 }
示例#2
0
        public bool Start(System.Net.IPAddress ip, int port)
        {
            try
            {
                m_listener = HttpListener.Create(httpserverlog, ip, port);
                m_webdav = new WebDAVListener(m_listener, @"^/inventory/");
                m_webdav.Authentication = AuthenticationType.None;
                m_listener.Start(10);
            }
            catch (Exception e)
            {
                m_log.ErrorFormat("[WORLDINVENTORY]: Failed to start WebDAV listener on port {0}. Threw excpetion {1}", port, e.ToString());
                return false;
            }

            string webdavPropertyStrgConnectionString = String.Empty;
            IConfig config = m_configs.Configs["realXtend"];
            if (config != null)
            {
                webdavPropertyStrgConnectionString = config.GetString("WebDAVProperyStorageConnectionString");
                m_giveFolderContentOnGet = config.GetBoolean("WorldInventoryGetFolderContent", false);
                m_autoconvertJpgToJ2k = config.GetBoolean("WorldInventoryAutoConvertJpegToJ2K", false);
            }

            if (webdavPropertyStrgConnectionString == null || webdavPropertyStrgConnectionString == String.Empty)
                return false;

            m_assetFolderStrg = new NHibernateAssetsFolder();
            m_propertyMngr = new NHibernateIWebDAVResource();
            m_propertyMngr.Initialise(webdavPropertyStrgConnectionString);
            m_assetFolderStrg.Initialise(webdavPropertyStrgConnectionString);
            AddRootFolders();

            m_webdav.OnPropFind += PropFindHandler;
            m_webdav.OnGet += GetHandler;
            m_webdav.OnPut += PutHandler;
            m_webdav.OnNewCol += MkcolHandler;
            m_webdav.OnMove += MoveHandler;
            m_webdav.OnDelete += DeleteHandler;

            return true;
        }
示例#3
0
 public void Start(WebDAVListener server, string path)
 {
     this.server = server;
     server.HttpServer.AddHandler("MOVE", null, path, MoveHandler);
 }
示例#4
0
        public void Start(WebDAVListener server, string path)
        {
            this.server = server;

            server.HttpServer.AddHandler("OPTIONS", null, path, OptionsHandler);
        }
示例#5
0
        public void Start(WebDAVListener server, string path)
        {
            this.server = server;

            server.HttpServer.AddHandler("PROPFIND", null, path, PropFindHandler);
        }
示例#6
0
        public void Start(WebDAVListener server, string path)
        {
            this.server = server;

            server.HttpServer.AddHandler("UNLOCK", null, path, UnlockHandler);
        }
示例#7
0
 public void Start(WebDAVListener server, string path)
 {
     this.server = server;
     server.HttpServer.AddHandler("COPY", null, path, CopyHandler);
 }
示例#8
0
        public void Start(WebDAVListener server, string path)
        {
            this.server = server;

            server.HttpServer.AddHandler("PROPPATCH", null, path, PropPatchHandler);
        }