FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Database handler for agents. More...
#include <libfossAgentDatabaseHandler.hpp>
Public Member Functions | |
AgentDatabaseHandler (DbManager dbManager) | |
AgentDatabaseHandler (AgentDatabaseHandler &&other) | |
AgentDatabaseHandler (const AgentDatabaseHandler &)=delete | |
virtual | ~AgentDatabaseHandler () |
AgentDatabaseHandler | operator= (const AgentDatabaseHandler &)=delete |
bool | begin () const |
BEGIN a transaction block in DB. More... | |
bool | commit () const |
COMMIT a transaction block in DB. More... | |
bool | rollback () const |
ROLLBACK a transaction block in DB. More... | |
char * | getPFileNameForFileId (unsigned long pfileId) const |
Get the file name of a give pfile id. More... | |
std::string | queryUploadTreeTableName (int uploadId) |
Get the upload tree table name for a given upload id. More... | |
std::vector< unsigned long > | queryFileIdsVectorForUpload (int uploadId, bool ignoreFilesWithMimeType) const |
Get pfile ids for a given upload id. More... | |
std::vector< unsigned long > | queryFileIdsVectorForUpload (int uploadId, int agentId, bool ignoreFilesWithMimeType) const |
Get pfile ids for a given upload id which agent has not scanned. More... | |
Protected Attributes | |
DbManager | dbManager |
DbManager to use. | |
Database handler for agents.
Definition at line 25 of file libfossAgentDatabaseHandler.hpp.
fo::AgentDatabaseHandler::AgentDatabaseHandler | ( | DbManager | _dbManager | ) |
Constructor for AgentDatabaseHandler
_dbManager | DbManager to use |
Definition at line 24 of file libfossAgentDatabaseHandler.cc.
fo::AgentDatabaseHandler::AgentDatabaseHandler | ( | AgentDatabaseHandler && | other | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 32 of file libfossAgentDatabaseHandler.cc.
|
delete |
Explicitly disallow copy constructor
|
virtual |
Default destructor for AgentDatabaseHandler
Definition at line 40 of file libfossAgentDatabaseHandler.cc.
bool fo::AgentDatabaseHandler::begin | ( | ) | const |
BEGIN a transaction block in DB.
Definition at line 49 of file libfossAgentDatabaseHandler.cc.
bool fo::AgentDatabaseHandler::commit | ( | ) | const |
COMMIT a transaction block in DB.
Definition at line 59 of file libfossAgentDatabaseHandler.cc.
char * fo::AgentDatabaseHandler::getPFileNameForFileId | ( | unsigned long | pfileId | ) | const |
Get the file name of a give pfile id.
pfileId | Pfile to search |
SHA1.MD5.SIZE
) Definition at line 80 of file libfossAgentDatabaseHandler.cc.
|
delete |
Explicitly disallow copy constructor
std::vector< unsigned long > fo::AgentDatabaseHandler::queryFileIdsVectorForUpload | ( | int | uploadId, |
bool | ignoreFilesWithMimeType | ||
) | const |
Get pfile ids for a given upload id.
uploadId | Upload id to fetch from |
ignoreFilesWithMimeType | ignore files with particular mimetype |
Definition at line 92 of file libfossAgentDatabaseHandler.cc.
std::vector< unsigned long > fo::AgentDatabaseHandler::queryFileIdsVectorForUpload | ( | int | uploadId, |
int | agentId, | ||
bool | ignoreFilesWithMimeType | ||
) | const |
Get pfile ids for a given upload id which agent has not scanned.
uploadId | Upload id to fetch from |
agentId | Agent id to filter pfiles for |
ignoreFilesWithMimeType | ignore files with particular mimetype |
Definition at line 106 of file libfossAgentDatabaseHandler.cc.
std::string fo::AgentDatabaseHandler::queryUploadTreeTableName | ( | int | uploadId | ) |
Get the upload tree table name for a given upload id.
uploadId | Upload id to check |
Definition at line 120 of file libfossAgentDatabaseHandler.cc.
bool fo::AgentDatabaseHandler::rollback | ( | ) | const |
ROLLBACK a transaction block in DB.
Definition at line 69 of file libfossAgentDatabaseHandler.cc.