private WebDAVClient getClient() { WebDAVClient wdc = new WebDAVClient(); wdc.Server = TESTSERVER; wdc.User = TESTUSER; wdc.Pass = TESTPASSWORD; wdc.BasePath = TESTPATH; return wdc; }
/// <summary> /// /// </summary> /// <param name="server">path to the server, like "http://privatenotes.dyndns-server.com"</param> /// <param name="path">path, starting fromt he server root-url, like "/webdav2/username/"</param> /// <param name="user">username for login</param> /// <param name="pass">pw for login</param> /// <param name="checkSSlCertificates">if true, an ssl certificate (if https is used) will be checked, /// if false, the ssl check will be ommited (has to be used for self-signed certificates etc)</param> public WebDAVInterface(String server, String path, String user, String pass, bool checkSSlCertificates) { //Logger.Debug("creating server " + server + " path " + path + " user " + user + " pass " + pass); client = new WebDAVClient(); client.Server = server; client.BasePath = path; client.User = user; client.Pass = pass; client.SSLCertVerification = checkSSlCertificates; autoReset = new AutoResetEvent(false); autoReset.Reset(); client.ListComplete += list; client.DownloadComplete += download; client.UploadComplete += upload; client.DeleteComplete += delete; }