Working branch `elmo-lunafy' is created.
[elisp/wanderlust.git] / elmo / elmo-internal.el
1 ;;; elmo-internal.el -- Internal Interface for ELMO.
2
3 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
4
5 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
6 ;; Keywords: mail, net news
7
8 ;; This file is part of ELMO (Elisp Library for Message Orchestration).
9
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)
13 ;; any later version.
14 ;;
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.
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
26 ;;; Commentary:
27 ;; 
28
29 ;;; Code:
30 ;; 
31 (require 'elmo)
32
33 ;;; ELMO internal folder
34 (luna-define-class elmo-internal-folder (elmo-folder) ())
35
36 (luna-define-method elmo-folder-initialize ((folder
37                                              elmo-internal-folder)
38                                             name)
39   (elmo-internal-folder-initialize folder name))
40
41 (defun elmo-internal-folder-initialize (folder name)
42   (cond ((string-match "^mark" name)
43          (require 'elmo-mark)
44          (elmo-folder-initialize
45           (luna-make-entity
46            'elmo-mark-folder
47            :type 'mark
48            :prefix (elmo-folder-prefix-internal folder)
49            :name (elmo-folder-name-internal folder)
50            :persistent (elmo-folder-persistent-internal folder))
51           name))
52         ((string-match "^cache" name)
53          (require 'elmo-cache)
54          ;; XXX FIXME: elmo-cache-folder initialization
55          folder)
56         (t folder)))
57
58 (luna-define-method elmo-folder-list-subfolders ((folder elmo-internal-folder)
59                                                  &optional one-level)
60   (list (list "'cache") "'mark"))
61
62 (require 'product)
63 (product-provide (provide 'elmo-internal) (require 'elmo-version))
64
65 ;;; elmo-internal.el ends here