Don't loop assuan_read_line() after parsing a status message in
[libpwmd.git] / types.h
blobc7804573bc1cb04e56b09582d6211ae2221cddaa
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 #include <assuan.h>
24 struct pwm_s {
25 assuan_context_t ctx;
26 int fd;
27 pwmd_async_t state;
28 #ifdef USE_PINENTRY
29 pid_t pid;
30 assuan_context_t pctx;
31 gpg_error_t pin_error;
32 #endif
33 int use_pinentry;
34 int pinentry_tries;
35 char *pinentry_path;
36 char *pinentry_tty;
37 char *pinentry_term;
38 char *pinentry_display;
39 char *title;
40 char *prompt;
41 char *desc;
42 char *password;
43 char *filename;
44 pwmd_password_fn passfunc;
45 void *passdata;
46 pwmd_status_fn status_func;
47 void *status_data;
48 pwmd_inquire_fn inquire_func;
49 void *inquire_data;
52 typedef struct {
53 size_t len;
54 void *buf;
55 } membuf_t;
57 #endif