libksba  1.6.0
About: KSBA is a library to make the tasks of working with X.509 certificates, CMS data and related objects more easy.
  Fossies Dox: libksba-1.6.0.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

writer.h
Go to the documentation of this file.
1 /* writer.h - internal definitions for the writer object.
2  * Copyright (C) 2001, 2010, 2012 g10 Code GmbH
3  *
4  * This file is part of KSBA.
5  *
6  * KSBA is free software; you can redistribute it and/or modify
7  * it under the terms of either
8  *
9  * - the GNU Lesser General Public License as published by the Free
10  * Software Foundation; either version 3 of the License, or (at
11  * your option) any later version.
12  *
13  * or
14  *
15  * - the GNU General Public License as published by the Free
16  * Software Foundation; either version 2 of the License, or (at
17  * your option) any later version.
18  *
19  * or both in parallel, as here.
20  *
21  * KSBA is distributed in the hope that it will be useful, but WITHOUT
22  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
24  * License for more details.
25  *
26  * You should have received a copies of the GNU General Public License
27  * and the GNU Lesser General Public License along with this program;
28  * if not, see <http://www.gnu.org/licenses/>.
29  */
30 
31 #ifndef WRITER_H
32 #define WRITER_H 1
33 
34 #include <stdio.h>
35 
42 };
43 
44 
45 struct ksba_writer_s {
46  int error;
47  unsigned long nwritten;
48  enum writer_type type;
50 
51  gpg_error_t (*filter)(void*,
52  const void *,size_t, size_t *,
53  void *, size_t, size_t *);
54  void *filter_arg;
55 
56  union {
57  int fd; /* for WRITER_TYPE_FD */
58  FILE *file; /* for WRITER_TYPE_FILE */
59  struct {
60  int (*fnc)(void*,const void *,size_t);
61  void *value;
62  } cb; /* for WRITER_TYPE_CB */
63  struct {
64  unsigned char *buffer;
65  size_t size;
66  } mem; /* for WRITER_TYPE_MEM */
67  } u;
68  void (*notify_cb)(void*,ksba_writer_t);
70 };
71 
72 
73 
74 
75 #endif /*WRITER_H*/
struct ksba_writer_s * ksba_writer_t
Definition: ksba.h:253
gpg_error_t(* filter)(void *, const void *, size_t, size_t *, void *, size_t, size_t *)
Definition: writer.h:51
int error
Definition: writer.h:46
enum writer_type type
Definition: writer.h:48
struct ksba_writer_s::@34::@36 mem
void(* notify_cb)(void *, ksba_writer_t)
Definition: writer.h:68
void * filter_arg
Definition: writer.h:54
union ksba_writer_s::@34 u
void * notify_cb_value
Definition: writer.h:69
unsigned char * buffer
Definition: writer.h:64
unsigned long nwritten
Definition: writer.h:47
void * value
Definition: writer.h:61
FILE * file
Definition: writer.h:58
int(* fnc)(void *, const void *, size_t)
Definition: writer.h:60
int ndef_is_open
Definition: writer.h:49
struct ksba_writer_s::@34::@35 cb
size_t size
Definition: writer.h:65
writer_type
Definition: writer.h:36
@ WRITER_TYPE_FILE
Definition: writer.h:39
@ WRITER_TYPE_NONE
Definition: writer.h:37
@ WRITER_TYPE_FD
Definition: writer.h:38
@ WRITER_TYPE_MEM
Definition: writer.h:41
@ WRITER_TYPE_CB
Definition: writer.h:40