aboutsummaryrefslogtreecommitdiff
path: root/include/npassd/collection.h
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-04-27 12:31:12 +0530
committersinanmohd <sinan@sinanmohd.com>2024-04-28 15:43:50 +0530
commitda21dd57634aebffe0f5833b598e1128fafc0def (patch)
tree71d8e510eb788e0df695052325a1fe4fec6bf5a7 /include/npassd/collection.h
parent06e3f1885fc112093f867cd5d7a8b163ef28650c (diff)
npassd/collection: init
Diffstat (limited to 'include/npassd/collection.h')
-rw-r--r--include/npassd/collection.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/npassd/collection.h b/include/npassd/collection.h
new file mode 100644
index 0000000..36d6b72
--- /dev/null
+++ b/include/npassd/collection.h
@@ -0,0 +1,21 @@
+#include <linux/limits.h>
+#include <sqlite3.h>
+#include <sys/queue.h>
+#include <systemd/sd-bus.h>
+
+struct collection {
+ sd_bus_slot *slot;
+ char *root, *path;
+
+ int locked;
+ char *alias, *label;
+ uint64_t created, modified;
+
+ LIST_ENTRY(collection) dlist;
+};
+
+LIST_HEAD(collection_dlist, collection);
+
+int collection_new(sd_bus *bus, struct sqlite3 *db, struct collection **p,
+ const char *alias, const char *label, const char *root);
+int collection_root_make(const char *label, const char *alias, char **root);