blob: a3aa705bd0bb116ef186a6acd5ab31ff0e63ca11 (
plain) (
tree)
|
|
#include <stdbool.h>
#include <systemd/sd-bus.h>
#include "npassd/common.h"
#define SESSION_IFACE "org.freedesktop.Secret.Session"
#define MAX_OWNER_LEN 64
/* reusable slots */
struct session {
bool isactive;
sd_bus_slot *slot;
char owner[MAX_OWNER_LEN];
/* +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 *session, unsigned session_no,
const char *owner);
|