demo license checker

This commit is contained in:
2018-07-18 01:30:39 +02:00
parent fa4063eeb5
commit 9b1ced76c2
4 changed files with 28 additions and 0 deletions

View File

@@ -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;