Face Engine SDK  5.5.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ILicense.h
1 #pragma once
2 
3 #include "IObject.h"
4 #include <fsdk/FSDKError.h>
5 
6 namespace fsdk {
7 
8  #ifndef DOXYGEN_SHOULD_SKIP_THIS
9  DECLARE_SMARTPTR(ILicense);
10  #endif
11 
15  enum class LicenseFeature : uint32_t {
16  Detection = 1,
17  BestShot = 2,
18  Attributes = 3,
19  Emotions = 4,
20  FaceFeatures = 5,
21  Liveness = 6,
22  Descriptor = 7,
23  DescriptorIndex = 8,
24  LivenessEngine = 9,
25  TrackEngine = 10,
26  HumanDetection = 11,
27  PPEDetection = 17,
28  MobileLiveness = 18,
29  MedicalMaskDetection = 19,
30  ReIdDescriptor = 20
31  };
32 
37  struct ILicense : IRefCounted {
38 
39  /*
40  * @brief Checks if the feature with featureId is available in this license.
41  * @return ResultValue with error code and true if feature is available, false if there is not such feature in this
42  * license or feature is expired or license was not activated.
43  */
44  virtual fsdk::ResultValue<fsdk::FSDKError, bool> checkFeatureId(LicenseFeature feature) const noexcept = 0;
45 
46  /*
47  * @brief Checks if current license object is activated and could be used by FaceEngine.
48  * @return ResultValue with error code and true if object is activated.
49  * @note License object which was not activated could not be used because all features are disabled by default.
50  */
51  virtual fsdk::ResultValue<fsdk::FSDKError, bool> isActivated() const noexcept = 0;
52 
53  /*
54  * @brief Loads license from file.
55  * @param [in] path path to the file.
56  * @return Error code @see FSDKError for details.
57  */
59  FSDK_DEPRECATED("loadFromFile is deprecated since v.5.5.0,"
60  " Use loadFromFile(const char* path, const fsdk::ISettingsProvider* settings) instead")
61  loadFromFile(const char* path) noexcept = 0;
62 
63  /*
64  * @brief Loads license from file.
65  * @param [in] path path to the file.
66  * @param [in] settings License settings provider.
67  * @return Error code @see FSDKError for details.
68  */
69  virtual fsdk::Result<fsdk::FSDKError> loadFromFile(const char* path, const fsdk::ISettingsProvider* settings) noexcept = 0;
70 
71  /*
72  * @brief Saves license as raw format to the file. This file could be used in the next run of the application.
73  * @param [in] path path to the file.
74  * @return Error code @see FSDKError for details.
75  */
76  virtual fsdk::Result<fsdk::FSDKError> saveToFile(const char * path) const noexcept = 0;
77 
78  /*
79  * @param [out] timeStamp the result value
80  * @return ResultValue with error code and uint32_t Unix Timestamp.
81  * @note License settings should be set before using this method!
82  * @note License should be activated before calling this method!
83  */
84  virtual fsdk::ResultValue<fsdk::FSDKError, uint32_t> getExpirationDate(LicenseFeature feature) const noexcept = 0;
85  };
86 }
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
Object system types and interfaces.
License objects interface.
Definition: ILicense.h:37
Common SDK error codes.
Base strong reference counted object interface.
Definition: IRefCounted.h:36
LicenseFeature
License features.
Definition: ILicense.h:15
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:21
Detection structure. Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
SDK settings provider interface.
Definition: ISettingsProvider.h:32