From a365bea0a27ad9a0c6fc612e7064290438b065f5 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 17 May 2000 17:30:59 +0000 Subject: [PATCH] Implement PROBE-FOLDER. --- v7/src/imail/imail-core.scm | 9 +++++++-- v7/src/imail/imail-file.scm | 8 ++++++-- v7/src/imail/imail-imap.scm | 6 +++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/v7/src/imail/imail-core.scm b/v7/src/imail/imail-core.scm index ed74a24b7..f3085a5c8 100644 --- a/v7/src/imail/imail-core.scm +++ b/v7/src/imail/imail-core.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-core.scm,v 1.64 2000/05/17 17:00:43 cph Exp $ +;;; $Id: imail-core.scm,v 1.65 2000/05/17 17:30:54 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -275,7 +275,7 @@ (%get-message folder index)) (define-generic %get-message (folder index)) - + ;; ------------------------------------------------------------------- ;; Remove all messages in FOLDER that are marked for deletion. ;; Unspecified result. @@ -306,6 +306,11 @@ ;; reload contents from the persistent folder. (define-generic discard-folder-cache (folder)) + +;; ------------------------------------------------------------------- +;; Probe FOLDER's server for changes. Useful as a check for new mail. + +(define-generic probe-folder (folder)) ;;;; Message type diff --git a/v7/src/imail/imail-file.scm b/v7/src/imail/imail-file.scm index e0b2d29d9..f0b41bbc1 100644 --- a/v7/src/imail/imail-file.scm +++ b/v7/src/imail/imail-file.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-file.scm,v 1.26 2000/05/17 17:18:19 cph Exp $ +;;; $Id: imail-file.scm,v 1.27 2000/05/17 17:30:58 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -205,4 +205,8 @@ (loop)))))) (define-method discard-folder-cache ((folder )) - (close-folder folder)) \ No newline at end of file + (close-folder folder)) + +(define-method probe-folder ((folder )) + folder + unspecific) \ No newline at end of file diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index c28c9cbe9..ee9a79f3c 100644 --- a/v7/src/imail/imail-imap.scm +++ b/v7/src/imail/imail-imap.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-imap.scm,v 1.50 2000/05/17 16:23:29 cph Exp $ +;;; $Id: imail-imap.scm,v 1.51 2000/05/17 17:30:59 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -691,6 +691,10 @@ (define-method discard-folder-cache ((folder )) (close-imap-connection (imap-folder-connection folder)) (reset-imap-folder! folder)) + +(define-method probe-folder ((folder )) + (guarantee-imap-folder-open folder) + (imap:command:noop (imap-folder-connection folder))) ;;;; IMAP command invocation -- 2.25.1