From 037e7cc02b66a54d5dec19a6b93a7bf107a95a0e Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 28 3月 2020 22:29:12 +0800
Subject: [PATCH] documentation update (win32) and others

---
 src/library/LicenseReader.hpp |   71 ++++++++++++-----------------------
 1 files changed, 24 insertions(+), 47 deletions(-)

diff --git a/src/library/LicenseReader.hpp b/src/library/LicenseReader.hpp
index c42be92..854a0d6 100644
--- a/src/library/LicenseReader.hpp
+++ b/src/library/LicenseReader.hpp
@@ -2,57 +2,34 @@
  * LicenseReader.h
  *
  *  Created on: Mar 30, 2014
- *      
+ *
  */
 
 #ifndef LICENSEREADER_H_
 #define LICENSEREADER_H_
-
-#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>
 #include <ctime>
-namespace license {
 
-using namespace std;
+#define SI_SUPPORT_IOSTREAMS
+#include <licensecc/datatypes.h>
+
+#include "base/EventRegistry.h"
+#include "os/os.h"
+#include "ini/SimpleIni.h"
+
+namespace license {
 
 class FullLicenseInfo {
 public:
-	string source;
-	string product;
-	string license_signature;
-	int license_version;
-	string from_date;
-	string to_date;
-	bool has_expiry;
-	unsigned int from_sw_version;
-	unsigned int to_sw_version;
-	bool has_versions;
-	string client_signature;
-	bool has_client_sig;
-	string extra_data;
+	const std::string license_signature;
+	const std::string source;
+	const std::string m_project;
+	unsigned int m_magic;
+	std::map<std::string, std::string> m_limits;
 
-	static const char* UNUSED_TIME;
-	static const unsigned int UNUSED_SOFTWARE_VERSION = 0;
-
-	FullLicenseInfo(const string& source, const string& product,
-			const string& license_signature, int licenseVersion,
-			string from_date = UNUSED_TIME,
-			string to_date = UNUSED_TIME, //
-			const string& client_signature = "", //
-			unsigned int from_sw_version = UNUSED_SOFTWARE_VERSION,
-			unsigned int to_sw_version = UNUSED_SOFTWARE_VERSION,
-			const string& extra_data = "");
-	string printForSign() const;
-	void printAsIni(ostream & a_ostream) const;
-	void toLicenseInfo(LicenseInfo* license) const;
-	EventRegistry validate(int sw_version);
-	time_t expires_on() const;
-	time_t valid_from() const;
+	FullLicenseInfo(const std::string& source, const std::string& product, const std::string& license_signature);
+	std::string printForSign() const;
+	operator LicenseInfo() const;
 };
 
 /**
@@ -67,20 +44,20 @@
  *  sw_version_to = (optional int)
  *  from_date = YYYY-MM-DD (optional)
  *  to_date  = YYYY-MM-DD (optional)
- *  client_signature = XXXXXXXX (optional string 16)
+ *  client_signature = XXXXXXXX (optional std::string 16)
  *  license_signature = XXXXXXXXXX (mandatory, 1024)
- *  application_data = xxxxxxxxx (optional string 16)
+ *  application_data = xxxxxxxxx (optional std::string 16)
  *	license_version = 100 (mandatory int)
  *  </pre>
  */
 class LicenseReader {
 private:
-	const LicenseLocation licenseLocation;
+	const LicenseLocation* licenseLocation;
+
 public:
-	LicenseReader(const LicenseLocation& licenseLocation);
-	EventRegistry readLicenses(const string &product,
-			vector<FullLicenseInfo>& licenseInfoOut);
+	LicenseReader(const LicenseLocation* licenseLocation);
+	EventRegistry readLicenses(const std::string& product, std::vector<FullLicenseInfo>& licenseInfoOut) const;
 	virtual ~LicenseReader();
 };
-}
+}  // namespace license
 #endif /* LICENSEREADER_H_ */

--
Gitblit v1.9.1