Salome HOME
Merge branch 'V9_9_BR'
[modules/smesh.git] / src / SMESHUtils / SMESH_MGLicenseKeyGen.hxx
1 // Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // File      : SMESH_MGLicenseKeyGen.hxx
20 // Created   : Sat Jul 31 18:41:04 2021
21 // Author    : Edward AGAPOV (OCC)
22
23 #ifndef __SMESHUtils_MGLicenseKeyGen_HXX__
24 #define __SMESHUtils_MGLicenseKeyGen_HXX__
25
26 #include "SMESH_Utils.hxx"
27
28 #include <string>
29
30 /*!
31  * \brief Manage loading libSalomeMeshGemsKeyGenerator.[so|dll] and sing MeshGems CAD or mesh
32  */
33
34 namespace SMESHUtils_MGLicenseKeyGen
35 {
36   SMESHUtils_EXPORT bool        SignCAD( void* meshgems_cad, std::string& error );
37
38   SMESHUtils_EXPORT bool        SignMesh( void* meshgems_mesh, std::string& error );
39
40   SMESHUtils_EXPORT std::string GetKey(const std::string& gmfFile,
41                                        int                nbVertex,
42                                        int                nbEdge,
43                                        int                nbFace,
44                                        int                nbVol,
45                                        std::string&       error);
46
47   SMESHUtils_EXPORT bool        CheckKeyGenLibrary( std::string& error );
48
49   SMESHUtils_EXPORT std::string GetLibraryName();
50 }
51
52 #endif