/******************************************************************************
 *  The Elm (ME+) Mail System  -  $Revision: 1.18 $   $State: Exp $
 *
 *  Modified by: Kari Hurtta <hurtta+elm@posti.FMI.FI> 
 *                           (was hurtta+elm@ozone.FMI.FI)
 ******************************************************************************
 *  The Elm Mail System 
 *
 * 			Copyright (c) 1988-1992 USENET Community Trust
 * 			Copyright (c) 1986,1987 Dave Taylor
 *****************************************************************************/

#define	MIME_HEADER	"MIME-Version: 1.0"
#define	MIME_INCLUDE	"[include"

/* These are for figuring out what the encoding on outgoing messages should
 * be.
 */
#define HAVE_8BIT 1
#define HAVE_CTRL 4
#define HAVE_BINARY 8

/* Content-Disposition */
#define DISP_INLINE	0
#define DISP_ATTACH	1
#define DISP_AUTOATTACH 2

#define DISPOSITION(x) (x == DISP_INLINE ? "inline" : "attachment")
#define NONULL(x) (x ? x : "")
#define ENCODING(x) (x >= 0 ? mime_encode_names[x] : "<ILLEGAL>")
extern char *mime_encode_names[]; /* defined in mime.c */



struct mime_send_part {
    /* Information for text parts */
    int               encoding_part ;
    char *            encoding_part_text;  /* [include ..] produces */

    /* Is media_type_t, but it is defined on misclib.h */
    struct media_type *  TYPE;   
    struct mime_param *  TYPE_opts_part;

    int               disposition;
    struct mime_param * DISPOSITION_opts;
    
    struct string   * description;

    int               is_text;
    int               save_it_on_copy;
    charset_t         result_charset; /* Charset of text after conversion */

    long             start_loc, end_loc;
};

enum mailer_capab {  mailer_7bit=0, mailer_8bit=1, mailer_binary=2 };

typedef struct mime_send {    /* Mime parameters for this mail */
    enum mailer_capab  raw_level;

    /* Information for multipart  */
    int encoding_top; /* Encoding for top multipart type.
		       * ENCODING_8BIT:   add content_transfer_encoding: 8bit
		       *                  pass -B8BITMIME to mailer
		       * ENCODING_BINARY: add content_transfer_encoding: binary
		       *                  pass -BBINARYMIME to mailer
		       */
    char mime_boundary[STRING];
    struct mime_param * TYPE_opts_top;

    charset_t    hdr_charset;   /* to what charset headers should be flagged */
    int          encode_hdr;

    int                      top_parts_count;
    struct mime_send_part  * top_parts;

    int msg_is_multipart;

    /* not actually _MIME_ information ... */
    long cl_offset;
    long cl_start;
    long cl_end;

} mime_send_t;

/*
 * Local Variables:
 *  mode:c
 *  c-basic-offset:4
 *  buffer-file-coding-system: iso-8859-1
 * End:
 */


syntax highlighted by Code2HTML, v. 0.9.1