diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-04-20 19:08:55 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-04-20 21:26:22 +0530 |
commit | 243c88e20bad08a7b2fe268cec3a7b5129f461a2 (patch) | |
tree | df8b1c8c6eb3cb62745d32c637f5a78d94aa2ecf /include/npassd/session.h | |
parent | 47e0d63e931d14c91635abda4a7736f9e9b987c3 (diff) |
npassd: init
Diffstat (limited to 'include/npassd/session.h')
-rw-r--r-- | include/npassd/session.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/npassd/session.h b/include/npassd/session.h new file mode 100644 index 0000000..6763c6a --- /dev/null +++ b/include/npassd/session.h @@ -0,0 +1,19 @@ +#include <stdbool.h> +#include <systemd/sd-bus.h> + +#include "npassd/common.h" + +#define SESSION_IFACE "org.freedesktop.Secret.Session" + +/* reusable slots */ +struct session { + bool isactive; + sd_bus_slot *slot; + /* +32 for snprintf("/session/%d") */ + char path[sizeof(DBUS_OBJECT_PATH) + 32]; +}; + +void session_init(struct session *s, size_t n); +int session_slot_available(struct session *s, size_t n); +int session_free(struct session *s); +int session_new(sd_bus *bus, struct session *s, unsigned slot_no); |