]> git.sommitrealweird.co.uk Git - onak.git/blob - keyd.h
ce19d8dd13f0c78fda9911fd8e9456ea627da9a6
[onak.git] / keyd.h
1 /*
2  * keyd.h - Public API for keyd.
3  *
4  * Jonathan McDowell <noodles@earth.li>
5  *
6  * Copyright 2004 Project Purple
7  */
8
9 #ifndef __KEYD_H__
10 #define __KEYD_H__
11
12 #include <stdint.h>
13
14 #define KEYD_SOCKET "keyd.sock"
15
16 enum keyd_ops {
17         KEYD_CMD_UNKNOWN = 0,
18         KEYD_CMD_VERSION = 1,
19         KEYD_CMD_GET,
20         KEYD_CMD_STORE,
21         KEYD_CMD_DELETE,
22         KEYD_CMD_GETTEXT,
23         KEYD_CMD_GETFULLKEYID,
24         KEYD_CMD_KEYITER,
25         KEYD_CMD_CLOSE,
26         KEYD_CMD_QUIT,
27         KEYD_CMD_STATS,
28         KEYD_CMD_LAST                   /* Placeholder */
29 };
30
31 enum keyd_reply {
32         KEYD_REPLY_OK = 0,
33         KEYD_REPLY_UNKNOWN_CMD = 1
34 };
35
36 static uint32_t keyd_version = 2;
37
38 struct keyd_stats {
39         time_t started;
40         uint32_t connects;
41         uint32_t command_stats[KEYD_CMD_LAST];
42 };
43
44 #endif /* __KEYD_H__ */