MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / TLEDownloaderTask

Method TLEDownloaderTask

Tasks/TLEDownloaderTask.cpp:65–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65TLEDownloaderTask::TLEDownloaderTask(
66 QString url,
67 QObject *parent) : Suscan::CancellableTask(parent)
68{
69 this->multi = curl_multi_init();
70 this->curl = curl_easy_init();
71
72 if (this->curl != nullptr && this->multi) {
73 // curl_easy_setopt(curl, CURLOPT_PROXY, proxy);
74
75 curl_easy_setopt(this->curl, CURLOPT_USERAGENT, "SigDigger TLE Downloader/curl");
76 curl_easy_setopt(this->curl, CURLOPT_CONNECTTIMEOUT, 10);
77 curl_easy_setopt(this->curl, CURLOPT_URL, url.toStdString().c_str());
78 curl_easy_setopt(this->curl, CURLOPT_NOPROGRESS, 0);
79 curl_easy_setopt(this->curl, CURLOPT_PROGRESSFUNCTION, TLEDownloaderTask::curl_progress);
80 curl_easy_setopt(this->curl, CURLOPT_PROGRESSDATA, this);
81 curl_easy_setopt(this->curl, CURLOPT_WRITEFUNCTION, TLEDownloaderTask::curl_save_data);
82 curl_easy_setopt(this->curl, CURLOPT_WRITEDATA, this);
83 }
84
85 curl_multi_add_handle(this->multi, this->curl);
86
87 this->setProgress(0);
88 this->setStatus("Performing request...");
89
90 this->ok = true;
91}
92
93void
94TLEDownloaderTask::extractTLEs(void)

Callers

nothing calls this directly

Calls 2

setStatusMethod · 0.80
setProgressMethod · 0.45

Tested by

no test coverage detected