FOSSology  4.4.0
Open Source License Compliance by Open Source Software
libfossAgentDatabaseHandler.hpp
Go to the documentation of this file.
1 /*
2  SPDX-FileCopyrightText: © 2013-2014 Siemens AG
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 #ifndef LIBFOSS_AGENT_DATABASE_HANDLER_HPP_
8 #define LIBFOSS_AGENT_DATABASE_HANDLER_HPP_
9 
10 #include <vector>
11 
13 
19 namespace fo
20 {
26  {
27 
28  protected:
30  public:
37  virtual ~AgentDatabaseHandler();
42 
43  bool begin() const;
44  bool commit() const;
45  bool rollback() const;
46 
47  char* getPFileNameForFileId(unsigned long pfileId) const;
48  std::string queryUploadTreeTableName(int uploadId);
49  std::vector<unsigned long> queryFileIdsVectorForUpload(int uploadId, bool ignoreFilesWithMimeType) const;
50  std::vector<unsigned long> queryFileIdsVectorForUpload(int uploadId,
51  int agentId, bool ignoreFilesWithMimeType) const;
52  };
53 }
54 
55 #endif
Database handler for agents.
std::vector< unsigned long > queryFileIdsVectorForUpload(int uploadId, bool ignoreFilesWithMimeType) const
Get pfile ids for a given upload id.
std::string queryUploadTreeTableName(int uploadId)
Get the upload tree table name for a given upload id.
AgentDatabaseHandler(DbManager dbManager)
bool commit() const
COMMIT a transaction block in DB.
bool begin() const
BEGIN a transaction block in DB.
char * getPFileNameForFileId(unsigned long pfileId) const
Get the file name of a give pfile id.
DbManager dbManager
DbManager to use.
AgentDatabaseHandler(const AgentDatabaseHandler &)=delete
bool rollback() const
ROLLBACK a transaction block in DB.
AgentDatabaseHandler operator=(const AgentDatabaseHandler &)=delete
DB wrapper for agents.
DB wrapper for agents.
fo namespace holds the FOSSology library functions.