#include #include #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);