From 91dda1bb3c6b41d1aa142affed77758e6022d92c Mon Sep 17 00:00:00 2001
From: Maximilien Siavelis <maximilien.siavelis@simulease.com>
Date: 周日, 07 1月 2018 20:01:32 +0800
Subject: [PATCH] fix header consistency

---
 src/library/LicenseReader.h |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/library/LicenseReader.h b/src/library/LicenseReader.h
index bcc6022..0d70f2f 100644
--- a/src/library/LicenseReader.h
+++ b/src/library/LicenseReader.h
@@ -2,7 +2,7 @@
  * LicenseReader.h
  *
  *  Created on: Mar 30, 2014
- *      Author: devel
+ *      
  */
 
 #ifndef LICENSEREADER_H_
@@ -10,7 +10,7 @@
 
 #include "api/datatypes.h"
 #include "base/EventRegistry.h"
-#include "os/os.hpp"
+#include "os/os.h"
 #define SI_SUPPORT_IOSTREAMS
 #include "ini/SimpleIni.h"
 #include <string>
@@ -25,8 +25,8 @@
 	string product;
 	string license_signature;
 	int license_version;
-	time_t from_date;
-	time_t to_date;
+	string from_date;
+	string to_date;
 	bool has_expiry;
 	unsigned int from_sw_version;
 	unsigned int to_sw_version;
@@ -35,22 +35,23 @@
 	bool has_client_sig;
 	string extra_data;
 
-	static const time_t UNUSED_TIME = (time_t) 0;
+	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,
-			time_t from_date = UNUSED_TIME,
-			time_t to_date = UNUSED_TIME, //
+			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;
 };
 /**
  * This class it is responsible to read the licenses from the disk
@@ -72,8 +73,6 @@
  */
 class LicenseReader {
 private:
-	time_t read_date(const char * productName, const char * ini_key,
-			const CSimpleIniA& ini) const;
 	const LicenseLocation licenseLocation;
 	EventRegistry getLicenseDiskFiles(vector<string>& diskFiles);
 	vector<string> filterExistingFiles(vector<string> licensePositions);

--
Gitblit v1.9.1