fd948b34c92cffa64f870e1ff53bf3cc7d3af6c3
[elisp/flim.git] / mmbuffer.el
1 ;;; mmbuffer.el --- MIME entity module for binary buffer
2
3 ;; Copyright (C) 1998 Free Software Foundation, Inc.
4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Keywords: MIME, multimedia, mail, news
7
8 ;; This file is part of FLIM (Faithful Library about Internet Message).
9
10 ;; This program is free software; you can redistribute it and/or
11 ;; modify it under the terms of the GNU General Public License as
12 ;; published by the Free Software Foundation; either version 2, or (at
13 ;; your option) any later version.
14
15 ;; This program is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 ;; General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
24
25 ;;; Code:
26
27 (require 'mime-parse)
28
29 (defun mmbuffer-open-entity (location)
30   (mime-parse-buffer location)
31   )
32
33 (defun mmbuffer-entity-point-min (entity)
34   (mime-entity-header-start-internal entity)
35   )
36
37 (defun mmbuffer-entity-point-max (entity)
38   (mime-entity-body-end-internal entity)
39   )
40
41 (defun mmbuffer-fetch-field (entity field-name)
42   (save-excursion
43     (set-buffer (mime-entity-buffer-internal entity))
44     (save-restriction
45       (narrow-to-region (mime-entity-header-start-internal entity)
46                         (mime-entity-header-end-internal entity))
47       (std11-fetch-field field-name)
48       )))
49
50 (defun mmbuffer-cooked-p () nil)
51
52
53 ;;; @ end
54 ;;;
55
56 (provide 'mmbuffer)
57
58 ;;; mmbuffer.el ends here