annotate dpid/dpi.h @ 2104:3e7e5395f0bc

non-ASCII keybindings Alexander Voigt has kindly done some testing, and it seems that this makes bindings to most keys on a German keyboard possible -- except those that need AltGr don't work yet.
author corvid <corvid@lavabit.com>
date Thu, 23 Jun 2011 19:24:11 +0000
parents 16cf380cd04c
children
rev   line source
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
1 /*! \file
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
2 * Access functions for ~/.dillo/dpi_socket_dir.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
3 * The most useful function for dillo is a_Dpi_srs, it returns
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
4 * the full path to the dpid service request socket.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
5 */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
6
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
7 #ifndef DPI_H
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
8 #define DPI_H
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
9
1223
a09dbf132be6 Remove system includes for dpid
Jorge Arellano Cid <jcid@dillo.org>
parents: 0
diff changeset
10 #include <unistd.h> /* for socklen_t */
a09dbf132be6 Remove system includes for dpid
Jorge Arellano Cid <jcid@dillo.org>
parents: 0
diff changeset
11 #include <sys/socket.h> /* for socklen_t and AF_LOCAL */
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
12
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
13 /* Some systems may not have this one... */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
14 #ifndef AF_LOCAL
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
15 #define AF_LOCAL AF_UNIX
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
16 #endif
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
17
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
18 /* This one is tricky, some sources state it should include the byte
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
19 * for the terminating NULL, and others say it shouldn't.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
20 * The other way is to only use this one when a native SUN_LEN is not present,
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
21 * but as dillo has used this for a long time successfully, here it goes.
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
22 */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
23 # define D_SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
24 + strlen ((ptr)->sun_path))
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
25
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
26 /*!
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
27 * dpi commands
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
28 */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
29 enum {
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
30 UNKNOWN_CMD,
1387
16cf380cd04c Convert dpid, file dpi and cookies dpi to dsh API
Jorge Arellano Cid <jcid@dillo.org>
parents: 1227
diff changeset
31 AUTH_CMD, /* authentication */
16cf380cd04c Convert dpid, file dpi and cookies dpi to dsh API
Jorge Arellano Cid <jcid@dillo.org>
parents: 1227
diff changeset
32 BYE_CMD, /* "DpiBye" */
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
33 CHECK_SERVER_CMD, /* "check_server" */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
34 REGISTER_ALL_CMD, /* "register_all" */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
35 REGISTER_SERVICE_CMD /* "register_service" */
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
36 };
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
37
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
38
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
39 char *a_Dpi_sockdir_file(void);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
40
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
41 char *a_Dpi_rd_dpi_socket_dir(char *dirname);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
42
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
43 char *a_Dpi_srs(void);
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
44
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
45 #endif