demo license checker
This commit is contained in:
@@ -127,6 +127,22 @@ void App::download(std::string filename, std::function<void(float)> progress)
|
||||
}
|
||||
}
|
||||
|
||||
bool App::check_license()
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if (curl)
|
||||
{
|
||||
std::string url = "http://omigamedev.com/panopainter/79516B99-8E67-40AD-B12F-149A5A9C2E15";
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
|
||||
auto err = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
if (err == CURLcode::CURLE_OK)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void App::upload(std::string filename, std::string name, std::function<void(float)> progress)
|
||||
{
|
||||
CURL *curl;
|
||||
|
||||
Reference in New Issue
Block a user