19 #ifndef MONK_AGENT_MATCH_H 20 #define MONK_AGENT_MATCH_H 25 #include "string_operations.h" 28 #define MATCH_TYPE_FULL 0 29 #define MATCH_TYPE_DIFF 1 41 int (*onAll)(
MonkState* state,
const File* file,
const GArray* matches);
46 int (*onBetweenIndividualOutputs)(
MonkState* state);
51 void match_array_free(GArray* matches);
52 #define match_array_index(matches, i) (g_array_index(matches, Match*, i)) 56 #if GLIB_CHECK_VERSION(2,32,0) 57 void match_destroyNotify(gpointer matchP);
60 size_t match_getStart(
const Match* match);
61 size_t match_getEnd(
const Match* match);
63 GArray* findAllMatchesBetween(
const File* file,
const Licenses* licenses,
unsigned maxAllowedDiff,
unsigned minAdjacentMatches,
unsigned maxLeadingDiff);
69 size_t textStartPosition,
size_t searchStartPosition,
71 unsigned maxAllowedDiff,
unsigned minAdjacentMatches);
73 GArray* filterNonOverlappingMatches(GArray* matches);
74 int match_partialComparator(
const Match* thisMatch,
const Match* otherMatch);
78 char* formatMatchArray(GArray* matchInfo);
80 #endif // MONK_AGENT_MATCH_H
Store the results of a regex match.
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.
void matchPFileWithLicenses(CopyrightState const &state, int agentId, unsigned long pFileId, CopyrightDatabaseHandler &databaseHandler)
Get the file contents, scan for statements and save findings to database.