Add support for new BADCHARSET and UIDNEXT response codes.
authorChris Hanson <org/chris-hanson/cph>
Mon, 8 May 2000 04:29:42 +0000 (04:29 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 8 May 2000 04:29:42 +0000 (04:29 +0000)
v7/src/imail/imail.pkg
v7/src/imail/imap-response.scm

index 9d30e3523576c4311fa040182ac7ac6de63d62b0..866eeadae84e8aa99ef71581214209870157f96d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imail.pkg,v 1.25 2000/05/02 21:07:54 cph Exp $
+;;; $Id: imail.pkg,v 1.26 2000/05/08 04:29:42 cph Exp $
 ;;;
 ;;; Copyright (c) 2000 Massachusetts Institute of Technology
 ;;;
          imap:response-code:alert?
          imap:response-code:permanentflags
          imap:response-code:permanentflags?
+         imap:response-code:read-only?
+         imap:response-code:read-write?
+         imap:response-code:uidnext
+         imap:response-code:uidnext?
          imap:response-code:uidvalidity
          imap:response-code:uidvalidity?
          imap:response-code:unseen
          imap:response-code:unseen?
+         imap:response:bad?
          imap:response:bye?
          imap:response:capabilities
          imap:response:capability?
index 73b7652e805b250f0f3319d46e63bfdb60db999f..ec5fe7ce23bd24da72cf3922d86a91bc00cc7830 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imap-response.scm,v 1.10 2000/04/28 18:43:46 cph Exp $
+;;; $Id: imap-response.scm,v 1.11 2000/05/08 04:29:12 cph Exp $
 ;;;
 ;;; Copyright (c) 2000 Massachusetts Institute of Technology
 ;;;
                 (case x
                   ((ALERT PARSE READ-ONLY READ-WRITE TRYCREATE)
                    '())
+                  ((BADCHARSET)
+                   (if (char=? #\space (peek-char-no-eof port))
+                       (begin
+                         (discard-char port)
+                         (read-list port read-astring))
+                       '()))
                   ((NEWNAME)
                    (discard-known-char #\space port)
                    (let ((old (read-xstring port)))
                      (discard-known-char #\space port)
                      (list old (read-xstring port))))
-                  ((UIDVALIDITY UNSEEN)
+                  ((UIDNEXT UIDVALIDITY UNSEEN)
                    (discard-known-char #\space port)
                    (list (read-nz-number port)))
                   ((PERMANENTFLAGS)
 (define (imap:response:capabilities response)
   (cdr response))
 
-(define (imap:find-response responses keyword error?)
-  (if (pair? responses)
-      (if (eq? (caar responses) keyword)
-         (car responses)
-         (imap:find-response (cdr responses) keyword error?))
-      (and error?
-          (error "Missing response keyword:" keyword))))
-
-
 (define (imap:response:status-response? response)
   (memq (car response) '(OK NO BAD PREAUTH BYE)))
 
     (cadr entry)))
 
 (define (imap:response-code:alert? code) (eq? (car code) 'ALERT))
+(define (imap:response-code:badcharset? code) (eq? (car code) 'BADCHARSET))
 (define (imap:response-code:newname? code) (eq? (car code) 'NEWNAME))
 (define (imap:response-code:parse? code) (eq? (car code) 'PARSE))
 (define (imap:response-code:read-only? code) (eq? (car code) 'READ-ONLY))
 (define (imap:response-code:read-write? code) (eq? (car code) 'READ-WRITE))
 (define (imap:response-code:trycreate? code) (eq? (car code) 'TRYCREATE))
+(define (imap:response-code:uidnext? code) (eq? (car code) 'UIDNEXT))
 (define (imap:response-code:uidvalidity? code) (eq? (car code) 'UIDVALIDITY))
 (define (imap:response-code:unseen? code) (eq? (car code) 'UNSEEN))
 
 
 (define (imap:response-code:newname-old code) (cadr code))
 (define (imap:response-code:newname-new code) (caddr code))
+(define (imap:response-code:uidnext code) (cadr code))
 (define (imap:response-code:uidvalidity code) (cadr code))
 (define (imap:response-code:unseen code) (cadr code))
 (define (imap:response-code:permanentflags code) (cdr code))
\ No newline at end of file