1 ;;; tm-ftp.el --- tm-view internal method for anonymous ftp
3 ;; Copyright (C) 1994,1995,1996,1997 Free Software Foundation, Inc.
5 ;; Author: MASUTANI Yasuhiro <masutani@me.es.osaka-u.ac.jp>
6 ;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
8 ;; Version: $Id: tm-ftp.el,v 7.5 1997/02/07 02:04:59 morioka Exp $
9 ;; Keywords: anonymous ftp, MIME, multimedia, mail, news
11 ;; This file is part of tm (Tools for MIME).
13 ;; This program is free software; you can redistribute it and/or
14 ;; modify it under the terms of the GNU General Public License as
15 ;; published by the Free Software Foundation; either version 2, or (at
16 ;; your option) any later version.
18 ;; This program is distributed in the hope that it will be useful, but
19 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 ;; General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26 ;; Boston, MA 02111-1307, USA.
32 (defvar mime-view-ftp-module
33 (if (< emacs-major-version 19)
35 "*Module for ftp file access.")
37 (and mime-view-ftp-module
38 (require mime-view-ftp-module)
41 (defvar mime-article/dired-function
42 (if mime/use-multi-frame
43 (function dired-other-frame)
44 (function mime-article/dired-function-for-one-frame)
47 (defun mime-article/dired-function-for-one-frame (dir)
48 (let ((win (or (get-buffer-window mime::article/preview-buffer)
49 (get-largest-window))))
54 (defun mime-article/decode-message/external-ftp (beg end cal)
55 (let* ((access-type (cdr (assoc "access-type" cal)))
56 (site (cdr (assoc "site" cal)))
57 (directory (cdr (assoc "directory" cal)))
58 (name (cdr (assoc "name" cal)))
59 (mode (cdr (assoc "mode" cal)))
60 (pathname (concat "/anonymous@" site ":" directory))
62 (message (concat "Accessing " (expand-file-name name pathname) "..."))
63 (funcall mime-article/dired-function pathname)
64 (goto-char (point-min))
68 (set-atype 'mime/content-decoding-condition
69 '((type . "message/external-body")
70 ("access-type" . "anon-ftp")
71 (method . mime-article/decode-message/external-ftp)
80 ;;; tm-ftp.el ends here