예제 #1
0
파일: tsdb.cs 프로젝트: emm274/fcObj
        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);
            }
        }
예제 #2
0
파일: tsdb.cs 프로젝트: emm274/fcObj
        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;
        }