From dda16735b94661b798d6c0fd3e41af944de0a1fe Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周日, 13 10月 2019 15:02:19 +0800 Subject: [PATCH] refactoring - locators --- src/library/LicenseReader.hpp | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/library/LicenseReader.h b/src/library/LicenseReader.hpp similarity index 84% rename from src/library/LicenseReader.h rename to src/library/LicenseReader.hpp index 0d70f2f..c42be92 100644 --- a/src/library/LicenseReader.h +++ b/src/library/LicenseReader.hpp @@ -11,6 +11,7 @@ #include "api/datatypes.h" #include "base/EventRegistry.h" #include "os/os.h" +#include "locate/LocatorStrategy.hpp" #define SI_SUPPORT_IOSTREAMS #include "ini/SimpleIni.h" #include <string> @@ -53,6 +54,7 @@ time_t expires_on() const; time_t valid_from() const; }; + /** * This class it is responsible to read the licenses from the disk * (in future from network) examining all the possible LicenseLocation @@ -74,14 +76,6 @@ class LicenseReader { private: const LicenseLocation licenseLocation; - EventRegistry getLicenseDiskFiles(vector<string>& diskFiles); - vector<string> filterExistingFiles(vector<string> licensePositions); - vector<string> splitLicensePositions(string licensePositions); - bool findLicenseWithExplicitLocation(vector<string>& diskFiles, - EventRegistry& eventRegistry); - bool findFileWithEnvironmentVariable(vector<string>& diskFiles, - EventRegistry& eventRegistry); - public: LicenseReader(const LicenseLocation& licenseLocation); EventRegistry readLicenses(const string &product, -- Gitblit v1.9.1