* elmo.el (elmo-net-port-info): New method.
authorteranisi <teranisi>
Tue, 19 Jun 2001 02:27:39 +0000 (02:27 +0000)
committerteranisi <teranisi>
Tue, 19 Jun 2001 02:27:39 +0000 (02:27 +0000)
* elmo-shimbun.el (elmo-net-port-info): Define.
(elmo-message-encache): Ditto.

* elmo-net.el (elmo-net-port-info): Define as method.

elmo/ChangeLog
elmo/elmo-net.el
elmo/elmo-shimbun.el
elmo/elmo.el

index 25deb45..0e3fc7f 100644 (file)
@@ -1,5 +1,12 @@
 2001-06-19  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * elmo.el (elmo-net-port-info): New method.
+
+       * elmo-shimbun.el (elmo-net-port-info): Define.
+       (elmo-message-encache): Ditto.
+
+       * elmo-net.el (elmo-net-port-info): Define as method.
+
        * elmo.el (elmo-generic-folder-append-messages): Find cache file in
        unplugged status when elmo-enable-disconnected-operation is t.
 
index d3af2cc..0938c05 100644 (file)
@@ -285,7 +285,7 @@ Returns a process object.  if making session failed, returns nil."
                elmo-network-stream-type-alist)))
     (substring name 0 (match-beginning 0))))
 
-(defun elmo-net-port-info (folder)
+(luna-define-method elmo-net-port-info ((folder elmo-net-folder))
   (list (elmo-net-folder-server-internal folder)
        (elmo-net-folder-port-internal folder)
        (elmo-network-stream-type-symbol
index c1d9922..9d1f27b 100644 (file)
@@ -218,6 +218,12 @@ See `shimbun-headers' for more detail about RANGE."
                     (elmo-shimbun-folder-shimbun-internal folder))
                    add))
 
+(luna-define-method elmo-net-port-info ((folder elmo-shimbun-folder))
+  (list "shimbun"
+       (shimbun-server-internal
+        (elmo-shimbun-folder-shimbun-internal folder))
+       nil))
+
 (luna-define-method elmo-folder-check :after ((folder elmo-shimbun-folder))
   (when (shimbun-current-group-internal 
         (elmo-shimbun-folder-shimbun-internal folder))
@@ -307,6 +313,15 @@ See `shimbun-headers' for more detail about RANGE."
                    location
                    (elmo-shimbun-folder-header-hash-internal folder))))
 
+(luna-define-method elmo-message-encache :around ((folder
+                                                  elmo-shimbun-folder)
+                                                 number)
+  (if (elmo-folder-plugged-p folder)
+      (luna-call-next-method)
+    (if elmo-enable-disconnected-operation
+       (elmo-message-encache-dop folder number)
+      (error "Unplugged"))))
+
 (luna-define-method elmo-folder-list-messages-internal :around
   ((folder elmo-shimbun-folder) &optional nohide)
   (if (elmo-folder-plugged-p folder)
index d490740..b16dd97 100644 (file)
@@ -174,6 +174,9 @@ If optional LOAD-MSGDB is non-nil, msgdb is loaded.
 (luna-define-generic elmo-folder-set-plugged (folder plugged &optional add)
   "Set FOLDER as plugged.")
 
+(luna-define-generic elmo-net-port-info (folder)
+  "Get port information of FOLDER.")
+
 (luna-define-generic elmo-folder-use-flag-p (folder)
   "Returns t if FOLDER treats unread/important flag itself.")