*** empty log message ***
[gnus] / lisp / mail-parse.el
1 ;;; mail-parse.el --- Interface functions for parsing mail
2 ;; Copyright (C) 1998 Free Software Foundation, Inc.
3
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
5 ;; This file is part of GNU Emacs.
6
7 ;; GNU Emacs is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation; either version 2, or (at your option)
10 ;; any later version.
11
12 ;; GNU Emacs is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 ;; GNU General Public License for more details.
16
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
19 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 ;; Boston, MA 02111-1307, USA.
21
22 ;;; Commentary:
23
24 ;; This file contains wrapper functions for a wide range of mail
25 ;; parsing functions.  The idea is that there are low-level libraries
26 ;; that impement according to various specs (RFC2231, DRUMS, USEFOR),
27 ;; but that programmers that want to parse some header (say,
28 ;; Content-Type) will want to use the latest spec.
29 ;;
30 ;; So while each low-level library (rfc2231.el, for instance) decodes
31 ;; faithfully according to that (proposed) standard, this library is
32 ;; the interface library.  If some later RFC supersedes RFC2231, one
33 ;; would just have to write a new low-level library, adjust the
34 ;; aliases in this library, and the users and programmers won't notice
35 ;; any changes.
36
37 ;;; Code:
38
39 (require 'ietf-drums)
40 (require 'rfc2231)
41 (require 'rfc2047)
42 (require 'rfc2045)
43
44 (defalias 'mail-header-parse-content-type 'rfc2231-parse-string)
45 (defalias 'mail-header-parse-content-disposition 'rfc2231-parse-string)
46 (defalias 'mail-content-type-get 'rfc2231-get-value)
47 (defalias 'mail-header-encode-parameter 'rfc2045-encode-string)
48
49 (defalias 'mail-header-remove-comments 'ietf-drums-remove-comments)
50 (defalias 'mail-header-remove-whitespace 'ietf-drums-remove-whitespace)
51 (defalias 'mail-header-get-comment 'ietf-drums-get-comment)
52 (defalias 'mail-header-parse-address 'ietf-drums-parse-address)
53 (defalias 'mail-header-parse-addresses 'ietf-drums-parse-addresses)
54 (defalias 'mail-header-parse-date 'ietf-drums-parse-date)
55 (defalias 'mail-narrow-to-head 'ietf-drums-narrow-to-header)
56 (defalias 'mail-quote-string 'ietf-drums-quote-string)
57
58 (defalias 'mail-header-narrow-to-field 'rfc2047-narrow-to-field)
59 (defalias 'mail-encode-encoded-word-region 'rfc2047-encode-region)
60 (defalias 'mail-encode-encoded-word-buffer 'rfc2047-encode-message-header)
61 (defalias 'mail-encode-encoded-word-string 'rfc2047-encode-string)
62 (defalias 'mail-decode-encoded-word-region 'rfc2047-decode-region)
63 (defalias 'mail-decode-encoded-word-string 'rfc2047-decode-string)
64
65 (provide 'mail-parse)
66
67 ;;; mail-parse.el ends here