7 #ifndef NINKA_AGENT_UTILS_HPP
8 #define NINKA_AGENT_UTILS_HPP
10 #define AGENT_NAME "ninka"
11 #define AGENT_DESC "ninka agent"
12 #define AGENT_ARS "ninka_ars"
17 #include "licensematch.hpp"
29 void bail(
int exitval);
33 bool saveLicenseMatchesToDatabase(
const State& state,
const vector<LicenseMatch>& matches,
unsigned long pFileId,
NinkaDatabaseHandler& databaseHandler);
bool processUploadId(const CompatibilityState &state, int uploadId, CompatibilityDatabaseHandler &databaseHandler, int groupId)
CompatibilityState getState(DbManager &dbManager, CompatibilityCliOptions &&cliOptions)
Create a new state for the current agent based on CliOptions.
int writeARS(const CompatibilityState &state, int arsId, int uploadId, int success, DbManager &dbManager)
int queryAgentId(DbManager &dbManager)
Class to handle file related operations.
void matchPFileWithLicenses(CopyrightState const &state, int agentId, unsigned long pFileId, CopyrightDatabaseHandler &databaseHandler)
Get the file contents, scan for statements and save findings to database.
void matchFileWithLicenses(const string &sContent, unsigned long pFileId, CopyrightState const &state, int agentId, CopyrightDatabaseHandler &databaseHandler)
Scan a given file with all available scanners and save findings to database.
Utility functions for file handling.
The main FOSSology C library.
fo_dbManager * dbManager
fo_dbManager object