gcontini
2020-12-05 907a46213e5ca3e741744f67ad71966b70b89e38
src/library/base/EventRegistry.cpp
@@ -10,6 +10,7 @@
#include <algorithm>
#include <map>
#include <iostream>
#include <sstream>
#include "EventRegistry.h"
#define LIC_ID_NOT_DEFINED "UNDEF"
@@ -17,7 +18,7 @@
namespace license {
using namespace std;
const map<EVENT_TYPE, int> PROGRESS_BY_EVENT_TYPE = {
const map<LCC_EVENT_TYPE, int> PROGRESS_BY_EVENT_TYPE = {
   {LICENSE_SPECIFIED, 0}, {LICENSE_FOUND, 1}, {PRODUCT_FOUND, 2}, {SIGNATURE_VERIFIED, 3}, {LICENSE_OK, 4}};
EventRegistry::EventRegistry() { current_validation_step = -1; }
@@ -39,6 +40,12 @@
   }
   out << "]";
   return out;
}
string EventRegistry::to_string() const {
   std::stringstream ss;
   ss << this;
   return ss.str();
}
void EventRegistry::append(const EventRegistry &eventRegistry) {
@@ -73,11 +80,11 @@
   return result;
}
void EventRegistry::addEvent(EVENT_TYPE event, const std::string &licenseLocationId) {
void EventRegistry::addEvent(LCC_EVENT_TYPE event, const std::string &licenseLocationId) {
   addEvent(event, licenseLocationId.c_str(), nullptr);
}
void EventRegistry::addEvent(EVENT_TYPE event, const char *licenseLocationId, const char *info) {
void EventRegistry::addEvent(LCC_EVENT_TYPE event, const char *licenseLocationId, const char *info) {
   AuditEvent audit;
   auto eventIterator = PROGRESS_BY_EVENT_TYPE.find(event);
   bool successEvent = (eventIterator != PROGRESS_BY_EVENT_TYPE.end());