From 8d7d51f6a300d132110e18e4b884b10b9fbe3aa6 Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周日, 03 5月 2020 19:43:13 +0800 Subject: [PATCH] api rename project_name->feature_name --- include/licensecc/datatypes.h | 39 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/include/licensecc/datatypes.h b/include/licensecc/datatypes.h index 5e80ee6..cb87f7c 100644 --- a/include/licensecc/datatypes.h +++ b/include/licensecc/datatypes.h @@ -95,7 +95,19 @@ */ typedef struct { char version[LCC_API_VERSION_LENGTH + 1]; // software version in format xxxx[.xxxx.xxxx] //TODO - char project_name[LCC_API_PROJECT_NAME_SIZE + 1]; // name of the project (must correspond to the name in the license) + /** + * Name of the feature you want to verify. If empty the default feature will be verified. + * Every project has a default feature that is equal to the project name. + * Every feature has a section in the license file: + * <pre> + * [feature_xx] + * sig=AAAA + * [another_feature] + * expiry-date=20201111 + * </pre> + */ + char feature_name[LCC_API_FEATURE_NAME_SIZE + + 1]; // name of the feature you' (must correspond to the name in the license) /** * this number passed in by the application must correspond to the magic number used when compiling the library. * See cmake parameter -DLCC_PROJECT_MAGIC_NUM and licensecc_properties.h macro VERIFY_MAGIC @@ -126,6 +138,31 @@ int license_version; // license file version } LicenseInfo; +typedef enum { BARE_TO_METAL, VMWARE, VIRTUALBOX, V_XEN, KVM, HV, V_OTHER } LCC_API_VIRTUALIZATION_DETAIL; + +typedef enum { + PROV_UNKNOWN = 0, + ON_PREMISE = 1, + GOOGLE_CLOUD = 2, + AZURE_CLOUD = 3, + AWS = 4, + /** + * "/sys/class/dmi/id/bios_vendor" SeaBIOS + * "/sys/class/dmi/id/sys_vendor" Alibaba Cloud + * modalias + * "dmi:bvnSeaBIOS:bvrrel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org:bd04/01/2014:svnAlibabaCloud:pnAlibabaCloudECS:pvrpc-i440fx-2.1:cvnAlibabaCloud:ct1:cvrpc-i440fx-2.1:" + */ + ALI_CLOUD = 5 +} LCC_API_CLOUD_PROVIDER; + +typedef enum { NONE, CONTAINER, VM } LCC_API_VIRTUALIZATION_SUMMARY; + +typedef struct { + LCC_API_CLOUD_PROVIDER cloud_provider; + LCC_API_VIRTUALIZATION_SUMMARY virtualization; + LCC_API_VIRTUALIZATION_DETAIL virtualization_detail; +} ExecutionEnvironmentInfo; + #ifdef __cplusplus } #endif -- Gitblit v1.9.1