aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/database_interaction.h3
-rw-r--r--include/file_processor.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/include/database_interaction.h b/include/database_interaction.h
index 5ff6f66..c236cf2 100644
--- a/include/database_interaction.h
+++ b/include/database_interaction.h
@@ -29,8 +29,11 @@ int dbi_insert_hashes(const char *blake2, const char *sha256, const char *sha512
int64_t dbi_select_fileinfo_by_hash_path_filename_ids(int64_t hash_id, int64_t path_id, int64_t filename_id);
int64_t dbi_select_fileinfo_by_path_filename_ids(int64_t pname_id, int64_t fname_id);
+int dbi_select_fileinfo_by_id_resolved(int64_t id, struct df_fileinfo *fi);
int dbi_insert_fileinfo(struct df_fileinfo *fi);
+int dbi_fill_fileinfo(struct df_fileinfo *fi);
+
int dbi_update_fileinfo_last_seen(int64_t id);
int dbi_update_fileinfo_complete(struct df_fileinfo *fi, int64_t existing_id);
diff --git a/include/file_processor.h b/include/file_processor.h
index 06b6d1d..e8f66f2 100644
--- a/include/file_processor.h
+++ b/include/file_processor.h
@@ -7,6 +7,8 @@
#ifndef FILE_PROCESSOR_H
#define FILE_PROCESSOR_H
+#include <stdint.h>
+#include <time.h>
#include <sys/stat.h>
#define DF_BYTE_SIZE_256 32
@@ -44,7 +46,9 @@ struct df_fileinfo {
unsigned char sha512[DF_BYTE_SIZE_512]; /**< The SHA512 hash in binary form. */
#endif
struct df_hashstrings hashes; /**< The BLAKE2-512, SHA256 and SHA512 hash of the file */
+ time_t last_seen; /**< time_t value when the file was last seen, filled by the database */
struct stat statbuf; /**< Result of lstat() call. Symlinks are to be ignored and filtered out earlier. */
+ int64_t id; /**< to be set only when filled by the database */
};