2
* $Id: detach.h 211 2006-11-01 00:34:10Z hubert@u.washington.edu $
4
* ========================================================================
5
* Copyright 2006 University of Washington
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
11
* http://www.apache.org/licenses/LICENSE-2.0
13
* ========================================================================
16
#ifndef PITH_DETACH_INCLUDED
17
#define PITH_DETACH_INCLUDED
20
#include "../pith/filttype.h"
21
#include "../pith/store.h"
25
* Data used to keep track of partial fetches...
27
typedef struct _fetch_read {
29
MAILSTREAM *stream; /* stream of open mailbox */
30
unsigned long msgno; /* message number within mailbox */
31
char *section, /* MIME section within message */
32
*chunk, /* block of partial fetched data */
33
*chunkp, /* pointer to next char in block */
34
*endp, /* cell past last char in block */
35
*error; /* Error message to report */
36
unsigned long read, /* bytes read so far */
37
size, /* total bytes to read */
38
chunksize, /* size of chunk block */
39
allocsize; /* allocated size of chunk block */
40
long flags, /* flags to use fetching block */
41
fetchtime; /* usecs avg per chunk fetch */
47
extern FETCH_READC_S *g_fr_desc;
49
#define AVOID_MICROSOFT_SSL_CHUNKING_BUG ((unsigned long)(12 * 1024L))
51
/* exported protoypes */
52
char *detach_raw(MAILSTREAM *, long, char *, gf_io_t, int);
53
char *detach(MAILSTREAM *, long, char *, long, long *, gf_io_t, FILTLIST_S *, int);
54
int valid_filter_command(char **);
56
#endif /* PITH_DETACH_INCLUDED */