home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / include / libmime.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  21.4 KB  |  539 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. /* libmime.h --- external interface to libmime.a
  20.    Created: Jamie Zawinski <jwz@netscape.com>, 15-May-96.
  21.  */
  22.  
  23.  
  24. #ifndef _LIBMIME_H_
  25. #define _LIBMIME_H_
  26.  
  27. #include "xp.h"
  28.  
  29. #ifndef MOZILLA_30
  30. # define MIME_DRAFTS
  31. #endif
  32.  
  33. /* Opaque object describing a block of message headers, and a couple of
  34.    routines for extracting data from one.
  35.  */
  36.  
  37. typedef struct MimeHeaders 
  38. {
  39.   char *all_headers;            /* A char* of the entire header section. */
  40.   int32 all_headers_fp;            /* The length (it is not NULL-terminated.) */
  41.   int32 all_headers_size;        /* The size of the allocated block. */
  42.  
  43.   XP_Bool done_p;                /* Whether we've read the end-of-headers marker
  44.                                    (the terminating blank line.) */
  45.  
  46.   char **heads;                    /* An array of length n_headers which points
  47.                                    to the beginning of each distinct header:
  48.                                    just after the newline which terminated
  49.                                    the previous one.  This is to speed search.
  50.  
  51.                                    This is not initialized until all the
  52.                                    headers have been read.
  53.                                  */
  54.   int32 heads_size;                /* The length (and consequently, how many
  55.                                    distinct headers are in here.) */
  56.  
  57.  
  58.   char *obuffer;                /* This buffer is used for output. */
  59.   int32 obuffer_size;
  60.   int32 obuffer_fp;
  61.  
  62.   char *munged_subject;            /* What a hack.  This is a place to write down
  63.                                    the subject header, after it's been
  64.                                    charset-ified and stuff.  Remembered so that
  65.                                    we can later use it to generate the
  66.                                    <TITLE> tag. */
  67. } MimeHeaders;
  68.  
  69. typedef struct MimeDisplayOptions MimeDisplayOptions;
  70. typedef struct MimeParseStateObject MimeParseStateObject;
  71. #ifndef MOZILLA_30
  72. typedef struct MSG_AttachmentData MSG_AttachmentData;
  73. #endif
  74.  
  75. XP_BEGIN_PROTOS
  76.  
  77. /* Given the name of a header, returns the contents of that header as
  78.    a newly-allocated string (which the caller must free.)  If the header
  79.    is not present, or has no contents, NULL is returned.
  80.  
  81.    If `strip_p' is TRUE, then the data returned will be the first token
  82.    of the header; else it will be the full text of the header.  (This is
  83.    useful for getting just "text/plain" from "text/plain; name=foo".)
  84.  
  85.    If `all_p' is FALSE, then the first header encountered is used, and
  86.    any subsequent headers of the same name are ignored.  If TRUE, then
  87.    all headers of the same name are appended together (this is useful
  88.    for gathering up all CC headers into one, for example.)
  89.  */
  90. extern char *MimeHeaders_get(MimeHeaders *hdrs,
  91.                              const char *header_name,
  92.                              XP_Bool strip_p,
  93.                              XP_Bool all_p);
  94.  
  95. /* Given a header of the form of the MIME "Content-" headers, extracts a
  96.    named parameter from it, if it exists.  For example,
  97.    MimeHeaders_get_parameter("text/plain; charset=us-ascii", "charset")
  98.    would return "us-ascii".
  99.  
  100.    Returns NULL if there is no match, or if there is an allocation failure.
  101.  */
  102. extern char *MimeHeaders_get_parameter (const char *header_value,
  103.                                         const char *parm_name);
  104.  
  105. extern MimeHeaders *MimeHeaders_copy (MimeHeaders *srcHeaders);
  106.  
  107. extern void MimeHeaders_free (MimeHeaders *hdrs);
  108.  
  109. /* Some defines for various standard header field names.
  110.  */
  111. #define HEADER_BCC                            "BCC"
  112. #define HEADER_CC                            "CC"
  113. #define HEADER_CONTENT_BASE                    "Content-Base"
  114. #define HEADER_CONTENT_DESCRIPTION            "Content-Description"
  115. #define HEADER_CONTENT_DISPOSITION            "Content-Disposition"
  116. #define HEADER_CONTENT_ENCODING                "Content-Encoding"
  117. #define HEADER_CONTENT_LENGTH                "Content-Length"
  118. #define HEADER_CONTENT_NAME                    "Content-Name"
  119. #define HEADER_CONTENT_TRANSFER_ENCODING    "Content-Transfer-Encoding"
  120. #define HEADER_CONTENT_TYPE                    "Content-Type"
  121. #define HEADER_DATE                            "Date"
  122. #define HEADER_DISTRIBUTION                    "Distribution"
  123. #define HEADER_FCC                            "FCC"
  124. #define HEADER_FOLLOWUP_TO                    "Followup-To"
  125. #define HEADER_FROM                            "From"
  126. #define HEADER_LINES                        "Lines"
  127. #define HEADER_MESSAGE_ID                    "Message-ID"
  128. #define HEADER_MIME_VERSION                    "MIME-Version"
  129. #define HEADER_NEWSGROUPS                    "Newsgroups"
  130. #define HEADER_ORGANIZATION                    "Organization"
  131. #define HEADER_REFERENCES                    "References"
  132. #define HEADER_REPLY_TO                        "Reply-To"
  133. #define HEADER_RESENT_COMMENTS                "Resent-Comments"
  134. #define HEADER_RESENT_DATE                    "Resent-Date"
  135. #define HEADER_RESENT_FROM                    "Resent-From"
  136. #define HEADER_RESENT_MESSAGE_ID            "Resent-Message-ID"
  137. #define HEADER_RESENT_SENDER                "Resent-Sender"
  138. #define HEADER_RESENT_TO                    "Resent-To"
  139. #define HEADER_RESENT_CC                    "Resent-CC"
  140. #define HEADER_SENDER                        "Sender"
  141. #define HEADER_SUBJECT                        "Subject"
  142. #define HEADER_TO                            "To"
  143. #define HEADER_X_MAILER                        "X-Mailer"
  144. #define HEADER_X_NEWSREADER                    "X-Newsreader"
  145. #define HEADER_X_POSTING_SOFTWARE            "X-Posting-Software"
  146. #define HEADER_X_MOZILLA_STATUS                 "X-Mozilla-Status"
  147. #define HEADER_X_MOZILLA_NEWSHOST            "X-Mozilla-News-Host"
  148. #define HEADER_X_MOZILLA_DRAFT_INFO            "X-Mozilla-Draft-Info"
  149. #define HEADER_X_UIDL                        "X-UIDL"
  150. #define HEADER_XREF                            "XREF"
  151. #define HEADER_X_SUN_CHARSET                "X-Sun-Charset"
  152. #define HEADER_X_SUN_CONTENT_LENGTH            "X-Sun-Content-Length"
  153. #define HEADER_X_SUN_CONTENT_LINES            "X-Sun-Content-Lines"
  154. #define HEADER_X_SUN_DATA_DESCRIPTION        "X-Sun-Data-Description"
  155. #define HEADER_X_SUN_DATA_NAME                "X-Sun-Data-Name"
  156. #define HEADER_X_SUN_DATA_TYPE                "X-Sun-Data-Type"
  157. #define HEADER_X_SUN_ENCODING_INFO            "X-Sun-Encoding-Info"
  158. #define HEADER_X_PRIORITY                   "X-Priority"
  159.  
  160. #define HEADER_PARM_BOUNDARY                "BOUNDARY"
  161. #define HEADER_PARM_FILENAME                "FILENAME"
  162. #define HEADER_PARM_NAME                    "NAME"
  163. #define HEADER_PARM_TYPE                    "TYPE"
  164.  
  165.  
  166. typedef enum {
  167.   MimeHeadersAll,                /* Show all headers */
  168.   MimeHeadersSome,                /* Show all "interesting" headers */
  169.   MimeHeadersSomeNoRef,            /* Same, but suppress the `References' header
  170.                                    (for when we're printing this message.) */
  171.   MimeHeadersMicro,                /* Show a one-line header summary */
  172.   MimeHeadersMicroPlus,            /* Same, but show the full recipient list as
  173.                                    well (To, CC, etc.) */
  174.   MimeHeadersCitation            /* A one-line summary geared toward use in a
  175.                                    reply citation ("So-and-so wrote:") */
  176. } MimeHeadersState;
  177.  
  178.  
  179. /* The signature for various callbacks in the MimeDisplayOptions structure.
  180.  */
  181. typedef char *(*MimeHTMLGeneratorFunction) (const char *data, void *closure,
  182.                                             MimeHeaders *headers);
  183.  
  184. struct MimeDisplayOptions
  185. {
  186.   const char *url;            /* Base URL for the document.  This string should
  187.                                be freed by the caller, after the parser
  188.                                completes (possibly at the same time as the
  189.                                MimeDisplayOptions itself.) */
  190.  
  191. #ifndef MOZILLA_30
  192.   MSG_Pane* pane;                /* The libmsg pane object that corresponds to
  193.                                    what we're showing.  This is used by very
  194.                                    little... */
  195. #endif /* !MOZILLA_30 */
  196.  
  197.   MimeHeadersState headers;    /* How headers should be displayed. */
  198.   XP_Bool fancy_headers_p;    /* Whether to do clever formatting of headers
  199.                                using tables, instead of spaces. */
  200.  
  201. #ifndef MOZILLA_30
  202.   XP_Bool output_vcard_buttons_p;    /* Whether to output the buttons */
  203.                                     /* on vcards. */
  204. #endif /* !MOZILLA_30 */
  205.  
  206.   XP_Bool fancy_links_p;        /* Whether to insert fancy links, so you can
  207.                                    do things like click on an email address to
  208.                                    add it to your address book.  Something you
  209.                                    don't want to do while printing. */
  210.  
  211.   XP_Bool variable_width_plaintext_p;    /* Whether text/plain messages should
  212.                                            be in variable width, or fixed. */
  213.   XP_Bool wrap_long_lines_p;    /* Whether to wrap long lines in text/plain
  214.                                    messages. */
  215.  
  216.   XP_Bool rot13_p;            /* Whether text/plain parts should be rotated
  217.                                Set by "?rot13=true" */
  218.   XP_Bool no_inline_p;        /* Whether inline display of attachments should
  219.                                be suppressed.  Set by "?inline=false" */
  220.   char *part_to_load;        /* The particular part of the multipart which
  221.                                we are extracting.  Set by "?part=3.2.4" */
  222.  
  223.   XP_Bool write_html_p;        /* Whether the output should be HTML, or raw. */
  224.  
  225.   XP_Bool decrypt_p;        /* Whether all traces of encryption should be
  226.                                eradicated -- this is only meaningful when
  227.                                write_html_p is FALSE; we set this when
  228.                                attaching a message for forwarding, since
  229.                                forwarding someone else a message that wasn't
  230.                                encrypted for them doesn't work.  We have to
  231.                                decrypt it before sending it.
  232.                              */
  233.  
  234. #ifndef MOZILLA_30
  235.   XP_Bool nice_html_only_p;        /* If TRUE, then we only should write html if
  236.                                    it's pretty HTML (stuff that we're willing
  237.                                    to get shipped out in mail messages).  If we
  238.                                    can't generate nice stuff for some part,
  239.                                    then don't say anything at all. */
  240.  
  241.   XP_Bool dont_touch_citations_p; /* If TRUE, then we should leave citations
  242.                                      alone in plaintext parts.  If FALSE, then
  243.                                      go ahead and tweak the fonts according
  244.                                      to preferences. */
  245. #endif /* !MOZILLA_30 */
  246.  
  247.   char *default_charset;    /* If this is non-NULL, then it is the charset to
  248.                                assume when no other one is specified via a
  249.                                `charset' parameter.
  250.                              */
  251.   char *override_charset;    /* If this is non-NULL, then we will assume that
  252.                                all data is in this charset, regardless of what
  253.                                the `charset' parameter of that part says.
  254.                                This overrides `default_charset' as well.
  255.                                (This is to cope with the fact that, in the
  256.                                real world, many messages are mislabelled with
  257.                                the wrong charset.)
  258.                              */
  259.  
  260.   /* =======================================================================
  261.      Stream-related callbacks; for these functions, the `closure' argument
  262.      is what is found in `options->stream_closure'.  (One possible exception
  263.      is for output_fn; see "output_closure" below.)
  264.    */
  265.   void *stream_closure;
  266.  
  267.   /* For setting up the display stream, so that the MIME parser can inform
  268.      the caller of the type of the data it will be getting. */
  269.   int (*output_init_fn) (const char *type,
  270.                          const char *charset,
  271.                          const char *name,
  272.                          const char *x_mac_type,
  273.                          const char *x_mac_creator,
  274.                          void *stream_closure);
  275.  
  276.   /* How the MIME parser feeds its output (HTML or raw) back to the caller. */
  277.   int (*output_fn) (char *buf, int32 size, void *closure);
  278.  
  279.   /* Closure to pass to the above output_fn.  If NULL, then the
  280.      stream_closure is used. */
  281.   void *output_closure;
  282.  
  283.   /* A callback used to encapsulate an HTML section and to reset the
  284.      HTML parser to its default state at the end of a section.
  285.      start_p indicates whether this is being called just before the
  286.      start or immediately after the end of the encapsulated HTML.
  287.      layer_encapsulate_p indicates whether or not to put special
  288.      ILAYER container tags around the HTML -- Also, when start_p is
  289.      FALSE, this function should close off any tags we've left open,
  290.      reset the font size and face, etc.  This may be called multiple
  291.      times -- in particular, it will be called at the end of each
  292.      message part which might contain human-generated (and thus
  293.      arbitrarily buggy) markup.  The `abort_p' argument specifies
  294.      whether it's ok for data to be discarded.
  295.    */
  296.   int (*set_html_state_fn) (void *stream_closure,
  297.                             XP_Bool layer_encapsulate_p,
  298.                             XP_Bool start_p,
  299.                             XP_Bool abort_p);
  300.  
  301.   /* A hook for the caller to perform charset-conversion before HTML is
  302.      returned.  Each set of characters which originated in a mail message
  303.      (body or headers) will be run through this filter before being converted
  304.      into HTML.  (This should return bytes which may appear in an HTML file,
  305.      ie, we must be able to scan through the string to search for "<" and
  306.      turn it in to "<", and so on.)
  307.  
  308.      `input' is a non-NULL-terminated string of a single line from the message.
  309.      `input_length' is how long it is.
  310.      `input_charset' is a string representing the charset of this string (as
  311.        specified by MIME headers.)
  312.      `output_charset' is the charset to which conversion is desired.
  313.      `output_ret' is where a newly-malloced string is returned.  It may be
  314.        NULL if no translation is needed.
  315.      `output_size_ret' is how long the returned string is (it need not be
  316.        NULL-terminated.).
  317.    */
  318.   int (*charset_conversion_fn) (const char *input_line, int32 input_length,
  319.                                 const char *input_charset,
  320.                                 const char *output_charset,
  321.                                 char **output_ret, int32 *output_size_ret,
  322.                                 void *stream_closure);
  323.  
  324.   /* A hook for the caller to perform both charset-conversion and decoding of
  325.      MIME-2 header fields (using RFC-1522 encoding.)  Arguments and returned
  326.      values are as for `charset_conversion_fn'.
  327.    */
  328.   int (*rfc1522_conversion_fn) (const char *input_line, int32 input_length,
  329.                                 const char *input_charset,
  330.                                 const char *output_charset,
  331.                                 char **output_ret, int32 *output_size_ret,
  332.                                 void *stream_closure);
  333.  
  334.   /* A hook for the caller to translate a time string into a prettier or more
  335.      compact or localized form. */
  336.   char *(*reformat_date_fn) (const char *old_date, void *stream_closure);
  337.  
  338.   /* A hook for the caller to turn a file name into a content-type. */
  339.   char *(*file_type_fn) (const char *filename, void *stream_closure);
  340.  
  341.   /* A hook for the caller to turn a content-type into descriptive text. */
  342.   char *(*type_description_fn) (const char *content_type,void *stream_closure);
  343.  
  344.   /* A hook for the caller to turn a content-type into an image icon. */
  345.   char *(*type_icon_name_fn) (const char *content_type, void *stream_closure);
  346.  
  347.   /* A hook by which the user may be prompted for a password by the security
  348.      library.  (This is really of type `SECKEYGetPasswordKey'; see sec.h.) */
  349.   void *(*passwd_prompt_fn)(void *arg1, void *arg2);
  350.   void *passwd_prompt_fn_arg;
  351.  
  352.   /* =======================================================================
  353.      Various callbacks; for all of these functions, the `closure' argument
  354.      is what is found in `html_closure'.
  355.    */
  356.   void *html_closure;
  357.  
  358.   /* For emitting some HTML before the start of the outermost message
  359.      (this is called before any HTML is written to layout.) */
  360.   MimeHTMLGeneratorFunction generate_header_html_fn;
  361.  
  362.   /* For emitting some HTML after the outermost header block, but before
  363.      the body of the first message. */
  364.   MimeHTMLGeneratorFunction generate_post_header_html_fn;
  365.  
  366.   /* For emitting some HTML at the very end (this is called after libmime
  367.      has written everything it's going to write.) */
  368.   MimeHTMLGeneratorFunction generate_footer_html_fn;
  369.  
  370.   /* For turning a message ID into a loadable URL. */
  371.   MimeHTMLGeneratorFunction generate_reference_url_fn;
  372.  
  373.   /* For turning a mail address into a mailto URL. */
  374.   MimeHTMLGeneratorFunction generate_mailto_url_fn;
  375.  
  376.   /* For turning a newsgroup name into a news URL. */
  377.   MimeHTMLGeneratorFunction generate_news_url_fn;
  378.  
  379.   /* =======================================================================
  380.      Callbacks to handle the backend-specific inlined image display
  381.      (internal-external-reconnect junk.)  For `image_begin', the `closure'
  382.      argument is what is found in `stream_closure'; but for all of the
  383.      others, the `closure' argument is the data that `image_begin' returned.
  384.    */
  385.  
  386.   /* Begins processing an embedded image; the URL and content_type are of the
  387.      image itself. */
  388.   void *(*image_begin) (const char *image_url, const char *content_type,
  389.                         void *stream_closure);
  390.  
  391.   /* Stop processing an image. */
  392.   void (*image_end) (void *image_closure, int status);
  393.  
  394.   /* Dump some raw image data down the stream. */
  395.   int (*image_write_buffer) (char *buf, int32 size, void *image_closure);
  396.  
  397.   /* What HTML should be dumped out for this image. */
  398.   char *(*make_image_html) (void *image_closure);
  399.  
  400.  
  401.   /* =======================================================================
  402.      Other random opaque state.
  403.    */
  404.   MimeParseStateObject *state;        /* Some state used by libmime internals;
  405.                                        initialize this to 0 and leave it alone.
  406.                                      */
  407.  
  408.  
  409. #ifdef MIME_DRAFTS
  410.   /* =======================================================================
  411.     Mail Draft hooks -- 09-19-1996
  412.    */
  413.   XP_Bool decompose_file_p;            /* are we decomposing a mime msg 
  414.                                        into separate files */
  415.   XP_Bool done_parsing_outer_headers;  /* are we done parsing the outer message
  416.                                           headers; this is really useful when
  417.                                           we have multiple Message/RFC822 
  418.                                           headers */
  419.   XP_Bool is_multipart_msg;            /* are we decomposing a multipart
  420.                                           message */
  421.  
  422.   int decompose_init_count;            /* used for non multipart message only
  423.                                         */
  424.  
  425.   XP_Bool signed_p;                       /* to tell draft this is a signed
  426.                                           message */
  427.  
  428.   /* Callback to gather the outer most headers so we could use the 
  429.      information to initialize the addressing/subject/newsgroups fields
  430.      for the composition window. */
  431.   int (*decompose_headers_info_fn) (void *closure, 
  432.                                     MimeHeaders *headers);
  433.  
  434.   /* Callbacks to create temporary files for drafts attachments. */
  435.   int (*decompose_file_init_fn) (void *stream_closure, 
  436.                                  MimeHeaders *headers );
  437.  
  438.   int (*decompose_file_output_fn) (char *buf, int32 size,
  439.                                    void *stream_closure);
  440.  
  441.   int (*decompose_file_close_fn) (void *stream_closure);
  442. #endif /* MIME_DRAFTS */
  443.  
  444.   int32 attachment_icon_layer_id; /* Hackhackhack.  This is zero if we have
  445.                                      not yet emitted the attachment layer
  446.                                      stuff.  If we have, then this is the
  447.                                      id number for that layer, which is a
  448.                                      unique random number every time, to keep
  449.                                      evil people from writing javascript code
  450.                                      to hack it. */
  451.  
  452. };
  453.  
  454.  
  455.  
  456. /* Mozilla-specific interfaces
  457.  */
  458.  
  459. /* Given a URL, this might return a better suggested name to save it as.
  460.  
  461.    When you have a URL, you can sometimes get a suggested name from
  462.    URL_s->content_name, but if you're saving a URL to disk before the
  463.    URL_Struct has been filled in by netlib, you don't have that yet.
  464.  
  465.    So if you're about to prompt for a file name *before* you call FE_GetURL
  466.    with a format_out of FO_SAVE_AS, call this function first to see if it
  467.    can offer you advice about what the suggested name for that URL should be.
  468.  
  469.    (This works by looking in a cache of recently-displayed MIME objects, and
  470.    seeing if this URL matches.  If it does, the remembered content-name will
  471.    be used.)
  472.  */
  473. extern char *MimeGuessURLContentName(MWContext *context, const char *url);
  474.  
  475. /* Given a URL, return the content type for the mime part, if the passed context
  476.    recently parsed a message containing the part specified by the URL.
  477.    This is used to figure out if we need to open the url in a browser window,
  478.    or if we're just going to do a save as, anyay.
  479. */
  480. extern char *MimeGetURLContentType(MWContext *context, const char *url);
  481.  
  482.  
  483. /* Determines whether the given context is currently showing a text/html
  484.    message.  (Used by libmsg to determine if replys should bring up the
  485.    text/html editor. */
  486.  
  487. extern XP_Bool MimeShowingTextHtml(MWContext* context);
  488.  
  489.  
  490.  
  491. /* Yeech, hack...  Determine the URL to use to save just the HTML part of the
  492.    currently-displayed message to disk.  If the current message doesn't have
  493.    a text/html part, returns NULL.  Otherwise, the caller must free the
  494.    returned string using XP_FREE(). */
  495.  
  496. extern char* MimeGetHtmlPartURL(MWContext* context);
  497.  
  498.  
  499. /* Return how many attachments are in the currently-displayed message. */
  500. extern int MimeGetAttachmentCount(MWContext* context);
  501.  
  502. /* Returns what attachments are being viewed  in the currently-displayed
  503.    message.  The returned data must be free'd using
  504.    MimeFreeAttachmentList(). */
  505. extern int MimeGetAttachmentList(MWContext* context,
  506.                                  MSG_AttachmentData** data);
  507.  
  508. extern void MimeFreeAttachmentList(MSG_AttachmentData* data);
  509.  
  510.  
  511. /* Call this when destroying a context; this frees up some memory.
  512.  */
  513. extern void MimeDestroyContextData(MWContext *context);
  514.  
  515.  
  516. /* After a message has been fully displayed (the document has finished
  517.    loading) FEs call this with a Mail or News window to determine how
  518.    the "security" toolbar button should be rendered.
  519.  
  520.    The first two values are whether it was an encrypted and/or signed
  521.    message; the second two are whether it was *valid*.
  522.  */
  523. extern void MIME_GetMessageCryptoState(MWContext *context,
  524.                                        XP_Bool *signed_return,
  525.                                        XP_Bool *encrypted_return,
  526.                                        XP_Bool *signed_ok_return,
  527.                                        XP_Bool *encrypted_ok_return);
  528.  
  529. #ifndef MOZILLA_30
  530. /* Used only by libnet, this indicates that the user bonked on the "show me
  531.    details about attachments" button. */
  532.  
  533. extern int MIME_DisplayAttachmentPane(MWContext* context);
  534. #endif /* MOZILLA_30 */
  535.  
  536. XP_END_PROTOS
  537.  
  538. #endif /* _LIBMIME_H_ */
  539.