* Create help for explaining how encrypted password file support
[alpine.git] / pith / detach.h
blobaf25b590be474b47ed8c095d564b0afe82d6148c
1 /*
2 * $Id: detach.h 1025 2008-04-08 22:59:38Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006-2008 University of Washington
6 * Copyright 2013-2014 Eduardo Chappa
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_DETACH_INCLUDED
18 #define PITH_DETACH_INCLUDED
21 #include "../pith/filttype.h"
22 #include "../pith/store.h"
26 * Data used to keep track of partial fetches...
28 typedef struct _fetch_read {
29 unsigned free_me:1;
30 unsigned we_turned_on:1;
31 MAILSTREAM *stream; /* stream of open mailbox */
32 unsigned long msgno; /* message number within mailbox */
33 char *section, /* MIME section within message */
34 *chunk, /* block of partial fetched data */
35 *chunkp, /* pointer to next char in block */
36 *endp, /* cell past last char in block */
37 *error; /* Error message to report */
38 unsigned long read, /* bytes read so far */
39 size, /* total bytes to read */
40 chunksize, /* size of chunk block */
41 allocsize; /* allocated size of chunk block */
42 long flags, /* flags to use fetching block */
43 fetchtime; /* usecs avg per chunk fetch */
44 gf_io_t readc;
45 STORE_S *cache;
46 } FETCH_READC_S;
49 extern FETCH_READC_S *g_fr_desc;
51 #define AVOID_MICROSOFT_SSL_CHUNKING_BUG ((unsigned long)(12 * 1024L))
55 * This lazily gets combined with FT_ flags from c-client so make
56 * it different from all those possible values.
58 #define DT_NODFILTER (long) 0x10000
59 #define DT_NOINTR (long) 0x20000
62 /* exported protoypes */
63 char *detach_raw(MAILSTREAM *, long, char *, gf_io_t, int);
64 char *detach(MAILSTREAM *, long, char *, long, long *, gf_io_t, FILTLIST_S *, long);
65 int valid_filter_command(char **);
66 void fetch_readc_init(FETCH_READC_S *, MAILSTREAM *, long, char *,
67 unsigned long, long, long);
69 #endif /* PITH_DETACH_INCLUDED */