aboutsummaryrefslogtreecommitdiffstats
path: root/g10/filter.h
diff options
context:
space:
mode:
Diffstat (limited to 'g10/filter.h')
-rw-r--r--g10/filter.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/g10/filter.h b/g10/filter.h
index 5c1b9372a..13f6b38d5 100644
--- a/g10/filter.h
+++ b/g10/filter.h
@@ -32,12 +32,14 @@ typedef struct {
} md_filter_context_t;
typedef struct {
+ int refcount; /* Initialized to 1. */
+
/* these fields may be initialized */
int what; /* what kind of armor headers to write */
int only_keyblocks; /* skip all headers but ".... key block" */
const char *hdrlines; /* write these headerlines */
- /* these fileds must be initialized to zero */
+ /* these fields must be initialized to zero */
int no_openpgp_data; /* output flag: "No valid OpenPGP data found" */
/* the following fields must be initialized to zero */
@@ -121,6 +123,7 @@ typedef struct {
unsigned long last; /* last amount reported */
unsigned long offset; /* current amount */
unsigned long total; /* total amount */
+ int refcount;
} progress_filter_context_t;
/* encrypt_filter_context_t defined in main.h */
@@ -130,9 +133,10 @@ int md_filter( void *opaque, int control, iobuf_t a, byte *buf, size_t *ret_len)
void free_md_filter_context( md_filter_context_t *mfx );
/*-- armor.c --*/
+armor_filter_context_t *new_armor_context (void);
+void release_armor_context (armor_filter_context_t *afx);
+int push_armor_filter (armor_filter_context_t *afx, iobuf_t iobuf);
int use_armor_filter( iobuf_t a );
-int armor_filter( void *opaque, int control,
- iobuf_t chain, byte *buf, size_t *ret_len);
UnarmorPump unarmor_pump_new (void);
void unarmor_pump_release (UnarmorPump x);
int unarmor_pump (UnarmorPump x, int c);
@@ -153,8 +157,8 @@ int copy_clearsig_text (iobuf_t out, iobuf_t inp, gcry_md_hd_t md,
int escape_dash, int escape_from, int pgp2mode);
/*-- progress.c --*/
-int progress_filter (void *opaque, int control,
- iobuf_t a, byte *buf, size_t *ret_len);
+progress_filter_context_t *new_progress_context (void);
+void release_progress_context (progress_filter_context_t *pfx);
void handle_progress (progress_filter_context_t *pfx,
iobuf_t inp, const char *name);