* elmo-dop.el (elmo-folder-status-dop): If spool-folder is absent,
[elisp/wanderlust.git] / elmo / elmo-localnews.el
1 ;;; elmo-localnews.el --- Local News Spool Interface for ELMO.
2
3 ;; Copyright (C) 1998,1999,2000 OKUNISHI Fujikazu <fuji0924@mbox.kyoto-inet.or.jp>
4 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
5
6 ;; Author:  OKUNISHI Fujikazu <fuji0924@mbox.kyoto-inet.or.jp>
7 ;;      Yuuichi Teranishi <teranisi@gohome.org>
8 ;; Keywords: mail, net news
9
10 ;; This file is part of ELMO (Elisp Library for Message Orchestration).
11
12 ;; This program is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; any later version.
16 ;;
17 ;; This program is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 ;; GNU General Public License for more details.
21 ;;
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
26 ;;
27
28 ;;; Commentary:
29 ;;
30
31 ;;; Code:
32 ;;
33 (require 'elmo-localdir)
34
35 (defcustom elmo-localnews-folder-path "~/News"
36   "*Local news folder path."
37   :type 'directory
38   :group 'elmo)
39
40 (eval-and-compile
41   (luna-define-class elmo-localnews-folder (elmo-localdir-folder) (group))
42   (luna-define-internal-accessors 'elmo-localnews-folder))
43
44 (luna-define-method elmo-folder-initialize :before ((folder
45                                                      elmo-localnews-folder)
46                                                     name)
47   (elmo-localnews-folder-set-group-internal folder
48                                             (elmo-replace-in-string
49                                              name "/" "\\.")))
50
51 (luna-define-method elmo-localdir-folder-path ((folder elmo-localnews-folder))
52   elmo-localnews-folder-path)
53
54 (luna-define-method elmo-localdir-folder-name ((folder elmo-localnews-folder)
55                                                name)
56   (elmo-replace-in-string name "\\." "/"))
57
58 (luna-define-method elmo-folder-expand-msgdb-path ((folder
59                                                     elmo-localnews-folder))
60   (expand-file-name
61    (elmo-localnews-folder-group-internal folder)
62    (expand-file-name
63     (symbol-name (elmo-folder-type-internal folder))
64     elmo-msgdb-directory)))
65
66 (luna-define-method elmo-folder-newsgroups ((folder elmo-localnews-folder))
67   (list (elmo-localnews-folder-group-internal folder)))
68
69 (require 'product)
70 (product-provide (provide 'elmo-localnews) (require 'elmo-version))
71
72 ;;; elmo-localnews.el ends here