Added pwmd_socket_fd(). This will let applications use the file
[libpwmd.git] / types.h
blob65f3de771b5aaf5cc08c221ac36cfa202b2cbe20
1 /* vim:tw=78:ts=8:sw=4:set ft=c: */
2 /*
3 Copyright (C) 2006-2008 Ben Kibbey <bjk@luxsci.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef TYPES_H
20 #define TYPES_H
22 struct pwm_s {
23 assuan_context_t ctx;
24 int fd;
25 pwmd_async_t state;
26 #ifdef USE_PINENTRY
27 pid_t pid;
28 assuan_context_t pctx;
29 gpg_error_t pin_error;
30 #endif
31 int use_pinentry;
32 int pinentry_tries;
33 char *pinentry_path;
34 char *pinentry_tty;
35 char *pinentry_term;
36 char *pinentry_display;
37 char *title;
38 char *prompt;
39 char *desc;
40 char *password;
41 char *filename;
42 pwmd_password_fn passfunc;
43 void *passdata;
44 pwmd_status_fn status_func;
45 void *status_data;
46 pwmd_inquire_fn inquire_func;
47 void *inquire_data;
50 typedef struct {
51 size_t len;
52 void *buf;
53 } membuf_t;
55 #endif