diff options
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); |