FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
ninkawrapper.hpp
1 /*
2  * Copyright (C) 2014-2015, Siemens AG
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * version 2 as published by the Free Software Foundation.
7  *
8  * This program 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
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16  */
17 
18 #ifndef NINKA_AGENT_NINKA_WRAPPER_HPP
19 #define NINKA_AGENT_NINKA_WRAPPER_HPP
20 
21 #define AGENT_NAME "ninka"
22 #define AGENT_DESC "ninka agent"
23 #define AGENT_ARS "ninka_ars"
24 
25 #include <string>
26 #include <vector>
27 #include "files.hpp"
28 #include "licensematch.hpp"
29 #include "state.hpp"
30 
31 using namespace std;
32 
33 string scanFileWithNinka(const State& state, const fo::File& file);
34 vector<string> extractLicensesFromNinkaResult(string ninkaResult);
35 string extractLicensePartFromNinkaResult(string ninkaResult);
36 vector<string> splitLicensePart(string licensePart);
37 vector<LicenseMatch> createMatches(vector<string> ninkaLicenseNames);
38 string mapLicenseFromNinkaToFossology(string name);
39 bool isLicenseCollection(string ninkaLicenseName,vector<LicenseMatch>& matches);
40 
41 #endif // NINKA_AGENT_NINKA_WRAPPER_HPP
Class to handle file related operations.
Definition: files.hpp:29
Definition: state.hpp:26
Utility functions for file handling.