When do_inquire() is initially called, fill the entire buffer before
[libpwmd.git] / types.h
blobdcc4ca0cee402c9792964bdef130e2aacdd3b31a
1 /* vim:tw=78:ts=8:sw=4:set ft=c: */
2 /*
3 Copyright (C) 2006-2007 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 #ifdef USE_PINENTRY
25 pid_t pid;
26 assuan_context_t pctx;
27 #endif
28 int use_pinentry;
29 int pinentry_tries;
30 char *pinentry_path;
31 char *pinentry_tty;
32 char *pinentry_term;
33 char *pinentry_display;
34 char *title;
35 char *prompt;
36 char *desc;
37 char *password;
38 char *filename;
39 pwmd_password_fn passfunc;
40 void *passdata;
41 pwmd_status_fn status_func;
42 void *status_data;
43 pwmd_inquire_fn inquire_func;
44 void *inquire_data;
47 typedef struct {
48 size_t len;
49 void *buf;
50 } membuf_t;
52 struct inquire_s {
53 assuan_context_t ctx;
54 const char *buf;
55 size_t len;
58 #endif