Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f5a4900e0 | ||
|
|
d8f882a277 | ||
|
|
bdaceba2e0 | ||
|
|
b5eb0efd31 |
@@ -48,7 +48,7 @@ namespace gourou
|
||||
const unsigned char* getDeviceKey();
|
||||
|
||||
/**
|
||||
* @brief Get one value of device.xml (deviceClass, deviceSerial, deviceName, deviceType, jobbes, clientOS, clientLocale)
|
||||
* @brief Get one value of device.xml (deviceClass, deviceSerial, deviceName, deviceType, hobbes, clientOS, clientLocale)
|
||||
*/
|
||||
std::string getProperty(const std::string& property, const std::string& _default=std::string(""));
|
||||
std::string operator[](const std::string& property);
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#define ACS_SERVER "http://adeactivate.adobe.com/adept"
|
||||
#endif
|
||||
|
||||
#define LIBGOUROU_VERSION "0.3"
|
||||
#define LIBGOUROU_VERSION "0.3.2"
|
||||
|
||||
namespace gourou
|
||||
{
|
||||
|
||||
@@ -109,7 +109,6 @@ namespace gourou
|
||||
CLIENT_ZIP_ERROR,
|
||||
CLIENT_GENERIC_EXCEPTION,
|
||||
CLIENT_NETWORK_ERROR,
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -291,7 +291,7 @@ namespace gourou
|
||||
appendTextElem(root, "adept:nonce", nonce.toBase64().data());
|
||||
|
||||
time_t _time = time(0) + 10*60; // Cur time + 10 minutes
|
||||
struct tm* tm_info = localtime(&_time);
|
||||
struct tm* tm_info = gmtime(&_time);
|
||||
char buffer[32];
|
||||
|
||||
strftime(buffer, sizeof(buffer), "%Y-%m-%dT%H:%M:%SZ", tm_info);
|
||||
@@ -460,7 +460,7 @@ namespace gourou
|
||||
|
||||
pugi::xml_document acsmDoc;
|
||||
|
||||
if (!acsmDoc.load_file(ACSMFile.c_str(), pugi::parse_ws_pcdata_single|pugi::parse_escapes))
|
||||
if (!acsmDoc.load_file(ACSMFile.c_str(), pugi::parse_ws_pcdata_single|pugi::parse_escapes, pugi::encoding_utf8))
|
||||
EXCEPTION(FF_INVALID_ACSM_FILE, "Invalid ACSM file " << ACSMFile);
|
||||
|
||||
GOUROU_LOG(INFO, "Fulfill " << ACSMFile);
|
||||
|
||||
@@ -66,6 +66,7 @@ public:
|
||||
|
||||
void run()
|
||||
{
|
||||
int ret = 0;
|
||||
try
|
||||
{
|
||||
DRMProcessorClientImpl client;
|
||||
@@ -99,10 +100,10 @@ public:
|
||||
} catch(std::exception& e)
|
||||
{
|
||||
std::cout << e.what() << std::endl;
|
||||
this->app->exit(1);
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
this->app->exit(0);
|
||||
this->app->exit(ret);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -100,10 +100,10 @@ static std::string getpass(const char *prompt, bool show_asterisk=false)
|
||||
}
|
||||
|
||||
|
||||
class Activate: public QRunnable
|
||||
class ADEPTActivate: public QRunnable
|
||||
{
|
||||
public:
|
||||
Activate(QCoreApplication* app):
|
||||
ADEPTActivate(QCoreApplication* app):
|
||||
app(app)
|
||||
{
|
||||
setAutoDelete(false);
|
||||
@@ -111,6 +111,7 @@ public:
|
||||
|
||||
void run()
|
||||
{
|
||||
int ret = 0;
|
||||
try
|
||||
{
|
||||
DRMProcessorClientImpl client;
|
||||
@@ -124,10 +125,10 @@ public:
|
||||
} catch(std::exception& e)
|
||||
{
|
||||
std::cout << e.what() << std::endl;
|
||||
this->app->exit(1);
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
this->app->exit(0);
|
||||
this->app->exit(ret);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -262,7 +263,7 @@ int main(int argc, char** argv)
|
||||
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
Activate activate(&app);
|
||||
ADEPTActivate activate(&app);
|
||||
QThreadPool::globalInstance()->start(&activate);
|
||||
|
||||
ret = app.exec();
|
||||
|
||||
@@ -119,7 +119,7 @@ std::string DRMProcessorClientImpl::sendHTTPRequest(const std::string& URL, cons
|
||||
}
|
||||
|
||||
if (reply->error() != QNetworkReply::NoError)
|
||||
EXCEPTION(gourou::CLIENT_NETWORK_ERROR, "Error " << reply->error());
|
||||
EXCEPTION(gourou::CLIENT_NETWORK_ERROR, "Error " << reply->errorString().toStdString());
|
||||
|
||||
if (gourou::logLevel >= gourou::DEBUG)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user