void xmap_put(string what, string path, tquery query, tnotify notify) { xmap.Ixmap_auto map = new xmap_auto(); string response = Path.GetDirectoryName(path) + "\\response"; if (File.Exists(response)) File.Delete(response); int rc; map.HttpPut(Host + "/" + what, Login, Password, "application/json", path, response, out rc); if (rc == 1) if (File.Exists(response)) using (StreamReader reader = new StreamReader(response)) { fquery = query; Parse(reader); request_notify(notify); } }
bool xmap_download(string what, string path) { fdata = path; Progress progress = new Progress(fProgress); xmap.Ixmap_auto map = new xmap_auto(); int rc; map.HttpDownload(Host + "/" + what, Login, Password, "application/json", path, progress, out rc); if (rc == 1) { DownloadCompletedCallback(null, null); return true; } return false; }