00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2023 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Modified by : VSG (SEP 2012) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_LICENSES_INFO_ 00025 #define _SO_LICENSES_INFO_ 00026 00027 #include <Inventor/SbPImpl.h> 00028 #include <Inventor/sys/port.h> 00029 #include <Inventor/SbBase.h> 00030 #include <Inventor/SbString.h> 00031 #include <Inventor/lock/SoLicensedProduct.h> 00032 #include <Inventor/STL/map> 00033 #include <Inventor/STL/vector> 00034 00035 typedef void SoLicensesCB(SoLicensedProduct::SbProduct product); 00036 00037 SO_PIMPL_BASE_PUBLIC_DECLARATION(SoLicensesInfo) 00038 00039 00058 class SoLicensesInfo 00059 { 00060 SO_PIMPL_BASE_PUBLIC_HEADER(SoLicensesInfo) 00061 00062 public: 00063 00067 static SoLicensesInfo& getInstance(); 00068 00072 unsigned int getProductCount() const; 00073 00079 const SoLicensedProduct* getLicensedProductByIndex( unsigned int index ) const; 00080 00085 const SoLicensedProduct* getLicensedProduct( SoLicensedProduct::SbProduct prod ) const; 00086 00091 void registerExpirationCallback( SoLicensesCB* cb ); 00092 00097 void registerWarningCallback( int nbDaysBeforeExpiration, SoLicensesCB* cb ); 00098 00107 static const char* getVersion(); 00108 00119 static float getLicensingVersionNumber(); 00120 00143 static int check( const char* productName, float version, const char* licenseString = NULL, 00144 SbBool printWarning = TRUE, char** errReport = NULL ); 00145 private: 00146 SoLicensesInfo(); 00147 virtual ~SoLicensesInfo(); 00148 }; 00149 00150 #endif /* _SO_LICENSES_INFO */ 00151