1 ;;; elmo-internal.el --- Internal Interface for ELMO.
3 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
5 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Keywords: mail, net news
8 ;; This file is part of ELMO (Elisp Library for Message Orchestration).
10 ;; This program is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; This program is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
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.
33 ;;; ELMO internal folder
34 (luna-define-class elmo-internal-folder
(elmo-folder) ())
36 (defvar elmo-internal-folder-list
'(flag cache sendlog null
))
37 (defvar elmo-internal-obsolete-folder-list
'((mark flag
)))
39 (luna-define-method elmo-folder-initialize
((folder
42 (when (assq (intern name
) elmo-internal-obsolete-folder-list
)
44 "Folder '%s is now obsolete. Use '%s instead."
46 (cadr (assq (intern name
) elmo-internal-obsolete-folder-list
))))
47 (elmo-internal-folder-initialize folder name
))
49 (defun elmo-internal-folder-initialize (folder name
)
50 (let ((fsyms elmo-internal-folder-list
)
52 (if (progn (while fsyms
53 (setq fname
(symbol-name (car fsyms
)))
54 (when (string-match (concat "^" fname
) name
)
55 (require (intern (concat "elmo-" fname
)))
56 (setq class
(intern (concat "elmo-" fname
"-folder"))
59 (setq fsyms
(cdr fsyms
)))
61 (elmo-folder-initialize
65 :prefix
(elmo-folder-prefix-internal folder
)
66 :name
(elmo-folder-name-internal folder
)
67 :persistent
(elmo-folder-persistent-internal folder
)
68 :mime-charset
(elmo-folder-mime-charset-internal folder
))
72 (luna-define-method elmo-folder-list-subfolders
((folder elmo-internal-folder
)
77 (let ((name (concat (elmo-folder-prefix-internal folder
)
79 (if (elmo-folder-have-subfolder-p (elmo-get-folder name
))
82 elmo-internal-folder-list
)
86 (let* ((name (concat (elmo-folder-prefix-internal folder
)
88 (subfolder (elmo-get-folder name
)))
89 (if (elmo-folder-have-subfolder-p subfolder
)
90 (elmo-folder-list-subfolders subfolder
)
92 elmo-internal-folder-list
))))
95 (product-provide (provide 'elmo-internal
) (require 'elmo-version
))
97 ;;; elmo-internal.el ends here