]> git.sommitrealweird.co.uk Git - onak.git/blob - keyd.h
4313a4f005dd4a96c33e887b425ef5d15d6981b9
[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_GETSKSHASH,
29         KEYD_CMD_LAST                   /* Placeholder */
30 };
31
32 enum keyd_reply {
33         KEYD_REPLY_OK = 0,
34         KEYD_REPLY_UNKNOWN_CMD = 1
35 };
36
37 static uint32_t keyd_version = 3;
38
39 struct keyd_stats {
40         time_t started;
41         uint32_t connects;
42         uint32_t command_stats[KEYD_CMD_LAST];
43 };
44
45 #endif /* __KEYD_H__ */