diff lib/apic.h @ 22:dd078aea5d02

misc: use project/worker name as primary key
author David Demelier <markand@malikania.fr>
date Thu, 21 Jul 2022 20:23:22 +0200
parents f98ea578b1ef
children 2cb228f23f53
line wrap: on
line diff
--- a/lib/apic.h	Tue Jul 19 22:45:44 2022 +0200
+++ b/lib/apic.h	Thu Jul 21 20:23:22 2022 +0200
@@ -1,6 +1,9 @@
 #ifndef SCI_APIC_H
 #define SCI_APIC_H
 
+#include <sys/types.h>
+#include <stdint.h>
+
 #include <jansson.h>
 
 #include "config.h"
@@ -44,37 +47,28 @@
 apic_job_add(struct apic *, struct job *);
 
 ssize_t
-apic_job_todo(struct apic *, struct job *, size_t, int);
+apic_job_todo(struct apic *, struct job *, size_t, intmax_t);
 
 int
 apic_jobresult_add(struct apic *, struct jobresult *);
 
 int
-apic_project_add(struct apic *, struct project *);
-
-int
-apic_project_update(struct apic *, struct project *);
+apic_project_save(struct apic *, struct project *);
 
 ssize_t
 apic_project_list(struct apic *, struct project *, size_t);
 
 int
-apic_project_find(struct apic *, struct project *);
+apic_project_find(struct apic *, struct project *, const char *);
 
 int
-apic_project_find_id(struct apic *, struct project *);
-
-int
-apic_worker_add(struct apic *, struct worker *);
+apic_worker_save(struct apic *, struct worker *);
 
 ssize_t
 apic_worker_list(struct apic *, struct worker *, size_t);
 
 int
-apic_worker_find(struct apic *, struct worker *);
-
-int
-apic_worker_find_id(struct apic *, struct worker *);
+apic_worker_find(struct apic *, struct worker *, const char *);
 
 void
 apic_finish(struct apic *);