1 ;;; elmo-filter.el -- Filtered Folder Interface for ELMO.
3 ;; Copyright 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 (defun elmo-filter-msgdb-create (spec numlist new-mark already-mark
34 seen-mark important-mark seen-list)
35 (if (eq (nth 2 spec) 'partial)
36 (elmo-msgdb-create (nth 2 spec)
40 seen-mark important-mark seen-list)
41 (elmo-msgdb-create-as-numlist (nth 2 spec)
45 seen-mark important-mark seen-list)))
47 (defun elmo-filter-msgdb-create-as-numlist (spec numlist new-mark already-mark
48 seen-mark important-mark
50 (elmo-msgdb-create-as-numlist (nth 2 spec)
54 seen-mark important-mark seen-list))
56 (defun elmo-filter-list-folders (spec &optional hierarchy)
59 (defun elmo-filter-append-msg (spec string &optional msg no-see)
60 (elmo-call-func (nth 2 spec) "append" string))
62 (defun elmo-filter-read-msg (spec number outbuf)
63 (elmo-call-func (nth 2 spec) "read-msg" number outbuf))
65 (defun elmo-filter-delete-msgs (spec msgs)
66 (elmo-call-func (nth 2 spec) "delete-msgs" msgs))
68 (defun elmo-filter-list-folder (spec)
69 (elmo-search (nth 2 spec) (nth 1 spec)))
71 (defun elmo-filter-list-folder-unread (spec msgdb unread-marks)
73 (mapcar 'car (elmo-msgdb-get-number-alist msgdb))
74 (elmo-list-folder-unread
75 (nth 2 spec) msgdb unread-marks)))
77 (defun elmo-filter-list-folder-important (spec msgdb)
79 (mapcar 'car (elmo-msgdb-get-number-alist msgdb))
80 (elmo-list-folder-important
84 (defun elmo-filter-max-of-folder (spec)
85 (elmo-max-of-folder (nth 2 spec)))
87 (defun elmo-filter-folder-exists-p (spec)
88 (elmo-folder-exists-p (nth 2 spec)))
90 (defun elmo-filter-folder-creatable-p (spec)
91 (elmo-call-func (nth 2 spec) "folder-creatable-p"))
93 (defun elmo-filter-create-folder (spec)
94 (elmo-create-folder (nth 2 spec)))
96 (defun elmo-filter-search (spec condition &optional from-msgs)
97 ;; search from messages in this folder
100 (elmo-search (nth 2 spec) condition
101 (elmo-filter-list-folder spec))))
103 (defun elmo-filter-use-cache-p (spec number)
104 (elmo-call-func (nth 2 spec) "use-cache-p" number))
106 (defun elmo-filter-local-file-p (spec number)
107 (elmo-call-func (nth 2 spec) "local-file-p" number))
109 (defun elmo-filter-commit (spec)
110 (elmo-commit (nth 2 spec)))
112 (defun elmo-filter-plugged-p (spec)
113 (elmo-folder-plugged-p (nth 2 spec)))
115 (defun elmo-filter-set-plugged (spec plugged add)
116 (elmo-folder-set-plugged (nth 2 spec) plugged add))
118 (defun elmo-filter-get-msg-filename (spec number &optional loc-alist)
119 ;; This function may be called when elmo-filter-local-file-p()
121 (elmo-call-func (nth 2 spec) "get-msg-filename" number loc-alist))
123 (defun elmo-filter-sync-number-alist (spec number-alist)
124 (elmo-call-func (nth 2 spec) "sync-number-alist" number-alist))
126 (defun elmo-filter-server-diff (spec)
127 (elmo-call-func (nth 2 spec) "server-diff"))
129 (provide 'elmo-filter)
131 ;;; elmo-filter.el ends here