From 1b856a425a59b1b1e8b5f9694553cc1006cefc00 Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 14:27:51 +1100 Subject: [PATCH 01/13] license explained --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index ece35e5..116c4a7 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,29 @@ CLI tool provide ability to generate new licenses and validate existing license. ./license-manager --validate license.file [--signature ] ``` +### License Format +Licenses generated using License++ are base64 encoded JSON. They look like as follows: + +``` +{ + "authority_signature":"632DBBF8BC35A2CAA8CBC2952615839F86A40965A00D6F7420BEFF3DA1D35B9E360B5781D326AD6853991BB31452290FF3415C788255B33D391373A4AA9590E0849C8649FCFC98A6DC827DE2CE61AF15DE21E62E069CE1DB20C72352E6C15A825C0A8140CE42FE7B56C1A53981B3598EEE3AD4EDDD07461269AFC2C8B25B4BDD0C7E6A92986E2F0EAEC5E7C4C673C47AB25B3EE46EF0F3B9C8120865B63E68A505DBC2E85F0646BDF3FD082CA62BB647A0BEFF34E0C7CCE40BD84EABFEA7D902A26D33ADA01F75E7291EC35472B4ED328E0E3AE654E85AAEAEB3FFC9E5A7DE4CB08C9ADAC803367DC2845821E0C310BA26EA26DB3196A65445528AABF45888F6", + "expiry_date":1528386596, + "issue_date":1515426596, + "issuing_authority":"sample-license-authority", + "licensee":"john-citizen", + "licensee_signature":"61663531383163626334303566613461363362343232316632663764393638383A35574F4F4C466B532F7A4F79376446364F6155776C673D3D0D0A0D0A" +} +``` + +### Format Explained + + * `authority_signature` - Signature of the authority which prevents alteration in the license + * `expiry_date` - License expiry date epoch + * `issue_date` - License issue date epoch + * `issuing_authority` - ID of issuing authority as per key register + * `licensee` - Name of the license holder + * `licensee_signature` - If licensee signed this license this is encrypted against key provided in key register. All the licenses signed by licensee will be validated against it at validation time. + ## License ``` Copyright (c) 2018-present Muflihun Labs From a4eafbf316f66617afa0c350b8cde7b322912c83 Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 14:28:29 +1100 Subject: [PATCH 02/13] find gtest cmake module --- cmake/Findgtest.cmake | 159 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 cmake/Findgtest.cmake diff --git a/cmake/Findgtest.cmake b/cmake/Findgtest.cmake new file mode 100644 index 0000000..cd443f4 --- /dev/null +++ b/cmake/Findgtest.cmake @@ -0,0 +1,159 @@ +# Locate the Google C++ Testing Framework. +# +# Defines the following variables: +# +# GTEST_FOUND - Found the Google Testing framework +# GTEST_INCLUDE_DIRS - Include directories +# +# Also defines the library variables below as normal +# variables. These contain debug/optimized keywords when +# a debugging library is found. +# +# GTEST_BOTH_LIBRARIES - Both libgtest & libgtest-main +# GTEST_LIBRARIES - libgtest +# GTEST_MAIN_LIBRARIES - libgtest-main +# +# Accepts the following variables as input: +# +# GTEST_ROOT - (as a CMake or environment variable) +# The root directory of the gtest install prefix +# +# GTEST_MSVC_SEARCH - If compiling with MSVC, this variable can be set to +# "MD" or "MT" to enable searching a GTest build tree +# (defaults: "MD") +# +#----------------------- +# Example Usage: +# +# enable_testing() +# find_package(GTest REQUIRED) +# include_directories(${GTEST_INCLUDE_DIRS}) +# +# add_executable(foo foo.cc) +# target_link_libraries(foo ${GTEST_BOTH_LIBRARIES}) +# +# add_test(AllTestsInFoo foo) +# +#----------------------- +# +# If you would like each Google test to show up in CTest as +# a test you may use the following macro. +# NOTE: It will slow down your tests by running an executable +# for each test and test fixture. You will also have to rerun +# CMake after adding or removing tests or test fixtures. +# +# GTEST_ADD_TESTS(executable extra_args ARGN) +# executable = The path to the test executable +# extra_args = Pass a list of extra arguments to be passed to +# executable enclosed in quotes (or "" for none) +# ARGN = A list of source files to search for tests & test +# fixtures. +# +# Example: +# set(FooTestArgs --foo 1 --bar 2) +# add_executable(FooTest FooUnitTest.cc) +# GTEST_ADD_TESTS(FooTest "${FooTestArgs}" FooUnitTest.cc) + +#============================================================================= +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Philip Lowman +# Copyright 2009 Daniel Blezek +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) +# +# Thanks to Daniel Blezek for the GTEST_ADD_TESTS code + +function(GTEST_ADD_TESTS executable extra_args) + if(NOT ARGN) + message(FATAL_ERROR "Missing ARGN: Read the documentation for GTEST_ADD_TESTS") + endif() + foreach(source ${ARGN}) + file(READ "${source}" contents) + string(REGEX MATCHALL "TEST_?F?\\(([A-Za-z_0-9 ,]+)\\)" found_tests ${contents}) + foreach(hit ${found_tests}) + string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+), *([A-Za-z_0-9]+) *\\).*" "\\1.\\2" test_name ${hit}) + add_test(${test_name} ${executable} --gtest_filter=${test_name} ${extra_args}) + list(APPEND _test_names ${test_name}) + endforeach() + endforeach() + set(GTEST_ADD_TEST_NAMES ${_test_names} PARENT_SCOPE) +endfunction() + +function(_gtest_append_debugs _endvar _library) + if(${_library} AND ${_library}_DEBUG) + set(_output optimized ${${_library}} debug ${${_library}_DEBUG}) + else() + set(_output ${${_library}}) + endif() + set(${_endvar} ${_output} PARENT_SCOPE) +endfunction() + +function(_gtest_find_library _name) + find_library(${_name} + NAMES ${ARGN} + HINTS + $ENV{GTEST_ROOT} + ${GTEST_ROOT} + PATH_SUFFIXES ${_gtest_libpath_suffixes} + ) + mark_as_advanced(${_name}) +endfunction() + +# + +if(NOT DEFINED GTEST_MSVC_SEARCH) + set(GTEST_MSVC_SEARCH MD) +endif() + +set(_gtest_libpath_suffixes lib) +if(MSVC) + if(GTEST_MSVC_SEARCH STREQUAL "MD") + list(APPEND _gtest_libpath_suffixes + msvc/gtest-md/Debug + msvc/gtest-md/Release) + elseif(GTEST_MSVC_SEARCH STREQUAL "MT") + list(APPEND _gtest_libpath_suffixes + msvc/gtest/Debug + msvc/gtest/Release) + endif() +endif() + + +find_path(GTEST_INCLUDE_DIR gtest/gtest.h + HINTS + $ENV{GTEST_ROOT}/include + ${GTEST_ROOT}/include +) +mark_as_advanced(GTEST_INCLUDE_DIR) + +if(MSVC AND GTEST_MSVC_SEARCH STREQUAL "MD") + # The provided /MD project files for Google Test add -md suffixes to the + # library names. + _gtest_find_library(GTEST_LIBRARY gtest-md gtest) + _gtest_find_library(GTEST_LIBRARY_DEBUG gtest-mdd gtestd) + _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main-md gtest_main) + _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_main-mdd gtest_maind) +else() + _gtest_find_library(GTEST_LIBRARY gtest) + _gtest_find_library(GTEST_LIBRARY_DEBUG gtestd) + _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main) + _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind) +endif() + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTest DEFAULT_MSG GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) + +if(GTEST_FOUND) + set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR}) + _gtest_append_debugs(GTEST_LIBRARIES GTEST_LIBRARY) + _gtest_append_debugs(GTEST_MAIN_LIBRARIES GTEST_MAIN_LIBRARY) + set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}) +endif() \ No newline at end of file From fa3cf9ad9798ed881386559501ca6ed36ea3da3b Mon Sep 17 00:00:00 2001 From: Majid Date: Tue, 9 Jan 2018 14:30:19 +1100 Subject: [PATCH 03/13] Update README.md --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 116c4a7..5618d99 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ CLI tool provide ability to generate new licenses and validate existing license. ./license-manager --validate license.file [--signature ] ``` -### License Format +## License Format Licenses generated using License++ are base64 encoded JSON. They look like as follows: ``` @@ -113,12 +113,14 @@ Licenses generated using License++ are base64 encoded JSON. They look like as fo ### Format Explained - * `authority_signature` - Signature of the authority which prevents alteration in the license - * `expiry_date` - License expiry date epoch - * `issue_date` - License issue date epoch - * `issuing_authority` - ID of issuing authority as per key register - * `licensee` - Name of the license holder - * `licensee_signature` - If licensee signed this license this is encrypted against key provided in key register. All the licenses signed by licensee will be validated against it at validation time. + | Item | Description | + | ---- | ----------- | + | `authority_signature` | Signature of the authority which prevents alteration in the license | + | `expiry_date` | License expiry date epoch | + | `issue_date` | License issue date epoch | + | `issuing_authority` | ID of issuing authority as per key register | + | `licensee` | Name of the license holder | + | `licensee_signature` | If licensee signed this license this is encrypted against key provided in key register. All the licenses signed by licensee will be validated against it at validation time. | ## License ``` From 13b540a49484170c2a3c8da504fef4eb28f11bb4 Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 14:42:06 +1100 Subject: [PATCH 04/13] docs --- license++/base-license-manager.h | 54 +++++++++++++++++++++++++++++--- license++/issuing-authority.h | 4 ++- license++/license-exception.h | 2 +- license++/license.h | 5 ++- 4 files changed, 58 insertions(+), 7 deletions(-) diff --git a/license++/base-license-manager.h b/license++/base-license-manager.h index 7a64b1b..bb80732 100644 --- a/license++/base-license-manager.h +++ b/license++/base-license-manager.h @@ -20,7 +20,50 @@ namespace licensepp { /// /// \brief Base license manager /// -template +/// This class is abstract license manager that needs to be inherited with proper +/// key register. +/// +/// The key register must contains two static members. +/// 1. static const unsigned char LICENSE_MANAGER_SIGNATURE_KEY[]; +/// 2. static const std::vector LICENSE_ISSUING_AUTHORITIES; +/// +/// Definitions must be provided as well. +/// +/// A valid key register looks like as follows +/// +/// class LicenseKeysRegister +/// { +/// public: +/// static const unsigned char LICENSE_MANAGER_SIGNATURE_KEY[]; +/// +/// static const std::vector LICENSE_ISSUING_AUTHORITIES; +/// }; +/// +/// const unsigned char LicenseKeysRegister::LICENSE_MANAGER_SIGNATURE_KEY[] = +/// { +/// 0x27, 0xD4, 0x91, 0x55, 0xE6, 0x6D, 0xC3, 0x11, 0x8D, 0xC0, 0x52, 0x0B, 0x2C, 0x9F, 0x84, 0xF3, +/// }; +/// +/// const std::vector LicenseKeysRegister::LICENSE_ISSUING_AUTHORITIES = { +/// IssuingAuthority("authority_id", "", "", 24U, true), +/// }; +/// +/// +/// And then your license manager for your software will look like this: +/// +/// class LicenseManager : public BaseLicenseManager +/// { +/// public: +/// LicenseManager() +/// : BaseLicenseManager() +/// { +/// } +/// }; +/// +/// +/// \see https://github.com/muflihun/licensepp/blob/master/sample/ +/// +template class BaseLicenseManager { public: @@ -28,13 +71,16 @@ class BaseLicenseManager virtual ~BaseLicenseManager() = default; + /// + /// \brief Read and return issuing authority from license + /// const IssuingAuthority* getIssuingAuthority(const License* license) const { if (license == nullptr) { return nullptr; } const IssuingAuthority* issuingAuthority = nullptr; - for (const auto& a : Keys::LICENSE_ISSUING_AUTHORITIES) { + for (const auto& a : LicenseKeysRegister::LICENSE_ISSUING_AUTHORITIES) { if (a.id() == license->issuingAuthorityId()) { issuingAuthority = &(a); } @@ -72,7 +118,7 @@ class BaseLicenseManager { const IssuingAuthority* issuingAuthority = nullptr; // validate using license's authortiy - for (const IssuingAuthority& currAuthority : Keys::LICENSE_ISSUING_AUTHORITIES) { + for (const IssuingAuthority& currAuthority : LicenseKeysRegister::LICENSE_ISSUING_AUTHORITIES) { if (currAuthority.id() == license->issuingAuthorityId()) { if (!currAuthority.active()) { std::cerr << "Issuing authority " << license->issuingAuthorityId() @@ -94,7 +140,7 @@ class BaseLicenseManager inline std::string keydec() const { const std::string b16list = "0123456789ABCDEF"; - const unsigned char* key = Keys::LICENSE_MANAGER_SIGNATURE_KEY; + const unsigned char* key = LicenseKeysRegister::LICENSE_MANAGER_SIGNATURE_KEY; std::stringstream ss; for (auto i = 0; i < 16; ++i) { ss << b16list[key[i] >> 4] << b16list[key[i] & 0xf]; diff --git a/license++/issuing-authority.h b/license++/issuing-authority.h index 95a8efc..7379fdf 100644 --- a/license++/issuing-authority.h +++ b/license++/issuing-authority.h @@ -19,7 +19,9 @@ namespace licensepp { class IssuingAuthority { public: - IssuingAuthority(const std::string& id, const std::string& name, const std::string& keypair, unsigned int maxValidity, bool active = true); + IssuingAuthority(const std::string& id, const std::string& name, + const std::string& keypair, unsigned int maxValidity, + bool active = true); IssuingAuthority(const IssuingAuthority&); IssuingAuthority& operator=(IssuingAuthority); diff --git a/license++/license-exception.h b/license++/license-exception.h index 87f8a55..ac6f4a5 100644 --- a/license++/license-exception.h +++ b/license++/license-exception.h @@ -13,7 +13,7 @@ namespace licensepp { /// -/// \brief Exception thrown by all the residue helper and internal methods +/// \brief Exception thrown by all the license++ functions /// class LicenseException : public std::runtime_error { diff --git a/license++/license.h b/license++/license.h index 3d0d3bf..d507725 100644 --- a/license++/license.h +++ b/license++/license.h @@ -13,7 +13,7 @@ namespace licensepp { /// -/// \brief License object +/// \brief License model /// class License { @@ -88,6 +88,9 @@ class License std::string formattedExpiry() const; + /// + /// \brief Loads itself from base64 input + /// bool load(const std::string& licenseBase64); protected: From 731ca7c9a234d62fe6568dc76d808072b5afbdcf Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 14:44:37 +1100 Subject: [PATCH 05/13] dox --- doxygen/DoxygenLayout.xml | 194 +++++ doxygen/README_DOXYGEN.md | 28 + doxygen/conf | 7 + doxygen/customdoxygen.css | 1405 +++++++++++++++++++++++++++++++++++++ 4 files changed, 1634 insertions(+) create mode 100644 doxygen/DoxygenLayout.xml create mode 100644 doxygen/README_DOXYGEN.md create mode 100644 doxygen/conf create mode 100644 doxygen/customdoxygen.css diff --git a/doxygen/DoxygenLayout.xml b/doxygen/DoxygenLayout.xml new file mode 100644 index 0000000..8c86dae --- /dev/null +++ b/doxygen/DoxygenLayout.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doxygen/README_DOXYGEN.md b/doxygen/README_DOXYGEN.md new file mode 100644 index 0000000..2b1c354 --- /dev/null +++ b/doxygen/README_DOXYGEN.md @@ -0,0 +1,28 @@ + ‫بسم الله الرَّحْمَنِ الرَّحِيمِ + +License++ + +# Introduction +License++ is a cross platform software licensing library which allows you to implement licensing into your application. It provides you all tools to issue and validate licenses. + +# Licence + +``` +Copyright (c) 2018-present Muflihun Labs + +https://github.com/muflihun/ +https://muflihun.com + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` + diff --git a/doxygen/conf b/doxygen/conf new file mode 100644 index 0000000..f6f112c --- /dev/null +++ b/doxygen/conf @@ -0,0 +1,7 @@ +PROJECT_NAME=License++ +PROJECT_BRIEF="Software licensing library" +OUTPUT_DIRECTORY=build/doc +INPUT=tools/doxygen/README_DOXYGEN.md license++/* +USE_MDFILE_AS_MAINPAGE=tools/doxygen/README_DOXYGEN.md +HTML_EXTRA_STYLESHEET=tools/doxygen/customdoxygen.css +LAYOUT_FILE=tools/doxygen/DoxygenLayout.xml diff --git a/doxygen/customdoxygen.css b/doxygen/customdoxygen.css new file mode 100644 index 0000000..c771ae0 --- /dev/null +++ b/doxygen/customdoxygen.css @@ -0,0 +1,1405 @@ +/* The standard CSS for doxygen 1.8.4 */ + +body, table, div, p, dl { + // font: 400 14px/22px Roboto,sans-serif; + font: 13px "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 28px; + //font-size: 150%; +} + +.title { + //font: 400 14px/28px Roboto,sans-serif; + font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; + font-size: 24px; + font-weight: normal; + margin: 10px 2px; +} + +h2.groupheader { + //border-bottom: 1px solid #879ECB; + border-bottom: none; + //color: #354C7B; + color: rgb(60, 76, 108); + font-size: 24px; + font-weight: normal; + //margin-top: 1.75em; + margin: 42px 0px 20px 0px; + margin-bottom: 20px; + //padding-top: 8px; + //padding-bottom: 4px; + padding: 0px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + //margin-right: 15px; + //margin: 42px 0px 20px 0px; +} + +h1 { + font-size: 28px; +} + +h2 { + color: rgb(60, 76, 108); + font-size: 24px; + font-weight: normal; + margin: 42px 0px 20px 0px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + //color: #3D578C; + color: rgb(51, 102, 204); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + //color: #4665A2; + color: rgb(51, 102, 204); +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + //font-family: "Courier New", courier, monospace; + font-family: Courier, Consolas, monospace; + //font-weight: bold; + font-weight: normal; +} + +a.elRef { +} + +a.code, a.code:visited { + //color: #4665A2; + color: rgb(51, 102, 204); +} + +a.codeRef, a.codeRef:visited { + //color: #4665A2; + color: rgb(51, 102, 204); +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + //border: 1px solid #C4CFE5; + border: solid 1px rgb(221, 221, 221); + border-radius: 3px; + //background-color: #FBFCFD; + background-color: rgb(248, 248, 248); + //padding: 4px 6px; + padding: 6px 10px; + //margin: 4px 8px 4px 2px; + margin: 15px 0px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + //font-family: monospace, fixed; + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-size: 105%; +} + +div.fragment { + //padding: 0px; + //padding: 4px 6px; + //margin: 0px; + //background-color: #FBFCFD; + //border: 1px solid #C4CFE5; + + padding: 6px 10px; + margin: 15px 0px; + border: solid 1px rgb(221, 221, 221); + border-radius: 3px; + + background-color: rgb(248, 248, 248); +} + +div.line { + //font-family: monospace, fixed; + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + //margin-left: 16px; + //margin-top: 12px; + margin-left: 0px; + margin-top: 9px; + margin-bottom: 4.7px; + + font-size: 19px; + //font-weight: bold; + font-weight: normal; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + //border-top: 1px solid #4A6AAA; + border-top: 1px solid #444; +} + +hr.footer { + height: 0px; + border-top: 3px solid #444; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + //background-color: #F9FAFC; + background-color: white; + border: none; + margin: 4px; + padding: 1px 0 0 8px; + + //font-family: "Courier New", courier, monospace; + font-family: Courier, Consolas, monospace; +} + +.mdescLeft, .mdescRight { + //padding: 0px 8px 4px 8px; + padding: 0px 8px 4px 24px; + //color: #555; + color: black; + + font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; + //font-style: italic; + font-style: normal; +} + +.memSeparator { + //border-bottom: 1px solid #DEE4F0; + border-bottom: none; + line-height: 8px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-family: Courier, Consolas, monospace; + font-size: 100%; + //font-size: 80%; + //color: #4665A2; + color: black; + font-weight: normal; + //margin-left: 9px; + margin-left: 1px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + //font-family: "Courier New", courier, monospace; + //font-family: Courier, Consolas, monospace; + font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; + font-weight: 400; + //font-size: 15px; + font-size: 19px; + //font-weight: bold; + //margin-left: 6px; + margin-left: 0px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + margin-top: 1.5em; + border: none; + //border-top: 1px solid #ccc; + //border-top: 1px solid #A8B8D9; + //border-left: 1px solid #A8B8D9; + //border-right: 1px solid #A8B8D9; + border-bottom: 1px solid rgb(172, 172, 172); + //padding: 6px 0px 6px 0px; + //padding: 6px; + padding: 0px; + //color: #253555; + color: black; + //font-family: Courier, Consolas, monospace; + font-weight: bold; + //text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + //text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3); + text-shadow: none; + //background-image:url('nav_f.png'); + background-image: none; + //background-repeat:repeat-x; + //background-color: #E2E8F2; + background-color: rgb(235, 238, 241); + //background-color: #ccc; + //background-color: white; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + //border-top-right-radius: 4px; + //border-top-left-radius: 4px; + border-top-right-radius: 0px; + border-top-left-radius: 0px; + /* firefox specific markup */ + //-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + //-moz-border-radius-topright: 4px; + //-moz-border-radius-topleft: 4px; + -moz-box-shadow: none; + -moz-border-radius-topright: 0px; + -moz-border-radius-topleft: 0px; + /* webkit specific markup */ + //-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + //-webkit-border-top-right-radius: 4px; + //-webkit-border-top-left-radius: 4px; + -webkit-box-shadow: none; + -webkit-border-top-right-radius: 0px; + -webkit-border-top-left-radius: 0px; +} + +.memdoc, dl.reflist dd { + border: none; + //border-bottom: 1px solid #A8B8D9; + //border-left: 1px solid #A8B8D9; + //border-right: 1px solid #A8B8D9; + padding: 6px; + background-color: #FBFCFD; + border-top-width: 0; + //background-image:url('nav_g.png'); + background-image: none; + //background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + //border-bottom-left-radius: 4px; + //border-bottom-right-radius: 4px; + //box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + box-shadow: none; + /* firefox specific markup */ + //-moz-border-radius-bottomleft: 4px; + //-moz-border-radius-bottomright: 4px; + //-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-bottomleft: 0px; + -moz-border-radius-bottomright: 0px; + -moz-box-shadow: none; + /* webkit specific markup */ + //-webkit-border-bottom-left-radius: 4px; + //-webkit-border-bottom-right-radius: 4px; + //-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-bottom-left-radius: 0px; + -webkit-border-bottom-right-radius: 0px; + -webkit-box-shadow: none; +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + //color: #602020; + color: rgb(37, 53, 85); + white-space: nowrap; +} +.paramname em { + font-style: italic; + font-weight: normal; + //font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + //font-weight: bold; + //font-family: "Courier New", courier, monospace; + font-family: Courier, Consolas, monospace; + font-style: italic; + font-weight: normal; + text-shadow: rgba(0, 0, 0, 0.3) 0px 1px 1px; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: middle; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + //background-color: #728DC1; + background-color: rgb(172, 172, 172);; + //border-top:1px solid #5373B4; + //border-left:1px solid #5373B4; + //border-right:1px solid #C4CFE5; + //border-bottom:1px solid #C4CFE5; + border: none; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + //padding: 4px 8px; + //border-radius: 3px; + border-radius: 4px; + //font-size: 7pt; + font-size: 9pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view when not used as main index */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + //background-image:url('nav_h.png'); + //background-repeat:repeat-x; + //background-color: #F9FAFC; + background-image: none; + background-color: white; + margin: 0px; + //border-bottom: 1px solid #C4CFE5; + border: none; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + //margin-left:-7px; + margin-left: 0px; + padding: 6px 0px 3px 8px; + //padding-left: 8px; + border-left: 6px solid; + border-color: #D0C000; + background-color: #fff799 +} + +dl.warning, dl.attention +{ + //margin-left:-7px; + //padding-left: 3px; + margin-left: 0px; + padding: 6px 0px 3px 8px; + + //border-left:4px solid; + border-left: 6px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + //margin-left:-7px; + //padding-left: 3px; + margin-left: 0px; + padding: 6px 0px 3px 8px; + //border-left: 4px solid; + border-left: 6px solid; + border-color: #505050; +} + +dl.deprecated dt a.el +{ + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +dl.todo +{ + //margin-left:-7px; + //padding-left: 3px; + margin-left: 0px; + padding: 6px 0px 3px 8px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 42px; + margin-bottom: 20px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + + +.tabs, .tabs2, .tabs3 { + background-image: none; + background-color: #2f3a48; + color: white; + +} + + +.tabs2 { + background-color: #51637b; +} + + +.tablist li { + background-image: none; +} + + +.tablist a { + background-image: none; + color: white; + //text-shadow: none; + text-shadow: rgba(0, 0, 0, 0.6) 0px 2px 2px; +} + + +.tablist a:hover { + background-image: none; + text-shadow: none; +} + + +.tablist li.current a { + background-image: none; + //color: #ccc; + text-shadow: none; +} + + +.tabs li.current { + background-color: #51637b; +} + +.tabs2 li.current { + background-color: #888; +} + + +.navpath { + border: none; +} + + +.navpath ul { + background-image: none; + background-color: #888; + border: none; +} + + +.navpath li { + background-image: none; +} + + +.navpath li.navelem a { + background-image: none; + color: white; + text-shadow: none; +} + + +.navpath li.navelem a:hover { + background-image: none; + color: white; + text-shadow: none; +} + +div.image img[src="https://raw.githubusercontent.com/muflihun/residue/master/docs/Residue.png"] { + width: 50%; + max-width: 446px; +} From 13d20d57cd87673e357b4c6fb3a9364990029c30 Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 14:47:48 +1100 Subject: [PATCH 06/13] dox --- doxygen/README_DOXYGEN.md | 6 +++--- doxygen/conf | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doxygen/README_DOXYGEN.md b/doxygen/README_DOXYGEN.md index 2b1c354..c64999e 100644 --- a/doxygen/README_DOXYGEN.md +++ b/doxygen/README_DOXYGEN.md @@ -1,11 +1,11 @@ ‫بسم الله الرَّحْمَنِ الرَّحِيمِ -License++ +# License++ -# Introduction +## Introduction License++ is a cross platform software licensing library which allows you to implement licensing into your application. It provides you all tools to issue and validate licenses. -# Licence +## Licence ``` Copyright (c) 2018-present Muflihun Labs diff --git a/doxygen/conf b/doxygen/conf index f6f112c..63a584e 100644 --- a/doxygen/conf +++ b/doxygen/conf @@ -1,7 +1,7 @@ PROJECT_NAME=License++ PROJECT_BRIEF="Software licensing library" OUTPUT_DIRECTORY=build/doc -INPUT=tools/doxygen/README_DOXYGEN.md license++/* -USE_MDFILE_AS_MAINPAGE=tools/doxygen/README_DOXYGEN.md -HTML_EXTRA_STYLESHEET=tools/doxygen/customdoxygen.css -LAYOUT_FILE=tools/doxygen/DoxygenLayout.xml +INPUT=doxygen/README_DOXYGEN.md license++/base-license-manager.h license++/issuing-authority.h license++/license-exception.h license++/license.h +USE_MDFILE_AS_MAINPAGE=doxygen/README_DOXYGEN.md +HTML_EXTRA_STYLESHEET=doxygen/customdoxygen.css +LAYOUT_FILE=doxygen/DoxygenLayout.xml From e0abc1a6959a8d37210ff142f8a194c3d7c95ac8 Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 14:48:30 +1100 Subject: [PATCH 07/13] travis --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2d3b182..074a7f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,6 +108,9 @@ install: - cd "${TRAVIS_BUILD_DIR}" - mkdir build - cd build + - cmake -Dtest=OFF -Dtravis=ON .. + - sudo make + - sudo make install - cmake -Dtest=ON -Dtravis=ON .. - sudo make - ls -l From 3053fa88a06fa726898e3e257da658ef340689d0 Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 15:02:45 +1100 Subject: [PATCH 08/13] except fix --- license++/base-license-manager.h | 2 +- license++/license-exception.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/license++/base-license-manager.h b/license++/base-license-manager.h index bb80732..3fabca8 100644 --- a/license++/base-license-manager.h +++ b/license++/base-license-manager.h @@ -63,7 +63,7 @@ namespace licensepp { /// /// \see https://github.com/muflihun/licensepp/blob/master/sample/ /// -template +template class BaseLicenseManager { public: diff --git a/license++/license-exception.h b/license++/license-exception.h index ac6f4a5..219bce5 100644 --- a/license++/license-exception.h +++ b/license++/license-exception.h @@ -8,20 +8,21 @@ #ifndef LicenseException_h #define LicenseException_h -#include +#include namespace licensepp { +class LicenseExceptionBase { }; /// /// \brief Exception thrown by all the license++ functions /// -class LicenseException : public std::runtime_error +class LicenseException : public LicenseExceptionBase, public std::runtime_error { public: /// /// \brief Main constructor /// - LicenseException(const std::string& msg) : runtime_error(msg) {} + LicenseException(const std::string& msg) : std::runtime_error(msg) {} virtual ~LicenseException() = default; }; From b57b5455019349ad1df00f53388b5338a30a6f46 Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 15:03:49 +1100 Subject: [PATCH 09/13] updated dox --- license++/base-license-manager.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/license++/base-license-manager.h b/license++/base-license-manager.h index 3fabca8..4084f35 100644 --- a/license++/base-license-manager.h +++ b/license++/base-license-manager.h @@ -30,7 +30,7 @@ namespace licensepp { /// Definitions must be provided as well. /// /// A valid key register looks like as follows -/// +///
 /// class LicenseKeysRegister
 /// {
 /// public:
@@ -47,10 +47,10 @@ namespace licensepp {
 /// const std::vector LicenseKeysRegister::LICENSE_ISSUING_AUTHORITIES = {
 ///    IssuingAuthority("authority_id", "", "", 24U, true),
 /// };
-/// 
+/// 
/// /// And then your license manager for your software will look like this: -/// +///
 /// class LicenseManager : public BaseLicenseManager
 /// {
 /// public:
@@ -59,7 +59,7 @@ namespace licensepp {
 ///     {
 ///     }
 /// };
-/// 
+/// 
/// /// \see https://github.com/muflihun/licensepp/blob/master/sample/ /// From a0eb4947385ca94d2c9c8f30f388b895ddaeea3d Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 15:14:15 +1100 Subject: [PATCH 10/13] poss fix --- .travis.yml | 1 + src/license.cc | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 074a7f8..ac94354 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,6 +113,7 @@ install: - sudo make install - cmake -Dtest=ON -Dtravis=ON .. - sudo make + - sudo make install - ls -l script: "./licensepp-unit-tests --gtest_catch_exceptions=0" diff --git a/src/license.cc b/src/license.cc index ddb9ec4..728db5f 100644 --- a/src/license.cc +++ b/src/license.cc @@ -41,13 +41,14 @@ License& License::operator=(License other) std::string License::formattedExpiry() const { - struct timeval tval; - tval.tv_sec = static_cast(m_expiryDate); - // TODO: Fix this - it used el :( return "formattedExpiry(): NOT IMPLEMENTED"; /* + // TODO: Fix this - it used el :( + struct timeval tval; + tval.tv_sec = static_cast(m_expiryDate); el::base::SubsecondPrecision ssPrec(3); - return el::base::utils::DateTime::timevalToString(tval, "%d %b, %Y %H:%m UTC", &ssPrec);*/ + return el::base::utils::DateTime::timevalToString(tval, "%d %b, %Y %H:%m UTC", &ssPrec); + */ } From df3d58eafcd36a4931ceeaa17d04d94c962557b5 Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 15:27:49 +1100 Subject: [PATCH 11/13] export path --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ac94354..52fd9eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,6 +114,7 @@ install: - cmake -Dtest=ON -Dtravis=ON .. - sudo make - sudo make install + - export LD_LIBRARY_PATH=/usr/local/lib - ls -l script: "./licensepp-unit-tests --gtest_catch_exceptions=0" From fe9a62b7160eb8aec504bf7cb63aaddce017e1cc Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 9 Jan 2018 15:31:32 +1100 Subject: [PATCH 12/13] json restriction removed --- src/external/json.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/external/json.h b/src/external/json.h index f1dfc1f..69d2928 100644 --- a/src/external/json.h +++ b/src/external/json.h @@ -64,9 +64,7 @@ SOFTWARE. #endif #elif defined(__GNUC__) #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900 -#ifndef RESIDUE_SPECIAL_EDITION - #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" -#endif + //#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" #endif #endif From 12c7833e6c0ffc1628f0aba70cac92a38ef0f043 Mon Sep 17 00:00:00 2001 From: Majid Date: Tue, 9 Jan 2018 15:47:45 +1100 Subject: [PATCH 13/13] Update README.md --- README.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5618d99..88bdb55 100644 --- a/README.md +++ b/README.md @@ -14,22 +14,42 @@ License++ is software licensing library that provides an abstract way to secure ## Features * RSA-Based signing to prevent alteration - * Custom issuing authority for your software - * Anyone can validate the license but not everyone can issue new licenses - * Expiring issuing authority + * Custom license keys for your software + * Anyone can check the license validity + * Restricted issuance of new licenses + * Disable issuing authority at anytime ## Getting Started +### Dependencies + + * C++11 + * [Crypto++](https://www.cryptopp.com/) v5.6.5+ [with Pem Pack](https://raw.githubusercontent.com/muflihun/muflihun.github.io/master/downloads/pem_pack.zip) + * [cmake](https://cmake.org/) v2.8.12+ + * [zlib-devel](https://zlib.net/) + ### Installation * [Download](https://github.com/muflihun/licensepp/archive/master.zip) or [clone](git@github.com:muflihun/licensepp.git) the repository + * Install Crypto++ + ``` +wget https://raw.githubusercontent.com/muflihun/muflihun.github.io/master/downloads/cryptocpp.tar.gz +tar xf cryptocpp.tar.gz +cd cryptopp-CRYPTOPP_5_6_5 +wget https://raw.githubusercontent.com/muflihun/muflihun.github.io/master/downloads/pem_pack.zip +unzip pem_pack.zip +cmake . +make +make install +``` * Use CMake to build the project ``` + cd mkdir build cd build cmake .. make install ``` - * You can build [cli](/cli) tool or [sample](/sample) code to ensure license++ is installed properly + * You can build [cli](/cli) tool to ensure license++ is installed properly ### Integration Once you have license++ properly installed please check out [sample](/sample) code for integration