2003-09-22 Yuuichi Teranishi <teranisi@gohome.org>
+ * modb-standard.el (modb-standard-make-message-entity,
+ elmo-msgdb-make-message-entity,
+ elmo-msgdb-create-message-entity-from-buffer,
+ elmo-msgdb-message-entity-number,
+ elmo-msgdb-message-entity-set-number,
+ elmo-msgdb-message-entity-field,
+ elmo-msgdb-message-entity-set-field,
+ elmo-msgdb-copy-message-entity,
+ elmo-msgdb-match-condition-internal): Remove.
+
* modb-entity.el: New file (again).
* modb.el (toplevel): Require modb-entity.
(modb-standard-entity-map-internal msgdb)))
ret)))
-;;; Message entity handling.
-(defsubst modb-standard-make-message-entity (args)
- "Make an message entity."
- (cons (plist-get args :message-id)
- (vector (plist-get args :number)
- (plist-get args :references)
- (plist-get args :from)
- (plist-get args :subject)
- (plist-get args :date)
- (plist-get args :to)
- (plist-get args :cc)
- (plist-get args :size)
- (plist-get args :extra))))
-
-(luna-define-method elmo-msgdb-make-message-entity ((msgdb modb-standard)
- args)
- (modb-standard-make-message-entity args))
-
-(luna-define-method elmo-msgdb-create-message-entity-from-buffer
- ((msgdb modb-standard) number args)
- (let ((extras elmo-msgdb-extra-fields)
- (default-mime-charset default-mime-charset)
- entity message-id references from subject to cc date
- extra field-body charset size)
- (save-excursion
- (setq entity (modb-standard-make-message-entity args)
- ;; For compatibility.
- msgdb (elmo-message-entity-handler entity))
- (elmo-set-buffer-multibyte default-enable-multibyte-characters)
- (setq message-id (elmo-msgdb-get-message-id-from-buffer))
- (and (setq charset (cdr (assoc "charset" (mime-read-Content-Type))))
- (setq charset (intern-soft charset))
- (setq default-mime-charset charset))
- (setq references
- (or (elmo-msgdb-get-last-message-id
- (elmo-field-body "in-reply-to"))
- (elmo-msgdb-get-last-message-id
- (elmo-field-body "references")))
- from (elmo-replace-in-string
- (elmo-mime-string (or (elmo-field-body "from")
- elmo-no-from))
- "\t" " ")
- subject (elmo-replace-in-string
- (elmo-mime-string (or (elmo-field-body "subject")
- elmo-no-subject))
- "\t" " ")
- date (elmo-field-body "date")
- to (mapconcat 'identity (elmo-multiple-field-body "to") ",")
- cc (mapconcat 'identity (elmo-multiple-field-body "cc") ","))
- (unless (elmo-msgdb-message-entity-field msgdb entity 'size)
- (if (setq size (elmo-field-body "content-length"))
- (setq size (string-to-int size))
- (setq size 0)))
- (while extras
- (if (setq field-body (elmo-field-body (car extras)))
- (elmo-msgdb-message-entity-set-field
- msgdb entity (intern (downcase (car extras))) field-body))
- (setq extras (cdr extras)))
- (dolist (field '(number message-id references from subject
- date to cc size))
- (when (symbol-value field)
- (elmo-msgdb-message-entity-set-field
- msgdb entity field (symbol-value field))))
- entity)))
-
-;;; Message entity interface
-;;
-(luna-define-method elmo-msgdb-message-entity-number ((msgdb modb-standard)
- entity)
- ;; To be implemented.
- )
-
-(luna-define-method elmo-msgdb-message-entity-set-number ((msgdb modb-standard)
- entity
- number)
- ;; To be implemented.
- )
-
-(luna-define-method elmo-msgdb-message-entity-field ((msgdb modb-standard)
- entity field
- &optional decode)
- ;; To be implemented.
- )
-
-(luna-define-method elmo-msgdb-message-entity-set-field ((msgdb modb-standard)
- entity field value)
- ;; To be implemented.
- )
-
-(luna-define-method elmo-msgdb-copy-message-entity ((msgdb modb-standard)
- entity)
- ;; To be implemented.
- )
-
-(luna-define-method elmo-msgdb-match-condition-internal ((msgdb modb-standard)
- condition
- entity flags numbers)
- ;; To be implemented.
- )
-
(require 'product)
(product-provide (provide 'modb-standard) (require 'elmo-version))